经常在项目中遇到要删除集合中某些元素,而用foreach遍历集合时,不能在遍历集合时直接移除要移除的元素,在这里总结了集合筛选的方法:static void Main(string[] args){ List personList = new List { new Person{Name="张三"....
分类:
其他好文 时间:
2015-03-11 23:17:33
阅读次数:
254
今天回顾Java的IO流的知识,看到遍历目录的知识点,有点犯难!不过幸好最后还是让我敲出来了!调用类: 1 public class DirectoryTraversal { 2 public static void main(String[] args) { 3 Syste...
分类:
其他好文 时间:
2015-03-11 23:09:25
阅读次数:
237
Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same charac...
分类:
其他好文 时间:
2015-03-11 22:54:26
阅读次数:
135
这篇文章主要介绍了NodeJS中Buffer模块详解,十分的详细,需要的朋友可以参考下一,开篇分析所谓缓冲区Buffer,就是 "临时存贮区" 的意思,是暂时存放输入输出数据的一段内存。JS语言自身只有字符串数据类型,没有二进制数据类型,因此NodeJS提供了一个与String对等的全局构造函数Bu...
分类:
Web程序 时间:
2015-03-11 22:53:32
阅读次数:
163
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
不难,考细节
class Solution {
public:
string addBinary(string a, string b) {
...
分类:
其他好文 时间:
2015-03-11 21:46:19
阅读次数:
141
关于继承的理解,先看两个类
person类
class Person{
private String name ;
private int age ;
public void setName(String name){
this.name = name ;
}
public void setAge(int age){
this.age = age ;
}
public S...
分类:
其他好文 时间:
2015-03-11 21:44:00
阅读次数:
171
一、字符串字符串是String类型的数据,用双引号""包住文字内容 let website = "http://www.wendingding.com"1.字符串的常见操作(1)用加号 + 做字符串拼接let scheme = "http://"let path = “www.wendingding...
分类:
移动开发 时间:
2015-03-11 21:30:51
阅读次数:
1102
SmsManager公有方法:ArrayList divideMessage(String text) 当短信超过SMS消息的最大长度时,将短信分割为几块。 参数:text——初始的消息,不能为空 返回值:有序的ArrayList,可以重新组合为初始的消息 static SmsManager get...
分类:
移动开发 时间:
2015-03-11 21:25:08
阅读次数:
161
因为要求的是最少的时间,很明显的是一个利用优先队列的bfs的题目,题目很一般。#include"iostream"#include"algorithm"#include"stdio.h"#include"string.h"#include"cmath"#include"queue"#define m...
分类:
其他好文 时间:
2015-03-11 21:19:06
阅读次数:
133
标题:Reverse Words in a String通过率: 14.8% 难度: 中等Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return ".....
分类:
其他好文 时间:
2015-03-11 21:18:28
阅读次数:
129