自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 资源 (4)
  • 问答 (2)
  • 收藏
  • 关注

转载 检查网页(url)重复

问题:有10亿个url,每个url对应一个非常大的网页,如何检测网页是否重复。解答: 网页大,数量多,要把它们载入内存是不现实的。 因此我们需要一个更简短的方式来表示这些网页。而hash表正是干这事的。 我们将网页内容做哈希,而不是url,这里不同url可能对应相同的网页内容。 将每个网页转换为一个哈希值后,我们就得到了10亿个哈希值, 很明显,两两对比也是非常耗时的O(n2 )。因此我们需要使用其

2016-10-07 19:00:43 2568

原创 字符串的非空子集

问题:编写一个函数,写出一个字符串的非空子集。解答:对于一个字符串中的每个字符都只有选与不选两种情况,每次需要选择i个字符组成字串,如果选则剩下有需要选择i-1个元素,如果不选则剩下需要选择i个元素。结束条件为i个元素选择完毕。 public static void run(String string){ ArrayList<String> list = new ArrayList<

2016-10-07 18:47:47 1338

原创 随机洗牌算法

问题:编写一个函数模拟斗地主游戏,将54张牌随机的发给三位玩家,最后剩余3张底牌。解答: (1)使用随机函数,随机生成54个数,生成的随机数如果存在,则重新随机生成,函数如下: public void run(int b, ArrayList<Integer> list){ int num = (int) (Math.random()*b); boolean fla

2016-10-07 18:29:33 550

原创 海量数据查找一个数是否存在

问题:给定一个集合,集合中包含50亿级以上的整数(无序,不重复),给定一个算法,查找该集合中是否存在某个数(内存限制1G) Answer: (1)40亿数据全部放入内存中,所需要的内存数:40*10^8*4B=16G这个明显无法一次性装入内存中。但是,如果我们用计算机中的一位来表示某个数出现与否,出现为1,不出现为0, 就可以减少内存使用量。比如在一块连续的内存区域,15出现,则将第15位置1。

2016-10-05 18:11:51 3761

openstack部分源码

openstack组件的client代码

2016-03-01

horizon源码

openstack中关于horizon源码

2016-03-01

spring mvc jar

com.springsource.net.sf.cglib-2.2.0

2015-09-30

javaee API

Java EE 5 Platform Packages javax.activation The JavaBeans(TM) Activation Framework is used by the JavaMail(TM) API to manage MIME data. javax.annotation javax.annotation.security javax.ejb The javax.ejb package contains the Enterprise JavaBeans classes and interfaces that define the contracts between the enterprise bean and its clients and between the enterprise bean and the EJB container. javax.ejb.spi The javax.ejb.spi package defines interfaces that are implemented by the EJB container. javax.el Provides the API for the Unified Expression Language shared by the JSP 2.1 and JSF 1.2 technologies. javax.enterprise.deploy.model Provides Tool Vendor implementation classes. javax.enterprise.deploy.model.exceptions Provides Tool Vendor exception implementation classes. javax.enterprise.deploy.shared Provides shared objects for Tool Vendor and Product Vendor implementation classes. javax.enterprise.deploy.shared.factories Provides shared factory manager object for Tool Vendor and Product Vendor implementation classes. javax.enterprise.deploy.spi Provides J2EE Product Vendor implementation classes. javax.enterprise.deploy.spi.exceptions Provides J2EE Product Vendor deployment exception implementation classes. javax.enterprise.deploy.spi.factories Provides J2EE Product Vendor deployment factory implementation classes. javax.enterprise.deploy.spi.status Provides J2EE Product Vendor deployment status implementation classes. javax.faces Top level classes for the JavaServer(tm) Faces API. javax.faces.application APIs that are used to link an application's business logic objects to JavaServer Faces, as well as convenient pluggable mechanisms to manage the execution of an application that is based on JavaServer Faces. javax.faces.component Fundamental APIs for user interface components. javax.faces.component.html Specialized user interface component classes for HTML. javax.faces.context Classes and interfaces defining per-request state information. javax.faces.convert Contains classes and interfaces defining converters. javax.faces.el DEPRECATED Classes and interfaces for evaluating and processing reference expressions. javax.faces.event Interfaces describing events and event listeners, and concrete event implementation classes. javax.faces.lifecycle Classes and interfaces defining lifecycle management for the JavaServer Faces implementation. javax.faces.model Standard model data beans for JavaServer Faces. javax.faces.render Classes and interfaces defining the rendering model. javax.faces.validator Interface defining the validator model, and concrete validator implementation classes. javax.faces.webapp Classes required for integration of JavaServer Faces into web applications, including a standard servlet, base classes for JSP custom component tags, and concrete tag implementations for core tags. javax.interceptor The javax.interceptor package contains classes and interfaces for use with EJB interceptors. javax.jms The Java Message Service (JMS) API provides a common way for Java programs to create, send, receive and read an enterprise messaging system's messages. javax.jws javax.jws.soap javax.mail The JavaMailTM API provides classes that model a mail system. javax.mail.event Listeners and events for the JavaMail API. javax.mail.internet Classes specific to Internet mail systems. javax.mail.search Message search terms for the JavaMail API. javax.mail.util Utility classes. javax.management.j2ee Provides the J2EE Management Enterprise Bean component (MEJB) interfaces. javax.management.j2ee.statistics Provides the standard interfaces for accessing performance data from J2EE managed objects Package Specification JSR 77, J2EE Management Related Documentation For overviews, tutorials, examples, guides, and tool documentation, please see: J2EE Tools javax.persistence The javax.persistence package contains the classes and interfaces that define the contracts between a persistence provider and the managed classes and the clients of the Java Persistence API. javax.persistence.spi The javax.persistence.spi package defines the classes and interfaces that are implemented by the persistence provider and the Java EE container for use by the container, provider, and/or Persistence bootstrap class in deployment and bootstrapping.

2015-08-05

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除