I am facing this problem which leaves the error message
Use Vim in StackEdit
StackEdit is really great online editor. It could connect with Google Drive. And what’s more, you can even use Vim in this editor.
Now add the following snippet into Settings–Extensions–UserCustom extension javascript area.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
##Others
Fix Notification Switching Position Issue
I once faced with a problem. I wrote a piece of code related with notifcation. Everything goes fine except one little issue. I found the ongoing notification switching order. My notification blinked each second. After Googling I found the reason and resolved the problem.
Fix No Sound Issue on Mac
Now I am dealing with Mac OSX. However I found sometimes this is no sound. People say it’s a bug. I have tried some methods. And found this goes for me every time.
1 2 3 | |
Put the code into a shell script and run the script whenever the issue occurs.
###Others
Code Snippet for Media on Android
A few days ago,I have wrote down this post http://androidyue.github.io/blog/2014/01/19/scan-media-files-in-android/. Now I will paste my code snippet.
Scan Media Files in Android
I once tried to use MediaScanner to resolve problems; however it turned out to be a failure. Now I make it.This post is to write down why I failed and how I work it out now. I think it could be deeper that other posts.
Set the Preferred Application in Android
A great application should provide a function to let users set it as the preferred or default application. In this post, I will make a description on PreferredApplication
Before an application is about to be set as default, it has two possibilities. One is that there is already a default application and the other is no default application.
Package Stopped State Since Android 3.1
##First Bite Since Android 3.1, Android has introduced a LaunchControl mechanism. It’s call Stopped State.
日语文法:ください
##Nをください
- 意思:请…
- 例句:
- りんごをください 请把苹果给我
- ほんを私にください 请把书给我一下。
Fix Missing Command Takes Too Long to Respond in Fedora
I am getting well on with Fedora now. However when I was a fresher to Fedora, I have met a lot of problems.
One of them is that When I type some wrong commands It will take too long to respond. It’s totally different from Ubuntu,which I used before. However I like it could quickly reponse even through the command does not exist.
1
| |
Ok.Add the above code to .bashrc And it works.
##Others
BashBites:Check Files
###Check a file exists
1 2 3 4 5 6 7 | |
BashBites:Loop Through in a Directory
The trick is really easy. Just to keep record.Here we take the /tmp folder as the desired one.
1 2 3 4 5 6 | |
##Others
日语文法例句1
连接宽带错误769:无法连接到指定目标
适宜的环境
适宜的环境,这里介绍适宜的温度和湿度,数据来自TANITA湿度计的附带资料 ##夏季
- 温度:21-25 摄氏度
- 湿度:55-65% ##冬季
- 温度:16-20 摄氏度
- 湿度:45-55%
##Others
Start InstalledAppDetails Activity With a Specific Package Name
This trick works. It’s really easy.
1 2 3 | |
Refer String Resources From Other Applications
The following code works. Here take getting String resource for example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
###Others
Get Android System Available Features
An easy way to get system available features.
1 2 3 4 5 6 7 | |
Have a glance at the result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
##The Other way
You can also use adb shell to get into the shell of your device and the use pm list features to get the available features of a device.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
For a detailed understanding of use-filter,please read this post http://developer.android.com/guide/topics/manifest/uses-feature-element.html
###Others
Get an Application Required Features
How to get application’s required features? Actually the aapt really does a great help.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
To understand the feature more detailed, please visit http://developer.android.com/guide/topics/manifest/uses-feature-element.html
###Others
Jar Mismatch! Fix Your Dependencies
There was a requirement of my work. It requires me to integrated my current project with Facebook SDK for measuring. However this came into my sights.
1
| |
The fact is that Both my project and my library project which the former refers to have used android-support-v4.jar. However I realize the two android-support-v4.jar are different after making the md5 hash.
My solution:
I use the android-support-v4.jar in my project as the right one. And then replace the one in Facebook SDK with my project one. And then it works.
But my question remains; why it asks me for fix the dependencies to use the same lib jar file?
I guess android will keep only one file for all the references so this will ask developers to make all the same lib all the same.
Sorry for the codeless post.
###Others
Enter Recovery Mode by ADB
Remove Android Account Without Factory Reset
This will work if you want to remove account without factory reset your device. #Steps
- Make sure you have rooted your device.
- Mount /data/system as read and write access
- Go into /data/system and remove accounts.db
- Reboot your device and you made it.
###Others
How to Create Facebook Key Hash
When I create a new application on Facebook, I meet the problem. Facebook asks me to provide the Key Hash. But it does not show the guidance about how to generate. After Googling, I have found this works for me.
Before executing the following command, you need install openssl
1
| |
Replace your-alias-value and your-keystore-path with the real data.
###Others
Dump Table Structure in SQLite3
Best answer to the question
Use PRAGMA table_info
This pragma returns one row for each column in the named table. Columns in the result set include the column name, data type, whether or not the column can be NULL, and the default value for the column. The “pk” column in the result set is zero for columns that are not part of the primary key, and is the index of the column in the primary key for columns that are part of the primary key.
Reference:http://www.sqlite.org/pragma.html#pragma_table_info
1 2 3 4 5 6 7 8 | |
Another answer may also work
.schema [tablename] will show the CREATE statement(s) for a table or tables
1 2 | |
###Others
Check if a Python Module Is Installed
I was once stucked in How to check Whether a Python module has been installed or not. After Googling, I found this trick.
Python allows user to pass command from out of a python file.See here
1
| |
The result if we import an installed module
1 2 3 4 | |
Now if we import an module which is not installed.
1 2 3 4 5 6 7 | |
###Others