Time of Update: 2015-03-03
標籤:問題:我使用expressjs和mongostore來管理session。下面是expressjs中的設定。app.configure(function(){ app.use(express.session({ secret: conf.secret,
Time of Update: 2015-03-03
標籤:異常詳細資料: System.ArgumentException: 已添加了具有相同鍵的項。情境重現:在地址欄輸入 http://localhost:51709/Home/Index?user[0].Name=tom&user[1].Name=jack後台代碼如下:using System;using System.Collections.Generic;using System.Linq;using System.Web;using
Time of Update: 2015-03-03
標籤:前端的朋友可能遇到過這樣的需求,要求在頁面輸入一串序號,或啟用碼(就像在PC正版軟體中的序號),可是HTML中並沒有為我們提供類似的組件,我們來自己實現一個:大體的思路是在表單裡有一個隱藏的input,而表面上用一組input代替: 1 <form name="" action="" method="post"> 2 <p> 3 <label>請輸入啟用碼:</label> 4 <span class="act-code-group"&
Time of Update: 2015-03-03
標籤:有時我們把一個url帶入到另一個url中作為參數,這個參數就需要轉義。比如:http://www.baidu.com/s?wd=http%3A%2F%2Fwww.baidu.com 在代碼中進行訪問這段地址的時候,我們也會期望它照著給的地址訪問,在.net 4.0中,確實會如此。但是如果切換為.net 4.5版本,你就會發現你訪問的url實際變成了:http://www.baidu.com/s?wd=http:%2F%2Fwww.baidu.com
Time of Update: 2015-03-03
標籤:做ecshop後台開發的時,根據條件查詢後,利用ajax返回的content json資料內容為空白,沒有填充table效果預期效果 問題: make_json_result($smarty -> fetch(‘packages_list_info.htm‘), ‘‘, array(‘filter‘ => $result[‘filter‘], ‘page_count‘ =>
Time of Update: 2015-03-03
標籤:css pure 一個非常好而且免費的CSS開發庫Pure650) this.width=650;" title="BootStrap-Futurico-UI-HTML-8.jpg" src="http://s3.51cto.com/wyfs02/M00/5A/11/wKiom1T1SV6xUyF_AAH-fpQLkmQ400.jpg" alt="wKiom1T1SV6xUyF_AAH-fpQLkmQ400.jpg" />
Time of Update: 2015-03-03
標籤: 做過營運的應該都做過http服務了。像一些電子商城,或者是一些互連網公司,web的服務之類是至關重要的,近期看了劉天斯大哥的書覺得自己營運平台應該也可以這樣去監控服務之類,今天學習了pycurl模組,這裡記錄一下: 模組相關說明:c = pycurl.Curl() #建立一個curl對象 c.setopt(pycurl.CONNECTTIMEOUT, 5)
Time of Update: 2015-03-03
標籤:匯入 jquery1.9.1.js 庫 <!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <link href="css/style.css" type="text/css" rel="stylesheet" />
Time of Update: 2015-03-03
標籤:在現行的網站應用程式中URL重新導向的應用有很多:404頁面處理、網址改變(t.sina轉到weibo.com)、多個網站地址(如:http://www.google.com/ 、www.g.cn )等;本質上就是將當前使用者的網址從一個網址導向到另外的一個網址上面去;實現重新導向的方式有很多種,有伺服器端配置、後端程式重新導向處理、前端js重新導向;先來說下前端從定向的實現:在眾多的BOM對象中,location算是最重要的對象之一了,使用location可以通過多種
Time of Update: 2015-03-03
標籤:使用GruntJS構建Web程式 (1)Gruntjs是JavaScript項目的構建工具,也是基於node的一個命令列工具。很多開源JS項目都是使用它搭建。如jQuery、Qunit、CanJS等。它有以下作用合并JS檔案壓縮JS檔案單元測試(基於QUnit)一句話:完全自動化(automation) 以下是它的安裝過程。 一、安裝node參考nodejs入門 (最新的node會自動安裝npm) 二、安裝grunt命令列工具grunt-cli使用-
Time of Update: 2015-03-03
標籤:試用了三種相關方法讀取檔案方法,開啟檔案方法,寫資料方法fs.readFilefs.openfs.writeNode.js 檔案系統Node.js 檔案系統封裝在 fs 模組是中,它提供了檔案的讀取、寫入、更名、刪除、遍曆目錄、連結等POSIX 檔案系統操作。與其他模組不同的是,fs 模組中所有的操作都提供了非同步和 同步的兩個版本,例如讀取檔案內容的函數有非同步 fs.readFile() 和同步的
Time of Update: 2015-03-03
標籤:http://curl.haxx.se/libcurl/c/curl_multi_perform.htmlcurl_multi_perform.3 -- man pageNAMEcurl_multi_perform - reads/writes available data from each easy handle在每個easy handle上讀寫資料SYNOPSIS#include <curl/curl.h>CURLMcode
Time of Update: 2015-03-03
標籤: transform的屬性包括:1、rotate(旋轉) 2、skew(斜切) 3、scale(縮放) 4、translate(位移變化),其中還有x,y之分,比如:rotateX,rotateY,以此類推。 transform:rotate();如:@keyframes icon_3 { 0% { transform: rotate(0deg); } 50% { opacity: 1 } 1
Time of Update: 2015-03-03
標籤:hibernate的工作原理1.Hibernate 的初始化.讀取Hibernate 的配置資訊-〉建立Session Factory1)建立Configeration類的執行個體。它的構造方法:將配置資訊(Hibernate config.xml)讀入到記憶體。一個Configeration 執行個體代表Hibernate 所有Java類到Sql資料庫映射的集合。2)建立SessionFactory執行個體把Configeration
Time of Update: 2015-03-03
標籤:JQuery不支援捕獲模型冒泡模型解析<body> <div> <input id="bntShow" type="button" value="點擊" class="bnt"/> </div> <div class="classShow"> </div><
Time of Update: 2015-03-04
V8引擎之initContextIfNeeded(...)函數,context上篇說到一個很重要的函數initContextIfNeeded,這裡專門來分析下這個函數:// Create a new environment and setup the global object.//// The global object corresponds to a DOMWindow instance. However, to// allow properties of the JS
Time of Update: 2015-03-04
css背景色漸層詳解,css漸層詳解demo:http://download.csdn.net/download/tjcyjd/8468581直接把代碼貼出來,如下:<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1
Time of Update: 2015-03-04
自動出題程式(10以內的數位四則運算),出題四則運算代碼如下:#include <iostream>#include <cstdlib>#include <ctime>using namespace std;int main(){ int num1,num2,op,result1,result2; //num1,num2:運算元;op:運算子;result1,result2:結果 do { srand(time(NULL));
Time of Update: 2015-03-04
hdu2896---病毒侵襲(AC自動機),hdu2896---自動機 Problem Description 當太陽的光輝逐漸被月亮遮蔽,世界失去了光明,大地迎來最黑暗的時刻。。。。在這樣的時刻,人們卻異常興奮——我們能在有生之年看到500年一遇的世界奇觀,那是多麼幸福的事兒啊~~
Time of Update: 2015-03-04
Codeforces Round #295 C. DNA Alignment,C. DNA Alignmenttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya became interested in bioinformatics. He's going to write an article about similar