FAQ Database Discussion Community


Can't access elements of merged arrays

php,arrays,merge
So I had 2 objects that need to work together, one idea that was given to me was to merge them. Did that, using array_merge But now I can't access the second object from the merged one and I'm stuck. The keys that appear after merge look a little weird,...

git - create a new branch from local copy and then merge it with existing branch

git,version-control,merge,gitlab,pull
Being a git newbie, I have messed up a little bit in the way I handled a new development and I do not succeed in resolving this properly. I have a master branch. I made a local copy of this master branch on my desktop computer and then I removed...

Merge Into with no rows

sql-server,tsql,merge
Is there a way to use the instruction: MERGE INTO MySchema.MyTable AS Target USING (VALUES ........ ) with nothing instead of the dots? Usually you have there something like a list of (firstValue, SecondValue,...,LastValue), one for each row you want to merge but I'd like to be able to write...

Get result of merging a PR while it is already merged

git,github,merge,refs
For a PR with number 1 GitHub automatically creates a ref refs/pulls/1/head and refs/pulls/1/merge. The latter contains the result of the merge and is especially useful for e.g. CI (because what you want to test is actually the result of the merge). After merging a PR, the refs/pulls/<number>/merge is no...

Where is HEAD in the in the tree if I merge a branch, do some commits and then checkout the branch again

git,merge
New to Git. I am the only person using this Git repository. (My organization does not use git.) Here's a basic outline of my workflow. I name branches according to their number in our bug tracker. I then make my changes, commit them to that branch. Once things are good...

Correct git operation to merge portion of a branch

git,merge,gitlab
I have a git branch on which I am working on a feature that has necessitated changes to less related portions of the code. I have had to stop development on this branch to work on a feature on another branch that the priority has changed for. This branch uses...

Linux awk merge two files

linux,awk,merge
I have below script to combine two files. awk -F"\t" ' {key = $1} !(key in result) {result[key] = $0; next;} { for (i=2; i <= NF; i++) result[key] = result[key] FS $i } END { PROCINFO["sorted_in"] = "@ind_str_asc" # if using GNU awk for (key in result) print result[key]...

Merge duplicates in array PHP [closed]

