paulwong

#

NIO概念

NIO是新IO,与老IO相比,老IO是通过STREAM来发送CHARACTER,新IO是通过CHANNL 发送BUFFER;老IO对于多条链接需要启动多个线程处理,新IO只需一条线程即可处理多条链接;新IO是事件驱动。


客户端,非SELECTOR模式:
//打开一个CHANNEL
SocketChannel socketChannel = SocketChannel.open();
socketChannel.configureBlocking(false);
socketChannel.connect(new InetSocketAddress("http://google.com", 80));

//等待可写状态
while(! socketChannel.finishConnect() ){
    //wait, or do something else    
}

//写资料
socketChannel.write(buf);


客户端,SELECTOR模式:
//打开一个CHANNEL
SocketChannel channel = SocketChannel.open();

//新建一个SELECTOR
Selector selector = Selector.open();

channel.configureBlocking(false);

//将SELECTOR注册到CHANNEL中
SelectionKey key = channel.register(selector, SelectionKey.OP_READ);


while(true) {

  //查询可用状态
  int readyChannels = selector.select();

  //状态不可用
  if(readyChannels == 0) continue;

}

  //状态可用
  Set<SelectionKey> selectedKeys = selector.selectedKeys();

  Iterator<SelectionKey> keyIterator = selectedKeys.iterator();

  while(keyIterator.hasNext()) {

    SelectionKey key = keyIterator.next();

    if(key.isAcceptable()) {
        // a connection was accepted by a ServerSocketChannel.

    } else if (key.isConnectable()) {
        // a connection was established with a remote server.

    } else if (key.isReadable()) {
        // a channel is ready for reading

    } else if (key.isWritable()) {
        // a channel is ready for writing
        
//提交所需处理的代码
    }

    //移除所有KEY
    keyIterator.remove();
  }

posted @ 2013-07-16 12:31 paulwong 阅读(359) | 评论 (0)编辑 收藏

ECLIPSE+MAVEN+TOMCAT7 PLUGING+JNDI

     摘要: 开发工具是ECLIPSE,由于是MAVEN WEB项目,不是ECLIPSE项目,测试用的如TOMCAT就不能使用平常的ECLIPSE加TOMCAT的方式了。只能用MAVEN的TOMCAT插件。 MAVEN的这个TOMCAT插件其实就是让MAVEN去启动一个内嵌的TOMCAT服务器,如果项目和这个TOMCAT关联了,项目就可以部署上去。 内嵌的服务器功能扩展,是通过插件的配置进行的。如改...  阅读全文

posted @ 2013-07-15 13:51 paulwong 阅读(2621) | 评论 (0)编辑 收藏

J2EE+ECLIPSE+JETTY PLUGIN+JNDI DATA SOURCE

需求:

在ECLIPSE中,启动JETTY,能部署多个WEB应用,应用间能共享JNDI 的数据源。

Jetty/Feature/Jetty Maven Plugin
http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin

Speed Up J2EE Environment Setup With Jetty Maven Plugin
http://owenou.com/2011/02/23/speed-up-j2ee-environment-setup-with-jetty-maven-plugin.html

posted @ 2013-07-14 16:59 paulwong 阅读(509) | 评论 (0)编辑 收藏

SPRING DATA JPA

从JPA到SPRING JPA,再到SPRING DATA JPA,SPRING 对DAO的支持能够达到越来越简练了,DAO只需声明一个接口,就可以做所有数据库操作。

资源:

使用 Spring Data JPA 简化 JPA 开发
http://www.ibm.com/developerworks/cn/opensource/os-cn-spring-jpa/


spring-data-jpa-examples
https://github.com/pkainulainen/spring-data-jpa-examples/tree/master/tutorial-part-one/src/main


Spring Data JPA Tutorial
http://www.petrikainulainen.net/spring-data-jpa-tutorial/





posted @ 2013-07-13 00:40 paulwong 阅读(345) | 评论 (0)编辑 收藏

HTML5资源

HTML5 Canvas初体验之绘图基础
http://www.e800.com.cn/articles/2012/0315/504978.shtml


HTML5 Canvas Bezier Curve Tutorial
http://www.html5canvastutorials.com/tutorials/html5-canvas-bezier-curves/


HTML 5 Canvas
http://www.w3school.com.cn/html5/html_5_canvas.asp


RDF 简介
http://www.w3school.com.cn/rdf/rdf_intro.asp
http://www.w3schools.com/rdf/rdf_intro.asp


手机界面框架
http://ionicframework.com/






posted @ 2013-06-30 19:27 paulwong 阅读(337) | 评论 (0)编辑 收藏

LINUX资源

!!!!!RHadoop培训 之 Linux基础课
http://blog.fens.me/rhadoop-linux-basic/

时间同步服务器NTP
http://blog.fens.me/linux-ntp/


http://gfrog.net/2008/01/config-file-in-debian-interfaces-1/


Linux SHELL脚本 注释
http://www.dojocn.org/blog-1-67.html


Ubuntu下无法安装sun-java6-jdk的解决办法
http://witmax.cn/install-sun-java6-jdk.html


UBUNTUN下安装Tomcat
http://wiki.ubuntu.org.cn/Tomcat

查询所有用户
grep bash /etc/passwd  


