history

Show number of changed lines per author in git

非 Y 不嫁゛ 提交于 2019-11-28 17:30:34
i want to see the number of removed/added line, grouped by author for a given branch in git history. there is git shortlog -s which shows me the number of commits per author. is there anything similar to get an overall diffstat? It's an old post but if someone is still looking for it: install git extras brew install git-extras then git summary --line https://github.com/tj/git-extras VonC Since the SO question "How to count total lines changed by a specific author in a Git repository?" is not completely satisfactory, commandlinefu has alternatives (albeit not per branch): git ls-files | while

What is classpath hell and is/was it really a problem for Java?

怎甘沉沦 提交于 2019-11-28 17:04:51
What is classpath hell and is/was it really a problem for Java? Classpath hell is an unfortunate consequence of dynamic linking of the kind carried out by Java. Your program is not a fixed entity but rather the exact set of classes loaded by a JVM in a particular instance. It is very possible to be in situations where the same command line on different platforms or even on the same one would result in completely different results because of the resolution rules. There could be differences in standard libraries (very common). Libraries could be hidden by one another (an an older version may

pushState: what exactly is the state object for?

一个人想着一个人 提交于 2019-11-28 16:29:50
I've read a dozen of times now that the state object could exists of multiple key|value pairs and that it is associated with the new history entry. But could someone please give me an example of the benefits of the state object? Whats the practical use of it? I can't imagine why not just typing in {} janfoeh Take this small example: run fiddle ( editor view ): You have a page where a user can select a color. Every time they do, we generate a new history entry: function doPushState(color) { var state = {}, title = "Page title", path = "/" + color; history.pushState(state, title, path); }; We

How does one store history of edits effectively?

情到浓时终转凉″ 提交于 2019-11-28 16:27:35
问题 I was just wondering for sites like stackoverflow and wikipedia, they stores history of edits indefinitely and allows user to roll back the edits. Can someone recommend any resources/books/articles regarding how to do this using any suitable technology (such as databases etc) Thanks a lot! 回答1: There are a number of options; the simplest, of course, being to simply record all versions independently. For a site like Stack Overflow, where posts aren't usually edited very many times, this is

Are design patterns really language weaknesses?

半腔热情 提交于 2019-11-28 15:59:24
Should today's patterns be seen as defects or missing features in Java and C++ ? Subroutine was a design pattern for machine language in the 50s and 60s. Object-Oriented Class was a design pattern for C in the 70s. Visitors, Abstract Factories, Decorators, and Façades are design patterns for Java and C++ today. What will tomorrow's languages look like? What patterns will they have? Juliet Some canonized design patterns -- Adapter, Factory, Command, Visitor, etc -- are approximations of features which are baked into other languages. Off the top of my head: Event-handlers in C# are baked-in

React Router API

依然范特西╮ 提交于 2019-11-28 15:46:55
目录 API BrowserRouter basename: string getUserConfirmation: func forceRefresh: bool keyLength: number children: node HashRouter basename: string | getUserConfirmation: func | children: node hashType: string Link to:string | object | function replace:bool innerRef: function | RefObject others NavLink activeClassName:string activeStyle:object exact:bool strict:bool isActive:func location:object aria-current:string Prompt message:string | func when: bool MemoryRouter initialEntries: array initialIndex: number getUserConfirmation: func | keyLength: number | children: node Redirect to:string |

What happened to Dojo in 2008?

大城市里の小女人 提交于 2019-11-28 14:51:06
问题 Many of you have seen this graph of Google Trends of popular AJAX frameworks (Dojo, jQuery, YUI). The graph seems to make it clear that interest in Dojo collapsed in the second quarter of 2008, falling by 80%; jQuery picked up the slack and ultimately grew to more than triple the size of Dojo. Why? What happened in Q2 2008 that demolished interest in Dojo? (Note that I'm not really interested in a comparison of Dojo vs. jQuery; even if you can explain why one is better than the other, it's

popstate returns event.state is undefined

二次信任 提交于 2019-11-28 11:53:33
I am learning about history in HTML5, in this example (open the JavaScript browser console to see error) the event.state.url returns: Uncaught TypeError: Cannot read property 'url' of undefined Look and help: http://jsfiddle.net/un4Xk/ event is the jQuery event object, not the DOM one. To access the DOM event object, use event.originalEvent : http://jsfiddle.net/pimvdb/un4Xk/1/ . var state = event.originalEvent.state; Remember that the state is only defined when the new state has data, so it is not available when clicking and then going back to the initial state: initial state link to state 1

What was the Historical Precursor for .NET Attributes?

扶醉桌前 提交于 2019-11-28 11:30:21
What languages or platforms influenced the .NET 1.0 Team to build-in the concept of Attributes from the very start? Was this an Aspect-Oriented thing? Serialization? or something else? I was still in VB6-land at this time, and never used any of the pre-1.0 .NET versions. Believe it or not experiences/feedback from VB and Microsoft Transaction Server/COM+ dev teams had a bit part in some of the design rational of .NET, attributes and metadata. VB6 added support for attributes/metadata that COM+/MTS could read and determine how an object should behave. Remember all those settings on your classes

error combining git repositories into subdirs

早过忘川 提交于 2019-11-28 11:24:02
I have looked at several threads addressing this. Combining multiple git repositories Combining multiple git repositories having a space in their name I also looked at the git filter-branch manpage. update I have changed to a 2 script system: #!/bin/bash git filter-branch --index-filter '~/doit.sh' HEAD and doit.sh #!/bin/bash git ls-files -s | \ sed "s-\t-&data/perl_modules/-" | \ GIT_INDEX_FILE="$GIT_INDEX_FILE.new" git update-index --index-info && \ mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE" This avoids the previous error, but now gets this (replaced path with [...]): Rewrite