public class UserInfoDB : BaseDB { public UserInfoDB() : base(@"Data Source=isostore:\MakeLove\Database\Love.sdf") { if (!this.DatabaseExists()) { CreateDatabase(); //创建数据库时,现将数据库版本号设置为2 DatabaseSchemaUpdater schemaUpdater = this.CreateDatabaseS…
public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Dispatcher.BeginInvoke(delegate { Application.Current.UnhandledException += UnhandledException; }); } private static void UnhandledException(object sender…
本系列目录:ASP.NET MVC4入门到精通系列目录汇总 业务层调用数据层对象,我不想每次都new一个数据层对象,而是在数据层创建一个仓储,统一管理所有的对象调用. 1.在IDAL项目中,新建IDBSession.tt模板 <#@ template language="C#" debug="false" hostspecific="true"#> <#@ include file="EF.Utility.CS.tti…
//获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anonymousUserId = ""; try { if (UserExtendedProperties.TryGetValue("ANID2", out anid)) { if (null == anid) { return string.Empty; } anonymou…
http://msdn.microsoft.com/zh-cn/library/bb397924.aspx LINQ 查询操作中的类型关系 (C#) 使用一个人类发明快速检索的方法 // Northwnd inherits from System.Data.Linq.DataContext. Northwnd nw = new Northwnd(@"northwnd.mdf"); // or, if you are not using SQL Server Express // Nor…
在Java中对Oracle数据库的操作分为两种:一.查询.二.非查询. 下面是我对其进行总结: 一.查询数据 /** * 根据用户代码查询 * @param userId * @return 如果存在返回User 如果不存在则返回Null */ public User findUserById(String userId){ //sql语句 String sql="select user_id,user_name,password,contact_tel,email,create_date fr…
装上Oracle之后大家都会感觉到我们的电脑慢了下来,如何提高计算机的速度呢?我们应该打开必要的服务,关闭没有用的服务.下面是Oracle服务的详解: Oracle ORCL VSS Writer Service:Oracle卷映射拷贝写入服务,VSS(Volume Shadow Copy Service)能够让存储基础设备(比如磁盘,阵列等)创建高保真的时间点映像,即映射拷贝(shadow copy).它可以在多卷或者单个卷上创建映射拷贝,同时不会影响到系统的系统能.(非必须启动) Oracl…
classes12.jar,ojdbc14.jar,ojdbc5.jar和ojdbc6.jar的区别,之间的差异 在使用Oracle JDBC驱动时,有些问题你是不是通过替换不同版本的Oracle  JDBC驱动来解决的?最常使用的ojdbc14.jar有多个版本,classes12.jar有多个版本你了解吗? 连接类型: 1.JDBC OCI: oci是oracle call interface的缩写,此驱动类似于传统的ODBC 驱动.因为它需要Oracle Call Interface an…
业务层调用数据层对象,我不想每次都new一个数据层对象,而是在数据层创建一个仓储,统一管理所有的对象调用. 1.在IDAL项目中,新建IDBSession.tt模板   Ctrl+S后自动生成IDBSession接口 2.在DAL项目中实现IDBSession接口 新建DBSession.tt模板 Ctrl+S后自动生成DBSession类 接下来,我们创建DBSession工厂和上下文工厂,目的是为了提高效率,在线程中共用一个对象. 3.IDAL项目中添加IDBSessionFactory接口…
一.概述    本篇博客为大家讲述一下Mongo DB是如何导入导出数据,还有就是备份数据的.    在下面操作的时候需要把Mongo DB的服务端打开才能操作. 二.导出.    MongoDB的导出非常简单打开cmd 输入下面命令    mongoexport -d foobar -c persons -o D:/persons.json    如果要导入其他主机的数据库文档则这样写    mongoexport --host 192.168.0.16 --port 37017 三.导入  …
一.概述     Mongo DB 下载下来以后我们应该如何去安装启动和配置才能使用Mongo DB,本篇博客就给大家讲述一下Mongo DB的安装启动及配置详解. 二.安装 1.下载Mongo DB     http://www.mongodb.org/downloads    点击上面链接下载Mongo DB 2.解压Mongo DB 3.配置环境变量 4.检查Mongo DB安装是否成功    Cmd mongo -version 三.启动及其配置详解 启动Mongo DB需要三个文件 M…
static bool isbool = false; private void BindGameDelete() { Tile tile = new Tile(); List<Color> list = new List<Color>(); list.Add(Colors.Blue); list.Add(Colors.Brown); if (isbool) { tile.Background = ]); isbool = false; } else { tile.Backgrou…
//实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelWidth; int newPixelHeight; //构造函数里 //从页面读取输入值作为目标分辨率 newPixelHeight = int.Parse(textBox2.Text.ToString()); //从页面读取输入值作为目标分辨率 newPixelHeight = int.Parse…
<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> <Style TargetType="Image"> <Setter Property="Margin" Value="-12,-36,0,0"/> </Style> </Grid.Resources>…
List<NotifyMsg> arraymsg = new List<NotifyMsg>(); List<NotifyInfo> ArrayNotifyInfo = new List<NotifyInfo>() { new NotifyInfo(){title="[收信宝]开通失败",content="您的[收信宝]服务未能开通,请重试或联系客服确认订单.{失败原因:失败原因,新快捷支付:支付失败,请重新支付,或联系客服确认…
PhotoChooserTask photoChooserTask = new PhotoChooserTask(); photoChooserTask.Completed += photoChooserTask_Completed; photoChooserTask.ShowCamera = true; photoChooserTask.Show(); void photoChooserTask_Completed(object sender, PhotoResult e) { if (e.T…
public class CCSetting { public async static void AddOrUpdateValue<T>(string key, T value) { try { if (key != null) { StorageFolder floder = ApplicationData.Current.LocalFolder; if (!(await floder.GetFoldersAsync()).Any(a => a.Name == "DrieS…
         /// <summary>        /// 颜色字符串转Color        /// </summary>        public static Color ConvertFromString(string argb)        {            uint result;            if (uint.TryParse(argb.TrimStart('#', '0'), NumberStyles.HexNumber, null,…
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <StackPanel Orientation="Vertical"> <TextBlock Text="Hides soft keyboard on enter:" /> <TextBox x:Name="textBox"…
<Grid x:Name="LayoutRoot" Background="White"> <Grid Width="480" Height="320" VerticalAlignment="Top" Background="#FF2B579A"> <Grid Name="bgrid" Width="480" Heig…
Stopwatch time = new Stopwatch(); byte[] target = new byte[size]; for (int j = 0; j < size; j++) target[j] = unchecked((byte)j); //Otherwise parts of the array are optimised out. CCMD5Core.GetHash(target); time.Start(); for (int i = 1; i <= iteratio…
<phone:PhoneApplicationPage.Resources> <Style x:Key="ButtonStyle1" TargetType="Button"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="{…
<Grid > <Grid x:Name="bubble_right" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" Visibility="{Binding showright}" MinWidth="80"> <Grid Mar…
抓包工具Fiddler的使用 Fiddler是一款免费且功能强大的数据包抓取软件.它通过代理的方式获取程序http通讯的数据.我们可以利用它来检测网页和服务器的交互情况.下面,我们以http://blog.cersp.com/index/1000176.jspx的网址列表的获取说明一下如何使Fiddler配合火车采集器获取网址列表,以http://bbs.locoy.com的附件下载为例说明一下cookie的获取.. Fiddler下载地址:http://www.fiddler2.com/dl/…
WebClient wc = new WebClient(); var URI = new Uri("http://your_uri_goes_here"); //If any encoding is needed. wc.Headers["Content-Type"] = "application/x-www-form-urlencoded"; //Or any other encoding type. //If any key needed…
DateTime.Now.ToShortTimeString()DateTime dt = DateTime.Now;dt.ToString();//2005-11-5 13:21:25dt.ToFileTime().ToString();//127756416859912816dt.ToFileTimeUtc().ToString();//127756704859912816dt.ToLocalTime().ToString();//2005-11-5 21:21:25dt.ToLongDat…
Dispatcher.BeginInvoke(() => MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) ); 用在其上创建了 Dispatcher 的线程的指定参数异步执行指定委托 http://msdn.microsoft.com/…
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm#/?sref=transforms_ovw_animating_transforms public Storyboard HideStoryBoard() { Storyboard storyboard = new Storyboard(); double num = 0.2; DoubleAnimation animation = new DoubleAn…
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal"> <TextBlock Text="昵称:" Style="{StaticResource InStyle_SLMTB}"/> <Grid Margin="10,10,0,10" Width="320"…