用户管理
http://blog.csdn.net/warden2010/article/details/5132290
http://linux.jboke.com/type99/art8/rl9.html
!!http://www.computerhope.com/unix/uchown.htm



posted @ 2013-06-27 22:51 paulwong 阅读(340) | 评论 (0)编辑 收藏

ANDROID APPS DATA资源

http://stackoverflow.com/questions/10272155/getting-data-from-android-play-store


https://developer.android.com/distribute/googleplay/promote/linking.html


http://www.scriptrr.com/data-scrapping-get-android-google-play-app-info/

posted @ 2013-06-25 22:11 paulwong 阅读(323) | 评论 (0)编辑 收藏

architecture requirement

Responsibilities:
• Provide high level technical architecture, design documents and build of business applications and supporting functions based upon customer’s requirements.
• Produce a detailed functional design document to match customer requirements
• Co-operate with the customer’s technical architect to produce a technical specification for custom development and systems integration requirements.
• Ensure delivered solutions are realized in time frame committed
• Participate and lead the project meetings and present the solution with the customer if needed
• Review the work of other team members and ensure it meets the required standards
• Work with team members of the team to improve their technical and functional knowledge and skills.
• Act as a mentor to all team members on their assigned project tasks.
• Drive new business growth and customer success by providing business expertise.
Required Qualifications:
• Graduated from University or equivalent.
• 5-7+ years of relevant experience in software development.
• Must have hands-on expertise in the following technologies: Java/J2EE, Spring framework, Hibernate, Web Service (SOAP and RESTful), database (Oracle, SQL, PL/SQL, stored procedures)
• Have good knowledge in web-based systems architecture, service-based architecture, enterprise application architecture.
• Ability to understand the business requirements and converting them into solution designs
• Have excellent English written and oral communication skills, including conducting presentations to customers.

posted @ 2013-06-25 09:03 paulwong 阅读(256) | 评论 (0)编辑 收藏

OPENSTACK资源

!!!!!Nova安装攻略
http://blog.fens.me/category/datagurucn/


OPENSTACK ITEYE社区
http://openstack.group.iteye.com/


http://dl2.iteye.com/upload/attachment/0080/7461/400e0b13-9bc3-3caf-85a1-c525fa943469.pdf


OPENSTATCK 中文社区
http://openstack.csdn.net/resources.html/5


OneStack:Ubuntu 12.04 (或11.10) 一键部署安装OpenStack云计算平台
http://blog.csdn.net/hilyoo/article/details/7696169


OpenStack Hands on lab系列
http://liangbo.me/index.php/2012/03/25/openstack-hands-on-lab/


为 OpenStack Nova 制作 Ubuntu 镜像
http://www.vpsee.com/2011/06/create-ubuntu-kvm-image-for-openstack-nova/


Ubuntu 12.04 Openstack Essex 安装(单节点)
http://www.chenshake.com/ubuntu-12-04-openstack-essex-installation-single-node/


Ubuntu 12.04 ("Precise Pangolin") 安装 OpenStack Essex
http://hi.baidu.com/chenshake/item/29a7b8c1b96fb82d46d5c0fb


http://www.hastexo.com/resources/docs/installing-openstack-essex-20121-ubuntu-1204-precise-pangolin


!!!Taking OpenStack for a Spin
http://www.stackgeek.com/blog/kordless/post/taking-openstack-for-a-spin






posted @ 2013-06-24 13:52 paulwong 阅读(257) | 评论 (0)编辑 收藏

OPENSTACK USAGE

Effort:
The estimated effort for the tendered prototyping project is low. We estimate it with 10 hours max, including documentation. In addition there should be 1 hour of Skype conference, where you present your solution via Skype.
Project:
Task 1: You set up a small OpenStack configuration on a virtual machine provided to you (RHEL on Xen).
The small OpenStack configuration is of your choice. Storage in this prototype is not necessary for user data. However, OpenStack identity will need to store user identification data.

The OpenStack environment has mandatorily to include
• The dashboard (simple configuration) to enable the cloud administrator to control his compute and networking resources.
• OpenStack Identity (from OpenStack Shared Services) enabling to create users and tenants and to define permissions for compute, storage and networking resources. It shall allow three users (user 1, 2and user 3) to read the output of sine wave software-as-a-service (see task 2). Exclusively user 3 shall also be able to define the input parameters. User 4 has no right to see, neither to input data. User names: user1, user2, user3, user4. Passwords: pass1, pass2, pass3, pass4.

Task 2: You virtualize one software program provided to you as a Web service
The software program, which we will provide to you is a little C++ program, reading the input parameters for amplitude and frequency and providing as output a simple sine wave.
Pls implement a low effort input GUI for the users entitled to input data (in the prototype it is only user 3). Just in case that you have designer capabilities, you can off course also provide nicely styled input GUI. In that case we would after submission of the result also discuss with you another job profile – the profile of a GUI designer.
Pls virtualize it as a Web service on OpenStack with a RESTful webAPI.
You can either provide a small purely text-based output GUI or provide a HTML5 Canvas GUI, simple, no framing coordinate system required. Users 1, 2, and 3 can see the output. User 3 does not have access to that GUI.

posted @ 2013-06-23 20:52 paulwong 阅读(296) | 评论 (0)编辑 收藏

仅列出标题
共115页: First 上一页 64 65 66 67 68 69 70 71 72 下一页 Last