Archive for January, 2010


Installing Windows Embedded Standard (Windows 7 Embedded) in a VHD file

Original Url: http://wunger.spaces.live.com/Blog/cns!9E6927A42561030E!1205.entry

One of the new capabilities of Windows 7 Embedded is to boot from a VHD file. This is a great possibility which can help a lot in case of deploying updates, running different version, or deploying the system in general as it’s again a simple file copy&pasty procedure on NTFS.

You can even install Windows 7 Embedded directly into a VHD so you don’t need to transfer it to a VHD manually – also you don’t need BCDEDIT as the setup will take care of this.

Before you start you need an formatted NTFS volume where the VHD will be located.

Installation

  • Boot the target device from the Runtime DVD
  • When the setup screen appears pres Shift+F10 – this will open a command prompt
  • Run diskpart.exe
  • Run the following commands to create a 5GB VHD

create vdisk file=c:Win7Emb.vhd maximum=5120
select vdisk file=c:Win7Emb.vhd
attach vdisk
exit

  • close the command prompt and run through your Windows 7 Embedded installation
  • select the VHD harddisk at the target drive selection
  • IMPORTANT: VHD Boot needs the following component

System Services
- File System
- – Advanced File System

谈Windows 7的VHD启动

Original Url:

[Windows 7] Step by Step VHD with Native Boot

Original Url: http://goxia.maytide.net/read.php/1146.htm

Step by Step VHD with Native Boot

Original URL: http://hi.baidu.com/xeye_h/blog/item/f2477d2580324f388744f9e0.html

之前写过一篇。这里优化配置后重新总结下。方便自己查看。
首先准备工作。所需软件

XAMPP for Windows

Python

Django and mod_wsgi: A perfect match!

mod_wsgi is an Apache module for serving WSGI-based Python web applications from the Apache HTTP server. Django, along with almost every other Python web framework today, comes bundled with a backend for acting like a WSGI application.

A couple of months ago I decided to try it out in spite of mod_python. Discovering and trying out mod_wsgi really suprised me. It can take a massive beating, and outperforms mod_python in every practical aspect.

The setup

You will need a short Python “bootstrap” script to create a WSGI-handler for your Django project. Here is an example (call it wsgi_handler.py and place it in the root directory of your Django project – the one with manage.py and settings.py):

import sys
import os

sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
os.environ['DJANGO_SETTINGS_MODULE'] = 'projectname.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

Finally set up your Apache virtualhost to use mod_wsgi:

 *>

  ServerName www.projectname.org
  ServerAlias *projectname.org  

  Alias /admin_media /usr/lib/python2.4/site-packages/django/contrib/admin/media

   /admin_media>
    Order allow,deny
    Allow from all
  

  Alias /media /home/user/projectname/media

   /media>
    Order allow,deny
    Allow from all
  

  WSGIScriptAlias / /home/user/projectname/wsgi_handler.py

  WSGIDaemonProcess projectname user=user group=user processes=1 threads=10
  WSGIProcessGroup projectname


In the WSGIDaemonProcess line, you can easily manage the amount of system resources (measured in processes and threads) mod_wsgi should use. In my experience a single process with 10 threads will cover most small and medium loaded websites.

Why?

This is some of the reasons why you should ditch mod_python for mod_wsgi when hosting Django projects:

  • Faster

    The load times of the websites now served with mod_wsgi really surprised me. Normally a page would be served within 150-300 ms. This was reduced to load times in the range of 40-80 ms.

    I also discovered that running mod_wsgi in embedded mode (as opposed to daemon mode) was not worth the effort. I didn’t really see any difference between load times when using Django.

  • Less memory usage

    Everyone hosting more than a couple of Django projects on a single Apache instance knows that Django projects squanders a bit with memory usage, and every single Apache child process will easily end up using 50 MB RAM.

    mod_wsgi dedicates a process (or multiple processes) to a single interpreter for a single Django project, and keeps the memory usage low in the “normal” Apache child processes. On a server with 8 small Django projects, I went from using ~1500 MB RAM on Apache child processes to using 150 MB.

  • Secure

    When using mod_python your Python interpreter will be running as the user running the Apache webserver itself (on Debian systems, the user is called www-data). Typically this will allow you to peek around in places where you do not want your users peeking. This is due to the fact that www-data must have read access to every file you use in your application (including settings/configuration/media files).

    mod_wsgi addresses this problem by changing to a user id specified in the configuration file, and run your Python interpreter as another user than www-data, allowing you to lock down every project on your server to seperate user accounts.

