Tuesday, October 4, 2016

My ideas for thesis papers for under grads

I have lots of ideas regarding students' projects, some I really thought about while others just came pass my mind. Here are some of them: 1. Water bill counter-checker This involves a device and a software. The idea is to check the actual consumption of a household versus the billed consumption. Maybe a device could be installed...

Monday, October 3, 2016

How to access MySQL database of your website using SQL Yog

To be able to do this you should have the following: - permission to set-up and configure your hosting database - username and password to access the database 1. Login to your web hosting control panel and select the option...

Monday, September 26, 2016

How to put icon on the tab of your website

Let's keep it short! This icon is called FAVICON. Here are the steps to put an icon or image of your website that will appear on the tab of the browser, just before the website title: 1. Create an image sized 16x16 and save it as png. 2. Put this code snippet on the <head> part of your website. <link rel="icon" type="image/png"...

Monday, May 30, 2016

Sunday, March 6, 2016

How to "Select All" or Highlight textfield or password field in Java

There are cases when you want to select all or highlight the characters inside a textfield or password field in your Java desktop app. Here's a sample code to do that: int i = textfield.getText().length(); textfield.setSelectionStart(0); textfield.setSelectionEnd(i); Put this in the action or wherever you want it. Replace...

How to change any date format to DATE datatype in MySQL (Insert or Update)

Use this function: STR_TO_DATE('date', 'format') This accepts two parameters: date and format where date is the input raw date you want to change and format is the corresponding format relative to date that you want to change. For example: INSERT INTO table(date_field) VALUES(STR_TO_DATE('December 8, 2010','%M %d,%Y')); Note:...

How to maximize frame or window in Java (JFrame)

There are multiple ways but I recommend these lines of code: GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment(); Frame fr= new Frame(); fr.setMaximizedBounds(e.getMaximumWindowBounds()); fr.setExtendedState(main.getExtendedState() | JFrame.MAXIMIZED_BOTH); fr.setVisible(true);  The...

Friday, February 5, 2016

How to run MySQL queries from Windows Command Prompt (cmd)

Warning: READ CAREFULLY I am writing this post because I cannot find something like this over the internet. For some reasons that you do not want to use MySQL GUI and just wanted to run mysql cmd but you cannot seem to run its...