原创 WEBSOCKET VERSUS COMET – REAL-TIME WEB APPLICATIONS

Introduction Many web application developershave tried to develop a high performance web application with real-timebeha

原创 Inheritance and the prototype chain

JavaScript is a bit confusing for developers experienced in class-based languages (like Java or C++), as it is dynamic

原创 Wait A Moment, JavaScript Does Support Multiple Inheritance!

... we are just doing it wrong! Classical Inheritance? We Have Something Better! The main limit about multiple inherita

原创 JSON Example With RESTEasy + Jackson

In this tutorial we are going to see how you can integrate RESTEasy withJackson to develop JAX-RS RESTful services

原创 XML Example With RESTEasy+ JAXB

In this example we are going to see how you can integrateRESTEasy with JAXB (Java Architecture for XML Binding) to

原创 Java 8新特性探究(三)解開lambda最強作用的神祕面紗

我們期待了很久lambda爲java帶來閉包的概念,但是如果我們不在集合中使用它的話,就損失了很大價值。現有接口遷移成爲lambda風格的問題已經通過default methods解決了,在這篇文章將深入解析Java集合裏面的批量數據操

原创 EJB3.x JPA: When to use rollback() and setRollbackOnly()

After JTA was introduced for more than a decade ago, then later with the introduction of Bean-Managed Transaction and C

原创 微信公衆平臺開發:JS API支付

本文介紹微信支付下的jsapi實現流程 前言 微信支付現在分爲v2版和v3版,2014年9月10號之前申請的爲v2版,之後申請的爲v3版。V3版的微信支付沒有paySignKey參數。v2的相關介紹請參考方倍工作室的其他文章。本文介

原创 Web 通信 之 長連接、長輪詢(long polling)

基於HTTP的長連接,是一種通過長輪詢方式實現"服務器推"的技術,它彌補了HTTP簡單的請求應答模式的不足,極大地增強了程序的實時性和交互性。 一、什麼是長連接、長輪詢? 用通俗易懂的話來說,就是客戶端不停的向服務器發送請求以

原创 微信公衆平臺開發:OAuth2.0網頁授權

微信公衆平臺最近新推出微信認證,認證後可以獲得高級接口權限,其中一個是OAuth2.0網頁授權,很多朋友在使用這個的時候失敗了或者無法理解其內容,希望我出個教程詳細講解一下,於是便有了這篇文章。   一、什麼是OAuth2.0 官

原创 Oracle 行轉列和列轉行

一、行轉列 1.1、初始測試數據 表結構:TEST_TB_GRADE Sql代碼: ? 1 2 3 4 5 6 7 createtableTEST_TB_GRADE (   ID      

原创 Elasticsearch安裝中文分詞插件ik

Elasticsearch默認提供的分詞器,會把每個漢字分開,而不是我們想要的根據關鍵詞來分詞。例如: [html] view plaincopy curl -XPOST  "http://localhost:9200

原创 Windows下安裝並設置Redis

Redis對於Linux是官方支持的,安裝和使用沒有什麼好說的,普通使用按照官方指導,5分鐘以內就能搞定。詳情請參考: http://redis.io/download  但有時候又想在windows下折騰下Redis,可以從r

原创 用JavaScript實現單繼承和多繼承的簡單方法

JavaScript是一種強大的多泛型編程語言,其融合了面向過程、面向對象和函數式編程於一身,具備強大的表現能力。 JavaScript就其本質是函數式編程語言,是Lisp的後代,同時又加入了一下面向對象編程的元素,放棄了一些難懂的函數

原创 Conversion of Oracle Columns into Rows

You Asked Hi Tom,  I have t1 table as follows  create table t1  (mnth varchar2(10),  col_1 number,  col_2 number,