EJB --- JBoss 开发环境搭配
一. EJB 简单介绍:
EJB (Enterprise JavaBean) 是 J2EE (javaEE) 的一部分,称为 Java 企业 Bean,是 Java 的核心代码,分别是会话 Bean(Session Bean),实体 Bean(Entity Bean)和消息驱动 Bean(MessageDriven Bean)
二. 开发环境搭建:...
分类:
其他好文 时间:
2015-07-17 18:58:18
阅读次数:
167
Problem Description
Alice and Bob are playing a game on an undirected graph with n (n is even) nodes and m edges. Every node i has its own weight Wv, and every edge e has its own weight We.
They...
分类:
其他好文 时间:
2015-07-17 19:00:04
阅读次数:
111
一、类加载器原理
JVM将class文件字节码文件加载到内存中, 并将这些静态数据转换成方法区中的运行时数据结构,在堆中生成一个代表这个类的java.lang.Class
对象,作为方法区类数据的访问入口。
二、类缓存
标准的Java SE类加载器可以按要求查找类,但一旦某个类被加载到类加载器中,它将维持加载(缓存)一段时间。不过,JVM垃圾收集器可以回收这些Class过象。
三...
分类:
其他好文 时间:
2015-07-17 19:00:15
阅读次数:
124
E. Soldier and Traveling
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
In the country there are n cities a...
分类:
编程语言 时间:
2015-07-17 18:57:46
阅读次数:
193
部分内容参考http://www.imooc.com/
内部类:什么是 Java 中的内部类
问:什么是内部类呢?
答:内部类( Inner Class )就是定义在另外一个类里面的类。与之对应,包含内部类的类被称为外部类。
问:那为什么要将一个类定义在另一个类里面呢?清清爽爽的独立的一个类多好啊!!
答:内部类的主要作用如下:
1. 内部类提供了更好的封装,可以把内部类隐藏在外部类之内...
分类:
编程语言 时间:
2015-07-17 18:57:04
阅读次数:
136
去年基于5.0开发的时候,自己用coreText编写了一个富文本,所有的效果都实现的很好。但是没有去测试效率,不过在cell重用的时候表现不错,在4s上面也不会卡顿。
唯一一个问题就是,在使用AL的时候,不方便。所以,此次新版本是基于7.0开发。决定使用textkit重新编写一次。
下面是一些基本的使用:
@interface MMTextAttachment : NSTextAttachm...
分类:
移动开发 时间:
2015-07-17 18:56:53
阅读次数:
266
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
思路:二进制加法,比较简单。代码如下:
public class Solution {
public String addBinary(Strin...
分类:
其他好文 时间:
2015-07-17 18:56:43
阅读次数:
129
Android基础入门教程——3.6 响应系统设置的事件(Configuration类)标签(空格分隔): Android基础入门教程本节引言:
本节给大家介绍的Configuration类是用来描述手机设备的配置信息的,比如屏幕方向,
触摸屏的触摸方式等,相信定制过ROM的朋友都应该知道我们可以在:
frameworks/base/core/java/android/content...
分类:
移动开发 时间:
2015-07-17 18:57:14
阅读次数:
214
此段来自:http://baike.baidu.com/link?url=5BxiVhAiQ3LLeLLs_wYrDjQW55DaksohkqMNm5KJdhkLP5BsxQ_WbyqDuhjnvl90ys9UAfr_mcNY-k6mRKrstq#3_7
二分查找又称折半查找,优点是比较次数少,查找速度快,平均性能好;其缺点是要求待查表为有序表,且插入删除困难。因此,折半查找方法适用于不经常...
分类:
其他好文 时间:
2015-07-17 18:57:59
阅读次数:
134
在测试spark计算时,将作业提交到yarn(模式–master yarn-cluster)上,想查看print到控制台这是imposible的,因为作业是提交到yarn的集群上,so 去yarn集群上看日志是很麻烦的,但有特别想看下print的信息,方便调试或者别的目的 在Spark的conf目录下,把log4j.properties.template修改为log4j.properties,原来的...
分类:
其他好文 时间:
2015-07-17 18:55:50
阅读次数:
159
Post Office
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 17110
Accepted: 9226
Description
There is a straight highway with villages alongside the highway....
分类:
其他好文 时间:
2015-07-17 18:55:29
阅读次数:
96
《Openstack ceilometer监控项扩展》(
http://eccp.csdb.cn/blog/?p=352 )主要介绍了对虚拟机监控项扩展, 比较简单。如何在ceilometer框架基础上,增加对宿主机、服务等的监控?本文以宿主机监控为例,详细介绍扩展方法。
首先,总体介绍Ceilometer采集监控数据到持久化存储的流程,在compute节点上通过pollster的轮询机...
分类:
其他好文 时间:
2015-07-17 18:55:18
阅读次数:
771
Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
思路:题目也...
分类:
其他好文 时间:
2015-07-17 18:57:42
阅读次数:
162
最近工作中遇到了这样的需求:
我用fastjson序列有序map的时候,tojson方法会让这个map无序,tojsonstring虽然能保留map的结构,不过会让结果里含有\(我是jsonStrin套jsonString,java会出现转义字符)
解决方案JSONObject有个传入boolean值的构造函数
如果传入的是true就代表保留数据结构的顺序
这时候我们可以吧要序列化的...
分类:
Web程序 时间:
2015-07-17 18:56:35
阅读次数:
168
Simplify Path
Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/", => "/home"
path = "/a/./b/../../c/", => "/c"
click to show corner cases.
Corner Cas...
分类:
其他好文 时间:
2015-07-17 18:55:42
阅读次数:
113
Android开发之获取布局填充器的三种方式第一种 : LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.item_listview, nul...
分类:
移动开发 时间:
2015-07-17 18:56:53
阅读次数:
137
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2015-07-17 18:56:10
阅读次数:
108