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
#define BUTTON0 0x2B940BF | |
#define BUTTON1 0x2B9C03F | |
#define BUTTON2 0x2B958A7 | |
#define BUTTON3 0x2B920DF | |
#define BUTTON4 0x2B9A05F | |
#define BUTTON5 0x2B9609F | |
#define BUTTON6 0x2B97887 | |
#define BUTTON7 0x2B9E01F | |
#define BUTTON8 0x2B910EF | |
#define BUTTON9 0x2B9906F |
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
/* -------------------------------- | |
* NTUST 學生資訊系統 平均 GPA 計算 | |
* | |
* 作者:Eric Ping | |
* 更新:Jeremy Yen | |
* | |
* Change Log | |
* - 修正「二次退選」所造成之問題 | |
* - 增加 B99 百分制成績支援 | |
* - 使用正規表達式判斷中文與數字 |
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/python | |
# -*- coding: utf8 -*- | |
# Simple RSA Implementation | |
# Authored by Jeremy <jeremy5189(at)gmail.com> | |
# Reference: http://www.ruanyifeng.com/blog/2013/07/rsa_algorithm_part_two.html | |
from fractions import gcd | |
import sys |
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
#define BUTTON0 0x910 | |
#define BUTTON1 0x10 | |
#define BUTTON2 0x810 | |
#define BUTTON3 0x410 | |
#define BUTTON4 0xC10 | |
#define BUTTON5 0x210 | |
#define BUTTON6 0xA10 | |
#define BUTTON7 0x610 | |
#define BUTTON8 0xE10 | |
#define BUTTON9 0x110 |
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
int isPrime( int n ) { | |
if( n <= 2 ) | |
return true; | |
else if( n % 2 == 0 ) | |
return false; | |
else { | |
int i, sn = (int)sqrt((double)n) + 1; |
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
/* | |
* ===================================================== | |
* | |
* Filename: prime.c | |
* | |
* Version: 1.0 | |
* Created: 2014/03/06 13時47分52秒 | |
* Revision: none | |
* Compiler: gcc | |
* |
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
#!/usb/bin/python | |
import sys | |
if len(sys.argv) < 5: | |
hex_uid = sys.argv[1] | |
hex_uid = hex_uid[6:8] + hex_uid[4:6] + hex_uid[2:4] + hex_uid[:2] | |
else: | |
hex_uid = sys.argv[4] + sys.argv[3] + sys.argv[2] + sys.argv[1] | |
print int(hex_uid, 16); |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: base64.c | |
* | |
* Description: Perform Base64 String Encode & Decode | |
* | |
* Version: 1.0 | |
* Created: 2014/04/12 19時08分52秒 | |
* Revision: none |
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> | |
#include <algorithm> | |
using namespace std; | |
void print_array( vector<int> list ) { | |
vector<int>::iterator it; | |
do { |
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
/* MD5 | |
converted to C++ class by Frank Thilo ([email protected]) | |
for bzflag (http://www.bzflag.org) | |
based on: | |
md5.h and md5.c | |
reference implemantion of RFC 1321 | |
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |