merge

PHP - Merge two arrays (same-length) into one associative?

Hi, pretty straightforward question actually.. is it possible in PHP to combine two separate arrays of the same length to one associative array where the values of the first array are used as keys in the associative array? I could ofcourse do this, but I'm looking for another (built-in) function, or more efficient solution..? fun...

Three Way Merge Algorithms for Text

So I've been working on a wiki type site. What I'm trying to decide on is what the best algorithm for merging an article that is simultaneously being edited by two users. So far I'm considering using Wikipedia's method of merging the documents if two unrelated areas are edited, but throwing away the older change if two commits conflict...

Quickly adding a cover page to a pre-linearized PDF for streaming to browser?

Question 298829 describes how linearizing your PDFs lets them stream page-by-page into the user's browser, so the user doesn't have to wait for the whole document to download before starting to view it. We have been using such PDFs successfully, but now have a new wrinkle: We want to keep the page-by-page streaming, but we also want to i...

Server side svn branch reintegrate

I am developing a platform to automate and integrate feature branching steps in our environment. Now I know that the right procedure to reintegrate a branch is: svn merge URL/trunk (in branchworking copy to sync with trunk) svn update (in trunk working copy) svn merge --reintegrate URL/branch (in trunk working copy) The point on...

Should I checkout the full branch when performing only commits with Subversion?

I have a repository structure that looks like so: + tags + trunk + source + dotnet + flex + branches + milestone1 + dotnet + flex + milestone2 + dotnet + flex Typically, the .NET developers only checkout the 'dotnet' folders for the branch they are working in. Flex developers likewise chec...

Concatenating Dictionaries

I have three lists, the first is a list of names, the second is a list of dictionaries, and the third is a list of data. Each position in a list corresponds with the same positions in the other lists. List_1[0] has corresponding data in List_2[0] and List_3[0], etc. I would like to turn these three lists into a dictionary inside a dictio...

Using xxdiff to merge in linux?

Hi guys, I want to use xxdiff for my merging needs. I have just started using git, and I integrated xxdiff to work with it on (git mergetool). My problem is that I can't find any resource that teaches the basic of merging branches with xxdiff, so I get into this three file window with LOCAL BASE REMOTE, but I don't know where to start ...

[Ruby] How to merge sub-arrays within an array in Ruby?

Hello I have an array which for arguments sake looks something like this: a = [[1,100], [2,200], [3,300], [2,300]] Of those four sub-arrays, I would like to merge any where the first element is a duplicate. So in the example above I would like to merge the 2nd and the 4th sub-arrays. However, the caveat is that where the second eleme...

Git Cherry-pick vs Merge Workflow

Assuming I am the maintainer of a repo, and I want to pull in changes from a contributor, there are a few possible workflows: I cherry-pick each commit from the remote (in order). In this case git records the commit as unrelated to the remote branch. I merge the branch, pulling in all changes, and adding a new "conflict" commit (if nee...

How can I author changes that are not prone to merge conflicts?

Automated merging isn't perfect. Just because there isn't a line-edit conflict doesn't mean there isn't a syntactic conflict, and that doesn't mean there isn't a semantic conflict. Does anyone have strategies for authoring low-conflict changes? Is this something that falls out of TDD or other approaches (Certainly TDD will help catch th...

Getting the primary key value after a merge command?

Is there some way to get a value from the last inserted or updated row? I am using the merge command to do an insert or an update if the row exists. I know how to get the autogenerated key after an insert but can I get the primary key if I use the merge command? I'm using Java with JDBC and Oracle DB. ...

merging data bt tables in mysql

Hi. I have three tables with the following structure: tb1: id(AI, PK), uid, date, text tb2: id(AI, PK), uid, date, text ... and so on I have to keep them separate because of additional unqiue data that each table has. I'd like to execute a query that will merge and get me the last 20 entries (ie, date DESC) (specifically, i need uid a...

To remove a space break between in a PDF -file by a low level code

How can you remove the pagebreak between two pieces of text at the bottom of the pdf file without having the source of the original document? I use Ubuntu. -- Just for curiosity: I put the document with the pagebreak to my LaTeX -document. I converted it to PDF by pdflatex. Pdflatex ignores the second page completely. If somebody know...

Merging bug fixes into release branches - svn switch to branch or get a seperate working copy?

I'm relatively new to Subversion, hoping to get some insights from more experienced folks. We're taking an approach of doing the bulk of the development work (new features and bug fixes) on the trunk and merging bug fixes into release branches as needed. With this approach, developers won't be coding directly against release branches at ...

Sql Server 2008 MERGE - best way to get counts

I'm wondering what y'alls would recommend as the best way to go about getting the action counts from a MERGE statement in Sql Server. So, i.e. I run a MERGE which does some inserts, some updates and some deletes, ... I would like to be able to find out HOW MANY inserts, HOW MANY updates and How Many deletes. What'd be the best way to...

How to avoid SVN conflicts when merging branch back into trunk

Hi all, A few weeks ago I started making a change in my SVN repository's trunk that I thought was going to be fairly minor. After a few hours of work, realizing that the change had bigger implications than I thought, I decided it was too risky to check my changes into the trunk right away, so I made a branch, like this: svn copy . htt...

What is the easiest way to merge two flv videos?

Hi guys, what is the easiest way to merge two flv videos into one? Would be awesome if its possible without command-line-tools like ffmpeg. It would be great if someone knows a simple java solution =) (on the server side) ...

SVN error when trying to merge from a branch

I'm trying to merge changes from a branch to the trunk, for a single file and a single revision. I'm using VisualSVN as the front-end. So I right-click the file, Visual SVN -> Merge, then select ‘Merge a range of revisions’, then enter the revision number (from the log) and hit Next. Then I click ‘Test Merge’ What I get is the followi...

Is the Sql2008 MERGE syntax what I should be doing, here?

Hi folks, I've got a classic case of UPDATE or INSERTing some data into a table. I'm not sure if I should just do an UPDATE and if i get zero ROWCOUNT, then do an INSERT. Alternatively, I've heard rumours that the MERGE statement now replaces this, but I'm not sure how and if it's appropriate, in this situation. Here's some sample sql ...

Lua - merge tables?

I need to merge two tables, with the contents of the second overwriting contents in the first if a given item is in both. I looked but the standard libraries don't seem to offer this. Where can i get such a function? ...