₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,012 members, 8,419,933 topics. Date: Thursday, 04 June 2026 at 07:43 AM

Toggle theme

Olyboy16's Posts

Nairaland ForumOlyboy16's ProfileOlyboy16's Posts

1 2 3 4 5 6 7 8 ... 11 12 13 14 15 16 17 18 (of 18 pages)

ProgrammingRe: Javascript Study Group by Olyboy16(m): 7:46pm On Jul 26, 2014
DharkPoet: Having a problem, grabbing the prototype feature of javascript.

While reading, I got stuck at this snippet of code

function CustomerBooking(bookingId, customerName, film, showDate)
{
this.customerName = customerName;
this.bookingId = bookingId;
this.showDate = showDate;
this.film = film;
}

}
CustomerBooking.prototype.getBookingId = function()
{
return this.bookingId;
}

// Cinema type
function Cinema()
{
this.bookings = new Array();
}
Cinema.prototype.addBooking = function(bookingId, customerName, film, showDate)
{
this.bookings[bookingId] = new CustomerBooking(bookingId,
customerName, film, showDate);
}
Cinema.prototype.getBookingsTable = function()
{
var booking;
var bookingsTableHTML = “<table border=1>”;
for (booking in this.bookings)
{
bookingsTableHTML += “<tr><td>”;
bookingsTableHTML += this.bookings[booking].getBookingId();
bookingsTableHTML += “</td>”;
bookingsTableHTML += “<td>”;

bookingsTableHTML += this.bookings[booking].getCustomerName();
bookingsTableHTML += “</td>”;
bookingsTableHTML += “<td>”;
bookingsTableHTML += this.bookings[booking].getFilm();
bookingsTableHTML += “</td>”;
bookingsTableHTML += “<td>”;
bookingsTableHTML += this.bookings[booking].getShowDate();
bookingsTableHTML += “</td>”;
bookingsTableHTML += “</tr>”;
}
var londonOdeon = new Cinema();
londonOdeon.addBooking(342, “Arnold Palmer”,”Toy Story”, “15 July 2009 20:15”);
londonOdeon.addBooking(335, “Louise Anderson”,
“The Shawshank Redemption”, “27 July 2009 11:25”);
londonOdeon.addBooking(566, “Catherine Hughes”,
“Never Say Never”, “27 July 2009 17:55”);
londonOdeon.addBooking(324, “Beci Smith”,”Shrek”, “29 July 2009 20:15”);
document.write(londonOdeon.getBookingsTable());

Could someone help shed more light on the Cinema constructor and why the new array instance? What does this statement really do this.bookings[booking].getBookingId();

Thanks
Explaining the last statement there:
this.bookings from Cinema.addBookings() is an array populated with instances of the CustomerBooking() object. And the CustomerBooking() object has the method getBookingId(). So you see that the statement returns the booking id of a customer booking at index booking!

I hope this xplains it,
Nairaland GeneralRe: Nigerian Troops Kill Sheik Zakzaky’s Son, Others In Zaria by Olyboy16(m): 9:27am On Jul 26, 2014
Let them just map out sambisa forest, confirm shekau's presence in it, and rain like 200 rounds of 300 ballistic missiles on it. Then get choppers and armor tanks ready to clear off the reminants! Problem solved!! Mtcheww
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:34pm On Jul 24, 2014
mightyfada: From which campus are you? Let's first start with that
must everyone here knw wia i skul? This is a public førum 4 God's sake. Ask me anything else nd nt to disclose my info
PropertiesRe: Tallest Residential Sprayed Concrete Tower To Be Built In Lagos by Olyboy16(m): 8:23am On Jul 24, 2014
iamord: pls. There are already ongoing projects to adress that!
I'm sure you didnt understand what my post meant b4 quoting it
PropertiesRe: Tallest Residential Sprayed Concrete Tower To Be Built In Lagos by Olyboy16(m): 8:18am On Jul 24, 2014
myola777: Mr Man work hard and get ur money you will get there, anybody can stay there, is for human being. forget this poor man mentality
have u been to the inerds of ajegunle, isolo, isaleeko and many other places? See people sleeping under trailers, in dry guters, in incompleted buildings? This your selfish reasoning is the very thing that increases the gear of the proverty in Nigeria. Think of others sometimes pls.
SportsRe: Photos: Pro-Palestinians Invade Football Pitch & Attack Israeli Footballers by Olyboy16(m): 8:02am On Jul 24, 2014
coolzeal: Why can't Israel be sanction?
Why should they be sanctioned? GAza declared war on them and refused dialogue.. If you were the isreali PM you would do much more damage to Gaza
PropertiesRe: Tallest Residential Sprayed Concrete Tower To Be Built In Lagos by Olyboy16(m): 7:55am On Jul 24, 2014
tosomaju: poverty is a disease that affect the mind....get cured before it get out of hand.
What do you mean by this please? You've nt made any sense from what i posted...whats wrong with these damaged people.
PropertiesRe: Tallest Residential Sprayed Concrete Tower To Be Built In Lagos by Olyboy16(m): 7:48am On Jul 24, 2014
Danhumprey: From them look of it,this project is the exclusive reserve of the rich. So,where do the poor fit it?undecided
thats exactly the problem. The towers are suposd to b targeted at the middle classd masses so the poor can afford other better houses on ground.
PropertiesRe: Tallest Residential Sprayed Concrete Tower To Be Built In Lagos by Olyboy16(m): 7:46am On Jul 24, 2014
If only they can build a whole estate filled with these low cost residential towers...
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 7:36am On Jul 24, 2014
Firefire: I pity you. You are brainless. I see you don't know your right from left
For God's sake i expect you to be mature on arguments likd this as i assumed to you some maturity!!
You'r nothing but a pdp thug! You have no counter to my post so you sought to rogue words!! I'm not suprised!!!

And dont ever edit my post again when quoting me..Ever!! I believe this good forum has moderators
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 7:31am On Jul 24, 2014
dharrey2012: You are missing out something here. There are so many pressing issues in osun than airport. Not every town in USA has an airport despite their stable economy. Have u ever bn to Ibadan airport bfr, how many planes fly in everyday? 3 or maybe less. That's "almighty ibadan". Wats percentage of osun ppl will benefit from dis? Wouldn't it av bn a better idea to use dis billions to buy lyk 300 inter-state buses wc will b affordable to all?
I stay in Osun, and I want any aregbe support to challenge me on a debate. I will only compare his reign wit Oyinlola's tenure. Just wit facts and figures. I want intellectuals
okay, since you say you av good intellects. On a scale of 10, assume osun's population as the given scale and tell me how much jobs the airport will provide to the population, also tell me how much jobs the buses wil provide.

The last time i went to a garage to get a bus to ife, there were plenty of buses available to my destination and many others within osun, the drivers were even arguin on who wuld get me as his passenger.

Also, in truth and fairness, estimate total foreign investment that could come in thru dat airport to osun. You should consider the fact that osun has more stable electricity than your "almighty ibadan" with which u were making comparison.

Also, try to count the number of busines tycoons from neighbouring towns, cities and states that wil come and invest in diverse areas in osun because of this airport?

Also consider long term benefits..the airport or 300buses??
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 7:07am On Jul 24, 2014
mightyfada: When Aregbesola came to Uniosun for the convocation he said that he doesn't need the vote of Uniosun that he will enter. He said he's not interested in our school cause it was built by the pdp administration. This man hates Uniosun. So it's better I vote for the party that built the school then.
Hey i was there too o! O ni ro oshi! Any man in his ryt senses can neva make dat statement nt to talk of aregbe! Big liar.
Currently, one of the most sophisticated and largest engineering complex and health sciences faculty are almost fuly completed in uniosun osogbo campus. Shey na d v.c provide the money?? Opuro jatijati
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:49am On Jul 24, 2014
Firefire: What is the economic benefit to Osun citizens?

How does this add to their daily income ?

How does this put food on ordinary citizens' table?

this is a wicked projects!
Come if you dont know how the economy stream enters its river just shut the f*ck up!!
You are thinking and talking like your outdated pdp government! Even GEJ confessed to the fact that infrastructural development is the next thing Nigeria need after seeing the bliss in lagos and other APC states.
So at your age you want to tell me that you dont know that an aerodome in ido osun nt osogbo wil nt only improve osun's access to direct international and national commodities in large scale and cheap costs but also provide a means of foreign investment which is the reason how the world's second richest economy got wia it is. and many more benefits to count! You pple have no sense of innovation at all.
ProgrammingRe: Sorting Out A Simple Text Dictionary With PHP by Olyboy16(m): 9:58pm On Jul 23, 2014
[quote author=]You can get banned for YIMUing on this board o, berra be careful.[/quote]Are you serious or jst kidding?
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 7:36pm On Jul 23, 2014
bandol: if anyone told u ekiti election was rigged(scientifically or otherwise), he is a big liar. †ђξ president knew fayose was going to win. All he did was to protect his vote. Any other claim aside this is a pure falacy
i have not mentioned rigging here. Undastand my post very wel b4 u quote please
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 7:32pm On Jul 23, 2014
Firefire: Ore, mi la ju eeeee shocked shocked shocked shocked shocked grin
Shine your eyes, shine am well well
my eyes are wide open, it is you that needs to remove the sentiments and personal gains you may be recieving and think of what osun stands to loose with pdp's victory!
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:53pm On Jul 23, 2014
anago18: omo yiibo ara lo ma san pa e...oniro ofo omo irankiran.
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:51pm On Jul 23, 2014
You can imagine a sane man saying he will rebuild the MDS shops that were demolished to develop the railway station and generate a more eco-friendly area in all. People living in osogbo know what i mean.
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:47pm On Jul 23, 2014
dguyindcorner: haba, won fi shey e ni!!!

you just they criticize this man, how much them pay you self.
abi o! This firefire guy has just been shouting debt debt since morning! Shey you know how much debt oyinlola left to the APC government? Even when federal allocation is standard! What has he got to show for it!
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:32pm On Jul 23, 2014
bandol: Crowd doesn't guarantee victory...Case study:Fayemi vs Fayose 2014.
i was with a friend at the gbagi police station in I.B, and was made to believe the credibility of the above quoted had been questioned and made invalid by the cunny but rogue act of many PDP tacticians including GEJ!
PoliticsRe: Osun Decides:Pictures Of Aregbesola Campaign Tour Of Ejigbo by Olyboy16(m): 6:28pm On Jul 23, 2014
Firefire: You can change if it is not working well or working to standard.

Do U know the debt profile of Osun under Aregbesola huh

Find out, you will be amazed!

Suku debt
Bonds

Among others.
do you know the difference in the federal allocation to osun under APC to that of then PDP?? Find out! And tell the logical truth! Nigeria in all is a f*cking skunk poo!
TravelRe: Taiwan Plane Crash Kills 47 People And Injures 11 by Olyboy16(m): 5:10pm On Jul 23, 2014
IyfeNamikaze: lol... you no well at all. the two planes involved in the previous air mishap are BMW boeing, but i dont know who built this one sha
calm down bro, i was just joking around. You dont have to be mean at every comment you quote
TravelRe: Taiwan Plane Crash Kills 47 People And Injures 11 by Olyboy16(m): 4:46pm On Jul 23, 2014
IyfeNamikaze: all these Plane crashes in Asia is becoming quite scary. undecided
maybe because the planes are "chinko made".. :-P
ProgrammingRe: Sorting Out A Simple Text Dictionary With PHP by Olyboy16(m): 2:56pm On Jul 23, 2014
asalimpo: Your code highlights design flaws of d php language.

1.) ambiguous data type syntax.
Scalars and compounds (list,arrays) indistiguishable!


