自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

二十三小时

Coding is not the whole story

  • 博客(12)
  • 资源 (22)
  • 收藏
  • 关注

原创 Java:Access password protected URL

问题描述当访问要密码验证的网址的时候,通常会弹出一个对话框,指示用户输入用户名和密码,那么用Java代码去读取URL对应的内容时,如何设置好登陆凭证?解决方案 URL url = new URL("http://user:password@10.10.12.72:8080/data/retrieve?rid=109000&pid=community"); URLConn

2015-03-31 14:57:26 867

原创 Spring Boot MongoRepository

在Spring Boot中使用MongoDB作为spring data的话,可以使用如下方式来提供多种数据查询服务。这些接口中的方法都不需要实现,Spring Boot自动扫描并解析方法名,生成对应的方法实现。public interface PersonRepository extends Repository<User, Long> { List<Person> findByEmailAddr

2015-03-27 14:49:20 3759

原创 Spring Boot reads Json String as an object

Spring Boot JacksonSpring boot uses jackson to serialize the object and deserialize a string as an object.an example of serializationThe following code will automatically convert the ResourceDefinition

2015-03-27 10:21:00 1906

原创 算法:数组中只出现了一次的数字

题目一个整型数组里除了两个数字之外,其他的数字都是出现了两次。请写出程序找出这两个只出现了一次的数字。要求时间复杂度是O(n), 空间复杂度是O(1)。题解tip1:如果该数组A中只有一个数字出现了一次,其他的数字都出现了两次,那么求出该数字就很简单,其值就是 A[0] ^ A[1] ^ … ^ A[n-1] 因此就需要想办法,将问题转换为tip1里的问题场景。 tip2:将题目中的数组的每个数

2015-03-20 23:44:29 687

原创 关于Spring.io官网Spring Session Restful example的问题

问题描述当使用SpringBoot提供Restful接口服务时,可以非常方便快速地通过SpringBoot来发布。然而需要考虑的问题:使用安全机制使用外在数据库保存session针对安全机制,官网提供了一个demo: 官网demo地址为:http://docs.spring.io/spring-session/docs/current/reference/html5/guides/rest.

2015-03-20 15:14:22 2629

原创 关于Java和CPP强制类型转换

1,当基本类型由下往上转的时候,会有隐式的类型转换,比如float f = 0.1f;double d = f; // 默认向上转换不需要显示指定 double d = (double) f;2,在【java】中,然后向下转换的时候,却是需要的:float f = (float) d; // d是一个double类型f = 3.1415926f; // 在数字末尾加上 f,以表明这一个数字是fl

2015-03-18 08:10:12 861

转载 Python发送POST请求的简单例子

import urllib,urllib2def doPost(self,data1,data2): data = urllib.urlencode({'data1':data1,'data2':data2}) request = urllib2.Request('http://www.xxx.com/test',data) response = urllib2.urlope

2015-03-11 10:34:38 6965

原创 SpringBoot uses mysql as the database

When using mysql in the springboot project, we need to config the application.properties to enable it.first, config the application.propertiesapplication.properties# application.propertiesspring.dat

2015-03-10 11:26:55 1806

原创 Intellij idea中gradle设置多源文件目录

问题描述Intellij idea开发工具来开发Java工程的时候,通常会使用ant、maven、groovy、gradle等工具来管理项目依赖。我在工程中使用了较新的gradle作为管理工具。但是在运行build.gradle的build任务时,通常需要将多个目录设置为源代码文件目录。否则一旦build完了以后,某些目录中的源代码会被忽视,而认为不是源代码。比如说如下图所示: - 该图中w

2015-03-09 10:16:10 12345

原创 JumpNode递归和非递归访问

JumpNode的定义结构为如下所示:struct JumpNode { int data; //存储数据 int order; // 记录访问次序,初始化均为0 JumpNode *jump, *next; // next为线性下一节点,jump为跳跃到下一节点 JumpNode(int d): data(d), order(-1), jump(NULL), nex

2015-03-04 22:54:29 699

原创 非递归地中序遍历BST

使用栈来辅助遍历平衡二叉树// defines the data structure for BST Nodestruct Node { int data; Node *left, *right; Node(int d): data(d), left(NULL), right(NULL) {}};void inorder_traversal(Node *root) {

2015-03-04 21:23:05 946

原创 Miller_rabin & pollard_rho 快速素数检和合数因式分解

Miller_rabin & pollard_rho 快速素数检和合数因式分解

2015-03-02 10:39:04 844

hadoop 2.2.0 for eclipse plugin插件

hadoop 2.2.0 for eclipse plugin插件 可以直接使用 放入windows下Eclipse的plugin文件夹中即可

2014-11-02

hadoop eclipse plugin 源代码

hadoop eclipse plugin 源代码 需要自己编译

2014-11-02

An Introduction to the Analysis of Algorithms

An Introduction to the Analysis of Algorithms_2nd Edition_Robert Sedgewick_2013 (2).pdf ) 算法分析

2014-09-01

Elements of Programming

Elements of Programming Addison-Wesley.

2014-09-01

Combinatorial Algorithms Second Edition

Combinatorial Algorithms Second Edition

2014-09-01

Analytic Combinatorics [Philippe Flajolet / Robert Sedgewick ]

Analytic Combinatorics [Philippe Flajolet / Robert Sedgewick ] Analytic combinatorics aims to enable precise quantitative predictions of the properties of large combinatorial structures. The theory has emerged over recent decades as essential both for the analysis of algorithms and for the study of scientific models in many disciplines, including probability theory, statistical physics, computational biology, and information theory. With a...

2014-09-01

算法艺术与信息学竞赛

算法艺术与信息学竞赛

2013-05-10

The art of unix programming, UNIX编程艺术

The art of unix programming UNIX编程艺术 英文版

2013-05-10

python api pdf

english version of python api document from original websites

2012-11-14

算法导论 第三版 英文版

算法导论 第三版 英文版

2012-09-24

操作系统习题集(第五版).pdf

操作系统习题集(第五版).pdf

2011-02-23

算法导论的课后习题答案

算法导论原书的习题答案,非常详细。是提高编程水平的必备书。

2010-05-22

算法导论IntroductionToAlgorithm

算法导论IntroductionToAlgorithm,原书电子版。各种编程的算法基础,必备版

2010-05-22

Java编程思想第四版(中文版)

这个是很有名的一本书。Java学习的必备书

2010-05-22

causes of love

this is about what causes the love (in English)

2010-05-22

数据结构c++ 专业版数据结构c++

专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版专业版

2009-09-08

空空如也

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

TA关注的人

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