What does super.paintComponent(g) do?

What does it do? It prints the component as if you hadn’t overridden the paintComponent method. If you have a background color set for instance, this is typically painted by the class you’re extending. When do we need to use it? You use it if you don’t paint on the entire component. The parts that … Read more

How to set JAVA_HOME in Linux for all users

find /usr/lib/jvm/java-1.x.x-openjdk vim /etc/profilePrepend sudo if logged in as not-privileged user, ie. sudo vim Press ‘i’ to get in insert mode add:export JAVA_HOME=”path that you found” export PATH=$JAVA_HOME/bin:$PATH logout and login again, reboot, or use source /etc/profile to apply changes immediately in your current shell

How to “wait” a Thread in Android

You need the sleep method of the Thread class. public static void sleep (long time) Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds). The precision is not guaranteed – the Thread may sleep more or less than requested. Parameters time The time to sleep in … Read more

Using regex to match any character except =

I am trying to write a String validation to match any character (regular, digit and special) except =. Here is what I have written – But, it matches the input string “2009-09/09 12:23:12.5=” with the pattern. How can I exclude = (or any other character, for that matter) from the pattern string?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)