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
原题地址:https://oj.leetcode.com/problems/divide-two-integers/题意:Divide
two integers without using multiplication, division and mod
operator.解题思路:不许用乘、除和求...
分类:
编程语言 时间:
2014-06-10 21:43:00
阅读次数:
267
三元运算符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
LINUX 如下:
1)导出数据
[root@www.cnscn.org ~]$ mysqldump -u root -p dbname --default-character-set=gbk > base_user.sql;
2)查看导出的sql文件的编码
[root@www.cnscn.org ~]$ file base_user.sql
base_user.sql: UTF-8 Unicode text, with very long lines
3)转成要用的编码
[root@www.cn...
分类:
数据库 时间:
2014-06-10 11:14:39
阅读次数:
394
一个数组由若干个整数组成,现要求:将偶数放到前面,奇数放到后面,并输出数组。提供了两种PYTHON的解法和一个RACKET解法。...
分类:
其他好文 时间:
2014-06-10 11:05:05
阅读次数:
163