Archive

Archive for the ‘Misc’ Category

resolved – The viewport is not between 320 and 420 pixels wide

April 28th, 2016 Comments off

Today when I tried to enable page-level ads of google adsense, I met below error:

This page cannot display anchor ads for the following reason(s):

  • The viewport is not between 320 and 420 pixels wide.
  • The current browser is not supported.

The cause by this is that the wordpress theme currently used didn't support viewport(more info about viewport is here). To enable viewport, we can install one plugin - Definitely allow mobile zooming. After activating them, you can try again.

 

Categories: Misc Tags:

Close Putty sessions without exit confirmation dialog

January 14th, 2015 Comments off

You can set this in Putty "Change Settings" -> "Window" -> "Behaviour", and uncheck "Warn before closing window". Save the config in "Session", and now all windows can be closed without any exit confirmation dialog.

putty_session

Categories: Misc Tags:

resolved – show kitchen sink buttons when wordpress goes to fullscreen mode

April 11th, 2014 Comments off

When you click the full-screen button of wordpress TinyMCE, wordpress will go to "Distraction-Free Writing mode", which benefits as the name suggests. However, you'll also find the toolbox of TinyMCE will only show a limited number of buttons and the second line of the toolbox(kitchen sink) will not show at all(I tried install plugin such as ultimate TinyMCE or advanced TinyMCE, but the issue remained):

full-screenPreviously, you can type ALT+SHIFT+G to go to another type of fullscreen mode, which has all buttons include kitchen sink ones. However, seems now the updated version of wordpress has disabled this feature.

To resolve this issue, we can insert the following code in functions.php of your theme:

function my_mce_fullscreen($buttons) {
$buttons[] = 'fullscreen';
return $buttons;
}
add_filter('mce_buttons', 'my_mce_fullscreen');

Later, the TinyMCE will have two full-screen button:

full-screen buttonsMake sure to click the SECOND full-screen button. When you do so, the editor will transform to the following appearance:

full-screen with kitchen sinkI assume this is what you're trying for, right?

 

 

Categories: Misc Tags:

add horizontal line button in wordpress

April 11th, 2014 Comments off

There're three methods for you to add a horizontal line button in wordpress:

Firstly, switch to "Text" mode, and enters <hr />.

Secondly, add the following in functions.php of your wordpress theme:

function enable_more_buttons($buttons) {
$buttons[] = 'hr';
return $buttons;
}
add_filter("mce_buttons", "enable_more_buttons");

horizontal line

Thirdly, you can install plugin "Ultimate TinyMCE", and in its setting, you can enable horizontal line button there in one click! This is my recommendation.

ultimate tinymce

Categories: Misc Tags: ,

US timezone map – PST MST CST EST AKST HST

January 16th, 2013 Comments off

Categories: Misc Tags:

why BST/DST(British Summer Time, Daylight Saving Time) achives the goal of saving energy

October 31st, 2011 Comments off

Greenwich Mean Time

Tonight(30th October 2011), we'll welcome the GMT(Greenwich Mean Time) and hug away BST(British Summer Time, Daylight Saving Time) at 01:59:59 30th October 2011.

Why BST/DST(British Summer Time, Daylight Saving Time) achives the goal of saving energy? As you may think I still am going to work 8 hours a day and 365 days a year(may be too much? :D). OK, here's what I think.

As we all can experience, the sun arise earlier in Summer than in Autumn. So when you wake up in the morning, you'll do not need turn on the light, that does save the energy. And another extreme example, one man sleeps all the day and play games all the night, and another man sleeps all the night and work all the day, which one do you think is more environmentally friendly? Actually, this was why Benjamin Franklin, the man on $100, suggest DST(Daylight Saving Time).

Benjamin Franklin

Benjamin Franklin

Categories: Misc Tags:

Steps for upgrading milestone to version 2.3

May 16th, 2011 Comments off

Firstly, please refer to this page for prerequisite:

Motorola milestone(xt702) rooted and busybox installation

After reading that article through, you can do the following steps:

1.Go to Recovery Console:    wipe data/factory reset    wipe cache partitionThen, shutdown milestone.

2.Run RSDLite on your pc, select Milestone_2.2.1_UK_Package.sbf.

3.Goto Bootloader, connect your milestone and your pc, and click "start". When this finished, reboot your milestone.

4.Now put Milestone_V2.3.2_MuzisoftUpdate_B6.2-SignFile.zip to OpenRecovery\updates. And then put OpenRecovery and update.zip to /sdcard. Wipe again(Refer to step 1). In Recovery Console, focus on "apply sdcard:update.zip" and type OK button. Then, select root phone. After that, reboot system. Then you'll find your system already been rooted. Then, select Milestone_V2.3.2_MuzisoftUpdate_B6.2-SignFile.zip.

5.Wipe again and reboot milestone. You'll find your system now is 2.3!

Categories: Misc Tags:

Motorola milestone(xt702) rooted and busybox installation

May 16th, 2011 Comments off

1.Download update.zip & Android SDK & busybox & Motorola ADB driver & RSDLite & OpenRecovery

f
2.You need your system rooted for these operations. You can download update.zip here, put it in your sdcard. Go to Recovery Console. To go to Recovery Console, you need firstly know your bootloader version. Press upper arrow of the four-directions key on your keyboard and booting button to boot your system. Then you can see the version of system bootloader.I.If the version is 90.78, you need press x+booting button, when there appears a triangle, press upper key of voice control and snapshot button to go to Recovery Console.II.If the version is 90.73/90.74, press snapshot button and booting button, when there appears a triangle, press upper key of voice control and snapshot button to go to Recovery Console.In Recovery Console, focus on "apply sdcard:update.zip" and type OK button. Then, select root phone. After that, reboot system. Then you'll find your system already been rooted.

3.Install Motorola ADB driver, after that, connect your usb to your pc(windows media sync). Setting your milestone like this:    Settings -> Applications -> Development -> check USB Debugging  Then, you'll find Motorola A853 info on your pc.

4.Install Android SDK to C:\android, here goes the layout:    C:\android        add-ons        platforms        SDK Readme.txt        SDK Setup.exe        tools5.Run cmd in your pc, unzip busybox and put it in  :\android\tools, it will be C:\android\tools\busybox.In the cmd console, run the following commands:    cd c:\android\tools    adb push c:\android\tools\busybox /sdcard/busybox #This may take several minutes to complete.Now, run:    adb shellCongratulations! You can now operates in your milestone!And, now you can try su to root:    suIf not successful, you'll need root your system again. Please refer to step 2.

Categories: Misc Tags:

How to upgrade google chrome browser

April 17th, 2011 Comments off

Firstly, remember, you really do not need to uninstall the chrome then download then install, it’s somehow a good way to waste your bandwidth and time. :D

Ok, here goes the steps(Very easy really):

Open your chrome browser, click on the left top “Customize and control Google Chrome”, select “About Google Chrome”, then you’ll amazingly notice that Google Chrome is checking and installing updates automatically for you.

upgrade chrome 1
Wait and after about 5 minutes or so, upgrading should complete and you’ll need restarting Google Chrome to finish upgrading.

how to upgrade chrome

Time to harvest. After restarting Chrome, check again the following steps just as the very first one:Open your chrome browser, click on the left top “Customize and control Google Chrome”, select “About Google Chrome”.

Yes, just like you’ve noticed, Google Chrome has upgraded to the latest version:

how to upgrade chrome

Categories: Misc Tags: