现有一个附加信息对象AttachedInfo,它里面分别有Info01、Info02.....Info10一共十个附加信息字段,现在参数传过来是一个string[]数组,要怎么才能将这个数组中的元素分别对应到这个对象中的各个字段呢,通过反射就可以实现,即使后期AttachedInfo中的Info字段增加,或者说string[]中的元素个数与AttachedInfo中的Info字段个数不一致也没关系...
分类:
其他好文 时间:
2014-06-03 03:54:05
阅读次数:
211
<?php
header('Content-Type: text/html; charset=UTF-8');
$client = new SoapClient('http://webservice.webxml.com.cn/webservices/DomesticAirline.asmx?wsdl');
$fromcity=!empty($_POST['fromcity']) ? ...
分类:
Web程序 时间:
2014-06-03 03:30:14
阅读次数:
335
1.互满数
#include
#include
int fun(int n);
int main(void)
{
int x, y;
for(x = 1; x
{
for(y = 1; y
{
if(fun(x) == y && fun(y) == x)
printf("%d %d\t", x, y);
}
}
return 0;
}
...
分类:
编程语言 时间:
2014-06-03 03:28:21
阅读次数:
274
最好的用户体验就是私人定制,今天说下推送铃声的私人定制。
分为3个步骤:
1.制作推送提醒铃声
一般的iphone手机铃声都可以,限时30s之内。
2.倒入项目
将制作好的铃声添加到xcode的工程项目中
3.修改推送json(修改后台)
$body['aps'] = array(
'alert' => $message,
//'soun...
分类:
其他好文 时间:
2014-06-03 03:19:20
阅读次数:
245
今天偶尔从一个师兄那里看到了checkio,感觉很好玩。
我看到的第一个题是要求写一个函数,接收一个数组,然后返回其中的重复元素,而且元素的顺序不能发生变化。换句话说,就是去掉其中不含重复的元素。比如:
checkio([1,
2,
3,
1,
3])
==
[1,
3,
1,
3],
"1st
example"
checkio([1,
2,
3,...
分类:
编程语言 时间:
2014-06-03 03:16:33
阅读次数:
360
链接:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2040
Description:
给出一棵二叉树的中序和前序遍历,输出它的后序遍历。
Input
本题有多组数据,输入处理到文件结束。
每组数据的第一行包括一个整数n,表示这棵二叉树一共有n个节点。
接下来的一行每行包括n个整数,表示...
分类:
其他好文 时间:
2014-06-03 03:10:46
阅读次数:
236
快速排序的原理:每次将序列以一个值为界限分成两组,在将两个序列分别以一个界限分成两组这样一直分下去。
int[] a = {11,222,44,63,84,11,24,53,123,25,98,76,34};
第一步:以34将数组a分成两组
11, 25, 24, 11 34, 63, 44, 53, 123, 222, 98, 76, 84
第二步:以11将...
分类:
编程语言 时间:
2014-06-03 03:07:37
阅读次数:
227
1.从键盘上输入5个数,输出最大的、最小的元素以及他们的下标
#include
int main(void)
{
int i, j, k, max, min;
int a[10] = {0};
printf("input number:");
for(i = 0; i
scanf("%d", &a[i]);
max = min = a[0];
j = k = 0;
...
分类:
编程语言 时间:
2014-06-03 02:43:47
阅读次数:
241
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2116
Description
Wind and his GF(game friend) are playing a small game. They use the computer to randomly generated a nu...
分类:
其他好文 时间:
2014-06-03 02:17:13
阅读次数:
252
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1525
Euclid's Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1832 Accepted S...
分类:
其他好文 时间:
2014-06-03 01:38:06
阅读次数:
255