Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Modal dialog in Java example code

In Java, we can create modal dialog so that the main JFrame cannot be operated on until the modal dialog is closed. To achieve this, we need to use one class in Java--JDialog. This class can be used to create an modal dialog.Example code :import javax.swing.JDialog;import javax.swing.JLabel;import javax.swing.JPanel;public class Dialog extends JDialog{ public Dialog(){ super(); JPanel panel=new JPanel(); panel.add(new JLabel("Hello dialog")); this.getContentPane().add(panel); } public Dialog(MainFrame mf,String title,boolean modal){ super(mf,title...

40,191 2       JAVA CODE DEMO MODAL JFRAME JDIALOG


  PHP to output string to client terminal

It is a common task to echo messages to the user using PHP. There are lots of ways where the message can be echoed to the client terminal(browser or console window) through PHP. These includes some well know debug methods like var_dump() and var_export() etc. In this post, we will show you some other methods shared by Laruence, one of the core members of PHP development team.1. echoFirst comes with the most common one : echo.$str = "Hello PHP\n";echo $str;2. printThen comes another common one : print.$str = "Hello PHP\n";print $str;3. php://outputAlso we can use file_put_contents() t...

40,169 0       TRICKS DEBUG OUTPUT PHP


  37 powerful Linux shell commands

To work on Linux platform, you cannot avoid using shell commands to complete some tasks. These tasks can be as simple as list files in some directories or find some text in some file, or can be as complex as monitoring processes. In this post, we will share 37 powerful Linux shell commands. TaskCommands1Delete file with 0 byte(empty file)find . -type f -size 0 -exec rm -rf {} \;find . type f -size 0 -delete2Check process memory consumptionps -e -o "%C : %p : %z : %a"|sort -k5 -nr3Check process CPU utilizetionps -e -o "%C : %p : %z : %a"|sort -nr4Print URLs in cachegrep -r -a jpg /data/cac...

40,132 0       LIST LINUX COMMAND


  A simple way to remove the small arrow on on desktop application shortcut

Maybe many of us will see a small arrow on desktop application shortcut after we install the application on Windows. Some may like it but some people may think it doesn't look beautiful enough. We may need to remove these small arrows somehow the desktop can be clean. So how?Many people may use a third party software to remove the small arrows, then they must go to download the software and install them. But do we necessary do this in order to remove the small arrow?The answer is no.Here I propose a simple way to do this. Follow steps below:1. Go to Start->Run->Type "regedit";2. After th...

39,375 0       SMALL ARROW SHORTCUT DESKTOP APPLICATION WINDOWS


  Implementation of +,-,*,/ with bitwise operator

There is a question asked on Stackoverflow : Divide a number by 3 without using *,/,+,-,% operators. This question is an Oracle interview question. Some people give excellent answers. You can go there and take a look. Usually we need to use bitwise operators to do this kind of implementations. Here I want to show you ways to implement +,-,*,/ with bitwise operators.A bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, primitive action directly supported by the processor, and is used to manipulate values for comparisons ...

39,289 3       DIVISION BITWISE OPERATOR SHIFT ADD SUBTRACT MULTIPLICATION


  Understanding database, instance and schema in Oracle database

Oracle database is the most popular database system among enterprises. To start working on Oracle database, some concepts must be understood first. They include database, instance, schema and user etc. And among these concepts, some have different meanings from those in other database systems such as MS SQL, MySQL, DB2.On the web, there are already some good posts which explain different concepts such as Ask Tom's database vs instances, Difference between database vs user vs schema. In this post, these concepts with be summarized based on real application development experience.Database : A co...

39,091 2       DIFFERENCE DATABASE ORACLE DATABASE INSTANCE SCHEMA USER


  Macro to change text color conditionally in Excel

Macros are small but very powerful VBA programs in Microsoft Office software. They can help us complete some repeated tasks automatically. Today, I will show you one macro example which is to change the text color conditionally. The excel file has a work sheet which contains some records of request. I want to check the status of each request, if the status of a request is approved, the text color of the status should be green; if the status of a request is rejected, the text color of the status should be red; otherwise the text color of the status should be black. Here is the code for the mac...

39,036 2       EXCEL MACRO TEXT COLOR CONDITIONALLY


  Benefits and Drawback of a Layered Architecture

Most enterprises today are application centric. But the problem with the application is that their database schemas, user interfaces, programming interfaces and object models are tightly coupled and difficult to change. If you want to add a new field to a database table and you’re lucky, the change will reflect through the entire system. But often the change needs to be replicated manually across the entire system. And as applications are difficult to change, adding business rules or process to the application does not facilitate business agility. This is where layered architecture comes...

38,923 0       JAVA PROGRAMMING WEB DEVELOPMENT ENTERPRISE APPLICATION