2014/06/15

RedMi Note - User Experience

RedMi Note - is the China most famous brand XiaoMi's cellphone, which the phone price is incredibly cheap.  You can get the phone with 999 RMB (Yuan) or somewhere around $1200HKD ($160 USD).  The phone comes with Octa-core 1.4/1.7 GHz Cortex-A7, 2G ram, 13MP camera resolution and much more, you can check the full spec in here: RedMi - Full Spec

The price is just way too cheap as you can get Octa core and 2G ram for just USD 160.  So is it perfect?  I would say there are quite a lot of pros and cons:

FYI: I bought my RedMi in Hong Kong and RedMi is still not officially selling in here.  My phone is a rooted version.


PROS:
- Nice screen with great resolution.
- Fast
- 13MP camera (quick reaction)


CONS:
(Jun 2014) - Even tho it is a 2G ram phone but when you start up the phone it only left with 6-700 MB memory.

(Jun 2014) - The phone is running so called "Android" but it doesn't come with Google Play Market.  If you want to download apps you better use their app called "XiaoMi" Market: the reason is their OS is somewhat not really compatible with the apps in Google Play Market.

(Jun 2014) - If you are a Facebook lover then you would hate this phone.  First, do not download the app in Goolge Play, download it in XiaoMi market.  Second, even if you download the app from XiamMi Market, the Facebook app keep crashing when you are using it.  (I guess this is because they did not spend time working on the Facebook apps or OS whatever as Facebook is not allowed to use in China).

(Jun 2014) - Want to use Google Map? You can download it, but the GPS is not working with it :D
What to do? Use the Chinese map called "AMap"! But this map only cover China and Hong Kong.  And the GPS works VERY terribly.  Actually there is a hack to make your phone to work in Google Map: you need to download an APK file (NetworkLocation.apk) (I am not responsible if this file harms to your phone or any of your personal data is being stolen), install it and then restart it.  After the phone is restarted, click "Allow Permission" for Google popup.

(Jun 15 2014) - There is a system update today and I updated my phone OS.  After it is done and restarted, it said my SD card is not working and urge me to format the card and I was like WHAT! I have not back it up yet! I tried to restart the phone and turn it back on and it says the same thing.  Me then turn off the phone and take the sd card out and insert it back into the phone and start it up.  Things look fine.  So, do not format your sd card when it says there is an error!


So do I recommend using this phone?  I would still say Yes, as this phone is just $1550 HKD (USD 160) with nice speed and resolution.  The problems that I mentioned above could be fixed with some work.  Sure if money is not an issue you should pick those big brand phone like SamSung or iPhone etc.

This post will keep updated!

2014/04/22

How to install plugin for Joomla? (JOOMLA)

Joomla is one of the best CMS tool and the reason is that because there is a big community making lots of plugins that make your website look great with just a few clicks.

To install plugins, basically you have to download the plugin first, save it on your computer and install it.

Step 1: Go to Extension -> Extension Manager:









Step 2: locate your plugin file:

















Step 3: Click "Unload & Install"

















You have just installed the plugin!

Enjoy!

How to turn off caching in Joomla? (JOOMLA)

For some of the plugins you have to turn off caching in order to make it work perfectly, ie: Facebook Like and Share.  To turn off caching in joomla, you have to follow the below steps:

Step 1: Go to System and select Global Configuration:












Step 2: Go to System Tab on the right hand side screen, scroll down and you will see "Cache *", choose "OFF- Caching disabled".






















There you go!  You have just disabled caching of your Joomla website!!

Enjoy!

How to clear cache? (Joomla)

How to clear cache? And what does cache do?

Cache is actually the data files that are retrieved from either database or anywhere else and store it on the server so that when users want to retrieve it again the server will just give them the cache and hence it will save the traffic time from server to database.

Then we we need to clear cache?  Sometimes we have modified something from the source and would like to check if the content is updated.  In this moment we have to clear cache in order to see the updated content.

Step to clear cache in Joomla:

Step 1:
Click System from menu.











Step 2:
Select the type of cache that you want to delete and click on the delete button as highlighted.



You have just cleared cache!

Enjoy!

2014/04/15

SVN diff two tags (SVN)

svn diff --summarize FILE1 FILE2

Enjoy!

Look up table with column name (SQL)

select a.name
from sysobjects a, syscolumns b
where a.id = b.id
and b.name = 'CFRMN_IND'

Look up table with partial table name (SQL)

select top 50 * from GTDMAST1..sysobjects
where type = 'U'
and name like "%SCA%"

How to get disk space in UNIX? (UNIX)

Usage:
df -k | grep local

Enjoy!

How to find a specific string in UNIX? (UNIX)

find . -type f -exec grep -l "STRING_YOU_ARE_LOOKING" {} \; >> /var/tmp/user_temp/tracersearch/tracer_base_profl_search.log &

