封装数据 1 package com.example.bean; 2 3 4 public class UserPhone { 5 6 private int id ; 7 private String name; 8 private String teleph...
分类:
其他好文 时间:
2015-05-19 22:25:01
阅读次数:
226
首先数组是什么东西?数组在内存中连续存储同一类型的数据的空间。为什么需要数组?实际应用中需要存在同一类型的大量数据。一维数组的定义:数据类型[] 数组名 = new 数据类型[长度];int[] arr = new int[10];string[] s = new string[10];数据类型[]...
分类:
编程语言 时间:
2015-05-19 22:17:54
阅读次数:
171
经典数独问题
用DFS模拟数独解法,找摒除解和余数解
数独解法:http://www.sudokufans.org.cn/forums/topic/8/
2676
#include "stdio.h"
#include "string.h"
struct node
{
int x,y;
int s[10]; // 对于每个空格,数字i是否可用
int su...
分类:
其他好文 时间:
2015-05-19 21:01:27
阅读次数:
106
这道题要求手机上,不同的数字所对应的字母的组合,就是一步步往上求就可以了,可能有点类似于动态规划的先求解子问题,再求出总的#include#include#include #includeusing namespace std;static string str[10]={"0","1","abc"...
分类:
其他好文 时间:
2015-05-19 20:51:44
阅读次数:
167
TrimStart()--去掉前面的空格TrimEnd()--去掉后面的空格Trim()--去掉字符串前后的空格ToUpper()--把字符串中的小写英文字符转换成大写ToLower()--把字符串中的大写英文字符转换成小写Replace("要被替换的","要去替换的")返回替换后的字符串。Subs...
分类:
其他好文 时间:
2015-05-19 20:51:18
阅读次数:
110
打算用php实现一个爬虫,这是爬指定页面的图片的一段程序,其他的部分还没调试好,先把这个放上来 1 "; 4 $length=strlen($string); 5 searchImg($string,$length); 6 7 8 9 function searchImg($string,$...
分类:
Web程序 时间:
2015-05-19 20:48:33
阅读次数:
194
local function _encode(str) return string.format("%%%02X",string.byte(str))endfunction emailEncode(str) return string.gsub(str,"([^%w_@.])",_enc...
分类:
其他好文 时间:
2015-05-19 20:47:32
阅读次数:
161
C文件操作综合项目: 读取一个文件的数据到另一个文件,在读取的过程中加密.#include "stdlib.h"#include "stdio.h"#include "string.h"int fileEnc(char* fileDestinationPath, char* fileSourcePa...
分类:
其他好文 时间:
2015-05-19 20:33:48
阅读次数:
115
题目描述:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,
Given:
s1 = "aabcc",
s2 = "dbbca",
When s3 = "aadbbcbcac", return true.
When s3 = "aadbb...
分类:
其他好文 时间:
2015-05-19 19:14:56
阅读次数:
117
一:起因
(0)不定长参数,也叫可变的参数,就是再调用函数之前,并不确定到底需要传递多少个参数
(1)Java中的不定长参数用String... args / int... args等三个点来表示;Python中用*args元组来表示 / **args字典(map)来表示
(2)不定参数有两个规定:第一,方法的参数列表中最多只有一个不定长度的参数;第二,就是不定长度的数组的位置必须是最后一...
分类:
编程语言 时间:
2015-05-19 19:11:41
阅读次数:
156