Andy 胡

导航

上一页 1 ··· 3 4 5 6 7 8 下一页

2016年4月24日

为什么对1取反为-2?

摘要: 为什么 int i =5; ~i = -6 int j = 1; ~j = -2 ? 原来计算机中带符号的整数以二进制的补码进行存储 参见: http://www.cnblogs.com/dolphin0520/archive/2012/10/09/2711768.html 从原码/补码的角度来看, 阅读全文

posted @ 2016-04-24 22:53 talkwah 阅读(350) 评论(0) 推荐(0) 编辑

Android:Java代码添加按钮

摘要: 寻:通过id寻找布局Layout新:新建按钮设:设置按钮的文字,式样(new Layout)加:讲按钮加入布局 阅读全文

posted @ 2016-04-24 20:37 talkwah 阅读(5308) 评论(0) 推荐(0) 编辑

2016年4月23日

Java中List转数组,必须带个参数

摘要: public static void main(String[] args) { List lst = new ArrayList(); lst.add("赵云 "); lst.add("张飞"); //X: String[] strA = (String[]) lst.toArray(); // List转... 阅读全文

posted @ 2016-04-23 01:04 talkwah 阅读(538) 评论(0) 推荐(0) 编辑

Android:使用adb命令行导出[数据库db3]文件

摘要: cmd->cd到:D:\tools\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk\platform-tools adb start-service adb pull /data/data/com.e 阅读全文

posted @ 2016-04-23 00:28 talkwah 阅读(736) 评论(0) 推荐(0) 编辑

2016年4月22日

Android:Activity的跳转

摘要: 界面间传值: 或者不直接使用Bundle传参 阅读全文

posted @ 2016-04-22 08:53 talkwah 阅读(175) 评论(0) 推荐(0) 编辑

2016年4月7日

JSP SQL注入--破法

摘要: 1.JS验证拦截 2.使用PreparedStatement 阅读全文

posted @ 2016-04-07 11:37 talkwah 阅读(453) 评论(0) 推荐(0) 编辑

JSP SQL注入

摘要: Login.JSP Servlet: DAO: ResultSet ret = sta.executeQuery("SELECT Pwd FROM [USER] WHERE UserName = '"+ myName + "' AND Pwd = '" + pwd + "'"); 数据库:"USER 阅读全文

posted @ 2016-04-07 11:10 talkwah 阅读(777) 评论(0) 推荐(0) 编辑

2016年4月6日

Junit4

摘要: 没有main方法了 阅读全文

posted @ 2016-04-06 16:48 talkwah 阅读(134) 评论(0) 推荐(0) 编辑

Junit3

摘要: package code; public class MyCode { public int m1(){ System.out.println("数字型"); return 1; } public String m2(){ System.out.println("null"); return n... 阅读全文

posted @ 2016-04-06 15:05 talkwah 阅读(142) 评论(0) 推荐(0) 编辑

2016年4月1日

JAVA·多线程:线程优先级

摘要: 每次结果不尽相同,优先级不能完全保证! 阅读全文

posted @ 2016-04-01 12:40 talkwah 阅读(161) 评论(0) 推荐(0) 编辑

JAVA·多线程:创建线程的两种方式

摘要: 1.–扩展java.lang.Thread类 2.–实现java.lang.Runnable接口 阅读全文

posted @ 2016-04-01 11:03 talkwah 阅读(240) 评论(0) 推荐(0) 编辑

2016年3月31日

Java GUI 画点

摘要: // 设置颜色 g.setColor(Color.BLUE); 阅读全文

posted @ 2016-03-31 15:37 talkwah 阅读(751) 评论(0) 推荐(0) 编辑

JAVA GUI之CardLayout

摘要: package refNet; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CardLayoutTest extends JFrame implements ActionListener { private static final long serialVersio... 阅读全文

posted @ 2016-03-31 13:03 talkwah 阅读(400) 评论(0) 推荐(0) 编辑

2016年3月18日

JS浮点数运算BUG破法

摘要: JS里,0.3*3 = 0.8999999999999999 破法1:((0.3*10)*3)/10 破法2:(0.3*3).toFixed(2)//保留两位小数 原因:js浮点数用的是IEEE754标准,用二进制实现,有此缺陷 JAVA中也有这个问题: float连*100都不能保证正确性! 阅读全文

posted @ 2016-03-18 22:51 talkwah 阅读(236) 评论(0) 推荐(0) 编辑

2016年2月26日

关于12行代码崩掉浏览器的实测

摘要: 关于那12行代码,其实没有那么腻害,IE10下确实浏览器卡住了,但是还可以用人任务管理器关闭;360浏览器8下测试完全不卡。 顺带加了测试是否支持history.pushState方法的代码,两个测试的浏览器都支持。 <!DOCTYPE html> <html> <head> <meta chars 阅读全文

posted @ 2016-02-26 12:51 talkwah 阅读(198) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 下一页