<?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>Hi Magic!</title>
	<atom:link href="http://www.himagic.net/index.php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.himagic.net</link>
	<description>A Magic Heaven for You!</description>
	<lastBuildDate>Mon, 30 Apr 2012 15:08:13 +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>如何避免jQuery Mobile中Page的高度总是被置为100%</title>
		<link>http://www.himagic.net/index.php/archives/429.html</link>
		<comments>http://www.himagic.net/index.php/archives/429.html#comments</comments>
		<pubDate>Mon, 30 Apr 2012 15:08:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=429</guid>
		<description><![CDATA[用jQuery Mobile设计网页的确非常有移动的感觉，元素看上去就想用手指触摸，但是jQuery Mobile不只是用来在移动设备上展示的，PC浏览器也可以使用。当用于PC浏览器时，jQuery Mobile默认的自动充满高度的功能有时会有画蛇添足的效果，因为页面的header和footer可能是不属于jQuery Mobile的page范畴的，比如放置了Google的广告条，此时不论page所在DIV的内容有多少，其高度总是被设为屏幕的100%高度。最后，Magic哥通过读jQuery Mobile的源码找到了解决方案。 jQuery Mobile注册了一些监听事件，发挥的作用就是让当前活动page的min-height与屏幕有效高度相等，如果不想改jQuery Mobile的源码，可以利用css里的!important特性，给page赋予类似 min-height:100px !important;的样式，这样jQuery Mobile就降服了。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/429.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Mobile的Listview在刷新动态内容时报错的解决方案</title>
		<link>http://www.himagic.net/index.php/archives/428.html</link>
		<comments>http://www.himagic.net/index.php/archives/428.html#comments</comments>
		<pubDate>Wed, 25 Apr 2012 15:54:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=428</guid>
		<description><![CDATA[在玩jQuery Mobile时需要动态向Listview添加内容，但内行都知道，新增的内容是不带mobile样式和效果的，需要调用mobile提供的刷新函数，对于Listview，需要调用listview(&#8216;refresh&#8217;)，但是，在测试时会得到jQuery Mobile抛出的如下异常信息Uncaught cannot call methods on listview prior to initialization; attempted to call method 'refresh'，在stackoverflow上也有不少人问，但都没有说到点子上。 经过Magic哥的一番实验，发现这是因为在调用refresh时，jQuery Mobile对象还没有完成初始化，导致调用refresh时被jQuery Mobile抛出异常。解决方案是给jQuery Mobile留出初始化的时间，用0秒延时的setTimeout就可以，至少哥的问题就这么解决了。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/428.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Background不能正常加载问题的解决方案，Chrome插件开发技巧</title>
		<link>http://www.himagic.net/index.php/archives/426.html</link>
		<comments>http://www.himagic.net/index.php/archives/426.html#comments</comments>
		<pubDate>Fri, 20 Apr 2012 14:44:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=426</guid>
		<description><![CDATA[最近从Chrome上拿下来的例子似乎问题不断，前两天刚解决了CSP问题，又发现了一个background.js无法加载的问题，控制台看到的错误是，Port error: Could not establish connection. Receiving end does not exist，就连从官网拿下来的例子都不行，难道是Magic哥的Chrome需要升级了不成，感谢stackoverflow再次提供了准确的解决方案。 发生此问题时，先检查你的manifest.json中是否有manifest_version定义，如果有，删了它，然后重新加载扩展，看看是否还有问题。 如果仍有问题，检查你是否只定义了background是一个js，而不是按照background_page定义的，按照后者定义会消除问题。 至于你信不信，反正哥修改了上述两个地方，问题就被解决了。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/426.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content-Security-Policy问题的解决方案，Chrome插件开发技巧</title>
		<link>http://www.himagic.net/index.php/archives/425.html</link>
		<comments>http://www.himagic.net/index.php/archives/425.html#comments</comments>
		<pubDate>Wed, 18 Apr 2012 15:16:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=425</guid>
		<description><![CDATA[在写新插件时，发现Options页面报如下错误“Refused to execute inline script because of Content-Security-Policy”，之前所写的插件都是用Popup页面，从来没有遇到过这样的问题，看来Options页面的权限似乎是高了很多，经过多方查找，解决方案如下。 该问题的起因是Chrome的Content Security Policy(CSP)，需要按Chrome的旨意进行修改 将Javascript移送到一个独立的js文件中，options.html引入该文件 以addEventListener的方式为html控件定义响应事件 避免使用eval，包括setTimeout中，第一个参数应该是函数指针，而不能是字符串 记得完成后需要Disable/Enable或者卸载重装开发中的插件。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/425.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 升级带来的 Uncaught TypeError: Object # has no method &#8216;swing&#8217; 错误</title>
		<link>http://www.himagic.net/index.php/archives/421.html</link>
		<comments>http://www.himagic.net/index.php/archives/421.html#comments</comments>
		<pubDate>Thu, 12 Apr 2012 15:42:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=421</guid>
		<description><![CDATA[最近有点空闲，把Wordpress升级了，结果发现有的分站不太对劲，JScript控制台竟然打出了如下错误Uncaught TypeError: Object # has no method 'swing' 经过一番查找才知道，原来是新版Wordpress的jQuery已经升到了1.7.1，有些jQuery插件跟不上了，需要升级。此次错误是jquery.easing这个插件造成的，将1.1升到1.3后问题得到了解决。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/421.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android模拟器无法播放声音，铃声只能设静音的解决方法</title>
		<link>http://www.himagic.net/index.php/archives/420.html</link>
		<comments>http://www.himagic.net/index.php/archives/420.html#comments</comments>
		<pubDate>Fri, 06 Apr 2012 14:15:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=420</guid>
		<description><![CDATA[万能的Android模拟器理应什么都行，可偏偏不能播放声音，调试Notification时听不到预设的声音，到声音菜单里一看，竟然都只能设静音。去网上翻了一通也没有答案，结果还是让Magic哥自己找到了。 解决方法是在AVD Manager中，选中你所使用的模拟器，然后选编辑，在Hardware中添加Audio playback support，最后启动模拟器就行了。别忘了在模拟器的sdcard建立如下目录audio\notifications和audio\ringtones，把声音文件放进去，怎么copy到sdcard image里？adb push audio /sdcard/audio 不知道这个意思的去面壁修炼吧。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/420.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网站被主机商的 关键词过滤系统 挡住的解决办法，站长秘籍 之 万恶的关键词</title>
		<link>http://www.himagic.net/index.php/archives/418.html</link>
		<comments>http://www.himagic.net/index.php/archives/418.html#comments</comments>
		<pubDate>Fri, 30 Mar 2012 16:10:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=418</guid>
		<description><![CDATA[如果你的网站有留言功能，你是否遇到过网页只显示“您浏览的页面或提交的数据包含敏感关键词信息,该关键词已经被过滤”的问题。Magic哥曾经遇到过一次，因为垃圾留言里有诸如手机监听之类的坏词，导致无法进入后台的留言管理界面，结果是用代码操作数据库解决的。最近又遇到一次，所需浏览的网页是Magic哥管理网站用的，可以展示搜索引擎接入时的关键词，结果又杯具了，网页一直显示上面写的那句话，值当的吗？我们又不是专门做坏网站的。这回决定解决一下，方法如下。 因为网页是PHP写的，关键词是PHP直接输出的，所以被主机的过滤系统抓到了。如果用Ajax请求，经过PHP的UTF8编码，估计主机的关键词系统会犯傻，但懒得改程序架构了，索性搬出HTML Entity大法。原PHP中是用htmlspecialchars编码输出字符的，这回改成mb_convert_encoding ($str, "HTML-ENTITIES", "UTF-8")的方式，的确是绕过了关键词过滤系统，这个法子应该够用上一阵子了。如果网页没有Javacsript掺和，可以用下面的方法，会把页面中所有能转换的字符都转了，不过切记，有Javascript时，极有可能造成不该转的字符也被转了，所以慎用。 mb_internal_encoding("UTF8"); mb_http_output("HTML-ENTITIES"); ob_start('mb_output_handler');]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/418.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Node.js Javascript的又一春，入门手册 初学者必看</title>
		<link>http://www.himagic.net/index.php/archives/417.html</link>
		<comments>http://www.himagic.net/index.php/archives/417.html#comments</comments>
		<pubDate>Thu, 22 Mar 2012 16:06:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nodejs]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=417</guid>
		<description><![CDATA[Node.js越来越流行了，事件处理机制是其根本特色，这样的设计在Chrome插件中也随处可见，很多App Engine也在跃跃欲试的提供Node.js的支持。 Magic哥看好Node.js有这样几点，原生于Linux，比Windows的CScript.exe应用范围要广；部署简单，在不需要额外module时，一个exe就解决问题了；脚本文件，修改、调试比较简单；使用Javascript，门槛低、使用人群广。 如果你有Javascript基础，尤其是如果你对jQuery很熟悉，那么一天就可以掌握Node.js了，之所以提jQuery是因为闭包、匿名函数在Node.js中大行其道。 接下来介绍一下初学者如何学习Node.js。 首先，下载Node.exe，网址在这里，http://nodejs.org/#download 安装后记得在环境变量Path里加入node.exe所在路径，方便以后调试。 然后，下载Editplus，这是Magic哥最喜欢的脚本IDE，对语法高亮的同时，可以集成运行环境，比如新建一个User Tool，命令行是node.exe，参数是$(FileName)，并勾选捕获窗口输出选项，这样通过快捷键就可以在Editplus里面看到运行结果了。 最后，记住这个网址，http://nodejs.org/docs/latest/api/ 手册写的还是不错的，花一天时间从头到尾看一遍，知道Node.js能做什么就可以了。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/417.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android SDK升级到revision15后遇到的问题</title>
		<link>http://www.himagic.net/index.php/archives/416.html</link>
		<comments>http://www.himagic.net/index.php/archives/416.html#comments</comments>
		<pubDate>Sun, 18 Mar 2012 15:24:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=416</guid>
		<description><![CDATA[最近工作需要评估一个Android解决方案，于是把尘封的教程又搬出来了，就在开始做实验的时候手欠把SDK升级了，结果惹来一番麻烦，希望这篇文章对遇到同样问题的朋友有所帮助。 用android编译Debug版时，报Debug Certificate expired错误，开始以为是没生成release版证书的原因，就先翻出之前写的教程，用keytool生成了一个，但发现新版SDK中配置key的地方从build.properties改到了ant.properties，完成后还是报错，看来是对很久没有学Android的惩戒，Google后知道，需要删除%USERPROFILE%\.android\debug.keystore，之后就可以了。 编译通过了，但安装APK到模拟器时又出事了，报ADB不是可执行程序，去Tools目录下一翻，果然没找到adb.exe，但看到了“adb_has_moved.txt”，其中说明了adb.exe已经被搬到了“platform-tools”，于是在系统path变量里加入了这个目录，之后就可以顺利安装APK了，新版的APK在模拟器里的图标已经有所变化了。 不知这些改动的必要性有多大，至少感觉SDK的不兼容是挺随意造成的，不知道是不是Google刻意如此。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/416.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome浏览器扩展Extension开发技巧，文件影响的范围</title>
		<link>http://www.himagic.net/index.php/archives/415.html</link>
		<comments>http://www.himagic.net/index.php/archives/415.html#comments</comments>
		<pubDate>Thu, 15 Mar 2012 15:19:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>

		<guid isPermaLink="false">http://www.himagic.net/?p=415</guid>
		<description><![CDATA[常见的Chrome扩展包括了定义文件(manifest.json)，后台文件和弹出菜单，在调试自己开发的扩展时，初学者往往会遇到新修改的代码不起作用的问题，或者每次调试都需要重新加载扩展的麻烦。Magic哥也遇到过类似的问题，希望下面的经验能够节省入门者的时间。 定义文件是在Chrome启动时，或者导入扩展时读取的，之后不再读取，所以修改定义文件后需要删除、加载扩展，或者重启Chrome. 后台文件在扩展启用后即被调用，之后不再重新调用，所以修改后台文件至少需要Disable/Enable扩展。 弹出菜单是在每次显示时调用，如果想看到新修改的内容，只需重新弹出菜单即可。]]></description>
		<wfw:commentRss>http://www.himagic.net/index.php/archives/415.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