Enjoy!

Clearcase how to draw a merge line? (CLEARCASE)

Usage:
cleartool mkhlink -unidir Merge FILE1 FILE2

Enjoy!

Clearcase how to tag/mark label? (CLEARCASE)

Usage:

cleartool mklabel -rep LABEL_NAME FILE_PATH

Enjoy!

Clearcase how to create label? (CLEARCASE)

Usage:

cleartool mklbtype -nc LABEL_NAME

Enjoy!

Clearcase how to lock/unlock label? (CLEARCASE)

Usage (lock):
cleartool lock lbtype:LABEL_NAME

(Unlock)
cleartool unlock lbtype:LABEL_NAME

Enjoy!

Clearcase how to change owner? (CLEARCASE)

Usage:
cleartool protect -chown v439333 -chgrp feaccusr lbtype:LABEL_NAME

v439333 => user id
feaccusr => group name

Enjoy!

Clearcase how to lock label but only specific person are allowed to use the label? (CLEARCASE)

Usage:
cleartool lock -nusers r339347,v439333 lbtype:LABEL_NAME

r339347,v439333 => userid

Enjoy!

Clearcase check any file which is not yet checked in (CLEARCASE)

Usage:
cleartool lsprivate -tag TAG_NAME -long > c:\viewspec\Private_APBAU_20110708.log

c:\viewspec\Private_APBAU_20110708.log => logpath.

Enjoy.

How to remove clearcase branch by command? (CLEARCASE)

cleartool rmbranch -force branchpath

Enjoy.

How to use BCP in & out? (BCP)

To bcp out (get data from DB), please use the below command.

Explanation
GTDMAST1..DISCREPANCY_CD_DTL -> where you want to get the data from
DISCREPANCY_CD_DTL-> the name of the file where you want it to output to
SGTSCOR_UAT510-> server name
UU649121-> username
Pabc123 -> password
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500-> this is the part to separate the data 

Command (OUT):
bcp GTDMAST1..DISCREPANCY_CD_DTL out DISCREPANCY_CD_DTL -SGTSCOR_UAT510 -UU649121 -Pabc123 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500



Explanation
tempdb..DISCREPANCY_CD_DTL -> where you want the data to insert into 
DISCREPANCY_CD_DTL -> the source file
SGTSCOR_DEV510 -> the db server
Usa1 -> username
Pabcd7890 -> passowrd
-c -t'~^' -r'AAAAABBBBBCCCCC' -b500 -> this is the separator and has to be the same with the output command.

Command (IN):
bcp tempdb..DISCREPANCY_CD_DTL in DISCREPANCY_CD_DTL -SGTSCOR_DEV510 -Usa1 -Pabcd7890 -c -t'~^' -r'AAAAABBBBBCCCCC' -b500

How to look up file in UNIX? (UNIX)

If you know the file name, the below command will help you to find out a file.

Please notice that the "." means look through everything in the location where you are.

find . -type f -print | grep 'actionfile_inq.xml'

Enjoy.

How to look up a file in a directory? (UNIX)

In the below example:
CCY_EMU_EXT = filename (it will look up files CCY_EMU_EXT and more CCY_EMU_EXTx, where x can be anything with unlimited number of characters)

After the ">" symbol is the path where you want the result to print it to.  CCY_EMU_EXT_1.log is the result file.

find /gtsallsrv/gts/ -name "*" | xargs grep -l CCY_EMU_EXT  > /var/tmp/v439333/CCY_EMU_EXT_1.log &

How do you look up a process in UNIX? (UNIX)

How do you grep a process?  And what is grep?  grep is actually a function to "grab" the process of a specific name in unix.  It helps you to identify which process is actually running on background.

/usr/ucb/ps -auxww | grep -i qm | grep -i GTSD25QM

-i = ignore letter case

Enjoy.

What is sp_lock & sp_who (SQL)

sp_lock (Reports information about processes that currently hold locks.)
sp_who (Run sp_who to get the spid of the locking process.)

2014/04/12

How to set thousands separator in Java?

The following will work:

int no = 124750;
String str = String.format("%,d", no);
ENJOY!

How to convert from int to String? (Java)

Integer.toString(i) or String.valueOf(i) will work.

Enjoy!

How to convert string to int in Java?

int foo = Integer.parseInt("1234");

How do you pause in android (Java)?

First you have to create a Handler();, then you have to use the postDelayed function to pause the code.

public class MyActivity extends Activity {
    private Handler mHandler = new Handler();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mHandler.postDelayed(new Runnable() {
            public void run() {
                doStuff();
            }
        }, 5000);
    }

    private void doStuff() {
        System.out.println("Hellow World After 5 seconds!");
    }
}