php,arrays,merge,totals
I have an array generated daily that will have duplicate products in it. [0] => Array ( [product_id] => 85 [name] => Widescreen Espresso v6.1 [quantity] => 1 ) [1] => Array ( [product_id] => 85 [name] => Widescreen Espresso v6.1 [quantity] => 2 ) [2] => Array ( [product_id]...

Reverse Merge and svn:mergeinfo

svn,version-control,merge
We are using SVN to manage a development pipeline, in which we merge changes from the first stage of the development environment into a second-stage branch. We have created tools that will merge revisions from the first stage into the second stage. What we want to do is alert users...

R loading multiple excel files and merge

r,loops,merge,excel-2007,lapply
I have many excel files that I need to load and merge into a single data frame. The script below works! However, before merging all files I want to paste each file name in a new column. library(gdata) library(tools) filelist <- list.files(pattern = "*\\.xlsx$") files = lapply(filelist, read.xls, header=TRUE) new...

Merge Only When Value is Empty/Null in Pandas

python,pandas,merge
I have two dataframes in Pandas which are being merged together df.A and df.B, df.A is the original, and df.B has the new data I want to bring over. The merge works fine and as expected I get two columns col_x and col_y in the merged df. However, in some...

Git merge internals

git,github,merge,git-merge
This is probably going to end up being a long question, so please bear with me. I came across an incredible explanation for git merge decisions here: How does git merge work. I am trying to build on this explanation and see if there are any holes in depicting git...

Unexpected behavior with merge and dplyr's left_join

r,merge,left-join
I have noticed an unexpected behavior with the merge function in base R as well as the left_join function of dplyr. Below is a minimal example of the data: df1 <- read.table(text="serialno var1 pos_var1 1 C001 NA NA 2 C002 NA NA 3 C003 0.1790000 1 4 C004 NA NA...

R: Data frame operations: filtering common rows and removing rows of several data frames

r,merge,dataframes,subset
dfA <- data.frame(Efficiency=c(7,2,8,9), Value=c(3, 4, 7, 8)) dfB <- data.frame(Efficiency=c(7,2,4,2,8,9), Value=c(3, 4, 4, 1, 7, 8)) dfC <- data.frame(Efficiency=c(7,9), Value=c(3, 8)) I want to get the common rows of dfA and dfB. From the resulting data.frame I want to remove the rows which have the same values as dfC....

how to merge demensional arrays

javascript,arrays,json,multidimensional-array,merge
var list1 = [ { id: 'node1', children: [ { id: 'node11', children: [] } ] } ]; var list2 = [ { id: 'node1', children: [ { id: 'node13', children: [] } ] } ]; var resultList = [ { id: 'node1', children: [ { id: 'node11', children: []...

Merge a large list of logical vectors

r,list,merge,bigdata
I have a large list of TRUE/FALSE logical vectors (144 list elements, each ~ 23 million elements long). I want to merge them using any to produce one logical vector. If any of the first elements of each list element are TRUE then TRUE is returned and so on for...

R - Merging Two Data.Frames with Row-Level Conditional Variables

python,mysql,r,merge,dplyr
Short version: I have a slightly trickier than usual merge operation I'd like help optimizing with dplyr or merge. I have a number of solutions already, but these run quite slow over large datasets and I am curious if there exist a faster method in R (or in SQL or...

Add a row made of 0 for each identifier in a large database

r,merge,data.frame,rbind
I have a database where the first row of each of the unique identifiers is missing. Basically, I need to add for each unique id a new row made of 0. My database looks like that (I have more than a million rows, so loops are basically impossible). dt =...

Joining two Pandas DataFrames does not work anymore?

join,pandas,merge,dataframes
I have 2 Pandas Dataframes. The first one looks like this: date rank id points 2010-01-04 1 100001 10550 2010-01-04 2 100002 9205 The second one like this: id name 100001 A 100002 B I want to join both dataframes via the id column. So the result should look like:...

Simple merge_sort on list - analysis

c,list,function,merge,sorted
I wrote simple function, that merge two sorted list into one. Unfortunately, I couldn't get a result, I don't know why. Compilator don't show any statements, and stop working while starting the function. It seems me to be ok everything. Check that, please. Below is shown the code. node list_sort...

pandas: join two table and populate value when even there is not a match

python,pandas,merge
Not sure how should I describe the problem, so I will use an example below. I want to join the following two table df1 and df2 to get a table like df3 where all IDs, A, B, C, D need to be present for each Time. d1 = {'Time': [1,1,2,2],...

merging matrices with cbind and match: name of the last column is dropped

r,matrix,merge,lapply,cbind
I have a list of matrices: [[1]] a b X2005.06 NA 2504179 X2006.06 NA 3746905 X2007.06 NA 5468607 X2008.06 NA 6664545 X2009.06 NA 7339310 X2010.06 4602635 5587625 X2011.06 5188408 6498543 X2012.06 5190519 6831415 X2013.06 5246169 8214118 X2014.06 5856140 9384405 [[2]] c d X2005.06 354981 1729284 X2006.06 423136 1902213 X2007.06 602389...

Git merge driver is not used

git,merge,git-merge
I have two branches b1 and b2 like this: MyRepo |- .git |---|- config |- .gitattributes |- D1 |---|- foo.xml In git\config, I have this configuration: [merge "MyMerger"] name = My merger driver = MyMerger.exe %B %A %O MyMerger.exe exists in the Path environment variable Then, in .gitattributes, I have...

Combine two rows based on common ID

sql,tsql,merge,sql-server-2012
I have a query that returns two lines per ID. I would like to be able to merge these into one single row, based on the ID. There will only ever be two rows per ID. As in the example below, one row will only ever contain ColumnA and the...

Create a branch from master with removed code

git,merge,branch
I wrote some code to implement two new features on a project, but I committed the changes to master. I now realize that this was a mistake, because one of the features is working well, and the other is not. I would like to keep the working feature code in...

Interactively merge files tracked with git and untracked local files

git,command-line,merge,diff,interactive
I use a couple of software packages (like gitlab) that you install by cloning from their git repo. They typically come with some config.example (under version control), which you copy to your own config file (not under version control or even ignored in .gitignore) and adapt to your needs. When...

Merge JSON Object with same “key” and add their “value” using JavaScript

javascript,json,merge,key,value
My JSON looks like this {"rows":[ {"key":["zeit.de"],"value":98}, {"key":["google.com"],"value":49}, {"key":["spiegel.de"],"value":20}, {"key":["spiegel.de"],"value":12}, {"key":["spiegel.de"],"value":20}, {"key":["spiegel.de"],"value":12}, {"key":["netmng.com"],"value":49}, {"key":["zeit.de"],"value":300} ]} and I am looking for a solution to merge all the same keys and add the values of the merged keys together to get something looking like this. {"rows":[ {"key":["zeit.de"],"value":398}, {"key":["google.com"],"value":49},...

Messed up a merge when trying to upgrade my Laravel application

git,laravel,github,merge
I have an existing laravel project which used an older version of Laravel 5.1. I wanted to upgrade my project to use Laravel 5.1.2. I followed this tutorial. So I added the laravel/laravel github repository into my git project as a remote called laravel, fetched it, then I created a...

Java Arraylist want to merge the objects if they have the same property value java,object,arraylist,properties,merge
Java ArrayList, filled with objects called packinglistrows which hold three key values ( ISBN, PalletNumber, Quantity), along with other properties. I have this ArrayList with all the same ISBN values in it. I want to be able to merge the items with the same PalletNumbers quantity value. For example: ArrayList...

join two data tables and use only one column from second dt in R

r,join,merge,data.table
Edited to make it cleaner. Let's say I have two data tables (dt1 and dt2), and I want to get dt3 using data tables. A,B,C,E,F,G,H are column names. dt1 key is column A, and dt2 key is column E. Data tables have different number of rows. I want to keep...

Merge two linked lists Order

list,merge,order
I have two sorted linked lists and need to merge them. l1 = [a] -> [b] -> [c] l2 = [b] -> [f] l1plus2 = [a] -> [b] -> [c] -> [f] What order would this be?...

skip the empty dataframes and produce the output

r,merge,ggplot2,tidyr,rpostgresql
sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C [5] LC_TIME=German_Germany.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] WriteXLS_3.5.1 tidyr_0.2.0 scales_0.2.4 gridExtra_0.9.1 [5]...

Merging Multiple Arrays Evenly/Alternating with Javascript and Google AppScript

javascript,arrays,google-apps-script,merge
I'm trying to merge multiple arrays evenly/alternating in javascript/Google appScript. There are several arrays (5 or 6). I've tried 2 different methods, but neither worked. I don't work a lot with javascript honestly and I've managed to get the code to this point, but I can't get it merge properly;...

Captcha with merging a number with real image

image,image-processing,merge,captcha
I have searched for captcha generation tools, but I could not find any tool which can generate the below captcha pictures. You can seen these when you want to register on google. It uses a number merged on a real picture and produce a new real image picture. Do you...

How to compute variance with missing value in a DataFrame - Python Pandas?

python,join,pandas,merge,dataframes
To be concrete, say we have a dataframe df1: name date valueA valueB color A 12/1/14 3 10 red A 12/2/14 1 30 red B 12/1/14 2 30 green B 12/3/14 3 20 green C 12/3/14 4 40 white The range of date is from 12/1/14 to 12/4/14. Each group...

Merging arrays with passing a function as parameter

javascript,merge,callback
I've been on this problem for about 3 hours and I can't figure this out. I've gone through Codecademy and Code School Javascript courses, and according to the blog that hosted this code block, I should know the answer: var merge = function(array1, array2, callback){ //your code here. } var...

Join matrices with same values in different vectors in MATLAB

matlab,matrix,merge
I am trying to merge two matrices that share same values in multiple columns. The following matrices should exemplify my problem and provide a MWE. However, my data is very long size(500000, 4), therefore I am searching an efficient way to merge them. The data consists of option data where...

git merge upstream and the rebase further down causes me to merge again

git,merge
I forked out a repo and worked for a while with some 10 commits (10c), then I merged from upstream (m1) and then worked for a while and had 3 commits (3c). Iam trying to rebase now, while 3c is ok, when I go beyond m1 to rebase/squash messages, It...

How to move multiple lines to join another using notepad++

merge,notepad++
I have file with many lines look as: 1431683268.M60282P30030.mailtest,S=23479,W=23938:0453D37C43E8= 923D 1431683268.M690986P30032.mailtest,S=23459,W=23918:04543801693F= 9F0A 1431683272.M58906P30033.mailtest,S=23469,W=23928:044506F90B17= A602 How can i merge lines using notepad++ so they look: 1431683268.M60282P30030.mailtest,S=23479,W=23938:0453D37C43E8923D 1431683268.M690986P30032.mailtest,S=23459,W=23918:04543801693F9F0A 1431683272.M58906P30033.mailtest,S=23469,W=23928:044506F90B17A602 Thanks for helping!...

GitHub merge failed and deleted half my project

git,github,merge,github-for-windows
After doing several changes to my project (deleting files, adding new ones, modifying code..etc), committed my local changes to Github, and everything went fine. Then I tried to do a merge from my branch to MASTER. I received an error that c:/.. can't be written, access denied after that half...

SVN: Keep trunck changes but loose local dev changes

svn,merge
I have a file on my trunk. The same file exists in my branch. At revision A the files are identical in both branches. Then in revision B I make a local modification in my development branch and commit it. Then through several revisions more trunk changes are integrated and...

Can I merge an unknown named graph with an other in a SPARQL query?

syntax,merge,rdf,sparql
I want to query on two different named graphs as the default graph with SPARQL : SELECT * FROM <graph1> FROM <graph2> WHERE{ ... } My problem is that I don't know the URI of graph1, but I know a specific triple of graph1 allowing me to find his URI....

MySQL: Merging two tables together

mysql,merge
Just wondering, if I have two tables that have some common columns (might be in different order though) and some different columns, is there an easy way to merge the two structures together so that both of them would have the same columns? I tried exporting the structure of both...

Git: redo merge with a different branch

git,merge
I have a long-running git fork and I wanted to merge the upstream branch. Unfortunately I did git merge upstream-topic and spent hours resolving merge conflicts before realizing I really wanted to do git merge upstream-master. The branches have 99% the same content, except upstream-topic has a bunch of merge...

Get maximum from xts object using merge function

r,merge,xts,quantmod
Hi I'm using R quantmod library and I would like to find and return the maximum of two values (volume today, vs volume yesterday). require(quantmod) getSymbols("HELE") # Ok now when I do this it does not return a single column with the highest # volume head( merge( HELE, max (HELE$HELE.Volume,lag(HELE$HELE.Volume,...

How can I operate on elements of a data.frame in r, that creates a new column? [duplicate]

r,merge,data.frame,aggregate
This question already has an answer here: Idiomatic R code for partitioning a vector by an index and performing an operation on that partition 3 answers Suppose I have a data.frame, df. a b d 1 2 4 1 2 5 1 2 6 2 1 5 2 3...

How to update SQL table from other table when they are on different servers

sql,sql-server,database,merge,sql-update
I've already run the following command to include another server instance. EXEC sp_addlinkedserver @server='Server' Now I'm trying to synchronize these databases using this: UPDATE [Server].[ServerDB].[dbo].[tableName] SET [Server].[ServerDB].[dbo].[tableName].[columnName] = [LocalDB].[dbo].[tableName].[columnName] FROM [Server].[ServerDB].[dbo].[tableName], [LocalDB].[dbo].[tableName] WHERE [Server].[ServerDB].[dbo].[tableName].id = [LocalDB].[dbo].[tableName].id This gave me the following error: The objects "LocalDB.dbo.tableName" and...

Git workflow: “Your local changes would be overwritten by merge”

git,github,merge
I've been working with another developer across three servers: My local VM Dev server Live server The workflow that I adopted was to, obiously, do all the work on my local VM, then pull the changes form the repomote repository to the dev server (dev branch) and live server (master...

Merge several data frames having the same variables and observations

r,csv,merge,data.frame
I have several CSV files for each year. Each file contains the same variables and observations. df14 <- data.frame(name = c("one", "two", "three"), A = c(1,2,3), B = c(4, 2, 1), C = c(0, 1, 1)) df15 <- data.frame(name = c("one", "two", "three"), A = c(3,1,1), C = c(0, 0,...

How to merge rows in SQL based on dates columns if dates are in sequence?

sql-server,merge
I work with SQL Server and I've got the following table: ID Res_ID Start End --------------------------------------- 5917 9742 2015-08-11 2015-08-11 5918 9742 2015-08-12 2015-08-12 5919 9837 2015-09-07 2015-09-07 5920 9788 2015-09-09 2015-09-09 5921 9788 2015-09-10 2015-09-10 5922 9788 2015-09-11 2015-09-11 5923 9788 2015-09-11 2015-09-11 5924 9788 2015-10-01 2015-10-01 5925 9788...

Backport of `.merge()` for Angular 1.3.x

javascript,angularjs,merge
Angular 1.4 (which is not stable yet) has a function that I'm interested in: .merge(). As I don't want to use an unstable library, I'm looking for a substitution of that method for Angular 1.3.x. Is there any "backports" library I could include in my project that will mimic Angular's...

Extracting a column from one dataset and creating another dataset with columns from a third dataset in R [duplicate]

r,data,merge,data.frame
This question already has an answer here: How to join (merge) data frames (inner, outer, left, right)? 8 answers So I have these two datasets: ID DOB ID2 count 1 4083 2007-10-01 3625 5 2 4408 2008-07-01 3603 2 3 4514 2007-07-01 3077 3 4 4396 2008-05-01 3413 5...

Git reset and revert

git,merge,reset,revert
I have accidentally merged the wrong branch into master, and pushed to origin. The problem is, that i have resetted the masterbranch to the last before commit-hash with git reset --hard xxx and also the origin with git push origin master --force but now the merge-commit is always there. The...

Merge Excel columns into one worksheet by using VBA

excel,vba,excel-vba,merge
I have multiple worksheets, they all have the same number of columns but not the same number of rows. I need to copy all rows from column AS, from each worksheet and paste them on top of each other into a new worksheet. The current column AS contains a formula...

Combine or merge 2 array with loop or function

c,arrays,for-loop,merge
I'm new to the C world. I'm using Visual 2010. I need to create an array from 2 other arrays, or a function to merge them; I come from PHP so I'm sorry if this is stupid. I tested some loop without success.. a real example could be helpful: int...

GIT Source Tree Merge Develop Branch into Stage Branch Conflict

git,merge,conflict
I am using Sourcetree to merge my Develop branch into the Staging Branch. There was a conflict which I resolved. I run Git Status and there is no additional files to add / conflicted. My branch now states (stage|MERGING) Here is where my confusion starts. Do I need to start...

neo4j load csv invalid “ON MATCH”

merge,neo4j,load-csv
I'm loading a file using the LOAD CSV command,and i have a strange situation, when a new row gets a propery added in the "on match" block. here is the code: USING PERIODIC COMMIT 10000 LOAD CSV WITH HEADERS FROM 'file://1.csv' AS line FIELDTERMINATOR '|' WITH line, split(line.list_ites, ',') AS...

Easy way to switch/swap git checkins between 2 branches

git,version-control,merge,branch
I made an implementation for a feature on develop-branch. It worked out well but then I came up with an interesting alternative. I branched from the checkin of develop-branch before the feature checkin on develop to implement the alternative. Now I decided that my alternative is the better implementation. But...

Merging branches in GIT - What does this message mean

git,merge,atlassian-sourcetree
In my project I currently have two branches a branch called DEMO and another branch called Master. I am attempting to merge DEMO into Master. The branch Demo has some files that Demo does not have along with some other changes.In order to do that I am using Source Tree...

In SVN is there a straighforward way to merge back each change individually?

svn,merge
I've got a long-running feature branch that has become incompatible with trunk -- there are lots of binary files that have been modified on both sides so I've got tree conflicts out the wazoo. In the past when we've run into these issues, we've just diffed the branches against each...

Do I need to checkout and pull a remote git branch before I merge it in?

git,merge,git-merge,git-flow
My normal process for merging in develop to my feature\my-feature branch is: [email protected] ~/myRepo (feature/my-feature) $ git checkout develop $ git pull $ git checkout feature/my-feature $ git merge develop $ git mergetool Can this be replaced with: [email protected] ~/myRepo (feature/my-feature) $ git fetch $ git merge origin/develop $ git...

Hg Mercurial - Upgrading code not in repository

version-control,merge,mercurial,tortoisehg
I have a customized local repository of NopCommerce 3.5. The new version of NopCommerce (3.6) is out and I would like to try to update to it. I downloaded their source code and I would like to somehow replace all the files in my local repository with the new files...

R - combine data frames of different lengths after loop

r,loops,merge,data.frame
I am looping through a series of 15 files. My loop looks like this: for (i in 1:length(mod.f)) { do some stuff dataframe `df` is produced } Each iteration of the loop will yield a data frame with two columns - date and some value, just like the example below:...

python merging pairs lists within sublists within a list by comparing previous pair's second number with next pair's first number [duplicate]

python,list,for-loop,merge,comparison
This question already has an answer here: Merging a list of time-range tuples that have overlapping time-ranges 4 answers [[[0, 2], [2, 9]], [[3, 7], [7, 9], [9, 12], [15, 17]], [[4, 6]]] I need to iterate through this list of sublists of list pairs and check whether the...

Git: Is there a way to re-merge two commits on the same branch (FF) to a new branch?

git,merge,branch
I'm working on a group project, and after making some changes and pushing to origin (call this commit A), another person seems to have force pushed their changes, thereby reverting my commits (call this commit B). Before I push, we have something like this: A (master) | B (their-master) |...

join two different list by id into one list

c#,list,join,merge,automapper
I've got two different list of two different objects. Then i got one list of a viewmodel that contains properties from both the objects and i want them to be joined into that list. //Product public string id { get; set; } public string unitMeasurement { get; set; } public...

do not let git merge delete a file

git,merge
Say I have branch A and B. In A there is some file being deleted. Now A is being merged into B and I want to have this existing in B after merge. What is the easiest way to do this?

How to properly merge 2 ontologies with OWL API 4 or 3.5

java,merge,ontology,owl-api
in my master thesis project I want to merge several ontologies (filled only with individuals) having different namespaces, but sharing the same imports and some individuals(e.G ontologyA#Harold & ontologyB#Harold). I'm trying to gain a new merged ontology where: the ontology header's information of the 2 ontologies are preserved (like in...

Extra column based on paired data (mutate)

r,merge,dplyr
I have a dataset with paired data (members of same household). Id is the individual identifier and householdid is the identifier of the partner (and vice versa). What I need is to add an extra column (the occupation) for each id of his\her partner. My data look like this dta...

SQL: Query to merge (some) rows

sql,oracle,merge,sum,group
I'm currently trying to create a query that merges some rows to one category and sums up the related values. I'll try to illustrate it with the following example: Country | Sales Jan | Sales Feb | Sales Mar --------+-----------+-----------+---------- Austria | 100 | 110 | 120 Spain | 120...

Differences between 2 branches after merge: GIT

git,version-control,merge,git-diff
I am currently working on a second branch called NC12-changePassword. There have been changes made to master branch which handle decrypting of a string. I required these new changes to be able to implement a new feature on my branch so I merged the changes. I did a git pull...

How to merge multiple columns values into one column?

r,merge
I have a data frame called "stemmoutput" (see below) : X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 1 tanaman cabai 2 banget hama sakit tanaman 3 koramil nogosari melaks ecek hama tanaman padi ppl ds rambun And I want to merge multiple columns values into one column...

How can I combine elements at the same index from separate lists?

java,list,loops,merge
I am trying to combine multiple String lists. Say I have two (could be more) lists of the same size: List<String> list1 = Arrays.asList("1One","1Two","1Three"); List<String> list2 = Arrays.asList("2One","2Two","2Three"); I want to combine the value of the corresponding indexes and place them into a new list: List3 = new {"1One2One", "1Two2Two",...

R: Merge two data frames by common columns

r,merge
I have two data.frames, "x" and "y". "x" and "y" have different numbers of columns. As the following: x A1 A3 A5 A6 1 a b b a y A1 A2 A3 A4 A5 A6 A7 1 9 10 11 9 10 10 10 2 0 6 2 2 8...

How to add/merge dataframes in a list

r,merge
I used the following for loop to read 7 csv files and add them to a list. list <- list() l <- 1 for(i in 1:7){ data <- read.csv(paste("file",i,".csv",sep=""),header=FALSE) list[[l]] <- data l <- l + 1 } So now I have a list named "list" containing 7 dataframes, right?...

three.js merge geometry and octree selection

merge,three.js,geometry,selection,octree
I am using Three.js to show a number of custom geometry's in various positions and rotations. They are static and rarely change, but the user can add, delete or change the shape of each individual object. This has worked well using the code snippet below: var Mat=new THREE.MeshBasicMaterial( { color:...

Cannot allocate vector on a 33k row table merge table

r,merge,allocation
I'm trying to merge the demographics table ("df_zip_demographics") from the choroplethrZip library with another table including with information by Zip codes. The table I'm trying to add to the "df_zip_demographics" is a simple two column table, "Stores", where the columns are "ZipCode" and "Hit". When I run this: demo =...

How to import bugfix of master in all other branches without including the commits before?

git,version-control,merge,git-branch
I have some branches: branch 1 and branch 2. They have their origin from the master branch. Now there were some changes in the master branch. One is a critical bugfix, which has to be imported on branch 1 and 2. But there is a change (or perhaps multiple) which...

Merging two simple javascript functions into one

javascript,jquery,html,function,merge
I have the following code in my index.html for an input field: <input id="inpMinutes" type="number" style="width: 50px; text-align: right" min="1" value="1" onkeypress="return isNumberKey(event)" /> <span id="minuteS">minute</span> I want to keep the entered number between 1 and 600 without allowing entering any non digit characters. This is done by 2 different...

Merge one dataframe with a date vector

r,date,merge
I would like to create a dataframe merging the dataframe ss to a vector daily_vector, with date information, through the column "ss$Date_R". I would like to keep all rows from daily_vector to know which date in the dataframe ss has no data. I have tried use the function mergehowever when...

How to combine values composed of lists with common items in a dictionary using Python?

python,list,dictionary,merge,set-union
I have a dictionary that resembles the following: dict1 = {'key1':['1','2','3'],'key2':['3','4','5'],'key3':['6','7','8']} I would like to merge all keys that have at least one common element and as a result. For example, the resulting dictionary should look like: dict1 = {'key1':['1','2','3','4','5'],'key3':['6','7','8']} Please note how key2 has been eliminated. Whether it is...

combining several iterations of same object in different location using .add() or .merge()

merge,three.js,geometry,rendering,mesh
I am trying to make a coil with several small loops. I have a custom function to create a single helix for each loop, and at first I was calling that within a for loop several hundred times, but it was taking too long to render and slowed down the...

Merging nodes with the same data using Neo4j

merge,neo4j,cypher,nodes,graph-databases
Here is what I want to do: Connect users to the videos they watch like user -> video in a social graph or network type of graph. How I did it: LOAD CSV WITH HEADERS FROM 'asdfjkl;' AS line CREATE (u {user: line.user }) - [:VIEW] -> (v {video: line.video})...

merge structure field cells in matlab

matlab,merge,structure,field
I want to merge structure fields in case I do partial computations, to later fill up the whole structure field cells. The results are put into cells according to index into the cell, like this: for i=3:4; results1.index{i}=i; results1.sqr{i}=i*i; end for i=1; results2.index{i}=i; results2.sqr{i}=i*i; end giving, respectively: results1 = index:...

Mercurial - merging last three unpushed commits

version-control,merge,mercurial,commit,tortoisehg
I have (locally) three hg commits. As two of them are basically but a couple of minor corrections, I would like to merge them into a single commit prior to pushing. Any way to do that (with TortoiseHg or console)?...

Combining jQuery code - ImagesLoaded + Shuffle.js

jquery,merge,shuffle,imagesloaded
My goal is to put the setupSorting function inside of the ImageLoad function. They work when separated (here), but sorting fails when combined (here). This: $(document).ready (function(){ /* reshuffle when user clicks a filter item */ $('.filter-tags a').click(function (e) { e.preventDefault(); // set active class $('.filter-tags a').removeClass('active'); $(this).addClass('active'); // get...

R merge strange behavior

r,function,merge
Doing join of 2 data.frame with merge function I have found that the argument sort of it don't change nothing. Example: id_df <- structure(list(id = c("click", "event", "funnel", "impression", "tracker", "visibility"), id_Havas = c("a1", "a2", "a3", "a4", "a5", "a6")), .Names = c("id", "my_id"), class = "data.frame", row.names = c(NA, -6L))...

Git: Why is only 1 merge showing in my history when I have done several?

git,version-control,merge,branch,branching-and-merging
Here is my commit history with git log --pretty=%h --graph (the order of commits goes from bottom to top) * 81e1852 <- I have merged back in twice to get to this * b6cb648 * 3ef6e0b * a1f56c5 * a35a50a * 47b2058 <- I have made a couple of branches...

Git Merge Driver - How to find out full path of merged file?

git,merge,git-merge
in a custom merge driver I need to get the full path of the conflicting file. Git provides only temporary files located at the root of the repository. Is there any way to ask Git what file it is trying to merge at the moment? Any git command that provides...

Sub-directory into independent repository and later merge back into main repository

git,merge,subtree
I want to create independent repository out of a sub-directory of an existing git repository and later be capable to merge it back to main repository. Basically I want to separate one sub-directory of a monolithic git repository for specific work and be able to merge commits back into monolithic...

Merge table in Oracle with delete condition refering to source table

sql,database,oracle11g,merge
For the following question it is said that the answer should be C. But I think the correct answer is Answer D as NOT MATCHED block inserts all unmatching records to target table. Can anybody explain this? Thank you. Q)View the Exhibit and examine the data in ORDERS_MASTER and MONTHLY_ORDERS...

git has problems with squashing commits once there is “Merge branch”

git,merge
I am trying to squash some commits – current git log looks like this: https://gist.github.com/knyttl/a2f39cd9376301c78b07 Notice the "merge branch 'master'" – once this shows in the log, the squashing rebase always results in conflicts. git rebase -i ZZZZZZ What I don't understand that this branch has all conflicts resolved, every...

Win7 Batch File - Moving Subfolders(& Files) to Grand-Parent Directory

batch-file,cmd,merge,move,subdirectories
I have a somewhat complicated problem. I've downloaded an archived website from archive.org using Httrack and now I have thousands of subfolders and files I need to merge before I can rebuild it. I'm trying to write a batch file to solve the problem. But my search results never come...

MS Word Mail Merge and Split Documents saving, Header and footer issue

vba,merge,word-vba,mailmerge
I am using the below Macro to split the mail merged into separate documents. What I need is it to split into separate documents keeping the whole page including the header and footers and saving as in the first merged field on the page, which is the first piece of...

R: Avoid loop or row apply function

r,merge,data.frame,data.table
I've following two data frame df_sales and df_supply. I want to merge the sale to supply in such a manner that my df_sales table have DATE_SUPPLY and QNT_SUPPLY from df_supply on below conditions *Condition: DATE_SUPPLY should be recent DATE_SUPPLY of corresponding "ITEM" for corresponding "STORE", i.e, DATE_SALE <- max(df_supply[df_supply$DATE_SUPPLY <=...

Aggregating while merging two dataframes in R

r,merge,data.table,aggregate,dplyr
The ultimate goal is to sum the total quantity(transact_data$qty) for each record in product_info where the transact_data$productId exists in product_info, and where transact_data$date is between product_info$beg_date and product_info$end_date. The dataframes are below: product_info <- data.frame(productId = c("A", "B", "A", "C","C","B"), old_price = c(0.5,0.10,0.11,0.12,0.3,0.4), new_price = c(0.7,0.11,0.12,0.11,0.2,0.3), beg_date = c("2014-05-01", "2014-06-01",...

Merging PDF files with similar names using PDFTK and a bash script

linux,bash,pdf,merge,pdftk
I have a directory with a few hundred pdfs in it. All of the PDFs filenames begin with a 5 digit number (and then have a bunch of other stuff at the end). What I need to do is merge any PDFs together that start with the same 5 digit...

Merge 2 xml files using XSLT in unix

xml,unix,xslt,merge
I have 2 XML files as shown below: File1.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <Schedule name="myOffice"> <taskItem taskId="1" startDate="2013-01-01" stopDate="2037-12-31"> <measurements> <measurement>USD</measurement> </measurements> <timings> <period day="0" duration="0" hour="0" interval="28" minutes="0"/> </timings> </taskItem> <taskItem taskId="2" startDate="2013-01-01" stopDate="2037-12-31"> <measurements>...

Merging strategy with a long development branch. How to prevent heavy conflicts in the future merge?

git,merge,branch,branching-and-merging,branching-strategy
I'm developing a project where I constantly want to make small improvements on master branch and push them to production. I have problem because I want to concurrently work on a branch that will be pushed only after a long time. If I will use different branches on long_project and...

Push git repository to remote subversion with history

git,svn,merge,git-svn
I'd like to push my existing git repository with its' complete history into a remote subversion repository via git-svn. Is this possible without losing the commit history? I already rebased my changes so, there is only a master branch up to date.