漫步云端

移动开发(Android、iPhone、Windows Mobile) | JAVA | C | C++ | .net | Objective C | 微软企业开发技术 | 嵌入式系统设计与开发
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

测试windows live writer

Posted on 2010-09-11 12:42  charley_yang  阅读(309)  评论(0编辑  收藏  举报

测试windows live writer

测试windows live writer

测试windows live writer

测试windows live writer

测试windows live writer
测试windows live writer

 

测试windows live writer

测试windows live writer

 

 测试项目符号

  • 测试windows live writer
  • 测试windows live writer
  • 测试windows live writer

 

测试链接

http://www.cnblogs.com/charley_yang/

 

测试图片

Penguins

 

测试表格

xx yy
11 22

 

测试地图

地图图片

 

测试C#

        #region 监听

        /// <summary>
        /// 监听
        /// </summary>
        protected void BeginLisen()
        {
            TcpListener tcpLister = new TcpListener(_address);
            tcpLister.Start();

            try
            {
                while (true)
                {
                    Socket socket = tcpLister.AcceptSocket();
                    Byte[] bytes = new Byte[256];
                    IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
                    EndPoint senderIP = sender as EndPoint;
                    socket.ReceiveFrom(bytes, ref senderIP);
                    string username = Encoding.ASCII.GetString(bytes);
                    LinqEntitiesDataContext db = Database.GetDefalult();
                    UserInfo user = db.UserInfos.FirstOrDefault(u => u.Name == username);
                    if (user != null)
                    {
                        sender = senderIP as IPEndPoint;
                        user.IP = sender.Address.ToString();
                        user.Port = sender.Port;
                    }

                    db.SaveChange();
                }
            }
            catch (Exception e)
            {
#if DEBUG
                throw e;
#endif
            }
        }

        /// <summary>
        /// 异步监听
        /// </summary>
        public void ThreadToListen()
        {
            //初始化线程实例,单独以一个线程来进行侦听
            Thread t = new Thread(new ThreadStart(this.BeginLisen));
            //启动线程
            t.Start();
        }

        #endregion

 

测试JAVA

	/**
	 * 更新基站信息数组顺序(mcc,mnc,LAC,CID)
	 * @throws Exception
	 */
	public String[] getLastCellInfo() {
		String[] cellDateArr = new String[5];
		try {
			
//			List<NeighboringCellInfo> lsss = phoneService.getNeighboringCellInfo();
			//mcc
			cellDateArr[0] = phoneService.getNetworkOperator().substring(0, 3);
			//mnc
			cellDateArr[1] = phoneService.getNetworkOperator().substring(3, 5);
			
			//获取基站位置信息
			GsmCellLocation gcl = (GsmCellLocation) phoneService.getCellLocation();
			// LAC for GSM
			cellDateArr[2] = String.valueOf(gcl.getLac());
			// CID for GSM
			cellDateArr[3] = String.valueOf(gcl.getCid());
			
			cellDateArr[4] = String.valueOf(format.format(new Date()));
		} catch (Exception e) {
			cellDateArr = null;
		}
		return cellDateArr;
	}