自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(209)
  • 资源 (3)
  • 收藏
  • 关注

原创 IntelliJ IDEA Live Templates for Unit Testing

 http://vansande.org/2015/03/26/intellij_idea_live_templates_for_unit_testing/

2017-12-12 17:29:59 218

原创 memory management in java

https://www.journaldev.com/2856/java-jvm-memory-model-memory-management-in-java

2017-12-07 15:25:06 229

原创 Read write text file in shell

#!/bin/bashcontains() { string="$1" substring="$2" if test "${string#*$substring}" != "$string" then return 0 # $substring is in $string else return 1 ...

2017-11-21 22:57:53 210

原创 Easiest way to read write files in java 8

Path path = Paths.get(getClass().getClassLoader() .getResource("fileTest.txt").toURI()); //relative to the classString content = new String(Files.readAllBytes(path));try (Stream<Stri...

2017-10-25 15:46:36 141

原创 start sublime from terminal on mac

Put this in the profile. If you use fish, put it in ~/.config/fish/config.fish ln /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/st 

2017-07-19 16:41:58 137

原创 Tomcat 在启动时开启调试

很容量找到怎么在tomcat中远程调试的文章。如http://stackoverflow.com/questions/6733849/remote-debugging-in-intellij-tomcat 但是这种调试只能在tomcat启动完成之后才能开启。但是我们有时想调试tomcat启动时用到的代码,如一应用的初始化代码。其实很简单。 <jvmarg line="-...

2017-03-31 11:47:00 343

原创 Append path to $PATH in fish shell on mac & linux

The best way I have found to persistently add a path to your $PATH is set-U fish_user_paths $fish_user_paths ~/path/name This prepends to $PATH. And since it's persistent, the path stays in ...

2016-11-01 18:11:07 159

原创 building microservices summary

building microservices summary

2016-06-29 15:29:55 101

