Pyecharts 視覺化操作CSV檔案 (bar,radar)
阿新 • • 發佈:2020-11-13
MarkDown學習
1.1標題
1.2字型
HelloWorld!
HelloWorld!
HelloWorld!
HelloWorld!
1.3引用
引用
1.4分割線
1.5圖片
1.6超連結
1.7列表
- A
- B
- C
- A
- B
- C
表格
名字 | 性別 | 生日 |
---|---|---|
張三 | 男 | 1997.1.1 |
程式碼
package chat; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; public class TalkReceive implements Runnable{ DatagramSocket socket = null; DatagramPacket packet = null; private int port; private String msg; public TalkReceive(int port, String msg) { this.port = port; this.msg = msg; try { socket = new DatagramSocket(this.port); } catch (SocketException e) { e.printStackTrace(); } } @Override public void run() { //準備容器接受資料 try { while(true){ byte[] container = new byte[1024]; packet = new DatagramPacket(container,0,container.length); socket.receive(packet); //處理資料 byte[] data = packet.getData(); String receiveData = new String(data,0,data.length); System.out.println(msg + ":" + receiveData); //斷開連線 if(receiveData.equals("bye")){ break; } } socket.close(); } catch (IOException e) { e.printStackTrace(); } } }
Hello World