1 后台: 2 List list=GetAll();//id name 3 string json = new JavaScriptSerializer().Serialize(list);//json格式字符串‘ 4 Response.Write(json); 5 前台js: 6 $.pos.....
upcast例:public class Test{ public static void main(String[] args) { Cup aCup = new BrokenCup(); aCup.addWater(10); // method bind...
分类:
编程语言 时间:
2015-06-07 18:39:43
阅读次数:
410
为什么使用cacheName 使用cacheName主要是考虑到Razor.Parse()每解析一次都会动态创建一个程序集,如果解析量很大,就会产生很多程序集,大量的程序集调用会造成程序非常慢。 举个栗子: 如果编译1000次,编译速度就会很慢。 static void Main(string[] ...
分类:
系统相关 时间:
2015-06-07 17:16:16
阅读次数:
161
一:回想(1)c++中的string类是在面试中和笔试中常常考的题目; project代码免费下载string类的自行实现(2)c++中的string类和fstream类合起来是处理外部数据的利器;(3)string类经经常使用到find find_first_of find_first_not_o...
分类:
编程语言 时间:
2015-06-07 17:14:05
阅读次数:
209
https://leetcode.com/problems/valid-parentheses/原题:Given a string containing just the characters'(',')','{','}','['and']', determine if the input stri...
分类:
其他好文 时间:
2015-06-07 17:05:11
阅读次数:
97
Given a string s consists of upper/lower-case alphabets and
empty space characters ' ', return the length of last word
in the string.If the last word does not exist, return 0.Note: A word is defined...
分类:
其他好文 时间:
2015-06-07 15:49:48
阅读次数:
105
class SqlHelper { private static string connStr = ConfigurationManager.ConnectionStrings["dbconstr"].ConnectionString; //public stati...
分类:
数据库 时间:
2015-06-07 15:43:26
阅读次数:
135
this表示当前调用方法的对象的引用:
(谁调用这个方法,谁就是这个对象,这个this就是它的引用)
比如:public class This_Demo{
String name;
public void setName(String name) {
this.name = name;// 前一个name是 本类的成员属性: name;后一个name是set...
分类:
编程语言 时间:
2015-06-07 14:38:27
阅读次数:
135
模块化设计:
头文件:
#ifndef operator_operator_h
#define operator_operator_h
#include
#include
using namespace std;
class MyString
{
public:
//三个重载的构造函数
MyString();
MyString(const c...
分类:
编程语言 时间:
2015-06-07 14:35:41
阅读次数:
304
在c++中有一个新定义的类型string,可以不用那么麻烦的操作字符串,并且一些高级的运算符重载让她的使用更加便捷
下面是String类的定义和成员函数的定义:
再下面是测试程序:...
分类:
编程语言 时间:
2015-06-07 13:54:07
阅读次数:
183