原创 input() and raw_input() for python

raw_input() 與 input() __ Python 這兩個均是 python 的內建函數,通過讀取控制檯的輸入與用戶實現交互。但他們的功能不盡相同。舉兩個小例子。 1 >>> raw_input_A = raw_in

原创 JVM GC log file configuration

Solution Manager may collect and analyze JVM GC logs for Apache Tomcat. However, by default no GC log is enabled on th

原创 java實現心形圖案|桃心

There is something wrong when you use thedouble type minus an int type. Because when you refer to a double type. Eg. Do

原创 count and say leetcode c++

pay attention to n and the string. it is easy to understand the code below.class Solution { public: string countAnd

原创 三種單例模式淺析

在什麼情況下使用單例模式,請寫出三種單例模式的代碼實現。簡單比較下此三種方法的優缺點。 大部分爲原創,部分轉載所以這裏註明爲轉載。 使用單例模式的情況: 和名字中說的一樣,單例模式即我們在只使用一個例子時候所要採取的一種模式。 下面具體說

原创 rotate List|Leetcode c++

for this problem, I draw a picture. 1.I use pointer q to reach the tail of the list and let q->next point to p let the

原创 axis2的簡單實例

使用axis2調用最簡單的webservice。 編寫一段java代碼如下 public class HelloService { public String sayHello(){ return "

原创 leetcode gas station

轉載自felix博客園 原題如下 Gas Station There are N gas stations along a circular route, where the amount of gas at station i 

原创 longest substring without repeating character leetcode c++

this problem broaden its test set,so that we should use sign[xxxx]-'a' two record; and when we calculate the length, we

原创 leetcode triangle c++

class Solution { public: int minimumTotal(vector<vector<int> > &triangle) { if(triangle.size() == 0)

原创 valid Palindrome | Leetcode c++

for this problem , you just need to use two pointers to judge whether it is a palindrome. but what we should consider i

原创 簡單的 java 多線程編程練習。

9.     Java多線程編程題: 啓動3個線程打印遞增的數字, 線程1先打印1,2,3,4,5, 然後是線程2打印6,7,8,9,10, 然後是線程3打印11,12,13,14,15. 接着再由線程1打印16,17,18,19,20.

原创 soap簡介

SOAP(Simple Object Access Protocol)簡單對象訪問協議是在分散或分佈式的環境中交換信息的簡單的協議,是一個基於XML的協議。它包括四個部分:SOAP封裝(envelop),封裝定義了一個描述消息中的內容是

原创 zigzag conversion leetcode c++

for this problem, you must divided the problem into two part. then find the change rule. the precise rule please see it

原创 java socket程序

package test; import java.net.*; import java.io.*; public class Server{ private ServerSocket ss; private Socket