潸然泪下的小飞飞

导航

2015年3月5日 #

求直线的交点

摘要: /*求直线的交点,注意平形的情况无解,避免RE*/TPoint LineInter(TLine l1, TLine l2){ //求两直线得交点坐标 TPoint tmp; double a1 = l1.a; double b1 = l1.b; double c1 =... 阅读全文

posted @ 2015-03-05 16:24 潸然泪 阅读(285) 评论(0) 推荐(0) 编辑

线段重叠+投影

摘要: 1 #include 2 #include 3 #include 4 5 #define eps 1e-8 6 #define pi acos(-1) 7 8 typedef struct SEG 9 { 10 double l, r; 11 }SEG; 12 ... 阅读全文

posted @ 2015-03-05 16:23 潸然泪 阅读(461) 评论(0) 推荐(0) 编辑

三角形外接圆+圆的参数方程

摘要: 1 //pku_1266_三角形外接圆+圆的参数方程.cpp 2 #include 3 #include 4 5 const double eps = 1e-6; 6 const double pi = acos(-1); 7 const double inf = 999999... 阅读全文

posted @ 2015-03-05 16:22 潸然泪 阅读(533) 评论(0) 推荐(0) 编辑

最小圆覆盖

摘要: 1 struct TPoint 2 { 3 double x, y; 4 TPoint operator-(TPoint &a) 5 { 6 TPoint p1; 7 p1.x = x - a.x; 8 p1.... 阅读全文

posted @ 2015-03-05 16:21 潸然泪 阅读(262) 评论(0) 推荐(1) 编辑

2014年6月9日 #

c# XML序列化与反序列化 属性字段标识

摘要: 序列化对象 public class People { [XmlAttribute("NAME")] public string Name { set; get; } [XmlAttribute("AGE")] pub... 阅读全文

posted @ 2014-06-09 10:32 潸然泪 阅读(2386) 评论(0) 推荐(0) 编辑

2014年4月1日 #

SQL语句中如何把文件以二进制数组形式存入数据库

摘要: System.IO.FileStream fs = new FileStream("1.txt", FileMode.Open); string strConn = "Data Source=MOFEI-PC;Initial Catalog=Test;Integrated Security=True"; SqlConnection conn = new SqlConnection(strConn); int v = 0; string sql = @"INSERT INTO [Test].[dbo].[Te... 阅读全文

posted @ 2014-04-01 09:19 潸然泪 阅读(1383) 评论(0) 推荐(0) 编辑

无需部署的轻量级数据库—SQLLite,使用Demo

摘要: 当有程序需要保存轻量数据,而又烦躁序列化到本地的不便,轻量级数据库—SQLLite是一个很好的选择,只需引用System.Data.SQLite.DLL,无需部署数据库,便可像拥有数据库一样保存数据,支持数据库常见操作:增删改差,支持数据库常见类型,支持数据加密。效果图:使用步骤如下:下载System.Data.SQLite.DLL(注意版本.net2.0/3.0/4.0/4.5,)在vs中用Add Reference功能把System.Data.SQLite.DLL加到工程里就可以了。创建数据库文件string datasource = "e:/tmp/test.db"; 阅读全文

posted @ 2014-04-01 09:15 潸然泪 阅读(10202) 评论(0) 推荐(0) 编辑

2014年3月31日 #

C# 图片盖章功能实现,支持拖拽-旋转-放缩-保存

摘要: C#,图片盖章功能实现,拖拽,旋转,放缩,保存,图片合成 阅读全文

posted @ 2014-03-31 11:57 潸然泪 阅读(2507) 评论(2) 推荐(0) 编辑

WPF RichTextBox,关键字搜索,样式改变,超链接替换,图文混排

摘要: WPF,RichTextBox,关键字搜索,样式改变,超链接替换,图文混排 阅读全文

posted @ 2014-03-31 11:14 潸然泪 阅读(3369) 评论(2) 推荐(1) 编辑

使用代码在windows-store中打开、搜索应用程序

摘要: //Launcher.LaunchUriAsync(newUri("ms-windows-store:PDP?PFN=" + Package.Current.Id.FamilyName)); string a =Package.Current.Id.FamilyName; //ECC.42575ACA75FF5_341ev7e69ws12就是安装后本地的文件夹去掉中间的版本号 Launcher.LaunchUriAsync(newUri("ms-windows-store:PDP?PFN=" +"ECC... 阅读全文

posted @ 2014-03-31 10:54 潸然泪 阅读(769) 评论(0) 推荐(0) 编辑