自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (4)
  • 收藏
  • 关注

转载 c++ 设计模式9 (Abstract Factory 抽象工厂模式)

转自http://www.cnblogs.com/wangxiaobao/p/5222863.html5.2 抽象工厂模式动机:在软件系统中,经常面临着“一系列相互依赖的对象”的创建工作;同时,由于需求的变化,往往存在更多系列对象的创建工作。 代码示例:实现利用数据库的业务逻辑,支持多数据库(Sql,Oracle等),有连接、命令、读取等功能。其中命令,连接功能之间有相互联系。方法一(使用工厂方法...

2018-03-30 17:11:05 123

转载 c++ 设计模式8 (Factory Method 工厂方法)

转自http://www.cnblogs.com/wangxiaobao/p/5211414.html5. “对象创建”类模式通过“对象创建”类模式绕开new,来避免对象创建(new)过程中所导致的紧耦合(依赖具体类),从而支持对象创建的稳定。它是接口抽象之后的第一步工作。5.1 工厂方法动机:在软件系统中,经常面临着创建对象的工作;由于需求的变化,需要创建的对象的具体类型经常变化。如何应对这种变...

2018-03-30 17:08:57 128

转载 c++ 设计模式7 (Bridge 桥模式)

转自http://www.cnblogs.com/wangxiaobao/p/5208448.html4.2 Bridge 桥模式动机: 由于某些类型的固有的实现逻辑,使得它们具有两个变化的维度,乃至多个变化的维度。 代码示例:实现一个Messager,含有基本功能PlaySound,Connect等,并有PC、Mobile不同的平台实现 和 精简、完美等不同业务功能的版本实现方法1:Bridge...

2018-03-30 17:07:13 197

转载 c++ 设计模式6 (Decorator 装饰模式)

转自http://www.cnblogs.com/wangxiaobao/p/5203010.html4. “单一职责”类模式在软件组件的设计中,如果责任划分的不清晰,使用继承得到的结果往往是随着需求的变化,子类急剧膨胀,同时充斥着重复代码,这时候的关键是划清责任。典型模式代表: Decorator,Bridge 4.1 Decorator 装饰模式 代码示例:不同的流操作(文件流,网络流,内存流...

2018-03-30 17:06:04 122

转载 c++ 设计模式5 (Observer / Event 观察者模式)

转自http://www.cnblogs.com/wangxiaobao/p/5201820.html3.3 观察者模式 (Observer)/发布-订阅模式动机:在软件构建过程中,我们需要为某些对象建立一种“通知依赖关系”——一个对象(目标对象)的状态发生改变,所有的依赖对象(观察者对象)都能得到通知。如果这样的依赖关系过于紧密,将使得软件不能很好地抵御变化。使用面向对象技术,可以将这种依赖关系...

2018-03-30 17:03:49 129

转载 c++ 设计模式4 (Strategy)

转自http://www.cnblogs.com/wangxiaobao/p/5200021.html3.2 Strategy (策略模式)动机:在软件构建过程中,某些对象使用的算法可能多种多样,经常改变,如果将这些算法都编码到对象中,将会使对象变得异常复杂,而且有时候支持不使用或不常使用的算法也是一个性能负担。如何在运行时根据需要透明地改变对象的算法?将算法和对象本身解耦,从而避免上述问题? 代...

2018-03-30 17:02:28 93

转载 c++ 设计模式3 (重构技法 Template Method)

转自http://www.cnblogs.com/wangxiaobao/p/5153261.html1. 重构面向对象设计模式是“好的面向对象设计”,所谓“好的面向对象设计”指的是那些可以满足“应对变化,提高复用”的设计。 设计模式的要点是“寻找变化点,然后在变化点处应用设计模式,从而更好地理解需求的变化”“什么时候、什么地点应设计模式”比“理解设计模式结构本身”更为重要。 设计模式的应用不宜先...

2018-03-30 17:01:07 182

转载 C++ 设计模式2 (面向对象设计原则)

转自http://www.cnblogs.com/wangxiaobao/p/5142331.html1. 变化是复用的天敌!    面向对象设计的最大优势在于 : 抵御变化 2. 重新认识面向对象理解隔离变化:从宏观层面来看,面向对象的构建方式更能适应软件的变化,能将变化所带来的影响减为最小。 各司其职:从微观层面来看,面向对象的方式更强调各个类的”责任“(代码示例中,各个类型图形,各自实现自己...

