Programming › Re: QUIZ: How Many Lines Of Code Can You Use To Reverse A List by orimion(m): 10:16pm On Jun 08, 2017*. Modified: 10:54pm On Jun 08, 2017 |
Two lines // JavaScript with some ES6 and recursion trick 
const list = ['a','b',3,NaN,undefined, 'i'], reverse = ([first, ...rest]) => rest.length > 0 ? [...reverse(rest), first] : [first] ;
console.log(reverse(list))
// One line with an IIFE thrown in the mix
console.log((function reverse ([first, ...rest]) { return ( rest.length > 0 ? [...reverse(rest), first] : [first]) } ) (['a','b',3,NaN,undefined, 'i']) );
|
Technology Market › Re: We fix your faulty laptop at pocket-friendly prices in Lagos. by orimion(m): 10:31pm On May 17, 2017 |
what could be wrong with a laptop that powers on but display refuse to work. It powers on normally but screen refuse to display (like it's dead) but the screen is not damaged |
Literature › Re: Nairaland Book Of Puns- Lovers Of Wordplay, Let's Pun! by orimion(m): 12:17am On Mar 17, 2017 |
She's hot but i'm not a fan 4 Likes |
Programming › Re: Is There Any Major Website In The World Entirely Developed By A Nigerian? by orimion(m): 7:07pm On Jan 29, 2017 |
"major websites" (most websites really) aren't built by a single person |
Programming › Re: I Need Help On C by orimion(m): 7:01pm On Jan 29, 2017 |
babajeje123: When I began self study on Java, someone encouraged me here to start with C. I wen on with my Java and I'm enjoying the learning. However, I just started my Msc and C is among those language we must know. I did C during my undergraduate days but can't remember a thing on it. I've downloaded "C How to Program" by Paul Deitel. Please, how do I get a compiler for C? Can I compile C on cmd like Java? If yes, how? If no, what should I do? Gracia! Yes if on linux GCC is installed by default just $ cc [some flags] *infile* [some flags] *outfile* you then run with $ ./outfile . You could also look into clang . I'm not sure for other OS |
Programming › Re: How To Spot A Bad Software Developer by orimion(m): 10:58pm On Jan 26, 2017 |
asalimpo: popular opinion, but b.s. I dont use google and i'm doing fine. he didnt call people that don't use google bad programmer, he said people who frown at using google. As for the matter of you not using google, I believe you have another source for quick reference (might be the documentation or even the source code) Trying to know everything offhand, I believe is a sign of a bad programmer |
Programming › Re: Learn And Practice Python Programming by orimion(m): 9:23am On Jan 20, 2017 |
johngorithm: what do you have in mind if I may ask....? nothing really, I was just curious |
Programming › Re: Learn And Practice Python Programming by orimion(m): 11:04pm On Jan 19, 2017 |
johngorithm: Because it's syntax structure is clearer and basically, the most widely used python version in the world. can you back this up with examples (clearer syntax) and facts (wider usage) |
Programming › Re: Learn And Practice Python Programming by orimion(m): 10:29am On Jan 19, 2017 |
Why py2.7? Don't give a support answer |
Programming › Re: Check Nairaland Speed With Other Sites In Naija by orimion(m): 7:15pm On Jan 17, 2017 |
Of course nairaland is fast, it's just a static site with very little interaction built with a table layout **shudders** and lest i forget with html4 |
Christianity Etc › Re: Mystery Trees With Arabic Inscription In Ogun Turn Tourist Attraction by orimion(m): 5:51pm On Jan 08, 2017 |
my people my people  forefront of religion, superstition and corruption. Bunch of hypocrites! We still have a hundred years of being a developing nation |
Christianity Etc › Re: Joseph Obayemi, Pastor Adeboye's Successor's Sermon by orimion(m): 4:20pm On Jan 07, 2017 |
I'll comment later.. busy now |
Programming › Re: Astro Programming Language 0.2 (indefinite release) by orimion(m): 9:53am On Jan 07, 2017 |
From the logo.png, it looks like index starts from 1(not 0). Why? |
Education › Re: Annual Xfire Nairaland Undergraduate Quiz Competition (scholarship) - Maiden Ed. by orimion(m): 12:05am On Jan 05, 2017 |
Ladies Akintola University of Technology ** 300L - chemical engineering ** email: ade_bayo11@outlook.com |
Programming › Re: What's Your Best and favorite Programming Language? by orimion(m): 12:20am On Dec 24, 2016 |
Noel1: Python for quick and light programming.
Javascript [ frontend $ backend ] for web applications
Java for heavyweight projects 
C / C++ for core and system stuffs
I used to love PHP then. But I said bye bye to that good friend of mine. feeling you |
|
Programming › Re: The Difference Between Java And Javascript by orimion(m): 6:44pm On Dec 13, 2016 |
worisj: Ok But You're Saying Java Is Harder To Learn Than Javascript Which At The Long Run Becomes Hard To Master. And I'm Saying Javascript Is Harder To Learn At The Begining But Easy To Master At The Long Run. To Say You've Mastered Java Would Mean To Know Anonymous Classes, Inner Classes, Threading, Generics, Collection Classes, Annotations, Lambda Expression, Regexp Etc This Topics Are No Joke For A Beginner To Master, Compared To Javascript!! I wouldn't know bro, I don't code Java. Maybe |
Programming › Re: The Difference Between Java And Javascript by orimion(m): 3:00pm On Dec 13, 2016 |
worisj: 3) Scoping : In Java Variables Are Said To Be In Scope When The{ } Is Encountered. Not The Same For Javascript, Variables Are In Scope When In Functions And To Make A Variable Visible To Only A Function An IIFE(immediately Invoked Function Expression) Has To Be Invoked That Has Its Own Special Syntax. { let a = 2 console.log(a) // 2 } console.log(a) // error and the reasons you mentioned above are what I meant by mastering JS. See Olumyco 's post above |
Programming › Re: The Difference Between Java And Javascript by orimion(m): 10:24pm On Dec 12, 2016 |
worisj: Have You Done Java Before? I just printed hello world! is all i've ever done with it |
Programming › Re: The Difference Between Java And Javascript by orimion(m): 9:48pm On Dec 12, 2016 |
dhtml18: Which one is more difficult to learn and master? JAVA or JAVAScript? JavaScript is super easier to learn but harder to master |
Programming › Re: Happy Birthday To Sycon Technology The Programmer! by orimion(m): 9:32pm On Dec 12, 2016 |
disco82: **JS** $(function (){ Console.log("HAPPY BIRTHDAY TO YOU !!!" ; }) (birthday = () => console.log("happy birthday!"  )();  |
Programming › Re: Need Step On How To Hide Javascript Source Code. by orimion(m): 10:41pm On Dec 02, 2016 |
chido4real: Actually, if you use the --mangle option with uglify, the code won't be exactly the same way it was even after beautification. Only hardcore pros would still be able to understand the code at that point. The thought of going through all these to hide JS client side means something is wrong. Like someone said, what ever needs to be hidden has to be done server side. People are making open source projects, someone wants to hide client side JavaScript  |
Programming › Re: Need Step On How To Hide Javascript Source Code. by orimion(m): 8:25pm On Nov 28, 2016 |
why would you need to hide it? I don't think there is any viable reason |
|
Programming › Re: What Programming Language Should I Learn For A Startup? by orimion(m): 3:39pm On Nov 01, 2016 |
Nascimento: First of all, no-one-in-all language. JavaScript is proving to be an all in all language for web development. I agree with you though |
Celebrities › Re: MC Johny Wins Solidstar Weed Contest by orimion(m): 9:37pm On Oct 30, 2016 |
Just passing by |
Programming › Re: Which Programming Pdfs Do You Recommend For A Web Developer? by orimion(m): 2:55am On Oct 30, 2016 |
Ebuka2016: is it possible for one person to be both a front end designer and a back end developer? Dats what i want to do. I want to learn both It's very possible, thats what people go into these days: full stack development. I would recommend freecodecamp.com and w3schools.com. Check them out. For books, check out "head first" books. They've written books for many languages (if you are new to programming you might want to start with head first programming, it introduces programming using python). But I've found out that online resources are the best |
Programming › Re: Which Programming Pdfs Do You Recommend For A Web Developer? by orimion(m): 7:56pm On Oct 29, 2016 |
Ebuka2016: ok....i neva considered removing it for one sec the way you said thanks scared me BTW frontend or backend |
Programming › Re: Which Programming Pdfs Do You Recommend For A Web Developer? by orimion(m): 10:00pm On Oct 28, 2016 |
Don't remove JavaScript o |
|
Sports › Re: Ogenyi Onazi Drags Lazio To FIFA Over Unpaid Salaries by orimion(m): 1:23pm On Oct 20, 2016 |
No credible source.
Adonbilivit |
Christianity Etc › Re: Anita Oyakhilome's Name Change: Here Is The Real Gist - Lailasblog by orimion(m): 4:24pm On Oct 17, 2016 |
Your topic says gist, you mode of writing says article wtf! Was expecting something like: you know why Anita changed name? Na her mother name o! |