上一页 1 2 3 4 5 6 ··· 8 下一页

Primary Key Increase by Trigger

摘要: Oracle Create Table:CREATE TABLE TAB( ID NUMBER(10) NOT NULL PRIMARY KEY, NAME VARCHAR(19) NOT NULL);Drop table when exists:BEGIN EXECUTE IMMEDIATE 'DROP TABLE TAB';EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF;END;Create sequence as id:CREATE SEQUENCE ID_SEQ_TABST... 阅读全文
posted @ 2014-03-06 14:46 很遗憾我不是 阅读(265) 评论(0) 推荐(0) 编辑

A good way to export a datagridview to excel table

摘要: The original code is in the url here. And I have change some of the code to get it run.And I'm suprised by the way the guy using the LINQ.And I'm thinking of learning more about LINQ someday. var lines = new List<string>(); var valueLines = this.changeTable.AsEnumerable() ... 阅读全文
posted @ 2013-06-14 01:15 很遗憾我不是 阅读(214) 评论(0) 推荐(0) 编辑

Dictionary is not like a array

摘要: As the title, everybody knows that, a dictionary is not a array, and not a arraylist, neither two array or two arraylist.Then there is a problem:I use this to iterate the array(arr_tmp):for(int i = 0; i < arr.length; i++){ sum += arr[i];}I use this to iterate the arraylist(arrlst_tmp):for(int i = 阅读全文
posted @ 2013-05-25 11:30 很遗憾我不是 阅读(291) 评论(0) 推荐(0) 编辑

图像相关系数

摘要: 两幅图像的相关系数求法: img_a = img_a – MEAN(img_a) img_b = img_b – MEAN(img_b) Relation_a_b = r = sum(sum(img_a.*img_b))/sqrt(sum(sum(img_a.*img_a))*sum(sum(img_b.*img_b))); matlab中corr2可以求解,代码如下: a = a - ... 阅读全文
posted @ 2013-05-16 21:45 很遗憾我不是 阅读(5224) 评论(0) 推荐(0) 编辑

C# DataGridView 禁止列排序

摘要: SortMode是DataColumn的属性值,通过DataGridView获取DataColumn,然后将DataColumn的SortMode属性设置也可以达到同样的目的。DataGridView中的Columns属性里面可以设置。进入“EditColumns”窗口后,在相应的列属性设置里面把SortMode属性选择为"NotSortable"就可以了。 for (int i = 0; i < this.dataGridView1.Columns.Count; i++) { this.dataGridView1.Co... 阅读全文
posted @ 2013-05-15 00:47 很遗憾我不是 阅读(33332) 评论(0) 推荐(0) 编辑

NetLogo A-Star path finding

摘要: you should add a "setup" button and an "go" button on the GUI of the netlogo, like this:and then you paste the code here to the code tab:patches-own[ can-reach? parent-node is-open? is-close? g-score f-score temp-g-score]globals[ move-space open-set close-set start-node goal-node 阅读全文
posted @ 2013-04-15 10:08 很遗憾我不是 阅读(902) 评论(0) 推荐(0) 编辑

Release COM Objects in AE

摘要: When you codeing in Arc Engine, you need to consider the objects that you created, and if you leave so many unmanaged objects in the memory, and then you will find some wired activities.You may need: System.Runtime.InteropServices.Marshal.ReleaseComObject(pWorkFactory);Or, you may use the ComComRel. 阅读全文
posted @ 2013-03-26 18:19 很遗憾我不是 阅读(810) 评论(0) 推荐(0) 编辑

IDL+C#三种调用方式

摘要: 一. IDLDrawWidget 控件(可视化界面) 1.新建Windows应用程序,添加IDLDrawWidget控件到环境,拖拽至程序界面。 2. 触发事件中添加代码: intn;this.axIDLDrawWidget1.IdlPath=@"D:\ProgramFiles\ITT\IDL71\bin\bin.x86\i dl.dll";n=axIDLDrawWidget1.InitIDL((int)this.Handle);if(n==0){MessageBox.Show("IDL控件初始化失败");}axIDLDrawWidget1.SetOut 阅读全文
posted @ 2013-03-26 14:37 很遗憾我不是 阅读(5375) 评论(0) 推荐(1) 编辑

Geoprocessor edit the featureclasses in memmory

摘要: geoprocessor editor: Geoprocessor gp = new Geoprocessor(); gp.OverwriteOutput = true; IFeatureLayer inputfeaturelayer = pMap.get_Layer(0) as IFeatureLayer; IFeatureLayer cliplayer = pMap.get_Layer(1) as IFeatureLayer; IFeatureClass inputfeaturec... 阅读全文
posted @ 2013-03-23 14:36 很遗憾我不是 阅读(295) 评论(0) 推荐(0) 编辑

geoprocessor test (转载——待测)

摘要: geoprocessing唯一难的地方就是参数,需要根据不同的情况设置,我就以intersect方法为例,编程实现两个图层的intersect.新建一个项目,添加引用,我们用的工具intersect是在AnalysisTools中的,在form中加一个button,然后实现其方法,如下,别忘了添加命名空间using System;using System.Collections.Generic;using System.Linq;using System.Text;using ESRI.ArcGIS.ArcMap;using ESRI.ArcGIS.Controls;using ESRI.Ar 阅读全文
posted @ 2013-03-23 00:58 很遗憾我不是 阅读(334) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页