Ip获取string strHostName =
System.Net.Dns.GetHostName();string clientIPAddress =
System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();数据库...
分类:
数据库 时间:
2014-06-10 22:13:23
阅读次数:
232
在处理文件内容之前,通常需要创建所谓的句柄。结束该文件的操作之后,应当销毁该句柄。将数据写入一个文件中,一般有一下3步操作:1)打开文件。如果文件不存在,则需要先创建文件。
2)将数据写入文件。3)关闭文件从一个文件中读取数据,也需要三步操作:1)打开文件。如果文件不能打开,就应该正确的退出。2)从...
分类:
Web程序 时间:
2014-06-10 22:02:59
阅读次数:
304
1.
一个Java程序中只能包含类,类中只能包含变量和方法,方法中只能包含变量和语句。也就是我们不能把语句(比如for语句)写在类中。2.
一定注意=与==之间的区别,尤其在对boolean进行if判断的过程中,容易出现错误。3.
强制类型转换只能用在基本数据类型之间,(String)c是不对的,应...
分类:
编程语言 时间:
2014-06-10 22:00:30
阅读次数:
249
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.IO;using System.IO.Compression;using
System.Data;namesp...
分类:
其他好文 时间:
2014-06-10 21:53:25
阅读次数:
160
C# params object[] args 可以传多个参数,可以不限制类型using
System;using System.Collections.Generic;using System.Text;namespace
ConsoleApplication2{ class Program .....
分类:
其他好文 时间:
2014-06-10 21:49:32
阅读次数:
272
//登录csdn// String uri =
"https://passport.csdn.net/account/login";// String html =
HttpUtil.DownHtml(uri); // // // // String lt = getGrou...
分类:
编程语言 时间:
2014-06-10 21:48:54
阅读次数:
300
三元运算符Vb中的iif(expr,truepart,falsepart)和C#中的expr?truepart:falsepart.无论expr的结果是true还是false,true/falsepart都会被执行.所以不能写类似于obj!=null?obj.name:string.empty.tr...
分类:
其他好文 时间:
2014-06-10 21:38:50
阅读次数:
212
printf命令模仿C程序库(library)里的printf()库例程(库函数)(library
routine)。它几乎复制了该函数的所有功能。不过在Shell层级的版本上,会有些差异。由于printf的行为是由POSIX标准所定义,因此使用printf的脚本比使用echo移植性好。当在源程序中...
分类:
其他好文 时间:
2014-06-10 21:18:41
阅读次数:
297
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-space ch...
分类:
其他好文 时间:
2014-06-10 11:12:06
阅读次数:
185