string-concatenation

PHP - "Sal's mall is $emo" vs "Sal's mall is ".$emo - string with quotes concatenation efficiency

In PHP, which is a better way to concatenate strings (with a single-quote) in terms of resources? "Sal's mall is $emo." or "Sal's mall is ".$emo.'.' or 'Sal\'s mall is '.$emo.'.' ...

Concatenate some Array Elements among many in PHP

I have an array "$abc" which has 9 elements, as:- Array ( [a] => Jack [b] => went [c] => up [d] => the [e] => hill [f] => but [g] => never [h] => came [i] => back ) Now I need to concat only the 4 elements starting from the "b" index to the "e" index only. But I don't know what to do. I used the "im...

Howto add a string to the 'type <filename>' DOS command before merging into file ?

Question: I've several text files containing sql create table/column/view/storedProcedure textfiles. Now I want to merge the textfiles into one textfile. I go into the directory, and type: type *.sql >> allcommands.sql Now to problem is I should add the text ' GO ' after every file's content. I can append Go by doing type *.sql >>...

how to concatenate values to the string ..

i want to cancatenate strings with comma as a separator and result must be stored in string... comma=@","; for(i=0;i<[resources count];i++) { Record *aRecord = [resources objectAtIndex:i]; temp=aRecord.programID; if(i==0) pid=temp; else //i am using this one to cancatenate but is not working why? pi...

Which one is better :pass the whole content as string or string concatination

Hi I have 20 strings each will have same package structure except class name.These string need to be passed to method as and when require. Refer the code below public static final String RECENT_MSG_ = "com.foo.xxs.RecentMessage"; public static final String PROJ_ = "com.foo.xxs.Proj"; public static final String FORECA...

Concatenate integer Values separated by Pipe and ':' using java

Hi, I have array of ValueA and ValueB(int type) . I am reading each value from array using a for loop. I want to concatenate all there values in a single String. these value should be in the form of like these ValueA1":"valueB1"|"ValueA2":"valueB2"|"ValueA3":"valueB3"|"ValueA4":"valueB4"|".... I want this in Java, please can some ...

VB.net Memory efficient function needed

Hi All, I'm getting out of memory exceptions from the following function when RowCollection is 50000+ and thus i need to make it more memory efficient. The function is simply needs to construct a comma separated string of the row indexes stored in RowCollection. Can anyone spot any obvious memory hungry operations in the following? N....

learning about single and double quotes (.),("), and (')

Can you tell me what is the different using (')single quotes inside (")quotes and (")quotes inside (')single quotes? and at concat, what is the meaning of this '".$bla."' I still can not distinguish them. ...

PHP variable concatenation

I'm trying to change a hardcoded variable value to dynamic, but can't seem to get the concatenation correct... The hardcoded value is... $token = "../wp-content/themes/mytheme/styles/test/sidebar"; And I'm trying to replace that with... $token = ".get_bloginfo('template_directory')."styles/test/sidebar"; But its not working the sa...

String concatenation: using += vs. &=

Possible Duplicate: The difference between + and & for joining strings in VB.Net In VB.NET you can use either += or &= to concatenante a string (ignoring using a StringBuilder for this question -- this is directed at a very simple concatenation). I'm curious to know if and what the differences are of using one or the other i...

What is wrong with this boost c++ regex code???

hello #include <iostream> #include <fstream> #include <string> #include<string> #include<boost/algorithm/string.hpp> #include<boost/regex.hpp> #include <boost/algorithm/string/trim.hpp> using namespace std; using namespace boost; int main() { string robotsfile="User-Agent: *" "Disallow: /"; regex exrp( "^Disallow...

How do I concatenate two strings in Java?

I am trying to concatenate strings in Java. Why isn't this working? public class StackOverflowTest { public static void main(String args[]) { int theNumber = 42; System.out.println("Your number is " . theNumber . "!"); } } ...

Join list of string in python with string %s replacement

I have a list of ints that I want to join into a string ids = [1,2,3,4,5] that looks like 'Id = 1 or Id = 2 or Id = 3 or Id = 4 or ID = 5' I have an answer now but I thought it may be good to get the panel's opinion Edit: More information to the nay sayers... This not generating SQL directly, this is dynamic expression that is bein...

What have i done wrong? (python help)

The question i'm working on asks me to "write an expression whose value is the concatenation of the three str values associated with name1 , name2 , and name3" , separated by commas." "So if name1 , name2 , and name3 , were (respectively) "Neville", "Dean", and "Seamus", your expression's value would be "Neville,Dean,Seamus". " T...

Adding text from mySQL table to Middle of URL in PHP page

Hi fellows! I'll try to ask this correctly. This has got me licked. I have a script online that will bring up items according to a search on let's say, page1.php. The results come from a table called items. The results list has links to the items that look like this: a href=\"/" . "boats/$name/" . "$p". $line["PID"]. ".html\" In anothe...

Creating a single file from multiple notes in Outlook VBA

Currently, my VBA code creates a single file for each note. Here's some simplified sample code: Sub saveNotes() Set myNote = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes) For ibi = 1 To myNote.Items.Count fname = myNote.Items(ibi).Subject myNote.Items(ibi).SaveAs "C:\Temp\" & fname & ".txt", 0 Next ...

Is it possible to concatenate heredoc string in PHP..?

With normal PHP string you can do this: $str = "Hello "; $str .= "world"; $str .= "bla bla bla"; $str .= "bla bla bla..."; But can you do the same with heredoc string..? $str = <<<EOD Hello world EOD; $str .= <<<EOD bla bla bla"; bla bla bla..."; EOD; ...

concatenating string

Is there a way in SQL sever that can write the output as follow: select events from mytable original output events -------- 123456 894531 985233 829292 920202 392939 299223 desired output '123456', '894531','985233','829292','920202','392939','299223' select '' + CustomerID + ',' from dbo.Customers customerid ALFKI, ANATR, ANT...

vb.net handling many table name using string

Am storing a table name in a String ugad = "INSERT INTO tb(Ugname,Ugdob,Uggender)" this is the ordinary query which functions well. But i need to store a Tablename in a string called "dept" and this string will have diff table name at diff times. How should i run it, Wat query should I Give. ugad = "INSERT INTO dept(Ugname,Ugdob,Ugg...