1,076,478 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by whiteyoh which have been Voted Up

Hi, you could do this using php and a function called "substr".

http://php.net/manual/en/function.substr.php

whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0

Hi,

Ive posted this in a mysql forum, but the more i think about it i think php is really where i think the solution lies.

When i call a row, how could i count the number of empty entries?

so say its an address with 5 lines, and ive only filled in 3, i want the output to simply say "2"

whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0

Hi,

Ive read that document through 3 times and the examples are good. But i have a couple of questions.

When would you choose to use it?
Can you give me an example of when you have used it?

i dont want code, i just need to understand how i can use it for something useful...

whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0

hi thanks for the information.

So objects dont have to die, they can be flattened and saved to a file instead of having to be re-created??

Im working on a library system, with overdue items etc. What could i use serializable on?

I was thinking maybe active book loans?

could you suggest anything that could also use this?

whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0

Hi all, im very new to java

i would like to know how to add the following objects into an array

CD cd1 = new CD("Kaiser "," up the khazi ", 9.99);
		CD cd2 = new CD("Oasis "," morning glory ",3.99);
		CD cd3 = new CD("Bob Dylan "," Alreet Sunna ",6.99);

i know i need to declare a variable, but i dont know what kind as the object has String and double.

im trying to achieve the following:

declare and set max (using cd[0].getCost())
declare and set maxIndex
for each remaining CD
If CD cost is bigger than max
Set max to bigger value
Set maxIndex
output result

whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0

I think this could be useful to you..

Code moved to attached file as is breaking view in FireFox. Please do not post such large code in the future or use attach option

Attachments code.txt (132.48KB)
whiteyoh
Posting Pro in Training
479 posts since Jun 2009
Reputation Points: 15
Solved Threads: 15
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page rendered in 0.0590 seconds using 2.49MB