Installing Python with Django & MySQL in Windows 7

For all those looking to run python on your local host try the following steps:

1. Install Python (use ver2.5 if you need to use a lot of python compatible frameworks as most of them are currently available for ver2.5 only.)
2. Install a web server package like LAMP or XAMPP ( preferred ).
3. Go to your Apache folder and and in /modules copy the file of mod_wsgi.so. If you want to install mod_python download the zip file from internet and install mod_python.

4. For Django users use mod_wsgi .
5. Download latest Django package and extract it to some path.
6. Now in the Django directory run the setup.py file and then you are up and running.

Good Python tutorials from IBM DeveloperWorks
Original URL:http://www.ibm.com/developerworks/cn/linux/theme/special/index.html#python

Python 编程系列 —— David MertzMichael RobertsMarkus Neifer
本专栏主要包括David Mertz 创作的“可爱的 Python”系列,内容涉及与 XML 的结合、DOM 的动态性、Web-based filtering proxy、State machine、Text processing、Curses、实现内幕、Reloading on the fly、Python 中的函数编程,最新版的获得、Python 下的TK编程、全文检索的开发、Python IDE评测、Python 下的XML 工具等等;另外您还可以学习到 Michael Roberts 的 Python GUI 库 wxPython 入门,和 Markus Neifer 的 wxWindows 学习,这是一个可移植的 C++ 和 Python 工具箱。

可爱的 Python:将 XML 和 Python 结合起来 — 介绍 Python 的 XML 工具
可爱的 Python:DOM 的动态性 — 近观 Python 的 xml.dom 模块
可爱的 Python:我的第一个基于 Web 的过滤代理 — 使用 Txt2Html 将文本转换成 HTML
可爱的 Python:使用状态机 — Python 中的算法和编程方法
可爱的 Python:Python 中的文本处理 — 给初学者的提示
可爱的 Python:Curses 编程 — 给初学者的提示
可爱的 Python:Python 实现内幕 — 采访 Vyper 和 Stackless Python 创始人
可爱的 Python:动态重新装入 — 在长期运行的进程中动态重新装入模块
可爱的 Python:JPython 和 Python for .NET 内幕 — 采访创始人
可爱的 Python:Python 中的函数编程 — 让您喜爱的脚本语言发挥更大功效
可爱的 Python:获得版本 2.0 — 最新 Python 版本的新特性
可爱的 Python:Python 中的 TK 编程 — 给使用 Python GUI 库的初学者的提示
可爱的 Python: 在 Python 下开发全文索引 — 为更好的搜索铺平道路
可爱的 Python: Python IDE 测评 — 成熟与未成熟
可爱的 Python: 重温 Python 的 XML 工具 — 为您带来最新工具和代码信息
可爱的 Python: Python 中的函数编程,第 2 部分 — 刚开始涉足函数编程?
可爱的 Python: 在 Python 中进行函数编程,第 3 部分 — Curry 和其它的高阶函数
可爱的 Python: 用于 PalmOS 的 Python — 用 Pippy 开发用于手持设备的应用程序
可爱的 Python: pydoc 和 distutils 模块 — 改善 Python 的社会基础
可爱的 Python:迭代器和简单生成器 — Python 2.2 中的新型构造
可爱的 Python:[anygui] 项目预览 — Anygui 将完成 Python 的最佳工具箱
可爱的 Python:更新您的 Python 读物列表,第 2 部分 — 对您冬季读物列表的建议
可爱的 Python: 使用 SimpleParse 模块进行解析 — 一种简明易读的 EBNF 样式的封装器
可爱的 Python:更新您的 Python 读物列表,第 3 部分 — Python 书籍的收集和追踪
可爱的 Python:用 Python 生成器实现“轻便线程” — 微线程的力量
可爱的 Python:基于生成器的状态机 — 用基于生成器的状态机和协同程序增加效率
可爱的 Python:使用 Spark 模块解析 — 了解这个有用的工具
可爱的 Python:用 Psyco 让 Python 运行得像 C 一样快 — 使用 Psyco:Python 专用编译器
可爱的 Python:Python 中的测试框架 — 确保软件如您所愿地工作
Python 持久性管理 — 使用序列化存储 Python 对象
Python 自省指南 — 如何监视您的 Python 对象
可爱的 Python:SimPy 简化了复杂模型
可爱的 Python:创建声明性迷你语言 — 编程为断言而不是指令
可爱的 Python:Numerical Python — 使用 Numeric 软件包和 Numarray 软件包

