码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 2 3 4 5 6 7 8 ··· 33 下一页

2013年5月27日

摘要: http://superjavason.iteye.com/blog/255423JDBC批量插入主要用于数据导入和日志记录因为日志一般都是先写在文件下的等。我用Mysql 5.1.5的JDBC driver 分别对三种比较常用的方法做了测试方法一,使用PreparedStatement加批量的方法Java代码try{Class.forName("com.mysql.jdbc.Driver");conn=DriverManager.getConnection(o_url,userName,password);conn.setAutoCommit(false);Strings 阅读全文
posted @ 2013-05-27 17:01 海山 阅读(229) 评论(0) 推荐(0) 编辑

摘要: 类型 比特数 有效数字 数值范围 float 32 6-7 -3.4*10(-38)~3.4*10(38) double 64 15-16 -1.7*10(-308)~1.7*10(308) long double 128 18-19 -1.2*10(-4932)~1.2*10(4932)简单来说,Float为单精度,内存中占4个字节,有效数位是7位(因为有正负,所以不是8位),在我的电脑且VC++6.0平台中默认显示是6位有效数字;double为双精度,占8个字节,有效数位是16位,但在我的电脑且VC++6.0平台中默认显示同样是6位有效数字(见我的double_float文件) 还有,有. 阅读全文
posted @ 2013-05-27 16:48 海山 阅读(515) 评论(0) 推荐(0) 编辑

摘要: First things firstWe start with avalid xhtml 1.0 strictmarkup. Here is an example of a valid table markup:<!-- Table markup--><table id="..."> <!-- Table header --> <thead> <tr> <th scope="col" id="...">...</th> ... </tr> 阅读全文
posted @ 2013-05-27 16:42 海山 阅读(236) 评论(0) 推荐(0) 编辑

摘要: 原文网址:http://www.nowamagic.net/html/html_EnterCouseReflesh.php我最近在做一个 Ajax 查询的功能,代码如下:[html]view plaincopy<formname="keywordForm"method="post"action=""><pid="profile_nav"><labelfor="profile">关键字搜索:</label><inputstyle="w 阅读全文
posted @ 2013-05-27 16:39 海山 阅读(229) 评论(0) 推荐(0) 编辑

