设计模式 ( 十八 ) 策略模式Strategy(对象行为型)1.概述 在软件开发中也常常遇到类似的情况,实现某一个功能有多种算法或者策略,我们可以根据环境或者条件的不同选择不同的算法或者策略来完成该功能。如查找、排序等,一种常用的方法是硬编码(Hard Coding)在一个类中,如需要提供多...
分类:
其他好文 时间:
2014-08-03 12:33:25
阅读次数:
292
android自带的内存memory和第三方外部存储disk管理...
分类:
移动开发 时间:
2014-08-01 19:55:42
阅读次数:
299
USE master
RESTORE DATABASE WSS_Content FROM DISK = N'D:\bak\contentbak.bak'
WITH REPLACE, NORECOVERY
,MOVE 'WSS_Content' TO N'D:\bak3\WSS_Content.mdf'
,MOVE 'WSS_Content_LOG' TO N'D:\bak3\WSS_Con...
分类:
数据库 时间:
2014-08-01 16:07:01
阅读次数:
235
一、Flash文件系统设计思路为flash 设计的文件系统要求异地更新(out-of-place update)。这是因为flash 在写之前必须要先擦除,且再次擦除之前只能写一次。如果擦除块(eraseblocks)很小且可以快速擦除,那么可以将它们看作磁盘扇区(disk sector),但是实际...
分类:
其他好文 时间:
2014-08-01 10:32:41
阅读次数:
344
大致思路:1.查看分区状态2.创建分区3.重新加载分区表4.格式化分区5.挂载分区到目录查看当前分区状态:[root@localhost~]#fdisk-cul
Disk/dev/sda:21.5GB,21474836480bytes
255heads,63sectors/track,2610cylinders,total41943040sectors
Units=sectorsof1*512=512bytes
Secto..
分类:
其他好文 时间:
2014-07-31 21:13:37
阅读次数:
311
Description
Dearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but ea...
分类:
其他好文 时间:
2014-07-31 20:50:44
阅读次数:
211
1. 编辑/etc/scsi_id.config文件,如果该文件不存在,则创建该文件,添加如下行:options=–whitelisted –replace-whitespace2. 获取需要绑定为ASM Disk的磁盘uuid,比如我们要使用/dev/sdc和/dev/sdd作为ASM磁盘,那么:...
分类:
系统相关 时间:
2014-07-31 16:38:36
阅读次数:
338
The volume label for my new USB disk is displayed as capital letters on my home PC although when I formatted this disk (FAT32) on Windows, I used lowe...
分类:
移动开发 时间:
2014-07-31 13:02:26
阅读次数:
344
代码:String str = "the music made it hard to concentrate";String delims = "[ ]+";String[] tokens = str.split(delims);结果为:the, music, made, it, hard, to,...
分类:
编程语言 时间:
2014-07-31 12:07:26
阅读次数:
211
本文首发于烂泥行天下。Linux虚拟机在使用过程中,硬盘空间不够使用。由于前期没有做LVM,所以只能手动添加新的硬盘。给虚拟机添加硬盘有两种方法:1、通过virshattach-disk命令添加一块硬盘到系统中,即时生效,但系统重启后新硬盘会消失。2、通过修改虚拟机配置文件进行添加..
分类:
系统相关 时间:
2014-07-30 17:53:15
阅读次数:
399