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
Description | |
Assume there is a directory contains student records regarding to different courses. These files have “.rec” extension. Each file belongs to a course and has the following format: | |
COURSE NAME: <the name of the course> | |
CREDITS: <credits> | |
Student# <a list of numbers belong to different activities have been done in the course> | |
For example a course record file can be like this: | |
COURSE NAME: Operating Systems |
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
/* | |
v0.3 implement getFileName(), optimize output file. | |
v0.2 add multi file support | |
v0.1 first demo | |
*/ | |
#include <string.h> | |
#include <stdio.h> | |
void getFileName(const char *szFullName, char *szFileName); |
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> | |
unsigned char bcd2dec(unsigned char c); | |
unsigned char bcd2dec(unsigned char c) | |
{ | |
unsigned char dec; | |
dec = (c>>4) & 0x07; | |
dec = (dec<<3) + (dec<<1) + (c & 0x0F); |
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 <cstdio> | |
const int max = 65000; | |
const int lineLength = 12; | |
void fibonacci( int max ) | |
{ | |
if ( max < 2 ) | |
return; |
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> | |
#define NO_OF_PORTS 8 | |
#define TRUE 1 | |
#define FALSE 0 | |
static long pow(int x, int y) | |
{ | |
int ii; | |
long result = 1; |
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 <windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef unsigned char u_char; | |
typedef unsigned char uchar; | |
typedef unsigned long u_long; | |
typedef unsigned long ip_addr; | |
typedef unsigned short ushort; |
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
/* | |
* gif2c.c | |
* convert gif file to c file. | |
* support multi file one time. | |
* | |
* author: jason([email protected]) | |
* date: 2009.03.30 | |
* | |
*/ |
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 <windows.h> | |
#include <stdio.h> | |
BOOL DisplaySystemVersion() | |
{ | |
OSVERSIONINFOEX osvi; | |
BOOL bOsVersionInfoEx; | |
// Try calling GetVersionEx using the OSVERSIONINFOEX structure. | |
// |
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
//deskview.exe cosplay | |
//[2008-09-11 jason [email protected]] | |
#include <windows.h> | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pszCmdLine, int cmdShow) | |
{ | |
HWND hwnd = FindWindowEx(FindWindowEx(FindWindow("Progman", NULL), 0, "SHELLDLL_DefView", NULL), 0, "SysListView32", NULL); | |
int iStyle = GetWindowLong(hwnd, GWL_STYLE); |
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
/*++ | |
Module Name: | |
write_ver.c | |
Abstract: | |
Add version string in wrp file header for VSC7398. | |
A part of auto provision function implement. | |
Author: | |
jason ([email protected]) Dec-01-2009 |
OlderNewer