在这里,我们使用xml来实现保存与读取功能。
首先,是头文件的引用:
using System.Xml;
保存到xml文件:
void Save()
{
string filePath = Application.dataPath + @"/my.xml";
XmlDocument xmlDoc = new XmlDocument();
...
分类:
编程语言 时间:
2015-04-19 10:17:02
阅读次数:
337
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{class 行李重量{static void Main(string[] args){{Double a;whi...
public static class SqlHelper { //获取配置文件中的连接字符串 private static readonly string constr = ConfigurationManager.ConnectionStrings["sql"...
分类:
数据库 时间:
2015-04-19 10:06:29
阅读次数:
176
//输出语句 Console.ReadLine(); //输入语句 Console.WriteLine(); /// 给函数加注解; /**/ //一段区域 // 数据类型 // 1,整型 int; // 2,浮点型 double; // 3,字符串型 string; // 4,布尔型 bool ....
1. (可选)如要扩展视图对应的模型请增加相应的字段,如: class product(models.Model): _inherit = "product.product" max_quantity = fields.Float(string="Maximum Quantity") //增加了一个最大数量字段 1....
分类:
其他好文 时间:
2015-04-19 09:00:51
阅读次数:
313
publicstaticvoidmain(String[]args)
{
System.out.println("欢迎使用XXX加密系统!");
Scannersc=newScanner(System.in);
while(true)
{
System.out.println("按1加密");
System.out.println("按2解密");
Stringfl=sc.nextLine();
switch(fl.toCharArray()[0])
{
case‘1‘:
..
分类:
其他好文 时间:
2015-04-19 06:48:54
阅读次数:
114
$(window).load(function() { $('.flexslider').flexslider({ animation: "fade", //String: Select your animation type, "fade" or "slide"图片变换...
分类:
其他好文 时间:
2015-04-19 06:19:23
阅读次数:
183
这节课我们主要学习了String and Regular ExpressionsIntroduction of Strings Computer was used for numeric munipulation:1. Most programs are concerned more with st...
54张牌模拟斗地主package demo;import java.util.Random;/** * 54张牌洗牌和发牌 * */public class Puker { public static void main(String[] args) { Random rand...
分类:
其他好文 时间:
2015-04-19 01:01:35
阅读次数:
115
一、参数传递 Java中的变量类型分为基本数据类型和引用数据类型。引用数据类型存放的是对象实例的地址,一个对象可以有多个引用,即这些引用存放的都是该对象的地址。(基本类型变量和引用类型变量存放在栈(stack)中,对象存放在堆(heap)中) 在进行参数传递时,不管参数是基本类型还是引用类型,形参(...
分类:
其他好文 时间:
2015-04-19 01:01:17
阅读次数:
235