10 2012 档案

摘要:前台<Window x:Class="MySQL.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:assembly="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:MySQL" 阅读全文
posted @ 2012-10-19 15:12 阅读(2192) 评论(0) 推荐(0)
摘要:MySQLDriverCS连接MySQL数据库先下载和安装MySQLDriverCS,在安装文件夹下面找到MySQLDriver.dll,然后将MySQLDriver.dll添加引用到项目中using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Wi 阅读全文
posted @ 2012-10-18 14:49 阅读(202) 评论(0) 推荐(0)
摘要:1,绑定到控件:ElementName是数据源名,Path是绑定的内容<StackPanel> <TextBlock Width="248" Height="24" Text="Colors:" TextWrapping="Wrap"/> <ListBox x:Name="lbColor" Width="248"> <ListBoxItem Content="Blue"/> <ListBoxItem C 阅读全文
posted @ 2012-10-18 10:42 阅读(193) 评论(0) 推荐(0)
摘要:250pt题意:给定两个整数以及它们的个数,求由多少个整数由它们组成的,且两个数的个数差不超过1。分析:暴力枚举。View Code class TheBrickTowerEasyDivTwo { public: int find(int n, int a, int m, int b) { int i,j,k; bool dp[10000]={false}; for(i=0;i<=n;i++) for(j=max(i-1,0);j<=i+1;j++)... 阅读全文
posted @ 2012-10-12 08:11 阅读(530) 评论(0) 推荐(0)
摘要:前言第1章代码应当易于理解代码的写法应当使别人理解它所需的时间最小化;第一部分表面层次的改进第2章把信息装到名字里使用专业的单词:例如,不用Get,而用Fetch或者Download可能会更好,这由上下文决定;避免空泛的名词,像tmp和retval,除非使用它们有特殊的理由;使用具体的名字来更细致地描述事物:ServerCanStart()这个名词就比CanListenOnPort更不清楚;给变量名带上重要的细节:例如,在值为毫秒的变量后面加上_ms,或者在还需要转义的,未处理的变量前面加上raw_;为作用域大的名词采用更长的名字:不要用让人费解的一个或两个字母的名词来命名在几屏之间可见的变量 阅读全文
posted @ 2012-10-11 08:31 阅读(1518) 评论(0) 推荐(0)