Foreign Affairs › Re: China Bans Muslim Officials From Observing Ramadan by Olyboy16(m): 9:05pm On Jul 03, 2014 |
OliverPin: have you been thought about the early indept life of mohammed ? How E conquered arab? You should read and know how e did it, e did not preach doing that though. Now that's the sole motivation to all these terrorists. Quote me if am wrong, and plz don't tell me its "self defence because he started the insult, fight and ............ Ask ur imam if you don't trust the internet. Have a nice night ehn. PLEASE IS THERE ANY NON-MUSLIM HERE THAT HAS READ AND UNDERSTOOD ATLEAST 20 PAGES OF THE QURAN IN ARABIC  IF THERE IS, WHICH PARTS HAVE YOU READ THAT TELL MUSLIMS TO KILL UNBELIEVERS IF THEY REFUSE TO JOIN ISLAM? IS THERE ANY PART THAT SAYS JIHAD IS A MUST WHETHER OPRESSED OR NOT BY UNBELIEVERS? IS IT NOT WRITTEN THAT JIHAD SHOULD ONLY BE FOUGHT WHEN YOU ARE UNDER DIRECT THREAT OR DIRECT TORTURE FROM UNBELIEVERS? IS IT NOT WRITTEN THAT A MAN SHOULD ONLY MARRY ANOTHER WIFE IF HE IS WEALTHY ENOUGH AND HAS A TANGIBLE EXCUSE FOR DOING SO? DO YOU NOT SEE THE UNIQUE REVELATIONS THAT THESE TERORRISTS WILL SURFACE ONE DAY AND THAT WHEN THEY SURFACE, ANY ONE SUPORTING THEM WIL DWELL IN HELL WITH THEM!! I'm sorry i cnt quote but its somewhere in the bible that was written "a man who call another a fool is also one(and may end up in hell)". Do you xtians not see that mesage telin u dat no man has salvation except that wich has been given by God?? So cal no one a candidate of hell as if u ar God himself! |
Webmasters › Re: Please Help Review This Forum I Did For A Client by Olyboy16(m): 10:18pm On Jan 01, 2014 |
You still need some learning on tweaking and editing CMS bro... I'm sure u'r an expert im php. |
Programming › Re: Php Challenge by Olyboy16(m): 8:48pm On Jan 01, 2014 |
adeoba: ok: add a valid php mysql statement to the code.  hey, u should b posting this 4 every1 nt quoting me... Nd to ansa dat. //# $db is assumed an opened connection &show=&db->query("show tables"  ; if(!&show)die("error"  ; else echo "success" |
Programming › Re: Software Programming by Olyboy16(m): 8:20pm On Jan 01, 2014 |
Pythonian99: Please Python is not (just) a "scripting" language. Thanks  k bro.. Noted |
Programming › Re: Php Challenge by Olyboy16(m): 8:04pm On Jan 01, 2014 |
This topic looks interesting, can u guys pls give it some more challenges? |
Programming › Re: Php Challenge by Olyboy16(m): 7:54pm On Jan 01, 2014 |
//# used if(1=1)echo (!isset($_POST)) ? "no post recieved on this page" : "posts has been recieved on this page"; |
Programming › Re: Software Programming by Olyboy16(m): 7:40pm On Jan 01, 2014 |
birdman: ^sure bro. if its working for you, so be it 
if anyone is using this forum to learn stuff, you should know that 80% of what he just posted is wrong. anyhow im not here to argue endlessly so im not going to pinpoint anything - I have other things to turn my attention to. btw, stackoverflow is also a very good resource for anyone who hasnt used it yet. you can, and should use it to verify anything you read on nairaland owkay, nw he says i'm a learner:-D *grins nd sighs*. Wel like i concluded in my last post "it alright if u prefer scripts(i.e python), just dont stop defaming the big guys". Dear birdman, we ar al programers, i knw wat u dnt knw nd u knw wat i dnt... I'm disapoited u fink i was tryin to start an argument wen i simply "adviced" like odas here did, nd made some points clear. I develop python softwares too u knw bt i dnt overestimate its power over native langs. Nd if u say i'm 80% wrong, could just pleeasse point my wrongs out? ...i'l stop here.. |
Programming › Re: Software Programming by Olyboy16(m): 7:40pm On Jan 01, 2014 |
birdman: ^sure bro. if its working for you, so be it 
if anyone is using this forum to learn stuff, you should know that 80% of what he just posted is wrong. anyhow im not here to argue endlessly so im not going to pinpoint anything - I have other things to turn my attention to. btw, stackoverflow is also a very good resource for anyone who hasnt used it yet. you can, and should use it to verify anything you read on nairaland owkay, nw he says i'm a learner:-D *grins nd sighs*. Wel like i concluded in my last post "it alright if u prefer scripts(i.e python), just dont stop defaming the big guys". Dear birdman, we ar al programers, i knw wat u dnt knw nd u knw wat i dnt... I'm disapoited u fink i was tryin to start an argument wen i simply "adviced" like odas here did, nd made some points clear. I develop python softwares too u knw bt i dnt overestimate its power over native langs. Nd if u say i'm 80% wrong, could just pleeasse point my wrongs out? ...i'l stop here.. |
Programming › Re: Software Programming by Olyboy16(m): 7:40pm On Jan 01, 2014 |
... |
Programming › Re: Software Programming by Olyboy16(m): 5:50pm On Jan 01, 2014*. Modified: 7:37pm On Jan 01, 2014 |
birdman: I can give you several:
1. Lets look at this c++ statement. What you wanted to write was:
unsigned int variable=time(NULL)*9999;
Notice there should be NO pointer operator here. You want an unsigned integer, not a pointer to one. The crazy part is, there is a good chance you will corrupt memory silently with careless use of pointers.
2. Lets assume you actually wrote that c++ statement correctly, and used unsigned int. In python, you did not care about the size and type of your Variable. x could be a really large number and you would still get the right result. If time() returns a 32 bit number, there is a good chance your c++ variable will overflow. It gets worse. By using unsigned int in c++, you have can have a 32 bit number on some machines, and a 64 bit number on others. So you could test forever and never see this overflow on your machine. Someone else runs it and it breaks for them.
3. You need that del in C++, otherwise you will have memory leaks. In python, you typically do not need del. Part of its purpose is to hint the garbage collector. Why is this important? In a real c++ program, there will be several lines of code before delete, so forgetting a delete is very possible. If you forget the delete in Python, worst case is a less than optimal garbage collector. In C++, this is a memory leak. Not only with your program crash, but it will do so long afterwards. Memory leaks are nightmares to debug - this issue does not exist with Python
You wrote a 2 line c++ program, and I just showed you one bug that can cause memory corruption, one that will cause an overflow on some machines. I also showed you how Python is better than c++ in preventing memory leakage. What is even worse is that these are all silent bugs. They kill your program without you knowing immediately. By the time the crash becomes obvious, the footprint of these bugs is gone already. correcting my hastily written snippet: unsigned int * variable; *variable=time(NULL)*9999; delete variable; nd bout d 32-bit numbers u said causes overflow. I'm sorry, do u use ANSI c++? And i'm thinkin ur c++ environ is probably outdated. If non of these, then, i'l just say my debbuger has never told or show me any signs of variable overflows.. Even when i work with cryptographic intensive codes, my apps work with accurate precision. And why would a variable overflow occur in a 64-bit system? U declare a variable in 64-bit, it gets wat it needs shikena! Dnt confuse pple wit wat u arnt sure of.. The use of delete statement in c++ can be likened to opening a database conection in a constructor of a class and closing it in its destructor. 1. If u dnt close it, it does no harm bt u get heap dumps 2. Dats wat we call efficient programing. If any1 cnt handle d heat of langs like c++ nd likes nd seeks refuge in scripting, its fine. Bt dnt defame these languages. U knw their's no way u'l build a server or a database in scripting langs and get uptimum speed as in c++ nd oda native langs. Peace! |
Programming › Re: Software Programming by Olyboy16(m): 2:55pm On Jan 01, 2014 |
birdman: If you dig further, you will also see former C++ programmers either switching to Java, or recommending Python. Computer Science departments used to teach C as the first language. They skipped C++ and moved on to Java and Python for the same reasons. Python can be used as a scripting language, eg a replacement for Perl. But it is much more powerful than that. Can you write a music player in C++? Yes. But you could also do it in C. The question you have to ask yourself as a pragmatic programmer is which tool solves my problem best?
I saw one guy turn his laptop camera into an image recognition hardware to detect a cars parking in his assigned spot outside by finding and parsing the license plates. Next he trained his laptop to recognize his face. He did both demos in under 20 minutes, with less than 30 lines of python code. It would take a C++ programmer a a week or two of coding and debugging to come up with the same polished app.
Now I bet you some of those python libraries are written in C++ and C for speed, but the python programmer is free from the underlying complexity and can concentrate on his ideas. excuse me...wen u say that.. U'r talking about accessing inbuilt os tool and passing or lemme say scripting its control which any1 here with a good c++ knowledge knw that opening ports in c++ is a matter of including few libraries and few lines of clever codes. Again, that doesnt only apply to c++, in java accessing os tools was one of the main buzz java had with c++, though pple prefered c++'s native access back then, but wif few advances, accessin os tools is as easy as dawg...all high leveled programming languages ar built to bridge the gap btwn assembler/machine world of microcontrolers AVRs, EPROMs e.t.c to abstract human comprehensive codes. K, i got this guy who built a software in c++ that piled a server to windows and produced an interface that u could use to control and find anyfin on ur computer by just talkin to it or typing in some relevant texts. Wat do say bout dat? He finished it in less than 2hours. |
Programming › Re: Software Programming by Olyboy16(m): 2:35pm On Jan 01, 2014*. Modified: 3:27pm On Jan 01, 2014 |
Seun: Find a need. Preferably one that you have. And use C++ to solve it. But I think you should learn Python and learn how to mix it with C++ i dont think this is really necesary. C++ has evryfin u cn nid to develop any software, except wen it comes to GUI when which u should simply download the open source QT4 or 5, read so ebooks on it, nd dats all. U'r ready to create powerful nd awesome c++ apps without havin to slow ur codes down scripting python in. Oh nd bout the memory leaks and problems; you cant create memory efficient and short mighty apps in c++ if u think like a pythonist. Check this out. --Python--- Variable = [x*(x*x) for x in range(0,9999)] del Variable ---c++--- unsigned int* variable=time(NULL)*9999; delete variable; Now tell me how python is better at dis dan c++. |
Programming › Re: Microsoft Vs General Motors by Olyboy16(m): 2:06pm On Jan 01, 2014 |
U c, the GM's reply is kinda absurd and sentimental to me. Bill gates was just being logical by his point of reasoning... This reply to bill gates doesnt realy justify and answer the eye-opening question posted by gates... Ofcourse computers and cars ar two different machines. The GM is just being pathetic by comparin the defects and effects of the computer world to the heavy vehicle industry. I personaly thing vehicle creators are not realy vry much up their sleeves. No-harm-done! |
Programming › Re: [programming Levels] What Type Of Programmer Are You? by Olyboy16(m): 1:41pm On Jan 01, 2014 |
Djtm: you became an expert in just 3 years? Dude! we got different brians and resources dude |
Programming › Re: Are There Any Logical Programmers Here? Prolog Preffered by Olyboy16(op): 2:17am On Dec 15, 2013 |
femu: what type of assistance? you can send me an email: femu_2001@yahoo.com thank you so much bro, i'l sure email you. Thanks again |
Programming › Re: Are There Any Logical Programmers Here? Prolog Preffered by Olyboy16(op): 4:49pm On Dec 13, 2013 |
MODERATORS, PLEASE CLOSE OR DELETE THIS THREAD(duplicate)...THANKS |
Programming › Are There Any Logical Programmers Here? Prolog Preffered by Olyboy16(op): 4:43pm On Dec 13, 2013 |
i seriously find it "displeasing" that in nigeria, robotics/Logical Programming isnt a part of the motivations and inspirations of our programmers...CAN someone please tell me mayb their is probably a disadvantage in LP or its got bad market?? Nd ofcourse, i need a prolog programmer for some assistance..thanks |
Programming › Are There Any Logical Programmers Here? Prolog Preffered by Olyboy16(op): 4:37pm On Dec 13, 2013 |
Please, i find it "displeasing" that in nigeria, robotics isnt a part of the motivations and inspirations of our programmers...CAN someone please tell me mayb their is probably a disadvantage in LP or its got bad market?? Nd ofcourse, i need a prolog programmer for some assistance..thanks |
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 4:14pm On Dec 13, 2013 |
wisemania: bro what's your purpose for learning c++?......make i kw, weda make i 4get about c  one big advice bro: dont 4get any language u learn, you should rather improve on the ones you find easier...knwing multiple languages wil make you feel and think lyk a guru... |
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 4:10pm On Dec 13, 2013 |
wisemania: we're still learning bro.....with time we'll know this things...do well to solve Q4 for us in C...thanks u knw, i realy wish i could participate more by posting answers, bt NEPA has been doing their thingy for 2 days nw...so i'm on mobile..wil stil contribute d little i can though.. Nice work guys @adelolaa |
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 4:05pm On Dec 13, 2013 |
adelolaa: mine is working without that you cant judge by that since compilers behave differently u knw... |
Programming › Re: C/C++ Doctor: Get Help In Writing C/C++ Programs by Olyboy16(m): 3:49pm On Dec 13, 2013 |
wisemania: Q2: Implement a simple "password" system that takes a password in the form of a number. Make it so that either of the two numbers are valid, but use only one if statement to do the check. Q4: Expand the password checking program from earlier in this chapter and make it multiple usernames. Each with their own password and provide the ability to prompt user's again if the first attempt failed. Think about how easy(or hard) it is to do this for a lot of usernames and password.
Greetings to you all..i tried solving Q4 in c,bt am finding it difficult to create an array containing passwords(mixed with digits) ,and so many arrors....i did solve Q 2 correctly,but Q 4 is a pain in neck....ill be obliged if Q4 could be amicably trashed by by you all..thanks in advance... open your browser, type google.com, hit entert key. The resulting page should include a search bar, type ur question summarised in it. It'l get u ur ansa k?? |
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 1:13am On Dec 13, 2013 |
adelolaa: /***********---******************
Assignments: (if, else if and else statement)
HOD: ALEX ALLAIN
STUDENT: XARMZON
COURSE: JUMPING INTO C++
Q1: Ask the user for two user's ages, and indicate who is older, behave differently if both are over 100.
Q2: Implement a simple "password" system that takes a password in the form of a number. Make it so that either of the two numbers are valid, but use only one if statement to do the check.
Q3: Write a small calculator that takes as input one of the four arithmetic operations, the two argument to those operation, and then print out the result.
Q4: Expand the password checking program from earlier in this chapter and make it multiple usernames. Each with their own password and provide the ability to prompt user's again if the first attempt failed. Think about how easy(or hard) it is to do this for a lot of usernames and password.
SOLUTION TO Q4
******************************/
#include <iostream>
#include <string>
using namespace std;
int main() {
string username = " "; string password = " ";
cout << "Enter your usename and password:" << endl;
cout << "Username: " ; cin >> username; cout << "Password: " ; cin >> password;
if((username == "jeff" && password == "12hb" ) || (username == "judinho" && password == "jboy1" ) || (username == "andy" && password == "xarm" ) || (username == "sara" && password == "sarandy" ) || (username == "air" && password == "vaans1" ) || (username == "zesus" && password == "zenal" ) || (username == "sete" && password == "admin1" ) || (username == "wilson" && password == "bigh1" ) || (username == "doglaries" && password == "dogas" ) || (username == "onome" && password == "9087" ) || (username == "funky" && password == "1187" ))
{ cout << "Login successful!!!" << endl; } else { cout << "Access denied!!" << endl;
int confirm = 0;
cout << "press 1 to re-enter or -1 to quit" << endl; cin >> confirm;
if (confirm == 1) { cout << "Username: " ; cin >> username; cout << "Password: " ; cin >> password;
if((username == "jeff" && password == "12hb" ) || (username == "judinho" && password == "jboy1" ) || (username == "andy" && password == "xarm" ) || (username == "sara" && password == "sarandy" ) || (username == "air" && password == "vaans1" ) || (username == "zesus" && password == "zenal" ) || (username == "sete" && password == "admin1" ) || (username == "wilson" && password == "bigh1" ) || (username == "doglaries" && password == "dogas" ) || (username == "onome" && password == "9087" ) || (username == "funky" && password == "1187" ))
{ cout << "Login successful!!!" << endl; } else { cout << "Access denied!!" << endl;
cout << " Alert!!!! fraud!!!!!" << endl; } } else if (confirm == -1) { cout << "Program terminating! thank you" << endl;
}
}
// solution to quetion four by xarm lee }
end of chapter four questions i always tell coders to try and get used to the getline() function when inputing string...please opitimize your codes to use getline() to get only your desired number of string chars, dis would save you from buffer overflow errors |
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 1:08am On Dec 13, 2013 |
wisemania: bro how du u make ur programs interactive using d c4droid compiler... Coz i installed it yesterrday ran some codes on it,it ran perfectly well....but wen i tried makin it interactive using the input function ("scanf" for C-program and "cin" for c++ programs), the compiiler just ignored it like it waz neva there in my codes....d codes i ran could only print characters,i'd like u 2 explain in plain eng how u get 2 make ur own codes interactive using d "cin" command to read inputs from a user....*waiting patiently* it may not actualy be a technical compiler defect, try adding cin.ignore(); before your I/O statements to overload it. It should work then |
Programming › Re: If Programming Languages Were Cars by Olyboy16(m): 10:23am On Dec 03, 2013 |
umar745: LoL! You probably should drive around with a bag of pure water lol...lol |
Programming › Re: [programming Levels] What Type Of Programmer Are You? by Olyboy16(m): 10:18am On Dec 03, 2013 |
greenPHP: Please,How many years experience do you have on web deve.? 3years straight with intensive coding |
Programming › Re: [programming Levels] What Type Of Programmer Are You? by Olyboy16(m): 3:22am On Dec 02, 2013 |
Well, advanced on software langs, bt i can say expert on web....*humbly nd politely* |
|
Programming › Re: C++ Beginner Discussion Room: Drop Your Codes by Olyboy16(m): 3:13am On Dec 02, 2013*. Modified: 10:36am On Dec 03, 2013 |
Hello guys...assignment... Load the serial number and scores of 50 students in a class either hardcoded or prompting in a 2d array, then simply find the serial number with the highest score(u cn use 1d array if u cn achieve d same result)
goodluck friends!! |
Programming › Re: Three Nigerian Students Develop 'iTunes' - CNN by Olyboy16(m): 3:02am On Dec 02, 2013 |
|
Programming › Re: If Programming Languages Were Cars by Olyboy16(m): 2:50am On Dec 02, 2013 |
umar745: Assembly Language is a bare engine, you have to build the car yourself and manually supply it with gas while it's running, but if you're careful it can go like a bat out of hell.
Basic is a simple car useful for short drives to the local shops. Once popular with learner drivers, it has recently been stripped down to a shell and rebuilt by a major manufacturer, The new version has been refurbished for longer journeys, leaving only cosmetic similarities to the original model.
C is a racing car that goes incredibly fast but breaks down every fifty miles.
Cobol is reputed to be a car, but no self-respecting driver will ever admit having driven one.
C# is a competing model of family station wagons. Once you use this, you're never allowed to use the competitors' products again.
C++ is a souped-up version of the C racing car with dozens of extra features that only breaks down every 250 miles, but when it does, nobody can figure out what went wrong.
Fortran is a pretty primitive car; it'll go very quickly as long as you are only going along roads that are perfectly straight. It is believed that learning to drive a Fortran car makes it impossible to learn to drive any other model.
Java is a family station wagon. It's easy to drive, it's not too fast, and you can't hurt yourself.
Lisp looks like a car, but with enough tweaking you can turn it into a pretty effective airplane or submarine. At first it doesn't seem to be a car at all, but now and then you spot a few people driving it around. After a point you decide to learn more about it and you realize it's actually a car that can make more cars. You tell your friends, but they all laugh and say these cars look way too weird. You still keep one in your garage, hoping one day they will take over the streets.
Perl is supposed to be a pretty cool car, but the driver's manual is incomprehensible. Also, even if you can figure out how to drive a Perl car, you won't be able to drive anyone else's.
PHP is the Oscar Mayer Wiener mobile, it's bizarre and hard to handle but everybody still wants to drive it.
Python is a great beginner's car; you can drive it without a license. Unless you want to drive really fast or on really treacherous terrain, you may never need another car.
Ruby is a car that was formed when the Perl and Python cars were involved in a two-way collision. A Japanese mechanic found the pieces and put together a car which many drivers think is better than the sum of the parts. Other drivers, however, grumble that a lot of the controls of the Ruby car have been duplicated or tri-plicated, with some of the duplicate controls doing slightly different things in odd circumstances, making the car harder to drive than it ought to be. A redesign is rumored to be in the works.
Visual Basic is a car that drives you.
So what car or cars do you own? lovely.... I drive a php car, bt to me it seems to be very fast and efficient but cannot work in hot weathers. |
Programming › Re: for beginner C++ Programmers by Olyboy16(m): 9:28pm On Nov 26, 2013 |
9free: Yea, C++ is an improved version of C but I am yet read anywhere it was recommended for Control Engineering program development. Have you seen any?. well...C works well on embedded systems and control engines..bt C is mostly recomended over c++ ignoring the fact that most modern and latest systems today(servers, OS, control interfaces) are programmed using c++. I read through an online article some months ago on the use of c++ to create control interfaces for networks of security systems among servers, buildings e.t.c.. There ar also fine refinements of c/c++ worth mentioning when it comes to embedded systems..MISRA C/C++..is a good one, the good part is, their standards clips with ANSI. http://www.embedded.com/design/safety-and-security/4413297/Build-secure-and-reliable-embedded-systems-with-MISRA-C-C-and also, depending on how low-leveled your control interface requirement is, c++ should handle things just fine...c++ is used mostly in automated vehicle programming... |