一.malloc函数(memory allocation) 中文名:动态内存分配 原型:extern void *malloc(unsigned int num_bytes);说明:分配长度为num_bytes字节的内存块,分配成功,则返回指向该内存块的指针。否则指向NULL空指针,使用free()...
分类:
其他好文 时间:
2015-10-02 21:12:22
阅读次数:
216
#import "MyLayer.h"@implementation MyLayer- (void)drawInContext:(CGContextRef)ctx{ // 设置填充色 CGContextSetRGBFillColor(ctx, 1, 0, 0, 1); // 椭圆 ...
分类:
其他好文 时间:
2015-10-02 19:50:41
阅读次数:
158
void的字面值是“无类型”,void*则是"无类型指针"。void*可以指向任何类型的数据。void几乎只有"注释"和限制程序的作用,因为从来没有人会定义一个void变量。void a; //编译时提示"illegaluseoftype'void'"void真正发挥的作用在于:对函数返回的限...
分类:
其他好文 时间:
2015-10-02 18:43:39
阅读次数:
198
禁用关闭按钮需使用窗体的WndProc处理方法,这个方法是用来截获单击关闭窗体信息的。这个要通过重写WndProc的虚方法来实现。 重写WndProc protected override void WndProc(ref Message m) { co...
static用法 static-静态变量 如下代码,使用了静态变量和全局变量 #include?<stdio.h>
#include?<stdlib.h>
float?weight?=?1.2;?//全局变量
static?float?high?=?1.2;//静态变量
void?showCookTim...
分类:
其他好文 时间:
2015-10-02 17:31:18
阅读次数:
208
(1)Respose对象 利用Response对象输出文字信息:protected void Page_Load(object sender, EventArgs e){ string message = "您好,欢迎光临本网站!"; Response.Write(message);} ...
分类:
Web程序 时间:
2015-10-02 13:44:39
阅读次数:
217
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace jiajianchengchu{ class Program { static void ...
分类:
其他好文 时间:
2015-10-02 12:36:55
阅读次数:
133
应用场景:IIS网站挂掉,系统自动重启IIS,通知相关联系人;主要代码:监控类public class monitoringiis { EmailSend send = new EmailSend(); public void MonitoringISSAppPoo...
今天看了看spring对于视图解析的源码,发现还不是那些思想,internalResourceView里的一个渲染方法protected void exposeModelAsRequestAttributes(Map model, HttpServletRequest request) throws...
分类:
编程语言 时间:
2015-10-02 11:22:58
阅读次数:
190
本文基于Nett4.0.26.Final版本浅析Client与Server端通讯,先看服务器端:public class Server { public static void run(int port) { /**Netty创建ServerSocketChannel,默认Sel...
分类:
Web程序 时间:
2015-10-02 11:12:17
阅读次数:
278