- 浏览: 443065 次
- 性别:
- 来自: 深圳
最新评论
-
yiguxianyun:
...
css li 不换行 -
stdayong:
...
netbeans 中使用 maven -
程序猿_星:
为啥会中文乱码啊
servlet 以 gzip 格式返回数据 -
huanhuan519:
感谢分享~
gdb 调试工具 -
heyl1234:
写过些js,对css还不熟。谢谢~
css li 不换行
文章列表
java: lib & classpath
- 博客分类:
- J2SE
classpath, is the path to search for third-part or user-defined classes,refer to:* linux docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html docs.oracle.com/javase/6/docs/technotes/guides/extensions/extensions.html docs.oracle.com/javase/7/docs/technotes/tools/solaris/jdkfil ...
Scan classes with specified annotation under specified package.
steps:
* define annotation
* use annotation on class
* get class set with specified annotations under specified packages,
2 approach:
* spring (preferred)
use util class from spring:
...
grub config for ubuntu 10.04 ~ 13.04,
steps to edit:
* sudo cp /etc/default/grub /etc/default/grub.bak
* sudo vi /etc/default/grub
do changes
* sudo update-grub
this will re-generate /boot/grub/grub.cfg automatically,
*
* ok
*
tip:
"/boot/grub/grub.cfg&quo ...
(转自:) http://www.objc.io/issue-10/ip-tcp-http.html
When an app communicates with a server, more often than not, that communication happens over HTTP. HTTP was developed for web browsers: when you enter http://www.objc.io into your browser, the browser talks to the server named www.objc.io usin ...
use shell to change encodeing of files under a folder recusively,
the script use a tool called "enca", install it if not yet,
there will be error info during execution, ignore that, it doesnot matter,
encode_util.sh:
#! /bin/bash
# change encode of files to utf8 recusively
# ...
Simple http server & client implementation by pure j2se.
http - client:
package eric.j2se.net.http;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.PrintWriter;
import java.net.Socket;
/**
* <p>
* A simple htt ...
lucene - demo
- 博客分类:
- lucene
demo - location:
* download lucene
there is a "demo" folder, it include a war file,
* download lucene source
it include source code for demo,
*
demo - doc:
in lucene's doc, in "Getting Started" section, there is a part ...
I want to say **** Unity!
Just bring gnome-classic back, it's so perfect, so easy to use & to do customization.
You might say, you can find ways to use gnome-classic, but I want to say, if most people want to use gnome by default, why do you still put unity as default, and it's very dif ...
problem:
there is table store course score of students, now write a sql to query student who has at least 2 course failed, means score<60,
sql: (mysql)
# drop table
drop table if exists score;
# create table
create table score(
id integer AUTO_INCREMENT primary key,
student_nu ...
Java proxy
- 博客分类:
- J2SE
Java proxy
proxy, a design pattern base on reflect, it handle method invocation on object with a proxy instance,
------
class & interface
include:
* java.lang.reflect.Proxy
help to create proxy instance,
* java.lang.reflect.InvocationHandler
implement it to specify the proxy lo ...
Java lock & condition
- 博客分类:
- J2SE
java Lock & Condition, provide a similar, yet more extensive locking mechanism than synchronized,
Lock:
similar to the monitor lock used by synchronized, but more powerfull,
Condition:
bound to lock, provide methods similar to wait()/notify()/notifyAll() of Object,
------
cla ...
maintain record in file using assembly,
------
table & record
design a simple table which has several fields with fixed-length,
the records are saved in file permanently,
------
operations on records
insert:
add a record to end of file,
select:
get a record by line num ...
assembly - file
- 博客分类:
- assembly
assembly operate file,
------
unix/linux file
linux use the same file concept of unix, any file could be accessed as a sequential stream of bytes,
step to use file:
* open file
open file by file path, and will get a number called file descriptor, which will be used to refer to th ...
assembly - function
- 博客分类:
- assembly
function, enable program broken into pieces, so that for reuse & easy to maintain,
------
define function
function is the same as normal assembly instructions,
it has a label, and use ".type label_name, @function" to tell that this is a function,
.type label_name, @f ...
视频网站 广告 屏蔽 - 彻底版
- 博客分类:
- other
参考: http://joys.name/2011/09/block-youku-ad.html
原因:
youku 放的广告太恶心了,又长又恶心,一点广告水准都没有,严重影响我看视频的心情,所以去互联网找了个方法把 优酷 阉割了, 彻底的 ...
另外 youku 老是放着放着 或者 快进之后 就突然不能放了,还得刷新,然后又是一遍广告,实在太坑爹了,
-------
屏蔽视频网站广告基本步骤
* 在 hosts 文件中屏蔽相关 ip
hosts 文件位置:
linux:
/etc/host ...