自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

bojimiya's home

bojimiya 个人的学习之路

  • 博客(26)
  • 收藏
  • 关注

转载 数据库范式

设计关系数据库时,遵从不同的规范要求,设计出合理的关系型数据库,这些不同的规范要求被称为不同的范式,各种范式呈递次规范,越高的范式数据库冗余越小。  目前关系数据库有六种范式:第一范式(1NF)、第二范式(2NF)、第三范式(3NF)、巴德斯科范式(BCNF)、第四范式(4NF)和第五范式(5NF,又称完美范式)。满足最低要求的范式是第一范式(1NF)。在第一范式的基础上进一步满足更多

2012-10-14 22:36:19 359

原创 计数排序

void jishu_sort( int *arr , int length , int *result){ int tmparr[1000]; int i; for( i = 0 ; i < 1000 ; i++ ) { tmparr[i] = 0 ; } for( i = 0 ; i < length ; i++ ) { tmparr[arr[i]]++; }

2012-10-07 14:28:43 274

原创 堆排序

void max_heap( int *arr , int index , int length ){ int largest = index ; int left = 2 * index + 1 ; int right = 2 * index + 2 ; int tmp_value ; if( left < length && arr[index] < arr[left] )

2012-10-02 23:11:15 259

原创 工作找不到,闲在家写个js的连连看,打发无聊时间,

//设置游戏的初始值 //横向数目 var frame_height = 16; //纵向数目 var frame_width = 16; //单元格宽度 var td_width = 30; //单元格高度 var td_height = 30; //图片 var pictures = ["1.gif" ,"2.gif" ,"3.gif" ,"4.gif" ,"5.gif"

2012-09-28 13:52:02 710

原创 面试的一道题

前几天去面试,求一道算法题,要求用php求一个数的质因数,一时紧张没写出来,哎,面试还是不能太紧张啊,心态问题,以至于在回来的公交车上就想出来了,下面是拿c完成的#include void get_zhisu(int s){ int i = 2; while( i < s ) { if( s % i == 0 ) { get_zhisu( s/i ); bre

2012-09-21 00:52:44 287

原创 linux c -- 环境变量和参数

#include #include #include int main (int argc , char *argv[]){ char *var,*value; if( argc == 1 || argc == 3 ) { fprintf(stderr , "usage:environ var [value]\n"); exit(1); } var = argv[1];

2012-07-28 10:28:34 725

原创 php 分页类

class MulPage{ //共多少个 private $total_num; //共多少页 private $total_page; //每页几个 private $pre_page_num; //当前页 private $current_page; //当前页最低 private $current_min; //当前页最高 private $current

2012-07-27 15:09:09 283

原创 linux c 基本输入输出函数库

#include #include int main(){ FILE *file; char *filepath; filepath = (char *) malloc( 50 * sizeof(char) ); printf("请输入选中的文件\n"); scanf("%s" , filepath); if( NULL == ( file = fopen(filepath ,

2012-07-27 10:55:34 528

原创 bash 基础

#!/bin/shhello="hello world"echo $helloecho "$hello"echo '$hello'echo \$helloexit 0双引号,把引号内的变量取值,输出单引号,则直接输出引号内的字符串\把$转义后输出,对于这段代码和单引号输出一样#!/bin/shIFS=''echo $1echo $2echo "$

2012-07-25 14:04:04 503

原创 c 静态库

創建一个函数文件 foo.c#include void foo(){ printf("i'm foo function");}再創建一个函数文件 bar.c#include void bar(){ printf(" i'm bar function .");}再建一个头文件 mylib.hvoid foo();void bar()

2012-07-21 00:41:51 400

原创 数据结构 快速排序

#include #include typedef struct { int e ; } qnode;typedef struct { int length ; qnode * qns ; } qlist;void qlist_init ( qlist * , int * , int);void qlist_print(qlist *);int part_sort(qlist * ,

2012-07-19 17:26:32 353

转载 php 正则修正符 /i, /is, /s, /isU 等

PHP正则表达式 /i, /is, /s, /isU等 都是些什么东西呢?i 匹配大小写s 模式中的圆点元字符(.)匹配所有的字符,包括换行符x 模式中的空白字符除了被转义的或在字符类中的以外完全被忽略,在未转义的字符类之外的 # 以及下一个换行符之间的所有字符,包括两 头,也都被忽略A (PCRE_ANCHORED) 如果设定了此修正符,模式被强制为“anchor

2012-07-19 14:37:42 872

原创 php 父子 数据结构 转成 多维数组

$arr = array ( array('id' => 1 , 'fid' => 0 , 'content' => 'dsadasdasdadasda'), array('id' => 2 , 'fid' => 1 , 'content' => 'dasdawqe31231'), array('id' => 3 , 'fid' => 1 , 'content' => 'dasda64564

2012-07-18 16:50:53 708

原创 php - 封装 - curl类

class CURL { private $ch; private $flag_if_have_run; public function __construct($url) { $this->ch = curl_init($url); curl_setopt($this->ch, CURLOPT_RETURNTRANSFER , 1 ); } public fun

2012-07-18 16:47:20 1810 1

原创 希尔插入排序

#include #include typedef struct { int v ; } base_insert_node ;typedef struct { base_insert_node * bins ; int len ; } base_insert_list;void init( base_insert_list * , int * , int );void print_ba

2012-07-17 14:20:10 355

原创 折半插入排序

#include #include typedef struct { int v ; } base_insert_node ;typedef struct { base_insert_node * bins ; int len ; } base_insert_list;void init( base_insert_list * , int * , int );void print_ba

2012-07-16 22:52:44 256

原创 基本插入法排序

#include typedef struct { int v ; } base_insert_node ;typedef struct { base_insert_node * bins ; int len ; } base_insert_list;void init( base_insert_list * , int * , int );void print_base_insert

2012-07-16 16:55:37 388

原创 哈希表

#include typedef char * element;typedef struct {element *e ; int max_size ; int now_size ;} hash_table;void init_hash_table (hash_table * , int );void insert_hash_table (hash_table * , element []

2012-07-11 13:41:37 278

原创 赫夫曼树

#include typedef struct huffman_node { int weight ; char value ; struct huffman_node *lchild , *rchild , *pchild ; } huffman_node , *huffman_tree;huffman_tree create_huffman_code ( char *, int *, in

2012-07-05 17:19:48 390

原创 二叉树

#include typedef int element;typedef struct c2node { struct c2node * lchild ; struct c2node * rchild ; element e ; } c2node , *c2tree; void init(c2tree * , element * , int e_len );void pre_list(

2012-07-02 14:18:07 258

原创 dz兑换商城,使其支持多次兑换,兑换限制,和勋章打折

dzx2上有个兑换商城插件,可惜不支持多次兑换,修改如下:invole.inc.php是控制任务流程的文件,在其中   if($operation == 'join') {   下添加//----------------------------限购限制和优惠政策-------------------------------------- $total_youhui = 0; $no_l

2012-06-28 11:14:30 1906

原创 数据结构矩阵

#include #include #define MAXSIZE 10000static const int MAX_DIM = 100;typedef int element;typedef struct {element *base; int dim; int *bounds;int *constants;} array;//矩阵typedef struct{ int i

2012-06-28 09:43:33 570

原创 数据结构数组

#include #include static const int MAX_DIM = 100;typedef int element;typedef struct {element *base; int dim; int *bounds;int *constants;} array;void init(array * , int , ...);void destory(arr

2012-06-28 09:36:14 408

原创 链式线性表

#include typedef struct element {int data ; struct element *next ;} linklist ;linklist * list_init(int);void list_insert_tail(linklist *, int );linklist *list_insert_head(linklist *, int);int li

2012-06-28 09:34:16 294

原创 顺序线性表

#include int const MAXSIZE = 100;typedef int element;typedef struct { element *es; int size; int max; } list;element list_get_index_value(list * , int );int main(){ //函数声明区 void list_init( lis

2012-06-28 09:32:00 226

原创

#include #include #define STACK_INIT_SIZE 100#define STACK_INCREMENT_SIZE 20typedef int element;typedef struct { element *base; element *top; int size; } stack;void init(stack *, int);element

2012-06-28 09:28:08 200

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除