English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Programming & Design - November 2006

[Selected]: All categories Computers & Internet Programming & Design

I have 2 classes, Base.class.php and MyClass.class.php. MyClass extends Base. Base has a var $link which is initialised as a mysql database connection when the constructor is called.
Base also has a function destroy() which closes the link.

Each page uses $myClass = new MyClass(); thereby initialising $link in Base. At the end of each page I call $myClass->destroy() to close the $link in the parent class. This works OK.

The problem is that when I instantiate AnotherClass.class.php which also extends Base, and is also used in the same pages, that when I call $anotherClass->destroy() before I call $myClass->destroy() it closes the $link in *both* $myClass *and* $anotherClass. This causes an error because $myClass should still be open for use.

What is $link in each Base class? Is it a reused connection? Is it an existing open connection? Is it a page scope connection? How should I get around this? Using true on the mysql open connection? Or never using destroy()?

2006-11-08 19:41:50 · 2 answers · asked by a11st4rc 2

E.g if my website is www.sabiyallinks.com,after registeration,it should not become www.bravehost.sabiyallinks.com.And the registeration should also be free!

2006-11-08 18:29:40 · 2 answers · asked by Anonymous

Here is the code i want to modify. I want the dice to show as images instead of being drawn. How could I go about doing that?

http://www.webbasedprogramming.com/Teach-Yourself-Java-1.1-Programming-in-24-Hours/html/ch22.htm#Heading15

2006-11-08 18:29:36 · 1 answers · asked by h2gj87 4

I need to add a fixed background to my site but i want to use an image from my computer.

2006-11-08 18:28:20 · 3 answers · asked by Anonymous

okay so on myspace i have a layout site but i wanna learn how to make layouts without usng a generater any help?

2006-11-08 18:27:18 · 2 answers · asked by beenaabutt 1

I have been having problems with my Java, I only need it to play on pogo.com no other reason, but it is verry slow to work, and sometimes wont work at all. I have downloaded the latest version, and still the same problem, Can anyone help me in simple terms, I am not very good with comps and this is an older one, waiting for the new one to arrive, but until then im stuck with this lol. Please Help

2006-11-08 18:14:39 · 1 answers · asked by skybluebabyboo 3

0

Below is url of the page.you will get some text on the page.From that text you will get a hint of the next page & based on this you have to modify the url to get the next page.

http://www.freestuffhotdeals.com/hacker/1.html

Please let me know till what page number you are able to reach.

2006-11-08 18:05:40 · 5 answers · asked by Anonymous

What is the system of storing data on pen drive.

2006-11-08 17:55:51 · 8 answers · asked by hkd 1

2006-11-08 17:38:00 · 4 answers · asked by deepak y 1

2006-11-08 17:35:56 · 2 answers · asked by richa b 1

The source code is for a community video website.

2006-11-08 17:17:20 · 6 answers · asked by Ricardo 1

I have a very simple HTML file containing PHP scripts. Even though
I enabled PHP, PHP scripts doesn't seem executing when
embedded in HTML files with .htm or .html extensions.
It only displays 'Toto' and not 'Tada' with the .html file
shown below.

It worked fine when I renamed the file with .php extension.
All my menu's built using .html file extension as I'm using
Yahoo! Site Builder. Is there any way I can get PHP scripts
working embedded in .html file?

-----


Toto


echo "

Tada

"
?>


-----

2006-11-08 17:13:16 · 5 answers · asked by bbs 1

Is it possible to write a macro (macros), which would allow me to transport my HTML code from "MS Word" into "MS FrontPage"?

2006-11-08 16:54:10 · 2 answers · asked by dolempap 2

hello, to any1 familar with python programing, I'm to do this assigment for comp sci 30, i've been trying for a week still can't get it to run, the assignmet is:

1. Write a program that calculates the number of quarters, dimes, nickels and pennies necessary to generate the number of cents entered as input.

For example, if 93 cents is entered as the input, then the program should indicate that 3 quarters, 1 dime, 1 nickel and 3 pennies are necessary to add up to 93 cents.

i've been given the resource http://www.ibiblio.org/obp/thinkCSpy/
as well as http://rgruet.free.fr/PQR24/PQR2.4.html

the first link is better, can any1 help me, i've managed to get it to work with that def thing but it doesn't save the change value, can any1 help me do something similar? the teacher hinted me, that it was something to do with one while statement, and o buch of other different kinds statements working under it

2006-11-08 16:40:50 · 2 answers · asked by icemaster1500 5

when i do print_r i get this output. i want to store the value of invoice,product in db but how to ?
Array
(
[List] => Array
(
[0] => Array
(
[invoice] => S4098d
[product] => Compressor
[dc] => Compressor
[cetsh] => 84143000
[rf] => Compressor - RE
)

[1] => Array
(
[invoice] => Dsds2332
[product] => Air Conditioner
[dc] => Air Conditioner -Split System less than 2 ton
[cetsh] => 84151010
[rf] => Split type
)

)

)

