iGuest
Members-
Content Count
72,093 -
Joined
-
Last visited
-
Days Won
5
Everything posted by iGuest
-
Hey subo,If you could provide the page before you made the javascript external, it'll help me understand what to do, or you could provide the javascript files. To me it might be you're only calling one script when you need to call both in your <body onload=... line. If you do need to call two functions, just insert a semi-colon ; between it and call the other function too, another problem could be the body hasn't completely loaded when trying to use the scripts on the document.Also always put your javascript files in LIFO order, e.g. the first external script file would be called last, while the last external script file would be the one you want first. This means all the script files will be loaded first before needing to use them.Cheers,MC
-
OK, now to talk about pointers. Pointers are extremely important in C++, especially for handling memory. Pointers provides us a way of accessing the data in that variable without using the variable's name, in other words they can represent another way of accessing memory with an address instead of a name as with variables. In fact pointers excel excel at working with memory, not just because you can store memory addresses in them, but also because you can assign those addresses at runtime and that's the secret behind dynamic memory allocation in C++. Every pointer you use must have a type in C++. For example a pointer that points to an integer is an integer pointer, a pointer to a double is a double pointer and so on. You can also have a void pointer which you can cast to whatever type you need at the time, which I'll talk about later on when I get the chance. As far as C++ is concerned, memory is divided into three areas, automatic storage where a function's variables are allocated and stored when you enter the function, static storage, where data that is declared static is stored and left for the duration of the program's runtime and the free store (in C it's called the "heap"). The free store is memory set aside for the use of your code at runtime, and you can allocate and handle space in the free store using the C++ new and delete operators. Being able to allocated and free memory at runtime is a great asset to a program, it's probably important to note that when you're dealing with pointers you are also working with memory management. Being able to allocate space for many elements as you need at runtime dynamically, is in most cases far more efficient. The new operator returns a pointer, so when you do say a new double, you need to assign a double pointer to it to be able to access that memory location. Just some code to show what I mean: #include <iostream>using namespace std;int main() { double *ptr = new double;... In this example I've allocated space for a double variable named ptr with the new operator. When I'm done with the memory I would use delete operator to free it. Another thing to note, is if new is unsuccessful, it will return a NULL pointer which has a value of 0 and most of you would have seen error messages that tell you it's impossible to write/read from address 0x00000000, well this is usually the case when a programmer forgets to check whether new was successful or not (there are other reasons too). So always check if the pointer returned from new is not NULL else you might need to retry doing it or exit your program. Another key thing to know about pointers is the arithmetic, the easiest thing to do is increment a pointer, and this is where a pointer is quite intelligent, a pointer will increment by the sizeof(type of pointer), so if I had an integer pointer and increment it by 1, it will increment by 4 bytes which is the size of an integer, and usually if you've named two integer variables and pointed the pointer to the first one, incrementing it should hopefully get you to the next named variable's address unless some form of protection is in place. There's also similarities between pointers and arrays but that's a bit in depth for me to go into as it'd mean I'd have to explain arrays too and I'm trying to stay with pointers I guess another thing to talk about with pointers is using them with structures. A pointer points to a data item in memory, but with a structure, you need more information. Say you wanted to point to a member of a structure and not just a whole structure itself. In that case, you need to specify exactly what member of the structure you want. So first of all you would point to the whole structure, then you could dereference it and use the dot operator and then the member you want or you could use the proper C++ way which doesn't require the pointer to be dereferenced, using the arrow operator. I guess another example is needed: #include <iostream>#include <string>using namespace std;int main() { struct structure{ string text; } structure1; structure *ptr = &structure1; ptr->text = "Hello, World!"; // Notice no dereference asterisk (*) and the arrow operator - preferred method cout << (*ptr).text << endl; // Notice I'm using the dereference here and the dot operator - still works this way too return 0;} As you should be able to tell, the preferred method is what you should get use to doing, however some people are use to the other method, both still work the same, so the best thing really is understanding that these two methods are exactly the same so it helps to just know these two ways otherwise you might get stumped by someone elses code (which is quite common, especially when you see their optimising techniques that makes code ugly to read just for performance). OK, I still haven't finished, but there's really a whole lot more to talk about with pointers, things as pointers to functions, passing arguments to functions by references, pointers to objects and object members, creating a copy constructor, virtual methods and runtime polymorphism, pointers in class templates, dynamic_cast with pointers at runtime... well you should get the idea, pointer is very important and you should really get a good understanding of pointers as it will be something you'll need to use in large projects (small projects would be good too if you get use to them now) Now most of this information is just going off by memory, I sort of stopped C++ programming a couple of years ago and just dabble in it every once in a while. I've switched over more to web environment development and tested CGI/C++ (which as far as I know, google has done a bit of that) but I'm completely happy with the web languages available and spend more time doing that than C++ these days but I'm always happy to provide what knowledge I do have of most languages I've learnt along the way, even if I rarely get the chance to visit here as much. Cheers, MC
-
Zedge is bad Download Free Mobile Thems, Wallpapers Ringtones <p> Zedge has crashed my desktop and laptop. You upload what you want ! come on people think about it ! the site is targeted by every hacker on the planet ! (aleedsfella37). DO NOT USE ZEDGE if you value you pc.</p> -reply by aleedsfella37
-
Auto update cells in different workbooks? MS Excel -- Automatic Update Of Data <p>I have a rather elementary query.</p> <p>I have a cells in a master workbook containing values for a certain person</p> <p>now these values are changed everyday.</p> <p>these values are also copied in a no.Of other workbooks.</p> <p>I want that these cells in the other workbooks update themselves to the value of the cell in the master workbook</p> <p>thanx</p> <p>Abhinav </p> -question by Abhinav Mehra
-
I found the book quite a wonderful read. I finished it in October. (WARNING: SPOILERS) The book was named "Brisingr" because that's what Eragon named his new sword made by the elven smith. It's a special name because whenever he utters its name out loud, the sword bursts into flame in his hands. Rhunon says this is probably because Eragon discovered the sword's true name. The sword is said to be the most beautiful sword she had ever crafted. Sorry guys! I won't give anymore spoilers... -reply by greenleaf
-
Ok, so I'm no scientist.. Yet.. Maybe not ever. I'm not completely sure exactly if you think the same way about the benefit of bending light. If this isn't actually a theory already, I'm sure they have thought of it. Are you saying that; since light can bend due to the presence of a gravitational field ( just as planets do[?]), if we can travel at the speed of light ( taking in account that we have the ability to move a mass so large) while being able to bend our direction toward our destination, we would get there in a shorter amount of time. Do you have any idea what I am thinking about? Because I don't truly understand and am not educated in this matter, but I am interested. And will learn as you speak. -question by Alexader Whatmore
-
Well... I like trickster...I also like albatross18(you guys might hate it...Its golf), lunia, elsword(warning a korean game), Grand chase, mabinogi, la tale(switch to this if you play maple-ownz it) a couple more...I'm currently on a search for more good ones... -reply by Kooh
-
I need Rap Lyrics Can somebody write me some? plz..
iGuest replied to supyo's topic in Art & Creativity
some crap hahaRap Lyrics Oh I love him , he's like the wind , that comes in my arms ,but he aint cold he's warm , kiss on the lips , that makes our kiss , so special , that makes us go to another level , I love him , like he loves me , we get together every day on every week.. He nevers cheats , I never cheat ...Smoke weed , get high , try to fly , if you hate why we SOO fly cause our love never Dies! -reply by s.C.B -
I think if anyone commits rape they loose there right to live. They have ruined that womens life forever and they should suffer the consequences. Especially statutory rape, that is the most hennas and horrible crime I have ever heard of. It ruins that child's life and ruins that child's families life also. Rape is not just one action it causes multiple reactions in the person and it hurts everyone. In my opinion rapists need to be burned alive and sentenced to an eternity in hell's deepest pit of sulfur. -reply by nightlash
-
SA2B Or SADX Sonic Adventure 2B or Sonic AdventureDX?
iGuest replied to DingDong01's topic in Computer Gaming
Replying to FeedBacker If your still looking for an answer there is not a garden in the dark and hero garden(s)... The hero garden has flowers scattered all over but I wouldn't conciter it a garden... -reply by j1888 -
Read-only Problem on ALL folders on 2 different computers after installing Service Pack 3Read-only Folders In Xp I've been trawling the forums for an answer but there are none in particular. This evening I installed SP3 on 2 computers - my mistake for not waiting for a successful trial on the 1st one but it did all look ok. (Hindsight sucks)Whilst trying to edit a word document (after the upgrade) any attempted saves resulted in an error message, hence drawing my attention to the fact that the Read-only box in the Folder Properties form is greyed out. Attempts to change this have failed and attempts to log back in using Safe mode and editing the read-write sttings for the folder have not worked. (The XP version is Home Edition, at least for computer #1 anyway) An article on Microsoft's support site says to use the attrib command within the command prompt but this did not work. Have Microsoft screwed up my computers or is there a fix I can use without going into the ommand prompt? (I can't roll-back pc #1 because I had tured off the feature to gain some performance a while back.) Can anyone please help? Many thanks.
-
Beautiful Red - Astrid Van Der Veen Doesn't get more depressing than that. Anything Evanescence Burn, by The Cure
-
cant get into google mail Cannot Sign In To Gmail <p>I have correct username <a href="mailto:?????@googlemail.Coim">?????@googlemail.Coim</a> and correct password for 2 email addresses in google mail both working fine till today now yhey are being rejected and there is no one to help and not covered in all the google blurb. Anyone help please! </p> -reply by will
-
Fake or realFirst Moon Landing Is A Fake?I watched the moon landing in 1969. I didn't believe it was real then and I don't believe it is real now, Just like I don't believe there had to be a 3rd world war because there were weapons of mass distruction and I don't believe Osam Ben Laden was the one who had anything to do with the explosion of the twin towers in New York. America is a very rich country and they want to keep it that way and I believe they will resort to a lot of things to make sure no one stops them from getting richer or being the most powerful on earth by hiding things and espionage or insider trading on the stock markets and much more. They could do a lot to make a safer environment, cars that don't need gas, feeding the poor people of the world, but, you only hear about how much money they give out or spend on the military, on weapons of war, on invading other countries and on bailing criminals out who cheated on the stock market and insider trading and raising prices for the oil and kicking poor people out of their homes because they lost all their income and can't pay their mortgages. A rich country like America could pay off the debt of all poor people rather than making war. The trillions of dollars spent on war alone could feed every man, woman and child in America. Who are the big wigs in washington trying to kid.
-
sorry I have many questions :D 1.How to write the code of the Add function that takes a letter as a parameter and adds it to the tree in the right place. 2.How to write the code of the Search function that takes a letter as a parameter and returns true if the letter exists and returns false otherwise. 3. How to write the code of the Traverse_Left_Root_Right function the traverse the tree in the order left-root-right and writes the letters in the tree. 4. How towrite the code of the Traverse_Root_Left_Right function the traverse the tree in the order root-left-right and writes the letters in the tree. 5. How to write the code of the Traverse_Left_Right_Root function the traverse the tree in the order left-right-root and writes the letters in the tree. 6. How to write the code of the Delete function that takes a letter as a parameter and deletes it from the tree. sorry if I asked to much but I hope to answer me quickly as soon as possible -question by mona
-
well we don't like tall tall guys we only want a guy thats taller than us so we wont feel weird thats how it is its superficial ya but the guy has to be taller than the girl but in otherwise no we don't like tall tall guys- just guys that are taller than us lol -reply by samantha
-
SIMPLEST WAY TO MAKE MONEY IN RSHow Do I Make Gold Fast In Runescape/Get your stats up to at least 40 str 40 atk 40 def and kill green dragons in wilderness hides are worth about 1.6k each and bones are worth about 2.7k I think 50k/trip -reply by iGuest
-
Reservation rewards and Just Flowers are both scam artistReservation Rewards - A Scam!I too was scammed by this company. My wife ordered flower for a family funeral in September from FTD Just Flowers 1-310-954-0755. We just noticed that Reserveation Rewards was charging us $12.00 a month in Sept, Oct, Nov and December. When asked what the charges were for and what I get in return, the answer was nothing. What a F__ scam. FTD Just Floweres is just as guilty of ripping people off as Reservation Rewards for even dealing with these folks. Now my $74.43 floweres for a loverd one have cost me $122.43 thanks to theses charges. Everyone should contact the Attorney generals office in Connecticut to complain since the company is based in CT. David G.
-
When I have more time I'll talk about pointers, in 5 minutes I'm travelling for 2 hours, so won't be back for a while.Pointer to pointer points to the address of a pointer, remember pointers themselves also get a memory address. Not to be confused with the commandline argument which is a pointer to an array of pointers.OK, I must go but I will do a thread on pointers here.Cheers,MC
-
Linux Wireless Problem Ubuntu (Wubi) fails to see the wireless card
iGuest replied to iGuest's topic in Computer Networks
It seems a reported errorLinux Wireless Problem1) use the button or shell methods to see if your wireless card is known to ubuntu.2) if not see release notes of your ubuntu distribution to see if your card is supported.(see below)3) if it is supported, see if there is not a reported error about that behavior. (you may try to restart your computer with wireless turned on) (see below)4) if ubuntu sees your card, then try to connect manually selecting your network by clicking the network button on the panel.5) if you can see it, but connection is not established, there is some configuration or reception problem.6) also try 1-5 starting from the live cd============================================================================What Ubuntu version you have?See the link release notes of your version.In 8.10 there is an error that hides wireless networks if you do not start your pc withWireless turned on.See release notes for your version, also to see if your hardware is supported.----------------------------------------------------------------------------An easy thing to do, is to add the network monitor button to the panel.It is loaded by default has two black screens overlapping, while connected to wireless it changes to a stair bar diagram showing signal intensity.Click that button, you will see if wireless signals are detected. If you can see your modem, then your hardware is working. The problem may be to configure it right.Normally it works automatically, asking user/password if secured, or just working if unsecured.----------------------------------------------------------------------------Other way to detect if your card is detected by ubuntu:1) open a terminal (menu/accessories/terminal)2) list your hardware typing: lshwYou should see something similar to this but with your card's data: *-network description: Wireless interface product: PRO/Wireless 3945ABG [Golan] Network Connection vendor: Intel Corporation physical id: 0 bus info: pci@0000:02:00.0 logical name: wmaster0 version: 02 serial: XX:XX:XX:XX:XX:XX width: 32 bits clock: 33MHz capabilities: bus_master cap_list logical ethernet physical wireless configuration: broadcast=yes driver=iwl3945 ip=ddd.Ddd.Ddd.Ddd latency=0 module=iwl3945 multicast=yes wireless=IEEE 802.11abg-------------------------------------------------------------------Good Luck! -
another template siteHtml TemplatesI download all my free templates from: Omnistaretools.Com/free-templates/ -reply by John
-
I agree that the eragon movie was horrible but you got to admit the guy who played eragon in the movie was so hot! His name is ed speleers. You should go to his site sometime. There are some awesome pictures of him shirtless! -Swimrgal
-
BrisingrNew Eragon BookI am only a third of the way done reading brisingr and so far the book rocks! There are many action scenes and exciting parts. Also Eragon and Arya become much closer friends. I wish Christopher Paolini would make Arya fall in love with Eragon! They would be such a cute couple! SPOLIER ALERT TO THOSE WHO HAVENT READ IT YET---Roran and Katrina get married and Katrina gets pregnant! This book is the best! swimrgal
-
how to simultaneously connect wired and wireless to internetConnect Using Wireless And Wired LineI have a notebook with wired, wireless and modem.It is wired connected to internet (54mb/s) and wireless via some neighbor's modem (27mb/s).I have ubuntu 8.10, the connection icon shows both connections working.When I download files the speed is 54mb/s, it is just using wired connection.How can I increase the transmission speed using both simultaneously?I would like to connect at 75mb/s at least.
-
DNS hijacked, but IP nowhere in sightDNS Hijack SearchAtHand.com Browser Result RemovalI found this website when searching for a solution to being constantly rerouted. Unfortunately it doesn't help for me, because I don't see the IP address anywhere, and everything is already set to work with DHCP. Might I be having a problem that simply looks like this one? Bert V.