concatenation

Extending/Merging VB Arrays

I have a class with a public array of byte(). Lets say its Public myBuff as byte() Events within the class get chunks of data in byte() array. How do i tell the event code to stick the get chunk on the end. Lets say Private Sub GetChunk Dim chunk as byte ... get stuff in chunk Me.myBuff += chunk (stick chunk on end of public array ...

How to concatenate two arrays in Java?

I need to concatenate two String arrays in Java. void f(String[] first, String[] second) { String[] both = ??? } What is the easiest way to do this? ...

JavaScript string concatenation

Hi, On my team, we usually do string concatentation like this: var url = // some dynamically generated URL var sb = new StringBuffer(); sb.append("<a href='").append(url).append("'>click here</a>"); Obviously the following is much more readable: var url = // some dynamically generated URL var sb = "<a href='" + url + "'>click here</...

php String Concatenation, Performance

In languages like Java and C#, strings are immutable and it can be computationally expensive to build a string one character at a time. In said languages, there are library classes to reduce this cost such as C# System.Text.StringBuilder and Java java.lang.StringBuilder. Does php (4 or 5; I'm interested in both) share this limitation? ...

Is there a buffered version of CComBSTR that makes string concatenation more efficient?

I have several projects where I need to append strings to a BSTR/CComBSTR/_bstr_t object (e.g. building a dynamic SQL statement). Is there an out-of-the-box type in the WinAPI to buffer the concatenation (like StringBuilder in .NET), or do I have to write my own? From what I know about the append methods, they perform re-allocation. ...

How to use GROUP BY to concatenate strings in MySQL?

Basically the question is how to get from this: id string 1 A 1 B 2 C to this: id string 1 A B 2 C ...

Java: StringBuffer & Concatenation

Hi guys, I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str = new StringBuffer(); str.append("string value"); I would like to know if there's a method (although I didn't find anything from a quick glance at the documentation) or some other way to add "padding". Let me explain; every time I append s...

unexpected T_CONCAT_EQUAL

Hi All, I'm getting an unexpected T_CONCAT_EQUAL error on a line of the following form: $arg1 .= "arg2".$arg3."arg4"; I'm using PHP5. I could simply go an do the following: $arg1 = $arg1."arg2".$arg3."arg4"; but I'd like to know whats going wrong in the first place. Any ideas? Thanks, sweeney ...

How do I concatenate two multi-dimensional arrays in VB?

I've got this code: rs1 = getResults(sSQL1) rs2 = getResults(sSQL2) rs1 and rs2 and 2D arrays. The first index represents the number of columns (static) and the second index represents the number of rows (dynamic). I need to join the two arrays and store them in rs3. I don't know what type rs1 and rs2 are though. ...

How can I combine multiple rows into a comma-delimited list in SQL Server 2005?

Right now, I have a SQL Query like this one: SELECT X, Y FROM POINTS It returns results like so: X Y ---------- 12 3 15 2 18 12 20 29 I'd like to return results all in one row, like this (suitable for using in an HTML <AREA> tag): XYLIST ---------- 12,3,15,2,18,12,20,29 Is there a way to do this using just SQL? ...

C++ concatenate string and int

I thought this would be really simple but it's presenting some difficulties. If I have string name = "John"; int age = 21; How do I combine them to get a single string "John21"? ...

how to concat two stl vectors?

how to concat two stl vectors? ...

Concatenating bits in VHDL

Hi, How do you concatenate bits in VHDL? I'm trying to use the following code: Case b0 & b1 & b2 & b3 is ... and it throws an error Thanks ...

How to concatenate web pages in ASP.NET

I have a bunch of ASP.NET web pages (that have a standard layout) that are product documentation. I want to create some sort of combination page that will pull all of the other page content in and concatenate them into one long page. IFrames won't work because I don't know the size of each page. I could have the combination page do a ...

Remapping/Concatenating in SQL

I'm trying to reorder/group a set of results using SQL. I have a few fields (which for the example have been renamed to something a bit less specific), and each logical group of records has a field which remains constant - the address field. There are also fields which are present for each address, these are the same for every address. ...

How can you concatenate two huge files with very little spare disk space?

Suppose that you have two huge files (several GB) that you want to concatenate together, but that you have very little spare disk space (let's say a couple hundred MB). That is, given file1 and file2, you want to end up with a single file which is the result of concatenating file1 and file2 together byte-for-byte, and delete the origina...

Is it better to use ob_get_contents() or $text .= 'test';

I have seen a lot of ob_get_clean() the last while. Typically I have done $test .= 'test' I'm wondering if one is faster and/or better than the other. Here is the code using ob_get_clean(): ob_start(); foreach($items as $item) { echo '<div>' . $item . '</div>'; } $test = ob_get_clean(); Here is the code using $test .= 'test': ...

Creating safe SQL statements as strings

I'm using C# and .NET 3.5. I need to generate and store some T-SQL insert statements which will be executed later on a remote server. For example, I have an array of Employees: new Employee[] { new Employee { ID = 5, Name = "Frank Grimes" }, new Employee { ID = 6, Name = "Tim O'Reilly" } } and I need to end up with an array of ...

C String Concatenation

I'm working in C and I have to concatenate a few things. Right now I have this: message = strcat("TEXT " + var); message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar)); Now if you have experience in C I'm sure you realize that this gives you a Segmentation Fault when you try to run it. So how do i work around that? ...

Oracle DB query formating problem

Hi, I have a problem with formating the data when doing an query to an Oracle database. What I want to do is to export some data into the formatbelow into a textfile; 1IN20071001 40005601054910101200 1 65 First number (1 above) = Company number (position 1-5, blanks infront) IN or UT = IN for clockin and UT f...