1.求质数 质数也成为素数,质数就是这个数除了1和他本身两个因数以外,没有其他因数的数,叫做质数,和他相反的是合数, 就是除了1和他本身两个因数以外,还友其他因数的数叫做合数。 1 namespace ConsoleApp 2 { 3 class Program 4 {...
                            
                            
                                分类:
编程语言   时间:
2015-08-26 17:21:44   
                                阅读次数:
181
                             
                         
                    
                        
                            
                            
                                通过Filter来定义一个登录验证过滤器,这是就不需要在每一个JSP页面添加判断用户合法性的代码了。以下示例中包含了5个文件,一个是登录表单LoginForm.jsp,一个是登录判断页LoginConf.jsp,一个是登录验证过滤器LoginFilter.java,一个是登录成功页面LoginSuc...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:22:35   
                                阅读次数:
204
                             
                         
                    
                        
                            
                            
                                cpplint.py是来自google开源项目风格错误检测工具。它是一个python脚本,和google开源项目风格指南一同发布。下载地址:https://github.com/google/styleguide。cpplint.py的使用方法:1. 安装python。注意设置环境变量:将pytho...
                            
                            
                                分类:
编程语言   时间:
2015-08-26 17:21:47   
                                阅读次数:
1166
                             
                         
                    
                        
                            
                            
                                java.lang.Runtime每个 Java 应用程序都有一个 Runtime 类实例,使应用程序能够与其运行的环境相连接。可以通过 getRuntime 方法获取当前运行时。应用程序不能创建自己的 Runtime 类实例。Runtime是单利模式的 1 public class Runtime...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:21:27   
                                阅读次数:
173
                             
                         
                    
                        
                            
                            
                                文件描述符在内核中,所有打开的文件都使用文件描述符(一个非负整数)标记。文件描述符的变化范围是0~OPEN_MAX – 1。早期的unix系统中,每个进程最多可以同时打开20个文件,就是说文件描述符的范围为0~19,但是现在很多系统将其增加到0~63。#include int open(const ...
                            
                            
                                分类:
系统相关   时间:
2015-08-26 17:21:07   
                                阅读次数:
403
                             
                         
                    
                        
                            
                            
                                I was building ganglia 3.7.0when suddenly this particular error message sprung out: checking for CK... no configure: error: Package requirements (ck.....
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:21:15   
                                阅读次数:
170
                             
                         
                    
                        
                            
                            
                                using System.Runtime.InteropServices;[DllImport("winmm.dll")] public static extern bool PlaySound(string pszSound, int hmod, int fdwSound); public con...
                            
                            
                         
                    
                        
                            
                            
                                让/etc/profile文件修改后立即生效来源: ChinaUnix博客 日期: 2009.06.11 14:15 (共有条评论) 我要评论 方法1:让/etc/profile文件修改后立即生效 ,可以使用如下命令:# . /etc/profile注意: . 和 /etc/profile 有空.....
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:20:17   
                                阅读次数:
201
                             
                         
                    
                        
                            
                            
                                DataTable转换为JsonResult时间2014-02-07 20:02:00博客园-所有随笔区原文http://www.cnblogs.com/DaneJiang/p/3539866.html1、从数据库获取DataTable类型:DataTable dt = DBConn.GetPage...
                            
                            
                                分类:
Web程序   时间:
2015-08-26 17:19:06   
                                阅读次数:
236
                             
                         
                    
                        
                            
                            
                                1首先介绍如何写menu,若想在activity里添加menu按钮时,在activity里覆写下面2个方法:public boolean onCreateOptionsMenu(Menu menu)和public boolean onOptionsItemSelected(MenuItem item...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:20:09   
                                阅读次数:
158
                             
                         
                    
                        
                            
                            
                                1 package com.sanguosha.java; 2 3 import java.util.Scanner;//导入包 4 5 public class TestPerson { 6 public static void main(String[] args) { 7 ...
                            
                            
                                分类:
编程语言   时间:
2015-08-26 17:19:49   
                                阅读次数:
124
                             
                         
                    
                        
                            
                            
                                public class BookDAL { public static bool CreateBook(Book book) { try { SQLiteConnection con...
                            
                            
                                分类:
数据库   时间:
2015-08-26 17:19:33   
                                阅读次数:
178
                             
                         
                    
                        
                            
                            
                                php的配置文件中有一行--with-mysql=/usr/local/mysql ,安装的时候提示:configure: error: Cannot find MySQL header files under yes.Note that the MySQL client library is no...
                            
                            
                                分类:
数据库   时间:
2015-08-26 17:21:13   
                                阅读次数:
237
                             
                         
                    
                        
                            
                            
                                1.抽象类抽象方法:抽象方法只有声明,没有具体实现,用关键字abstract修饰。1 abstract void f();如果一个类含有抽象方法,则称这个类为抽象类(抽象类不一定必须含有抽象方法)。抽象类无具体实现的方法,所以不能用抽象类创建对象。抽象类是为了继承而存在。对于一个父类,如果它的某个方...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:18:35   
                                阅读次数:
147
                             
                         
                    
                        
                            
                            
                                - (void)initUserInterface{ UILabel *label = [[UILabel alloc]init]; label.numberOfLines = 0; // 需要把显示行数设置成无限制 label.font = [UIFont systemFontO...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:20:35   
                                阅读次数:
298
                             
                         
                    
                        
                            
                            
                                #include #include int main(void){ char s[]="123456789"; char d[]="123"; strcpy(d,s); printf("%s,%s",d,s); return 0;}结果:123456789,56789解析:在内存中分配如下...
                            
                            
                                分类:
其他好文   时间:
2015-08-26 17:19:18   
                                阅读次数:
160