2018-03-30 16:58:58 134

转载 c++ 设计模式1

原创链接:http://www.cnblogs.com/wangxiaobao/p/5141710.html从面向对象谈起1)底层思维:向下,如何把握及其底层,从微观理解对象构造              (语言构造、编译转换、内存模型、运行时机制)抽象思维: 向上,如何将我们的周围世界抽象为程序代码     (面向对象、组件封装、设计模式、架构模式) 2)深入理解面向对象 向下: 深入理解三大面...

2018-03-30 16:57:07 104

转载 GCC静态编译

GCC文章转自:https://www.cnblogs.com/tianyajuanke/p/3359100.html一、简介:gcc 最初是 "GNU C Compiler" 的简称,只是当作一个 C 语言的编译器,现在已经变成了 "GNU Compiler Collection",可以编译多种语言。  二、编译的四个阶段:在使

2018-01-05 17:54:22 15130

转载 error: start and/or end address not on sector boundary解决

error: start and/or end address not on sector boundary解决norflash一般分成几个sector:环境变量,自举,内核,应用软件出现这个问题的原因是,在uboot中定义了flash的sector,而flash的擦除是按照sector来进行的,定义的sector不对。可以用flinfo这个命令查看flash的sect

2014-12-18 16:15:59 1387

16kHz, 16bit, 双通道立体声wav音频文件16k16bitStereo.zip

16kHz, 16bit, 双通道立体声wav音频文件,用于调试声卡时使用。

2019-11-01

spcaview-20071224.tar.gz

spcaview-20071224.tar.gz源代码。目录中有avilib.c与avilib.h文件。 可参考这两个文件提供的接口将采集的视频转为avi格式存储及解码回放。

2016-02-03

gperf-3.0.4.tar.gz

