Skip to main content

Posts

Showing posts from February, 2014

How To Sort Excel Columns Instead of Rows

In Excel, it seems easy to sort rows, because there is a button sort & filter button on menu bar. You can sort rows from smallest to largest or largest to smallest one. However, it seems difficult or impossible to sort columns, because any method can't be found on menu bar. But, It's totally same. By default, it is set to sort rows. To make the change, just follow few steps. 1. Click sort & filter button on right most side of Excel menu bar. Then you can see custom sort sub menu item. (see below). Click the ' Custom Sort ' item. 2.You can see a dialog name sort. Click options button, the a small dialog named ' Sort Options ' will be opened shown as below. There are two options: Sort top to bottom : it's default value to to sort rows.  Sort left to right: it will sort columns. Just select Sort left to right option. 3. Just choose a row you want to sort by. 4. DONE.

Simple Solution for Facebook APP Error - Given URL is not Allowed.

Facebook documentation and user notes are very useful when you develop a Facebook application. You can simple start here, https://developers.facebook.com/. Of course, you need your domain and/or web server. Many says 'localhost' is fine to test Facebook application, but I met lots of problems with localhost. I think, the first error after launching your app might be Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Just confirm that BOTH APP domains AND site url fields are filled and one of your domains should be match with site url. urls such as redirect_url in your codes (php, java, whatever) must be matched to the domain(s) or site url.  That's it.

How To Rename Or Change Name of Table Columns in MySQL

To change column name in MySQL Table, ALTER TABLE table_name CHANGE old_column_name new_column_name DATA_TYPE; For example,to change misspelled column name 'fist_name', ALTER TABLE users CHANGE fist_name first_name VARCHAR(64); In addition, you can change multiple column names in a query and set languages, default value, etc. ALTER TABLE users CHANGE fist_name first_name VARCHAR( 64 ) NOT NULL,   CHANGE username user_name VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,   CHANGE gend gender TINYINT( 1 ) NOT NULL DEFAULT 0;

How To Insert Multiple Rows In A Single Query in MySql

Sometimes, it is needed to insert multiple columns at a time. Next MySQL multiple insert queries performs perfect, of course INSERT INTO   table_name (column-1, column-2, ... , column-n)   VALUES (value-1-1, value-1-2, ... , value-1-n); INSERT INTO   table_name (column-1, column-2, ... , column-n)   VALUES (value-2-1, value-2-2, ... , value-2-n);   ... INSERT INTO   table_name (column-1, column-2, ... , column-n)   VALUES (value-m-1, value-m-2, ... , value-m-n); But next single query is easy to use and save memory ant time INSERT INTO   table_name (column-1, column-2, ... , column-n)   VALUES     (value-1-1, value-1-2, ... , value-1-n),     (value-2-1, value-2-2, ... , value-2-n),     ... ,    (value-m-1, value-m-2, ... , value-m-n); But be careful with large data (value). Your server or machine might be stop the execution due to the security or resource issues such as execution time limit.

How To Make Ordered Sub-list in CSS/HTML

Combination <ol> and <li> tags generate numbered list in HTML document, but it does not support numbered sub-list default. By adding 3 lines of CSS scripts, we can generate the numbered and ordered sub-list. The idea is from li:bofore style. ol { counter-reset: item } li { display: block ;font-weight:bold} li:before { content: counters(item, ".") " "; counter-increment: item } And Nested <ol><li> HTML tags generate the list. <ol>   <li>Item 1</li>   <li>Item 2     <ol><li>Item 2.1</li>            <li>Item 2.2</li>            <li>Item 2.3               <ol><li>Item 2.3.1</li>               </ol>            </li>     </ol>   </li>   <li>Item 3</li> </ol> The result page shows: Item 1 Item 2 Item 2.1 Item 2.2 Item 2.3 Item 2.3.1 Item 3 If you want insert unordered list(&