原创 Integer Break

  public class IntegerBreak { public int integerBreak(int n) { if (n == 2) { return 1; } if (n == 3) { return 2; } if...

2016-05-17 11:48:10 91

原创 Longest Increasing Subsequence

  public class Solution { public int lengthOfLIS(int[] nums) { if(nums.length==0){ return 0; } int[] lens= new int[nums.length]; len...

2016-05-17 11:22:52 93

原创 Top K Frequent Elements

 import java.util.*;public class Solution { public List<Integer> topKFrequent(int[] nums, int k) { HashMap<Integer, Integer> numberOccur = getNumOccur(nums); ...

2016-05-17 11:16:25 98

原创 Setting environment variables via launchd.conf no longer works in OS X Yosemite/

Create an environment.plist file in ~/Library/LaunchAgents/ with this content:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple...

2016-05-11 16:40:40 151

原创 Extend image disk size in KVM

1. Switch to root2. sudo qemu-img resize images/win2008.img +20G3. Start windows vm and go to server manager4. Server Manager->Storage->Diskmanagement5. Extend volume of C with the adde...

2015-07-14 11:35:05 138

原创 Use Fetch in NHibernate to solve N+1

 http://bartwullems.blogspot.com/2012/03/nhibernate-eager-fetching.html NHibernate eager fetching NHibernate supports the concept of eager fetching for a long time. However there are some t...

2014-06-17 14:32:59 129

原创 进程和线程的区别

 http://www.cnblogs.com/lmule/archive/2010/08/18/1802774.html

2014-06-08 17:12:47 98

原创 SQL where 条件顺序对性能的影响有哪些

SQL where 条件顺序对性能的影响有哪些http://blog.sina.com.cn/s/blog_4586764e0100mdif.html Where子句中条件的顺序对性能没有影响(不管是CBO还是RBO优化器模式),注意,额外说一下,这里只是说条件的顺序,不包含表的顺序。在RBO优化器模式下,表应按结果记录数从大到小的顺序从左到右来排列,因为表间连接时,最右边的表会被放...

2014-05-20 16:31:48 430

原创 Install android apk from PC

http://developer.android.com/tools/help/adb.html#moveadb install <path_to_apk> 

2013-12-02 17:48:57 129

原创 java读取文件内容

 //将要读的文件文件放在resources/xml/目录下, resources设置成source folder public String getContent(String modelFileName) { InputStream fileStream = getClass().getClassLoader().getResourceAsStream("xm...

2013-11-19 15:37:44 107

原创 Will android (java) UUID.randomUUID() return repeated UUIDs?

Theoretically, I don't think this method will return repeated UUIDs, even from different devices.Let's check the documentation of android: http://developer.android.com/reference/java/util/UUID.html....

2013-11-19 06:11:35 121

原创 start SimpleHTTPServer with python

 python -m SimpleHTTPServer

2013-11-06 23:18:58 189

原创 Keep ProgressDialog while rotate the phone

 Just add the following to the activity in AndroidManifest.xml <activity android:name=".view.cohort.FormTemplateWizardActivity" android:label="Download Form Templates" android:configChanges...

2013-10-21 22:56:43 108

原创 Maven to add v7 GridLayout support

1. check out the deployer https://github.com/mosabua/maven-android-sdk-deployer2. cd maven-android-sdk-deployer/extras/compatibility-v7-gridlayout3. mvn install add the following into the pom...

2013-10-12 17:18:09 93

原创 fish config.fish

vi ~/.config/fish/config.fish

2013-09-19 22:02:12 522

原创 Android resources

 Android Asset Studio: http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html Inspired UI: http://android.inspired-ui.com/ Android cheatsheet for graphic designershttp://...

2013-09-11 15:13:06 142

原创 git install skip tests

mvn clean install -DskipTests

2013-08-27 20:26:40 120

原创 Default shell

How do I make fish my default shell?Edit /etc/shells as root, and add the line (if missing):/usr/local/bin/fishThen run:chsh -s /usr/local/bin/fish To change back to bashchsh -s /bin/ba...

2013-08-13 15:40:33 165

原创 Setting environment variables in OS X?

stackoverflow.com/questions/135688/setting-environment-variables-in-os-x Bruno is right on track. I've done extensive research and if you want to set variables that are available in all GUI ap...

2013-08-13 02:43:14 169

原创 The 30 CSS Selectors you Must Memorize

The 30 CSS Selectors you Must Memorize So you learned the base id, class, and descendant selectors – and then called it a day? If so, you’re missing out on an enormous level of flexibility. While...

2013-07-05 21:51:37 261

原创 git strip commits corresponding to hg strip

git reset --hard HEAD~1 The ending number represents the number of commits to remove.

2013-06-28 03:32:25 98

原创 git alias for corresponding "hg in" "hg out"

hg outgit config --global alias.out "log origin/master..master"use "git out"  hg ingit config --global alias.in "log master..origin/master"use "git in"

2013-06-28 03:03:24 104

原创 html marquee

<marquee behavior="scroll" direction="up" width="100" height="250" scrollamount="2" scrolldelay="10""> Your content goes here<br/> Your content goes h

2013-05-14 17:11:42 94

原创 Web应用需要考虑的安全问题

1. SQL注入2. CSRF3. XSS4. 后台异常不要显示给用户,这样给黑客跟踪到后台技术及代码结构提供了便利,会大大降低黑客攻击的难度。

2013-05-07 14:07:28 128

原创 javascript HTML encode

  _htmlEncode: function (value){     return $('<div/>').text(value).html(); }

2013-04-22 10:44:19 93

原创 function to convert ticks to DatetimeOffset

--function to convert ticks to DatetimeOffsetif object_id(N'GetTimeFromTicks', N'FN') is nullbeginexecute dbo.sp_executesql @statement = N'CREATE FUNCTION dbo.GetTimeFromTicks(@Ticks BIGINT)...

2013-04-08 17:05:37 115

原创 Install resharper plugin for Concordion

http://www.gallio.org/ download and install

2013-03-28 14:57:10 78

原创 Authentication related technologies

SSL SSO WIF OAuth Cryptographic nonce Digest Access Authentication  MD5 Basic Access Authentication  Base64

2012-11-08 17:21:39 97

原创 The database principal owns a schema in the database, and cannot be dropped

  http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/  SELECT s.nameFROM sys.schemas sWHERE ...

2012-08-06 15:53:28 300

原创 sql server function example to find managed employees

Prepare data:USE AdventureWorks2008GOCREATE TABLE HumanResources.Employee2( EmployeeID int NOT NULL, ManagerID int NULL REFERENCES HumanResources.Employee2(EmployeeID), JobTitle nva...

2012-08-04 11:44:30 83

原创 c#读取文件目录path

    private static string GetFullName() { var current_dir = Path.GetDirectoryName(new Uri(Assembly.GetCallingAssembly().CodeBase).LocalPath); return ...

2012-07-30 20:07:40 107

原创 SQL Server Isolation Levels By Example

To check the current database isolation level, use: DBCC useroptions  http://www.gavindraper.co.uk/2012/02/18/sql-server-isolation-levels-by-example/SQL Server Isolation Levels By...

2012-07-27 22:02:27 104

jboss in action

One of the things you quickly realize when you work with any of the technologies covered by the Java EE umbrella is that many things are part of the specification, and some things are left as “implementation details” or left up to the implementer’s discretion. In practice, this means that any time you learn a Java EE technology, besides learning the fundamentals about that technology, you also need to learn how to apply or configure the technology in the environment in which you wish to deploy it. If your deployment environment of choice is the JBoss Application Server, then this book is for you because it covers those areas that are outside the scope of the specifications. In this book, we cover a wide variety of technologies and show you how to configure those technologies specifically for use in the JBoss Application Server. Naturally, this can’t be done in a vacuum, so we provide simple examples that illustrate the technology and then walk you through the steps necessary to configure things such as deployment descriptors, access control, and encryption. Our intent isn’t to describe every nuance of any particular technology. For that, we recommend that you read books particular to those technologies (and we provide references at the end of most chapters). Instead, use this book to learn how to use the technology within the JBoss Application Server. We believe that you learn more by trying things out for yourself than by reading about how it’s done. By keeping our examples simple, we’re able to provide complete source code, including configuration files, within the book itself. If you want, you can try the examples using only the text in the book. All you need is a text editor. But we don’t provide build scripts in the book; instead, we provide diagrams showing the contents of theresulting packages (JAR, WAR, EAR, and so on). We assume that you can use whatever tools you’re familiar with to compile and package the applications.

2009-03-28

Java Persistence With Hibernate

We had three goals when writing this book, so you can read it as ■ A tutorial for Hibernate, Java Persistence, and EJB 3.0 that guides you through your first steps with these solutions ■ A guide for learning all basic and advanced Hibernate features for object/ relational mapping, object processing, querying, performance optimization, and application design ■ A reference for whenever you need a complete and technically accurate definition of Hibernate and Java Persistence functionality Usually, books are either tutorials or reference guides, so this stretch comes at a price. If you’re new to Hibernate, we suggest that you start reading the book from the start, with the tutorials in chapters 1 and 2. If you have used an older version of Hibernate, you should read the first two chapters quickly to get an overview and then jump into the middle with chapter 3. We will, whenever appropriate, tell you if a particular section or subject is optional or reference material that you can safely skip during your first read.

2009-02-17

script全集.chm

javascript 全集 可以快速地查询js函数,还可以索引。

2009-02-17

空空如也

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

TA关注的人

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