Time of Update: 2015-05-20
Freemarker遍曆Java的Map,freemarkerjavamap廢話不說,看代碼:JavaMap<String, String> selectMap = new TreeMap<String, String>();selectMap.put("platId", "平台ID");selectMap.put("crawlerId",
Time of Update: 2015-05-20
禁用瀏覽器後退按鈕,瀏覽器後退按鈕公司的一個計費系統點擊計費按鈕後,再點擊瀏覽器的後退按鈕,前面已經計費的資料還會出現,而且按鈕也處於啟用狀態,再次點擊會造成雙重計費。在網上找了很多方法都是用window.history.forward();確實這個方法在IE和Google瀏覽器中還是起作用的,但在Firefox瀏覽器中卻不起作用了經過多次測試後發現加入window.onbeforeunload這個方法後在Firefox中就起作用了。代碼如下:<script language="
Time of Update: 2015-05-19
JavaScript toFixed() 方法,javascripttofixed定義和用法toFixed() 方法可把 Number 四捨五入為指定小數位元的數字。文法NumberObject.toFixed(num)參數描述num必需。規定小數的位元,是 0 ~ 20 之間的值,包括 0 和 20,有些實現可以支援更大的數值範圍。如果省略了該參數,將用 0 代替。返回值返回 NumberObject 的字串表示,不採用指數計數法,小數點後有固定的
Time of Update: 2015-05-19
開機自動啟動tomcat+memcached+nginx,memcachednginx編輯 /etc/rc.d/rc.local如下:export JAVA_HOME=/usr/java/jdk1.7.0_71export CLASSPATH=.:/usr/java/jdk1.7.0_71/lib/dt.jar:/usr/java/jdk1.7.0_71/lib/tools.jarexport
Time of Update: 2015-05-19
js物件導向學習筆記之八(cookie使用 與 url的get參數擷取),學習筆記cookie1. COOKIE的使用<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script><script src="./jquery.cookie.js"></script><script> //這個設定 與 移除 是一一對應的
Time of Update: 2015-05-19
HTML5,不只是看上去很美 First Shot Rainbow
Time of Update: 2015-05-19
HTML5 Geolocation實用性小調查,html5geolocation
Time of Update: 2015-05-20
SpringMVC單檔案上傳、多檔案上傳、檔案清單顯示、檔案下載,springmvc檔案上傳 林炳文Evankaka原創作品。轉載請註明出處http://blog.csdn.net/evankaka本文詳細講解了SpringMVC執行個體單檔案上傳、多檔案上傳、檔案清單顯示、檔案下載。本文工程免費下載一、建立一個Web工程,匯入相關的包springmvc的包+commons-fileupload.jar+connom-io.jar+commons-logging,jar+jstl.
Time of Update: 2015-05-20
LeetCode 36 Valid Sudoku (C,C++,Java,Python),leetcodesudokuProblem:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A
Time of Update: 2015-05-20
22 poj2935 Basic Wall Maze,poj2935maze對於每個點有四個方向可以走,把牆兩邊的點對應牆的方向能不能走給預先處理一下,用vis[x][y][0..3]表示點(x,y)的該方向可不可以走。然後bfs就好了,記錄路徑就把每個結點的前一個點記錄下來,遞迴輸出就可以了。#include<cstdio>#include<queue>#include<cstring>using namespace std;int dx[]={0,0,1,
Time of Update: 2015-05-20
Python指令碼---在 MySQL資料庫中跑批載入多個表的資料,pythonmysql轉載請註明出處:http://blog.csdn.net/guoyjoe/article/details/45841117#!/usr/bin/env python# -*- coding:utf-8 -*-""" Purpose: 產生日明細賬單資料 Created: 2015/4/21 Modified:2015/4/24 @
Time of Update: 2015-05-20
深入理解c#的欄位與屬性, 屬性屬性的作用就是保護欄位,對欄位的賦值和取值進行限定 屬性的本質就是兩個方法,一個叫get()對取值進行限定,一個叫set()對存值進行限定,屬性只是對屬性的再賦值。 如果只有get是唯讀屬性,set是唯寫屬性。在get裡面用的值是欄位的值,set裡面用的是value的值 所以在類裡面的public
Time of Update: 2015-05-20
背包問題,0-1背包問題 #include <cstdio>#include <iostream>using namespace std;#define MAX_N 100#define MAX_W 1000int n,W;// 從第i個物品開始挑選總重量小於j的部分int rec(int i,int j){ int res; if(i==n) res=0; // 已經沒有剩餘物品了 else if(j<w[i])
Time of Update: 2015-05-20
C語言的記憶體模型,C語言記憶體模型1. c語言的記憶體配置模型: @1. 程式碼區: 用於存放函數體的二進位代碼。 @2.全域資料區:全域資料區分為三塊地區。 &
Time of Update: 2015-05-19
【ThinkingInJava】32、遞迴計數,thinkinginjava遞迴/*** 書本:《Thinking In Java》* 功能:為了對pet進行計數,我們做一個能跟蹤各種不同類型的Pet的數量的工具,用map。這裡使用動態instanceof()* 我們可以使用Class.isAssignableFrom(),建立一個不局限於Pet的計數通用工具* 檔案:PetCount3.java* 時間:2015年4月14日09:56:41* 作者:cutter_point*/package
Time of Update: 2015-05-19
第11周-繼承與派生-項目1-是春哥啊,第11周1-/* * Copyright (c) 2014, 煙台大學電腦學院 * All rights reserved. * 檔案名稱:test.cpp * 作 者:劉暢 * 完成日期:2015 年 5 月 17 日 * 版 本 號:v1.0 * * 問題描述:在下面程式橫線上填寫適當內容,使程式完整。* 輸入描述: ;* 程式輸出:Name: 春哥 Grade: 19代碼如下:#include
Time of Update: 2015-05-19
第11周 自選閱讀3,第11周自選閱讀#include<iostream>using namespace std;class my_base{ int a,b;public: my_base(int x,int y) { a=x; b=y; } virtual void show() { cout<<"base";
Time of Update: 2015-05-19
單例模式的兩種形式(惡漢式,懶漢式),懶漢單例模式的特點:解決了一個類在記憶體的唯一性,這個類的對象只有一個。寫單例模式的步驟:1. 私人修飾構造方法2. 在本類的成員位置, new 自己類的對象3. 提供一個靜態方法,返回本類的對象A: 惡漢式package demo01;/** * 單例設計模式惡漢式 * @author Administrator * */public class SingleDesignModel1 {//私人構造方法private SingleDesignModel1(
Time of Update: 2015-05-19
Codeforces 134C Swaps,codeforces134cThere are n players sitting at a round table. All of them have s cards of n colors in total. Besides, initially the first person had cards of only the first color, the second one had
Time of Update: 2015-05-19
Python中的ceil()方法使用教程 這篇文章主要介紹了Python中的ceil()方法使用教程,是Python入門中必會的方法之一,需要的朋友可以參考下 ceil()方法返回x的值上限 - 不小於x的最小整數。 文法 以下是ceil()方法的文法: ? 1 2 3