- 博客(18)
- 收藏
- 关注
原创 transmission-daemon奇怪的问题
最近一直在折腾transmission-daemon的web访问的问题。原因是访问的时候出现 403: ForbiddenUnauthorized IP Address.Either disable the IP address whitelist or add your address to it.If you're editing settings.json, ...
2012-08-12 12:25:07
5336
2
原创 linxu学习笔记
查看当前目录pwd 端口号与相应服务的对应关系存放在/etc/services文件中 查看硬盘状况(smartctl)http://blog.chinaunix.net/space.php?uid=17135777&do=blog&id=25842 自动挂载配置文件/etc/fstab 查看uuidls -l /dev/dis...
2012-08-05 23:08:43
102
原创 排序——堆排序
static void max_heapify(int * arr, unsigned int beginPos, unsigned int length){ unsigned int largest = 0; unsigned int left = 0; unsigned int right = 0; unsigned int tempPos = 0; int te...
2012-04-08 17:49:51
80
原创 排序——插入排序(可通用)
今天学堆排序了,好长,没学完,所以充数一下,把第一天写的插入排序,写了一个通用版本,这个版本抽象成排序类型、类型大小比较、移动类型三种操作。从而理论上可以对任何数组进行排序(我考虑可以对结构体、字符串等,需要抽象成指针),权当练习吧。typedef int (*COMPARE_KEYS)(const SORT_TYPE key1, const SORT_TYPE key2);type...
2012-03-28 22:45:27
144
原创 排序——冒泡
今天是我最熟悉的冒泡法。。int bubble_sort(int * arr, unsigned int arrLength){ unsigned int iLoop = 0; unsigned int jLoop = 0; int tempChange = 0; if(arr == NULL) { return -1; } for(iLoop =...
2012-03-27 23:11:15
90
原创 排序——分治法排序(合并)
没想到第二个就是个费劲的,最怕递归,加油! #include "sorts.h"#include <malloc.h>#include <stdlib.h>#include <memory.h>static void merge(int * arr, unsigned int p, unsigned int q, unsigned r...
2012-03-26 23:21:24
152
原创 排序——插入排序
/* insertion-sort */int insertion_sort(int* arr, unsigned int arrCount){ unsigned int iLoop = 0; unsigned int jLoop = 0; int numInsert = 0; if(arr == NULL) { return -1; } for(...
2012-03-25 21:24:39
97
原创 靠,白痴
从今天开始,每天学一种算法并实现。先试一个星期。今天好郁闷。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。今天先实现之前一直没实现的简单问题,堆栈和循环队列。...
2012-03-24 20:58:21
99
原创 循环队列实现(链表,数组)
#include <stdlib.h>#include <memory.h>#include "queue.h"#ifdef __cplusplusextern "C"{#endif#ifdef QUEUE_LINKtypedef struct queue{ int num; struct queue *next;}QUEU...
2012-03-24 20:49:12
551
原创 堆栈实现
#include <stdio.h>#include <stdlib.h>#include <memory.h>#include "stack.h"#ifdef __cplusplus extern "C" { #endif #ifdef STACK_LINKtypedef struct stack{ int num;...
2012-03-24 20:47:48
121
原创 Windows server 2008 暂时提升权限
runas /user:(username) *.exe 设置自动输入密码control userpasswords2
2012-03-03 22:25:26
333
原创 在vs中加入c语言文件的方法
环境vs20101.将c语言加入工程中,右键该文件,选择属性-预编译头-不使用预编译头,否个会提示fatal error C1853: “filename”预编译头文件来自编译器的早期版本,或者预编译头为 C++ 而在 C 中使用它(或相反)参考:http://support.microsoft.com/kb/126717/en-us?fr=12.在extern要调用的函数的位置,加入...
2011-07-14 11:12:34
831
Hello World
想找个地方能够记录自己编程中遇到的问题和解决的方法,分享,备忘。就来个传说中最具魔法的Hello World程序。#include <iostream>int main(){ std::cout<<"Hello World!"<<std::endl; return 0;} ...
2011-07-01 14:19:56
87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人