java
码农110
工作多年了,在csdn也多年了,却什么也没留下....
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
快速排序算法JAVA实现
分区,于数组中选出一个基准值,把小于基准值的交换至左分区,大于基准值的交换至右分区,等于基准值的位于中间分区。对"基准"左边和右边的两个子集,不断重复第一步和第二步,直到所有子集只剩下一个元素为止。在数据集之中,选择一个元素作为"基准"(pivot)是基于冒泡排序改 进而来。原创 2022-10-03 14:35:08 · 244 阅读 · 1 评论 -
[转]HOW TO -- Divide a list to lists of n size in Java 8
You have probably faced a few times a situation where you had to divide n-size list to lists of m-size. Something like:[1,2,3,4,5,6,7] -> [[1,2], [3,4], [5,6], [7]]You won’t find a simple me...转载 2018-08-24 11:52:55 · 323 阅读 · 0 评论 -
marmot framework 高级查询应用体验
url:marmot/query/query-box.jspview: org.marmot.framework.query.view.QueryBoxtabsetQuery 对象的事件 代码中添加 以下代码 用于过滤不想用于查询的字段[code="java"] if(field.getTag() == 'hide') { continue; ...2010-03-16 11:28:23 · 201 阅读 · 0 评论 -
JBPM 下载地址
jbpm-jpdl-suite-3.2.3.zip 85.1M [url]http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/j/project/jb/jbpm/f%29%20jBPM%20jPDL%203/jbpm-jpdl-3.2.3/jbpm-jpdl-suite-3.2.3.zip[/...2010-04-02 13:50:53 · 279 阅读 · 0 评论 -
jprofiler 5.1.2 注册码
jprofiler 5.1.2 SN:L-FLN#92180-1v1oc3xcn0nkh#2752009-02-18 22:53:32 · 191 阅读 · 0 评论 -
run nginx in windows
内容来自:[url]http://nginx.org/en/docs/windows.html[/url]nginx/Windows uses the native Win32 API (not the Cygwin emulation level). Currently only the select method is used as a notification way, there...2010-04-09 16:05:49 · 167 阅读 · 0 评论 -
axis && sap web service SOAPFaultBuilder error
[color=red]ERROR INFO:[/color][table]|The above snippet of code is _unpatched_ in Axis version 1.4 and it causes the same problems as mentioned above. ||||Specifically:||AxisFault|...2009-08-12 10:12:41 · 203 阅读 · 0 评论 -
Dorado 动态创建Dataset实例
Dorado 动态创建Dataset实例来自“dorado 5原理、特性与高级用法 V1.0.doc”.[code="java"]package sample.skills.createDatasetTest;import com.bstek.dorado.data.Dataset;import com.bstek.dorado.data.DatasetListener...原创 2010-02-21 15:07:19 · 406 阅读 · 0 评论 -
java 非阻塞的栈
本例中的非阻塞算法中能确保线程的安全性。本例是摘自《JAVA并发编程实战》这本书的高级题部分[code="java"] import java.util.concurrent.atomic.AtomicReference;/** * Created by nspace on 15-4-18. *///@ThreadSafepublic class Cocurre...原创 2015-04-18 13:30:58 · 175 阅读 · 0 评论 -
jprofiler 5.1.2 注册码
2009-02-18 22:53:32 · 120 阅读 · 0 评论 -
axis && sap web service SOAPFaultBuilder error
| faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException|| faultSubcode: || faultString: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.|| faultActor: ||2009-08-12 10:12:41 · 150 阅读 · 0 评论 -
Dorado 动态创建Dataset实例
rt com.bstek.dorado.data.DatasetListener;import com.bstek.dorado.data.Field;import com.bstek.dorado.data.ParameterSet;import com.bstek.dorado.data.db.AutoDBField;import com.bstek.dorado.data.db.AutoSqlDataset;import com.bstek.dorado.data.db.BaseM原创 2010-02-21 15:07:19 · 296 阅读 · 0 评论 -
marmot framework 高级查询应用体验
f(field.getTag() == 'hide') { continue; } if(field.getTag() == 'hide') { datasetColumn.moveNext(); }[/code]针对服务器端对参数的处理代码示例:[code="java"]if(null != condition) { if(condition instanceof Query) {2010-03-16 11:28:23 · 125 阅读 · 0 评论 -
JBPM 下载地址
url]jbpm-jpdl-3.2.3.zip 18.3M [url]http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/j/project/jb/jbpm/f%29%20jBPM%20jPDL%203/jbpm-jpdl-3.2.3/jbpm-jpdl-3.2.3.zip[/url]JBPM [url]http://www.mirrorservice.org/sites/download2010-04-02 13:50:53 · 139 阅读 · 0 评论 -
run nginx in windows
way, therefore you should not expect high performance and scalability. Because of this and some known issues nginx/Windows is considered as a beta version. There is almost full-functionality in nginx/Windows as in Unix version, except XSLT filter, image fi2010-04-09 16:05:49 · 98 阅读 · 0 评论 -
javadoc时候乱码-编码 GBK 的不可映射字符
原创 2013-10-11 12:20:19 · 195 阅读 · 0 评论 -
java 非阻塞的栈
;/** * Created by nspace on 15-4-18. *///@ThreadSafepublic class CocurrentStack { AtomicReference top = new AtomicReference(); public void push(E item) { Node newHead = new Node(item); Node oldHead; do {原创 2015-04-18 13:30:58 · 115 阅读 · 0 评论 -
How to Install JAVA 8 (JDK 8u91) on Ubuntu & LinuxMint via PPA
原文出处:http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/经验证非常正确,非常容易操作。Oracle JAVA 8 Stable release has been released on Mar,18 2014 and available to download and install ono转载 2016-05-15 19:19:31 · 1847 阅读 · 1 评论 -
Java 8 特性 – 终极手册
https://www.javacodegeeks.com/2014/05/java-8-features-tutorial.htmlhttp://ifeve.com/java-8-features-tutorial/原文作者:Andrey Redko ,译者:Justin,校对:郭蕾1.简介毫无疑问,Java 8是自Java 5(2004年)发布以来Java语言最大的一次版本升转载 2016-05-22 20:47:09 · 699 阅读 · 0 评论 -
一种高并发流控程序的简单轻量实现
原文:http://blog.youkuaiyun.com/mn11201117/article/details/8809511package com.nspace.thread;import java.util.Date;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;impor转载 2016-05-22 19:31:21 · 1987 阅读 · 0 评论 -
mysql+hibernate连接配置
MySQL管理员应该知道如何设置MySQL用户账号,指出哪个用户可以连接服务器,从哪里连接,连接后能做什么。MySQL 3.22.11开始引入两条语句使得这项工作更容易做:GRANT语句创建MySQL用户并指定其权限,而REVOKE语句删除权限。两条语句扮演了mysql数据库的前端角色,并提供与直接操作这些表的内容不同的另一种方法。CREATE和REVOKE语句影响4个表:授权表 内容原创 2007-03-12 12:12:00 · 4506 阅读 · 1 评论 -
程序设计模式的有趣解释-追MM
程序设计模式的有趣解释-追MM作者:laurecn 创建型模式[被屏蔽广告] 1、FACTORY一追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了。麦当劳和肯德基就是生产鸡翅的Factory 工厂模式:客户类和工厂类分开。消费者任何时候需要某种产品,只需向工厂请求即可。消转载 2007-03-12 18:03:00 · 661 阅读 · 0 评论 -
应聘Java笔试时可能出现问题及其答案
应聘Java笔试时可能出现问题及其答案 Java基础方面:1、作用域public,private,protected,以及不写时的区别答:区别如下:作用域 当前类 同一package 子孙类 其他packagepublic √ √ √ √protected √ √ √ ×friendly √ √ × ×private √ × × ×不写时默认为friendly2、ArrayList和Vector原创 2007-03-20 14:08:00 · 1069 阅读 · 0 评论 -
澄清Java语言接口与继承的本质
计算机学院研二的兄弟与我讨论Java,一见面,几个问题全是关于接口,接口有什么用?为什么要用接口?什么时候该使用接口?很庆幸他们不是问我Java如何连接SQL Server,或者是如何开发J2EE应用,这类问题有杀伤力,避之则吉。今年计算机学院本科有个毕业设计课题是做J2ME,选这个题目的学生在5月末都还在苦着脸研究java.util.*这个包,这个这个……唉。 大多数人认为,接口的意义转载 2007-03-22 17:29:00 · 891 阅读 · 0 评论 -
java排序算法之(冒泡排序法)
java排序算法之(冒泡排序法) package sort;public class BubbleSort { /** * @author Bill.hu * @version 1.0 ,2007-4-16 * @param args */ public static void main(String[] args) { // TODO 自动生成方法存根 int[] a原创 2007-04-16 21:13:00 · 1510 阅读 · 0 评论 -
java 输出当月日历
package codejava;import java.util.*;public class CalendarTest { public static void main(String[] args) { // construct d as current date GregorianCalendar d = new GregorianCalendar(); int toda翻译 2007-04-25 22:03:00 · 1697 阅读 · 0 评论 -
JAVA 常用知识点1
1.拆分字符串遇到特殊字符,比如:对‘$’符号,就应该使用‘//$’,后总结可以加个方括号如 "[.]"。2.遍历HASHMAPIterator itr = map.keySet().itrator();while(itr.hasNext()){ Object temp1 = itr.next(); Object temp2 = tab.get(temp1);}3.日历操作Calend转载 2007-05-21 21:29:00 · 785 阅读 · 0 评论 -
hibernate_many-to-many
table="course_student_table" cascade="save-update" inverse="true"> table="course_student_table" cascade="原创 2007-05-22 12:28:00 · 3569 阅读 · 1 评论 -
用JAVA查看本地计算机中的可用字体
package gui;import java.awt.*;public class ListFont {public static void main(String[] args){ String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for原创 2007-05-21 23:14:00 · 1805 阅读 · 0 评论 -
Vector和ArrayList,Hashtable和HashMap,ArrayList和LinkedList的区别
Vector和ArrayList区别 Vector和ArrayList Vector和ArrayList在使用上非常相似,都可用来表示一组数量可变的对象应用的集合,并且可以随机地访问其中的元素。 Vector的方法都是同步的(Synchronized),是线程安全的(thread-safe),而ArrayList的方法不是,由于线程的同步必然要影响性能,因此,ArrayList的性能比Vect转载 2007-05-18 22:46:00 · 818 阅读 · 0 评论 -
jstl学习笔记
jstl学习笔记 http://java.sun.com/jsp/jstl/core" prefix="c"%>http://java.sun.com/jstl/sql" prefix="sql"%>http://java.sun.com/jstl/fmt" prefix="fmt"%>http://j转载 2007-05-26 11:14:00 · 938 阅读 · 0 评论 -
使用 dom4j 解析 XML
使用 dom4j 解析 XML 使用 domj4 API 创建与修改 XML 文档转载 2007-06-01 15:50:00 · 1043 阅读 · 1 评论 -
java中字符串和时间之间的转换
1 引入ParseException 和SimpleDateFormat,Dateimport java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;2 定义本地时间格式(HH代表24小时制,hh代表12小时制,MM代表月,mm代表分),只要把握好格式,就可以得到想要的格式SimpleDat转载 2007-06-04 14:28:00 · 1169 阅读 · 0 评论 -
用 org.w3c.dom 包下 java自带的类 解析小XML字符串
java解析XML有很多方式,dom4j jdom等等今天发现org.w3c.dom 是java自带的类包。而且比较简单import java.io.ByteArrayInputStream;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import原创 2012-12-20 17:06:16 · 6711 阅读 · 0 评论 -
主线程启动两个线程,并输出BEBEBE……BE...BE的字符串。要求,两个子线程分别连续输出B和E。
两线程通信,同步示例原创 2013-11-23 01:20:03 · 2419 阅读 · 0 评论 -
JDK 7 Fork and Join: Java也可以轻松地编写并发程序
Fork and Join: Java也可以轻松地编写并发程序原文地址 作者:Julien Ponge 译者:iDestiny资源下载:Java SE 7Sample Code(Zip)如今,多核处理器在服务器,台式机及笔记本电脑上已经很普遍了,同时也被应用在更小的设备上,比如智能手机和平板电脑。这就开启了并发编程新的潜力,因为多个线程可以在多个内核转载 2015-02-15 17:08:41 · 941 阅读 · 0 评论 -
Opentsdb 开发和使用笔记
参见有道笔记分享:http://note.youdao.com/share/?id=585289eb96601312539a1bf94fbb6be2&type=noteOpentsdb 命令行查询: scan 1427817599 1456675199000 avg easypec.order.ordercostweek type=week删除: scan原创 2016-03-17 09:33:49 · 8750 阅读 · 1 评论 -
tomcat 5 数据库连接池的配置
tomcat 5 数据库连接池的配置1.将数据库驱动程序的JAR文件放在Tomcat的 common/lib 中;2.在server.xml中设置数据源,以MySQL数据库为例,如下:在 节点中加入, name="jdbc/DBPool" type="javax.sql.DataSource" password="root" driver原创 2007-02-28 17:07:00 · 741 阅读 · 0 评论
分享