concatenation

SQL Server 2008 concatenate rows to column

社会主义新天地 提交于 2019-12-11 16:19:49
问题 I am using SQL Server 2008, I have a dataset that look like: FormKey Value Category ------- ----- ------ 123456 Gloves PPE 123456 Hat PPE 123456 Scalf PPE 123456 Boots PPE 987654 Glasses PPE 987654 Harness PPE 987654 Overalls PPE I am trying to concatenate the Values and group by FormKey, so that I would end up with: Formkey Value Category ------- ----- ------- 123456 Gloves, Hat, Scalf, Boots PPE 987654 Glasses, Harness, Overalls PPE However, I am getting a concat of ALL of the Values for

ffmpy concatenate multiple files with a file list

时间秒杀一切 提交于 2019-12-11 15:49:21
问题 I'm currently trying to merge multiple video files with a python script using ffmpeg and ffmpy. The names of the files are being written into a file list, as suggested by the ffmpeg concatenate wiki. In my example I'm only using two files, but in practice, there will be several hundert files, that's why I'm choosing the file list approach. My current code looks like this: import os import ffmpy base_dir = "/path/to/the/files" # where to seek the files file_list = open("video_list.txt", "x") #

c# Concatenate static arrays inside static class

笑着哭i 提交于 2019-12-11 15:10:51
问题 I am not even sure how to call what I want to achieve but... probably the code will explain it. Basically, I would like to create the frames commands as combinations of some statically defined arrays. I would like to do something like this: Command = ConcatArrays(commandPart1, commandPart2, commandPart2) But it fails inside ConcatArrays as the list elements seem to be null. And to use externally like this: Frame.Frame1.Command The ConcatArrays I took it from here: https://stackoverflow.com/a

Character Limit On ConcatRelated() Function

限于喜欢 提交于 2019-12-11 15:04:44
问题 I have been using Allen Browne's ConcatRelated() function but am realizing with larger data sets the data is incomplete. Does this function have a character limit, and if it does - is there a different function /UDF that can achieve the same result? This is the function: - and link back to original thread http://allenbrowne.com/func-concat.html Public Function ConcatRelated(strField As String, _ strTable As String, _ Optional strWhere As String, _ Optional strOrderBy As String, _ Optional

Invalid Length: field position must be greater than zero

不羁岁月 提交于 2019-12-11 14:49:35
问题 I am trying to transform a column in PostgresSQL: Here are some values in col_A: col_A --------- John_arrived Mary_Brown_arrived J_C_Jr_arrived Q_arrived The aim is to get the first part and last part of col_A only: d_col_A ------- John_arrived Mary_arrived J_arrived Q_arrived Here is my query: with t1 as ( select split_part(col_A, '_'::text, 1) || '_' || COALESCE (split_part(col_A, '_'::text, -1), '' ) as d_col_A from my_table ) select distinct d_col_A from t1 Then I got the following errors

NumPy hstack's weird behavior

二次信任 提交于 2019-12-11 14:22:01
问题 Given a little background here. Numpy v1.16, Python 3.6.8. And then I run the following code: import numpy as np arr1 = np.repeat(True,20) arr2 = np.repeat(np.arange(5),4) X = np.vstack((arr1, arr2 )).T arr3 = np.repeat(True,20).T arr4 = np.repeat(np.arange(5),4).T Y = np.hstack((arr3, arr4 )) The result is that X.shape is (20,2)(which is normal), but Y.shape is (40,) which is abnormal. Mathematically X and Y are supposed to be the exact same matrix, but in my machine they aren't. So what am

Unable to pass the generated values from a for loop to a structure

倾然丶 夕夏残阳落幕 提交于 2019-12-11 13:44:22
问题 As per my earlier asked question , i am trying to pass values generated from the code i.e. hashname(variables which are generated in the forth loop, combination of a-z, a four character string) to a structure member, using this code. vcd_xyz[4]='\0'; count = 0; for(int i=0;i<26;i++) { vcd_xyz[0] = 'a'+i; // printf("%d generated variable is initial is = %c \n",i,vcd_xyz[0]); for(int j=0;j<26;j++) { vcd_xyz[1] = 'a'+j; // printf("%d generated variable is = %c \n",j,vcd_xyz[1]); // puts(vcd_xyz)

Concatenate string literals with DirectoryInfo enumeration and adding quotation marks.

风流意气都作罢 提交于 2019-12-11 13:35:52
问题 This seems like such an obscure question, but here it goes: Is there a way to concatenate String Literals with a DirectoryInfo enumeration (which contains a file path) while adding quotations around the file path? Further, how can I prevent backslashes from being doubled when converting a DirectoryInfo enumeration to a string? My situation is as follows: DirectoryInfo filePathDirectory = new DirectoryInfo(filePath); Process a = new Process(); a.StartInfo.FileName = "C:\\Windows\\system32\\lpr

MATLAB Create table with NaN's inserted based on Date column

為{幸葍}努か 提交于 2019-12-11 12:42:57
问题 My data is every three days, but in my cell array, there are sometimes missing days. How can I make the matrix add dates when it skips a day and put a NaN into the Sample Measurement cell? Here's an example. I put 2 lines from each of the 4 sites. There aren't any empty rows between the different sites - they are just there for clarity. Latitude Longitude SiteID Date Local Sample Measurement 43.435 -88.527778 027-0007 4/12/2007 4.3 43.435 -88.527778 027-0007 4/15/2007 9.3 43.060975 -87.913504

How to concat path and file name for creation and removal

放肆的年华 提交于 2019-12-11 12:40:15
问题 I'm trying the following. $woohoo = "c:\temp\shabang" New-Item -ItemType File $woohoo This creates a file at desired location. However, I'd like to split the $woo and $hoo and go something like this. $woo = "c:\temp" $hoo = "shabang" New-Item -ItemType File ($woo + $hoo) This doesn't work and I need a hint on how to make it fly. This suggestion nor this on worked out when applied to my situation. Apparently - given path format is unsupported. Suggestions? Edit This is what it looks like: Edit