concatenation

Flash Of Unstyled Content (FOUC) in Firefox 3.5+

We've reached the end of our tether here trying to overcome a nasty and intermittent FOUC in Firefox 3.5.x+ for a new release we're working on. We've tried: Disabling Javascript in FF Using Quirks mode rendering by removing the DOCTYPE Moving from @import for additional CSS to <link> Switching concatenation on and off Removing CSS fil...

Removing extra "empty" characters from byte array and converting to a string

I was working on this for a while and did not find anything about this on here, so I thought I would post my solution for criticism/usefulness. import java.lang.*; public class Concat { public static void main(String[] args) { byte[] buf = new byte[256]; int lastGoodChar=0; //fill it up for example o...

Mysql/php - Query Question

I have been trying to figure out a different way to complete this task on another question on this website, but think maybe I am making it too difficult. Here is what I have: Table with, and ImageID, ImageName, GalleryID Another Table with Comments, Author, Date, ImageID What I want to do is do a query where I find all of the Images th...

Proper way to build up a path using cstrings in C++

I need to build up a path to a file. I have the following class method: void Directory::scanDirectory(char *directory) { DIR *dirp; struct dirent *entry; char path[1]; if(dirp = opendir(directory)) { while(entry = readdir(dirp)) { if (entry->d_name[0] != '.') { strcpy(path, directory)...

Performance comparison of immutable string concatenation between Java and Python

UPDATES: thanks a lot to Gabe and Glenn for the detailed explanation. The test is wrote not for language comparison benchmark, just for my studying on VM optimization technologies. I did a simple test to understand the performance of string concatenation between Java and Python. The test is target for the default immutable String obj...

How to concat_ws multiple fields and remove duplicate separators for empty slots

When you CONCAT_WS(' ',field1,field2,field3) in MySQL and if one of the fields is empty, not null, you get multiple separators. An example can be: John[space][space][space]Doe[space]III. How can I make sure there is only one separator. ...

C strings concatenation - strange characters

Hi there. I'm writing a C program which takes n strings and concatenates them using strcat. First I alloc'd the target string at sizeof(char)* the strlen of every string + 1 (for the null character). Then with a for I use strncat to create the final string. At the and, I am appending the null character. Everything goes fine, but somet...

SQL - field concatenation, based on variable

Hi, I have a need to build a string from Last Name, First Name, Middle Initial according to the following rules: If the Last Name is unique, just return the Last Name If the Last Name isn't unique, but the first letter of the First Name is unique, return Last Name + first letter of First Name If the Last Name and first letter of the F...

php array combine

I have the next array: Array ( [0] => Array ( [id] => 160 [payment_period] => Monthly [plan_payment_type_id] => 171 [payment_type_id] => 4 ) [1] => Array ( [id] => 160 [payment_period] => Monthly [plan_payment_type_id] => ...

Casting an int to a string in Python

I want to be able to generate a number of text files with the names fileX.txt where X is some integer: for i in range(key): filename = "ME" + i + ".txt" //Error here! Can't concat a string and int filenum = filename filenum = open(filename , 'w') Does anyone else know how to do the filename = "ME" + i part so I get a li...

Excel Concatenate Rows

Hi, I have this excel worksheet A B c foo1 joo1 loo1 foo1 joo2 loo2 foo2 joo3 loo3 foo2 joo4 loo4 foo2 joo5 loo5 Now I want this A B c foo1 joo1, joo2 loo1, loo2 foo2 joo3, joo4, joo5 loo3, loo4, loo5 ...

MYSQL - Concatenate two tables

I have two tables as follows: TABLE A TABLE B StuID | actid FacID | actid 3 12 98 17 5 17 54 21 I want to list the name of everyone, both students and faculty, who participate in activity 17. Is there anyway I can get a result as below: ...

How to perform string concatenation in PL/SQL?

I have a variable defined as define dbs '&1' Suppose I pass database1 as an argument. Then the statement is interpreted as define dbs database1 I want to append single quotes around the string, ie I want it to be interpreted as define dbs 'database1' How should I do this? ...

C string concatenation

I am trying to input 2 strings in C, and output a 3rd string which the concatenation of string 1 and 2. #include <stdio.h> #include <stdlib.h> #include <string.h> /* * */ int main(int argc, char** argv) { char stringarray1 [30]; char stringarray2 [30]; char stringarray3 [30]; int length; printf("Please enter s...

Why is this batch file producing extra, unexpected, unwanted characters?

I'm trying to use the following batch script to concatenate some files together: copy NUL bin\translate.js for %%f in (source\Libraries\sprintf.js, source\translate-namespace.js, source\util.js, source\translator.js, source\translate.js) do ( type %%f >> bin\translate.js echo. >> bin\translate.js ) However, when I do this, an ...

Concatenate video clips with HTML <video> tag?

I am working on a web-based video editor. I wanted to be able to take clips from multiple video sources and create a single video from them (probably using handbrake of ffmpeg). Here's an example of what I'm looking to do: http://www.kaltura.org/apis/html5lib/mwEmbed/modules/Sequencer/tests/Sequence_Editor.html It reads from a SMIL...

xslt concatenate text from nodes

I have an xml file that looks like this: <args> <sometag value="abc"> <anothertag value="def"> <atag value="blah"> </args> keep in mind that tag names within args could be named anything (I don't know ahead of time) Now i have this xml file stored in a variable called $data which I loaded using a document() call in the xslt styl...

in R, can I stop print(cat("")) from returning NULL? and why does cat("foo") return foo>

if I enter print(cat("")) i get NULL I want to use cat() to print out the progress of an R script, but I don't understand why it is returning "NULL" at the end of all of my concatenated strings, and more importantly, how to get ti to stop? Thanks in advance. ...