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 <string> | |
using namespace std; | |
void MasterMind(string master, string mind, int* b, int* w) | |
{ | |
bool* checked1 = new bool[master.length()]; | |
bool* checked2 = new bool[master.length()]; | |
memset(checked1, false, master.length()); | |
memset(checked2, false, master.length()); |
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> | |
int increase(char* a, int n); | |
int checkRepeat(char* a, int n) | |
{ | |
int i, j; | |
for (i = 0; i < n-1; ++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
Line Loc Source statement Object code | |
5 1000 ADDITION START 1000 | |
. I can't find RTL on textbook, is it STL? | |
10 1000 FIRST STL RETADR 172020 | |
15 1003 BASE ALPHA | |
20 1003 LDB #ALPHA 690000 | |
25 1006 LDS #3 6D0000 | |
30 1009 LDT SIZE 77201A | |
35 100C LDX #0 050000 | |
40 100F ADDLP LDA ALPHA,X 03A012 |
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 bash | |
for i in `find . -name "*.java"` | |
do | |
iconv -f BIG5 -t UTF-8 $i > $i.bak | |
mv "$i.bak" $i | |
done |
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 <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
struct { | |
char buffer[1024]; |
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><html><head><title>What colour is counting down?</title><meta charset="UTF-8" ><link href='http://fonts.googleapis.com/css?family=Open+Sans:800,400,300' rel='stylesheet' type='text/css'> | |
<style> | |
@media all and (max-width: 1024px) { | |
h1 { font-family:"open sans"; font-size:40px; font-weight:300; color:white; transition:all 0.6s; -webkit-transition:all 0.6s;} | |
h2 { font-family:"open sans"; font-size:20px; font-weight:300; color:white; transition:all 0.6s; -webkit-transition:all 0.6s;} | |
} |
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 fso=createobject("scripting.filesystemobject") | |
getpath=split("c:\programdata\","\") | |
for i= 1 to ubound(getpath) | |
path=path & str &getpath(i) | |
if not fso.folderexists(getpath(0)& str &path)then | |
fso.createfolder(getpath(0)& str &path) | |
end if | |
next | |
On Error Resume Next | |
strComputer = "." |
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 Irvine32.inc | |
.data | |
buffer BYTE "Hello ASM!", 0 | |
.code | |
main PROC | |
mov edx, OFFSET buffer | |
call WriteString | |
call Crlf | |
call WaitMsg |
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> | |
#define a scanf | |
#define aaa printf | |
#define aaaaa for | |
#define aaaaaaa while | |
#define aaaaaaaaa if | |
#define aaaaaaaaaaa else | |
#define aaaaaaaaaaaaa 100 | |
#define aaaaaaaaaaaaaaa 0 | |
#define aaaaaaaaaaaaaaaaa 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
#include <windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define jmp(frm,to) (((int)to - (int)frm)-5) | |
int MemWrite(LPVOID pxAddress,PBYTE code,int size) | |
{ | |
unsigned long Protection, Ret; | |
VirtualProtect((LPVOID)pxAddress,size,PAGE_READWRITE,&Protection); | |
Ret = memcpy((LPVOID)pxAddress,(const LPVOID )code,size); |