<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; 4. Programming</title>
	<atom:link href="http://www.linuxany.com/archives/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Python 解析xml文件的2种方式</title>
		<link>http://www.linuxany.com/archives/1958.html</link>
		<comments>http://www.linuxany.com/archives/1958.html#comments</comments>
		<pubDate>Sun, 15 Jan 2012 09:41:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[ElementTree]]></category>
		<category><![CDATA[minidom]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1958</guid>
		<description><![CDATA[1.MiniDom方式解析xml 举例1：xml文件以data.xml为例，具体操作如下： &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;info&#62; &#160;&#160; &#60;intro&#62;用户信息&#60;/intro&#62; &#160; &#160; &#60;list&#160;id='001'&#62; &#160; &#160; &#160; &#160; &#60;head&#62;auto_userone&#60;/head&#62; &#160; &#160; &#160; &#160; &#60;name&#62;linuxany&#60;/name&#62; &#160; &#160; &#160; &#160; &#60;number&#62;12345678&#60;/number&#62; &#160; &#160; &#160; &#160; &#60;age&#62;20&#60;/age&#62; &#160; &#160; &#160; &#160; &#60;sex&#62;男&#60;/sex&#62; &#160; &#160; &#160; &#160; &#60;hobby&#62;上网&#60;/hobby&#62; &#160; &#160; &#60;/list&#62; &#160; &#160;&#160; &#60;list&#160;id='002'&#62; &#160; &#160; &#160; &#160; &#60;head&#62;auto_usertwo&#60;/head&#62; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1958.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 执行js的2种解决方案</title>
		<link>http://www.linuxany.com/archives/1956.html</link>
		<comments>http://www.linuxany.com/archives/1956.html#comments</comments>
		<pubDate>Sun, 08 Jan 2012 08:23:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[PerlConnect]]></category>
		<category><![CDATA[SpiderMonkey]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1956</guid>
		<description><![CDATA[第1种方案 SpiderMonkey是Mozilla项目的一部分，是一个用C语言实现的JavaScript脚本引擎， 该引擎分析、编译和执行脚本，根据JS数据类型和对象的需要进行内存分配及释放操作；利用该引擎可以让你的应用程序具有解释JavaScript脚本的能力。 要想使用spidermonkey得先安装，方法如下： cd /home/linuxany.com/ wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- &#124; tar xvz cd js/src make -f Makefile.ref mkdir -p /usr/include/smjs/ -v cp *.{h,tbl} /usr/include/smjs/ -v cd Linux_All_DBG.OBJ cp *.h /usr/include/smjs/ -v mkdir -p /usr/local/{bin,lib}/ -v cp js /usr/local/bin/ -v cp libjs.so /usr/local/lib/ -v 以上安装完成后，运行/usr/local/bin/js 就应该可以启动js解释运行引擎了. python使用举例： # coding:utf-8 import&#160;os import&#160;tempfile &#160; def&#160;call_js(js): &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1956.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 模拟IE浏览器</title>
		<link>http://www.linuxany.com/archives/1947.html</link>
		<comments>http://www.linuxany.com/archives/1947.html#comments</comments>
		<pubDate>Sun, 25 Dec 2011 16:10:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[cPAMIE]]></category>
		<category><![CDATA[win32com]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1947</guid>
		<description><![CDATA[#天涯登陆地址&#160;&#160; tianyalogin = &#34;http://www.tianya.cn/&#34;&#160;&#160; tianya_user = &#34;xxxxx&#34;&#160;&#160; tianya_pw = &#34;xxxxx&#34;&#160;&#160; &#160; ie = win32com.client.Dispatch(&#34;InternetExplorer.Application&#34;)&#160;&#160; ie.Visible = 0&#160;&#160; #开始登陆&#160;&#160; ie.Navigate(tianyalogin)&#160;&#160; state = ie.ReadyState&#160;&#160; print&#160;&#34;打开登陆页面&#34; while 1:&#160;&#160; &#160; state = ie.ReadyState&#160;&#160; &#160; if&#160;state ==4:&#160;&#160; &#160; break&#160;&#160; &#160; sleep(1)&#160;&#160; &#160; print&#160;&#34;页面载入完毕，输入用户名密码&#34;&#160;&#160; state = None&#160;&#160; ie.Document.getElementById(&#34;text1&#34;).value=tianya_user&#160;&#160; ie.Document.getElementById(&#34;password1&#34;).value=tianya_pw&#160;&#160; ie.Document.getElementById(&#34;button1&#34;).click()&#160;&#160; &#160; while&#160;1:&#160;&#160; &#160; state = ie.ReadyState&#160;&#160; &#160; print&#160;state&#160;&#160; &#160; if&#160;state ==4 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1947.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 清除页面中多余的样式</title>
		<link>http://www.linuxany.com/archives/1934.html</link>
		<comments>http://www.linuxany.com/archives/1934.html#comments</comments>
		<pubDate>Mon, 12 Dec 2011 08:05:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html5/JS/CSS]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1934</guid>
		<description><![CDATA[一、Dust-Me selectors Dust-Me是一个很有用也很好用的Firefox插件，它可以分析到你的页面中调用的所有CSS文件并分析那些在页面中没有被用到。 支持本地和远程样式文件，包括使用&#60;link&#62;标签、&#60;?xml-stylesheet?&#62;处理指令、@import语句等方式引入的样式文件；(但是不支持页面中的&#60;style&#62;块和内联样式) 支持IE条件注释中引入的样式文件； 可以检查一个页面，也可以检查整个网站； 支持CSS1选择器、大部分CSS2和CSS3选择器； 理解通用的CSS hack，比如 “* html #fuck-ie”将会被认为是”html #fuck-ie”； 支持Firefox 3.5和Firefox 3.0，事实上得益于FF 3.5的js引擎的改进，FF 3.5中的性能比FF 3.0要高50%。 下载地址：https://addons.mozilla.org/en-us/firefox/addon/dust-me-selectors/ &#160; 二、Page Speed Page Speed是Google提供的一个前端性能分析工具，有些类似于YSlow，但是提供了一些比较个性且很有用的工具，比如Remove unused CSS： Page Speed和YSlow一样依赖Firebug。 下载地址：http://code.google.com/intl/zh-CN/speed/page-speed/download.html 您还可能感兴趣的内容Nginx 让浏览器告诉你负载均衡分到了哪台服务器完美实现垂直水平居中的 DIVjs和css文件混合方法兼容IE/Firefox的设为首页加入收藏(javascript)]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1934.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 支持SMTP身份验证的邮件发送</title>
		<link>http://www.linuxany.com/archives/1886.html</link>
		<comments>http://www.linuxany.com/archives/1886.html#comments</comments>
		<pubDate>Fri, 25 Nov 2011 04:52:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[smtplib]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1886</guid>
		<description><![CDATA[import sys, smtplib, MimeWriter, base64, StringIO, os, string, time &#160; from&#160;email.MIMEMultipart import MIMEMultipart from&#160;email.MIMEBase import MIMEBase from&#160;email.MIMEText import MIMEText from&#160;email.Utils import COMMASPACE, formatdate from&#160;email import Encoders def send_mail(send_from, send_to, subject, text, files=[], &#160; &#160; &#160; &#160; &#160; &#160; &#160; server=&#34;localhost&#34;, user = None, password = None): &#160; &#160; assert&#160;type(send_to)==list &#160; assert&#160;type(files)==list &#160; &#160; msg = [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1886.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>完美实现垂直水平居中的 DIV</title>
		<link>http://www.linuxany.com/archives/1746.html</link>
		<comments>http://www.linuxany.com/archives/1746.html#comments</comments>
		<pubDate>Fri, 28 Oct 2011 09:33:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html5/JS/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1746</guid>
		<description><![CDATA[　　这个问题，估计很多网页设计员都会遇到过，如何在页面中建立出一个垂直水平居中的 DIV 呢？ 　　我在 google 搜索了一下关键字“div 垂直居中” ,约有71,900项符合的查询。但并未能找到一个正确的，符合 XHTML和CSS规范的办法。自己就琢磨了一下，其实也不难，虽然DIV不支持未明确高度的垂直居中，但这个是可以变通的。 　　我们知道 div 的 position 属性是支持百分比数值来进行定位的，有了这个定位能力，我们就可以把 div 的显示坐标定位在网页的绝对中心了，再通过 margin 属性把 div 设置为我们需要的宽度和高度就可以。当然我们的 margin-top 和 margin-left 属性需要使用到负数，把DIV的定位从中心分别向上和向左移动到合适的地方。下面这个例子可以在页面上建立一个垂直水平居中的 DIV: ＜style type=&#34;text/css&#34;＞ #pageFrame { position: absolute; // 设置为绝对定位 left: 50%; // 设置显示坐标 X top: 50%; // 设置显示坐标 Y width:760px; // 设置 DIV 宽度 height:460px; // 设置 DIV 高度 margin-left:-380px; // [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1746.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 和HTML4的10个关键区别</title>
		<link>http://www.linuxany.com/archives/1717.html</link>
		<comments>http://www.linuxany.com/archives/1717.html#comments</comments>
		<pubDate>Sun, 16 Oct 2011 14:02:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html5/JS/CSS]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1717</guid>
		<description><![CDATA[HTML5是HTML标准的下一个版本。越来越多的程序员开始HTML5来构建网站。如果你同时使用HTML4和HTML5的话，你会发现用HTML5从头构建，比从HTML4迁移到HTML5要方便很多。虽然HTML5没有完全颠覆HTML4，它们还是有很多相似之处，但是它们也有一些关键的不同。本文就列出了它们之间10个关键的不同之处。 1.HTML5标准还在制定中 首先要注意的是，HTML5虽然现在很火，但是HTML5标准还在制定中，标准仍在改变。HTML4已经10多年了，不会有任何改变了。 2.简化的语法 HTML5简化了很多细微的语法，例如doctype的声明，你只需要写就行了。HTML5与HTML5，XHTML1兼容，但是与SGML不兼容。 3.＜canvas＞标签替代Flash Flash给很多Web开发者带来了麻烦，要在网页上播放Flash需要一堆代码和插件。＜canvas＞标签使得开发者只要使用一个标签就能和用户产生UI交互。虽然目前＜canvas＞标签还不能实现Flash的所有功能，但是很快＜canvas＞就会让Flash看起来老土，哈哈！ 4.新增＜header＞和＜footer＞标签 HTML5设计的一个原则是更好的体现网站的语义性，所以增加了＜header＞和＜footer＞这样的标签，用来明确表示网页的结构。 5.新增＜section＞和＜article＞标签 与＜header>，＜footer＞类似，＜section>和＜article>也有利于清晰化网页的结构，更有利于SEO。 6.新增＜menu＞和＜figure＞标签 ＜menu＞可以被用于创建传统的菜单，也可以用于工具栏和上下文菜单。＜figure＞标签使得网页文字和图片的排版更专业。 7.新增＜audio＞和＜video＞标签 这两个标签可能是HTML5里面最有用的两个标签了。顾名思义，这两个标签是用来播放音频和视频的。 8.全新的表单 HTML5对＜form＞和＜forminput＞标签进行了大量修改，添加了很多新的属性，也修改了很多属性。 9.删除＜b＞和＜font＞标签 这个改进我还无法理解。我不认为删除这两个标签对代码的改进有很大的帮助。官方的解释是应该用CSS来替代这两个标签。但我还是觉得对于简单的文本，这两个标签还是很方便的。 10.删除＜frame＞，＜center＞，＜big＞标签 我已经记不得上次是什么时候使用这些标签了。 以上十点只是HTML5和HTML4差别的很小一部分，最新最全的HTML5-HTML4对比信息请看：http://dev.w3.org/html5/html4-differences/ 您还可能感兴趣的内容完美实现垂直水平居中的 DIV]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1717.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

