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
all: p1 p2 | |
p1: p1.cpp | |
g++ -o p1 p1.cpp | |
p2: p2.cpp | |
g++ -o p2 p2.cpp | |
clean: | |
rm -f p1 p2 |
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
" filetypes | |
filetype plugin on | |
filetype indent on | |
" ~/.vimrc ends here | |
set laststatus=2 | |
set statusline=%4*%<\ %1*[%F] | |
set statusline+=%4*\ %5*[%{&fileencoding}, " encoding | |
set statusline+=%{&fileformat}%{\"\".((exists(\"+bomb\")\ &&\ &bomb)?\",BOM\":\"\").\"\"}]%m | |
set statusline+=%4*%=\ %6*%y%4*\ %3*%l%4*,\ %3*%c%4*\ \<\ %2*%P%4*\ \> |
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
This is a very coarse chatroom written by php. I made it in a speech just for chatting with 2 friends. | |
WARNING: This one is very dangerous, which would be attacked by command injecttion, please BE CAREFUL using it. |
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 <cstdio> // printf | |
#include <cstdlib> // NULL | |
#include <algorithm> // fill | |
#include <vector> | |
#include <queue> | |
using namespace std; | |
//use constant instead of macro | |
const int MAXV = 1000; // maximum value of vertex |
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
void gotoxy(int x, int y){ | |
HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE ); | |
COORD coord={x, y}; | |
SetConsoleCursorPosition(hConsole, coord); | |
} | |
void setcolor(const char *fore, const char *back){ | |
WORD type=0; | |
while(*fore!='\0'){ | |
switch(*fore){ |
NewerOlder