concat

gulp-order node module with merged streams

拥有回忆 提交于 2019-12-04 05:31:57
I'm using the gulp-order module along with the event-streams module and gulp-concat to concatenate javascript files into a single dest file. The gulp-order plugin has worked great for me in other projects where I wanted to concatenate files from the stream in a distinct order. For some reason in this project it is not working properly, and the files in the public/angular/config directory are dispersed amongst the files I specify to concatenate last in the public/js directory. I think this may have something to do with specifying multiply sources ie. the angular and js directories. I tried

mysql - group, but show all row of a column

。_饼干妹妹 提交于 2019-12-04 05:15:56
I want to group fields but want to show all row of a column called remain : here is current output without grouping: And output with group: And I want This when I group: Here is mysql query: SELECT staff.name, staff.designation_id_designation, staff.status_id_status, Concat_Ws('=', leave_remain.leave_type_id_leave_type, leave_remain.days) AS remain FROM staff INNER JOIN leave_remain ON staff.id_staff = leave_remain.staff_id_staff GROUP BY staff.name use GROUP_CONCAT SELECT staff.name, staff.designation_id_designation, staff.status_id_status, GROUP_CONCAT(Concat_Ws('=', leave_remain.leave_type

Pandas: Concatenate dataframe and keep duplicate indices

£可爱£侵袭症+ 提交于 2019-12-04 02:55:14
I have two dataframes that I would like to concatenate column-wise (axis=1) with an inner join. One of the dataframes has some duplicate indices, but the rows are not duplicates, and I don't want to lose the data from those : df1 = pd.DataFrame([{'a':1,'b':2},{'a':1,'b':3},{'a':2,'b':4}], columns = ['a','b']).set_index('a') df2 = pd.DataFrame([{'a':1,'c':5},{'a':2,'c':6}],columns = ['a','c']).set_index('a') >>> df1 b a 1 2 1 3 2 4 8 9 >>> df2 c a 1 5 2 6 The default concat behavior is to fill missing values with NaNs: >>> pd.concat([df1,df2]) b c a 1 2 NaN 1 3 NaN 2 4 NaN 1 NaN 5 2 NaN 6 I

Oracle常用函数系列之一:字符函数(1)

醉酒当歌 提交于 2019-12-04 02:21:58
本文将演示以下6个 Oracle 中的常用字符函数。 函数 功能 ASCII(x) 返回字符x的ASCII码。 CONCAT(x,y) 连接字符串x和y。 INSTR(x, str [,start] [,n) 在x中查找str,可以指定从start开始,也可以指定从第n次开始。 LENGTH(x) 返回x的长度。 LOWER(x) x转换为小写。 UPPER(x) x转换为大写。 下面将结合实例对这些函数进行介绍。 o ASCII () 函数 :返回字符x的ASCII码。 示例1: SQL> select ascii('A') from dual; ASCII('A') ---------- 65 o CONCAT (x,y)函数:连接字符串x和y。 示例2: SQL> select concat(empno,ename) from emp where deptno=10; CONCAT(EMPNO,ENAME) -------------------------------------------------- 7782CLARK 7839KING 7934MILLER o INSTR(x, str [,start] [,n)函数:在x中查找str,可以指定从start开始,也可以指定从第n次开始。 示例3: SQL> select instr ('ABC123','C1')

Which is faster: Union or Concat?

烈酒焚心 提交于 2019-12-04 00:11:30
问题 I don't care about the order of the elements. http://msdn.microsoft.com/en-us/library/system.linq.enumerable.union.aspx http://msdn.microsoft.com/en-us/library/bb302894.aspx 回答1: Union removes duplicates. Concat does not. So, they produce different results if the sources either contain any items in common, or have any internal duplicates. If you can guarantee there are no duplicates, or if there are few and you don't care about having them in your output, Concat will be faster since there's

Update mysql field using CONCAT and SELECT

孤者浪人 提交于 2019-12-03 21:37:35
EDIT After removing my silly mistake of INTO (I was working with INSERTS and just keep going) the error below is showing. Still not working: Affected rows: 0 [Err] 1093 - You can't specify target table 'tbl' for update in FROM clause I'm trying to create an update where I select all the previous data in the column, add a complementary string and save it as new data. The code is below (with the error) Using only the select, the result: set @id = 3; SELECT tbl_alias.string_id FROM tbl as tbl_alias WHERE id = @id -- the output `3,10,8,9,4,1,7,11,5,2,6,12` I also tried with this query (the output

Python Pandas - Concat dataframes with different columns ignoring column names

荒凉一梦 提交于 2019-12-03 16:25:27
问题 I have two pandas.DataFrames which I would like to combine into one. The dataframes have the same number of columns, in the same order, but have column headings in different languages. How can I efficiently combine these dataframes? df_ger index Datum Zahl1 Zahl2 0 1-1-17 1 2 1 2-1-17 3 4 df_uk index Date No1 No2 0 1-1-17 5 6 1 2-1-17 7 8 desired output index Datum Zahl1 Zahl2 0 1-1-17 1 2 1 2-1-17 3 4 2 1-1-17 5 6 3 2-1-17 7 8 The only approach I came up with so far is to rename the column

How [1,2] + [4,5,6][1] = 1,25 in JavaScript [duplicate]

风流意气都作罢 提交于 2019-12-03 16:16:49
问题 This question already has answers here : Why is [1,2] + [3,4] = “1,23,4” in JavaScript? (13 answers) Closed 4 years ago . I got this question from Interview, [1,2] + [4,5,6][1] JavaScript giving answer 1,25 . How it's happening? Please explain clearly. 回答1: Lets start with the last part and write it more verbose var arr = [4,5,6]; var value = arr[1]; Is the same as [4,5,6][1] and as arrays are zero based, that gives 5 , so we really have [1,2] + 5; The first part is equal to [1,2].toString(),

Append Level to Column Index in python pandas

故事扮演 提交于 2019-12-03 13:00:26
I have several Dataframes with the same columns that I'd like to merge on their indices only. print df1 out[]: Value ISO Id 200001 8432000000 USD 200230 22588186000 USD 200247 4633000000 USD 200291 1188880000 USD 200418 1779776000 USD print df2 out[]: Value ISO Id 200001 1.309168e+11 USD 200230 5.444096e+10 USD 200247 9.499602e+09 USD 200291 2.089603e+09 USD 200418 3.827251e+09 USD print df3 out[]: Value Id 200001 3.681908 200230 3.408507 200247 4.531866 200291 0.273029 200418 3.521822 I could use pd.concat([df1, df2, df3], axis=1) and get out[]: Value ISO Value ISO Value Id 200001 8432000000

Concat two String in JSF EL expression [duplicate]

时间秒杀一切 提交于 2019-12-03 10:32:23
问题 This question already has an answer here : How to concatenate Strings in EL expression? (1 answer) Closed 4 years ago . I have the following el expression: <af:outputText value="#{viewArticle.publish ? ('Publish on ' + viewArticle.publishDate + ' by ' + viewArticle.publishFirstName + ' ' + viewArticle.publishLastName) : 'Draft version'}"/> But I am getting java.lang.NumberFormatException: For input string: "Publish on " How can I join the string? 回答1: You can use the String.concat function: