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/local/bin/python | |
# -*- coding: UTF-8 -*- | |
import urllib | |
def main(): | |
ss = 'http://www.google.com.tw/?q=亞伯拉罕' | |
quoted_str = urllib.quote_plus(ss) | |
print quoted_str | |
print urllib.unquote_plus(quoted_str) |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>PHP filter</title> | |
<style type="text/css"> | |
form { | |
margin: 0; | |
padding: 0px; |
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<iostream> | |
#include<vector> | |
#define ROWMAX 12 | |
int main() | |
{ | |
std::vector< std::vector<int> > array2d; | |
for ( int rowI = 0 ; rowI < ROWMAX; ++rowI ) | |
{ |
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
$ history yesterday | |
Time limit exceed | |
$ uname -r | |
A-Liar-SPEAK-unrealistic-dream-2.7.6-no-arch | |
$ explain | |
Are you a liar? | |
Are you a liar? | |
Are you a liar? | |
kernel panic |
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 "add.hpp" | |
long add(long x, long y) | |
{ | |
return x + y; | |
} |
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 NPP_EXE="C:\Program Files (x86)\Notepad++\notepad++.exe" | |
@if "%1"=="" goto noparam | |
@call %NPP_EXE% %1 | |
@goto safe_exit | |
REM Prompt no parameter and than leave. | |
:noparam | |
@echo "call_npp.bat: please at least give the file name." | |
@goto safe_exit |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
// compare the "UVAOJ example" and the standard BufferedReader approach. The "getchar()" like apporach better until the input | |
// data grows to 1GB size scale. This is because the "getchar()" may spent too much CPU time to create new String() object. | |
public class Main { | |
private static final BufferedReader stdin; | |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include <limits.h> | |
#include <time.h> | |
int main() | |
{ | |
int a = 11111 * 11111; |
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
#!/bin/sh | |
XINPUT=`which xinput` | |
PAD_ID=`${XINPUT} | grep "Touchpad" | awk -F"\t" '{print $2}' | awk -F"=" '{print $2}'` | |
${XINPUT} set-prop $PAD_ID "Device Enabled" 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
#my steps to record: | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get remove ibus | |
sudo apt-get install fcitx fcitx-table-boshiamy | |
im-config | |
sudo apt-get install screen | |
wget https://raw.githubusercontent.com/qlife/dot.files/master/dot.screenrc -O .screenrc | |
mkdir -p ~/bin |
OlderNewer