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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
char input[100]; | |
char *chkChar = input; | |
fgets(input, sizeof(input), stdin); | |
for(; *chkChar!='\0'; chkChar++) |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <stdlib.h> | |
using namespace std; | |
vector<string> split(const string& src, string separate_character) | |
{ | |
vector<string> strs; | |
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
/* | |
* exam_2.c | |
* | |
* Created: 2012/11/16 下午 16:10:10 | |
* Author: Jason YiZhang Chen | |
*/ | |
#include <reg51.h> | |
//++++++++++++++++++++++++++++++中斷控制+++++++++++++++++++++++++++++++++// | |
#define __INT0_SWITCH__ 0 //INT0 中斷開關 0關 1開 |
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
/* | |
* exam_4.c | |
* | |
* Created: 2012/11/20 下午 01:55:10 | |
* Author: Jason YiZhang Chen | |
*/ | |
#include <reg51.h> | |
#define Data P0 |
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
#include <string> | |
#include <iostream> | |
#include <vector> | |
#include <sstream> | |
using namespace std; | |
class matrix { | |
private: | |
vector<vector<double>> matrix_double; | |
public: |
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
#!/bin/bash | |
# Show user's star sign by entering birth date. | |
# 2013/11/19 Jason YiZhang Chen | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
STAR_SIGN=(Capricorn Aquarius Pisces Aries Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius Capricorn) | |
STAR_SIGN_DATE=(001 019 020 049 050 079 080 109 110 140 141 172 173 203 204 234 235 265 266 296 297 326 327 355 356 365) |
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
#!/bin/bash | |
# Guess number~ | |
# 2013/11/20 Jason YiZhang Chen | |
ANSWER=1288 | |
LENGTH=$(expr length $ANSWER) | |
declare -i a | |
until [ "$a" == $LENGTH ]; do |
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
#!/usr/bin/perl -w | |
use HTML::TreeBuilder::XPath; | |
use WWW::Mechanize; | |
print "Please enter stock symbol: "; | |
chomp ($num = <STDIN>); | |
my $xpath = q{/html/body/div/div/div/div/div/div/table[@id='table2']/tr[3]/td[1]}; | |
my $url = "http://finance.yahoo.com/q?s=$num.TW"; |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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
# First commit | |
echo "hello" | git hash-object -w --stdin | |
git update-index --add --cacheinfo 100644 ce013625030ba8dba906f756967f9e9ca394464a hello.txt | |
git write-tree | |
git commit-tree aaa96c -m "First commit" | |
git update-ref refs/heads/master 30b060d9a7b5e93c158642b2b6f64b2b758da40d | |
# Second commit |
OlderNewer