软件包:udev 下载地址:http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/ 软件包libacl1-dev 下载地址:http://packages.debian.org/lenny/libacl1-dev 软件包:gperf 下载地址:http://ftp.gnu.org/gnu/gperf/ 软件包:gettext 下载地址:ftp://ftp.gnu.org/pub/gnu/gettext/ 软件包:attr 下载地址:http://www.kernel.org/pub/linux/utils/fs/xfs/attr/ 软件包:libusb 下载地址:http://sourceforge.net/projects/libusb/files/libusb-1.0/ 软件包:libusb-0.1.12 http://www.filewatcher.com/m/libusb-0.1.12.tar.gz.389343.0.0.html 软件包:usbutils 下载地址:http://sourceforge.net/projects/linux-usb/files/usbutils/ Udev-145 $ tar xf udev-145.tar.gz $ cd udev-145 $ ./configure 出错信息: checking for gperf... no configure: error: gperf is needed 参考解决方法: 安装gperf-3.0.4 $ ./configure 出错信息: checking for LIBUSB... configure: error: Package requirements (libusb >= 0.1.12) were not met: No package 'libusb' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBUSB_CFLAGS and LIBUSB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 参考解决方法: 安装:libusb $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH $ cd /usr/local/lib/pkgconfig $ sudo mv libusb-1.0.pc libusb.pc //如果不修改则出同样的错误,还是找不到libusb $ cd - $ ./configure 出错信息: checking for USBUTILS... configure: error: Package requirements (usbutils >= 0.82) were not met: No package 'usbutils' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables USBUTILS_CFLAGS and USBUTILS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 参考解决方法: 安装usbutils $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH $ ./configure --prefix=/home/cs2c/mylib/udev/ 下面是提示信息: udev 145 ======== prefix: /home/cs2c/mylib/udev sysconfdir: ${prefix}/etc sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib rootlibdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec datarootdir: ${prefix}/share mandir: ${datarootdir}/man includedir: ${prefix}/include logging: yes debug: no selinux: no compiler: gcc cflags: -g -O2 ldflags: extras: yes gintrospection: no usb.ids: /usr/share/usb.ids pci.ids: /usr/share/pci.ids xsltproc: /usr/bin/xsltproc gperf: /usr/local/bin/gperf $ make 出错信息: udevd.c:36:26: 错误:sys/signalfd.h:没有那个文件或目录 udevd.c: 在函数‘main’中: udevd.c:1051: 错误:‘fdsi’的存储大小未知 udevd.c:1054: 错误:‘sizeof’不能用于不完全的类型‘struct signalfd_siginfo’ udevd.c:1055: 错误:‘sizeof’不能用于不完全的类型‘struct signalfd_siginfo’ make[2]: *** [udevd.o] 错误 1 make[2]: Leaving directory `/home/cs2c/work/nc/udev-145/udev' make[1]: *** [all-recursive] 错误 1 make[1]: Leaving directory `/home/cs2c/work/nc/udev-145' make: *** [all] 错误 2 参考解决方法: 从X86的电脑(/usr/include/sys/signalfd.h)上复制过来放到(/usr/include/sys/) 目录下 signalfd.h.zip 出错信息: gcc: /usr/lib/libacl.so: No such file or directory make[3]: *** [udev-acl] 错误 1 make[3]: Leaving directory `/home/cs2c/work/nc/udev-145/extras/udev-acl' make[2]: *** [all-recursive] 错误 1 make[2]: Leaving directory `/home/cs2c/work/nc/udev-145/extras' make[1]: *** [all-recursive] 错误 1 make[1]: Leaving directory `/home/cs2c/work/nc/udev-145' make: *** [all] 错误 2 参考解决方法: $ sudo find / -name libacl* $ cd /usr/lib $ sudo cp /lib/libacl.so.1.1.0 . $ sudo ln -s libacl.so.1.1.0 libacl.so.1 $ make $ make install usbutils-0.84 $ tar xf usbutils-0.84.tar.gz $ cd usbutils-0.84 $ ./configure 出错信息: checking for LIBUSB... configure: error: Package requirements (libusb >= 0.1.12) were not met: No package 'libusb' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBUSB_CFLAGS and LIBUSB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 参考解决方法: 安装:libusb $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH $ make 出错信息: lsusb.c:36:17: 错误:usb.h:没有那个文件或目录 参考解决方法: 用libusb-0.1.1.12替换libusb-1.0 $ make $ sudo make install libusb-0.1.1.12 $ tar xf libusb-0.1.12.tar.gz $ cd libusb-0.1.12 && sudo su # ./configure && make && make install libusb-1.0.2 $ tar xf libusb-1.0.2.tar.gz $ cd libusb-1.0.2 $ ./configure && make $ sudo make install gperf-3.0.4 $ tar xf gperf-3.0.4 $ cd gperf-3.0.4 $ ./configure 出错信息: checking for acl_init in -lacl... no configure: error: libacl not found 参考解决方法: 安装acl-2.2.47 $ ./configugre && make $ sudo make install acl-2.2.47 $ tar xf acl-2.2.47 $ cd acl-2.2.47 $ ./configure 出错信息: checking for msgfmt... no FATAL ERROR: msgfmt does not seem to be installed. acl cannot be built without a working gettext installation. 参考解决方法: 安装:gettext-0.17 $ ./configure 出错信息: checking attr/xattr.h usability... no checking attr/xattr.h presence... no checking for attr/xattr.h... no FATAL ERROR: attr/xattr.h does not exist. Install the extended attributes (attr) development package. Alternatively, run "make install-dev" from the attr source. 参考解决方法: 安装:attr $ ./configure $ make 出错信息: gcc: /usr/lib/libattr.so: No such file or directory gmake[1]: *** [libacl.la] 错误 1 make: *** [default] 错误 2 参考解决方法: $ sudo su && cd /usr # find ./ -name libattr.so # cp /lib/libattr.so.1* /usr/lib # cd /usr/lib # rm libattr.so.1 # ln -s libattr.so.1.1.0 libattr.so.1 # make # make install-dev gettext-0.17 $ tar xf gettext-0.17.tar.gz $ cd gettext-0.17 $ ./configure && make $ sudo make install attr-2.4.43 $ tar xf attr-2.4.43.tar.gz $ cd attr-2.4.43 $ ./configure && make $ sudo make install-dev

2013-12-23

udev_150源码包

udev_150源码包,含path_id源码

2013-12-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除