1.欧拉筛法在线性时间内求素数以及欧拉函数代码: 1 procedure get; 2 var i,j,k:longint; 3 begin 4 tot:=0; 5 fillchar(check,sizeof(check),false); 6 for i:=2 to n do 7 be...
分类:
其他好文 时间:
2014-06-25 22:11:51
阅读次数:
574
When using rsync to backup and synchronize configuration files, do remember to close all LibreOffice sessions including the Quick Starter.However, eve...
分类:
其他好文 时间:
2014-06-25 21:51:54
阅读次数:
312
[ Talk is Cheap Show me the CODE ] : jQuery Mobile工具栏
Written In The Font
“ Wirte less Do more”
学习内容:
页眉工具栏和页眉按钮导航工具栏页脚工具栏定位工具栏
页眉工具栏和页眉按钮
页眉是网页身体的头不一样.下面我们演示下在页面工具栏中添加两个连接,中间...
分类:
Web程序 时间:
2014-06-25 20:07:02
阅读次数:
280
// 安全释放
#define RELEASE_SAFELY(__Pointer) do{[__Pointer release],__Pointer = nil;} while(0)
// 屏幕的物理高度
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
// 屏幕的物理宽度
#define ScreenWidth...
分类:
其他好文 时间:
2014-06-25 19:58:31
阅读次数:
197
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it t...
分类:
其他好文 时间:
2014-06-24 21:55:30
阅读次数:
279
做了一下午,总算做出来了!!
思路:将R转换成整数,同时计算好小数的个数,计算整数的次幂之后,然后根据规律将小数点适当的时候输出(如有3位实际小数,则应在第36位输出小数点)
链接http://acm.nyist.net/JudgeOnline/problem.php?pid=155
代码:
#include
#include
int main()
{
int i, j, n, do...
分类:
其他好文 时间:
2014-06-24 21:01:10
阅读次数:
164
C语言中宏的使用(#,##,do…while(0)宏)
1.预定义宏的使用__FILE__,__FUNCTION__,__LINE__。
#include
void fun(void)
{
char v1;
short v2;
int v3;
long v4;
printf("v1: %x\n",&v1);
printf("v2: %x\n",&v2);
print...
分类:
编程语言 时间:
2014-06-24 15:29:13
阅读次数:
214
The world is beautiful. Even if you’re full of tears and sadness, open your eyes. Do what you want to do. Be what you want to be. Find friends. Don’t....
分类:
其他好文 时间:
2014-06-24 14:47:06
阅读次数:
295
#!/bin/bash#使用前请先创建一个路径文件夹/tmp/weblog#确定当前时间,即脚本执行日的0时time=`date "+%y%m%d:%H"`#定位日志时间格式为:20140624:00date1="20$time"#开启死循环,每小时筛选一次日志,并输出while :;do#获取当前...
分类:
其他好文 时间:
2014-06-24 12:03:56
阅读次数:
251
控制流Swift提供了所有c类语言的控制流结构。包括for和while循环来执行一个任务多次;if和switch语句来执行确定的条件下不同的分支的代码;break和continue关键字能将运行流程转到你代码的另一个点上。除了C语言传统的for-condition-increment循环,Swift...
分类:
其他好文 时间:
2014-06-24 11:57:14
阅读次数:
202