2016年3月29日星期二

Facebook Android SDK Tips Part 1: LikeView Bugs and Fixes

Official Reference: LikeView Reference

BUG #1: The developers or testers cannot access the Like Page

1. Check the internet connection.
2. Check if the page is allowed to be liked.
3. Check the account of developers or testers have the permission of developer or tester under the APP ID.
4. Check Facebook App support before initialize LikeView, and DO NOT just check the installation of Facebook App. For some lower version of Facebook App, things may not work properly. Using SDK for checking as following:
 
    if (Build.VERSION.SDK_INT >= 15) {
        if (LikeDialog.canShowNativeDialog() || LikeDialog.canShowWebFallback()) {
        }
    }

BUG #2: Crash when initializing

1. DO NOT initialize LikeView in your layout.xml as the Official guide recommended, which is unsafe for API level < 15. ( min version for FB SDK 4.10 ) All of the FB SDK method should be used after API level judgement.
2. If you only want to open LikeDialog in Facebook App and only use `LikeDialog.canShowNativeDialog()` for judgement, LikeDialog may fail to open after swipe all the data of Facebook App. I recommend to use web dialog just in case.

BUG #3: Crash in onActivityResult() 

Stack overflow give a way to get the like result in onActivityResult() method. But it should add a `data != null` judgment, otherwise app will crash when not data returns.

BUG #4: Native Like Button permission

App Review should be done to get Native Like Button permission. Otherwise, only developers and test users can access like button.

2013年11月3日星期日

Word Sieve 1.0 ready to release!

Amazing word cloud on both iPad and iPhone! Just set up a cloud with a URL or TEXT.
- Press the adding button to add multiple web pages.
- Tag the word cloud you get and change its color!
- Slide the word cloud to see other styles!
- save the cloud or send it to your friends in email!

FEATURES:
1. Support more than 15 kinds of languages, including Chinese, Japanese etc.
2. 3 kinds of cloud style.
3. 4 kinds of colors






2012年1月4日星期三

GO桌面(GO launcher EX)完美卸载方法


环境:ME722 ANDROID 2.2.2

GO桌面管理器,即GO LAUNCHER EX安装成功后难以卸载。强行卸载后会导致原有桌面损坏,造成黑屏。

其实GO留给了大家一条安全卸载方法,只是比较隐晦罢了。。。。。

方法:
1.桌面设置>退出GO LAUNCHER EX,没问题的话,这条藏在最下面。
2.这时桌面会显示成原有桌面的样子,不要点小房子键(home键),直接进入卸载软件,我的是安卓优化大师。
3.卸载GO LAUNCHER EX
4.安小房子键(home键)若直接退回原有桌面,则卸载成功

2011年10月25日星期二

linux下浏览器backspace后退键使能

firefox版:
现在在用的fedora默认firefox,安chrome还会说可能存在各种隐患。。。先说这个吧。
进入设置界面,在地址栏输入:
about:config
搜索backspace,理论上只有一个选项叫:
browser.backspace_action
它的值设为0,即可实现回览需求。
具体如下:
0: Pressing [Backspace] will go back a page in the session history and [Shift]+[Backspace] will go forward. (Default in Windows)
1: Pressing [Backspace] will scroll up a page in the current document and [Shift]+[Backspace] will scroll down. Except Camino that does not implement any behavior for the value 1, which is unmapped. (Default in Linux builds before 2006-12-07)
Any other integer number: Any other integer value will simply unmap the backspace key. In Linux builds after 2006-12-07, the default is 2.

chrome版:
有一个插件在这里:
http://www.chromeextensions.org/appearance-functioning/backspace-as-back-for-linux-2/
参考:
1.http://www.mydigitallife.info/disable-or-enable-backspace-as-go-back-page-browsing-function-in-firefox/

create root locus in octave

MIT has make a clear tutorial of this topic.
http://web.mit.edu/6.302/www/compare/report.html
However, it doesn't work in my machine. 
I use the following codes to create a root lucos and it works!

s = tf ('s');
L = 3e4 * (0.05*s + 1)^2 / ((s+1)^3 * (0.01*s + 1));
rlocus(L);
It seems that matlab perform much better ;-P

2011年10月24日星期一

Change backlight level in fedora

As we are using Xwindow, it is quite easy for us to control backlight in 'xorg.conf' .

Having searched in google, I think this must be the best one:
sudo vim /etc/X11/xorg.conf
Then add this before "EndSection":
Option "RegistryDwords" " EnableBrightnessControl=1"
In the end, restart using:
sudo init 6
Now, you can control the screen brightness using "Fn+F7"!

2011年10月12日星期三

fedora多版本gcc共存

gcc版本前后继承性常常会出问题,而fedora的yum又不直接提供多版本gcc下载。这里在
http://www.linuxsir.org/bbs/showthread.php?p=1979500
找到个好方法:
 yum install compat-gcc-34*
编译时使用gcc34即可。对于大型文件,可以使用
grep gcc -rf *.* 
来寻找定义gcc的位置