import java.io.*;
import java.net.*;
class TextClient
{
public static void main(String[] args) throws Exception
{
Socket s = new Socket("192.168.1.104",10010);
BufferedReader bufr =
new Buff...
分类:
编程语言 时间:
2014-08-20 14:11:22
阅读次数:
223
public Map push(final PushBean pb) throws Exception {
StringBuffer sql = new StringBuffer();
sql.append("{call adUmwPush_mac(?,?,?,?,?,?,?,?,?,?,?)}");
Map map = new HashMap();
map = jdbcTempl...
分类:
数据库 时间:
2014-08-18 16:20:43
阅读次数:
235
先贴代码吧,运行一下,看看效果,然后看看注释,再看看代码后面的基础介绍
创建一个新excel并写入数据:
public static void myExcel2() throws IOException, WriteException {
WritableWorkbook wwb = Workbook.createWorkbook(new File("F:"
+ File.sepa...
分类:
编程语言 时间:
2014-08-17 02:36:31
阅读次数:
320
Description
Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such th...
分类:
其他好文 时间:
2014-08-16 17:11:52
阅读次数:
272
服务器端
package org.tcp;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
public class HelloServer {
public static void main(String[] args) throws Excep...
分类:
编程语言 时间:
2014-08-16 09:48:40
阅读次数:
278
//客户端
package org.udp;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
public class UDPClient {
public static void main(String[] args) throws Exception{
DatagramSocke...
分类:
编程语言 时间:
2014-08-16 09:48:10
阅读次数:
295
package org.InetAddressDemo;
import java.net.InetAddress;
public class InetAddressDemo {
public static void main(String[] args) throws Exception{
InetAddress locAdd = null;
InetAddress re...
分类:
编程语言 时间:
2014-08-15 17:52:39
阅读次数:
227
//URL
package org.urldemo;
import java.io.InputStream;
import java.net.URL;
import java.util.Scanner;
public class URLDemo {
public static void main(String[] args) throws Exception{
URL...
分类:
编程语言 时间:
2014-08-15 17:51:19
阅读次数:
213
package org.codedemo;
import java.net.URLDecoder;
import java.net.URLEncoder;
public class CodeDemo {
public static void main(String[] args) throws Exception{
String keyWord = "湖南工业大学";
...
分类:
编程语言 时间:
2014-08-15 17:50:28
阅读次数:
207
JAVA获取访问用户的客户端IP(适用于公网与局域网) /**
* 获取访问用户的客户端IP(适用于公网与局域网).
*/
public static final String getIpAddr(final HttpServletRequest request)
throws Exception {
if (request == null) {
throw (new E...
分类:
编程语言 时间:
2014-08-15 16:06:19
阅读次数:
275