ArcSDE C APiµÄC#µ÷ÓÃ
Ñ¡Á½¸ö±È½ÏÓдú±íÐԵĺ¯Êý
Ê×ÏÈÏÂÔØ°²×°sdk£¬½«ÆäÖеÄsde.dll,pe.dllºÍsg.dll¿½±´¹ýÀ´
ʹÓÃÈçϵĴúÂ룬ָ¶¨dllºóÖ±½Óµ÷ÓÃÆäÖеĺ¯Êý£¬
/// <summary>
/// Sets the value for a small integer column.
/// </summary>
[DllImport(".\\sde91.dll", SetLastError = true, ThrowOnUnmappableChar = true)]
public static extern Int32 SE_stream_set_smallint(IntPtr stream, Int16 column, sbyte[] short_val);
/// <summary>
/// Sets the value for a string column.
/// </summary>
[DllImport(".\\sde91.dll", SetLastError = true, ThrowOnUnmappableChar = true)]
public static extern Int32 SE_stream_set_nstring(IntPtr stream, Int16 column, byte[] string_val);
ÔÚ²åÈëÊý¾ÝʱʹÓõ½µÄÁ½¸öº¯Êý£¬Ò»¸öÊDzåÈëstring£¬ÁíÒ»¸öÊDzåÈësmallint£¨shortÐÍ£©
ÔÚc#ÖУ¬stringÊÇunicodeµÄ£¬ËùÒÔÐèҪʹÓú¯ÊýSE_stream_set_nstring
´Ëº¯ÊýµÄµÚÈý¸ö²ÎÊýÈçÒÔÉÏ´úÂëÖеģ¬Èç¹ûÖ±½ÓдΪstring£¬Ôò¶ÔÓÚÖÐÎÄ×Ö·û£¬³öÀ´µÄ¾ÍÊÇÂÒÂëÁË
ʹÓÃbyte£¬È»ºóµ÷ÓÃʱÈçÏ£º
ret = Stream.SE_stream_set_nstring(insertStream, 3, (new UnicodeEncoding()).GetBytes("²âÊÔ"));
¶ÔÓÚsmallintÐÍ£¬ÔÚSE_stream_set_smallintº¯ÊýÖÐÖ±½ÓʹÓÃshort£¬
Ò²³öÏÖ´íÎ󣬲»ÖªµÀΪʲô£¬ºóÀ´Ïëµ½
C#ÖеÄsbyteÊÇ8λµÄ£¬Á½¸ö×é³ÉµÄÊý×é¾ÍÊÇÒ»¸öshort(16λÓзûºÅÕûÐÍ)
È»ºóÊÔÁËÊÔ£¬¹ûÈ»¿ÉÓã¬
ʹÓõÄʱºò×¢Ò⣬±ÈÈçÒª´æÈëÒ»¸ö±äÁ¿ashort;
sbyte[0]ÖеÄÊýÖµ£¬¿ÉÒÔΪСÓÚ256µÄÖµ
µ±ÊýÖµ´óÓÚ256ʱ(1<<8)
sbyte[1]¾ÍÊÇÊýÖµashort>>8;
sbyte[0]Ϊashor-((ashort>>8)<<8)
ʹÓÃλÔËË㣬¼òµ¥·½±ãЧÂʸߣ¬²»ÖªµÀ»¹ÓÐûÓÐÆäËû²»ÐèҪת»»µÄ·½·¨
Ïà¹ØÎĵµ£º
ÔÚCÓëC++ÓïÑÔÖж¼´æÔڹؼü×Öconst,ºÜ¶àÈ˶¼¶Ô´Ë¹Ø¼ü×Ö´æÔÚÒ»¸ö´íÎóµÄÈÏʶ£¬ÈÏΪÔÚCÓïÑÔÖйؼü×ÖconstÊÇʹ±äÁ¿×÷Ϊһ¸ö³£Á¿£¬¼´½«±äÁ¿³£Á¿»¯£¬¾ÍÏñºê¶¨ÒåÒ»Ñù¡£¶øÔÚCÓïÑÔÖеĹؼü×ÖconstËùÆðµÄ×÷Óò¢²»ÊÇʹ±äÁ¿³£Á¿»°£¬¶øÊÇÏÞÖÆ±äÁ¿£¬Ê¹±äÁ¿³ýÁ˱»¸³³õÖµÍ⣬ÎÞ·¨±»ÖØÐ¸³Öµ¡£
¶øÔÚC++Öйؼü×Öconst²»½öʹ ......
1.ÇóÏÂÃæº¯ÊýµÄ·µ»ØÖµ£¨Î¢Èí£©
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
......
ʲôÊÇmvcģʽ £¿
MVC ʽµÄ³öÏÖ²»½öʵÏÖÁ˹¦ÄÜÄ£¿éºÍÏÔʾģ¿éµÄ·ÖÀ룬ͬʱËü»¹Ìá¸ßÁËÓ¦ÓÃϵͳµÄ¿Éά»¤ÐÔ¡¢¿ÉÀ©Õ¹ÐÔ¡¢¿ÉÒÆÖ²ÐÔºÍ×é¼þµÄ¿É¸´ÓÃÐÔ
B/S ģʽºÍC/SģʽÓÐÊ²Ã´Çø±ð£¿
C/S½á¹¹£¬¼´Client/Server(¿Í»§»ú/·þÎñÆ÷)½á¹¹£¬ÊÇ´ó¼ÒÊìÖªµÄÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ý½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶Ë£ ......
[root@ocsser file]# cat array-05.c
//this is a program for two juzheng xiangcheng.
#include <stdio.h>
int main(){
int i,j,m,n;
int g,k,f;
int c[5][6];
& ......
<select class="wellId" id="gasOriginWellId" name="gasOriginWellId" value="${mechWellForm.gasOriginWellId}" index="true">
< ......