问题
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Tags: Math, String代码public class Solution {
public int romanToInt(String s) {
M...
分类:
编程语言 时间:
2015-06-30 22:08:23
阅读次数:
207
需要先enable mbstring 扩展库在 php.ini里将; extension=php_mbstring.dll 前面的 ; 去掉mb_convert_encoding 可以指定多种输入编码,它会根据内容自动识别,但是执行效率比iconv差太多;一般情况下用 iconv,只有当遇到无法确定...
分类:
其他好文 时间:
2015-06-29 16:43:24
阅读次数:
275
伪分布式hadoop的三种安装方式:Local (Standalone) ModePseudo-Distributed ModeFully-Distributed Mode安装之前需要$ sudo apt-get install ssh $ sudo apt-get install rsync详见....
分类:
其他好文 时间:
2015-06-28 22:54:22
阅读次数:
335
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.链表转换为BST,找到最中间的node设置为树的root,然后截断(设null),...
分类:
其他好文 时间:
2015-06-28 09:43:54
阅读次数:
190
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.数组中间值置为root,然后对于两边的两块数组再调用该函数。arrayObject.slice(start...
分类:
其他好文 时间:
2015-06-28 09:43:19
阅读次数:
114
题目思路问题描述是将字符串按照z字型排列,然后横向输出字符串设输入的是nrows行,则设置nrows个字符串,第i个字符串存储按z字型排列的第i-1行的字符,然后输出即可string convert(string s, int nRows) { if (nRows <= 1) r...
分类:
其他好文 时间:
2015-06-28 06:22:11
阅读次数:
105
How to convert a byte to its binary string representationFor example, the bits in a byteBare10000010, how can I assign the bits to the stringstrlitera...
分类:
其他好文 时间:
2015-06-26 13:19:53
阅读次数:
121
how convert large HEX string to binaryI have a string with 14 characters . This is a hex represantation of 7bytes. I want to convert it to binary.int3...
分类:
其他好文 时间:
2015-06-26 08:00:31
阅读次数:
113
sqlserver2008中的cast和convert:
将某种数据类型的表达式显式转换为另一种数据类型。
CAST 和 CONVERT 提供相似的功能。
语法:
使用 CAST:CAST ( data_to_be_converted AS data_type )
使用 CONVERT:CONVERT(data_type(length)...
分类:
数据库 时间:
2015-06-25 19:34:58
阅读次数:
189
源数据为'yyyymmddhh24miss',则SQL为CONVERT(datetime, SUBSTRING(opentime,1,4) +'/'+SUBSTRING(opentime,5,2) +'/'+SUBSTRING(opentime,7,2)+' ' +SUBSTRING(open...
分类:
数据库 时间:
2015-06-25 19:03:24
阅读次数:
218