Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadJsFromUrl(url) { | |
| var ele = document.createElement("script"); | |
| ele.setAttribute("src", url); | |
| document.head.appendChild(ele); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
现在假设你添加了一个新文件a.txt,内容如下:
An a file
然后git add a.txt,git reset --hard,恢复到初始状态。
这时运行git fsck的结果如下:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Test::More; | |
| use Test::MockModule; | |
| use HTTP::Request; | |
| our $request_count = 0; | |
| my $mock_ua = Test::MockModule->new('LWP::UserAgent'); | |
| $mock_ua->mock('request', sub { | |
| $request_count++; | |
| HTTP::Response->new(200); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| noremap <silent><expr>n v:searchforward ? "n" : "N" | |
| noremap <silent><expr>N v:searchforward ? "N" : "n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT me.id, him.nickname, me.user_id, transaction_id, purchase_at FROM payment AS me INNER JOIN user AS him ON me.user_id = him.id WHERE him.nickname = 'tama'; |
NewerOlder