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
" 设置显示行号 | |
set number | |
" 开启语法高亮功能 | |
syntax enable | |
" 允许用指定语法高亮配色方案替换默认方案 | |
syntax on | |
" 自适应不同语言的智能缩进 | |
filetype indent on | |
" 将制表符扩展为空格 |
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
#include <stdio.h> | |
typedef unsigned char* byte_ptr; | |
void show_bytes(byte_ptr start, int len){ | |
for(int i = 0; i < len; i++) | |
printf("\t%.2x", start[i]); | |
printf("\n"); | |
} | |
int main(){ |
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
set -g prefix ^a | |
unbind ^b | |
bind a send-prefix | |
unbind '"' | |
bind - splitw -v -c "#{pane_current_path}"# 分割成上下两个窗口 | |
unbind % | |
bind = splitw -h -c "#{pane_current_path}"# 分割成左右两个窗口 | |
bind c new-window -c "#{pane_current_path}" |
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
WebView webView = new WebView(this); | |
webView.getSettings().setJavaScriptEnabled(true); | |
//this.setScrollBarStyle(SCROLLBARS_OUTSIDE_OVERLAY); | |
webView.loadUrl("http://www.google.com"); | |
//webView.loadUrl("file:///android_asset/XX.html"); |
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
private void checkInput() { | |
input = (EditText) findViewById(R.id.passpwd); | |
input2 = (EditText) findViewById(R.id.passpwd2); | |
submit = (Button) findViewById(R.id.submit); | |
imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); | |
// imm.showSoftInput(null, 0); | |
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
String url = "URL"; | |
Intent i = new Intent(Intent.ACTION_VIEW); | |
i.setData(Uri.parse(url)); | |
startActivity(i); |
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
AlertDialog.Builder info = new AlertDialog.Builder(this); | |
info.setTitle(getResources().getString(R.string.about_matters_txt).toString()); | |
info.setMessage(getResources().getString(R.string.about_matters_txt_cont).toString()); | |
info.setNegativeButton("隱藏", null); | |
AlertDialog showedInfo = info.show(); | |
//DisplayMetrics metrics = getResources().getDisplayMetrics(); | |
//showedInfo.getWindow().setGravity(Gravity.CENTER); | |
//showedInfo.getWindow().setLayout(LayoutParams.FILL_PARENT, | |
//(int) (metrics.heightPixels * 0.7)); |
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
git rm -r --cached . | |
git add . | |
git commit -m "fixed untracked files" |
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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
""" | |
Walking the destination directory(arg3) and using the command(arg2) | |
to process every file. | |
USAGE: | |
Mapwalk `function` /path/to/walk | |
""" | |
import sys |