" "和null的区别
Stringstr1 = null; str引用为空
Stringstr2 = ""; str引用一个空串
也就是null没有分配空间,""分配了空间,因此str1还不是一个实例化的对象,而str2已经实例化。
注意因为null不是对象,""是对象。所以比较的时候必须是if(str1==null){...}和if(str2.equals("")){.....
分类:
其他好文 时间:
2015-04-13 09:36:25
阅读次数:
166
关于注册表被篡改的问题时常会出现,下面介绍几种常用的解决方法
1、解开被禁用的注册表
执行软盘中的“unlockreg.reg”文件,此文件是用记事本建立一个以REG为后缀名的文件,文件名可自定义,内容如下:
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentV...
分类:
其他好文 时间:
2015-04-13 09:34:57
阅读次数:
115
Write a SQL query to get the nth highest salary from the Employee table.
+----+--------+
| Id | Salary |
+----+--------+
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
+----+--------+
For exampl...
分类:
其他好文 时间:
2015-04-13 09:35:04
阅读次数:
105
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5478
题面:
Cylinder Candy
Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge
Edward the confectioner is ...
分类:
其他好文 时间:
2015-04-13 09:36:42
阅读次数:
150
#include
#include
using namespace std;
typedef struct
{
int coef; //系数项
int exp; //指数项
}ElemType;
typedef struct Node
{
ElemType data;
struct Node *next;
}LNode,*LinkList;
void InitList(Lin...
分类:
其他好文 时间:
2015-04-13 09:35:43
阅读次数:
141
菜鸡从零单刷 LeetCode 系列!...
分类:
其他好文 时间:
2015-04-13 09:34:32
阅读次数:
116
1.题目描述:点击打开链接
2.解题思路:本题利用扫描与维护解决。根据题意,能够走到所有的格子,一定是挑选出来的牌的步数的最大公约是1,这点很好理解。因为ax+by=1意味着只要有a个x和b个y就可以凑出来步数1。这样以来,只需要利用map来存储所有的公约数对应的最小费用即可。初始时刻base[0]=0,接下来就是从前往后扫描一遍这n个数,然后依次更新base中的每一个最大公约是对应的最小费用即...
分类:
其他好文 时间:
2015-04-13 09:35:00
阅读次数:
111
A-B Game
Time Limit: 1000MS
Memory Limit: 32768KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
Fat brother and Maze are playing a kind of special (hentai)...
分类:
其他好文 时间:
2015-04-13 09:32:38
阅读次数:
156
Problem B: 零比特填充-透明传输
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 93 Solved: 27
[Submit][Status][Web
Board]
Description
在计算机网络中为了实现协议的透明传输,需要使用到一种差错检测的方法(零比特填充)。方法具体实现为:
...
分类:
其他好文 时间:
2015-04-13 09:33:39
阅读次数:
233
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
You have a car with an unlimited gas tank and it costs cost[i] of gas to travel
from station i to ...
分类:
其他好文 时间:
2015-04-13 09:34:53
阅读次数:
145
拓扑排序,不开心持续中
#include
#include
#include
#include
#define maxn 2100
using namespace std;
vector >mapp;
int head[maxn];
int n;
void solve()
{
queueroot;
for(int i=0;i<n;i++)
{
if(!head[i]) root.pus...
分类:
其他好文 时间:
2015-04-13 09:31:28
阅读次数:
114
13983. Milk Scheduling
Constraints
Time Limit: 1 secs, Memory Limit: 256 MB
Description
Farmer John has N cows that need to be milked (1
Being impatient animals, some cows will r...
分类:
其他好文 时间:
2015-04-13 09:32:47
阅读次数:
154
Problem 2148 Moon Game
Accept: 499 Submit: 1398
Time Limit: 1000 mSec Memory Limit : 32768 KB
Problem Description
Fat brother and Maze are playing a kind of special (hentai) game in...
分类:
其他好文 时间:
2015-04-13 09:31:42
阅读次数:
187
数学基础球面参数方程球面的参数曲线可以用球坐标表示,引入参数u,v,其中v是球面点与原点的连线与z轴正向的夹角,u表示连线在xy平面的投影与x轴正向的夹角,如下图所示:则球面参数方程可以表示为:球面法向量已知球面的参数方程以后,很容易求得给定点的法向量,分别对u和v方向求偏导数,然后对两个所得向量进行叉积即可:
实现细节已知参数方程以后,需要进行离散,分别设定u和v的步长:ustep、vstep。...
分类:
其他好文 时间:
2015-04-13 09:33:32
阅读次数:
536
POJ 2342 Anniversary party (树形dp 入门题)...
分类:
其他好文 时间:
2015-04-13 09:31:32
阅读次数:
117
特别说明:此贴仅仅适合网络即时聊天平台乐一乐,不是技术贴,仅供参考
HiFi级别音乐欣赏 和 网络娱乐学习
研玩单位:第一位:(虚位以待)
第二位:电脑学习室(51vv --- 615087频道)
星级难度:★★☆☆☆(这都虚高,仅仅有点电脑知识即可)
欣赏指数:★★★★★(恶劣的网络传输)
操作系数:★★★★★
适用人群:网络即时聊天平台音乐欣赏
专业飞过:...
分类:
其他好文 时间:
2015-04-13 09:32:49
阅读次数:
154
/* c2-1.h 线性表的动态分配顺序存储结构 */
#define LIST_INIT_SIZE 10
#define LISTINCREMENT 2
typedef struct
{
ElemType *elem;
int length;
int listsize;
}SqList;
/* c2-2.h 线性表的单链表存储结构 */
struct LNode...
分类:
其他好文 时间:
2015-04-13 09:29:48
阅读次数:
153