Politics › Re: Will You Vote For Jonathan In The Forthcoming Election? by jacob05(m): 10:02am On Apr 08, 2013 |
No, No and No. I dey craze ? Why should i vote for an incompetent and confused "figure"? Nope not again; |
Computers › Re: Ubuntu Linux by jacob05(m): 2:36am On Apr 03, 2013 |
My Ubuntu 13.04
|
Computers › Re: Ubuntu Linux by jacob05(m): 6:46am On Mar 31, 2013 |
Wow, ubuntu 13.04 is the best... very fast.... Unity now faster.. great !!!! |
Computers › Re: Ubuntu Linux by jacob05(m): 9:24pm On Mar 30, 2013 |
4llerbuntu: greatest beta ever . 13.04
i dunno what possessed me into upgrading my main work box to 13.04 beta, but it has been a great decision.
has to be the best ubuntu install i ever had
how to? Upgrading now !!! |
Programming › Re: Please Advice On The Best Platform For A Webapp by jacob05(m): 3:22am On Mar 25, 2013 |
Fayimora: Why not use what you already know? I HATE PHP but if that's what you know, then go for it bird.
Good luck Why  |
Jobs/Vacancies › Re: Top Ten Worst Jobs To Have In Lagos by jacob05(m): 3:16pm On Mar 19, 2013 |
LOL @ No 2 |
Programming › Re: Developing A Facebook-like Ticker For Nairaland by jacob05(m): 6:15pm On Mar 17, 2013 |
subscribing.. |
Webmasters › Re: 509 Bandwidth Limit Exceeded - Nscdc.gov.ng by jacob05(m): 5:28pm On Mar 15, 2013 |
Are you kidding me, That's a .gov site. Ø ga ø... My Oga at The Top should have an explanation. |
Politics › Re: APC Rejects INEC's Call For Name Change by jacob05(m): 3:29am On Mar 14, 2013 |
reserved |
Politics › Re: Owners Of Oil Wells In Nigeria Unveiled By Segun Adeniyi by jacob05(m): 3:28am On Mar 14, 2013 |
wow... |
Tech Jobs › Re: Sitepoint Books For Sale by jacob05(op): 12:44pm On Mar 11, 2013*. Modified: 8:54pm On Dec 07, 2016 |
void |
Tech Jobs › Sitepoint Books For Sale by jacob05(op): 12:43pm On Mar 11, 2013 |
PHP & MYSQL: NOVICE TO NINJA, 5TH EDITION - N4500
JQUERY: NOVICE TO NINJA, 2ND EDITION - N4500
PHP MASTER: WRITE CUTTING-EDGE CODE - N6000
THE PRINCIPLES OF BEAUTIFUL WEB DESIGN, 2ND EDITION - N5000
|
Food › Re: What Food Aroma Can't You Resist? by jacob05(m): 7:54am On Mar 01, 2013 |
Fried Eggs, beans and Freshly baked Bread |
|
Programming › Re: Payza Sendmoney Api In Java by jacob05(m): 9:38pm On Feb 06, 2013 |
o Javanian: Thanks for your review, you have made some valid points that i will look into when am less busy....
The C# implementation is available here https://dev.payza.com/sdks-and-sample-codes/net/api/SendMoneyClient.cs you're welcome. ooh i see, your version is just a mirror of the CS version, That's where the bad code smells from. Would be anxiously waiting for the next version |
Programming › Re: Payza Sendmoney Api In Java by jacob05(m): 12:26pm On Feb 06, 2013 |
Cool, Nice on Bro  {i mean MRS/MISS. LOL}. My Thoughts. 1. java.net.URLEncoder.encode((String)strCurrency); Bla Bla looks so Ugly.. can't there be just a function to encapsulate these ? 2. The sbDataToSend.append("&CURRENCY="  and sbDataToSend.append("&RECEIVEREMAIL="  and the rest . Can't they be passed by the user in an array {JSON Style} ? this i think would help if in future new parameters are added and would save the Programmer FROM Jumping into the CODE. Can you paste the C# implementation pls. |
|
Politics › Re: Boko Haram Demands N26bn From FG, Borno Government by jacob05(m): 9:33am On Feb 02, 2013 |
fools |
|
|
|
|
|
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 8:48am On Jan 04, 2013 |
pastebin.com/rWhEvaYw |
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 8:33am On Jan 04, 2013 |
lordZOUGA: this code breaks if the input contains zero Nice catch boss! Fixed #include <string> #include <vector> #include <functional> #include <iostream> #include <algorithm> #include <sstream> using namespace std; void split(const string& s, char c, vector<string>& v) { string::size_type i = 0; string::size_type j = s.find(c); while (j != string::npos) { v.push_back(s.substr(i, j-i)); i = ++j; j = s.find(c, j); if (j == string::npos) v.push_back(s.substr(i, s.length( ))); } } bool isIntergerFamily(string value){ int myint =0; stringstream(value) >> myint; return ((myint != 0) || (value == "0" ) ) ? true : false; } template <class T> void printOut(vector<T> temp ){ for (int i = 0; i < temp.size( ); + +i) { cout << temp[i] << " "; } } template <class T> void maskOrder(string type, vector<T> inputVector, vector<string>& maskVector ){ stringstream ss; for (int i = 0,counter = 0; i < maskVector.size( ) && counter < inputVector.size() ; ++i) { if(type == "int" && isIntergerFamily(maskVector[i])){ ss.str("" ; ss << inputVector [counter]; maskVector[i] = ss.str(); counter++; } if(type == "string" && ! isIntergerFamily(maskVector[i])){ maskVector[i] = inputVector[counter]; counter++; } } } int main( ) { vector<string> splittedString; vector<string> tempVector; vector<string> stringVector; vector<int> intergersVector; int myint; string inputString; cout << "Enter String :"; getline(cin,inputString); split(inputString, ' ', splittedString); tempVector = splittedString; sort(tempVector.begin() ,tempVector.end()); for (int i = 0; i < tempVector.size ( ); ++i) { if (isIntergerFamily(tempVector [i])){ stringstream(tempVector[i]) >> myint; intergersVector.push_back (myint); }else{ stringVector.push_back (tempVector[i]); } } maskOrder("string",stringVector, splittedString); maskOrder("int",intergersVector, splittedString); printOut(splittedString); }
|
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 7:57am On Jan 04, 2013 |
|
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 12:30am On Jan 04, 2013 |
lordZOUGA: @jacob05, nice one boss. Seems as if you learnt coding with "C++ cookbook"... You can do better though yes boss  |
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 6:46pm On Jan 03, 2013 |
|
Programming › Re: Sorting List Of Numbers And Strings: Simple Puzzle by jacob05(m): 6:43pm On Jan 03, 2013 |
@lordZOUGA i hail ooooo I'm Quite new to C/C++ but here is my lengthy version... #include <string> #include <vector> #include <functional> #include <iostream> #include <algorithm> #include <sstream>
using namespace std;
void split(const string& s, char c, vector<string>& v) { string::size_type i = 0; string::size_type j = s.find(c);
while (j != string::npos) { v.push_back(s.substr(i, j-i)); i = ++j; j = s.find(c, j);
if (j == string::npos) v.push_back(s.substr(i, s.length( ))); } }
bool isIntergerFamily(string value){ int myint =0; stringstream(value) >> myint; if (myint != 0){ return true; }else{ return false; } }
template <class T> void printOut(vector<T> temp ){ for (int i = 0; i < temp.size( ); ++i) { cout << temp[i] << " "; } }
template <class T> void maskOrder(string type, vector<T> inputVector, vector<string>& maskVector ){ stringstream ss; for (int i = 0,counter = 0; i < maskVector.size( ) && counter < inputVector.size() ; ++i) { if(type == "int" && isIntergerFamily(maskVector[i])){ ss.str("" ; ss << inputVector[counter]; maskVector[i] = ss.str(); counter++; } if(type == "string" && !isIntergerFamily(maskVector[i])){ maskVector[i] = inputVector[counter]; counter++; } } }
int main( ) { vector<string> splittedString; vector<string> tempVector; vector<string> stringVector; vector<int> intergersVector; int myint;
string inputString; cout << "Enter String :"; getline(cin,inputString); split(inputString, ' ', splittedString);
tempVector = splittedString; sort(tempVector.begin(),tempVector.end());
for (int i = 0; i < tempVector.size( ); ++i) { if (isIntergerFamily(tempVector[i])){ stringstream(tempVector[i]) >> myint; intergersVector.push_back(myint); }else{ stringVector.push_back(tempVector[i]); } } maskOrder("string",stringVector,splittedString); maskOrder("int",intergersVector,splittedString); printOut(splittedString); }
|
Education › Re: Unilorin 2012/2013 Admissions by jacob05(m): 7:30pm On Dec 15, 2012 |
prodahood: poor usage of English. .....you better than that bro...bravo prodahood: poor usage of English. .....you better than that bro...bravo See Person wey dey correct Person.. lol... Olodo Dey Correct Olodo |
Programming › Re: Are There No C++ Proogrammers In The House? by jacob05(m): 11:46am On Dec 15, 2012 |
|
Programming › Re: [C++ Open Source] Relax! ( File Management Tool) by jacob05(m): 12:30pm On Nov 25, 2012 |
|