Skip to content

Instantly share code, notes, and snippets.

View dubuqingfeng's full-sized avatar
🎯
Focusing

Zhengyan Gao dubuqingfeng

🎯
Focusing
View GitHub Profile
@dubuqingfeng
dubuqingfeng / java.bat
Created April 20, 2017 08:54
java设置环境变量
@echo off
:: TODO:设置java环境变量
:: Author: Gwt
color 02
::设置java的安装路径,可方便切换不同的版本
set input=
set /p "input=请输入java的jdk路径(或回车默认路径为C:\Program Files\Java\jdk1.7.0_71):"
if defined input (echo jdk已设置) else (set input=C:\Program Files\Java\jdk1.7.0_71)
echo jdk路径为%input%
@dubuqingfeng
dubuqingfeng / getChildLst
Created February 23, 2017 16:20
MySQL function
DELIMITER $$
CREATE DEFINER=`root`@`%` FUNCTION `getChildLst`(`rootId` VARCHAR(40)) RETURNS varchar(40) CHARSET utf8
NO SQL
COMMENT '查询子分类'
BEGIN
DECLARE sTemp VARCHAR(4000);
DECLARE sTempChd VARCHAR(4000);
SET sTemp='$';
SET sTempChd = rootId;
@dubuqingfeng
dubuqingfeng / processing
Created December 29, 2016 03:33
一分钟的朋友。。
import ddf.minim.*;
Minim minim;
AudioPlayer groove;
Boolean flag = false;
void setup() {
size(800, 300);
stroke(255);
char[] chenfan = {'\u9648', '\u5e06'};
@dubuqingfeng
dubuqingfeng / gotips.go
Created December 20, 2016 06:18
gotips.go
/*
gotips_test.go:
Golang速学速查速用代码手册
Source: github.com/coderzh/CodeTips/blob/master/gotips_test.go
Author: coderzh(github.com/coderzh)
Blog: http://blog.coderzh.com
参考:《Go语言编程》
*/
# -*- coding: utf-8 -*-
import csv
with open('input.csv') as f:
f_csv = csv.reader(f, dialect='excel')
for index, row in enumerate(f_csv):
with open('output.csv', 'a') as csvfile:
output = csv.writer(csvfile, dialect='excel')
output.writerow([index+1, row[6], row[1] + row[13], row[15]])
print row
@dubuqingfeng
dubuqingfeng / putty.reg
Created August 4, 2016 10:54
putty配色及字体
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"UseSystemColours"=dword:00000000
"TryPalette"=dword:00000000
"ANSIColour"=dword:00000001
"Xterm256Colour"=dword:00000001
"BoldAsColour"=dword:00000001
"Colour0"="211,215,207"
"Colour1"="238,238,236"
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent();
intent.setClass(MainActivity.this, MainActivity.class);
startActivity(intent);
}
# export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/Cellar/gettext/0.19.5.1/bin:/Developer/usr/bin:$PATH"
# mount the android file image
function mountAndroid() { hdiutil attach ~/androidbuild/android.dmg -mountpoint /Volumes/android; }
# unmount the android file image
function umountAndroid() { hdiutil detach /Volumes/android; }
function setjdk() {
if [ $# -ne 0 ]; then
@dubuqingfeng
dubuqingfeng / clone.sh
Created June 11, 2016 04:06
eleme马拉松脚本
git clone https://github.com/WhiteBlue/eleme_hackathon.git WhiteBlue
git clone https://github.com/nicoding/Hackathon.git nicoding
git clone https://github.com/ele828/eleme-hackathon.git ele828
git clone https://github.com/tcOops/hackathon-eleme.git tcOops
git clone https://github.com/garzon/eleme_hackathon.git garzon
git clone https://github.com/ManfredHu/hackathon-java.git ManfredHu
git clone https://github.com/chenqingzhu/BuyingWebServer.git chenqingzhu
git clone https://github.com/zyearn/eleme-hackathon.git zyearn
git clone https://github.com/liumx10/hackathon-go.git liumx10
git clone https://github.com/Declan94/eleme-hackathon.git Declan94