GIDForums  

Go Back   GIDForums > Computer Programming Forums > Java Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Aug-2005, 05:38
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 1,052
admin will become famous soon enough
Exclamation

GIDForums enables New [JAVA] bbcode.


The GIDForums™ Team is proud to announce that GIDForums™ is now among one of the very first Webmaster / Programming forums to offer a custom-written Java Syntax Highlighter BBCode ([java] bb code) to it's valued members and readers.

Please use the [java] and [/java] tag pair to enclose any java code so that it appears like in the sample effect below: Please hit CTRL+F5 to reload the CSS if you don't see the colours.

Sample Effect of [JAVA] BB Code Tag

JAVA Code:
// Example Java code supplied by LuciWiz :)

package dismembertext;

/*
 * This program will count the number of times each letter appears in a text
 * The text will be given by the user; Java I/O is painfull
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        String textIn;
        int count;
        BufferedReader keyboardInput;
        
        try
        {
            System.out.println("Your text, please (use Return to end the input): ");
            keyboardInput = new BufferedReader(
                    new InputStreamReader(System.in));
            textIn = keyboardInput.readLine(); //read a line of text
            textIn = textIn.toUpperCase(); //we don't care about upper or lower

            for (char letter = 'A'; letter <= 'Z'; ++letter)
            {
                count = 0;
                for (int index = 0; index < textIn.length(); ++index)
                {
                    if (textIn.charAt(index) == letter)
                    {
                        ++count;
                    }
                }
                if (count > 0)  //if the text contains the current letter
                {
                    System.out.println("The letter " + letter + " was encountered " 
                            + count + ((count == 1)? " time":" times"));
                }
            }
        }catch(java.io.IOException ex)
        {
            System.out.println("Exception caught: " + ex.toString());//oups
        }
        finally
        {
            System.out.println("I hate Redmond anyway"); //no matter what happens, the star we orbit around still rules
        }
        
    }
    
}
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #2  
Old 27-Aug-2005, 13:11
crystalattice's Avatar
crystalattice crystalattice is offline
Aspiring author
 
Join Date: Apr 2004
Location: Japan (again)
Posts: 1,671
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice
On my browser (Opera 8.02), the green of the comments is difficult to distinguish from the grey of the statements. I checked it out in Safari where it's a little better.

Don't know if you want to change the colors. I'm probably just whining for no reason.
__________________
Start Programming with Python-A beginner's guide to programming and the Python language.

Interested in pen & paper role playing games from the "golden age" of gaming? Visit Old School Role-Playing Games
  #3  
Old 27-Aug-2005, 20:15
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 1,052
admin will become famous soon enough
Thank you for the feedback C.

Yes, I agree the colour I set for the comments is not the most obvious. Does anyone have a (colour) suggestion?
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #4  
Old 24-Sep-2005, 11:33
Paramesh's Avatar
Paramesh Paramesh is offline
Regular Member
 
Join Date: Sep 2005
Location: The Milky Way
Posts: 929
Paramesh is a jewel in the roughParamesh is a jewel in the roughParamesh is a jewel in the rough

Re: GIDForums enables New [JAVA] bbcode.


wow. this is wonderful...it will help in understanding the program a lot quicker...
and i find the colour code to be acceptable..
  #5  
Old 28-Sep-2005, 10:10
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,435
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: GIDForums enables New [JAVA] bbcode.


Quote:
Originally Posted by admin
Thank you for the feedback C.

Yes, I agree the colour I set for the comments is not the most obvious. Does anyone have a (colour) suggestion?
Green, like the other (at least C/C++) parsers.

IMAO, the colors of all language syntaxers should be as similar as possible.
__________________

Definition: Politics
Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
  #6  
Old 28-Sep-2005, 10:19
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 1,052
admin will become famous soon enough

Re: GIDForums enables New [JAVA] bbcode.


Are you trying to mess with my head?

The colours right now, are exactly the same as the ones used for the CPP syntax highlighting. The only difference is the border colour.

The feedback from Crystalattice previously was for a colour theme that you no longer see today.
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #7  
Old 25-Sep-2006, 06:18
the code hunter the code hunter is offline
New Member
 
Join Date: Sep 2006
Posts: 20
the code hunter is on a distinguished road

Re: GIDForums enables New [JAVA] bbcode.


umm, so what is this code for? sorry for the dumb question
  #8  
Old 25-Sep-2006, 06:37
Paramesh's Avatar
Paramesh Paramesh is offline
Regular Member
 
Join Date: Sep 2005
Location: The Milky Way
Posts: 929
Paramesh is a jewel in the roughParamesh is a jewel in the roughParamesh is a jewel in the rough

Re: GIDForums enables New [JAVA] bbcode.


The BB Code helps to view and debug java code easier.

Foe example, here is a sample code, without using BB Code:

Code:
public static void main(String args[]) { String test = "hello; System.out.println(test); }

The written code has a mistake. Now, look at this Java BB Code:
JAVA Code:
public static void main(String args[]) {
    String test = "hello;
    System.out.println(test);
}


See the difference?
You can locate mistakes easier.

And the code is a lot easier to read!( With those syntax highlighting stuff )

Regards,
Paramesh.
__________________

Don't walk in front of me, I may not follow.
Don't walk behind me, I may not lead.
Just walk beside me and be my friend.
  #9  
Old 25-Sep-2006, 06:40
the code hunter the code hunter is offline
New Member
 
Join Date: Sep 2006
Posts: 20
the code hunter is on a distinguished road

Re: GIDForums enables New [JAVA] bbcode.


ohh ok thanks
  #10  
Old 22-Oct-2006, 18:21
HelloMoto HelloMoto is offline
New Member
 
Join Date: Oct 2006
Posts: 24
HelloMoto is on a distinguished road

Re: GIDForums enables New [JAVA] bbcode.


Very impressive! I really like this new Java system theory! Very good job guys!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GIDForums enables New [C] / [C++] bbcode. admin C++ Forum 20 25-Aug-2008 05:48
GIDForums Gets More Advertising BobbyDouglas Advertising & Affiliates Forum 19 22-Apr-2004 13:51
GIDForums enables New [KBD] bbcode. admin GIDForums™ 0 24-Jul-2003 06:26
GIDForums enables New [CSS] bbcode. admin GIDForums™ 0 01-Jun-2003 23:57
GIDForums enables New HTML BBCode. admin Web Design Forum 0 17-Feb-2003 16:52

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 09:23.


vBulletin, Copyright © 2000 - 2018, Jelsoft Enterprises Ltd.