设计模式 ( 十八 ) 策略模式Strategy(对象行为型)1.概述 在软件开发中也经常遇到类似的情况,实现某一个功能有多种算法或者策略,我们能够依据环境或者条件的不同选择不同的算法或者策略来完毕该功能。如查找、排序等,一种经常使用的方法是硬编码(Hard Coding)在一个类中,如须要提...
分类:
其他好文 时间:
2014-08-15 17:28:19
阅读次数:
241
小感悟,小句子:1.青春,不是年华,而是一种心境。2.把钱用来买一本好书,是最有价值的投资。3.what hurts more ? the pain of hard work , or the pain of regret .(from BOSTON CELTICS)
分类:
其他好文 时间:
2014-08-15 12:39:18
阅读次数:
158
操作分区#fdisk-l......Disk/dev/sdb:32.2GB,32212254720bytes255heads,63sectors/track,3916cylindersUnits=cylindersof16065*512=8225280bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(minimum/optimal):512bytes/512bytesDiskidentifier:0x00000000Disk/dev/..
分类:
其他好文 时间:
2014-08-15 02:51:17
阅读次数:
311
Description
Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of d...
分类:
其他好文 时间:
2014-08-14 23:55:56
阅读次数:
329
VirtualBox虚拟磁盘空间不够了,默认10G。想扩大,图形界面下没有找到可操作菜单。Google了一下用 Vbox自带的命令工具VBoxManage即可解决。C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd e:\vbox\Ubunt...
分类:
其他好文 时间:
2014-08-14 16:11:28
阅读次数:
178
详见:嵌入式大讲堂由于FatFs模块完全与磁盘I/O层分开,因此底层磁盘I/O需要下列函数去读/写物理磁盘以及获取当前时间。由于底层磁盘I/O模块并不是FatFs的一部分,因此它必须由用户提供。disk_initialize: 1 /*--------------------------------...
分类:
其他好文 时间:
2014-08-14 15:53:38
阅读次数:
253
如果令 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 分别等于 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26那么Hard work (努力工作) H+...
分类:
其他好文 时间:
2014-08-13 18:38:56
阅读次数:
164
kvm中安装linux虚拟机#qemu-imgcreate-fqcow2linuxtest.qcow250G#virt-install--connectqemu:///system\--namecentos\--ram2048\--vcpus=2--diskpath=/home/kvm_img/centos.qcow2,device=disk,format=qcow2,bus=virtio,cache=none,size=50\--cdrom/mnt/CentOS-6.5-x86_64.iso\-..
因为是在另一台电脑对同名数据库做的备份,用常规方法还原,提示不是相同数据库,不让还原,在网上找到下面的方法解决了:一、右击系统数据库master,新建查询执行以下SQL代码:RESTORE DATABASE xxxFROM DISK = 'E:\DB\xxx.bak' --bak文件路径with.....
分类:
数据库 时间:
2014-08-13 14:44:36
阅读次数:
208