自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Dai丶Yu

默默学习ing..

  • 博客(47)
  • 资源 (3)
  • 收藏
  • 关注

原创 Mac上设置 使用终端打开sublime text

记录配置过程:使用sublime提供的命令行工具。这个命令行工具位于/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl,缺省情况下这个命令不在$PATH环境中,需要通过下面这个命令做个符号链接。执行ln -s /Applications/Sublime\ Text\ 2.app/Contents/Share

2015-08-25 14:19:27 1018

原创 mac10.10上安装lxml

安装scrapy过程中 安装lxml始终报错:In file included from src/lxml/lxml.etree.c:239:    /private/tmp/pip-build-2WNYG9/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not fo

2015-08-14 16:00:29 743

原创 网络爬虫整理

最近在为自己搭建的网站忙碌,记录下爬虫资料除了基础的利用python re,beautifulsoup爬取之外,可以连接mysql 数据库将爬取信息导入数据库,例子如下:-*- coding: utf-8 -*-import MySQLdb as mdbimport systry: con=mdb.connect('localhost','user','password','

2015-02-07 10:59:19 433

原创 记录ubuntu安装python科学计算工具包numpy

sudo apt-get install python-scipysudo apt-get install python-numpysudo apt-get install python-matplotlibpython

2014-11-13 23:22:59 502

转载 JUNIT在Eclipse中的使用

我们在编写大型程序的时候,需要写成千上万个方法或函数,这些函数的功能可能很强大,但我们在程序中只用到该函数的一小部分功能,并且经过调试可以确定,这一小部分功能是正确的。但是,我们同时应该确保每一个函数都完全正确,因为如果我们今后如果对程序进行扩展,用到了某个函数的其他功能,而这个功能有bug的话,那绝对是一件非常郁闷的事情。所以说,每编写完一个函数之后,都应该对这个函数的方方面面进行测试,这样的测

2014-07-09 10:04:25 433

转载 Maven入门学习

这个入门篇分上下两篇。本文着重动手,用 maven 来构建运行 hellow world 程序,体会一下不用任何 IDE ,只用 maven 是咋回事。然后下篇就讲解一下 maven 的核心概念。写这两篇文章特意回避了复杂的示例,也不使用 IDE ,目的是排除干扰,着重于 maven 本身。本文的源代码可从这里下载。  Apache Maven 是做什么用的?Maven 是一个项目

2014-07-09 09:41:57 371

原创 自动为Myeclipse添加作者等信息

windows-->preferenceJava-->Code Style-->Code Templatescode-->new Java files编辑它${filecomment}${package_declaration}/*** @author 作者 E-mail:* @version 创建时间:${date} ${time}* 类说明*/

2014-07-08 16:08:14 909

转载 Spring配置Quartz任务调度框架教程

原文地址:http://blog.csdn.net/yuebinghaoyuan/article/details/9049391在J2EE中Spring与Quartz的配置使用。 在操作时,注意版本问题,上篇博客也提到,Quartz中1.8版本中的JobDetail,SimpleTrigger,CornTrigger都是类,而在2.0.2版本中都是接口。若在与spring结合时

2014-07-08 15:41:53 352

转载 Java泛型总结

下面是一些有关Java泛型的总结:原文地址:http://developer.51cto.com/art/200909/153983.htm普通泛型class Point{  // 此处可以随便写标识符号,T是type的简称   private T var ; // var的类型由T指定,即:由外部指定   public T getVar(){ // 返回值的类型由外部决定  

2014-07-03 11:06:13 318

转载 MyEclipse中添加User Library(区别于referenced libraries)

在MyEclipse中有两种常用的添加引用的jar包的方法,一个就是添加Referenced Library,这种方式很简单,出选中项目右键->import之外,还可以直接向WebRoot->WEB-INF->lib中复制粘贴jar包文件,缺点是下次添加同样的jar包时任然要这样找到jar包文件,然后重复工作。第二个就是添加User Library,具体做法如下:1. 选中工程右键->build

2014-07-02 15:50:37 574

转载 json知识总结

Java构造和解析Json数据的两种方法详解一      在www.json.org上公布了很多JAVA下的json构造和解析工具,其中org.json和json-lib比较简单,两者使用上差不多但还是有些区别。下面首先介绍用json-lib构造和解析Json数据的方法示例。      用org.son构造和解析Json数据的方法详解请参见我下一篇博文:Java构造和解析J

2014-07-02 14:49:31 387

转载 hashSet,hashMap,hashTable总结

yua(1)HashSet是set的一个实现类,hashMap是Map的一个实现类,同时hashMap是hashTable的替代品(为什么后面会讲到).(2)HashSet以对象作为元素,而HashMap以(key-value)的一组对象作为元素,且HashSet拒绝接受重复的对象.HashMap可以看作三个视图:key的Set,value的Collection,Ent

2014-07-02 14:18:20 423

转载 scanner学习

java.util包原文地址:http://blog.csdn.net/zsw2zkl/article/details/72103701)首先记住它的8中构造方法同PrintWriter类Scanner类同样可以直接对文件进行操作Scanner(File source)  构造一个新的 Scanner,它生成的值是从指定文件扫描的,底层平台的默认字符集转换成字符。 Scanne

2014-06-24 11:15:09 439

转载 转:Shell 编程--本文结合大量实例阐述如何编写一个shell脚本。

转自:情報官世界  本文结合大量实例阐述如何编写一个shell脚本。  为什么要进行shell编程  在Linux系统中,虽然有各种各样的图形化接口工具,但是sell仍然是一个非常灵活的工具。Shell不仅仅是命令的收集,而且是一门非常棒的编程语言。您可以通过使用shell使大量的任务自动化,shell特别擅长系统管理任务,尤其适合那些易用性、可维护性和便携性比效率更重要的

2014-06-19 15:39:11 470

转载 ${pageContext.request.contextPath}

JSP中究竟采用绝对路径还是采用相对路径随着所采用技术的越来越复杂,这个问题也变得越来越难以解决。 1)采用相对路径遇到的问题 l         相对路径固然比较灵活,但如果想复制页面内的代码却变得比较困难,因为不同的页面具有不同的相对路径,复制后必须修改每一个连接的路径。 l         如果页面被多于一个的页面所包含,那么被包含页面中的相对路径将是不正确的。 l     

