代码改变世界

随笔档案-2012年4月19日

poj 1269 Intersecting Lines -----计算几何

2012-04-19 20:05 by java环境变量, 292 阅读, 收藏,
摘要: Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:6451Accepted:3023DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect 阅读全文

poj 1654 Area ----- 计算几何

2012-04-19 19:55 by java环境变量, 334 阅读, 收藏,
摘要: AreaTime Limit:1000MSMemory Limit:10000KTotal Submissions:9899Accepted:2800DescriptionYou are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. From this vertex, you may go step by step to the following vertexes of th 阅读全文

sqlserver 2008 R2容灾方案:另一种思路-2

2012-04-19 10:41 by java环境变量, 226 阅读, 收藏,
摘要: 2.通过第三方软件实时传递数据到B数据库服务器这种类似的软件很多,如Allway Sync之类的软件,间隔同步时间最好实时 .3.通过下面脚本来实现是否需要还原下面只是列出需要的脚本文件,没有列出的文件只需新建相同的文件名即可.3.1 备库上新建几个监控的表:table.txtUSE [master]GOif object_id('restorehistoty-suzhou') is not nulldrop table [restorehistoty-suzhou]goCREATE TABLE [dbo].[restorehistoty-suzhou]([id] [int] 阅读全文

sqlserver 2008 R2容灾方案:另一种思路-1

2012-04-19 10:40 by java环境变量, 423 阅读, 收藏,
摘要: 自己的定义的容灾方案,可以根据自己的需要自己定义.1.源数据库备份数据说明:使用方法:exec master.dbo.fullbackup1 's:\backup','suzhou','full'0.备份类型只能是full、diff或log,数据库名不能为空1.通过新建一个历史表记录每次备份内容2.检查数据库版本是否为2005以上3.检查当前用户是否有权限完成备份4.会自动检查指定盘符是否存在5.检查指定格式是否为s:\6.如果指定的备份目录不存在proc将自动新建,根据备份类型为full、diff或log7.检查备份数据库名suzhou是否存在 阅读全文

obj-c读取文件方法

2012-04-19 10:32 by java环境变量, 358 阅读, 收藏,
摘要: 第一种方法:plist文件是标准的xml文件,在cocoa中可以很简单地使用。以下代码在Mac和iPhone中均适用。写入plist文件的方法:NSMutableDictionary*dict=[[NSMutableDictionaryalloc]initWithContentsOfFile:@"/test.plist"];[dictsetObject:@"Yes"forKey:@"start"];[dictwriteToFile:@"/test.plist"atomically:YES];读取plist文件的方法 阅读全文