2006-11-08 16:21:47 · 2 answers · asked by itajooba 1

8.Two program A and B are running in a multiprogramming environment. Program A outputs much data to printer. Program B produces very little output. Describe a suitable scheduling policy in this case, explaining your reasons.

9.An airline booking system makes use of a real-time OS. Define real-time and explain why it is necessary in the airline booking system.
This is a mechanism that interrupts at fixed intervals of real time, and is needed for accounting and scheduling purposes. In some systems multiprogramming makes use of a real-time clock which initiates interrupts to the operating system allowing it to allocate timeslices to programs. This technique can also be used to share CPU time among a number of a multi-access environment.

2006-11-08 16:10:48 · 2 answers · asked by yy 1

0

2.State the objectives of an OS when implementing multiprogramming.

3.(i) What is mean by round-robin scheduling.
(ii) Explain why road-robin scheduling is a suitable strategy in an interactive multiprogramming system.

4.Explain how the operating system of a computer users partitioning to manage virtual memory.

5.A word processor operator selects word in a document and formats it to bold lettering. There is an appreciable delay before the action is carries out. The next time bold is selected, it takes effective immediately. Explain why this happens in terms of virtual memory.

6.Explain how the operating system of a computer users partitioning to manage virtual memory.

7.Define deadlock. What causes it and how might the OS recover from a deadlock situation.

2006-11-08 16:07:51 · 4 answers · asked by yy 1

Trying to build a web page for my small company and I don't have time to BS learning the software and reading books. I know of FrontPage but is there anything else? I am not interested in 10 dollar software which is just a bit too tacky.

2006-11-08 15:51:45 · 4 answers · asked by ChillinForrealin 2

i need a asp component to resize images that will resize
propotionately based on the width and height

2006-11-08 15:51:21 · 2 answers · asked by arunicbe 1

i wanna have one part of my website which members can log in. how can i do that? i use golive.

:-) thanks alot!

2006-11-08 15:49:25 · 4 answers · asked by Z.G. 1

I have one on yahoo, but my photos are not showing up, i can see them myself and i have tried and tried to make it visible to others but sometimes it shows up and sometimes it doesnt..i have it on public so everyone should be able to see them

2006-11-08 15:24:09 · 3 answers · asked by Frank 3

I have designed a serie of alphabetic shapes(on paper) and now I want to create a font file to use it in computer. wich softwares help me to do it?

2006-11-08 15:10:56 · 1 answers · asked by Ormoz 3

I am writing a jsp where i select time thats in am pm format example 9 pm but when it sends it to the servelt using httprequest it is in the 24 hrs format ie 2100 ,now this is a String,how do i convert it to Date and then to am pm format

2006-11-08 14:58:23 · 2 answers · asked by alfia_09 1

I have to use a lookup function for the following and I can't for the life of me figure it out.
Data:
Freshman 0 to <32 credits
Sophmore 32 to <63 credits
Junior 63 to < 94
Senior 94 or more credits.

Basically, I was given a spreadsheet and have to fill in all the columns using formulas and this is the only one I cant get. Credits start in E5, for example E5 contains 57 E6 contains 94 and so forth... i need to come up with a formula that will allow in G5, Sophmore to come up without typing it in, so if the credit count changes everything else will also automatically. I hope some kind soul can help me. This is proberly so easy, I am just so tired , been at it for 4 hours doing the whole spreadsheet. thanks in advance

2006-11-08 14:44:44 · 9 answers · asked by Jaym 2

Thanks for any help. I don't really know it all other than to copy and paste pre written stuff and follow directions as to adding it where needed. So the more simple the better.

2006-11-08 14:13:47 · 4 answers · asked by teeger671 3

2006-11-08 14:10:02 · 5 answers · asked by cardcatcher0 2

I was curious to know if the namespace standard, given the object name "std" was some type of joke...similar to something like GNU (Gnu is not Unix, Made from 100% recycled pixels , ect). It just seems like an odd choice for a three letter acronym.

2006-11-08 14:02:23 · 1 answers · asked by D 4

I'd like to know how to link, but I don't know that much. How do you copy a URL, like you do when you copy and paste? Please explain in detail...thank you in advance.

2006-11-08 13:57:49 · 4 answers · asked by Strange Design 5

I made databases customer1 & client1 using 1 PHP program.

2006-11-08 13:43:16 · 4 answers · asked by edwinbiasbas 1

please answer it seriously!

2006-11-08 12:45:20 · 4 answers · asked by nevikenezer 3

fedest.com, questions and answers