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
# ~/.gdbinit | |
# show the 4 instructions include the next instruction to be executed. | |
display/4i $pc | |
# show the current EFLAGS. | |
display/t $ps | |
display/16wx $ebp - 0x20 | |
display/16wx $esp | |
display/x $edi | |
display/x $esi |
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 python2 | |
from binascii import hexlify,unhexlify | |
code1 = """ | |
import os | |
print str(os.listdir('.')) | |
""" |
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
Function Arguments: RDI, RSI, RDX, RCX, R8, R9 |
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
0x00007ffff780ccae in __libc_start_main () from /lib64/libc.so.6 | |
10: /x $eax = 0xf7b7ef60 | |
9: /x $ecx = 0x0 | |
8: /x $edx = 0xffffe658 | |
7: /x $ebx = 0x400e90 # <- main address | |
6: /x $esi = 0xffffe648 | |
5: /x $edi = 0x1 | |
2: /t $ps = 1000000110 | |
1: x/4i $pc | |
=> 0x7ffff780ccae <__libc_start_main+142>: callq *%rbx # call 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
char b[10]; | |
void fizzbuzz(int x){for(int i=1;i<=x;i++){sprintf(b,"%d",i),printf("%s\n",i%15?i%3?i%5?b:"buzz":"fizz":"fizzbuzz");}} | |
void main(int c,char **v) {fizzbuzz(atoi(v[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
// AOJ0011 ACed | |
#include <algorithm> | |
#include <cstdio> | |
#include <cmath> | |
#include <iostream> | |
#include <string> | |
using namespace std; |
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 <cmath> | |
#include <cstdio> | |
#include <iostream> | |
#include <iomanip> | |
#include <stack> | |
#include <list> | |
#include <vector> | |
using namespace std; |
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
; put tribonacci numbers out with the tail recursion algorithm | |
(define (tribonacci n) | |
(tribo-tail n 0 0 1)) | |
(define (tribo-tail n a b c) | |
(cond | |
((= n 0) or (= n 1) 0) | |
((= n 2) c) | |
(else |
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
; Calc a distance of a thrown object | |
(define pi (* 4 (atan 1.0))) ; pi = 4atan(-1) | |
(define gravaccr 9.8) ; gravitial accelaration | |
(define CalcDistance | |
(lambda (v0 deg) | |
(define DegreeToRadian | |
(lambda (degree) | |
(/ (* degree pi) 180))) | |
(define CalcDistanceX |
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 <cmath> | |
#include <iostream> | |
#include <iomanip> | |
#include <stack> | |
#include <list> | |
#include <vector> | |
int main(void) { | |
std::list<int> input; | |
std::vector<int> pnums; |