#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
正确的程序如下所示:
#! /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
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
//上一篇写了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*astring=@"ThisisaString!";创建空字符串,给予赋值。NSString*astring=[[NSStringalloc]init];astring=@"ThisisaString!";NSLog(@"astring:%@",as...
分类:
其他好文 时间:
2014-06-14 16:09:34
阅读次数:
237
初始化:第一种初始化方法:假如MainUIViewController类继承了UIViewController类,mainUIViewController是MainUIViewController的实例对象,当调用Init方法的时候【MainUIViewController *mainUIViewC...
分类:
其他好文 时间:
2014-06-14 15:41:46
阅读次数:
219
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
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
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
利用了大约一个多小时来搞明白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