Monthly Archives: October 2016

what’s the .nomedia file for?

A .nomedia file is a blank file placed inside a folder. When the media scanner detects the .nomedia file, the media scanner does not scan that folder so the images in that folder don’t appear in the Gallery app. It’s … Continue reading

Posted in Android | Leave a comment

enable developer options

Go to Android home screen. Pull down the notification bar. Tap “Settings” Tap “About Device” Tap on the “Build Number” button about 7 times.

Posted in Android | Leave a comment


what is activity? single screen with a user interface just like window or frame of Java. layout <-> activity => ui logic associate with the ui presentation activity name activity layout (res->layout->activity_main.html) text field android:id=”@+id/edit_message” “+ ” -> define the … Continue reading

Posted in Android | Leave a comment

cart/product design

put obj or product id in the cart? – cw use obj – obj is big to transfer . much smaller compare with cw obj – not convenient if operate with product id, ie. need to parse them again – … Continue reading

Posted in Design | Leave a comment

use JSON in localstorage

localStorage only supports strings. Use JSON.stringify() and JSON.parse(). var names = []; names[0] = prompt(“New member name?”); localStorage.setItem(“names”, JSON.stringify(names)); //… var storedNames = JSON.parse(localStorage.getItem(“names”)); Unexpected token o in JSON at position =>Your data is already an object. No need to … Continue reading

Posted in Angularjs | Leave a comment

how to use method in another controller Supposing I have a controller for books called BookController and a controller for authors called AuthorController and I want to remove a certain book when changing some author data: In AuthorController : // if some logic condition is met … Continue reading

Posted in Grails | Leave a comment

about shipping

key is to calculate the shipping fee manage address how to get all the province/city/district? web service to get price base on the from/to weight/size to submit the shipping request to retrieve the shipping status shipping company tell system that … Continue reading

Posted in Design | Leave a comment