Questions tagged [concatenation]

1

votes
1

answer
17

Views

Fast way of concatenating complex data using vertcat with custom rows

I need to concatenate few bigger matrices, but in specific manner - for example to concatenate only 1 row from X matrices. There is a good solution of storing the data in a structure, so then there is no need of preparing long list of things that needs to be concatenated. For example, we will have a...
BloodyMary
1

votes
2

answer
45

Views

Is there a function to combine multiple primary keys info into table?

I have two separate tables that have different primary keys and I need to join them together. One table provides the outcome and another table provides the ID of the people involved. Because there are multiple outcomes, and there are multiple people who could have similar outcomes, my table joins ar...
Mai
1

votes
1

answer
862

Views

Ternary concatenation in Twig

Is it possible to use ternary operator in Twig when concatenating one string to another if some condition is true? This works for me: {% set a = 'initial' %} {% if foo == bar %} {% set a = a ~ ' concatenate' %} {% endif %} {{ a }} But when I try to simplify it like this, it throws an error: {% set a...
cincplug
1

votes
2

answer
70

Views

Concatenating Pandas DataFrames with overlapping indexes but never overlapping values

I have two DataFrames of arbitrary shape of the type: A B C 0 A0 B0 C0 1 A1 B1 C1 2 A2 B2 NaN 3 A3 NaN NaN 4 A4 NaN NaN and A B C 2 NaN NaN C2 3 NaN B3 C3 4 NaN B4 C4 5 A5 B5 C5 6 A6 B6 C6 The two DataFrames have overlapping indexes. Where there i...
LevDavidovich
1

votes
4

answer
44

Views

How to fix " Python Return Method not returning the integer in a concatenated string

When the code is run it outputs, but not as required, it returns blank on all the percentages def income(): num= raw_input('Enter your Income: ') print 'Your income is: %d ' % int(num) return num income= income() def bills_expenses(): bills_kitty=0 bills_kitty=(income*(55/100)) return ('Your bills...
Wanjila Abraham
1

votes
2

answer
56

Views

concatenate data based on a certain sequence

my data look like this way, and variable day ranges from 1 to 232. This is just a shorter version of the data, the real data have over 20000000 rows with variable 'day' ranging from 1 to 232 day time 1 2 1 2 2 2 2 3 3 4 3 5 4 4 4 2 and I have a vector that contains 1000 of randomly s...
vera_kkk
1

votes
1

answer
41

Views

How to remove leading space using FOR XML PATH in SQL Server

I am trying to string aggregate some data and am having an issue. This data will be used for a mail merge. After I aggregate my data into a single column and then go to copy it into an email via mail merge the result looks like Owner: Me, Pet: Dog, Other Pet: Cat, Pet2: Dog2, OtherPet2: Cat2 Owner:...
Coldchain9
1

votes
3

answer
55

Views

go one step back and one step forward in a loop with python

I need to loop in a list containing french words and find an asterisk because I want to concatenate the word before the asterisk and the word after the asterisk each time an asterisk appear and continue to the next. For example, in the sequence: ['les','engage', '*', 'ment', 'de','la'] I want to c...
Natália Resende
1

votes
2

answer
288

Views

ConcatRelated() - query or tables

I have similar issue to this question Combine values from related rows into a single concatenated string value. I've got two queries: This is what it looks like now without ConcatRelated(): I need to get return: I tried to use this SQL: SELECT DISTINCT Q_Fakt1.FakturaID, Q_Fakt1.DatumVystavenia, Q_F...
Miroslav Daniš
1

votes
1

answer
23

Views

In excel can anyone show me how to concatenate strings and variables to make a cell reference?

If I manually reference a cell in another spreadsheet (by typing = in the destination cell and then clicking in the source spreadsheet), excel creates a formula like this: ='H:\excel\data\[source_file.xls]Sheet1'!$C$5 I am wanting to create that formula from the cell and path which are stored in cel...
Mike Avison
1

votes
0

answer
111

Views

PasswordDeriveBytes.GetBytes(), Algorithm for Multiple Calls

I am interested in the algorithm of the PasswordDeriveBytes class for educational purposes which, as far as I'm concerned, uses the old PKBKDF1 function. I have read the algorithm in the following answer-post: What is the algorithm behind PasswordDeriveBytes? Since it uses the SHA-1 hash algorithm,...
Hello World
1

votes
0

answer
136

Views

Retrieving labels when concatenating in a Wikidata SPARQL query

I am having an issue when concatenating in SPARQL using the Wikidata Query Service. https://query.wikidata.org/ What I want to do is retrieve all persons with a GTAA ID (?q wdt:P1741 ?GTAA_ID.) and specifically persons who have an occupation listed in Wikidata. (?q wdt:P106 ?occupation.) Furthermor...
John
1

votes
1

answer
25

Views

Excel Dynamic Hyperkink using Cell Value as part of Address

I have a column of part numbers which I would like to associate with a column of links to their corresponding autocad drawings. The drawings are on a server, I would like to be able to insert the part number into the file path. My attempt: =HYPERLINK(\\servername\folderofparts\partprefix\['Lists fo...
JTaylor
1

votes
0

answer
278

Views

In C# How to concatenate values with strings in RDLC IIf expression?

I have an RDLC Report file in which I want to make an expression. I want to use IIf function here... =IIf(First(Fields!due.Value, 'DataSet1') = 0 ,'FULL PAID','DUE TK ='+First(Fields!due.Value, 'DataSet1')+'.00') When the condition is true it shows FULL PAID but when False it Shows #Error It seems...
Shovon Das
1

votes
1

answer
33

Views

Concatenate different dataframes into one with for loop

I want to concatenate different financial dataframes into one. So when doing this for 2-3 stocks manually I do: #getting dataframe from .csv file df1 = pd.read_csv('C:\\Users\\Enric\\Desktop\\python\\tickers\\MSFT.csv',index_col=None, header=0) df2 = pd.read_csv('C:\\Users\\Enric\\Desktop\\python\\t...
Run The Jewels
1

votes
1

answer
40

Views

Concatenating 2 columns

Good day, Looking for help if my concatenating code. I am trying to concatenate Column E & G in sheet1, into column B in sheet2. There is already data on sheet2, so I am trying to get it to copy the data onto the last row of sheet 2. It is only concatenating the last Row in sheet 1, and not being...
Chris
1

votes
1

answer
31

Views

Diagonalise and concatenate every row of a matrix [duplicate]

This question already has an answer here: How to convert matrix to a stack of diagonal matrices based on every row? 5 answers Given a matrix: A = [1 2 3 4 5 6 7 8 9] How to diagonalize each row of A and concatenate them simultaneously, so it yields the following? 1 0 0 4 0 0 7 0 0 0 2 0 0 5 0 0 8...
vaitas
1

votes
1

answer
41

Views

Store Procedure hit SQL Statement Ignored

create or replace PROCEDURE GEN_STATEMENT_SP(indexNM IN VARCHAR2, tableNM IN VARCHAR2) AS BEGIN DECLARE uniqueSTMT VARCHAR2(30); nonUniqueSTMT VARCHAR2(30); charOn VARCHAR2(5); tempfld VARCHAR2(500) ; CURSOR chkTyp IS(SELECT ES_UNIQUENESS from sys.dba_ind_columns where INDEX_NAME = indexNM and TAB...
GTeckHan Goh
1

votes
3

answer
46

Views

Moving Multiple Rows to Columns with a Concate Situation

I have probably what would be considered a simple question - I need to move multiple rows into a single row, based on concate of member IDs and date. What I have is a table that may look like this: Row Member ID Create Date Answer 1 1234 20170101 20170101 2 1234...
user9539580
1

votes
0

answer
52

Views

concatenate a list of form fields and mixed text content inside another form field

I am using the following web app, ESRI GeoForm, and attempting to customize it for concatenation purposes. It is a private, internal to our organization only, form. So I can't share the form I am using other than through video or images. So basically, when the users enter 'Address Number' and 'Addre...
randomblink
1

votes
1

answer
89

Views

String concatenation in Excel VBA failing with run-time error

Why does: sDesktopPath = Environ('USERPROFILE') & '\Desktop\' sTimeStamp = Format(Now(), 'yyyymmdd-hh:nn') sSuffix = '_1Sheet_' & sDateTimeNow ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ sDesktopPath & ActiveSheet.Range('E3').Value & '_1Sheet_' & '.pdf' _ , Quality:=xlQualityStanda...
Fat Monk
1

votes
1

answer
34

Views

Paste columns in separate file with save() in R

I am using a for loop to impute values per column, and want to save these columns with the predictions to another file. So, that the columns are pasted in there one by one. However, my code throws an error and it is not working. This is the part of the code: for (column in 1:ncol(NB_mcar)) { # Impu...
MLnewby
1

votes
1

answer
105

Views

Cell with text, formula and conditional formatting.

I'm looking to see if you can add data to a cell, with a sum, and conditional formatting. An example. A1 A2   100 120 (+20)     I want cell A2 to show a new value (120) with the difference (+20) but also to have conditional formatting as in if the 120 in A2 is greater than the 100 in A1 th...
AJames
1

votes
1

answer
20

Views

Concatenate multiple directories name adding a counter in bash

I have to store the last 5 test results folders. Every time the tests are executed, a folder called 'target' is created with all the results. The idea is to move that folder and add a counter (Ex.: target1, target2, ...). And store the last 5 executions. It is important that when 5 folders exists an...
Diego S. Delgado
1

votes
6

answer
150

Views

Concatenate a two dimensional array

I'm new and I need help to find the right solution for my function in java function concatenateMatrix(matrix) {} var stringMatrix = [ ['H', 'e', 'l', 'l', 'o'], [' ', 'J', 'a', 'v', 'a'], ['W', 'o', 'r', 'l', 'd', '!'] ]; var matrix = ''; newArray = []; for (var i = 0; i < stringMatrix.length; i++)...
TR54296
1

votes
0

answer
52

Views

Python: concatenate string from file with string literal

I'm trying to concatenate a string pulled from a file with a string literal and getting an error. Example: file.txt: string1 string2 string3 program.py: import random f = open('file.txt', 'r') alist = f.readlines() f.close() anotherlist = ['word1', 'word2'] astring = random.choice(alist) + ' ' + ran...
BabaSvoloch
1

votes
0

answer
26

Views

Should I split long string for coding style vs lower performance of concatenating strings Java

Based on the google style doc (https://google.github.io/styleguide/javaguide.html), it is recommended to limit a line to at most 100 column long. However, I have to declare some strings as description which can be 300 characters long. In order to fit in 100 characters each line, The string needs to...
Lazyworm
1

votes
2

answer
110

Views

Concatenate multiple tags from a .xml file using JAVA

I want to concatenate multiple tag values from a xml file using JAVA. The .xml looks like this: row 1 row 2 row 3 Frist Test row 20 row 10 row 30 Second Test And the result should be like this: row 1 row 2 row 3 row 10 row 20 row 30 There should be 2 variables. I've tried: NodeList nodeList...
Adelina Plesa
1

votes
0

answer
42

Views

How do you use table data in an alias for a select statement?

I'd like to reference data from a record in the name that I give the column that a SELECT query returns. I've tried this, but it's not liking the extra SELECT that I'm trying to concatenate into the alias: SELECT Table1.Field1 AS 'Pick any ' & CAST((SELECT Table2.Field1 FROM Table2 WHERE Table2.ID...
Isaac Reefman
1

votes
1

answer
134

Views

In Python Pandas Can't add new column after datetime column

I cannot concatenate new columns to existing Pandas DataFrame if the last column of the existing DataFrame is in the type of datetime. Here is a minimal example: import pandas as pd import numpy as np dates = [pd.Timestamp('2012-05-01'), pd.Timestamp('2012-05-02'), pd.Timestamp('2012-05-03')]...
Lin Sen
-5

votes
3

answer
88

Views

What is reason for syntax error of print statement of given python code [closed]

xString = input('Enter a number: ') x = int(xString) yString = input('Enter a second number: ') y = int(yString) print('The sum of ', x, ' and ', y, ' is ', x+y, '.', sep='') on executing above code, interpretor throwing syntax error saying syntax error as below. print(?The sum of ?, x, ? and ?, y,...
Srikanth P S
1

votes
2

answer
88

Views

How to concatenate a column value based on another column value in excel?

I have sheet like this : How can I concatenate values in column B based on value in column A. Values corresponding to ID 1.1.1 are of B2:B5 Similarly, values for ID 1.1.2 are of B6:B8 and so on.. Its like it start from first id, lookup until next id, all values in column B until next Id in column A...
qwww
1

votes
0

answer
23

Views

Exclude hidden input value from displaying after search performed

I am using javascript to concatenate strings to omit products from search results in shopify. I'm wondering if there is a way to prevent my hidden input value from displaying in the input after the search is performed? Something like value='{{ search.terms | escape }} -= q'? Thanks in advance for yo...
mwalker
1

votes
1

answer
38

Views

XSLT: Concatenation of looping list items separated by pipe symbol

I am trying to build an XML output using XSLT templating The XML has multiple Group GroupName='PersonalSocialMedia' items in which each item do have multiple group items. My input XML looks like this : 2 2 Instagram Iuname 1 1 Facebook fname 3 3 LinkedIn testname1 2 4 Twitter testname2 1 1 Fa...
Shanker
1

votes
2

answer
121

Views

How to write a prolog predicate to trim first N elements from a List using conc (concatenation) operation

trim(L1,N,L2) which is true if L2 contains the first N elements of L1 I'm required to write the prolog code using the relation conc. Im new to prolog, so i have issue with my code. Can somebody correct me? trim(L1, N, L2):- conc(L2,T,L1), length(L2,N),length(L1,N2), N2>= N Most people have written...
1

votes
1

answer
60

Views

How to Concatenate two dataframes in impala

I'm looking for the synthax to concatenate two dataframes in IMPALA. I want to avoid that operation in R because i have to import the dataframes in R. Thank you for your help !
Antoine F
0

votes
0

answer
8

Views

Want to concatenate elements of array into single element

I have an array of arrays that looks like time array([array([ 0, 1, 0, 10, 12, 2011], dtype=int16), array([ 0, 1, 0, 10, 12, 2011], dtype=int16), array([ 0, 1, 0, 10, 12, 2011], dtype=int16), ..., array([ 0, 59, 23, 10, 12, 2011], dtype=int16), array([...
Jack
1

votes
1

answer
57

Views

Use array formulas to concatenate two independent sheets

I have two Google Sheets with identical layouts that are filled in by independent teams: Sheet 1: team1_entry1 243 team1_entry2 546 etc ... XXX Sheet 2: team2_entry1 166 team2_entry2 888 ... XXX I need to see the data from both sheets in one table, which I can then filter and sort using Filter View...
a1s2d3f4
1

votes
1

answer
51

Views

C Programming: ls function sort by file, executable and directory

I have been able to sort it by 'File' and 'Directory' so far, but I don't know how to check whether it is 'Executable.' I was thinking of concatenating my CWD with '/' and d_name and store it into a variable, and check it with access().But I have no idea how. #include #include #include #include #inc...
Jerome Jaghoy
1

votes
2

answer
173

Views

Sqlite3 conversion MM/DD/YY string to YYYY-MM-DD

I am trying to convert a string column of existing values from 'MM/DD/YY' to 'YYYY/MM/DD'. Example Data: Table: backlog_backlogData [LoadDate] 06/29/18 06/29/18 06/28/18 07/24/18 07/24/18 I have tried this (in SQLite Manager FireFox extention): UPDATE backlog_backlogData SET LoadDate = substr(Loa...
Prouderthings

View additional questions