<?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>FalconIA&#039;s BLOG &#187; 技术杂烩</title>
	<atom:link href="https://falconia.org/blog/archives/category/technology/feed" rel="self" type="application/rss+xml" />
	<link>https://falconia.org/blog</link>
	<description>FalconIA&#039;s Lazy Blog</description>
	<lastBuildDate>Tue, 02 Dec 2014 01:45:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Turn airplane mode on/off via ADB</title>
		<link>https://falconia.org/blog/archives/468</link>
		<comments>https://falconia.org/blog/archives/468#comments</comments>
		<pubDate>Tue, 02 Dec 2014 01:03:21 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[技术杂烩]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=468</guid>
		<description><![CDATA[Method 1 (4.2 or higher): settings put global airplane_mode_on 1 am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true settings put global airplane_mode_on 0 am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true Method 2: adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS adb shell input keyevent 19 adb shell input keyevent 23 adb shell input keyevent 4 Method 3: sqlite3 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Method 1 (4.2 or higher):<br />
<code>settings put global airplane_mode_on 1<br />
am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true</code><br />
<code>settings put global airplane_mode_on 0<br />
am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true</code></p>
<p>Method 2:<br />
<code>adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS<br />
adb shell input keyevent 19<br />
adb shell input keyevent 23<br />
adb shell input keyevent 4</code></p>
<p>Method 3:<br />
<code>sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value='1' where name='airplane_mode_on';"</code></p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/468/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimize iptables reject rules</title>
		<link>https://falconia.org/blog/archives/464</link>
		<comments>https://falconia.org/blog/archives/464#comments</comments>
		<pubDate>Mon, 01 Dec 2014 09:42:09 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[技术杂烩]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=464</guid>
		<description><![CDATA[We always use this rule to notice a interloper that the service was prohibited. -A INPUT -j REJECT --reject-with icmp-host-prohibited But, I think it's better to disguise the rejection as no service, rather than notice a interloper there was a service you cannot reache. -A INPUT -p tcp -j REJECT --reject-with tcp-reset -A INPUT -p [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We always use this rule to notice a interloper that the service was prohibited.<br />
<code>-A INPUT -j REJECT --reject-with icmp-host-prohibited</code><br />
But, I think it's better to disguise the rejection as no service, rather than notice a interloper there was a service you cannot reache.<br />
<code>-A INPUT -p tcp -j REJECT --reject-with tcp-reset<br />
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable<br />
-A INPUT -j REJECT --reject-with icmp-host-prohibited</code></p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/464/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to modify SystemUI.apk to remove volume soft keys in system bar</title>
		<link>https://falconia.org/blog/archives/449</link>
		<comments>https://falconia.org/blog/archives/449#comments</comments>
		<pubDate>Tue, 28 Jan 2014 02:58:29 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[程序相关]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=449</guid>
		<description><![CDATA[Environment: Android with root access. Windows with drivers for Android device. Java(JRE) installed. Prepare: apktool.jar (http://code.google.com/p/android-apktool/downloads/list) adb.exe (android-sdk\platform-tools) notepad++ or similar text editor which supported UTF-8 without BOM, not notepad or wordpad. Steps: 1. Pull SystemUI.apk from your device. CMD&#62;adb pull /system/app/SystemUI.apk . 2. Extract res in apk. CMD&#62;apktool d -b -s SystemUI.apk 3. Edit [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Environment:</strong><br />
Android with root access.<br />
Windows with drivers for Android device.<br />
Java(JRE) installed.</p>
<p><strong>Prepare:</strong><br />
apktool.jar (<a href="http://code.google.com/p/android-apktool/downloads/list">http://code.google.com/p/android-apktool/downloads/list</a>)<br />
adb.exe (android-sdk\platform-tools)<br />
notepad++ or similar text editor which supported UTF-8 without BOM, not notepad or wordpad.</p>
<p><span id="more-449"></span><br />
<strong>Steps:</strong><br />
1. Pull SystemUI.apk from your device.<br />
<code>CMD&gt;adb pull /system/app/SystemUI.apk .</code></p>
<p>2. Extract res in apk.<br />
<code>CMD&gt;apktool d -b -s SystemUI.apk</code></p>
<p>3. Edit the XML file in 'SystemUI/res/layout/system_bar.xml'.<br />
You can find several KeyButtonView like:<br />
<code>&lt;com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/volume_down" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_volume_down" systemui:keyCode="25" systemui:glowBackground="@drawable/ic_sysbar_highlight" /&gt;</code><br />
Change 'android:layout_width="@dimen/navigation_key_width"' to 'android:layout_width="0.0dp"' in the KeyButtonView which you want to hide.</p>
<p>4. Combine edited apk.<br />
<code>CMD&gt;apktool b SystemUI</code><br />
Now get new dictionary 'build' under SystemUI.</p>
<p>5. Open SystemUI.apk using 7-Zip/WinRar/WinZip.<br />
Extract 'META-INF' and 'AndroidManifest.xml' in apk to path 'SystemUI/build/apk'</p>
<p>4. Recombine apk as step 4.<br />
<code>CMD&gt;apktool b SystemUI</code><br />
Now you can get a new apk under 'SystemUI\dist'.</p>
<p>5. Make '/system' writable in your device.<br />
<code>CMD&gt;adb shell</code><br />
<code>root@android:/ # busybox mount -o remount,rw /system<br />
root@android:/ # exit</code></p>
<p>6. Push new apk to your device.<br />
<code>CMD&gt;adb push SystemUI\dist\SystemUI.apk /system/app/SystemUI.apk</code></p>
<p>7. Reboot you Android device by hand,<br />
or use command.<br />
<code>CMD&gt;adb reboot</code></p>
<p>8. Congratulation!</p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/449/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Quoted] VNC from boot on Ubuntu 12.04 without logging in, using LightDM and x11vnc</title>
		<link>https://falconia.org/blog/archives/435</link>
		<comments>https://falconia.org/blog/archives/435#comments</comments>
		<pubDate>Sat, 02 Mar 2013 07:26:37 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[系统相关]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=435</guid>
		<description><![CDATA[Quoted: http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/ Instructions LightDM apparently supports a VNC server out of the box; however, it’s designed to work with tightvncserver (or similar) which create separate X sessions (the 2nd lot of VNC servers I mentioned above) so not quite what we’re after1. Ubuntu derivatives use Upstart (upstart.ubuntu.com) to manage startup processes - LightDM (and GDM!) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Quoted:</strong> <a href="http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/">http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/</a></p>
<h2>Instructions</h2>
<p>LightDM apparently supports a VNC server out of the box; however, it’s designed to work with tightvncserver (or similar) which create separate X sessions (the 2nd lot of VNC servers I mentioned above) so not quite what we’re after1.<br />
Ubuntu derivatives use Upstart (upstart.ubuntu.com) to manage startup processes - LightDM (and GDM!) creates a login-session-start event when the display manager is up (i.e. when X is all loaded, but before you’ve logged in) so we’ll create an upstart job that listens for that, and starts a VNC server on the existing X session, allowing connections before login.<br />
<span id="more-435"></span></p>
<h2>Step 1</h2>
<p> – we want the VNC server to have a password, just in case – the VNC port shouldn’t really be exposed to the outside world – it’s easy to wrap it in an SSH connection to encrypt everything for you (see here for a good explanation of how to set that up).<br />
<code>$ sudo x11vnc -storepasswd /etc/x11vnc.pass</code><br />
This will prompt you for a password to (lightly) secure your VNC server.</p>
<h2>Step 2a</h2>
<p> (for LightDM – XUbuntu, and all Ubuntu variants 12.04 onwards) – create the upstart job. Put this in /etc/init/x11vnc.conf :<br />
<code>start on login-session-start<br />
script<br />
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log<br />
end script</code><br />
Note: if you’d like this to work with GDM instead, you’ll need to find where GDM puts its MIT-MAGIC-COOKIE – I believe it’s <var>/var/run/gdm/auth...</var> or something similar, although I haven’t got a box to test it on</p>
<h2>Step 2b</h2>
<p> (for lxdm – LUbuntu) – LXDM doesn’t seem to emit the right event, but instead is has /etc/lxdm/LoginReady which lets you specify pre-login events. However, we need to first get the xauth setup properly. Edit <var>/etc/lxdm/lxdm.conf</var> and uncomment the line:<br />
<code>xauth_path=/tmp</code><br />
This specifies that we’re going to use a different xauth path; we also need to update the /etc/lxdm/LoginReady file with our x11 command, using the updated xauth path.<br />
Put this in <var>/etc/lxdm/LoginReady</var>:<br />
<code>/usr/bin/x11vnc -xkb -auth /tmp/.Xauth1000 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log</code></p>
<h2>Step 2c</h2>
<p> (for mdm – Mint LMDE)<br />
Mint LMDE (Debian edition) doesn’t use the upstart things; instead, put this at the end of <var>/etc/mdm/Init/Default</var>:<br />
<code>/usr/bin/x11vnc -xkb -auth /var/lib/mdm/:0.Xauth -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log</code><br />
Note that this uses the auth path for mdm which is <var>/var/lib/mdm/:0.Xauth</var></p>
<h2>Step 3</h2>
<p> – Done!<br />
Reboot! That’s all there is to it – hopefully, you’ll now have a shared VNC server which connects to your main desktop X session, running on port 5900 using the password you gave, all started automatically as soon as LightDM asks you to login. Hooray!<br />
1. If you’d like to have a separated VNC server running too you can – make sure you have tightvncserver installed (or similar) and then put<br />
<code>[VNCServer]<br />
enabled=true<br />
port=5901 # I've used port 5901 so it doesn't interfere with the setup from above</code><br />
in your <var>/etc/lightdm/lightdm.conf</var> then reboot – should have a separate X session available for VNC’ing into.</p>
<p><strong>Quoted:</strong> <a href="http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/">http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/</a></p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/435/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to fix android exception of Sherlock: unable to pause activity</title>
		<link>https://falconia.org/blog/archives/429</link>
		<comments>https://falconia.org/blog/archives/429#comments</comments>
		<pubDate>Sun, 25 Nov 2012 17:08:55 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[程序相关]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[sherlock]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=429</guid>
		<description><![CDATA[How to fix android exception of Sherlock: unable to pause activity Replace the android-support-v4.jar in the libs folder with the latest one from the SDK Manager.]]></description>
				<content:encoded><![CDATA[<p>How to fix android exception of Sherlock: unable to pause activity</p>
<p>Replace the android-support-v4.jar in the libs folder with the latest one from the SDK Manager.</p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/429/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable numlock on in LightDM</title>
		<link>https://falconia.org/blog/archives/403</link>
		<comments>https://falconia.org/blog/archives/403#comments</comments>
		<pubDate>Wed, 08 Feb 2012 08:01:42 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[系统相关]]></category>
		<category><![CDATA[lightdm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=403</guid>
		<description><![CDATA[$ sudo apt-get install numlockx $ sudo gedit /etc/lightdm/lightdm.conf add this line at he end greeter-setup-script=/usr/bin/numlockx on]]></description>
				<content:encoded><![CDATA[<p><code>$ sudo apt-get install numlockx<br />
$ sudo gedit /etc/lightdm/lightdm.conf</code><br />
add this line at he end<br />
<code>greeter-setup-script=/usr/bin/numlockx on</code></p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/403/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 get exFat support.</title>
		<link>https://falconia.org/blog/archives/395</link>
		<comments>https://falconia.org/blog/archives/395#comments</comments>
		<pubDate>Mon, 16 Jan 2012 13:03:05 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[系统相关]]></category>
		<category><![CDATA[exfat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=395</guid>
		<description><![CDATA[Get exFat support for Ubuntu 10.04 LTS. Get fuse-exfat $ sudo add-apt-reprository ppa:relan/exfat $ sudo apt-get update $ sudo apt-get install fuse-exfat Create mount point. $ sudo mkdir /media/Data Manually mount: $ sudo mount -t exfat-fuse /dev/sda6 /media/Data umount: $ sudo umount /media/Data Automatically mount (by edit fstab): $ sudo gedit /etc/fstab add new line [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Get exFat support for Ubuntu 10.04 LTS.</p>
<p>Get fuse-exfat<br />
<code>$ sudo add-apt-reprository ppa:relan/exfat<br />
$ sudo apt-get update<br />
$ sudo apt-get install fuse-exfat</code></p>
<p>Create mount point.<br />
<code>$ sudo mkdir /media/Data</code></p>
<p><strong>Manually mount:</strong><br />
<code>$ sudo mount -t exfat-fuse /dev/sda6 /media/Data</code><br />
umount:<br />
<code>$ sudo umount /media/Data</code></p>
<p><strong>Automatically mount (by edit fstab):</strong><br />
<code>$ sudo gedit /etc/fstab</code><br />
add new line<br />
<code>/dev/sda6       /media/Data  exfat-fuse defaults            0       0</code><br />
save and restart.</p>
<p>*1 '/dev/sda6' is Device ID, could be '/dev/sdXX', such as '/dev/sdb1', please check in Disk Utility.<br />
*2 Someone says, update util-linux-ng 2.17 to 2.18, ubuntu will identify exfat automatically, but still need fuse-exfat. (actually not test)</p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/395/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用Firefox解除国内（大陆）视频网站IP限制</title>
		<link>https://falconia.org/blog/archives/348</link>
		<comments>https://falconia.org/blog/archives/348#comments</comments>
		<pubDate>Mon, 09 Jan 2012 08:02:00 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[技术杂烩]]></category>
		<category><![CDATA[IP限制]]></category>
		<category><![CDATA[优酷]]></category>
		<category><![CDATA[土豆]]></category>
		<category><![CDATA[看看]]></category>
		<category><![CDATA[迅雷]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=348</guid>
		<description><![CDATA[大陆视频网站土豆（tudou.com）、优酷（youku.com）、迅雷看看（kankan.xunlei.com）对部分视频做了IP限制。 下面使用Firefox的FoxyProxy插件欺骗IP检测。 优点是：只用代理欺骗IP检测页，不会因为免费代理速度过慢影响网页浏览及视频播放。 首先使用Firefox 安装FoxyProxy Standard，点我 重启Firefox 打开FoxyProxy的Options ①添加代理，点击图1-①：Add New Proxy ②设置代理 设置代理名称如：China IP limit bypass 关掉第三项：remote DNS lookups 设置大陆境内代理，如：203.91.120.143:80（请选择适合的可用代理，获取代理点我） 添加三条URL Patterns： 土豆：*v2.tudou.com/v?* 看看：*ip.kankan.xunlei.com/* 优酷：*v.youku.com/player/getPlayList/* ③选择模式（图1-③）为第一个：Use proxies based on ... 关掉FoxyProxy设置，重新刷新视频网站即可突破视频限制]]></description>
				<content:encoded><![CDATA[<p>大陆视频网站土豆（tudou.com）、优酷（youku.com）、迅雷看看（kankan.xunlei.com）对部分视频做了IP限制。</p>
<p>下面使用<strong>Firefox</strong>的FoxyProxy插件欺骗IP检测。<br />
优点是：只用代理欺骗IP检测页，不会因为免费代理速度过慢影响网页浏览及视频播放。</p>
<p><span id="more-348"></span></p>
<p>首先使用Firefox<br />
安装FoxyProxy Standard，<a title="Download FoxyProxy Standard" href="https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/" target="_blank">点我</a><br />
重启Firefox</p>
<p>打开FoxyProxy的Options<br />
<div id="attachment_359" style="width: 702px" class="wp-caption alignnone"><a href="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy1.jpg"><img src="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy1.jpg" alt="China IP limit bypass setup 1" title="China IP limit bypass setup 1" width="692" height="473" class="size-full wp-image-359" /></a><p class="wp-caption-text">China IP limit bypass setup 1</p></div></p>
<p><strong>①添加代理</strong>，点击图1-①：Add New Proxy</p>
<p><strong>②设置代理</strong><br />
<a href="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy2.jpg"><img src="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy2.jpg" alt="China IP limit bypass setup" title="IpLimitBypass2" width="454" height="264" class="alignnone size-full wp-image-361" /></a><br />
设置代理名称如：China IP limit bypass<br />
关掉第三项：remote DNS lookups<br />
<a href="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy3.jpg"><img src="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy3.jpg" alt="China IP limit bypass setup" title="IpLimitBypass3" width="643" height="204" class="alignnone size-full wp-image-362" /></a><br />
设置大陆境内代理，如：<em><del>203.91.120.143:80</del></em>（<strong>请选择适合的可用代理</strong>，获取代理<a href="http://www.sooip.cn/guoneidaili/" target="_blank"><strong>点我</strong></a>）<br />
<a href="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy4.jpg"><img src="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy4.jpg" alt="China IP limit bypass setup" title="IpLimitBypass4" width="665" height="299" class="alignnone size-full wp-image-363" /></a><br />
添加三条URL Patterns：<br />
<a href="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy5.jpg"><img src="http://falconia.org/blog/wp-content/uploads/2012/01/Proxy5.jpg" alt="China IP limit bypass setup" title="IpLimitBypass5" width="490" height="315" class="alignnone size-full wp-image-364" /></a><br />
<code>土豆：*v2.tudou.com/v?*<br />
看看：*ip.kankan.xunlei.com/*<br />
优酷：*v.youku.com/player/getPlayList/*</code></p>
<p><strong>③选择模式</strong>（图1-③）为第一个：Use proxies based on ...<br />
关掉FoxyProxy设置，重新刷新视频网站即可突破视频限制</p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/348/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>[转载]JAVA实现汉字转拼音缩写&#8211;类的静态方法</title>
		<link>https://falconia.org/blog/archives/197</link>
		<comments>https://falconia.org/blog/archives/197#comments</comments>
		<pubDate>Sat, 23 Apr 2011 23:39:44 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[程序相关]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://falconia.org/blog/?p=197</guid>
		<description><![CDATA[作　者：summerxzg 转载自：http://blog.csdn.net/summerxzg/archive/2009/05/06/4153961.aspx]]></description>
				<content:encoded><![CDATA[<p>作　者：summerxzg<br />
转载自：<a href="http://blog.csdn.net/summerxzg/archive/2009/05/06/4153961.aspx">http://blog.csdn.net/summerxzg/archive/2009/05/06/4153961.aspx</a></p>
<pre class="brush: java; title: ; notranslate">
public class aaaaaaa {
/**
     * 汉字转拼音缩写
     * @param str   //要转换的汉字字符串
     * @return String   //拼音缩写
     */
     public static String getPYString(String str)
     {
             String tempStr = &quot;&quot;;
             for(int i=0; i&lt;str.length(); i++) {
                     char c = str.charAt(i);
                     if((int)c &gt;= 33 &amp;&amp; (int)c &lt;=126) {//字母和符号原样保留
                             tempStr += String.valueOf(c);
                     }
                     else {//累加拼音声母
                             tempStr += getPYChar( String.valueOf(c) );
                     }
             }
             return tempStr;
     }
     /**
     * 取单个字符的拼音声母
     * @param c   //要转换的单个汉字
     * @return String 拼音声母
     */
     public static String getPYChar(String c)
     {
             byte[] array = new byte[2];
             array = String.valueOf(c).getBytes();
             int i = (short)(array[0] - '&#92;&#48;' + 256) * 256 + ((short)(array[1] - '&#92;&#48;' + 256));
             if ( i &lt; 0xB0A1) return &quot;*&quot;;
             if ( i &lt; 0xB0C5) return &quot;a&quot;;
             if ( i &lt; 0xB2C1) return &quot;b&quot;;
             if ( i &lt; 0xB4EE) return &quot;c&quot;;
             if ( i &lt; 0xB6EA) return &quot;d&quot;;
             if ( i &lt; 0xB7A2) return &quot;e&quot;;
             if ( i &lt; 0xB8C1) return &quot;f&quot;;
             if ( i &lt; 0xB9FE) return &quot;g&quot;;
             if ( i &lt; 0xBBF7) return &quot;h&quot;;
             if ( i &lt; 0xBFA6) return &quot;j&quot;;
             if ( i &lt; 0xC0AC) return &quot;k&quot;;
             if ( i &lt; 0xC2E8) return &quot;l&quot;;
             if ( i &lt; 0xC4C3) return &quot;m&quot;;
             if ( i &lt; 0xC5B6) return &quot;n&quot;;
             if ( i &lt; 0xC5BE) return &quot;o&quot;;
             if ( i &lt; 0xC6DA) return &quot;p&quot;;
             if ( i &lt; 0xC8BB) return &quot;q&quot;;
             if ( i &lt; 0xC8F6) return &quot;r&quot;;
             if ( i &lt; 0xCBFA) return &quot;s&quot;;
             if ( i &lt; 0xCDDA) return &quot;t&quot;;
             if ( i &lt; 0xCEF4) return &quot;w&quot;;
             if ( i &lt; 0xD1B9) return &quot;x&quot;;
             if ( i &lt; 0xD4D1) return &quot;y&quot;;
             if ( i &lt; 0xD7FA) return &quot;z&quot;;
             return &quot;*&quot;;
     }
    
     public static void main(String []g){
     System.out.println(getPYString(&quot;中国，,;$#@&amp;avc&quot;));
     }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/197/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>偶尔玩玩Blue-Ray</title>
		<link>https://falconia.org/blog/archives/44</link>
		<comments>https://falconia.org/blog/archives/44#comments</comments>
		<pubDate>Fri, 29 Feb 2008 07:38:57 +0000</pubDate>
		<dc:creator><![CDATA[FalconIA]]></dc:creator>
				<category><![CDATA[压制相关]]></category>

		<guid isPermaLink="false">http://falconia.no-ip.org/blog/?p=44</guid>
		<description><![CDATA[戦闘妖精雪風 工具准备: DGAVCDec 1.0.0 Alpha 18 (http://neuron2.net/dgavcdec/dgavcdec.html) tsMuxeR 1.3.6 Beta (http://www.smlabs.net/tsmuxer_en.html) TsRemux v.0.0.20 (http://forum.doom9.org/showthread.php?t=125447) BD edit v0.13b (http://pel.hu/down/) HD SUP v0.51b3 (http://pel.hu/down/) suprip 0.93 (http://x0r.ch/suprip/) MeGUI 0.2.6.1044 (http://sourceforge.net/projects/megui) 特别注意: 本文在尽量减少损失的情况提倡简化步骤 喜欢精雕细琢或者按部就班的朋友可以就此打住... Step 1: 解压RAR到RAID里(好慢...orz) 用Alochol载入 Step 2: 打开BDedit 选取Y:&#92;BDMV&#92; Read 得到Main Movie 0004为 AVC 1080i, 29.97, 16:9 TureHD x 2 (jpn, eng) PGS x 2 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>戦闘妖精雪風</p>
<pre class="brush: plain; title: ; notranslate">
Name                                               CRC32     Bytes
----------------------------------------------  --------  --------------
[アニメ BDISO] 戦闘妖精雪風 Blu-Ray BOX DISC1.rar  02244B0B  32,221,934,937
[アニメ BDISO] 戦闘妖精雪風 Blu-Ray BOX DISC2.rar  730144F0  23,146,760,589
[アニメ BDISO] 戦闘妖精雪風 Blu-Ray BOX DISC3.rar  1840A910   8,615,680,365
------------------------------------------------------------------------
Total  3 Files  63,984,375,891 Bytes
</pre>
<pre class="brush: plain; title: ; notranslate">
Vista Ultimate&amp;DaemonToolos Lite(4.12.0)&amp;PowerDVDにて動作確認済み
1080iでDAR4:3なのですごく損した感があります???
</pre>
<pre class="brush: plain; title: ; notranslate">
rr入れてませんでした、スミマセン

エンコードもしようと思ったのですが、シークするとC++ RUntime Errorで落ちるわ（ブルレイがらみだけ）
LPCM音声でなぜかwavに変換できないのがあるわ、やらで結局挫折しました。

エンコがほしい方は、他の方がエンコするのをお待ち下さい
</pre>
<p><b>工具准备:</b><br />
DGAVCDec 1.0.0 Alpha 18 (http://neuron2.net/dgavcdec/dgavcdec.html)<br />
tsMuxeR 1.3.6 Beta (http://www.smlabs.net/tsmuxer_en.html)<br />
TsRemux v.0.0.20 (http://forum.doom9.org/showthread.php?t=125447)<br />
BD edit v0.13b (http://pel.hu/down/)<br />
HD SUP v0.51b3 (http://pel.hu/down/)<br />
suprip 0.93 (http://x0r.ch/suprip/)<br />
MeGUI 0.2.6.1044 (http://sourceforge.net/projects/megui)</p>
<p><b>特别注意:</b><br />
本文在尽量<b>减少损失</b>的情况提倡<b>简化步骤</b><br />
喜欢精雕细琢或者按部就班的朋友可以就此打住...<br />
<span id="more-44"></span></p>
<hr/>
<p><b>Step 1:</b><br />
解压RAR到RAID里(好慢...orz) 用Alochol载入</p>
<hr/>
<p><b>Step 2:</b><br />
打开BDedit 选取Y:&#92;BDMV&#92; Read<br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204259584_757860f5.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204259584_757860f5.jpg" class="insertimage"  border="0"   /></a><br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204259584_7353b33f.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204259584_7353b33f.jpg" class="insertimage"  border="0"   /></a><br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204259584_9143f5d7.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204259584_9143f5d7.jpg" class="insertimage"  border="0"   /></a><br />
得到Main Movie 0004为<br />
AVC 1080i, 29.97, 16:9<br />
TureHD x 2 (jpn, eng)<br />
PGS x 2 (jpn, eng)</p>
<hr/>
<p><b>Step 3:</b><br />
把Y:&#92;BDMV&#92;STREAM&#92;00004.m2ts拖入DGAVCIndex<br />
(根据某风测试 DGA对m2ts的支持并不是十分完美，需要用tsRemux or tsMuxeR提取h264 stream)<br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204260997_59435853.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204260997_59435853.jpg" class="insertimage"  border="0"   /></a><br />
因为是1080i 所以Field选Honor 反之选Ignore<br />
然后Save Project (慢...</p>
<p>注意:<br />
<code>Colorimetry - Displays the colorimetry scheme used by the stream. Note that if the stream does not declare the colorimetry, then ITU-R BT.709* is reported for HD video, and ITU-R BT.470-2* is reported for SD video. The * character indicates that the stream did not declare the colorimetry. The actual value read from the stream is shown in brackets.</code></p>
<hr/>
<p><b>Step 4:</b><br />
书写avs</p>
<pre class="brush: avisynth; title: ; notranslate">
AVCSource(&quot;DISC1.dga&quot;)
</pre>
<p>扔进MeGUI的AviSynth script creator (偷懒的法宝...<br />
因为现在的版本还不支持dga所以先用avs代替<br />
既然是偷懒 当然要用Auto Crop 然后检查Crop是否正确<br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204315055_515432cc.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204315055_515432cc.jpg" class="insertimage"  border="0"   /></a><br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204314683_73170ad7.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204314683_73170ad7.jpg" class="insertimage"  border="0"   /></a><br />
<del>此时Crop为248, 8, -248, 0 结果为1424 x 1072 刚好mod16<br />
由于编码速度(mod16)、avs复杂程度、画面损失等一系列原因就不进行Resize了</del><br />
<span style="color: #4169E1;">(update: March 1st 2008)<br />
一时没注意下面也有黑边...(屏幕不够大啊<br />
去掉不清楚的边缘部分Crop为252, 12, -252, -12 结果为1416 x 1056 刚好(mod8, mod32)<br />
犹豫了下最后修改为crop(256, 12, -256, -12) 结果为1408 x 1056 (mod128, mod32) DAR刚好4:3<br />
此时就犹豫要不要Resize了 想想Resize后就没法保持DAR精确4:3和mod>=16了 就放弃了</span><br />
本来想继续偷懒进行Deinterlacing Analyse...结果其速度...orz<br />
测试了下TIVTC hybrid=1 结果比较理想<br />
修改MeGUI生成的avs</p>
<pre class="brush: avisynth; title: ; notranslate">
DirectShowSource(&quot;Z:&amp;#92;Compress&amp;#92;YUKIKAZE&amp;#92;DISC1.avs&quot;,fps=29.9700898503294,audio=false)
tfm(order=1).tdecimate(mode=1,hybrid=1)
crop( 256, 12, -256, -12)

#resize
FluxSmoothST(7,7) # Medium Noise
</pre>
<p>为</p>
<pre class="brush: avisynth; title: ; notranslate">AVCSource(&quot;DISC1.dga&quot;)
tfm(order=1).tdecimate(mode=1,hybrid=1)
crop( 256, 12, -256, -12)

#resize
FluxSmoothST(7,7) # Medium Noise
</pre>
<hr/>
<p><b>Step 5:</b><br />
x264设置 (非CPU极度强劲者量力而为...<br />
<del>
<pre class="brush: bash; title: ; notranslate">--crf 18.0 --ref 5 --mixed-refs --no-fast-pskip --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter -1,-1 --subme 7 --trellis 2 --analyse all&amp;nbsp;&amp;nbsp;--8x8dct --me esa --merange 64 --threads auto --thread-input --progress --no-psnr --no-ssim --output &quot;output&quot; &quot;input&quot;</pre>
<p></del><br />
<span style="color: #4169E1;">(update: March 1st 2008)</span><br />
<strong>压HD的话建议今后都维持在level4.1上</strong></p>
<pre class="brush: bash; title: ; notranslate">--crf 18.0 --level 4.1 --ref 5 --mixed-refs --no-fast-pskip --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-maxrate 25000 --me esa --merange 64 --threads auto --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output &quot;output&quot; &quot;input&quot;</pre>
<p>根据qyqgpower的建议小修改了下参数<br />
<a href="/blog/wp-content/uploads/2009-bo/attachment/1204329127_51364dc0.jpg" target="_blank"><img src="/blog/wp-content/uploads/2009-bo/attachment/1204329127_51364dc0.jpg" class="insertimage"  border="0"   /></a><br />
orz......</p>
<p>Here is my Platform:<br />
<a href="http://falconia.org/webs/cpuz@20080123.htm" target="_blank">FalconIA&#39;s CPU-Z Report @ 2008-01-23</a><br />
<a href="http://falconia.org/webs/EVEREST_Cache_Memory_Benchmark@20080123.png" target="_blank">FalconIA&#39;s EVEREST Cache &#038; Memory Benchmark @ 2008-01-23</a><br />
<a href="http://falconia.org/webs/EVEREST_Disk_Benchmark_of_RAID0@20080123.png" target="_blank">FalconIA&#39;s EVEREST Disk Benchmark of RAID0 @ 2008-01-23</a><br />
<a href="http://falconia.org/webs/EVEREST_Ultimate_Edition_Hardware-related_Report@20080123.htm" target="_blank">FalconIA&#39;s EVEREST Ultimate Edition Hardware-related Report @ 2008-01-23</a></p>
<hr/>
<p>转载请注明:<br />
Author: FalconIA<br />
Source-ink: http://falconia.org/blog/post/44/</p>
]]></content:encoded>
			<wfw:commentRss>https://falconia.org/blog/archives/44/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
