- 博客(17)
- 收藏
- 关注
转载 bubbleSort
1 public static void bubbleSort(int[] arr) { 2 for (int i = 0; i < arr.length - 1; i++) { 3 for (int j = 0; j < arr.length - i - 1; j++) { 4 ...
2017-11-03 12:40:00
103
转载 java递归删除File
1 public static void removeFile(File file) {2 if (file.isDirectory()) {3 File[] subFiles = file.listFiles();4 for (File subFile : subFiles) {5 ...
2017-11-03 12:32:00
110
转载 http协议
1、http协议是基于tcp/ip协议之上;2、http协议属于应用层协议;3、http协议是无状态的协议,总是由客户端发起,服务器端相应,之后便断开连接;4、tcp/ip协之间的三次握手: 1、客户端向服务器端发送SYN 2、服务器端向客户端发送SYN + ACK 3、客户端向服务器端发送ACK;连接成功;5、在安卓中添加网络访问权限:<mani...
2016-06-19 20:09:00
91
转载 java二进制
1、原码:15 的原码是00000000 00000000 00000000 00001111;2、反码:15 的反码是11111111 11111111 11111111 11110000;(反码就是原码去翻)3、补码:15 的补码是11111111 11111111 11111111 11110001;(补码 = 反码+ 1)-15 = 15的补码 = 15的反码 ...
2016-06-19 08:42:00
94
转载 java I/O
1、输入流、输出流2、字节流、字符流3、节点流、处理流字节流:InputStream OutputStream字节流:小数据读写;字符流:大文件读写;try{ FileInputStream fis = new FileInputStream("from.txt"); FileOutputStream fos = new FileOutputStrea...
2016-06-19 00:06:00
50
转载 java多线程命令
Thread.sleep();//由运行=>阻塞i,一段时间后再进入就绪状态;Threa.yield();//由运行状态让出cpu,进入就绪状态重新抢占cpu;setPriority();getPriority()//设置线程优先级;setName();getName();//设置线程名称;Thread.currentThread();//获取当前正在运行的线程;...
2016-06-18 22:43:00
133
转载 java多线程
1、实现多线程:继承Thread类;2、实现Runnable接口,并且把该类当作参数传入Thread类或其子类的构造函数中;例1: 1 class ThreadA{ 2 public void run(){ 3 for(int i = 0;i < 100:i++){ 4 System.out.println("ThreadA--...
2016-06-18 22:06:00
53
转载 java匿名内部类
匿名内部类:1、该类处于一个类的内部;2、该类没有名字,只有类体结构;演示过程:1、接口A1 Interface A{2 fooA(); 3 }2、类B的方法需要A类型对象作为参数1 class B{2 fooB(A a){3 System.out.println("fooB");4 ...
2016-06-18 14:43:00
43
转载 c#笔试基础(转载)
技术类面试、笔试题汇总注:标明*的问题属于选择性掌握的内容,能掌握更好,没掌握也没关系。下面的参考解答只是帮助大家理解,不用背,面试题、笔试题千变万化,不要梦想着把题覆盖了,下面的题是供大家查漏补缺用的,真正的把这些题搞懂了,才能“以不变应万变”。回答问题的时候能联系做过项目的例子是最好的,有的问题后面我已经补充联系到项目中的对应的案例了。1、简述 priv...
2016-06-11 21:59:00
516
转载 冒泡排序
1 public void Solution(int[] a) 2 { 3 for(int i = 0;i < a.Length - 1;i++) 4 { 5 for(int j = 1;j < a.Length;j++) 6 { 7 if(arr[i] > arr[j...
2016-06-11 14:21:00
66
转载 函数f(n)=1/1!+1/2!+1/3!+...+1/n!的值
1 piblic Double Solution(int n) 2 { 3 Dounle ret = 0; 4 for(int i = 1;i <= n;i++) 5 { 6 int dishu = 1; 7 for(int j = 1;j <= n;j++) 8 {...
2016-06-11 14:12:00
548
转载 求菲波拉契数列第n项的值
public int Solution(int n){ if(n < 3) { return 1; }else { int[] arr = new int[n]; arr[0] = 1; arr[1] = 1; for(int i =...
2016-06-11 14:06:00
183
转载 单例模式
普通模式:判断是否为空,如果没有instance,就new 一个; 1 public class Singleton 2 { 3 private static Singleton instance; 4 private Singleton() 5 { 6 } 7 public Singleton GetInstanc...
2016-06-11 13:59:00
60
转载 js事件
事件流:事件在DOM结构中传播的过程;事件冒泡:事件从最开始的具体元素到最外层的document出啊脉搏的过程;事件捕获:不太具体的节点应该最先接收到消息,一直传播到最里层的节点;事件处理程序的方式:1.<input type="button" value="button1" id="button1" onclick="alert("Hello World!");" />...
2016-05-29 22:44:00
64
转载 oracle_to_excel
1.把excel文件读到DataTable ///<summary> ///根据excel路径和sheet名称,返回excel的DataTable ///</summary> public static DataTable GetExcelDataTable(string path, string tnam...
2016-05-29 19:43:00
166
转载 jquery_2
1.bind()bingding event handlerslike:$("div").bind("click",function(){alert("the div is clicked!");});2.unbind()unbinding the event handler;like:$("div").unbind("click");3.event.type,target,pa...
2016-05-29 18:20:00
66
转载 jquery_1
jqury1.alt VS titlewhen your img does not show up,then you will see the alt on the page;and when mouseover the img,what you see is title;2.attr()get arrtibute value: you can use the function ...
2016-05-29 16:59:00
70
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人