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
from Tkinter import * | |
from tkMessageBox import * | |
from FileDialog import * | |
import os | |
root=Tk() | |
root.title('Reviewer') | |
root.geometry('900x600') | |
#this is a function to get file list |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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> | |
int main(int argc, char *argv[]) | |
{ | |
union | |
{ | |
short s; | |
char c[sizeof(short)]; | |
}un; | |
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 | |
# write to count the sourcefile | |
w=0 | |
par=$3 | |
origin=2 | |
echo "${par:=$origin}" | |
for s in $(find $1 -maxdepth ${par:=$origin} -type f -name "*.$2") |
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> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <dirent.h> /*some functions option on dir*/ | |
#include <sys/stat.h> | |
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> | |
#include <string.h> | |
#define NLEN 5 | |
#define NVAL 5 | |
typedef struct Nameval Nameval; | |
typedef void(*func)(Nameval *, void *); | |
struct Nameval |
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
//easy way | |
void quicksort(int v[], int n) | |
{ | |
int i, last; | |
if(n <= 1) | |
return; | |
swap(v,0, rand()%n); | |
last = 0; |
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
e.g. man -t bash | ps2pdf - bash.pdf | |
But sometimes ps2pdf may encounter an error, the reson is that '-' is not a filename, that's so weird. And i use the following | |
command to fix this error | |
e.g. man -t bash > temp | |
ps2pdf temp bash.pdf | |
It's temperaly way to solve this problem. |
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/awk | |
# input: a:=10 | |
# output: the value is 10 | |
BEGIN{ PrintRes() } | |
function parse() { | |
if(tok == "(eof)") return "(eof)" | |
while(length(line) == 0) | |
if(getline line == 0) |
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> | |
#include<string.h> | |
#define DEFLINES 10 | |
#define MAXLEN 100 | |
int getlines(char *s, int len){ | |
int c, i; |
OlderNewer