concat

gnuplot plot data from two files: in one x coordinate, in other y

人走茶凉 提交于 2019-11-28 20:43:36
I have two files: one with x coordinates, and other with y. Is there a way to plot this two files in one graph using gnuplot? Or is there a way to concat row by row this two files? Thanks There is not a way to plot the x coordinate from one file and the y coordinate from another natively in gnuplot. If you use a bash-like shell, you can use the command paste x_data.dat y_data.dat > xy_data.dat to combine files row-by row. If you want to put this command into a gnuplot script, you can do so like this: plot "<paste x_data.dat y_data.dat" There is an easier way to do what you ask, directly from

How to concat two ArrayLists?

China☆狼群 提交于 2019-11-28 20:03:33
I have two ArrayList s of equal size. List 1 consists of 10 names and list 2 consists of their phone numbers. I want to concat the names and number into one ArrayList . How do I do this? You can use .addAll() to add the elements of the second list to the first: array1.addAll(array2); Edit: Based on your clarification above (" i want a single String in the new Arraylist which has both name and number. "), you would want to loop through the first list and append the item from the second list to it. Something like this: int length = array1.size(); if (length != array2.size()) { // Too many names,

Using grunt concat, how would I automate the concatenation of the same file to many other files?

不想你离开。 提交于 2019-11-28 19:41:06
To concatenate two files, it looks something like this: concat: { src: ['common.js','js/app.js'], dest: 'assets/js/app.js' } And if I want to concat an entire folder of files into one, it looks something like this: concat: { src: ['dev/*.js','], dest: 'prod/js/app.js' } But let's say I have a file that I want to concat onto 10 or 20 other files, and I want them to concat separately? In other words, here is what I'm looking for: A.js + B.js = AB.js A.js + C.js = AC.js A.js + D.js = AD.js A.js + E.js = AE.js And so on... To be more specific though, I can figure out how to concat files one by one

ffmpeg concat: “Unsafe file name”

牧云@^-^@ 提交于 2019-11-28 19:04:14
Trying to convert a bunch of mts-files into a big mp4-file: stephan@rechenmonster:/mnt/backupsystem/archive2/Videos/20151222/PRIVATE/AVCHD/BDMV$ ~/bin/ffmpeg-git-20160817-64bit-static/ffmpeg -v info -f concat -i <(find STREAM -name '*' -printf "file '$PWD/%p'\n") -deinterlace -r 25 -s hd720 -c:v libx264 -crf 23 -acodec copy -strict -2 ~/tmp/Videos/20151222.mp4 ffmpeg version N-81364-gf85842b-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.1 (Debian 5.4.1-1) 20160803 configuration: --enable-gpl --enable-version3 --enable-static --disable

How do I concatenate strings from a subquery into a single row in mysql?

岁酱吖の 提交于 2019-11-28 17:13:34
I have three tables: table "package" ----------------------------------------------------- package_id int(10) primary key, auto-increment package_name varchar(255) price decimal(10,2) table "zones" ------------------------------------------------------ zone_id varchar(32) primary key (ex of data: A1, Z2, E3, etc) table "package_zones" ------------------------------------------------------ package_id int(10) zone_id varchar(32) What I'm trying to do is return all the information in package table PLUS a list of zones for that package. I want the list of zones sorted alphabetically and comma

Is there any haskell function to concatenate list with separator?

末鹿安然 提交于 2019-11-28 16:04:40
问题 Is there a function to concatenate elements of a list with a separator? For example: > foobar " " ["is","there","such","a","function","?"] ["is there such a function ?"] Thanks for any reply! 回答1: Yes, there is: Prelude> import Data.List Prelude Data.List> intercalate " " ["is","there","such","a","function","?"] "is there such a function ?" intersperse is a bit more general: Prelude> import Data.List Prelude Data.List> concat (intersperse " " ["is","there","such","a","function","?"]) "is

MYSQL CONCAT MAX LENGTH

ⅰ亾dé卋堺 提交于 2019-11-28 11:07:16
Following this post: POST ABOUT CONCAT My problem is that i have many rows CONCAT into one row. For example if i have 10 rows with string around 50 chars, my query will show me only 6-7 of that rows or something like that. I searech in stack and google and i found that i can change CONCAT max length by command: SET group_concat_max_len := @@max_allowed_packet . What i am doing wrong? EDIT: When i SHOW VARIABLES LIKE 'group_concat_max_len' it's shows me 1024. Mysql version 5.0.96-log. Tables type: MyISAM. Looks like it dont have any limits, i try to select simple varchar with 2000 chars, and it

Why can I add characters to strings but not characters to characters?

谁说我不能喝 提交于 2019-11-28 09:58:09
问题 So I wanted to add a character to a string, and in some cases wanted to double that characters then add it to a string (i.e. add to it itself first). I tried this as shown below. char s = 'X'; String string = s + s; This threw up an error, but I'd already added a single character to a string so I tried: String string = "" + s + s; Which worked. Why does the inclusion of a string in the summation cause it to work? Is adding a string property which can only be used by characters when they're

Combining two csv files using pandas

六月ゝ 毕业季﹏ 提交于 2019-11-28 07:36:45
问题 Can anyone check for me what's wrong with my code. I want it merge two csv file into one csv file. I hve tried to google and I still cant merge it, it will create new file but will show nothing inside. https://stackoverflow.com/a/16266144/7624469 a.csv ID User A1 Fi A2 Ki b.csv ID User A4 Fsdi A5 Kisd The output that I want will look like this combined.csv ID User A1 Fi A2 Ki A4 Fsdi A5 Kisd test.py import pandas, sys import pandas as pd a = pd.read_csv("C:/JIRA Excel File/a.csv") b = pd.read

Adding two Java 8 streams, or an extra element to a stream

笑着哭i 提交于 2019-11-28 02:56:05
I can add streams or extra elements, like this: Stream stream = Stream.concat(stream1, Stream.concat(stream2, Stream.of(element)); And I can add new stuff as I go, like this: Stream stream = Stream.concat( Stream.concat( stream1.filter(x -> x!=0), stream2) .filter(x -> x!=1), Stream.of(element)) .filter(x -> x!=2); But this is ugly, because concat is static. If concat were an instance method, the above examples would be much easier to read: Stream stream = stream1.concat(stream2).concat(element); And Stream stream = stream1 .filter(x -> x!=0) .concat(stream2) .filter(x -> x!=1) .concat(element