bool result = false;
result = CheckPowerOfTwo(8);
Console.WriteLine(result.ToString());
static bool CheckPowerOfTwo(ulong number)
{
...
分类:
其他好文 时间:
2014-06-25 20:05:36
阅读次数:
141
1、首先先了解下NSNumber类型:
苹果官方文档地址:https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html
NSNumber是NSValue的一个子类,它是一个对象来存储数字值包括bool...
分类:
移动开发 时间:
2014-06-25 19:33:49
阅读次数:
354
最近在看以前大一看过的一本书《JAVA开发实战经典》李兴华写的,每看一次以前看过的书,收获都是不一样的,很多东西以前不明白,现在一看恍然大悟的感觉;
这道题目是书上的习题,没给参考答案,我在网上也没找到好点的,就发上来,感觉这个算法还可以优化得更好,希望高手指点
// 在排序好的数组插入一个数字,数字要插入到合适的位置上
int intArr[] = ...
分类:
其他好文 时间:
2014-06-25 19:31:58
阅读次数:
177
题目
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl...
分类:
其他好文 时间:
2014-06-24 23:14:28
阅读次数:
238
(1) 使用NumericUpDown
(2) 处理KeyPress 按钮
(3) 处理Text_Changed 事件
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Li...
分类:
其他好文 时间:
2014-06-24 21:45:43
阅读次数:
173
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus poin...
分类:
其他好文 时间:
2014-06-24 20:16:39
阅读次数:
180
很久前给Support发Email问能不能在设计期给AdvStringGrid标题加个数字标识,每次我都是自己改代码加上去。这次升级到新版本,没想到加入了这个功能:
功能虽小但是非常实用,很多的事件和函数接口都是用Index的,有了这个就不用费力去对比了。
真心赞一个!...
分类:
其他好文 时间:
2014-06-24 20:05:12
阅读次数:
170
【原题】
1799: [Ahoi2009]self 同类分布
Time Limit: 50 Sec Memory Limit: 64 MB
Submit: 554 Solved: 194
[Submit][Status]
Description
给出a,b,求出[a,b]中各位数字之和能整除原数的数的个数。
Input
Output
Sample ...
分类:
其他好文 时间:
2014-06-24 18:38:02
阅读次数:
295
Introduction to 555 timer
555 定时器 wiki
话说明天考数电,今天晚上最后时刻要搞定 555 timer啊!哈哈
各个引脚的介绍
Pin
Name
Purpose
1
GND
Ground reference voltage, low level (0 V)
2
T...
分类:
其他好文 时间:
2014-06-24 17:55:26
阅读次数:
209
一、标题:
数字化婚姻配对尝试
二、题目:
建立一个模型,来模拟推导社会男女择偶过程。
为了模型简化,一个人的特性指标有三个,这里假设为财富、样貌、品格,每个指标均可取值1-100之间任意数字。同样也对这3项指标有自己的需求。这3个需求值取值范围都在1-98间,当然三者的和必须为100.所以任意一个人可以用以下数组来表述:
G(A、B、C、A1、B1、C1)G...
分类:
其他好文 时间:
2014-06-24 17:43:52
阅读次数:
246