PHP已经有了内置的SOAP扩展,但是它不具备自动生成WSDL的能力,所以很多时候,NuSOAP还是有一定诱惑力的。在应用稍微复杂点的时候,单靠integer, string等简单数据类型是不能满足需要的,这时候,就需要创建复杂数据类型,下面看看在NuSOAP中应该怎么做:假设我们的应用里有一个“M...
分类:
其他好文 时间:
2014-07-03 00:30:52
阅读次数:
280
Given two sorted integer arrays A and B, merge B into A as one sorted array.
分类:
其他好文 时间:
2014-07-02 21:07:20
阅读次数:
149
题目链接:uva 1069 - Always an integer
题目大意:给出一个多次多项式,问说是否对于任意正整数n来说结构均为整数。
解题思路:首先处理出字符串,然后枚举n从1到k+1判断即可,k为多项式中出现过的最大幂数指。
P为多项式,d为除数,k为多项式中最大的次数
当k=0时,P中不存在n变量,所以直接计算判断即可当k=1时,P是一次多项式,那么P(n+...
分类:
其他好文 时间:
2014-07-02 09:45:48
阅读次数:
294
1069 - Always an integer...
分类:
其他好文 时间:
2014-07-02 08:12:34
阅读次数:
198
【题目】
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /. Each operand may be an integer or another expression.
Some examples:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/...
分类:
其他好文 时间:
2014-07-02 07:43:36
阅读次数:
212
First Missing Positive:Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] retu...
分类:
其他好文 时间:
2014-07-01 13:13:59
阅读次数:
218
Sorted Array:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is gre...
分类:
其他好文 时间:
2014-07-01 12:51:53
阅读次数:
202
Gray Code:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the ...
分类:
其他好文 时间:
2014-07-01 12:42:16
阅读次数:
192
之前杭电上也做过a + b的高精度的题,不过这道题的区别是有多组数据。之前做的时候开了3个字符数组a,b,c,在计算的时候还要比较a,b长度,短的那个还要加'0',还设置了一个add来存放进位。现在看来这种算法确实很繁琐。而这次只用了两个字符数组,一个放加数,一个放和。相比之前程序更短小了,而且可读...
分类:
其他好文 时间:
2014-07-01 09:17:38
阅读次数:
249
${var#*word}:表示以word为$VAR的分隔符,从左至右,找到第一次匹配的分隔符以后,去掉分隔符(含分隔符)左侧的所有字符${var##*word}:表示以word为$VAR的分隔符,从左至右,找到最后一次匹配的分隔符以后,去掉分隔符(含分隔符)左侧的所有字符${var%word*}:表示以word为$VA..
分类:
其他好文 时间:
2014-07-01 06:07:11
阅读次数:
178