public static string Str2Hex(string s) { string result = string.Empty; byte[] arrByte = System.Text.Encoding.GetEncoding("GB2312").GetBytes(s); for(in...
分类:
其他好文 时间:
2014-07-24 09:53:33
阅读次数:
304
SquareInput:Standard InputOutput:Standard OutputGivennintegers you can generate2n-1non-empty subsets from them. Determine for how many of these subset...
分类:
其他好文 时间:
2014-07-23 15:17:56
阅读次数:
292
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-07-23 15:06:06
阅读次数:
320
Nothing to hard to think. Just take care of boundary conditions.class Solution {public: string convert(string s, int nRows) { if(s.empty() |...
分类:
其他好文 时间:
2014-07-23 15:04:36
阅读次数:
227
#include
#include
using namespace std;
queueq;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
q.push(i);
while(!q.empty())
{
cout<<q.front()<<' ';
q.pop();
if(!q.empty())
...
分类:
其他好文 时间:
2014-07-22 22:34:33
阅读次数:
179
隐藏标题栏(窗口属性):1、设置在该窗体的标题栏中是否显示控件框:this.ControlBox = false;2、设置在该窗体的标题为空:this.Text = string.Empty;3、移动窗口:实现Form的函数WndProc #region 实现点击移动 i...
分类:
移动开发 时间:
2014-07-22 22:32:34
阅读次数:
356
最近拿手机做测试机,一切都连接完毕,驱动也没有问题,可是去看eclipse的Log日志信息为空,Eclipse显示如下:
Device disconnected
info: log device is empty!
重启eclipse等等的方法都不奏效,最后搜到了如下的方法,得以解决,记之,分享给遇到同样问题的朋友:
1.使用你的手机拨打 *#*#2846579#*#* 进入测试界...
分类:
移动开发 时间:
2014-07-22 14:07:44
阅读次数:
235
ruby nil? empty? blank?一句话区别: nil?与empty? 除了对象用nil?其他用empty?判断 ,blank?的用法几乎是前两者的结合体nil?用于对象 objectsky = nilsky.nil? # => true其他的对象的都为 object.nil? 都为f....
分类:
其他好文 时间:
2014-07-22 00:30:36
阅读次数:
216
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-07-22 00:28:36
阅读次数:
169
1.Stack类学习 1)建立stack<string> 2)调用push函数将数据压入栈中 3)调用size函数查看当前栈内元素数量 4)调用empty函数检测栈是否为空 5)如果不为空则不断调用pop函数将元素从栈中取出(后入先出) #inclu...
分类:
编程语言 时间:
2014-07-21 23:29:03
阅读次数:
449