programming

Tags:  •    •    •  

The well known way is svn export. Some times this command is not applicable. You can use this simple shell command in this case (Linux/*nix only).

Tags:  •    •    •    •  

I've got the next error message from Oracle server, when I try to insert new record:

ORA-01653: unable to extend table OWNER.TABLE_NAME by BYTE in tablespace TABLESPACE
Tags:  •  

Almost all beginner Java Swing programmers meet these issues. I have written some code example for representing the solution. This issue collection is useful for some situation, but please comment it.

Maximize a Java Frame

How to maximize the JFrame (main window) from code:

import java.swing.JFrame;
 
public class MyFrame extend JFrame {
   public MyFrame() {
     // the application window is run as maximized
     this.maximize();
 
     // some code ...
   }
 
   /**
    * Maximize the Frame.
    */
   public void maximize() {
Tags:  •    •    •  

Task

I've given the follow task:
Make a PL/SQL procedure for Oracle, what put CRATE TABLE statement to DBMS output.
The signature of prodecure is
PROCEDURE cr_tab(p_owner VARCHAR2, p_table VARCHAR2)

Tags:  •    •  

Publish your source code on web with colour syntax highlighting.

For example: How to send correct UTF-8 mail in PHP
This article is contain a PHP code what is syntax highlighted and all PHP function is link to PHP documentation. This code is more understandable, and more readable than simple colourless version.

How to set syntax highlighting on your website?

Tags:  •  

This is a short summary of Sun's Java naming conventions.
I think the most important code convention in Java is the naming convention. These easy naming conventions make programs more understandable by making them easier to read.

Naming conventions

Classes and interfaces
Class and interface names should be nouns, in mixed case with the first letter of each internal word capitalized.

Tags:  •    •    •    •    •  

Google dont't like indexing a duplicated content. Have you got more domains that point to the same content? Is your site available at www and non-www version of the domain? (example: www.bitprison.net and bitprison.net point to same content) More domain point to my blog: bitprison.com, bitprison.net, bitprison.org and bitprison.hu. I need a solution for avoid duplicated content. I've chosen 301 redirection that google recommends for webmaters in case of duplicated content. It may help Google to determine PageRank for your site more accurately.

Now I'm sharing with you two ways of redirection.

Tags:  •    •    •  

Here is a simple UTF-8 mail sender function. This function also encode subject and plain-text message to UTF-8. If you need HTML mail sender, change the code in line 4 from text/plain to text/html, but this function is usable the most cases without any modification. I've used this function for webform and other web based mail notification.

Tags:  •    •    •    •  

I found an interest math problem Bertrand's paradox. This problem was originally posed by Joseph Bertrand in his work.

The Problem

Determine the probability that a random chord of a circle of unit radius has a length greater than the square root of 3, the side of an inscribed equilateral triangle.

Experiment simulation

I've modeled this problem with 3 java classes (Circle, Point, Main). The Main class does the experiment with other 2 classes. The main problem in this paradox is the random chord definition. What do we mean under random chord? I try to implement the problem in the way that I select both chords of circle object randomly.