$y = (get-file-content,"yoruba.txt"wink

wat data type is $y? (cant say by lookng at the variable declaration.


$lines = explode('\n',$y)
$l = explode('-',$line')

$lines is a compound type but u cant tell at declaration time?!
Same Q applies to $l?
If $l is an array wat datatype is $lines?




arr[$l[0]]

ok.? What kinda syntax is ths?




count($l)


this is for determg size of array, i guess.
But i thought php was OO compliant. This kinda procedural abomination should have been deprecated from d language a long time ago.!!
With facilities like this, php coders can spitout sloppy code ,part OO part procedural).
"they must know me too. I sabi dis tin smal".. *yimu*
ProgrammingRe: Are There Nairaland APIs (Application Programming Interfaces) That We Can Use? by Olyboy16(m): 12:51pm On Jul 21, 2014
They dont have an API!!
Why? They dint build the site from scratch and they dont fully understand how to tamper with the CMS yet!!

I'm waiting for anyone to prove me wrong!
ProgrammingRe: Sorting Out A Simple Text Dictionary With PHP by Olyboy16(m): 12:47pm On Jul 21, 2014
dhtml: You got me laughing, are you trying to say their is something strange about my method of coding? I know i need to improve, thanks for the compliment though.
you deciphered my post already.. Now thats some real intelligence!!
Tech JobsRe: They Call It Arduino by Olyboy16(m): 1:58am On Jul 21, 2014
Wao!!! I'm so gona get this
ProgrammingRe: Sorting Out A Simple Text Dictionary With PHP by Olyboy16(m): 1:51am On Jul 21, 2014
Hmm...so these are dhtml's php codes..i c..nice work
CrimeRe: Two Bank Workers, Eight Others Die In Modakeke Osun State Robbery by Olyboy16(m): 1:08am On Jul 21, 2014
I passed in front of wema bank along ondo road in modakeke today on my way to ore. I dint see any sign of attack o! And the area dint luk lyk one that just got traumtised lately.
OP can you please post pictures, maybe i'm the one wrong here

1 2 3 4 5 6 7 8 ... 11 12 13 14 15 16 17 18 (of 18 pages)