#6 ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like
this: (you may want to display this pattern in a fixed font for better legibility)...
分类:
其他好文 时间:
2015-06-22 22:25:11
阅读次数:
181
1 #include 2 #include 3 4 using namespace std; 5 int main() 6 { 7 string s("hello"); 8 string s2("abcdef"); 9 10 string::ite...
分类:
其他好文 时间:
2015-06-22 22:18:37
阅读次数:
180
变量基本类型值有:undefined,NUll,Boolean,Number和String,这些类型分别在内存中占有固定的大小空间,他们的值,保存在栈空间。(1)值类型:数值、布尔值、null、undefined。(2)引用类型:对象、数组、函数。如果赋值的是引用类型的值,则必须在堆内存中为这个值分...
分类:
Web程序 时间:
2015-06-22 21:55:22
阅读次数:
150
namespace params参数的用法{ class Program { public static void Test(string name,params int[] score) { int sum = 0; ...
分类:
其他好文 时间:
2015-06-22 21:53:35
阅读次数:
136
命令解释APPEND key value如果 key 已经存在并且是一个字符串, APPEND 命令将 value 追加到 key 原来的值的末尾。 如果 key 不存在, APPEND 就简单地将给定 key 设为 value ,就像执行 SET key value 一样。set key valu...
分类:
其他好文 时间:
2015-06-22 19:18:54
阅读次数:
116
string strcon = "Persist Security Info=False;User id=sa;pwd=lovemary;database=student;server=(local) "; SqlConnection sql = new SqlConnecti...
分类:
数据库 时间:
2015-06-22 17:39:21
阅读次数:
150
声明字符串var str = "Hello, playground" //声明一个字符串
var emptyStr = ""; //声明一个空的字符串
var emptyStr1 = String(); //相等于上面的那个str.isEmpty; //判断str是不是为空false
emptyStr.isEmpty; //true字符串连接var str1 = "hel...
分类:
编程语言 时间:
2015-06-22 16:33:04
阅读次数:
333
一 函数定义
func funcName(arg1:type, arg2:type, ...)->type{
// function body
return xxx
}
说明:
func 函数生命关键字,函数类型
->type 生命返回值类型
示例:
func sayHello(personName: String) -> String {
let gre...
分类:
编程语言 时间:
2015-06-22 16:26:46
阅读次数:
208
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.
If the fractional part is repeating, enclose the repeating part in parentheses.
...
分类:
其他好文 时间:
2015-06-22 15:03:43
阅读次数:
181
Basic Calculator II
Implement a basic calculator to evaluate a simple expression string.
The expression string contains only non-negative integers, +, -, *, and / operators. The integer division...
分类:
其他好文 时间:
2015-06-22 14:59:42
阅读次数:
127