现在假设你添加了一个新文件a.txt
,内容如下:
An a file
然后git add a.txt
,git reset --hard
,恢复到初始状态。
这时运行git fsck
的结果如下:
现在假设你添加了一个新文件a.txt
,内容如下:
An a file
然后git add a.txt
,git reset --hard
,恢复到初始状态。
这时运行git fsck
的结果如下:
fn is_same_tree(p: &Tree<int>, q: &Tree<int>) -> bool { | |
match (*p, *q) { // error: cannot move out of dereference of `&`-pointer | |
(None, None) => true, | |
(Some(ref a), Some(ref b)) => { | |
if a.val == b.val | |
&& is_same_tree(&a.left, &b.left) | |
&& is_same_tree(&a.right, &b.right){ | |
true | |
} else { | |
false |
<!-- http://stackoverflow.com/questions/6442364/running-script-upon-login-mac/13372744#13372744 --> | |
<!-- Place me at ~/Library/LaunchAgents/com.user.loginscript.plist --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.user.loginscript</string> | |
<key>Program</key> | |
<string>/path/to/executable/script.sh</string> |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" | |
}; | |
}); | |
//factory style, more involved but more sophisticated |
function loadJsFromUrl(url) { | |
var ele = document.createElement("script"); | |
ele.setAttribute("src", url); | |
document.head.appendChild(ele); | |
} |
FROM maven:3.5-jdk-8 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# add settings.xml into project directory | |
COPY settings.xml "$MAVEN_CONFIG" | |
ADD . build | |
RUN cd build && mvn install -DskipTests |