上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 455 下一页
欧拉函数E(n)表示小于n的所有正数,与n互质的数的个数1 当p为素数时,显然E(p)= p-12 当n=p^k (p为素数)时,E(p^k)=p^k-p^(k-1) 证明:小于n的数一共有p^k-1个,其中不与p互质的有p*1,p*2,p*3,…p*(p^(k-1)-1)(显然有p^(k-1)-1个),则E(n)=(p^k-1)-(p^(k-1)-1)=p^k-p^(k-1);3 任何一个整数n都可以表示为n=(p1^a1)*(p2^a2)*…*(pn^an) 若ab互质,E(ab)=E(a)*E(b),欧拉函数为积性函数 E(n)=E(p1^a1)*E(p2^a2)*…*E(pn^an)= Read More
posted @ 2013-07-22 20:11 javawebsoa Views(440) Comments(0) Diggs(0)
首先应用上线之前肯定要屏蔽错误显示的,登录sae,点进去你的应用,关闭之后进入日志管理当前的当前版本 在http中可以查看各个级别的日志记录了 Read More
posted @ 2013-07-22 20:09 javawebsoa Views(144) Comments(0) Diggs(0)
检查系统是否已安装vsftp rpm -q vsftpd package vsftpd is not installed #说明系统没有安装vsftpd 如果生成虚拟用户数据文件的时候出现以下错误 users.db-bash: db_load: command not found 因为在执行db命令时候软件包没有安装 db4 db4-devel db4-java db4-tcl db4-utils 可以运行yum install db4* 命令安装 安装vsftpd yum install vsftpd 按Y回车,系统自... Read More
posted @ 2013-07-22 20:08 javawebsoa Views(329) Comments(0) Diggs(0)
Windows下的回车换行符是\r\n,而Linux下的回车换行符是\n所以,在windows下可以用\r\n,而在linux下要用\n并且还发现在linux下(既在android上开发)需要匹配字符串的回车换行符的话使用indexOf('\n')方法,里面的类型是indexOf(int i);int型 注:\n 回车(\u000a) \t 水平制表符(\u0009) \s 空格(\u0008) \r 换行(\u000d)*/ Read More
posted @ 2013-07-22 20:05 javawebsoa Views(288) Comments(0) Diggs(0)
同样的布局文件,小分辨率手机:1、使用setImageBitmap设置时,出现如下现象:2、使用setImageResource时,图片显示正常原因:setImageResource(id)会根据设备分辨率进行图片大小缩放适配setImageBitmap(BitmapFactory.decodeResource(res,id))大小需要手动调。如果你提供了完整的各种分辨率下的图片的话,两种方法都应该不会有混乱。 Read More
posted @ 2013-07-22 20:01 javawebsoa Views(297) Comments(0) Diggs(0)
题意:给你一棵高度为H的完全二叉树的路,问最少需要多少辆车把这路走完,车子不能返回。 那么最优的方案就是从小到上一层层的走完,就很容易地可以得到一种递推,需要注意的就是dp[0] = 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;class TrafficCongestion Read More
posted @ 2013-07-22 19:59 javawebsoa Views(205) Comments(0) Diggs(0)
在html中控制自动换行其实只要在表格控制中添加一句 就搞定了。 其中可能对英文换行可能会分开一个单词问题:解决如下: 语法: word-break : normal | break-all | keep-all 参数: normal : 依照亚洲语言和非亚洲语言的文本规则,允许在字内换行 break-all : 该行为与亚洲语言的normal相同。也允许非亚洲语言文本行的任意字内断开。该值适合包含一些非亚洲文本的亚洲文本 keep-all : 与所有非亚洲语言的normal相同。对于中文,韩文,日文,不允许字断开。适合包含少量亚洲文本的非亚洲文本 是软回车,就是换行后还是紧接着上一行,... Read More
posted @ 2013-07-22 19:57 javawebsoa Views(2280) Comments(0) Diggs(0)
尽量不要使用setImageBitmap或setImageResource或BitmapFactory.decodeResource来设置一张大图,因为这些函数在完成decode后,最终都是通过java层的createBitmap来完成的,需要消耗更多内存。 因此,改用先通过BitmapFactory.decodeStream方法,创建出一个bitmap,再将其设为ImageView的source,decodeStream最大的秘密在于其直接调用JNI>>nativeDecodeAsset()来完成decode,无需再使用java层的createBitmap,从而节省了java层的 Read More
posted @ 2013-07-22 19:56 javawebsoa Views(295) Comments(0) Diggs(0)
1. 源起 最近在弄Google登录,Google登录要求手机上必须按照Google Play Service,有些手机比如小米,没有Google Play Servcie,因此,有必要实现一个webview的登录方式。 Google的跳转由Server端进行了配置,我们只需要请求一个URL,跳转到Google 的授权页面,授权后,跳转到Server那边,Server取得用户信息,然后将用户信息返回到一个地址上。最终只需要解析返回的页面结果即可。 2. 代码实现 permission 清空cookie try ... Read More
posted @ 2013-07-22 19:54 javawebsoa Views(501) Comments(0) Diggs(0)
题目:输入一个整数数组,判断该数组是不是某二元查找树的后序遍历的结果。 如果是返回true,否则返回falsebool isPostSequence(int *num,int n){ if(num==NULL || n<=0) { //throw new exception("the input is error"); } int *pstart=num,*pend=num+n; return isPostSequenceByIndex(pstart,pend); }bool isPostSequenceByIndex(int *pstar... Read More
posted @ 2013-07-22 19:53 javawebsoa Views(258) Comments(0) Diggs(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 455 下一页