1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
1Calendar time=Calendar.getInstance();
2time.clear();
3time.set(Calendar.YEAR,year); //year Ϊ int
4time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0
5int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//±¾Ô·ݵÄÌìÊý
×¢£ºÔÚʹÓÃset·½·¨Ö®Ç°£¬±ØÐëÏÈclearһϣ¬·ñÔòºÜ¶àÐÅÏ¢»á¼Ì³Ð×Ôϵͳµ±Ç°Ê±¼ä
2.CalendarºÍDateµÄת»¯
(1) Calendarת»¯ÎªDate
Calendar cal=Calendar.getInstance();
Date date=cal.getTime();
(2) Dateת»¯ÎªCalendar
Date date=new Date();
Calendar cal=Calendar.getInstance();
cal.setTime(date);
3.¸ñʽ»¯Êä³öÈÕÆÚʱ¼ä £¨Õâ¸öÓõıȽ϶ࣩ
ÆäÒ»
Date date=new Date();
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String time=df.format(date);
System.out.println(time);//2008-10-27 08:52:32
Æä¶þ
Calendar c = Calendar.getInstance();
System.out.println(c.getTime());//Mon Oct 27 08:51:21 CST 2008
SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat(" yyyy-MM-dd HH:mm:ss ");
c = Calendar.getIns ......
½ñÌì¿´¡¶C++ Templates¡·£¬¿´µ½Ò»¸ö·ÇÀàÐÍÄ£°åʵ²ÎµÄÀý×ÓÖÐÓÐÕâÑùµÄ´úÂ룺
template <typename T, T nontype_param>
class C;
class X{
public:
int n;
static bool b;
};
C<int X::*, &X::n>* c5;
X::*¿ÉÒÔ±íʾXÀàµÄ³ÉÔ±µÄÖ¸Õ룬ÓÃÓÚ±íʾÀàÐÍ£¬µÚÒ»´Î¼û£¬ºÜ¾ªÆ棬¼ÇÏÂÁË¡£C++¹ûȻǿ´ó¡£ ......
ÔõÑù¼ÓÔØÆäËûµÄÓ¦ÓóÌÐò?
Èý¸öSDKº¯Êý winexec,
shellexecute,createprocess¿ÉÒÔʹÓá£WinExec×î¼òµ¥£¬Á½¸ö²ÎÊý£¬Ç°Ò»¸öÖ¸¶¨Â·¾¶£¬ºóÒ»¸öÖ¸¶¨ÏÔʾ·½Ê½.ºóÒ»¸ö²ÎÊýÖµµÃ
˵һÏ£¬±ÈÈçÄàÓÃ
SW_SHOWMAXMIZED·½Ê½È¥¼ÓÔØÒ»¸öÎÞ×î´ó»¯°´Å¥µÄ³ÌÐò£¬¾ÍÊÇNeterm,calcµÈµÈ£¬¾Í²»»á³öÏÖÕý³£µÄ´°Ì壬µ«ÊÇÒѾ±»¼Óµ½ÈÎÎñÁбíÀï
ÁË¡£
ShellExecute½Ï WinExexÁé»îÒ»µã£¬¿ÉÒÔÖ¸¶¨¹¤×÷Ŀ¼,ÏÂÃæµÄExample¾ÍÊÇÖ±½Ó´ò¿ª
c:\temp\1.txt,¶ø²»ÓüÓÔØÓë txtÎļþ¹ØÁªµÄÓ¦ÓóÌÐò,ºÜ¶à°²×°³ÌÐòÍê³Éºó¶¼»á´ò¿ªÒ»¸ö´°¿Ú£¬À´ÏÔʾReadme or
Faq,ÎҲ¾ÍÊÇÕâô×÷µÄÀ².
ShellExecute(NULL,NULL,_T("1.txt"),NULL,_T("c:\\temp"),SW_SHOWMAXMIZED)
CreateProcess×ÔÓ£¬Ò»¹²ÓÐÊ®¸ö²ÎÊý£¬²»¹ý´ó²¿·Ö¶¼¿ÉÒÔÓÃNULL´úÌ棬Ëü¿ÉÒÔÖ¸¶¨½ø³ÌµÄ°²È«ÊôÐÔ£¬¼Ì³ÐÐÅÏ¢£¬ÀàµÄÓÅÏȼ¶µÈµÈ.À´¿´¸öºÜ¼òµ¥µÄExample:
STARTUPINFO stinfo
//Æô¶¯´°¿ÚµÄÐÅÏ¢
PROCESSINFO procinfo //½ø³ÌµÄÐÅÏ¢
CreateProcess(NULL,_T("notepad.exe"),NULL,NULL.FALSE,
NORMAL_PRIORITY_
CLASS,NULL,NULL, &stinfo,&procinfo)
³£ÓþÙÀý£º1¡¢º¯Êý£ºsystem ......
ÐòºÅ
Àà±ð
SQLServer
C Sharp
±¸×¢
1
ÕûÊý
bit
Boolean
Trueת»»Îª1Falseת»»Îª0
2
tinyint
Byte
C Sharp Êý¾ÝÀàÐͶ¼Î»ÓÚSystemÃüÃû¿Õ¼ä
3
smallint
Int16
4
int
Int32
5
bigint
Int64
6
smallmoney
Decimal
7
money
Decimal
8
numeric
Decimal
9
decimal
Decimal
10
¸¡µãÊý
float
Double
11
real
Single
12
ÈÕÆÚºÍʱ¼ä
smalldatetime
DateTime
13
datetime
DateTime
14
timestamp
DateTime
15
×Ö·û´®
char
String
16
text
String
17
varchar
String
18
nchar
String
19
ntext
String
20
nvarchar
String
21
¶þ½øÖÆÊý¾Ý
¡¡
¡¡
binary
Byte[]
22
varbinary
Byte[]
23
image
Byte[]
24
ÆäËû
uniqueidentifier
Guid
25
Variant
Object
PS.±¾À´´òËãתÔØTrackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=95675(SQL SERVERÓëC#ÖÐÊý¾ÝÀàÐ͵ĶÔÓ¦¹Øϵ) ,µ«¾õµÃ×÷ÕßÒÔ´úÂëµÄ·½Ê½Ð´³öÀ´,¿´ÆðÀ´²»ÊÇÄÇôֱ¹Û,²éÕÒÒ²²»·½±ã.ËùÒԲο¼ÁË×÷ÕßµÄÎÄÕºÍSQLServer05µÄ°ïÖúÎĵµÖÆ×÷ÁËÒÔÉÏÕâ¸ö±í¸ñ.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1288946
/ ......
¡¡
¡¡ÔÚJavaÖУ¬thisͨ³£Ö¸µ±Ç°¶ÔÏó£¬superÔòÖ¸¸¸ÀàµÄ¡£µ±ÄãÏëÒªÒýÓõ±Ç°¶ÔÏóµÄijÖÖ¶«Î÷£¬±ÈÈ統ǰ¶ÔÏóµÄij¸ö·½·¨£¬»òµ±Ç°¶ÔÏóµÄij¸ö³ÉÔ±£¬Äã±ã
¿ÉÒÔÀûÓÃthisÀ´ÊµÏÖÕâ¸öÄ¿µÄ£¬µ±È»£¬thisµÄÁíÒ»¸öÓÃ;Êǵ÷Óõ±Ç°¶ÔÏóµÄÁíÒ»¸ö¹¹Ô캯Êý£¬ÕâЩÂíÉϾÍÒªÌÖÂÛ¡£Èç¹ûÄãÏëÒýÓø¸ÀàµÄijÖÖ¶«Î÷£¬Ôò·Ç
superĪÊô¡£ÓÉÓÚthisÓësuperÓÐÈç´ËÏàËƵÄһЩÌØÐÔºÍÓëÉú¾ãÀ´µÄijÖÖ¹Øϵ£¬ËùÒÔÎÒÃÇÔÚÕâÒ»¿é¶ùÀ´ÌÖÂÛ£¬Ï£ÍûÄÜ°ïÖúÄãÇø·ÖºÍÕÆÎÕËüÃÇÁ½¸ö¡£
ÔÚÒ»°ã·½·¨ÖÐ
¡¡
¡¡×îÆÕ±éµÄÇé¿ö¾ÍÊÇ£¬ÔÚÄãµÄ·½·¨ÖеÄij¸öÐβÎÃûÓ뵱ǰ¶ÔÏóµÄij¸ö³ÉÔ±ÓÐÏàͬµÄÃû×Ö£¬ÕâʱΪÁ˲»ÖÁÓÚ»ìÏý£¬Äã±ãÐèÒªÃ÷ȷʹÓÃthis¹Ø¼ü×ÖÀ´Ö¸Ã÷ÄãҪʹÓÃij
¸ö³ÉÔ±£¬Ê¹Ó÷½·¨ÊÇ“this.³ÉÔ±Ãû”£¬¶ø²»´øthisµÄÄǸö±ãÊÇÐβΡ£ÁíÍ⣬»¹¿ÉÒÔÓÓthis.·½·¨Ãû”À´ÒýÓõ±Ç°¶ÔÏóµÄij¸ö·½·¨£¬µ«Õâʱthis
¾Í²»ÊDZØÐëµÄÁË£¬Äã¿ÉÒÔÖ±½ÓÓ÷½·¨ÃûÀ´·ÃÎÊÄǸö·½·¨£¬±àÒëÆ÷»áÖªµÀÄãÒªµ÷ÓõÄÊÇÄÇÒ»¸ö¡£ÏÂÃæµÄ´úÂëÑÝʾÁËÉÏÃæµÄÓ÷¨£º
public class DemoThis{
private String name;
private int age;
DemoThis(String name,int age){
setName(name); //Äã¿ÉÒÔ¼ÓÉ ......
Perlµ±ÄêÈçºÎÔÚÉ̽ç³öÃû£¿ÆäÇ¿´óµÄÕýÔò±í´ïʽ¡£¶øPHPÄØ£¿ËûÊÇÒ»ÃÅ´ÓUnixÏ·¢Õ¹ÆðÀ´µÄÓïÑÔ£¬µ±È»Ò²¾Í¼Ì³ÐÁËPerlµÄºÜ¶àÌص㣬ͬʱCµÄÓŵ㶼ÓС£¿ìËÙ¡¢¼ò½à¡¢Ã÷ÁË£¬ÓÈÆäÊÇC³ÌÐòÔ±£¬PHPÊÇÖÁ°®£¬ÎÒ¾ÍÊÇÉî°®×Å“PHP”£¨¶¼ÍüÁËÅ®ÓÑÁË:)£©¡£ÕâÀÎÒÏëÀ´Ð´Ò»ÆªPHPµÄ±äÁ¿¡¢Êý×éÓ¦Óü¼ÇɺÍPHPµÄÕýÔò±í´ïʽ¡¢PHPµÄÄ£°åÓ¦Óã¬ÒÔºóÓÐʱ¼äÔÙдPHPÓëCOM¡¢PHPÓëXMLµÄÍêÈ«½áºÏ¡£
1¡¢±äÁ¿¡¢Êý×éµÄÓ¦Óü¼ÇÉ
(1)ºÜ¶àÈËÓõò»¶àµÄÊý×麯Êý¡£foreach¡¢list¡¢each¡£·Ö±ð¾Ù¼¸¸öÀý×Ó£¬Ó¦¸Ã¾ÍÄÜÖªµÀÁË¡£Àý£º
<?php
$data = array('a' => 'data1', 'b' => 'data2', 'c' => 'data3');
while(list($subscript, $value) = each($data))
{
echo "$subscript => $value :: ";
echo "$subscript => $value <br>";
}
reset($data);
foreach($data as $subscript => $value)
{
echo "$subscript => $value :: ";
echo "$subscript => $value <br>"; ......