![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Common
文章平均质量分 61
Ivar_PredixCN
这个作者很懒,什么都没留下…
展开
-
java实现的类似windows操作系统的xCopy
[code="java"]package com.iwindyforest.dir;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOExcepti...2008-07-08 00:31:27 · 233 阅读 · 0 评论 -
java的字符串拼接
每当我用+运算符拼接字符串时, 总有人跟我提出你应该用StringBuffer.我真的希望提建议的人先看看String类的源代码, 从JavaSE6开始, 通过+运算符拼接字符串就是用StringBuilder或者StringBuffer类和他们的append()方法来实现的. 原话如下:From java.lang.String source code: The...原创 2013-12-31 16:43:32 · 162 阅读 · 0 评论 -
OLTP Vs OLAP
OLTP vs. OLAP We can divide IT systems into transactional (OLTP) and analytical (OLAP). In general we can assume that OLTP systems provide source data to data warehouses, whereas OLAP systems help ...原创 2014-01-02 13:42:16 · 231 阅读 · 0 评论 -
GlobalKnowledge: 2013 IT 技能薪水报告
from: GlobalKnowledgehttp://www.globalknowledge.com/training/generic.asp?pageid=3459 各项认证及其对应薪水名单 请大家通过下面的表单来将我们的工资和我们地球对面同行的工资对比,以下是一份2013年IT行业技能&薪水报告中设计的精简版认证列表,以下只包含了收到的反馈...原创 2014-01-09 18:24:07 · 230 阅读 · 0 评论 -
String.intern()方法
internpublic String intern()返回字符串对象的规范化表示形式。一个初始时为空的字符串池,它由类 String 私有地维护。当调用 intern 方法时,如果池已经包含一个等于此 String 对象的字符串(该对象由 equals(Object) 方法确定),则返回池中的字符串。否则,将此 String 对象添加到池中,并且返回此 String 对象的引用...原创 2014-02-10 16:22:58 · 85 阅读 · 0 评论 -
JVM Learning Note 1 -- Run-Time Data Areas and Object Representation
Run-Time Data Areas Class loader loads all the required class files into different runtime data areas:Method Area, Heap, Java Stack, Native Method Stack, Program Counter Register. Program...原创 2014-02-11 00:44:22 · 140 阅读 · 0 评论 -
try-catch影响性能吗?
try-catch会影响性能吗? try-catch放在循环块里面比放在外面程序运行会慢吗?看到论坛上有人对try-catch对性能的影响存在疑问,比如:http://www.iteye.com/topic/1127950很多想当然的答案是: try-catch放在循环块里面肯定比放在循环块外面慢.但是, 这个想当然的答案是错误的. 加了try-catch块的代码跟没有...2014-07-09 17:06:40 · 360 阅读 · 0 评论 -
JVM Learning Note 2 -- Garbage Collection and Memory Allocation Strategy
Method to check if an object is finalizableReference Counting MethodA reference counter is created with its object,Its value is increased by one at a time when its object gets one reference....2014-02-18 14:57:14 · 250 阅读 · 0 评论 -
JVM Learning Note 3 -- JVM Performance Monitor Tools
JDK Provided Tools Command Line ToolsjpsjstatjinfojmapVisual ToolsJConsoleVisualVM with Plugins jps - JVM Process Status USAGEjps -lvmOPTIONSThe jps command supports a nu...原创 2014-02-25 12:25:56 · 106 阅读 · 0 评论 -
Eclispe 性能优化
我目前Eclipse所在的机器环境是windows x32, 4GBRAM, CPUx2, JDK1.7 x86,具体参数意义请自行查阅, 根据自己机器内存环境设定32位机器下查看JVM支持的最大内存:java -Xmx1200M -version -ea-server-Xmx900m-Xms900m-Xmn120m-Xverify:none-Xnoclassgc-XX:P...原创 2014-02-25 15:07:26 · 77 阅读 · 0 评论 -
JVM Learning Note 4 -- HotSpot JVM Options List
From:http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html 中文版参数说明请参考: http://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html Categories of Java HotSpo...原创 2014-02-26 11:08:10 · 338 阅读 · 0 评论 -
利用归并排序算法对大文件进行排序
归并排序算法介绍,请参照Wikipeidazh.wikipedia.org/wiki/%E5%BD%92%E5%B9%B6%E6%8E%92%E5%BA%8F基本思想:大文件分割成行数相等的两个子文件,递归(归并排序)两个子文件,直到递归到分割成的子文件低于限制行数低于限制行数的子文件直接排序两个排序好的子文件归并到父文件直到最后所有排序好的父文件归并到输入的大文...2015-01-25 20:59:43 · 685 阅读 · 0 评论 -
Java collections overview
Fromp: http://java-performance.info/java-collections-overview/by Mikhail Vorontsov This article will give you an overview of all standard Java collections. We will categorize their distinguisha...原创 2014-03-21 10:37:34 · 116 阅读 · 0 评论 -
Java正确处理InterruptedException的方法
要想讨论正确处理InterrupedtException的方法,就要知道InterruptedException是什么。 根据Java Doc的定义Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the ...原创 2013-11-01 16:24:30 · 219 阅读 · 0 评论 -
45 Useful JavaScript Tips, Tricks and Best Practices
By Saad Mouslikifrom: http://flippinawesome.org/2013/12/23/45-useful-javascript-tips-tricks-and-best-practices/ As you know, JavaScript is the number one programming language in the...原创 2013-12-31 11:08:18 · 105 阅读 · 0 评论 -
面试10大算法汇总+常见题目解答
面试10大算法汇总+常见题目解答 最近更新: 2013年12月15日 持续更新…英文版的“面试10大算法汇总”日最高访问量已高达4,318次。这说明总结程序员面试算法有实际意义,比读算法书更有效。下面是中文版的10大算法汇总+有代表性的题目汇总。这些概念是专门为面试准备的,因为日常编程中我们很少会自己去写一个链表或者做一个图,也不会经常使用没有效率的递归。以下用Java...原创 2013-12-16 18:03:34 · 102 阅读 · 0 评论 -
面试关于HashMap的工作原理
先来些简单的问题“你用过HashMap吗?” “什么是HashMap?你为什么用到它?”几乎每个人都会回答“是的”,然后回答HashMap的一些特性,譬如HashMap可以接受null键值和值,而Hashtable则不 能;HashMap是非synchronized;HashMap很快;以及HashMap储存的是键值对等等。这显示出你已经用过HashMap,而且 对它相当的熟...原创 2013-12-16 17:58:54 · 63 阅读 · 0 评论 -
EqualsBuilder典型示例
[b]1.判断是否为空(null),是则false2.判断是否为同一类型(instanceof),否则false3.判断是否为同一对象(==),是则true,否则执行EqualsBuilder [/b][code="java"]package com.iwindyforest.eb;import org.apache.commons.lang.bu...2008-07-08 00:42:31 · 88 阅读 · 0 评论 -
Synchronized来修饰函数和Synchroinzed语句块在使用上的区别
在一个类中,两个不同函数使用Synchronized来修饰函数f()在函数g()中使用synchronized(syncObject)语句块从输出中你能观察到两个方法同时运行,所以它们没有在对方的同步控制上阻塞.[code="java"]package com.iwindyforest.syn;/** * 把方法标记为synchronized : 一...2008-07-08 00:47:16 · 394 阅读 · 0 评论 -
Java中三种变量的拷贝方法比较: 值变量,对象变量,字符串变量
[b]ps:本文的实例和思想引用自[/b]变量复制不是通过复制就可以实现的吗?这可是最基本的编程常识,为什么还要专门来阐述呢?首先我们来看一下值类型怎么复制,看下面的代码: [code="java"]public class ValcpyDemo{ public ValcpyDemo() { int x = 0; ...2008-07-08 00:55:34 · 669 阅读 · 0 评论 -
从TcpSocket上读取数据的三种方式
我在一个项目中碰到了一个TcpSocket的应用。在java程序中使用TcpSocket同本机的一个服务进行进程间的通信。由于通信路径只是单机并没有经过网络,因此两个进程之间的互通相对与网络传输是比较快速的。因此,进程间的交互使用了如下方式:(见上传图片)让我们看一下代码实现:[code="java"] public synchronized void send...2008-07-08 00:57:33 · 2571 阅读 · 0 评论 -
SVN 学习笔记
SVN Learning NoteThe Problem of File SharingAll version control systems have to solve the same fundamental problem: how will the system allow users to share information, but prevent them from ...2009-10-28 17:51:38 · 157 阅读 · 0 评论 -
outlook2007中修改了附件直接保存后文件丢失的解决方法
倒了个大霉, 费了一个下午编辑的文件, 由于是从附件直接打开的, 然后没有另存为直接保存的.然后回去再打开, 发现, 妈的没了!!!!!费了很多劲, 从网上都找不到怎么方法找回原来的文件,不过经过我自己的尝试, 终于想出了下面这个方法:1.打开文件, 选择'other actions', 里面有个'Edit message', 点它2.随便找个.html文件作为...2009-06-25 18:46:48 · 243 阅读 · 0 评论 -
内部类学习笔记
Inner Classes创建If an inner class has constructors, the compiler modifies them, adding a parameter for the outer class reference.如果一个内部类没有构造函数, 编译器会改变它们, 加上一个外部类的引用作为参数.Conversely, you can writ...2009-02-19 17:06:18 · 74 阅读 · 0 评论 -
addRow to TABLE by using Javascript
The table object support adding row by using:[code="js"]var x = document.getElementById('myTable').insertRow(0);[/code]The method accepts a integer parameter as the row index of this table....原创 2011-01-28 18:16:20 · 171 阅读 · 0 评论 -
ShankMod
[code="java"]-- Constants file, mainly used for character attributes, e.g. Health valuesEASY_MULTIPLIER = 0.8NORMAL_MULTIPLIER = 1.0HARD_MULTIPLIER = 1.2INSANE_MULTIPLIER = 1.5GOON_MEDIU...原创 2010-12-10 10:37:23 · 67 阅读 · 0 评论 -
运行chrome时selinux提示avc拒绝解决方法
Chrome 15 Stable 版本发布了, 更新了下,发现Fedora下Chrome 15依然没有解决与SELinux冲突的问题,每次启动, 打开新标签页都会提示AVC拒绝,下面是解决方法: 以root方式运行如下命令:semanage fcontext -a -s system_u -t usr_t /opt/google/chrome/chrome-sandb...原创 2011-10-27 23:50:01 · 1226 阅读 · 0 评论 -
解决用foreach循环遍历集合时remove抛出ConcurrentModificationException异常
List<String> list = new ArrayList<String>(); //使用foreach循环会抛出ConcurrentModificationException异常 for(String s : list) { if(name.equals(s) { list.remove(s); } ...原创 2011-11-03 17:57:40 · 248 阅读 · 0 评论 -
Lazy Loading Singletons
from: http://blog.crazybob.org/2007/01/lazy-loading-singletons.html I woke up this morning thinking I knew all there was to know about lazy loading si...原创 2011-11-04 09:56:15 · 76 阅读 · 0 评论 -
Overview To CMMI v1.3
What is CMMI?CMMI® (Capability Maturity Model® Integration) is a process improvement maturity model for the development of products and services. It consists of best practices that address deve...原创 2013-07-05 18:15:26 · 96 阅读 · 0 评论 -
处理 InterruptedException
这样的情景您也许并不陌生:您在编写一个测试程序,程序需要暂停一段时间,于是调用 Thread.sleep()。但是编译器或 IDE 报错说没有处理检查到的 InterruptedException。InterruptedException 是什么呢,为什么必须处理它? 对于 InterruptedException,一种常见的处理方式是 “生吞(swallow)” 它 —— 捕捉它,然...原创 2013-11-01 16:28:33 · 69 阅读 · 0 评论