`
文章列表
转http://blog.tianya.cn/blogger/post_read.asp?BlogID=3668353&PostID=32699671   问题  Java中提供了很多调度线程的方法,上一节介绍了其中一种控制线程的方法:如何等待一个线程结束。那么如果不希望等待线程结束,而是根据问题的需要随时都要中断线程使其结束,这种对线程的控制方法该如何实现呢?  解决思路  首先必须先明确“中断”这个概念的实际含义,这里的中断是指一个线程在其任务完成之前被强行停止,提前消亡的过程。查阅JDK的帮助文档,可以找到这样一个和中断有关的方法:interrupt()。  它的语法格式如下所 ...
  转:http://www.mysqlinfo.com/2012/04/22/shell-%E6%97%A5%E6%9C%9F%E5%8A%A0%E5%87%8F%EF%BC%8C%E6%97%A5%E6%9C%9F%E5%A4%A7%E5%B0%8F%E6%AF%94%E8%BE%83%E7%9A%84%E6%96%B9%E6%B3%95/   1 日期加减方法可实现当天的日期加减,指定日期的加减,天周月年。 $ date -d "+1 day" +%Y-%m-%d 2012-04-23 $ date -d "-1 day" +% ...

rsync 拷贝数据

rsync -av -e ssh username@oldserverhost:/home/old_home/ /home/new_home/
转:http://highlyscalable.wordpress.com/2012/06/05/fast-intersection-sorted-lists-sse/   Intersection of sorted lists is a cornerstone operation in many applications including search engines and databases because indexes are often implemented using different types of sorted structures. At GridDyna ...
转:http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/   Statistical analysis and mining of huge multi-terabyte data sets is a common task nowadays, especially in the areas like web analytics and Internet advertising. Analysis of such large data sets ...
转:http://highlyscalable.wordpress.com/2012/02/02/direct-memory-access-in-java/     Java was initially designed as a safe, managed environment. Nevertheless, Java HotSpot VM contains a “backdoor” that provides a number of low-level operations to manipulate memory and threads directly. This backdoor ...
在网上找一些文章,是因为网卡buffer size太小(This is a count of packets that have been dropped by the kernel, either due to a firewallconfiguration or due to a lack of network buffers.),那我们就只有调整网卡buffersize,找了一些国外的文章,可以通过ethtool来修改网卡的buffer size ,首先要网卡支持,由于是NAT设备,我的全部是INTEL 的1000M网卡我们看看ethtool说明-g –show-ringQueries t ...
ArrayWritable is a touch hard to use. Say you have an array of IntWritable[]. The get() method or ArrayWritable, after serializations/deserialization, does in fact return an array of type Writable. As such you cannot cast it directly to IntWritable[]. Individual elements are of type IntWritable and c ...
什么是退避算法: In a single channel contention based medium access control (MAC) protocols, whenever more than one station or node tries to access the medium at the same instant of time, it leads to packet collisions. If the collided stations tries to access the channel again, the packets will collide as t ...
Flume是一个分布式的日志收集系统,提供了很好的配置管理。今天分析一下页面提交配置的详细过程。 1,前台部分,首先,在flumeconfig.jsp页面中,提供了配置管理的表单,详细如下,   <h2>Configure a single node</h2> <form method=post action="command.jsp"> <table> <tr> <td>Configure node:</td> ...
源地址:http://www.intellij.org.cn/portal/index.php?option=com_content&task=view&id=26&Itemid=28 1、构建单个工程Maven2在项目管理方面影响越来越大,很多项目都使用Maven2。下面我们就介绍如何使用Maven2快速创建项目原型,然后在此基础上进行项目开发。下面我们就看一下如何使用Maven2创建典型的三类项目: 普通的Java项目,如基础包等:    mvn archetype:create   -DgroupId=com.yourcompany  -DartifactId ...
  (1)安装maven2     sudo apt-get install maven2 (2)在eclipse中配置安装好的maven2 不使用eclipse嵌入的MAVEN,添加外部MAVEN  Windows|Perferences|Installation|Embedded Maven|Add...|M2_HOME|打勾|应用|确定  (3)创建项目      mvn archetype:generate -DgroupId=cn.bisoft.java.app -DartifactId=s2si -DarchetypeArtifactId=maven-archetype ...
转:  http://gbif.blogspot.com/2011/06/getting-started-with-avro-rpc.html Getting started with Avro RPC
转---http://kt8668.iteye.com/blog/205739   本文的目的并不是介绍使用的什么技术,而是重点阐述其实现原理。   一、 异步和同步 讲通俗点,异步就是不需要等当前执行的动作完成,就可以继续执行后面的动作。   通常一个程序执行的顺序是:从上到下,依次执行。后面的动作必须等前面动作执行完成以后方可执行。这就是和异步相对的一个概念——同步。   案例: A、张三打电话给李四,让李四帮忙写份材料。 B、李四
更广义的字符集转换:iconv在先前的章节中,我们已见到了两组 mbs 与 wcs 互转的函式,第一组对于有「状态改变」的编码系统 mbs 无法做到字符串的状态控制,故不适合做该 mbs 的转换工作;而第二组则可以直接做字符串的状态 ...
Global site tag (gtag.js) - Google Analytics