2014年5月31日

摘要: 有三种方式:1.string s = i.ToString("0000");2.i.ToString().PadLeft(4, '0'); 3.i.ToString("d4"); 阅读全文
posted @ 2014-05-31 09:10 MasonChi 阅读(387) 评论(0) 推荐(0) 编辑

2014年5月2日

摘要: 实践例子:将借阅表中所有记录的归还日期加15天:执行前情况:执行后情况如下:update 借阅set 归还日期=DateAdd ("D",15,归还日期)[详细讲解:]返回 返回包含一个日期的 Variant (Date),这一日期还加上了一段时间间隔。语法 DateAdd(interval, ... 阅读全文
posted @ 2014-05-02 12:45 MasonChi 阅读(1137) 评论(0) 推荐(0) 编辑

2014年5月1日

摘要: 【以下为网上查询到的方法】 在ASP.NET程序的开发过程中,常常需要向用户给出提示信息,比如是否“操作成功”,“确定”还是“取消”操作: (1) 点击页面上的按钮,弹出一个对话框提示是“确定”还是“取消”操作,我们采用在按钮中添加属性来完成: (2)点击页面上的链接,弹出一个对话框提示是“确定”还 阅读全文
posted @ 2014-05-01 20:54 MasonChi 阅读(281) 评论(0) 推荐(0) 编辑

2014年1月12日

摘要: 在一段时间的编程中,时常会遇到重定义(redefinition)问题。一般都是#include在包含头.h文件时出现了重复包含的关系。运气好的话可以比较容易的发现问题,运气不好的话只好列出所有的头文件.h中的包含关系,挨个检查是哪里出了问题。最近发现如果遵循“在头文件.h中不再包含头文件.h”的原则 阅读全文
posted @ 2014-01-12 11:08 MasonChi 阅读(1814) 评论(0) 推荐(0) 编辑
摘要: 引用:http://sanfeng-chow.iteye.com/blog/599350原理:图片是二进制文件,所以使用blob类型,将图片转换成字节数组,存储到数据库中。方法一: 1 public void saveIcon(Bitmap icon) { 2 if (icon == null) { 3 return; 4 } 5 // 最终图标要保存到浏览器的内部数据库中,系统程序均保存为SQLite格式,Browser也不例外,因为图片是二进制的所以使用字节数组存储数据库的 6 //... 阅读全文
posted @ 2014-01-12 11:03 MasonChi 阅读(409) 评论(0) 推荐(0) 编辑

2013年11月27日

摘要: 【转载】1.安装后立刻更新软件源:sudo gedit /etc/apt/sources.listapt -get update,推荐163 源。2.更新管理器,会自动升级系统包括内核。3.安装新立得软件包管理器。4.安装输入法,推荐fictx:sudo apt-get install fcitx;$im-switch -c注:设置默认输入法$im-switch -s fcitx -z deafult注:设系统默认调用fcitx 输入点击:系统--首选项--启动应用程序选添加按钮在弹出的窗口名称填fcitx 命令填fcitx -d 点添加。点击:系统—系统管理--语言支持,会提醒升级,跟着升级 阅读全文
posted @ 2013-11-27 17:43 MasonChi 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 【转载】先添加Web引用http://www.webxml.com.cn/WebServices/WeatherWebService.asmxusingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespaceWindowsFormsApplication1{publicpartialclassFrmWeahte 阅读全文
posted @ 2013-11-27 16:59 MasonChi 阅读(737) 评论(0) 推荐(0) 编辑
摘要: 【转载】public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void timer1_Tick(object sender, EventArgs e) { if (this.Opacity > 0.1) { this.Opacity = this.Opacity - 0.02; } ... 阅读全文
posted @ 2013-11-27 16:53 MasonChi 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 【转载】 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 namespace BounHide10 {11 public partial class hide : Form12 {13 public hide()... 阅读全文
posted @ 2013-11-27 16:50 MasonChi 阅读(679) 评论(0) 推荐(1) 编辑
摘要: 【转载】本文简单实现了用ListView显示SDCard文件列表,目录的回退等功能暂不讨论获取文件列表,files即为所选择目录下的所有文件列表:filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/ADASiteMaps/SigRecord"; File file=new File(filePath); File[] files = file.listFiles();构造Adapter, for(File mCurrentFile:files){ ... 阅读全文
posted @ 2013-11-27 16:47 MasonChi 阅读(198) 评论(0) 推荐(0) 编辑

导航