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...
Tuesday, October 4, 2016
Monday, October 3, 2016
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...