使用 Python 访问 DB2 for Linux
Qt 和 PyQt — 用于 Python 的高级 GUI 库

用C语言扩展Python的功能
Python 自动单元测试框架
Python 设计模式系列之一: 用模式改善软件设计
Python 设计模式系列之二: 创建型 Simple Factory 模式
Python 设计模式系列之三: 创建型 Factory Method 模式
Python 设计模式系列之四: 创建型 Abstract Factory 模式

Python 中的元类编程 — 将面向对象编程推向新的高度
Python 中的元类编程 — 理解继承的奥秘和实例创建
在 Python 中封装 GObject — 您不必是 C 专家就可以为 Python 封装模块

使用 Twisted Matrix 框架来进行网络编程,第 1 部分: 理解异步联网
使用 Twisted Matrix 框架来进行网络编程,第 2 部分: 实现 Web 服务器
使用 Twisted Matrix 框架来进行网络编程,第 3 部分: 有状态 Web 服务器和模板化
使用 Twisted 框架进行网络编程,第 4 部分: 保护客户机与服务器

Back to top 回页首

10 Best Free Chart APIs

Spec Explorer – MBT(Model-Based Testing) Tool from Microsoft

Spec Explorer is a Model-Based Testing tool used in Microsoft Windows Protocal team with great success.

There Chinese blog as below:
http://blogs.msdn.com/sechina/

Related Website:
http://msdn.microsoft.com/en-us/devlabs/ee692301.aspx

CHK(Checked) and FRE(Free) Build Differences

Windows Driver Kit: Driver Development Tools
Checked and Free Build Differences

The two distinct builds of the NT-based operating systems that are available are the following:

The free build (or retail build)
The free build of Microsoft Windows is used in production environments. The free build of the operating system is built with full compiler optimizations. When the free build discovers correctable problems, it continues to run.

The distribution media that contain the free build of the operating system do not have any special labels—in other words, the CD that contains the free build is labeled with the Windows version name, without any reference to the type of build.

The checked build (or debug build)
The checked build of Microsoft Windows makes identifying and diagnosing operating-system-level problems easier.

The checked build differs from the free build in the following ways:

Distribution media that contain the checked build are clearly labeled as “Debug/Checked Build.” The checked build distribution medium contains the checked version of the operating system, plus the checked versions of HALs, drivers, file systems, and even many user-mode components. For information about obtaining this build, see Obtaining the Checked Build.

Because the checked build contains fewer optimizations and more debugging checks than the free build, the checked build is both larger in size and slower to run than the free build. As a result, the free build is used in production environments unless it is necessary to use the checked build to identify serious problems.

Powered by WordPress | Theme: Motion by 85ideas.