摘要: 1 package com.itbconsult.amqp; 2 3 import java.io.Serializable; 4 5 /** 6 * A model class for a big, imaginary, expensive operation 7 * that a user submits via the web, but is processed async 8 * by a worker. 9 */10 public class BigOperation implements Serializable {11 12 private String n... 阅读全文
posted @ 2013-05-27 16:15 海山 阅读(205) 评论(0) 推荐(0) 编辑

2013年5月25日

摘要: digguka, January 05, 2012jQuery Image Crop - A very useful list of tools for cropping, zooming and resizing of images. Some of plugins come with the ability to upload croped images. 阅读全文
posted @ 2013-05-25 10:13 海山 阅读(161) 评论(0) 推荐(0) 编辑

摘要: User-generated content on the Web is diversifying from plain text to multimedia content like images, audios and videos. As such, web applications and sites need to cater for easier upload and manipulation of such rich content. Image uploading is pretty much a requirement for a lot of websites and th 阅读全文
posted @ 2013-05-25 10:09 海山 阅读(429) 评论(0) 推荐(0) 编辑

摘要: http://blog.csdn.net/rambo_china/article/details/7720251 阅读全文
posted @ 2013-05-25 10:04 海山 阅读(210) 评论(0) 推荐(0) 编辑

摘要: http://xace.iteye.com/blog/731263 阅读全文
posted @ 2013-05-25 10:00 海山 阅读(148) 评论(0) 推荐(0) 编辑

摘要: http://liuzidong.iteye.com/blog/1069343 阅读全文
posted @ 2013-05-25 09:58 海山 阅读(186) 评论(0) 推荐(0) 编辑

2013年5月24日

摘要: As per the Heroku support staff, this is the magic thing:heroku config:add LANG=en_US.UTF-8Althoughheroku consolewill keep reporting strings encoding asASCII-8BIT, your actuall app will be running with the correct encoding, based on theLANGconfig var. You can double check that by doing this:$ heroku 阅读全文
posted @ 2013-05-24 08:10 海山 阅读(354) 评论(0) 推荐(0) 编辑

2013年5月17日

摘要: View DemoDownload27.2 KB71Googlehas come up with a new look with the launch ofGoogle Plusand one of the prominent changes we can observe is theblack menu bar found on the top of Google Search Page and every other Google productlikeGoogle Plus(obviously), Google reader, etc. Almost every Google produ 阅读全文
posted @ 2013-05-17 22:26 海山 阅读(243) 评论(0) 推荐(0) 编辑

摘要: So this is my first post on my new Blog, and i am quite exited about it,while visiting Google’s homepage, I was wondering about their new Top black navigation bar so I came up with this. If you Google it, you will get plenty of tutorials about creating the new Google like navigation bar but most of 阅读全文
posted @ 2013-05-17 22:19 海山 阅读(198) 评论(0) 推荐(0) 编辑

2013年5月16日

摘要: 假定参数为: Int[] objs;......StringBuffer sql = new StringBuffer();sql.append("select * from table where id in(");for (int i=0; i<objs.length; i++) (i == objs.length-1) ? sql.append("?)") : sql.append("?,");PreparedStatement ps = conn.preparedStatement(sql.toString());for 阅读全文
posted @ 2013-05-16 22:32 海山 阅读(1462) 评论(0) 推荐(0) 编辑

2013年5月15日

摘要: Window->Preferences->Run/Debug/Console->Console buffer size 阅读全文
posted @ 2013-05-15 17:54 海山 阅读(250) 评论(0) 推荐(0) 编辑

2013年5月14日

摘要: JDBC是Java为多种关系型数据库提供的统一的访问接口,以下是我长期使用JDBC总结的十个最佳实践。JDBC最佳实践1:使用PrearedStatement任何一个使用过JDBC的Java程序员几乎都知道这个,PreparedStatment可以通过预编译的方式避免我们在拼接SQL时造成SQL注入。JDBC最佳实践2、使用ConnectionPool(连接池)使用连接池作为最佳实践几乎都成了公认的标准。一些框架已经提供了内建的连接池支持,例如Spring中的Database Connection Pool,如果你的应用部署在JavaEE的应用服务器中,例如JBoss,WAS,这些服务器也会有 阅读全文
posted @ 2013-05-14 15:50 海山 阅读(179) 评论(0) 推荐(0) 编辑

2013年5月10日

摘要: GIT中有三种重置功能,分别是soft、mixed、hard,区别如下:lSoft -当前分支重置到指定commit记录位置,索引和工作树不变;lMixed -当前分支重置到指定commit记录位置,索引被更新,工作树不变;lHard -当前分支重置到指定commit记录位置,索引和工作树都更新。貌似不好理解,首先要理解GIT的三个区域(工作树、索引区、仓库),可以参考文档《GIT简介》。先做soft的测试,新建Soft.java文件,可以看到此文件未添加到索引控制先进行一次提交,提交后在History窗口中重置此次提交,如图:重置后查看工作树,如图从上图可以看出,soft文件还存在,说明重置 阅读全文
posted @ 2013-05-10 12:06 海山 阅读(264) 评论(0) 推荐(0) 编辑

摘要: MairoBro来做fetch和rebase的测试,首先Mairo弟弟在client中添加文件OPQ分别提交,并push到服务器,如图:此时服务器端的历史已经被更新,但是Mairo哥哥的remote tracking中mirror分支并没有更新到最新的记录,如图:所以需要更新remote tracking中的分支,使得它与服务器端的分支同步,右键点击资源库选择Fetch这样就更新了本地的remote tracking中的分支,使得它和服务器端分支同步。然后Mairo哥哥在本地的private中添加文件ABC,并分别提交到本地仓库中。然后将本地mirror分支和remote tracking中的 阅读全文
posted @ 2013-05-10 12:05 海山 阅读(369) 评论(0) 推荐(0) 编辑

摘要: 此小结为什么说是简单解析呢,因为rebase和merge的选择问题讨论比较激烈,笔者也没有一个定论,而且git也处于研究发展阶段,很多理论还没有完全的纯熟。对于一个多人开发团队频繁提交更新的情况,如果使用merge会使得历史线图非常复杂,并且merge一次就会新增一个记录点,如果使用rebase就是完全的线性开发。上图所示是Merge和Rebase的两个结果,显然你不想要merge的混乱结果吧,你能告诉我merge图中那条线是master分支吗?所以给出如下建议,如果同一文件反复修改或提交次数比较多,预期会出现很多的conflict,那么可以使用merge合并,仅需要解决一次冲突即 可(不过, 阅读全文
posted @ 2013-05-10 11:55 海山 阅读(287) 评论(0) 推荐(0) 编辑

摘要: Rebase和Merge操作最终的结果是一样的,但是实现原理不一样。从上面的MairoBro例子可以知道pull大概对历史记录进行了怎样的合并操作,其实默认pull的操作就是一个分支的merge操作,如下图重现一下:Mairo弟弟的提交记录如下:Mairo哥哥的提交记录如下:首先是Mairo弟弟把更新push到服务器,这样服务器端的记录就和Mairo弟弟本地的记录是一样的,接着Mairo哥哥执行pull操作,现在分析下pull是如何操作的。l pull默认就是先把服务器端的最新记录更新到本地的Remote Tracking中对应的mirror分支l 接着对Local的mirror分支和Remo 阅读全文
posted @ 2013-05-10 11:54 海山 阅读(685) 评论(0) 推荐(0) 编辑

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