自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 Volatile关键字的作用

It is possible for each thread to have a local stack and maintain copies of some variables there. If you define a variable as volatile, it tells the compiler not to do any optimizations that wou...

2013-03-27 10:07:54 326

原创 Atomicity and volatility

Atomicity applies to "simple operations" on primitive types except for longs and doubles. Reading and writing primitive variables other than long and double is guaranteed to go to and from memor...

2013-03-26 15:52:35 168

原创 什么时候用到synchronize关键字?

When should you synchronize? Apply Brian’s Rule of SynchronizationIf you are writing a variable that might next be read by another thread, or reading a variable that might have last been written ...

2013-03-26 10:42:52 318

原创 多线程重要概念(一)

All objects automatically contain a single lock (also referred to as a monitor). When you call any synchronized method, that object is locked and no other synchronized method of that object can b...

2013-03-25 17:20:09 110

原创 js float类型数据的加减乘除bug修复

var FloatCalFun=new Object();//获取参数精度,如果为整数则精度为0FloatCalFun._getPrecision=function(arg){ if(arg.toString().indexOf(".")==-1){ return 0; }else{ return arg.toString().split(".")[1...

2013-01-06 17:42:49 263

原创 如何让自己的电脑通过无线虚拟网络共享成为热点。

将win7电脑变身WiFi热点,让手机、笔记本共享上网用win7建立无线局域网,可以共享上网可以局域网游戏。开启windows 7的隐藏功能:虚拟WiFi和SoftAP(即虚拟无线AP),就可以让电脑变成无线路由器,实现共享上网,节省网费和路由器购买费。宏碁、惠普笔记本和诺基亚N97mini亲测通过。以操作系统为win7的笔记本或装有无线网卡的台式机作为主机。主机设置如下:1、以管理员身份...

2013-01-06 14:06:51 228

原创 判断请求是否为ajax请求

注明:该方法只限在jquery中的ajax请求,作者只在jquery中做过测试。public boolean isAjaxRequest(HttpServletRequest request){       String requestHeader=request.getHeader("X-Requested-With");       if(requestHeader!...

2013-01-06 14:04:17 80

原创 java线程和操作系统进程的关系

One very straightforward way to implement concurrency is at the operating system level, using processes. A process is a self-contained program running within its own address space. A multitasking op...

2013-01-06 13:59:21 231

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除