Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÖÐһЩ×Ö·û´®²Ù×÷µÄ³£ÓÃÓ÷¨,c#±àÂëºÍ½âÂë

//»ñµÃºº×ÖµÄÇøÎ»Âë
¡¡¡¡byte[] array = new byte[2];
¡¡¡¡array = System.Text.Encoding.Default.GetBytes("°¡");
int i1 = (short)(array[0] - ''\0'');
¡¡¡¡int i2 = (short)(array[1] - ''\0'');
//unicode½âÂ뷽ʽϵĺº×ÖÂë
¡¡¡¡array = System.Text.Encoding.Unicode.GetBytes("°¡");
¡¡¡¡i1 = (short)(array[0] - ''\0'');
¡¡¡¡i2 = (short)(array[1] - ''\0'');
//unicode·´½âÂëΪºº×Ö
¡¡¡¡string str = "4a55";
¡¡¡¡string s1 = str.Substring(0,2);
¡¡¡¡string s2 = str.Substring(2,2);
int t1 = Convert.ToInt32(s1,16);
¡¡¡¡int t2 = Convert.ToInt32(s2,16);
array[0] = (byte)t1;
¡¡¡¡array[1] = (byte)t2;
string s = System.Text.Encoding.Unicode.GetString(array);
//default·½Ê½·´½âÂëΪºº×Ö
¡¡¡¡array[0] = (byte)196;
¡¡¡¡array[1] = (byte)207;
¡¡¡¡s = System.Text.Encoding.Default.GetString(array);
//È¡×Ö·û´®³¤¶È
¡¡¡¡s = "iam·½Ç¹Ç¹";
¡¡¡¡int len = s.Length;//will output as 6
¡¡¡¡byte[] sarr = System.Text.Encoding.Default.GetBytes(s);
¡¡¡¡len = sarr.Length;//will output as 3+3*2=9
//×Ö·û´®Ïà¼Ó
¡¡¡¡System.Text.StringBuilder sb = new System.Text.StringBuilder("");
¡¡¡¡sb.Append("i ");
¡¡¡¡sb.Append("am ");
¡¡¡¡sb.Append("·½Ç¹Ç¹");
/////////////////////////////////////////////////////////////////////
string --> byte array
byte[] data=Syste.Text.Encoding.ASCII.GetBytes(string);
string --> byte
byte data = Convert.ToByte(string);
byte[]-->string
string string = Encoding.ASCII.GetString( bytes, 0, nBytesSize );
 
C# URL±àÂëÓë½âÂë
--------------------------------------------------------------------------------
 
×î½ü×öÁËÒ»¸öÍøÕ¾Í³¼Æ·ÖÎöϵͳ£¬ÌرðÔÚËÑË÷ÒýÇæ·ÖÎöÄÇÒ»²¿·Ö·ÑÁ˲»ÉÙʱ¼ä£¬´ÓÒѱàÂëµÄURLÖÐÌáÈ¡ËÑË÷¹Ø¼ü´ÊÔÙ½øÐнâÂë¡£Ö÷Á÷µÄËÑË÷ÒýÇæÖУ¬URLËùʹÓõÄ×Ö·û±àÂë¶¼²»Í¬£¬±ÈÈ磬baiduĬÈÏÊÇgb2312£¬googleĬÈÏÊÇutf-8¡£¶ø°Ù¶ÈÓû§¿ÉÒÔÖ¸¶¨utf-8±àÂë¡£ÒÔÕâÁ½¸öËÑË÷ÒýÇæ·ÖÎö£¬URL¿ÉÄÜÊÇgb2312£¬Ò²¿ÉÄÜÊÇutf-8¡£Í·´óÁË£¡¾­¹ý¼¸·¬×ÁÄ¥¡£µÃ³öÒ»¸öÔÝʱ¿ÉÒÔ¶Ô¸¶µÄ¼òµ¥·½·¨¡£
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
//oStrÊÇUrlEncode±àÂë×Ö·û´®
Encoding gb2312 = Encoding.GetEncoding("gb2312"); 


Ïà¹ØÎĵµ£º

