Hi All,
I have a small excel program.
I would like to be able to use this program to update a SQL table.
What would be the function to say update line 2 in SQL table Test in Database ABC
Thanks
Looking at the information under the heading "Precision can be omitted or be any of:".
The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.)
Now, I would like to have a string with multiple parameters formatted (truncated):
printf("%.*s, %.*s", 3, 3, "abcdef", "xyz123");
but the program crashes.
What is the correct syntax?
Thank You.
Dear experts,
is there any existing rails helper to create a valid URL?
Specifically, I am generating a Web URL with some parameters that having special character (for e.g space i need to convert into + , and many others special characters).
http://domain.name?param1=ABC+DEF¶m2=GHI
Thanks.
I am chnaging the image src onClick event like below
IF the hyperlink is clicked then i need to change the image in a div box
<div id="left_img">
<img style="float: right;" src="/image/char.gif">
</div>
Jquery
$("#left_img").attr("src","http://www.abc.net/image/2_char.gif");
Now i want that instead of abrupt change of image there should fade out of old image and fadein of new image
How can i do that
Say a simple structure
struct abc
{
int a;
char b;
}
I got some value in a variable defined as its structure and now I want to print below
a = [some value]
b = [some character]
What is the best way to achieve this for an arbitrary structure without having to write a dump...(...) function for each of the structure I encounter?
An XML file is being posted to a url that my spring mvc is responding to.
In .NET, I could do this:
request.Form[0]
request.Form["abc"]
or
request.QueryString[0]
request.QueryString["some_key"]
Now with spring/servlets it seems I can only do this:
request.getParameter("some_key")
or get all the names or values.
When someone is posting a file to a url, using http post, won't this be just a single request parameter then?
Can I get the parameter using index with servlets?
Hi,
I'm trying to repeat the elements of vector a, b number of times. That is, a="abc" should be "aabbcc" if y = 2.
Why doesn't either of the following code examples work?
sapply(a, function (x) rep(x,b))
and from the plyr package,
aaply(a, function (x) rep(x,b))
I know I'm missing something very obvious ...
First off, I know the title is generic and not fitting. I just couldn't think of a title that could describe my problem.
I have a table Recipients in MySQL structured like this:
id | email | status
1 foo@bar S
2 bar@baz S
3 abc@def R
4 sta@cko B
I need to convert the data into the following XML, depending on the status field. For example:
<Recipients>
<RecipientsSent>
<!-- Have the 'S' status -->
<recipient>foo@bar</recipient>
<recipient>bar@baz</recipient>
</RecipientsSent>
<RecipientsRegexError>
<recipient>abc@def</recipient>
</RecipientsRegexError>
<RecipientsBlocked>
<recipient>sta@cko</recipient>
</RecipientsBlocked>
</Recipients>
I have this PHP code to implement this ($recipients contains an associative array of the db table):
<Recipients>
<RecipientsSent>
<?php
foreach ($recipients as $recipient):
if ($recipient['status'] == 'S'):
echo "<recipient>" . $recipient['email'] . "</recipient>";
endif;
endforeach;
?>
</RecipientsSent>
<RecipientsRegexError>
<?php
foreach ($recipients as $recipient):
if ($recipient['status'] == 'R'):
echo "<recipient>" . $recipient['email'] . "</recipient>";
endif;
endforeach;
?>
</RecipientsRegexError>
<?php /** same loop for the B status */ ?>
</Recipients>
So, this means that if I have 1000 entries in the table and 4 different status' that can be checked, it means that there will be 4 loops, each one executing 1000 times.
How can this be done in a more efficient manner? I thought about fetching four different sets from the database, meaning 4 different queries, would that be more efficient? I'm thinking it could be done with one loop but but I can't come up with a solution.
Any way this could be done with only one loop?
Say you've got some IEnumerable called S of length N. I would like to select all continuous subsequences of length n <= N from S.
If S were, say, a string, this'd be pretty easy. There are (S.Length - n + 1) subsequences of length n. For example, "abcdefg" is length (7), so that means it has (5) substrings of length (3): "abc", "bcd", "cde", "def", "efg".
But S could be any IEnumerable, so this route isn't open. How do I use extension methods to solve this?
Looking at the information under the heading "Precision can be omitted or be any of:".
The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.)
Now, I would like to have a string with multiple parameters formatted (truncated):
printf("%.*s", "%.*s", 3, 3, "abcdef", "xyz123");
but the program crashes.
What is the correct syntax?
Thank You.
function testing() {
$.ajax({
type: "POST",
url: "testing.php",
data: "call="+$("#abc").val(),
success: function(msg){
alert( msg );
}
});
}
I want to post the data to testing.php but if i got special characters like & sign. it will create the problem. How do i go about it?
Thank You
hi
how to send 2-3 param's to Winform C# program ?
for example: i'll send something like MyProg.exe 10 20 "abc"
and in my program i can receive those values
(i dont want to show MyProg.exe - it will work background)
thank's in advance
INFORMIX-SQL or any other SQL-based DB:
Suppose I have an app where depending on the value of some columns, example:
company.code char(3) {abc}
company.brach char(2) {01}
Can I construct table name "abc01" for inclusion in SELECT * FROM abc01; ?
In other words, a variable table name.. same question applies for column names.
In Java/C++, for example, do you casually say that 'a' is the first character of "abc", or the zeroth?
Do people say both and it's always going to be ambiguous, or is there an actual convention?
If I get some value by using getline( cin, myStr ); a newline is printed after the information the user entered - logically as he pressed enter:
Please enter something: ABC <enter => \n>
This text is printed out by the program and should be in the same line as before
How to keep the newline after user input away?
I'm using MSVC 2010 and build a simple console app using iostream and string as main libraries.
I am looking for some easy jquery solution for hover images.
Like if i define a class. them jquery should get the current image like
abc.png then chnage that to abc_on.png
and then put that to on hover image
How can i do that.
i don't want to add function for every button.
Just one function and it do all.
My Images all usually imagename.png or imagename_on.png
There is something in my mind:
In a web page,there are lots of things we can see from our browser.One of them is text.
Now i have some patterns,"abc","hello",or some other strings.In the text, i want to find all the patterns and change the color or background-color of them.
Like this:
text: what a wonderful day! pattern: "a","day"
resulet: what a wonderful day!
How can solve this whit Javascript?
For example, I open a file called "abc.txt". Now I want to search for all occurrences of "he is" and "first" simultaneously. I want to be able to do a search forward i.e. Ctrl-s and I'll reach the next instance of either of the two search strings.
There are two options lists with different names, i need to set first options selected in both of them.
<input type="radio" name="first_list" value="0">abc
<input type="radio" name="first_list" value="1">cba
<input type="radio" name="second_list" value="0">opc
<input type="radio" name="second_list" value="1">cpo
Sure, i can do this way:
$("input:radio[name='first_list'][value='0']").attr("checked", "checked");
$("input:radio[name='second_list'][value='0']").attr("checked", "checked");
Maybe there is another more compact way to do this?
I have this method for downloading a script:
var script = document.createElement('script');
script.setAttribute("src", url);
document.getElementsByTagName("head")[0].appendChild(script);
This gives me a GET like this:
GET http://127.0.0.1:17315/Scripts/abc.js HTTP/1.1
However I need to add a header:
Authorization: Bearer Ipnsfm9h1MWYIM0n1ng
Can anyone tell me how I can add a header when I am using Javascript to perform the GET?
Hi,
I am working on origin:abc remote repository . I want to update the origin:def repository in the remote repository in git. Can some please give me command for this?
Hi
Below ASP code have some error in 'Dim MonthNum=Month("Ctxtdatefrom") '
Can help to solve this.
......
If session("cmbLeaveType")=2 then
set rs2 = objconn.execute("select * form Particulars where empid='" & session("empid") & "'")
if ChildNationality = ABC then
Dim MonthNum=Month("Ctxtdatefrom")
Dim MonthNum2=Month("ctxtdateto")
If(MonthNum=5 and monthnum2=5)
if tdays1 then
else
set rs = objconn.execute("insert into leavebank (empid, datesubmit, datefrom, dateto....
END IF
END IF
END IF
END IF
String string1 = "abCdefGhijklMnopQrstuvwYz";
String string2 = "ABC";
I had been using string1.startsWith(string2), which would return false in the above example, but now I need to ignore case sensitivity, and there is not a String.startsWithIgnoreCase().
Besides doing
string1.toLowerCase.startsWith(string2.toLowerCase());
is there an efficient way to see if string1 starts with string2 in a case-insensitive way?