linux下文件的读写操作(openreadwrite)转http://www.2cto.com/os/201403/285837.htmlopen(打开文件)相关函数 read,write,fcntl,close,link,stat,umask,unlink,fopen表头文件 #include#...
分类:
系统相关 时间:
2014-07-22 00:35:33
阅读次数:
373
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace C_编辑基础{ //枚举的意义就是限定变量的取值范围 enum gender{Male,Female,...
分类:
其他好文 时间:
2014-07-22 00:32:36
阅读次数:
172
冒泡排序代码:
#include
#include
using namespace std;
template
void bubbleSort(ItemType theArray[], int n)
{
bool sorted = false; // False when swaps occur
int pass = 1;
while (!sorted && (pass...
分类:
其他好文 时间:
2014-07-22 00:32:35
阅读次数:
363
下图是asterisk的呼叫流程图:
我们以sip的呼叫过程为例来描述,其他channel的呼叫过程基本类似。
Astersik下注册的sip用户主动发起一个呼叫的函数调用过程(incoming)如下:
do_monitor->sipsock_read->handle_request->handle_request_invite->sip_new/ast_pbx_start->pbx_th...
分类:
其他好文 时间:
2014-07-22 00:27:37
阅读次数:
294
日期:2014年7月21日一、控制结构1、Go中,只有几个控制结构,它没有do或者while循环,有for,灵活的switch语句和if,在switch中可以接受像for那样可选的初始化语句,另外Go中还提供了类型选择和多路通信转接器的select。Go的控制结构的语法和C相比有所不同,它不需要圆括...
分类:
其他好文 时间:
2014-07-22 00:26:35
阅读次数:
248
从socket中读取数据可以使用如下的代码: while( (n = read(socketfd, buf, BUFSIZE) ) >0) if( write(STDOUT_FILENO, buf, n) = n) { printf(“write error”); exit(1); }当代码中的so...
分类:
其他好文 时间:
2014-07-22 00:26:33
阅读次数:
267
G. Count the ColorsTime Limit: 2000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainPainting some colored segments on a line, ...
分类:
其他好文 时间:
2014-07-22 00:23:34
阅读次数:
220
自定义类加载器是在是血的不怎明白这里只学会了一个简单的加密解密方法//定义一个加密方法public static void md(InputStream inputStream,OutputStream outputStream) throws Exception{int b = 0;while((...
分类:
其他好文 时间:
2014-07-22 00:21:33
阅读次数:
196
上一节最后讲到了建立一个extractor的方法,手工建立和机器学习等,这一节详细阐述手工建立pattern的方法。引用Jurafsky教授常说的话: let‘s look at the intuition. Jurafsky教授讲话总是微皱着眉头,感觉很较真...
分类:
其他好文 时间:
2014-07-21 13:30:48
阅读次数:
257
import Foundation
println("Hello, World!")
/*
for do While While Switch
*/
var arr = [1,2,3,4,5,7];
for i in arr{
println(" i is \(i)");
}
var count = arr.count;
for (var i = 0 ; i<count; ...
分类:
其他好文 时间:
2014-07-21 13:23:47
阅读次数:
190