View original.py
This file contains 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
note = '''Note: You can use 'plus','minus','times','divide' and | |
'power' to calculate. Enter 'c' to clean and enter 'q' | |
to quit.''' | |
#note_1="Note: You can use 'plus','minus','times','divide' and " | |
#note_2="'power' to calculate. Enter 'c' to clean and enter 'q' " | |
#note_3="to quit." | |
#note=note_1+note_2+note_3 | |
note_4="Enter a algorithm(+ - * / ^):" | |
note_5='Enter a algorithm:' |
View big-seq-read-bs256k.fio
This file contains 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
root@ip-172-31-40-223:~/benchmark# cat big-seq-read.fio | |
[global] | |
nrfiles=1 | |
ioengine=libaio | |
bs=256K | |
size=2G | |
runtime=10s | |
time_based | |
group_reporting | |
new_group |
View shop.js
This file contains 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 newShop = new Shop.model({ | |
"name": body.name, | |
"type": body.shop_type, | |
"context": body.context | |
}); | |
newShop.save() | |
.then(function(shop){ | |
return this.body = {retcode:0}; | |
}) |
View shop_controller.js
This file contains 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
newShop.save() | |
.then(function(){ | |
return this.body = {retcode:0} | |
}) | |
.catch(function(err){ | |
console.log("catch: " + err); | |
/* | |
if(err) { | |
return this.body = {retcode: 1, message: err.errors}; | |
} else { |
View shop_controller.js
This file contains 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
exports.create = function*(){ | |
var body = this.request.body, | |
name = body.name, | |
type = body.shop_type, | |
context = body.context; | |
/* | |
this.checkBody("name").notEmpty("请输入商户名称"); | |
this.checkBody("shop_type").notEmpty("请输入原料名"); |
View gist:4e77e39f96a0ef1d2620
This file contains 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
diff --git a/lib/auto_migrations_rails4.rb b/lib/auto_migrations_rails4.rb | |
index 5195142..35fecf8 100644 | |
--- a/lib/auto_migrations_rails4.rb | |
+++ b/lib/auto_migrations_rails4.rb | |
@@ -1,5 +1,6 @@ | |
# load rake | |
-Dir[File.join(File.dirname(__FILE__),'tasks/**/*.rake')].each { |f| load f } if defined?(Rake) | |
+require 'rake' | |
+Dir[File.join(File.dirname(__FILE__),'tasks/**/*.rake')].each { |f| import f } if defined?(Rake) | |
View gist:11134464
This file contains 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
D/AUTH ( 7294): onResume is_authing: 0 | |
D/AUTH ( 7294): onResume after ApiTask execute | |
D/WIFI_ADMIN( 7294): now ssid=H3C-test, netId=19 | |
D/WIFI_ADMIN( 7294): ssid=#H3C-test#, SSID=#H3C-test#, equal? true | |
D/WIFI_ADMIN( 7294): open wifi | |
D/WIFI_ADMIN( 7294): sleep... | |
D/WIFI_ADMIN( 7294): wifi state 3 | |
D/WIFI_ADMIN( 7294): create wifi config ssid=H3C-test | |
D/WIFI_ADMIN( 7294): create config : ssid=H3C-test, pass=,type=1 | |
D/WIFI_ADMIN( 7294): exist config, remove first |
View gist:11133733
This file contains 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
D/AUTH (32521): onResume is_authing: 0 | |
D/AUTH (32521): onResume after ApiTask execute | |
D/WIFI_ADMIN(32521): now ssid=H3C-test, netId=18 | |
D/WIFI_ADMIN(32521): ssid=#H3C-test#, SSID=#H3C-test#, equal? true | |
D/WIFI_ADMIN(32521): open wifi | |
D/WIFI_ADMIN(32521): sleep... | |
D/WIFI_ADMIN(32521): wifi state 3 | |
D/WIFI_ADMIN(32521): create wifi config ssid=H3C-test | |
D/WIFI_ADMIN(32521): create config : ssid=H3C-test, pass=,type=1 | |
D/WIFI_ADMIN(32521): exist config, remove first |
View DeviceActivity.java
This file contains 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
package com.ore; | |
import android.app.ActionBar; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.graphics.Typeface; |
View gist:6127873
This file contains 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
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done |
NewerOlder