2014-06-19 10:12:45 334

转载 getHibernateTemplate()与getSession()方法的区别

自动生成hibernate配置文件的时候,会在dao层用到getSession()方法来操作数据库记录,但是他还有个方法getHibernateTemplate(),这两个方法究竟有什么区别呢?1.使用getSession()方法你只要继承sessionFactory,而使用getHibernateTemplate()方法必须继承 HibernateDaoSupport当然包括sessionF

2014-06-11 10:55:53 514

原创 定义serialVersionUID的作用与意义整理

实现java.io.Serializable这个接口是为序列化,serialVersionUID 用来表明实现序列化类的不同版本间的兼容性。如果你修改了此类, 要修改此值。否则以前用老版本的类序列化的类恢复时会出错。实现后如果你用的是工具的话会出来警告,他会提示你,可以自动生成private static final long serialVersionUID = 1L; 为了在反序列

2014-06-11 10:41:48 8370 1

原创 javax.servlet.jsp.pagecontext cannot be resolved to a type异常记录

导入一个项目,Myeclipse报错:javax.servlet.jsp.pagecontext cannot be resolved to a type

2014-06-11 09:05:02 853

原创 leetcode17.PalindromePartitioning

java:package leetcode15.PalindromePartitioning;import java.util.ArrayList;import java.util.Hashtable;public class Solution { public static void main(String[]args){ String s="aab"; System

2014-06-05 10:38:39 396

原创 leetcode16.cloneGraph

java:package leetcode14.cloneGraph;import java.util.ArrayList;import java.util.Hashtable;import java.util.LinkedList;class UndirectedGraphNode{ int label; ArrayList neighbors; UndirectedGr

2014-06-05 10:37:09 314

原创 leetcode15.candy

问题描述如下:There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at

2014-06-05 09:20:57 495

原创 leetcode14.gasStation

问题描述如下:There are N gas stations along a circular route, where the amount of gas at stationi is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from stati

2014-06-05 09:18:59 513

原创 leetcode13.singleNumber

问题描述:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it withou

2014-06-05 09:16:14 444

转载 leetcode12.wordBreak

代码如下:package leetcode10.WordBreak;import java.util.HashSet;import java.util.LinkedHashSet;import java.util.Set;/**Word Break Given a string s and a dictionary of words dict, determine if s

2014-05-30 09:16:45 469

原创 leetcode11.Linked List Cycle II

问题比之前的那个问题麻烦了点iven a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?

2014-05-29 14:07:13 530

原创 leetcode10.Linked List Cycle

问题如下:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?意思就是用

2014-05-29 12:41:44 575

原创 Leetcode9.reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,given 1234 --> 1423jie

2014-05-29 11:21:14 446

原创 leetcode8.binaryTree后续遍历

问题不描述了,后续遍历二叉树,

2014-05-29 09:55:48 488

转载 leetcode7.binary tree前序遍历

题目:http://oj.leetcode.com/problems/binary-tree-preorder-traversal/Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3},   1    \

2014-05-29 09:06:41 525

原创 shell学习资料整理

闲来无事,继续学习shell,在CU上

2014-05-27 13:28:16 306

转载 leetcode6.LRU Cache

原文地址:http://blog.csdn.net/whuwangyi/article/details/15495845实现代码: class Node { Node prev; Node next; SimpleEntry entry; } private Node head = null; private HashMap map = new HashMap();

2014-05-21 15:02:04 299

原创 leetcode4.SortLink 及总结 归并排序

问题:归并一个链表

2014-05-21 13:43:20 742

原创 leetcode5:Insertion Sort Link

问题如下:Sort a linked list using insertion sort.定义节点类

2014-05-21 12:32:50 315

转载 leetcode 难度及频率 所用数据结构

LeetCode Question Difficulty Distribution : Sheet1        IDQuestionDiffFreqData StructureAlgorithms      

2014-05-19 15:08:53 1112

转载 Leetcode3: Max Points on a Line

/** * Definition for a point. * class Point { * int x; * int y; * Point() { x = 0; y = 0; } * Point(int a, int b) { x = a; y = b; } * } */public class Solution { public in

2014-05-19 14:59:48 316

原创 leetcode1:Reverse Words in a String

问题如下Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".java程序如下:package leetcode1.ReverseWordsinAString;public cl

2014-05-19 13:00:25 406

原创 leetcode.2:Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1", "+",

2014-05-19 11:11:12 353

原创 自己看鸟哥的书总结的常用linux指令

之前转载了一个linux指令合集,现在

2014-05-16 11:16:37 586

原创 捕鱼问题的java实现

今天看到了一个捕鱼问题,觉得很不错,自己也跟着琢磨了半天,写了java的实现程序,

2014-05-16 11:06:22 1417

原创 总结Ubuntu下mysql的安装与启动等工作

最近一直在自己看linux的东西,学习了一下开发换

2014-05-15 12:44:29 440

Json所需要的jar包

json所需要的Jar包,经本人测试是可以的,最近在做这方面,也共享下材料给大家

2014-07-02

项目管理软件trac的使用方法

项目管理软件trac管理软件的使用方法,网上大多是trac环境的安装方法,本文档着重介绍了trac的使用方法

2011-07-12

空空如也

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

TA关注的人

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