易截截图软件、单文件、免安装、纯绿色、仅160KB

Create WAP Push SMS Messages (from C# to JAVA)

 猪年无聊,改了一个代码,有点D版那个意思,把WAP PUSH的C#代码改到了JAVA
原来出处:
http://www.codeproject.com/cs/internet/wappush.asp
改过后的代码在下面,程序好像可以输出了WAPPUSH的结构化的东西,但是,没有在CMPP协议上测试通过。
共7个文件:
package com.wap.wbxml;
public class Runner {
 /**
  * @param args
  */
 public static void main(String[] args) {
  try
  {
   String recipient = "";  // mobile number to send the message to
   String href = "http://wap.monternet.com"; // url of the content to be pushed
   String text = "A WAP Push to 梦网 site"; // description of the content displayed to the user
   PushMessage message = new PushMessage(href, text);
   HexDecoder decoder = new HexDecoder();
//   Console.WriteLine("SMS body");
   System.out.println("SMS body");
//   Console.WriteLine(body);
   String body = new String(decoder.GetChars(message.GetSMSBytes()));
   System.out.println(body);
   body =byteToHexStr(message.GetSMSBytes());
   System.out.println(body);
   // this body is now ready to be sent, either via
   // an SMS Web Service as shown below or
   // via a mobile phone on a serial port.
   // Making sure the message is flagged as containing
   // a User Data Header
   // A free evaluation account for this service can
   // be set up at https://www.esendex.com/secure/registration/evaluation.aspx
//   messenger.MessengerHeader header = new messenger.MessengerHeader();
//   header.Username = "";  // username for the SMS account
//   header.Password = "";  // password for the SMS account
//   header.Account = "";  // account reference
//
//   messenger.SendService service = new messenger.SendService();
//   service.Messeng


相关文档:

java 导出excel方法

到http://download.csdn.net/source/1781433下载jxl.jar文件
/*Title是保存出来的文件名,gbl_LastOpenPath用于记录上次打开的路径*/
public void ExportToExcel(JTable table, String Title){
File DefaultFile;
JFileChooser fc = new JFileChooser();
File file;
if(gbl_LastOpen ......

Java 导出excel(二)

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
 
import javax.servlet.http.HttpServletRequest;
 
import jxl.Workbook;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
......

Java数字格式化输出

       我们经常要将数字进行格式化,比如取2位小数,这是最常见的。Java 提供 DecimalFormat 类,帮你用最快的速度将数字格式化为你需要的样子。下面是一个例子:
importjava.text.DecimalFormat;
publicclassTestNumberFormat{
publicstaticvoidmain(String[]args){ ......

操作SQL Server Mobile数据库的常用C#代码

 
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-spa ......

java 迷

    我的java学习了一年有余,起初是胡乱学,后来觉得java非常有意思,并且想在这方面深入学习,现在才是Java学习真正的开始。我正在阅读corejava和编程思想,学完这三本后想搞j2ee的开发。本人对数据库也感兴趣,现在热衷于SQL,但是我相信自己最终会瞄准ORECAL(很大程度出于好奇心),其实现在觉得Java DB ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号