原创 Converting Oracle rows to columns
Sometimes we need to write SQL that takes separate row results (on separate lines) and roll them together into a single
原创 windows下安裝elasticsearch
windows下安裝elasticsearch 1.下載elasticsearch,地址:http://www.elasticsearch.org/overview/elkdownloads/ 2.配置環境變量path,指向elas
原创 Google-Guice入門介紹
一. 概述 Guice是一個輕量級的DI框架。本文對Guice的基本用法作以介紹。 本文的所有例子基於Guice 3.0 本文的很多代碼來源於Guice主頁:http://code.google.com/p/google-g
原创 消息推送Comet介紹
這篇文章主要講述B/S架構中服務器“推送”消息給瀏覽器。內容涉及ajax論詢(polling),comet(streaming,long polling)。後面會附上源代碼。 小林最近在工作有這麼一個需求,需要在門戶首頁獲取服務器“推
原创 JavaScript編碼規範-Baidu
JavaScript編碼規範 1 前言 JavaScript在百度一直有着廣泛的應用,特別是在瀏覽器端的行爲管理。本文檔的目標是使JavaScript代碼風格保持一致,容易被理解和被維護。 雖然本文檔是針對JavaScrip
原创 Java Scripting Programmer's Guide
Who is the Java Scripting API For? Some useful characteristics of scripting languages are: Convenience: Most scripting
原创 WEB安全漏洞(1)
本文檔主要介紹WEB安全漏洞和解決方法。 1. SQL注入漏洞 漏洞描述 SQL注入攻擊(SQL Injection),簡稱注入攻擊、SQL注入,被廣泛用於非法獲取網站控制權,是發生在應用程序的數據庫層上的安全漏洞。 在設計不良的程
原创 HTTP access control (CORS)
A resource makes a cross-origin HTTP request when it requests a resource from a different domain than the one which se
原创 How Garbage Collection Really Works
Java Memory Management, with its built-in garbage collection, is one of the language's finest achievements. It allows
原创 WEB安全漏洞(2)
本文檔主要介紹WEB安全漏洞和解決方法。 (續上篇) 8. Cookie安全性 漏洞描述 cookie的一些屬性設置不當,導致黑客利用網站存在的XSS漏洞來竊取cookie 修復建議 在設置cookie時:1)domain設置
原创 Javascript模塊化編程(一):模塊的寫法
隨着網站逐漸變成"互聯網應用程序",嵌入網頁的Javascript代碼越來越龐大,越來越複雜。 網頁越來越像桌面程序,需要一個團隊分工協作、進度管理、單元測試等等......開發者不得不使用軟件工程的方法,管理網頁的業務邏輯。
原创 Servlet 中文亂碼問題及解決方案剖析
一、常識瞭解 1.GBK包含GB2312,即如果通過GB2312編碼後可以通過GBK解碼,反之可能不成立; 2.java.nio.charset.Charset.defaultCharset() 獲得平臺默認字符編碼; 3.g
原创 Nginx: Beginner’s Guide
This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it. It is suppose
原创 Avoid duplicate form submissions
When a web form is submitted to a server through an HTTP POST request, a web user that attempts to refresh the server
原创 Event order
On the Introduction to events page I asked a question that at first sight seems incomprehensible: “If an element and