摘要: 1.课表控件当在该课表控件点击(如行:星期一、列:上午第一节课),则可将教学班安排在该时段上课或删除上课时段2.合并多行列内容相同的DataGrid下图中专业描述相同的行自动合并3.跨多行显示同一条记录的DataGrid在上图中,教师ID为22的教室有三条不同的排课记录,该DataGrid自动将相同ID的记录合并显示在一起,并去除了水平线,让人看起来就像一条记录4.DataGrid中实现checkbox列在智能监控系统中的设置窗口中的DataGrid,除合并多行相同内容的列外,还实现了在数据列中绑定CheckBox控件5.在DataGrid列中绑定Multi-Column ComboBox控件 阅读全文
posted @ 2012-07-18 10:51 simplefrog 阅读(875) 评论(0) 推荐(0) 编辑
摘要: 语法delete from aa truncate table aa 区别 1.delete from后面可以写条件,truncate不可以。2.delete from记录是一条条删的,所删除的每行记录都会进日志,而truncate一次性删掉整个页,因此日至里面只记录页释放,简言之,delete from更新日志,truncate基本不,所用的事务日志空间较少。3.delete from删空表后,会保留一个空的页,truncate在表中不会留有任何页。 4.当使用行锁执行 DELETE 语句时,将锁定表中各行以便删除。truncate始终锁定表和页,而不是锁定各行。 5.如果有identity 阅读全文
posted @ 2012-07-30 13:58 simplefrog 阅读(65520) 评论(0) 推荐(8) 编辑
摘要: Google Maps、Virtual Earth等网络地理所使用的地图投影,常被称作Web Mercator或Spherical Mercator,它与常规墨卡托投影的主要区别就是把地球模拟为球体而非椭球体。 什么是墨卡托投影? 墨卡托(Mercator)投影,又名"等角正轴圆柱投影",荷兰地图学家墨卡托(Mercator)在1569年拟定,假设地球被围在一个中空的圆柱里,其赤道与圆柱相接触,然后再假想地球中心有一盏灯,把球面上的图形投影到圆柱体上,再把圆柱体展开,这就是一幅标准纬线为零度(即赤道)的"墨卡托投影"绘制出的世界地图。从球到平面,肯定有个 阅读全文
posted @ 2012-07-16 20:48 simplefrog 阅读(754) 评论(0) 推荐(0) 编辑
摘要: Click on a tile to display the numerical boundaries...Addressing tiles: same tile bounds with different indexes Google Maps, Microsoft Virtual Earth, Yahoo Maps, and other commercial API providers as well as OpenStreetMap and OpenAerialMap are using the same projection and tiling profile and tiles a 阅读全文
posted @ 2012-07-16 20:40 simplefrog 阅读(539) 评论(0) 推荐(0) 编辑
摘要: by MortenPeople are often mixing the above as if they were one and the same, so here’s a recap of them. One of the things you often find people saying is that “my data is in the WGS84 coordinate system”. This doesn’t really make sense, but I will get back to this later. This is a very confusing subj 阅读全文
posted @ 2012-07-16 20:29 simplefrog 阅读(384) 评论(0) 推荐(0) 编辑
摘要: IntroductionThe surface of the Earth is anything but uniform. The oceans, can be treated as reasonably uniform, but the surface or topography of the land masses exhibits large vertical variations between mountains and valleys. These variations make it impossible to approximate the shape of the Earth 阅读全文
posted @ 2012-07-16 20:08 simplefrog 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 在开发单线图排版算法演示功能时,需要每执行一步排版过程,调整了电力设备的位置后就暂停一下,笔者第一个想到的方法就是让主线程暂停代码如下:private void showlayout_delay(double p_second) { DateTime now = DateTime.Now; while (now.AddSeconds(p_second) > DateTime.Now) { } return; }或System.Threading.Thread.Sleep(p_waitMilliSecond);上面的方法虽然让程序暂停下来,但是却存在一个问题:无论排版过程运行了多少步,程序 阅读全文
posted @ 2012-07-16 19:54 simplefrog 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 当从数据库获取单线图数据时,需一段时间等待,故在等待提示窗口中使用gif动画来表示操作正在运行中,但当笔者将等待提示窗口放在main()主线程中时,发现gif动画不会动了解决方法:带gif动画的等待提示窗口在另一个线程中运行下面是等待提示窗口的代码public partial class Form_wait_thread : Form { public Form_wait_thread() { InitializeComponent(); } private delegate void SetTextHandler(string text); public void SetText(strin 阅读全文
posted @ 2012-07-16 18:50 simplefrog 阅读(1470) 评论(0) 推荐(0) 编辑
摘要: 在开发WEB应用时会遇到一种情况,一个部署在域名www.a.com的网站使用一个frame或iframe嵌入一个部署在域名www.b.com的网站的网页page.aspx而这个page.aspx使用了ASP_NET AJAX,此时ASP_NET AJAX就会出现跨域访问的问题解决方法:1、为ScriptManager添加脚本引用,不从ScriptResource.axd中加载MicrosoftAjax.js脚本,而是直接加载<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePag 阅读全文
posted @ 2012-07-16 10:13 simplefrog 阅读(1002) 评论(0) 推荐(0) 编辑
摘要: 如果dropdownlist绑定的是英文数据,则没问题,如果是中文就出错在webconfig文件中加入下面的配置即可解决问题<location path="module/BusinessFunction/visionPlan/ksjhArrangePlan.aspx"> <system.web> <globalization requestEncoding="utf-8" responseEncoding="utf-8"/> </system.web></location> 阅读全文
posted @ 2012-07-16 10:00 simplefrog 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 1.定义空(Null)值空值是一个不可用的,没有被分配的, 或者不能得到的值.空值不同于零或者空格.2.在算术表达式中的空值在算术表达式中,与空值运算的结果为空。SQL> ed已写入 file afiedt.buf 1 SELECT last_name,12* salary, 12*salary*(1+commission_pct) 2* FROM employeesSQL> /如果commission_pct列有空值,则即使salary不可能是空,但是12*salary*(1+commission_pct)也是一个空值解决方法:使用nvl(可能有空值的列,如果是空值用什么值代替) 阅读全文
posted @ 2012-07-15 17:35 simplefrog 阅读(7992) 评论(0) 推荐(0) 编辑
摘要: where语句中索引独立出现,索引才会起作用,不要放在表达式中(如: 转换函数一般放在值那边,不要放在列那边),或发生不合适的隐式转换1.表达式例子表employees的last_name列上有个索引下面的语句使用索引SQL> set autotrace trace expSQL> SELECT last_name, job_id, department_id 2 FROM employees 3 WHERE last_name = 'Whalen';但是下面的语句不使用索引SQL> set autotrace trace expSQL> SELECT 阅读全文
posted @ 2012-07-15 17:27 simplefrog 阅读(2196) 评论(0) 推荐(0) 编辑
摘要: 日期数据应该使用单引号扩起来. 字符数据大小写敏感, 日期数据格式敏感. 默认的日期格式是 DD-MON-RR.有日期需求时,日期可能格式多样,所以要做显示转换,不要隐式转换Oracle的注册表配置,参数配置,会话配置都会带来日期格式的变化SQL> select last_name,hire_date from employees where hire_date='07-6月 -94';更改会话设置后SQL> alter session set nls_date_format='yyyy-mm-dd';SQL> select last_name 阅读全文
posted @ 2012-07-15 16:46 simplefrog 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 使用LIKE运算符执行基于通配符的模糊查询,查询包含字符串的所有数据. 查询条件可以包含数字或者字符文本: %表示零个或者多个字符. _ 表示一个字符.1.LIKE做模糊查询时,首字母确定使用索引SQL> set autotrace trace expSQL> select last_name,salary 2 from employees 3 where last_name like 'K%';首字母不确定不走索引SQL> select last_name,salary 2 from employees 3 where last_name like ' 阅读全文
posted @ 2012-07-15 16:40 simplefrog 阅读(574) 评论(0) 推荐(0) 编辑
摘要: CASE表达式单条件(单列)来走分支看下面的加薪语句SQL> SELECT last_name, job_id, salary, 2 CASE job_id WHEN 'IT_PROG' THEN 1.10*salary 3 WHEN 'ST_CLERK' THEN 1.15*salary 4 WHEN 'SA_REP' THEN 1.20*salary 5 ELSE salary END "REVISED_SALARY" 6 FROM employees;1.CASE表达式通过使用类似IF-THEN-ELSE语句的方法 阅读全文
posted @ 2012-07-15 16:29 simplefrog 阅读(2543) 评论(0) 推荐(0) 编辑
摘要: SQL> select department_id,sum(salary) 2 from employees 3 where sum(salary)>30000;为上面上面的语句会报错?是因为执行顺序的原因先from 数据源,然后select ,确定涉及哪些列,然后where 看数据源哪些记录满足条件然后grup by ,然后having ,然后显示order by 阅读全文
posted @ 2012-07-15 16:20 simplefrog 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1.单行子查询只返回一行.使用单行比较操作符SELECT last_nameFROM employeesWHERE salary > (SELECT salary FROM employees WHERE last_name = 'Abel');Salary上增加索引会带来性能提升.2.多行子查询返回多于一行.使用多行比较操作符SQL> ed已写入 file afiedt.buf 1 SELECT employee_id, last_name 2 FROM employees 3 WHERE salary in 4 (SELECT MIN(salary) 5 FRO 阅读全文
posted @ 2012-07-15 16:18 simplefrog 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 有两个表job_history表有10条数据;employees表有107条数据,这两个表有2条数据是重复的SQL> ed已写入 file afiedt.buf 1 SELECT employee_id id, job_id 2 FROM employees 3 minus 4 SELECT employee_id id, job_id 5* FROM job_historySQL> /表示返回在employees中存在,而不在job_history中的记录,返回105条数据,去掉了2条重复的数据SQL> ed已写入 file afiedt.buf 1 SELECT empl 阅读全文
posted @ 2012-07-15 15:55 simplefrog 阅读(2184) 评论(0) 推荐(0) 编辑
摘要: 1.ROLLUPROLLUP的作用相当于SQL> set autotrace onSQL> select department_id,job_id,count(*) 2 from employees 3 group by department_id,job_id 4 union 5 select department_id,null,count(*) 6 from employees 7 group by department_id 8 union 9 select null,null,count(*)10 from employees;最后面的SA_REP表示此jobid没有部门 阅读全文
posted @ 2012-07-15 15:43 simplefrog 阅读(38486) 评论(0) 推荐(3) 编辑
摘要: 在开发WEB应用时分页功能是必不可少的,下面是直接在数据库端进行分页的SQL语句select * from(select row_number() over(order by a.排序列) as rn , a.* from 表 a )where rn>分页开始行 and rn<分页结束行上面的over是Oracle的开窗函数。 over(order by 排序列) 就是按照指定的列排序并进行累加。 对什么累加呢?就是前面的row_number()系统函数。 阅读全文
posted @ 2012-07-15 15:15 simplefrog 阅读(392) 评论(0) 推荐(0) 编辑