¹ØÓÚhibernateÅäÖÃc3p0Á¬½Ó³ØÁ¬½ÓmysqlÎÊÌâ

ǰЩÌì¿´ÁËÀî¸Õ<struts2+hibernate+spring>ÄÇÊéÉϵÄhibernate£¬ÅäÖÃÎļþÒ²Êǰ´ÕÕÉÏÃæÇýøhibernate.cfg.xmlÎļþµÄ£¬Student.javaÅäÖõÄStudent.hbm.xmlÎļþ¾õµÃҲûʲôÎÊÌ⣬µ«²»Öªµ½Ôõô»ØÊ¾ÍÊDZ¨ connection can not open¡£ÓôÃÆ°¡£¬ºóÀ´ÎҾͰÑÊéÀïÃæµÄÅäÖÃÎļþºÍÔ´Â룬¸´ÖƵ½MyEclipseÏÂÃæµÄÒ»¸öÐÂwebÏîÄ¿ÖУ¬ÔËÐ ......

C#СTip£ºXml²Ù×÷¼òÃ÷ÊÖ²á 2


2£©ÈçºÎ´´½¨Ò»¸öxmlÎĵµ
ÓÉÓÚxmlʵÖÊÒ²Ö»ÊÇÒ»¸öÎı¾Îļþ£¬ËùÒÔ×î¼òµ¥Äã¿ÉÒÔÖ±½ÓʹÓÃSystem.IOϵÄÀàÉú³ÉÒ»¸öÎļþ£¬²¢´æ´¢³ÉxmlÎļþ£¬µ±È»£¬ÄãÐèÒªÊÖ¶¯±£Ö¤¸ÃÎļþÐÎʽÁ¼ºÃ£¬±ÈÈç±ØÐëÓиùÔªËØ¡¢±ØÐëÓйرձêÇ©¡¢±ØÐëÕýȷǶÌ׵ȵȡ£
 
Èç¹ûÄãÀÁµÃ×Ô¼ºÈ¥ÏëÎļþµÄÐÎʽ£¬¿ÉÒÔʹÓÃSystem.XmlϵÄÀà¡£
 
Code
Xml ......

C compiler cannot create executablesµÄ½â¾ö·½·¨

¸ãÁ˼¸ÌìµÄÎÊÌâ¡£±àÒëÒ»¸öÎļþʱ,ÀÏÊdzöÏÂÃæÕâ¸ö´í.
checking for C compiler default output file name… configure: error: C compiler cannot create executables
û·¨×Ó,ÕÒ¸ßÈ˰ïÎÒ´¦Àí,¹þ¹þ….¼Ç¼ÏÂÀ´.ÒòΪ64λµÄ»úÆ÷£¬Ä¬È϶ÔCFLAGSµÄÕâÊǽøÐÐÁËÉèÖÃ,ËùÒÔʹÓÃÏÂÃæµÄÃüÁîÇå¿ÕËû¾ÍÐÐÁË£¬ÕâÑùÈí¼þ¾Í²»»á±¨ ......

TURBO C 2.0 Îļþ·ÖÀà

 
 2009-12-24          21:15:41
 
TURBO C 2.0 Îļþ·ÖÀà
 
·Ô­´´·
ÍøÉÏÏÂÔØTURBO C 2.0ºÜ»ìÂÒ£¬Ò»Ö±Ïë°ÑËýÕûÀíһϣ¬Ê¹¸÷¸öʵÀý·Ö¿ª£¬¸÷¸ö²»Í¬²¿·Ö·Ö¿ª¡£¶Ï¶ÏÐøÐø»¨Á˺ܳ¤Ê±¼ä£¬µ½½ñÌìÖÕÓÚÕûÀíÍêÁË¡£·¢Ìû³öÀ´¸ø´ó¼Ò¿´¿´¡£ÓÐÐèÒªµÄ ......

C#ÖÐref²ÎÊýÓëout²ÎÊýµÄÇø±ð

ÏÈÌù´úÂë
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ref_and_Out_test
{
    class Program
    {
        static void Main(string[] args)
      & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