By minitia, on 十一月 17th, 2009, Category: Open Source
现在很多网站一说到cache就想到memcached,memcached确实是非常优秀的系统,但是在某些场合,特别在不是分布式应用的场合,或者某些数据不需要分布式的访问,那它就未必是最佳的选择。
下面比较3种cache方式,用测试结果说话
Map,严格的说不能算cache,它适合本机访问,没有过期时间,不适合大容量,不能预计长度的数据,可能会使内存耗尽。 ehcache,可设过期时间,当超过指定内存数量,可设置淘汰算法,可输出到磁盘,可适合本机访问,也适合用作分布式缓存,分布式缓存配置和原理稍复杂,没有memcached直观,本测试未使用ehHcache分布式支持。 Memcached, 适合分布式缓存,可设过期时间
Continue reading 比较Java中几种数据cache方式 - 全文阅读
By minitia, on 九月 22nd, 2009, Category: Open Source, Python
Twisted是python下的用来进行网络服务和应用程序编程的框架,安装Twisted前需要系统预先安装有python。
一、安装Twisted
1、下载Twisted
从这里下载Twisted,有win32,source,mac版本,win32下有支持python2.4和2.5的两个版本,可以根据你的python版本下载,今天是在linux下,所以直接下载source版本就可以了。目前的版本号是Twisted-8.1.0
2、安装Twisted
下载好Twisted后,进入到下载目录,解压:
Continue reading Linux下Python网络编程框架-Twisted安装手记 - 全文阅读
By Bryan Wu, on 八月 17th, 2009, Category: Open Source, Python
Tags: Image, Python
The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.
Status
The current free version is PIL 1.1.6. This release supports Python 1.5.2 and newer, including 2.4 and 2.5.
More: http://www.pythonware.com/products/pil/
By Bryan Wu, on 七月 2nd, 2009, Category: Open Source, Python
Tags: Data Persistence, DataBase, Programming, Python, SQL, Sqlite, 编程
SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use SQLite for internal data storage. It’s also possible to prototype an application using SQLite and then port the code to a larger database such as PostgreSQL or Oracle.
sqlite3 was written by Gerhard Häring and provides a SQL interface compliant with the DB-API 2.0 specification described by PEP 249.
Continue reading Python Programming – Sqlite for data persistence - 全文阅读
By Bryan Wu, on 六月 11th, 2009, Category: Code::Blocks, Open Source
Tags: CBForge Projects, code blocks, Programming, ProjectManager, wxWidgets, 代码分析, 字符串哈希
Code Blocks IDE的内部实现中,关于项目和文件之间的关系和数据保存主要维护在Project,ProjectManager和ProjectFile这几个类里面。在ProjectManager里面有几个部分:1)View:包括m_pNotebook, m_pTree, m_plugin等;2)Status:包括m_isLoadingProject, m_isclosingProject, m_isCheckingForExternallyModifiedProject等,从字面意义上就可以看出它们的用途;3)Project:包括m_pActiveProject和指针*m_pProjects。这个当前活动的项目m_pActiveProject就是Project类的实例。
Continue reading ProjectManager, Project and ProjectFile in Code::Blocks - 全文阅读
By Bryan Wu, on 六月 9th, 2009, Category: C++ Programming, Open Source
Tags: Building tool, C++, compiler, cross platform, IDE Family, JAM, makefile, Open Source, Perforce
Perforce公司的开源工具JAM可以代替Make的工作,Jam可以自动识别源文件的依赖关系而不需要像Makefile那么复杂的定义。下面有一个例子,编译一个简单的C文件,Jamfile只需要一句,而Makefile需要8行对依赖关系的定义。顺便说一下,Perforce公司的SCM工具也非常不错,很多大公司都在使用。
Jam is a software build tool that makes building simple things simple and building complicated things manageable. It has been freely available as C source for many years from the Perforce Public Depot and is widely used to build commercial and academic software. Jam is a very good solution for conventional C/C++ compile-and-link builds.
Continue reading JAM – Building tool for C/C++ instead of Make - 全文阅读
By Bryan Wu, on 六月 5th, 2009, Category: Open Source, wxWidgets
Tags: C++, Linux, Programming, Qt, Sizer, UI, windows, wxWidgets, 界面设计, 编程
个人感觉在wxWidgets UI编程时,一开始最难于理解和使用的就是Sizer,尤其是在与各种控件、Panel嵌套搭配的时候,包括对控件间隙以及父窗口大小发生改变时各个控件的变化定义等。在网上发现这篇文章非常详细的总结了Sizer, Frame和Panel的关系并通过简单的实例深入浅出地讲解了这一部分,转载在此供大家参考,如果你有相关技术问题或者开发心得也可以发评论参加讨论。
[原文如下] 最近在研究跨平台的C/C++ GUI库,基本说来功能强大,稳定且开源的库就是QT和wxWidgets了,关于他们之间具体的比较详见《WxWidgets Compared To Other Toolkits》。 N年以前研究过一段时间QT的代码,不过主要因为其在Windows开发商用软件还是要一定的license费用,所以不能说是真正的免费跨平台。 wxWidgets则是一套免费开源的跨平台C++ GUI库,它的一个特点就是可以转换为native 的api图形界面。就是说用同样的代码,在windows平台看起来就是window风格的,在X Windows平台看起来就是linux风格的。
Continue reading wxWidgets Programming: Sizer, Frame and Panel - 全文阅读
By Bryan Wu, on 六月 3rd, 2009, Category: Code Insight, Open Source, wxWidgets
Tags: Book, C++, cross platform, GUI, Open Source, Programming, Python, wxPython, wxWidgets, 下载, 编程
以前通过学习Python认识了wxPython,那里面有很多文档和源代码实例可以参考学习,对编程帮助很大。后来在C++项目中也需要用到wxWidgets,发现这本书非常实用,结合wxWidgets的官方手册,编程感觉非常畅快。特别推荐大家阅读,如果你对wxWidgets编程感兴趣的话。有什么读书心得也可以跟贴共享给大家。
wxWidgets now has its own 700-page book to help you learn or brush up on your cross-platform programming skills. Written by Julian Smart and Kevin Hock with Stefan Csomor, "Cross-Platform GUI Programming with wxWidgets" was published on July 27th 2005 by Prentice Hall. It’s part of Bruce Perens’ Open Source Series.
Continue reading Book: Cross-Platform GUI Programming with wxWidgets (Bruce Perens)(含中英文版本下载地址) - 全文阅读
By Bryan Wu, on 五月 26th, 2009, Category: C++ Programming, Code::Blocks, Open Source
Tags: C++, code blocks, cross platform, FreeBSD, LGPL, Linux, Multimedia library, SDL, windows
SDL - Simple DirectMedia Layer, is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."
SDL supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS, and OS/2, but these are not officially supported. SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, C#, D, Eiffel, Erlang, Euphoria, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, Smalltalk, and Tcl. SDL is distributed under GNU LGPL version 2. This license allows you to use SDL freely in commercial programs as long as you link with the dynamic library. – libsdl.org
Continue reading Setting up Code::Blocks to work with SDL - 多媒体编程库 - 全文阅读
|
|
|