MesgServer:
package com.socket; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import com.common.LogHelper; /** * ServerSide: receive message from Client and return it. * @author Guoliang * */ public class MesgServer implements Runnable{ public void run() { LogHelper.log("ServerStarted"); try { ServerSocket serverSocket = new ServerSocket(8888); while (true) { Socket socket = serverSocket.accept(); LogHelper.log("Request: " + socket.toString()); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); PrintWriter out = new PrintWriter(socket.getOutputStream()); out.println("Connected!"); out.flush(); String lineInput; while ((lineInput = in.readLine()) != null) { LogHelper.log("GotMesgFromClient: " + lineInput); out.println("ServerReturnMsg: " + lineInput); out.flush(); if("exit".equals(lineInput)) { break; } } out.close(); in.close(); socket.close(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
MesgClient
package com.socket; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; import com.common.LogHelper; public class MesgClient { /** * Send mesg to server side. * @param args * @throws IOException * @throws UnknownHostException */ public static void main(String[] args) throws UnknownHostException, IOException { // Start server. new Thread(new MesgServer()).start(); Socket socket = new Socket("localhost", 8888); LogHelper.log("Connecting..."); PrintWriter out = new PrintWriter(socket.getOutputStream(), true); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); LogHelper.log(in.readLine()); // Simplest testing out.println("Hello!"); LogHelper.log(in.readLine()); // Read user input. BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); String strInput = null; while ((strInput = stdIn.readLine()) != null) { out.println(strInput); LogHelper.log("Send: " + strInput); LogHelper.log(in.readLine()); } } }
Output:
[Thread-0]ServerStarted
[main]Connecting...
[Thread-0]Request: Socket[addr=/127.0.0.1,port=5569,localport=8888]
[main]Connected!
[Thread-0]GotMesgFromClient: Hello!
[main]ServerReturnMsg: Hello!
liguoliang.com // user input.
[Thread-0]GotMesgFromClient: liguoliang.com
[main]Send: liguoliang.com
[main]ServerReturnMsg: liguoliang.com
Follow these steps:
Time Tracking
field is visible (not hidden
) on the Field Configuration.
Note that this last procedure will allow editing of closed issues. If you wish to edit only this one issue, simply reopen the issue, add time tracking, and re-close.
Administration >> Global Settings >> Workflows
and check for the Active workflow that the issue is using.
Active state
.
false
.
true
.
For my case, the project has it’s own field schema, and the ‘Time tracking’ filed was hided, after ‘show’ the ‘Time tracking’ filed, user can log work.
For more details: https://confluence.atlassian.com/display/JIRAKB/Unable+to+Log+Work
Host your code online in as many public and private repositories as you want. Free for 5 users.
Give your code a home on the web. Share what you’re working on with your colleagues, collaborators, or potential employers.
All 5 user accounts are FREE.
Checkout: https://bitbucket.org/
临上地铁时, 我们才意识到大家都没去过, 也不知道路线. 手机搜了一下, 选择了如下路线:
进去后发现近处并没有租车的地方, 打听了一下比较近的在后头, 于是转向后走到C, 租上车子(头一小时S$6/辆, 押证件, 不能异地还), 一路走走停停, 最后又骑回来还车子.
连走带骑,差不多12公里. 然后又打车去Changi village 吃饭.
乱拍的几张照片:
回来后发现其实是有正儿八经的文档的:
http://www.nparks.gov.sg/cms/docs/diy_guide/ECPCN_D5.pdf
Use sql to delete all the spam comments quickly:
SELECT DISTINCT comment_approved FROM `x_comments`
Results:
0 – Pending
1 – approved
spam – spam
trash – trash
–delete spam & trash:
DELETE FROM `dbName`.`x_comments` WHERE comment_approved = 'spam' or comment_approved = 'trash'
--delete pending: DELETE FROM `dbName`.`x_comments` WHERE comment_approved = '0'
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.