1、在记事本里编写c#代码,将文件保存为ProgramTest.cs:
namespace huangxiangTestDemo
{
class ProgramTest
{
static void Main()
{
System.Console.WriteLine("hello world");
System.Console.ReadKey();
}
}
}
...
分类:
其他好文 时间:
2014-05-10 09:48:43
阅读次数:
315
public static void main(String[] args) {
String a=null;
if("aa".equals(a))//这种情形,不出现空指针异常
//if(a.equals("aa"))//出现空指针异常
{
System.out.println(true);
}
else {
System.out.println(false);
}
}
...
分类:
其他好文 时间:
2014-05-10 09:20:33
阅读次数:
257
在前篇
boost::serialization 用基类指针转存派生类(错误多多,一波三折)文中我们都是使用serialize函数来实现序列化,其代码格式如下:
private:
friend class boost::serialization::access;
template
void serialize(Archive& ar, const unsigned int ...
分类:
其他好文 时间:
2014-05-10 09:09:19
阅读次数:
520
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4726
思路:贪心,尽量先组大的数字,注意考虑前导零的情况
代码:
#include
#include
const int N = 1000005;
int t, v1[10], v2[10], ans[N];
char s1[N], s2[N];
void solve() {
i...
分类:
其他好文 时间:
2014-05-10 02:19:03
阅读次数:
259
代理模式:为其他对象提供一种代理以控制对这个对象的访问.Pursuit 通过 Proxy
送给SchoolGirl 礼物.#pragma onceclass IGiveGift{public: virtual void GiveDolls()=0;
virtual void GiveFl...
分类:
其他好文 时间:
2014-05-06 11:35:11
阅读次数:
316
尝试用两头分别比较的方法,结果发现无法解决1000021这种问题 1 public class
Solution { 2 public boolean isPalindrome(int x) { 3 if(x= 10) { 6 div *= 10;
7...
分类:
其他好文 时间:
2014-05-06 10:39:40
阅读次数:
241
1 private void w_day_scheduling_Load(object sender,
EventArgs e) 2 { 3 4 if (ls_deptname == string.Empty) 5 ...
分类:
其他好文 时间:
2014-05-06 10:32:53
阅读次数:
326
pid_t fork(void);返回值:
若成功调用一次则返回两个值,子进程返回0,父进程返回子进程ID;否则,出错返回-1int socketpair(int d, int type, int
protocol, int sv[2]);建立一对匿名的已经连接的套接字int ret = socke...
分类:
其他好文 时间:
2014-05-06 10:30:11
阅读次数:
438
using UnityEngine;using System.Collections;using
System.IO.Ports;using System;using System.Collections.Generic;using
System.Threading;public class Por...
分类:
其他好文 时间:
2014-05-06 10:15:17
阅读次数:
5671
1.首先安装phonegap和anriod的sdk这里要注意phonegap的2.9版本没有cordova.x.x.x.jar包,特别蛋疼,只好去下2.8.1版本的先去玩玩sdk安装没有什么好说的按照步骤来好了2.之后是项目的搭建public
void onCreate(Bundle savedIn...
分类:
其他好文 时间:
2014-05-06 09:54:59
阅读次数:
279