public class ShopItem {
public string name;
public int count;
public int buyPrice;
public int sellPrice;
public float price;
public ShopItem()
{
}
public ShopItem...
标题:Valid Palindrome通过率:21.9%难度:简单Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For exam...
分类:
其他好文 时间:
2015-01-21 10:09:24
阅读次数:
171
上一篇
自己动手写字符串库函数 三(C语言)
//重置
void my_StrSet(string *des, const char ch)
{
if (!IsEmpty(des))
return;
else
{
char* des1 = des->str;
int desLen = my_StrLen(des->str);
while (desLen--)
*...
分类:
编程语言 时间:
2015-01-21 09:02:35
阅读次数:
201
输入一个字典(用******结尾),然后再输入若干单词。每输入一个单词w,你都需要在字典中找出所有可以用w的字母重排后得到的单词,并按照字典次序从小到大的顺序在一行中输出(如果不存在,输出:}).输入单词之间用空格或空行隔开,且所有输入单词都由不超过6个小写字母组成.注意,字典中的单词不一定案子点序列排列.
样例输入:
tarp given score refund only trap wor...
分类:
其他好文 时间:
2015-01-21 09:01:15
阅读次数:
162
适用于循环次数未知的情况,要有退出条件。whileCONDITION;do statement ...done例如: 1.写一个脚本,输入任何字符,小写转换为大写。输入quit退出。 #!/bin/bash read-p"InputSomething"STRING while[$STRING!=‘quit‘];do echo$STRING|tr‘a-z‘‘A-Z‘ read-p"InputSomet..
分类:
其他好文 时间:
2015-01-21 06:42:20
阅读次数:
139
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...
分类:
编程语言 时间:
2015-01-21 06:35:47
阅读次数:
255
The problem:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a...
分类:
其他好文 时间:
2015-01-21 06:34:49
阅读次数:
192
LR中参数的定义和赋值 1.参数的赋值和取值 lr_save_string("hello world","param"); lr_eval_string("{param}"); 2.变量到参数int x;char *y;y="hello";x=10;lr_save_int(x,"param"...
分类:
其他好文 时间:
2015-01-21 01:19:56
阅读次数:
342
十六进制$hex = sprintf("%x",18);输出:12(%x表示十六进制)$hex = sprintf("%4x",18);输出:string(4) " 12"(%4x表示4个字符串要填满,可以看出来字符串默认填充的是空格)$hex = sprintf("%04x",18);输出:str...
分类:
Web程序 时间:
2015-01-21 01:15:27
阅读次数:
368
package com.latrobe.spark
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by spark on 15-1-19.
* 根据key对K-V类型的RDD进行排序获得新的RDD
*/
object SortByKey {
def main(args: Array[String]) {...
分类:
其他好文 时间:
2015-01-20 23:59:25
阅读次数:
500