14,257 questions
18
votes
8
answers
46k
views
lisp function to concatenate a list of strings
I need to write a function that will concatenate a list into a string. example:
(concatString (quote ("hello" " world"))) ==> "hello world"
here is what i have so far:
(defun concatString (list)...
2450
votes
51
answers
3.4m
views
Concatenate text from multiple rows into a single text string
Consider a database table holding names, with three rows:
Peter
Paul
Mary
Is there an easy way to turn this into a single string of Peter, Paul, Mary?
3
votes
1
answer
66
views
How can I create a table using ARRAYFORMULA that concatenates all items meeting the same criteria in one cell?
Sample spreadsheet
I've been trying for the life of me to figure out how to do this and cannot.
I have a table: ColA is items, ColB is their category.
Item
Category
Apple
Fruit
Orange
Fruit
...
124
votes
6
answers
222k
views
Concatenation of strings in Lua
In many languages you can concatenate strings on variable assignment. I have a scenario, using the Lua programming language, where I need to append the output of a command to an existing variable. Is ...
-1
votes
2
answers
329
views
TypeError: can only concatenate str (not "float")
I'm trying to make a program that prints the area, perimeter, and diagonal of a rectangle I am analyzing.
This is the part of the code that is returning an error:
number2 = int(input(" Enter ...
3
votes
1
answer
149
views
postgres: parameterized query with pattern matching
in node, i'm creating the following query:
let sql_query = "\
SELECT \
... \
WHERE \
FACILITY_ID = $1 \
AND (EVENT_START_TIME_UNIX_MS < $2) \
AND (...
0
votes
0
answers
514
views
C++20 __FILE__ __LINE replacement when creating a variable in a macro
I am trying to update my code to C++20 and I have realised that my performance logging macros aren't working.
Current code:
#define LN_PROFILE(info) timer::ScopeTimer timer##__FILE__##__LINE__(...
1
vote
2
answers
36
views
Using a column from a JOINed table in a CONCAT() expression with CodeIgniter's query builder [duplicate]
I'm using CodeIgniter and I'm having difficulty trying to figure this out.
So I have this query that includes a joined table, then I need the ua_number column from that joined table for concatenation ...
193
votes
25
answers
533k
views
How do I concatenate multiple C++ strings on one line? [duplicate]
C# has a syntax feature where you can concatenate many data types together on 1 line.
string s = new String();
s += "Hello world, " + myInt + niceToSeeYouString;
s += someChar1 + interestingDecimal + ...
1
vote
1
answer
164
views
SQL Query Resulting in Multiple Rows
The database I'm working in is Snowflake. I also have to work through an interface and can't edit the SQL query directly. I'm trying to add a JOIN to a FROM clause that is connecting two schemas with ...
2
votes
1
answer
121
views
Concatenate Tables Based on Column Information in Python [duplicate]
I have a dataframes pulled from a file. The variable with all these dataframe names is: Data_Tables.
These dataframes all have the same columns, and I want to concatenate the dataframes based on the ...
1
vote
2
answers
627
views
Search row for matching partial strings then concatenate strings in new column
Apologies if this is something really obvious but egads it's driving me crazy and I can't find a non-array/helper box answer.
I want to search cells D2 and E2 for matching numbers, and then ...
0
votes
2
answers
1k
views
How to LEFT JOIN a table by relating a CONCAT() value with a foreign column using CodeIgniter's query builder
I currently have 2 tables in which I need to get data from.
My users table looks like:
ID | first_name | last_name | username
My data table looks like:
ID | filename | doctorname | viewed
...
0
votes
1
answer
45
views
Power Query Concatenate and If statement
I want to add a custom column to concatenate several columns with some if statements. I am getting a "Token 'else' expected error message. Can you please tell me what I forgot or did wrong? Power ...
138
votes
8
answers
161k
views
Concatenate two string literals
I am reading Accelerated C++ by Koenig. He writes that "the new idea is that we can use + to concatenate a string and a string literal - or, for that matter, two strings (but not two string literals).
...
3
votes
4
answers
8k
views
Using CodeIgniter's query builder to make a WHERE clause with CONCAT() and LIKE [duplicate]
The raw query I'm trying to get plugged in here is:
SELECT * FROM x WHERE CONCAT(y, ' ', x) LIKE '%value%';
I've checked through the query builder documentation and can't find anything that would ...
1
vote
1
answer
980
views
CONCAT() 2 columns in a select() call with CodeIgniter's query builder [duplicate]
I want to concatenate the first and the last name as full name in my query.
$query = $this->db->select('CONCAT(w.firstName," ",w.lastName) as fullName,w.ID,w.firstName,w.lastName, w....
0
votes
2
answers
11k
views
How to SELECT the MONTH() and YEAR() from a date column using CodeIgniter's querty builder [duplicate]
I am working in CodeIgniter; my problem is that I want to select month & year in below query. It returns the month, but I need the month & year as a single value.
public function get_content()
...
3
votes
2
answers
15k
views
Using CONCAT() in the SELECT clause of a CodeIgniter active record script creates an invalid query
Please help me to fix my SELECT clause.
I have table named inventory which has:
trans_id
trans_items items -> item_id
trans_user employees -> person_id
trans_date ...
65
votes
16
answers
123k
views
Concatenation of tables in Lua
ORIGINAL POST
Given that there is no built in function in Lua, I am in search of a function that allows me to append tables together. I have googled quite a bit and have tried every solutions I ...
1033
votes
30
answers
752k
views
Concatenating two std::vectors
How do I concatenate two std::vectors?
0
votes
2
answers
10k
views
concatenation of decimal and varchar in SQL
I have 2 columns in my table :
PER_DAY (DECIMAL(10,2))
DESCP (VARCHAR)
I want to concat the two columns in my query...
For Ex:
PER_DAY=0.5 DESCP='ABCDEFGHIJ'
I want them to be displayed as
0....
3611
votes
31
answers
5.3m
views
How to concatenate string variables in Bash
In PHP, strings are concatenated together as follows:
$foo = "Hello";
$foo .= " World";
Here, $foo becomes "Hello World".
How is this accomplished in Bash?
83
votes
4
answers
177k
views
MS Excel - Concat with a delimiter
I've got a long spreadsheet with numbers.
I need to get them in one string delimited by ;
e.g. 4364453;24332432;2342432
I know I can do:
=concat(A1:A2000)
but that will merge it in one string without ...
5
votes
1
answer
10k
views
How can I concatenate values in an Excel pivot, as opposed to summing or counting
Say I have the following data:
Col1 Col2
------------
Bob Green
Bob Green
Bob Green
Chris Blue
Chris Blue
Chris Red
Dave Blue
Dave Green
Dave Red
A default Pivot Table in Excel ...
1
vote
1
answer
1k
views
BigQuery concat returns null concatenating empty strings
I have a simple table (loaded from a view on top of files) with Countries and Zip codes in BigQuery.
For some strange reason when both Country and Zip code are empty ... concat returns null instead of ...
102
votes
4
answers
117k
views
Python: Concatenate (or clone) a numpy array N times
I want to create an MxN numpy array by cloning a Mx1 ndarray N times. Is there an efficient pythonic way to do that instead of looping?
Btw the following way doesn't work for me (X is my Mx1 array) :
...
1
vote
3
answers
11k
views
Excel: Concatenate Cells and Remove Duplicates
how can I concatenate the Values in Cells B1:K1 to receive the string in A1. Empty cells should be omitted. Is this possible using Excel commands or only with vba?
129
votes
11
answers
108k
views
Why is string concatenation faster than array join?
Today, I read this thread about the speed of string concatenation.
Surprisingly, string concatenation was the winner:
http://jsben.ch/#/OJ3vo
The result was opposite of what I thought. Besides, ...
454
votes
6
answers
1.0m
views
How to append multiple values to a list in Python
I figured out how to append multiple values to a list in Python; I can manually input the values, or put the append operation in a for loop, or the append and extend functions.
Any neater ways? Maybe ...
38
votes
4
answers
65k
views
What is the difference between VBScript's + and & operator?
On every site that talks about VBScript, the '&' operator is listed as the string concatenation operator. However, in some code that I have recently inherited, I see the '+' operator being used ...
207
votes
9
answers
468k
views
SQL UPDATE all values in a field with appended string CONCAT not working
Here is what I want to do:
current table:
+----+-------------+
| id | data |
+----+-------------+
| 1 | max |
| 2 | linda |
| 3 | sam |
| 4 | henry ...
3
votes
3
answers
13k
views
How can I concatenate two file paths in batch script without the trailing '\' ambiguity?
For the below code I get LIBDIR from a props file.
set strDestPath=%LIBDIR%"\Libraries\python\win\"
set strPythonZipSourcePath=%CTEDIR%"\Libraries\python\win\Python27.zip"
Call :UnZipFile %...
-1
votes
2
answers
82
views
Add variable inside a variable? [duplicate]
Possible Duplicate:
Which is the best method to perform string concatination in PHP?
I tried to add a variable and string to another variable like this:
finalData += $ajaxData + 'some text';
To no ...
-1
votes
1
answer
239
views
Excel VBA function for concatenation
I created the following VBA code.
In the debug window, I see the result (multi-line string) I expect.
When I type the formula in a worksheet cell, I get a #Value error.
The function is spelled ...
0
votes
2
answers
122
views
Write data to Excel cells, update formulas, and then continue with updated values
I am working on an interactive Excel project.
I have a series of UserForms that take user-entered data and writes them to cells.
In the final UserForm in the sequence, data is written to a final cell.
...
1
vote
1
answer
74
views
Find biggest concatenation word in array
I'm new to C#, can someone help me understand why my code doesnt work?
Seems like there something wrong with variable word which needs to be returned, but I don't understand what.
public virtual bool ...
3
votes
1
answer
9k
views
How to concatenate string and integer in if condition in tableau
I am trying to concatenate country with its rank based on sales in if condition like
IF [TOP 20 COUNTRIES] THEN [COUNTRY]+[RANK] ELSE "OTHERS"
here I am getting error saying can not mix aggregate ...
1
vote
0
answers
51
views
Bundle selected CSS files to a single output file
How to combine multiple CSS files into a single output file?
In SASS, this was done in a SCSS file by adding in other SCSS files via the @use method.
I have found that this can be done by adding in ...
0
votes
1
answer
889
views
I can't seem to concatenate an API URL with a variable
I am fetching an exchange rates API. The API looks like this: https://v6.exchangerate-api.com/v6/Your-Api-Key/latest/AMD, where "Your-API-Key" is my personal key. If the API URL ends with ...
0
votes
0
answers
28
views
How to concatenate multiple short parameters to a single string using bash? [duplicate]
I would like to concatenate multiple parameters to a single string in bash like this:
$ ls -latr
$ cp -Rv directory1 directory2
The best I can do is something like this:
while (( ${#} ))
do
case &...
0
votes
4
answers
5k
views
UPDATE concat and variables [duplicate]
I might just be sleepy, but i've tried to concat this in various ways and it just isn't working. the $friend_id is simply a string, and shouldn't be causing a problem as far as I know.
mysql_query("...
0
votes
7
answers
13k
views
How can I get the correct output in this program?
(1)Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a single line separated by a space. (2) Output two passwords using a ...
28
votes
1
answer
4k
views
Why is a level of indirection needed for this concatenation macro?
I found an interesting little blog post that explains how to generate (semi) unique names in a macro by using the line number:
// Do magic! Creates a unique name using the line number
#define ...
18
votes
1
answer
21k
views
How to concatenate videos in moviepy?
I am trying to use moviepy to generate video with texts. First, I want to show one messages and then another one. In my case I want to show "Dog" for one second and than "Cat Cat". For that I use the ...
17
votes
6
answers
30k
views
Concatenating string_view objects
I've been adding std::string_views to some old code for representing string like config params, as it provides a read only view, which is faster due to no need for copying.
However, one cannot ...
10
votes
1
answer
21k
views
how do I concatenate and join an array of strings with a delimiter in powershell?
Why is the array treated differently when it comes from a function return vs when it's literally declared?
PS C:\Users\User\ps-modules> more .\MyStrings.Tests.ps1
function slist { "1", &...
7
votes
3
answers
35k
views
Lua: Is there a way to concatenate "nil" values?
I have the following function in Lua:
function iffunc(k,str,str1)
if k ~= 0 then
return str .. k .. (str1 or "")
end
end
This function allows me to check if value k is populated or not. I'm ...
0
votes
1
answer
25
views
In C, how do I use a single hex value in both an enum and a const char *
I have a function that allows access to system variables based on a lookup code. The lookup code has an enum type.
typedef enum SystemVariable_e {
INT_SYSTEM_VAR_1 = 0x10,
INT_SYSTEM_VAR_2 = 0x20
...