Time of Update: 2014-02-13
這兩天需要做一些東西,需要抓取別人網頁中的一些資訊。最後用htmlparser來解析html。直接從代碼中看吧:首先需要注意匯入包為:import org.htmlparser下面的包
Time of Update: 2014-02-11
2014-02-09前言: 節後頭兩天上班,主要是調整工作狀態。項目也不是很緊,趁著周末把年前遇到了一些關於JS和JQuery的一些問題給總結一下。主要是介紹JQuery的extend方法和(function($){})(jQuery),也會涉及一些相關的知識。1.
Time of Update: 2014-02-10
function confirmDialog(text, callback) {var popupDialogId = 'popupDialog';$('<div data-role="popup" id="' + popupDialogId + '" data-confirmed="no" data-transition="pop" data-overlay-theme="b" data-
Time of Update: 2014-01-04
遞迴是非常神奇的方法,代碼看起來很簡潔。對二叉樹的遍曆和求最大深度可以用遞迴的方法,主要思路就是遍曆左子樹,再遍曆右子樹。如果左子樹上面的結點,有右孩子,則調用右子樹的方法;遍曆到左子樹的分葉節點的時候,返回,開始遍曆右子樹。如果右子樹上面的結點有左孩子,則調用左子樹的方法,遍曆到右子樹的葉子結點的時候,程式結束。static void scanNodes(TreeNode root){if(root==null){return;}System.out.println(root.val); //
Time of Update: 2013-12-28
TP的運行時的步驟,從runtime裡面總結出來,分享給大家。1:匯入ThinkPHP\Common\common.php2:匯入:ThinkPHP\Lib\Core\Think.class.php3:匯入:ThinkPHP\Lib\Core\ThinkException.class.php4:匯入:ThinkPHP\Lib\Core\Behavior5匯入:ThinkPHP\Lib\Behavior、ReadHtmlCacheBehavior,CheckRouteBehavior,Locati
Time of Update: 2013-12-28
在model裡有autoCheckToken方法進行TOKEN的檢驗,在用create的時候自動調用,當然,也可以直接調用這個autoCheckToken方法來檢驗.然後在TokenBuildBehavior是產生token,並把token儲存到一個$_SESSION[$tokenName][$tokenKey] =
Time of Update: 2013-12-28
測試版本:zencart:1.5.0wordpress: 3.6.1 WOZ:wordpress_on_zencart_v1-5 1.安裝Wordpress把Wordpress解壓到ZenCart目錄下,開始安裝wordpress(訪問 www.xxx.com/wordpress 進行安裝)。2.設定Wordpress在Wordpress的後台設定一下:Setting -> General WordPress Address (URL)
Time of Update: 2013-12-28
網易新聞的首頁特效很好看,上個星期做網頁專題寫了個特效結果不理想,今天上午就想模仿網易新聞的效果,下午開始動手到晚上終於搞定了。 實現效果: 1、正常情況下,圖片和文字內容輪動;可以修改ContentN.Html(N=1~6)檔案裡面的內容; 2、滑鼠移入大圖,輪動停止,可以點擊向左或者向右進行瀏覽,也可以點擊具體的小圖片進行瀏覽;
Time of Update: 2013-12-28
前段時間一直忙項目,所以項目初期的svn服務就一直沒來得及更新,今天剛好忙完就將自己之前的配置重新總結了下,供大家參考。 svn(subversion)作為一款開源的代碼版本管理軟體,目前普遍用在項目開發人員將本地的原始碼上傳到web測試伺服器的一種同步軟體。
Time of Update: 2013-11-08
#include <stdio.h>#include <string.h>#define min(a,b) (a)<(b)?(a):(b)const int INF = 1 << 30;const int N = 20;const int MAX = 2000000;struct state {int over;int value;}g[N][N];int n, m, dp[MAX], vis[MAX], cnt[N];void init() {int
Time of Update: 2013-12-28
百度地圖API提供的Demo 功能不全,下面是我改寫的個帶編輯功能的多邊形繪製Demo,有需要的同學拿去<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="initial-scale=1.0, user-scalable=no"
Time of Update: 2013-11-08
站在持久化層的角度,一個java對象在它的生命週期中,可處於以下4個狀態之一:臨時狀態(transient):剛剛用new語句建立,還沒有被持久化,並且不處於Session的緩衝中。持久化狀態(persistent):已經被持久化,並且被加入到Session的緩衝中。刪除狀態(removed):不再處於Session的緩衝中。並且Session已經計劃將其從資料庫中刪除。游離狀態(detached):已經被持久化,但不再處於Session的緩衝中。看代碼更清楚點:代碼
Time of Update: 2013-11-08
StoreStore的介紹package org.apache.catalina; import java.beans.PropertyChangeListener; import java.io.IOException; public interface Store { public String getInfo(); public Manager getManager(); public void setManager(Manager manager);
Time of Update: 2013-11-08
.就高興了,直接二分吧。但是要注意,即使用long long都TM越界,還要用unsigned long long。最後返回值還要再檢查一下。int sqrt(int x) { // Start typing your C/C++ solution below // DO NOT write int main() function unsigned long long begin = 0; unsigned
Time of Update: 2013-11-08
public interface Session { public static final String SESSION_CREATED_EVENT = "createSession"; public static final String SESSION_DESTROYED_EVENT = "destroySession"; public String getAuthType(); public
Time of Update: 2013-11-08
Servlet SecurityCollection securityCollection = new SecurityCollection(); securityCollection.addPattern("/"); securityCollection.addMethod("GET"); SecurityConstraint constraint = new SecurityConstraint();
Time of Update: 2013-11-08
: and swap its two children, it produces a scrambled string . is a scrambled string of . and , it produces a scrambled string . is a scrambled string of .有一種方法叫做簡單粗暴。。。遞迴+剪枝bool isScramble(string s1,
Time of Update: 2013-11-08
程式的目的:將13個隨機數[0-100)儲存在數組裡面,翻轉,輸出。TITLE Write a programINCLUDE Irvine32.inc.dataARRAY_SIZE = 13RAND_MAX = 100HALF_ARRAY_SIZE = ARRAY_SIZE/2rands DWORD ARRAY_SIZE dup(0) .codemain PROCmov esi,offset rands
Time of Update: 2013-11-08
1. Properties 1.概述 2.常用方法 public class PropertiesDemo1 { public static void main(String[] args) { Properties pro = new Properties(); /*
Time of Update: 2013-11-08
看了一下這種方法的介紹,個人感覺,右值引用,更像人類的思想了,有些將編譯前與編譯後結合緊密的感覺。左值引用是變數名的別名,右值引用是值的別名,也就是不將值賦給一個變數名所在的地址,直接將值所在的初始的地址位置,轉給右值引用變數名。這個好比是這樣,一個人來圖書館送書,管理員沒有將書送到指定的書架,而是在送書地點,直接將書架,架起來,包住這本書。這樣的好處,我想只有一點,就是在編譯時間,節約記憶體佔用,