码迷,mamicode.com
首页 >  
搜索关键字:init    ( 26732个结果
图的存储
#include#include#includeint k,h[110],mark;struct M{ int data; struct M *next;}*head[110];void init(){ int i; for(i = 0; i next = NULL; ...
分类:其他好文   时间:2014-06-17 00:58:16    阅读次数:315
Python 实现摄像头功能
正确的程序如下所示: #! /usr/bin/env python # -*- coding: utf-8 -*-   from VideoCapture import Device import time import sys,pygame   pygame.init()   size = width,height = 620,485 speed = [2,2] blac...
分类:编程语言   时间:2014-06-16 23:10:24    阅读次数:568
nagios介绍及Server安装(二)
6)、启动相关服务[root@centreon~]#/etc/init.d/httpdstart [root@centreon~]#/etc/init.d/mysqldstart [root@centreon~]#mysqladmin-urootpassword‘111111‘ [root@centreon~]#/etc/init.d/ndo2dbstart7)、WEB界面安装http://192.168.100.187/centreon发现提示php-posix模块没..
分类:移动开发   时间:2014-06-16 15:11:56    阅读次数:288
中颖内带LED资源驱动代码
//上一篇写了LCD驱动,本篇写下LED驱动 //DISPCON 最高位为1时, 选择LED驱动,LCD驱动无效 最高位为0时, 选择LCD驱动,LED驱动无效 void Sh79fLed_Init(void) { uint8 i ; Bank0; DISPCLK0 = 0x6e;//0X6E //帧频率 64HZ 此设置无效 DISPCLK1 = 0x01;//0X01 ...
分类:其他好文   时间:2014-06-14 17:44:05    阅读次数:228
NSString 用法大全。
一、NSString创建字符串。NSString*astring=@"ThisisaString!";创建空字符串,给予赋值。NSString*astring=[[NSStringalloc]init];astring=@"ThisisaString!";NSLog(@"astring:%@",as...
分类:其他好文   时间:2014-06-14 16:09:34    阅读次数:237
UIViewController启动过程
初始化:第一种初始化方法:假如MainUIViewController类继承了UIViewController类,mainUIViewController是MainUIViewController的实例对象,当调用Init方法的时候【MainUIViewController *mainUIViewC...
分类:其他好文   时间:2014-06-14 15:41:46    阅读次数:219
UVA 11728 - Alternate Task (数论)
Uva 11728 - Alternate Task 题目链接 题意:给定一个因子和,求出对应是哪个数字 思路:数字不可能大于因子和,对于每个数字去算出因子和,然后记录下来即可 代码: #include #include const int N = 1005; int n, ans[N]; void init() { memset(ans, -1, sizeo...
分类:其他好文   时间:2014-06-14 11:59:06    阅读次数:264
《python源码剖析》笔记 python中的整数对象
1. PyIntObject --> long的一个简单包装 typedef struct{ PyObject_HEAD long ob_ival; } PyIntObject; PyInt_Type --> PyIntObject的类型对象。与对象相关的元信息实际上都是保存在与对象对应的类型对象中的 PyTypeObject PyInt_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, “int”, //… } PyIntObject 所...
分类:编程语言   时间:2014-06-14 10:42:19    阅读次数:313
Mockito入门使用一例
Mock的使用有很多方式,我们常用的有以下几种,看示例代码 public class TestMock { @Mock A a;//生成一个A的Mock @Spy A a1 = new A();//生成一个A的Spy, Spy或是InjectMocks必需自己初始化对象,Mock可以不用初始化 @Before public void init...
分类:其他好文   时间:2014-06-14 10:16:42    阅读次数:230
Swift利用闭包(closure)来实现传值-->前后两个控制器的反向传值
利用了大约一个多小时来搞明白OC中Blocks反向传值和Swift中Closure反向传值的差别,下面直接贴上代码: 一、第一个界面 // Created by 秦志伟 on 14-6-13. import UIKit class ZWRootViewController: UIViewController { init(nibName nibNameOrNil: String?...
分类:其他好文   时间:2014-06-14 10:00:19    阅读次数:451
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!