concatenation

PHP String concatenation - "$a $b" vs $a . " " . $b - performance

Is there a speed difference between, say: $newstring = "$a and $b went out to see $c"; and $newstring = $a . " and " . $b . " went out to see " . $c; and if so, why ? ...

Concatenating a string in a querrystring of a <a> link in c# created through asp.net

I can already send something in the querrystring: <a href='Exibe.aspx?var='lalala''> but i'd like to send a string instead of lalala, and when i try to concatenate normally in the response.write with "+" signs, it just doesn't. it creates the url only with the part before the "+". facts: the string has a value i can concatenate it wi...

Open Office Spreadsheet (Calc) - Concatenate text cells with delimiters

I am using Open Office's spreadsheet program and am trying to concatenate several text cells together with delimeters. For example, suppose I have the cells below: +--------+ | cell 1 | +--------+ | cell 2 | +--------+ | cell 3 | +--------+ | cell 4 | +--------+ | cell 5 | +--------+ I would like to concatenate them with delimiters s...

How to operate this query by puting mentioned condition?

My table is as follows ID Name 1 Amit 2 Shalu 2 Ram 3 John 3 Kripa 3 Manish 3 Abhi 1 Ayush My requirement is to generate a query that will make the format as ID Name 1 Amit OR Ayush 2 Shalu OR Ram 3 John AND Kripa AND Manish AND Abhi Conditions: when count(Id)=2 concatenate OR with Names when count(Id)>3 con...

c# Optimized Select string creation loop

I'm looking to optimized this piece of code. It will process 15000 - 20000 lines. For now I have 9000 lines and it take 30 sec approx. I know string concatenation is slow but I don't know how to do it another way. // // Check if composite primary keys existe in database // ...

Need a Concatenating VBA code to prevent memory issue workaround

My set up: Have 50,000 rows of data. ( My row count will increase in the future. So might as well say I have a full worksheet of 64000+ rows.) All Data is TEXT, no formulas, etc. Column A is open Columns B thru AC contain the Data that needs to be concatenated The Data in the rows once concatenated to Column A will contain 60,000 di...

Why a full stop, "." and not a plus symbol, "+", for string concatenation in PHP?

Why did the designers of PHP decide to use a full stop / period / "." as the string concatenation operator rather than the more usual plus symbol "+" ? Is there any advantage to it, or any reason at all? Or did they just like to? :o) ...

Concatenate row values T-SQL

I am trying to pull together some data for a report and need to concatenate the row values of one of the tables. Here is the basic table structure: Reviews ReviewID ReviewDate Reviewers ReviewerID ReviewID UserID Users UserID FName LName This is a M:M relationship. Each Review can have many Reviewers; eac...

Changing time mode in a Digital Clock from 12HR to 24HR in VHDL

Greetings everyone. I am designing a digital clock in VHDL which I am supposed to synthesize on a FPGA . I am cascading S1,S2,M1,M2,H1 and H2 where (S1 = second 1, M1 = Minute 1, H1 = hour 1 etc.). One of the requirements is for the clock to switch between 24HR display to a 12HR display format. How do I do it given that H1 and H2 are r...

Query Concatenated Field (using SubSonic)

Is there a way to query against a concatenated field using MS SQL? For instance, what I want to do is something like: Select FirstName+' '+LastName as FullName from Attendees where FullName like '%Joe Schmoe%' The above doesn't work. What I have found works is: Select * from Attendee where FirstName+' '+LastName like '%Joe Schmoe%' ...

How to store Flex 3 ColorPicker Value in a variable and bind the variable to a textInput

Hello Stackoverflowers, Can anybody help me out? I would like to store a hex colorPicker value in a variable and then cast the value of the var backout to a textInput. The textInput is just to see witch hexcolor i have choosen. thus meaning seeing 0x000000 in the textInput. what i've done now is pretty simple i have bound the flex col...

How do I combine data from two DateTime columns (SQL Server)?

Using SQL Server 2005, I am working with a database which has two columns to keep track of what is essentially a single DateTime (and I can't for the life of my figure out why anyone would ever think this is a good idea). Basically, one column, let's call it OrderDate, contains a DateTime like this: 2008-02-29 00:00:00.000, and the oth...

How do I concatenate html as a string in VBA?

I'm a newbie at VBA and html and I'm getting very confused. I'm trying to set a string variable to equal several concatenated html strings and control values. I can't figure out what I'm doing wrong. Here is my code: htmlText = "<HTML><BODY bgcolor=#0b3767> <img height=""71"" width=""500"" alt=""Central Analysis Bureau, Inc. - Kno...

XPath concat multilpe nodes

Hi, I'm not very familiar with xpath. But I was working with xpath expressions and setting them in a database. Actually it's just the BAM tool for biztalk. Anyway, I have an xml which could look like: <File> <Element1>element1<Element1> <Element2>element2<Element2> <Element3> <SubElement>sub1</SubElement> <SubElement>sub2...

What is Causing This Memory Leak in Delphi?

I just can't figure out this memory leak that EurekaLog is reporting for my program. I'm using Delphi 2009. Here it is: Memory Leak: Type=Data; Total size=26; Count=1; The stack is: System.pas _UStrSetLength 17477 System.pas _UStrCat 17572 Process.pas InputGedcomFile 1145 That is all there is in the stack. EurekaLog is ...

Jquery - selector, made of object and string, can it be done?

Hello, Assume that there is an object, passed as an argument to a function. the argument name is "obj". can it be concatenated as followed? $(obj + " .className")...... OR $(obj + "[name='obj_name'])...... Thanks. ...

batch file string concatenation

I have a directory for which I want to list all the .doc files with a ";" I know the following batch command echos all the files for /r %%i In (*.doc) DO echo %%i But know I want to put them all in a variable, add a ';' in between and echo them all at once. How can I do that? set myvar="the list: " for /r %%i In (*.doc) DO <what?> e...

Concatenation Operator + or ,

var1 = 'abc' var2 = 'xyz' print('literal' + var1 + var2) # literalabcxyz print('literal', var1, var2) # literal abc xyz ... except for automatic spaces with ',' whats the difference between the two? Which to use normally, also which is the fastest? Thanks ...

Concatenate JsonRepresentation

Hi, How do I concatenate multiple JsonRepresentation Object into one, without building my own string parser? Say I have 2 JsonRepresentation objs obj1 {"name":"obj1"} obj2 {"name":"obj2"} I'd like to get the concatenation: { {"name":"obj1"}, {"name":"obj2"} } Reading the JsonRepresentation, there is no easy way to do this except ...

Rosetta Stone: Building a string consisting of a character repeated n times

This question has been asked so many times for so many different languages, with some fascinating answers. I propose compiling the answers here so we can compare them side by side. Also, how is it done in the languages not yet "covered" by a question on SO? One programming language or idiom per answer, please. ...