Time of Update: 2013-12-28
本系列文章翻譯自《50 Tips and Tricks for MongoDB
Time of Update: 2013-12-28
需求如下:進來項目中需要添加檔案下載Excel功能;決定使用Struts2內建的檔案下載功能Java Code/* * $Id: FileDownloadAction.java 496318 2007-01-15 13:58:24Z husted $ * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license
Time of Update: 2013-12-28
650) this.width=650;" src="http://www.bkjia.com/uploads/allimg/131228/13332515W-0.png" border="0" alt="" />內容 1 什麼是Wijmo? 2 jQuery 文法 3 jQuery 選取器 3.1 jQuery 元素選取器 3.2 jQuery 屬性選取器&
Time of Update: 2013-12-28
今天同事問我在Maven構建Theme時Liferay架構預設資源檔從何處擷取,我對比了下使用Ant來編譯部署Theme和使用Maven來編譯部署Theme的過程,發現:在複製架構預設資源檔時,居然是完全不同的策略! Ant 複製Liferay預設資源檔的策略:大家都知道,在用Ant編譯Theme時,我們程式員需要在_diffs目錄下添加一些和Liferay架構不同的資源檔,而Liferay架構本身的資源檔都會從
Time of Update: 2013-12-28
原文:http://www.sencha.com/blog/ext-js-4-1-performance/ 在本文,將講述幾個影響Ext JS應用效能的因素。 網路延時會嚴重影響初始化啟動時間,尤其是Store的載入時間。 CSS處理。 Javascript的執行。
Time of Update: 2013-11-08
傳送門:http://acm.hdu.edu.cn/showproblem.php?pid=3687題意:給你一個n*m的方陣,裡面有n*n個人並給出座標,問你最少走多少步可以形成一個n*n的正方形方陣,每個人只能向左向右移動。題解:資料量不大,直接暴力搞定,n*n*mAC代碼:368746MS384K1535 BG++#include <iostream>#include <cstdio>#include <cstring>#include
Time of Update: 2013-11-08
條款11: 為需要動態分配記憶體的類聲明一個拷貝建構函式和一個賦值操作符 拷貝構造時沒有記憶體流失, 因為c.data還沒初始化, 當c被a初始化, 指向同一個data, 那麼data會在c銷毀時刪除一次, a銷毀時也刪除一次;Note 一般很少對對象進行傳值調用; Note 用delete 刪除一個已經被刪除的指標,
Time of Update: 2013-11-08
站在持久化層的角度,一個java對象在它的生命週期中,可處於以下4個狀態之一:臨時狀態(transient):剛剛用new語句建立,還沒有被持久化,並且不處於Session的緩衝中。持久化狀態(persistent):已經被持久化,並且被加入到Session的緩衝中。刪除狀態(removed):不再處於Session的緩衝中。並且Session已經計劃將其從資料庫中刪除。游離狀態(detached):已經被持久化,但不再處於Session的緩衝中。看代碼更清楚點:代碼
Time of Update: 2013-11-08
'e'. He was a member of the Oulipo group. A quote from the book:'T's is not unusual. And they never use spaces.'A','B', 'C', …, 'Z'} and two finite strings over that alphabet, a wordW and a text T, count the number of occurrences of W inT. All the
Time of Update: 2013-11-08
傳送門:http://acm.hdu.edu.cn/showproblem.php?pid=4099 這個題目就是一個坑或。題意:給你不超過40的一串數字,問你這串數字是Fibonacci多少的開頭幾位元字,如果不存在則輸出-1.題解:明明說好的不超過40,但是在建字典數的時候不加i<41就超記憶體了,杭電你是想咋地,害的我比較好多人的代碼,一點一點試出來的。 AC代碼:#include <iostream>#include
Time of Update: 2013-11-08
查詢曆史狀態,線上做的話就要用可持久化資料結構,所謂可持久化,意思就是儲存所有的曆史狀態,但是因為每次修改只涉及到logn個節點,所以每次只建立logn個節點。其餘節點及可利用曆史版本的。但是這個題目如果用lazy的話,因為每次查詢會下放lazy,導致必須建立節點,最後會造成mle。所以用維護兩個值來實現最後的結果。#include <iostream>#include <cstdio>#include <cstring>using
Time of Update: 2013-11-08
描述:有n(n<=100)個人,每個人有一個或多個朋友(朋友關係是相互的)。將其分成兩組,使每一組都有朋友在另一個組。#include <cstdio>#include <iostream>#include <cstring>#include <vector>using namespace std;const int M = 100 + 10;int color[M], vis[M];//color[i]表示結點i的顏色,1表示黑色,
Time of Update: 2013-11-08
/* * 1326_1.cpp * * Created on: 2013年10月6日 * Author: Administrator */#include <iostream>#include <cstdio>using namespace std;int main(){ char begin[20]; char end[20]; char number[20];int length;int sum =
Time of Update: 2013-11-08
/* * UVA_10168.cpp * * Created on: 2013年10月7日 * Author: Administrator */#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>/** * 2 2 3 172 2 3 292 2 5 37 */using namespace std;int
Time of Update: 2013-11-08
這算是我寫的第一篇部落格吧,原因很簡單,就是希望把我在學習過程中遇到的點點滴滴的問題記錄下來,日後同學或者同事遇到的時候,能夠快速的解決之~而這個問題算是先前一直都沒有能夠很好解決的吧~下面我們就來回顧下先前所遇到的問題。Q1:在QT官網直接下載了QtSDK之後,直接安裝./XXX.run之後,第一個找不到QtCreator的可執行程式,第二個在一個很深很深的路徑下:/opt/Qt5.1.1/Tools/QtCreator/bin$ ./qtcreator
Time of Update: 2013-11-08
在學習android時,想做一個多人聊天室,不知如何動手想先做一個純java的簡單多人聊天室,理理思路通過Socket通訊端進行資料轉送用到的知識點是:Socket,ServerSocket, 多線程 伺服器程式:import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.
Time of Update: 2013-11-08
.void printacircle(vector<vector<int> > &matrix, vector<int> &path, int num) { int row = matrix.size();int col = matrix[0].size();for(int i = num; i < col-num; i++)path.push_back(matrix[num][i]);if( 2*num
Time of Update: 2013-11-08
最近公司很老的一個製品出現了memoryleak,現在搞的人頭很大,查的過程中積累點東西和大家分享一下~1>如何正確的建立線程? Win32中建立線程函數對比。 函數提供者適用範圍__beginthread()C/C++提供C/C++程式__beginthreadex()C/C++提供C/C++程式CreateThread()Wi
Time of Update: 2013-11-08
paip.提升使用者體驗----c++ 源碼字型自訂製造總結 作者Attilax , EMAIL:1466519819@qq.com 來源:attilax的專欄地址:http://blog.csdn.net/attilax1.新的建立字型//////////////////////最好是從現有字型修改比較好..我使用的是hand of sean..2.修改----去掉多餘的像素../////////////////////////font
Time of Update: 2013-11-08
ASP.NET中的cookie:建立Cookie方法 (1)ASP.NET中的cookie:建立Cookie方法 (2)ASP.NET中的cookie:訪問Cookie方法(1)訪問Cookie方法(2)清除Cookie方法 設定到期時間就可以清除protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["nCount&