摘要: 目前GPS(全球定位系统)定位应用市场日趋成熟,正在进入应用的高速发展时期。看到论坛里不断有人提问关于GPS的问题。现将个人对GPS的了解写出来跟大家一块探讨。1、 GPS应用简介近年来GPS系统,已经在大地测绘、海上渔用、车辆定位监控、建筑、农业等各个领域得到广泛应用。从九十年代我国引进GPS定位技术开始,经过十多年的市场培育,GPS定位应用进入了发展的最好时机,未来十年基于GPS的应用将会改变我们的生活和工作方式。目前市场上的大部分GPS接受模块都是通过RS232串口与MCU进行数据传输的。这些数据包括经度、纬度、海拔高度、时间、卫星使用情况等基本信息。开发人员再依据这些基本数据,进行数据 阅读全文
posted @ 2010-06-28 10:47 cpcpc 阅读(6488) 评论(0) 推荐(0) 编辑
摘要: JS图片代码切换总汇 (1) <style type="text/css" media="screen">*{margin:0;padding:0;}body { margin:0; padding:0; font-size:12px; font:12px/1.5em Tahoma, Verdana, Simsun, Microsoft YaHei, Arial Unicode MS, Mingliu, Arial, Helvetica;}img { border:none;}ul,li { margin:0; padding:0; list 阅读全文
posted @ 2010-05-28 17:25 cpcpc 阅读(6793) 评论(0) 推荐(0) 编辑
摘要: 【1、最基本的弹出窗口代码】其实代码非常简单:<script LANGUAGE="javascript"> <!-- window.open ("page.html") --> </script> 因为着是一段javascripts代码,所以它们应该放在<script LANGUAGE="javascript">标签和</script>之间。<!-- 和 -->是对一些版本低的浏览器起作用,在这些老浏览器中不会将标签中的代码作为文本显示出来。要养成这个好习惯啊。 阅读全文
posted @ 2010-05-28 13:38 cpcpc 阅读(16539) 评论(0) 推荐(2) 编辑
摘要: 插入排序1. 直接插入排序原理:将数组分为无序区和有序区两个区,然后不断将无序区的第一个元素按大小顺序插入到有序区中去,最终将所有无序区元素都移动到有序区完成排序。要点:设立哨兵,作为临时存储和判断数组边界之用。实现:VoidInsertSort(NodeL[],intlength){Inti,j;//分别为有序区和无序区指针for(i=1;i<length;i++)//逐步扩大有序区{j=i+1;if(L[j]<L[i]){L[0]=L[j];//存储待排序元素While(L[0]<L[i])//查找在有序区中的插入位置,同时移动元素{L[i+1]=L[i];//移动i-- 阅读全文
posted @ 2010-05-28 13:35 cpcpc 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 1、.Net的HTTP请求.NET与ASP的运行机制有很大不同.ASP的请求与响应是,ASP页面被请求,然后逐行解释.是基于过程的.最多是包含了文件,需要先引入文件罢了.而.Net,在页面被请求后,首先是加载HTTP Module,这不是本文的重点.然后再加载HTTPHandler.这也不是本文的重点.加载的这两项,都需要在Webconfig文件中配置.大家知道的URL转址就是这么实现的.在完成这些之后才开始给出响应的页面.在给出响应页面的工作中,.Net就表现出和ASP的最大区别来..Net是面向对象的语言,是基于类的语言.没有类很难写出有意义的.Net程序.如果写出来,也就是个ASP的翻版 阅读全文
posted @ 2010-05-28 11:28 cpcpc 阅读(7002) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型接口{ public class GenericList<T> : System.Collections.Generic.IEnumerable<T> { //字段 protected Node head; protected Node current = null; //嵌套类 protected class Node { //字段 public Node next; private 阅读全文
posted @ 2010-05-04 14:47 cpcpc 阅读(241) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型委托{ delegate void StackEventHandler<T,U>(T sender,U eventArgs); //定义委托 //delegate void BinaryOp (int x, int y); //非泛型定义委托 class Stack<T> { public class StackEventArgs : EventArgs { } public even 阅读全文
posted @ 2010-05-04 14:45 cpcpc 阅读(209) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型_一__什么是泛型{ public class GenericList<T> { private class Node { //字段 private Node next; private T data; //有参构造函数 public Node(T t) { next = null; data = t; } //属性 next public Node Next { get { return nex 阅读全文
posted @ 2010-05-04 10:22 cpcpc 阅读(248) 评论(0) 推荐(0) 编辑
摘要: yield关键字yield return 语句返回集合的一个元素,并移动到下一个元素上. yield break可停止迭代. using System; using System.Collection; namespace Wrox.ProCSharp.Arrays { public class HelloCollection { public IEnumerator GetEnumerator() { yield return "Hello"; yield return "World"; } } } 包含yield语句的方法或属性也称为迭代块.迭代块必 阅读全文
posted @ 2010-05-04 09:52 cpcpc 阅读(209) 评论(0) 推荐(0) 编辑
摘要: using System;/// <summary>/// Summary description for IDCardValid/// </summary>namespace a{ public static class ss { public static void Main() { string str; while (true ) { str = Console.ReadLine(); Console.WriteLine(IDCardValid.CheckIDCard(str)); } } } public class IDCardValid { public 阅读全文
posted @ 2010-04-28 13:24 cpcpc 阅读(1399) 评论(1) 推荐(0) 编辑