Questions tagged [concatenation]

Joining of two or more sequences into a single sequence.

Concatenation refers to the joining of two or more elements into a single element.

In programming, this can refer to

  • concatenation, which joins multiple strings into a single string
  • concatenation, where one or more arrays are combined (mostly appended) to make a new array
  • specific concatenation functions that combine elements along a specified dimension (horizontally, or vertically for example), replicate and tile existing elements, and so forth.
12037 questions
3
votes
1 answer

Concatenate/Merge css files in order

I have a bunch of different css files being generated in css/ folder with help of libsass. Also I do have normalize.css already placed in css/ folder to allow normalization of css in all browsers. I'm using npm as build tool, and my package.json…
Abhinav Gauniyal
  • 7,034
  • 7
  • 50
  • 93
3
votes
3 answers

Read selected files from the directory based on selection criteria in R

I would like to read only selected .txt files in a folder to construct a giant table... I have over 9K files, and would like to import the files with the selected distance and building type, which is indicated in part of the file name. For example,…
Vicki1227
  • 489
  • 4
  • 6
  • 19
3
votes
1 answer

Golang append string in string slice

How to append string in a string sclice? I tried s := make([]string, 1, 4) s[0] = "filename" s[0] := append(s[0], "dd") But it is not correct. Then I tried s[:1] := append(s[:1], "dd") But it is not correct either. How can I append a string to…
Wyatt
  • 1,357
  • 5
  • 17
  • 26
3
votes
3 answers

Concatenate appended strings and remove last character

I have a list that I want to retrieve all items and append them to a paragraph. I am currently successful in doing so but it doesn't append into one string (you need to check the DOM to see it), but several instead. I have tried using .concat() to…
alexmattorr
  • 362
  • 4
  • 15
3
votes
1 answer

Laravel Elixir - Compiling and concatenating bootstrap files with a custom file name

Trying to concatenate the bootstrap folder into a single .scss file but its not working. It either puts them into a file called "all.scss" or if I try to specify the output name: mix.styles([ 'bootstrap/*.scss' ],…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
3
votes
1 answer

MySQL turn a JOIN statement into a Stored Procedure or Function?

So I have a JOIN statement that I will be using in multiple places. It essentially finds an IP address and matches it to said location from the intermediate table. I need to pass in two variables - one being the prefix of my database/schema and the…
3
votes
1 answer

Concatenate/merge columns

File( ~50,000 columns) A1 2 123 f f j j k k A2 10 789 f o p f m n Output A1 2 123 ff jj kk A2 10 789 fo pf mn I basically want to concatenate every two columns into one starting from column4. How can we do it in awk or sed?
akang
  • 566
  • 2
  • 15
3
votes
2 answers

Concatenate two big numpy 2D arrays

I have two big numpy 2D arrays. One shape is X1 (1877055, 1299), another is X2 (1877055, 1445). I then use X = np.hstack((X1, X2)) to concatenate the two arrays into a bigger array. However, the program doesn't run and exit with code -9. It didn't…
Excalibur
  • 431
  • 6
  • 19
3
votes
1 answer

R: Concatenate values of list components by another list defining which ones go together

I have two lists. lst1 contains character vectors which represent variable names: lst1 <- list(c("var1", "var2"), "item1", c("var12", "var15", "var17"), c("item3", "item5", "item7"), "var22", …
panman
  • 1,179
  • 1
  • 13
  • 33
3
votes
2 answers

Concatenate plain char and string?

im getting totally confused by this seemingly simple problem. I have a pain old char, and I want to concatenate it in the middle of a string. Like so. string missingOptionArg(char missingArg) { return "Option -" + missingArg + " requires an…
Tristus
  • 123
  • 1
  • 13
3
votes
4 answers

SQL Server 2005: Update rows in a specified order (like ORDER BY)?

I want to update rows of a table in a specific order, like one would expect if including an ORDER BY clause, but SQL Server does not support the ORDER BY clause in UPDATE queries. I have checked out this question which supplied a nice solution, but…
JMTyler
  • 1,604
  • 2
  • 21
  • 24
3
votes
6 answers

How can I concatenate two C++ maps

How can I concatenate the following two maps? map> map1; map> map2; I just want to add map2 to map1 and keep all elements already in map1, i.e., add map2 at the end of map1. I've tried…
Niklas
  • 149
  • 3
  • 8
3
votes
1 answer

How to create sourcemaps for concatenated files

I want to concatenate a bunch of different files of a single type into one large file. For example, many javascript files into one large file, many css files down to one etc. I want to create a sourcemap of the files pre concatenation, but I do not…
Calebmer
  • 2,972
  • 6
  • 29
  • 36
3
votes
2 answers

Combine 2D matrices to form 3D one in Matlab

I have 3 20x2 double arrays A, B and C. I want to combine them in one 3d array D so that D(:,:,1) will return A, D(:,:,2) will return B and D(:,:,3) will return C.
Tak
  • 3,536
  • 11
  • 51
  • 93
3
votes
1 answer

MYSQL Concat,Left Join,Group Solution

I have two tables 1) cawangan_tbl mysql> select * from cawangan_tbl +------------+---------------------------+------------+-------+ | IdCawangan | NamaCawangan | IdParlimen | IdDun…
1 2 3
99
100