import java.security.MessageDigest;import
java.util.*;public class Hello2{ public static void main(String[] args) throws
Exception{ Random r = new Ran...
分类:
其他好文 时间:
2014-07-22 23:13:33
阅读次数:
354
public class ToLog { public static void
main(String[] args) throws Exception { //准备日志文件 File f = new File("log.txt");
if(!f.ex...
分类:
其他好文 时间:
2014-07-22 23:12:54
阅读次数:
300
//华为编程:筷子,找到第一个单对的筷子#include #define max 37int
main(){ int n,i,j; int a[max]; int flag=0; int error=-1; scanf("%d",&n);
if(n>max) { printf("...
分类:
其他好文 时间:
2014-07-22 23:12:15
阅读次数:
325
public class Mul { public static void
main(String[] args) { // 第一种方法 for (int i = 1; i <= 9; i++) { for (int j = 1;
j <= 9...
分类:
其他好文 时间:
2014-07-22 23:10:55
阅读次数:
270
不用说,做前最好新建一个wifiadmin类,用来装载你所有的wifi打开关闭,wifi配置,连接情况等等wifi操作,然后main类里做一些button连接listview显示wifi网络连接等东西,分开做好。
分类:
移动开发 时间:
2014-07-22 23:10:13
阅读次数:
404
效果图:实现代码:/************************//* 简单的时间显示
*//**********************/#include #include /*使用sleep()函数用的头文件*/#include int
main(){ int second...
分类:
其他好文 时间:
2014-07-22 23:09:54
阅读次数:
290
我们在开发中经常会去做一些工具类,这些类中的方法和变量都是static的。而这样的工具类是不希望呗实例化的。然后我们知道jdk会在无构造器的时候,自动的提供一个无参数的缺省构造器。该构造器就会提供给用户一个创建改类对象的接口,因而我们在工具类中会将此构造函数显示化私有化:public
class U...
分类:
其他好文 时间:
2014-07-22 23:09:13
阅读次数:
367
给定 ab 与飞 f1 f2 求f(n) = (A * f(n - 1) + B * f(n
- 2)) mod 7.分析:1 因为mod7 0using namespace std;int main(){ int a,b,n; int f[1005];
while(cin>>a>...
分类:
其他好文 时间:
2014-07-22 23:06:34
阅读次数:
391
一个通常的函数调用的例子://声明(一般头文件中)void MyFun(int x);
//此处的申明也可写成:void MyFun( int );int main(int argc, char* argv[]){ MyFun(10);
//这里是调用MyFun(10);函数 return 0;}v...
分类:
其他好文 时间:
2014-07-22 23:06:16
阅读次数:
239
近期在看dnsjava 源码的时候,不经意间发现一个自己没有想过的问题:HashMap
如何使用key去查找对应的value的,这个问题很难用语言描述的清楚,那就使用代码来进行说明吧!public class test { public
static void main(String[] ar...
分类:
编程语言 时间:
2014-05-01 16:20:07
阅读次数:
509