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
1,若方法传入的对象参数为空,则在方法中改变参数并不会改变声明的对象public void
setList(List list){ list = new ArrayList() ; } @Test public void t4(){ List ...
分类:
编程语言 时间:
2014-07-22 23:12:56
阅读次数:
323
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
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
private void Form1_Load(object sender,
EventArgs e) { textBox1.Text= GenerateTimeStamp(System.DateTime.Now);
textBox2.Text ...
分类:
其他好文 时间:
2014-07-22 23:09:53
阅读次数:
302
class Work { [DllImport("user32.dll")] static
extern void mouse_event(MouseEventFlag flags, int dx, int dy, uint data, UIntPtr
extr...
分类:
其他好文 时间:
2014-07-22 23:06:55
阅读次数:
347
一个通常的函数调用的例子://声明(一般头文件中)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
在应用程序中用到MPMoviePlayerViewController时,有时需要保持应用程序为竖屏状态,而视频播放器显示为横屏,如何做呢?如果采用强制横屏的方法,应用审核的时候是不会通过的,因为该方法已经被苹果禁止了。主要代码如下:[html]view
plaincopy-(void)addVid...
分类:
移动开发 时间:
2014-05-01 15:34:14
阅读次数:
436
private void ToConvert_Click(object sender,
EventArgs e) { string strPath = System.Windows.Forms.Application.StartupPath;
...
分类:
其他好文 时间:
2014-05-01 14:44:33
阅读次数:
346