用c语言实现
#include
#include
#include
using namespace std;
typedef struct node
{
char x;
struct node *next;
}chan;
chan *root = new chan;
char a[100010];
int main()
{
while(scanf("%...
分类:
编程语言 时间:
2014-04-29 13:47:20
阅读次数:
358
typeof()函数 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"
js中undefined,null,NaN的区别
1.类型分析:
js中的数据类型有undefined,boolean,number,string,object等5种,前4种为原始类型,第5种为引用类型。
未定义的值...
分类:
Web程序 时间:
2014-04-29 13:45:21
阅读次数:
414
字符串的内部表示?
字符串在java中统一用unicode表示( 即utf-16 LE) ,
对于 String s = "你好哦!";
如果源码文件是GBK编码, 操作系统(windows)默认的环境编码为GBK,那么编译时, JVM将 按照GBK编码将字节数组解析成字符,然后将字符转换为unicode格式的字节数组,作为内部存储。
当打印这个字符串时,JVM...
分类:
编程语言 时间:
2014-04-29 13:41:21
阅读次数:
333
在项目中有时需要验证用户是否以post方式提交。下面是验证源码:
public boolean checkMethod(String method) {
if (request.getMethod().equalsIgnoreCase(method)) {
return true;
}
else {
...
分类:
Web程序 时间:
2014-04-29 13:34:20
阅读次数:
350
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
hdu 1047 高精度加法模板(用 string写的)...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
236
1、
??
String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:
其他好文 时间:
2014-04-29 13:22:22
阅读次数:
341
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LinqToEntity
{
class Program
{
static void Main(string[] args)
{
//...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
574
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, str...
分类:
其他好文 时间:
2014-04-29 13:12:20
阅读次数:
328
需求:后台(指管理员后台)上传一个html模板到文件服务器上,前台(商家操作的平台)读取到模板,并填充数据,生成新的vm页面到webapp/WEB-INF/view目录下,用于预览、保存、打印。
最开始的代码:
@Test
public void test() throws Exception{
String templateUrl = baseServic...
分类:
Web程序 时间:
2014-04-29 13:11:21
阅读次数:
465