Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-06-2008, 11:29 PM   PM User | #1
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
binary to decimal / Palindromes

I am reading JAVA:How to program 7th /E , 4th chapter finished just now,

by the way can you tell me some lines of source, work , if i have a binary number (eg 1110001101) use "%" & "/" to make it decimal(ex.4.31 p.184) by picking off binary numbers one at a time ?

Palindromes: Also any function in java make a number it's inverse number, eg 12345 make it 54321 ?

java mob: pdas with large LCD programmed mainly in XHTML Basic ? Or can display and normal XHTML (with scrolls) ?
lse123 is offline   Reply With Quote
Old 10-06-2008, 11:31 PM   PM User | #2
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
If I have two PCs is needed register Netbeans 6.1 IDE twice ?
lse123 is offline   Reply With Quote
Old 10-07-2008, 05:20 AM   PM User | #3
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
PLEASE ANSWER: And questions prior, at start...
lse123 is offline   Reply With Quote
Old 10-08-2008, 04:46 AM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
The binary conversion can be done using the Integer wrapper class:
Code:
try
{
   int converted = Integer.parseInt("1110001101", 2);
}
catch (NumberFormatException ex)
{
}
If you mean to make it a float, I think that the double class wrapper also takes a radix. To do this manually, I'd simply loop through it for decString.length in decrementing fashion, and use leftshifting with addition to track the amount. You can also bitmask it. There are a lot of solutions.
As for reversing, I think you're out of luck on that one. I don't *think* that the String.getChars works in reverse where you give it a starting position of the length - 1, and an ending position of 0. The easiest way would be to convert it to a char array with the string wrapper, and then iterate through it backwards, and finally converting the resulting string back into an integer. Man a char * would really help here...

I have no idea about the PDA though. I've only done the small handheld devices, so I have no idea what a PDA requires.

If you plan on installing netbeans on 2 computers, you'll need to register it twice. Not really a problem though, netbeans is free anyway. Otherwise, just remote into the computer with it installed and work from there.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 10-10-2008, 10:17 AM   PM User | #5
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
in wmlscript how to build my own libraries ? After build , i refer functions as
myLib.myfunction() or
myLib#myfunction() ?
lse123 is offline   Reply With Quote
Old 10-10-2008, 10:23 AM   PM User | #6
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
VS2008express is 64bit software ? There's version for mac apple pc ?
lse123 is offline   Reply With Quote
Old 10-11-2008, 06:23 AM   PM User | #7
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Libraries will be . referenced. Visual Studio can likely be found in a 32 bit build, but good luck finding a copy for mac.
This is unrelated to Java though, sounds like you're programming in C#.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 10-11-2008, 06:47 AM   PM User | #8
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
How I build my own libraries in java ? how then I refer a functionX() in LibraryX ?
lse123 is offline   Reply With Quote
Old 10-12-2008, 03:41 AM   PM User | #9
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Packages are what java usually uses. All you need to do is jar the file and provide an external reference to it. Import it in using the import keyword, and access it properties through period referencing: namespace.class.method.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 10-12-2008, 10:04 AM   PM User | #10
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
How I build my own libraries of classes/methods in java ? how then I refer a functionX() (i mean method) in LibraryX ? can you give a short/brief example of a library with a class with a method and a main method of normal class calling this method (of external's added library's) ?
lse123 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:43 AM.


Advertisement
Log in to turn off these ads.