₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,007 members, 8,419,898 topics. Date: Thursday, 04 June 2026 at 06:48 AM

Toggle theme

Orimion's Posts

Nairaland ForumOrimion's ProfileOrimion's Posts

1 2 3 4 5 6 7 8 9 10 (of 14 pages)

LiteratureRe: Nairaland Book Of Puns- Lovers Of Wordplay, Let's Pun! by orimion(m): 1:08am On Aug 19, 2017
DaimlerBen:
There's a theory that no two people see a colour the exact same way.
Does that mean that colour is a pigment of your imagination?
yep, you really shouldn't trust your dyes!
1 Like
ProgrammingRe: Weekend Challenge For Practice: RLE Encoding by orimion(m): 8:24pm On Aug 18, 2017
deedat205:
I'm just curious on why u chose Haskell. It has unfamiliar syntax. I use python because of its simplicity. I'm yet to see any language as easy as python
I'm yet to see one as concise and high level as Haskell, just say what you want. And recursion is sexy cheesy
Technology MarketRe: ##ORDER LAPTOPS,PHONES,TABLETS,CLOTHES FRM USA,UK,GERMANY& DUBAI TO NIGERIA by orimion(m): 12:31am On Aug 18, 2017
Technology MarketRe: Store for GAMING RIG/NVIDIA® GTX 960, GTX 1050Ti, GTX 1060, GTX 1070, GTX 1080 by orimion(m): 9:24pm On Aug 17, 2017
Nsonaso:
Available for pickup in Lagos
how exactly does this work? Can one still get a laptop even if it is sold? Is it pre-ordering?
European Football (EPL, UEFA, La Liga)Re: Real Madrid vs Barcelona, Spanish Super Cup (2 - 0) On 16th August 2017 by orimion(m): 12:39am On Aug 17, 2017
Agony of a Barca fan

ter stegen positioning is always poor, alba have to be crazy, mascerano on drugs, pique too full of himself, busquets too casual, rakitic slow, gomes needs to be shot, suarez cant pass and messi have no help, and the board dont have a clue what they doing
European Football (EPL, UEFA, La Liga)Re: Real Madrid vs Barcelona, Spanish Super Cup (2 - 0) On 16th August 2017 by orimion(m): 11:50pm On Aug 16, 2017
Ksslib:
Live Updates:

Outrage at the Bernabeu. Barcelona fans are furious at the refree for refusing to award a penalty when camera replay clearly shows Suarez being tackled in the eighteen yard box by one of Real Madrid's grass.

"There was contact. There was contact" a furious Suarez screams.
guy wtf grin grin grin
European Football (EPL, UEFA, La Liga)Re: Real Madrid vs Barcelona, Spanish Super Cup (2 - 0) On 16th August 2017 by orimion(m): 11:36pm On Aug 16, 2017
Ksslib:
Live updates.

Quick counter attack. Suarez beats one, beats two, then sends a through ball to empty space. Messi is furious with the Uraguarian. But a confused Suarez points to blank space "But I saw him". Messi asks, "Who?"

"Neymar" , said a visibly confused Suarez who can clearly be seen pointing at empty grass
grin grin
stop stop grin grin just stop grin grin grin
European Football (EPL, UEFA, La Liga)Re: Real Madrid vs Barcelona, Spanish Super Cup (2 - 0) On 16th August 2017 by orimion(m): 10:54pm On Aug 16, 2017
Eke40seven:
Thanks! But they brought down all the streams on YouTube for copyright issues.
If I knew the station, I can stream the exact channel through Mobdro.
not this
https://www.youtube.com/watch?v=xRki1uM8KSU
European Football (EPL, UEFA, La Liga)Re: Real Madrid vs Barcelona, Spanish Super Cup (2 - 0) On 16th August 2017 by orimion(m): 10:52pm On Aug 16, 2017
Ksslib:
Live updates.

Real Madrid knock the ball expertly around the midfield area. A frustrated Messi tries to chase the ball but gives-up and starts chanting sorcery in Spanish, summoning the departed spirit of Neymar to appear or show him a sign.
wicked grin grin
ProgrammingRe: Weekend Challenge For Practice: RLE Encoding by orimion(m): 9:43pm On Aug 16, 2017
deedat205:
There is a stubborn challenge I want you guys to try out on Hackerrank
https://www.hackerrank.com/challenges/separate-the-numbers/problem

The challenge was rated easy, but I think medium would have been appropriate to describe its complexity

The challenge is to determine if a string has numbers that are consecutive with a difference of 1.
Example 1234, 91011 and 99100 should all return YES
while something like 101113, 2325 should both return NO
https://www.hackerrank.com/challenges/separate-the-numbers/submissions/code/51981004

It was definitely not easy
Technology MarketRe: Store for GAMING RIG/NVIDIA® GTX 960, GTX 1050Ti, GTX 1060, GTX 1070, GTX 1080 by orimion(m): 4:09am On Aug 16, 2017
Nsonaso:
Come pick up
almost all of these laptops are sold
ProgrammingRe: Coding Challenge For Fun by orimion(m): 12:15am On Aug 14, 2017
pcguru1:
Number of occurrence a appears twice in J(a)v(a) this is a codewars question. You read the question properly before answering online interviews are strict like that
please when you guys post question, always state the instructions clearly and give good examples

according to the instruction
edicied:
Count the number of Duplicates

In any Programing Language, Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits.

Example

"abcde" -> 0 # no characters repeats more than once
"aabbcde" -> 2 # 'a' and 'b'
"aabBcde" -> 2 # 'a' occurs twice and 'b' twice (bandB)
"aA11" -> 2 # 'a' and '1'
the count of distinct character occuring more than once

in all the examples given, the returned value was the number of character occuring more than once (not the number of times they occur!)

java
should return 1 because 'a' is the only character occuring more than once

if we go by your reasoning that
a
occurs twice in
java
, what is going to be the returned value for
aabbbccccddddd
? (check the examples given in the op before answering)

[edit]
admittedly, the question did say the COUNT of the characters occuring more than once but the examples given did not reflect the instruction.
you didnt provide a correct returned value for any (but the first) of the examples
ProgrammingRe: Weekend Challenge For Practice: RLE Encoding by orimion(m):
deedat205:
Nice challenge. But who can come up with the RLE string decoding solution.
Eg W4E2H3 should be WWWWEEHHH and A12T3Y4 should be AAAAAAAAAAAATTTYYYY
here ya go

import Data.Char

main = do
putStrLn $ decode "W4E2H3"
putStrLn $ decode "A12T3Y4"

decode :: String -> String
decode = concat . map expand . split

expand :: String -> String
expand "" = ""
expand (x:xs) = take (read xs) $ repeat x

split :: String -> [String]
split = words . tail . foldr fn ""
where fn x acc = if (ord x < 48 || ord x > 57) then (' ':x:acc) else (x:acc)


http://ideone.com/nq33Iy
ProgrammingRe: Weekend Challenge For Practice: RLE Encoding by orimion(m): 4:44pm On Aug 06, 2017
pcguru1:
My God what language is this lol
Haskell grin
might be my inexperience that makes it look cryptic
ProgrammingRe: Weekend Challenge For Practice: RLE Encoding by orimion(m): 2:52pm On Aug 06, 2017
ProgrammingRe: Contest[closed] : Program A Function to find if a phrase. is in a string by orimion(m): 2:30pm On Aug 04, 2017
dontro:
Why all these long grammar (codes)? Or I didn't get the question?
without using builtin functions
I dont blame you for not totally getting it though, the author confessed to making the question unclear
ProgrammingRe: Contest[closed] : Program A Function to find if a phrase. is in a string by orimion(m): 6:54pm On Aug 03, 2017
silento:
if you are on a computer

open up your browser


and press ctrl+f now type "word" and click the button for whole words


did you browser highlighted "words" to be "word" if it didn't then i think you got your answer

we are here to learn you will only find examples all over the internet with this bug of matching "boy" to be same with "boym"
I don't think you understand me

I was making the distinction between a word and a phrase

in the question spec, the example given was

"boy" & "i am a boy" should return 1
(i.e word and sentence)

but the part i quoted earlier,

"i am" & "i am a boy"
(i.e phrase and sentence)

I pointed this out because in my solution, i split the sentence into a list of words first (as per the question) then check if the word is in the list
obviously it's not going to work in the second situation (phrase & sentence)

PS. as for the challenge, chrome doesn't have "match whole word" and so highlighted "words" for "word"
PPS. did you even try my haskell solution huh
ProgrammingRe: Contest[closed] : Program A Function to find if a phrase. is in a string by orimion(m): 6:19pm On Aug 03, 2017
The original question says the first parameter is a word

silento:
so the function will do the following

when given a two parameters the first will be a word and second will be a sentence

it should be able to detect that the word is in the sentence example

function find("boy","obi is a boy"wink
{
code........

return 0 or 1
}

the function will return 0 or 1
0 if word not found in the sentence
1 if word is found in the sentence
But here, it is a phrase

silento:
the program is expected to return 1 in this case:

"i am" => to "i am a boy"


and 0 in this case :

"i am" => "i ammy is a boy"
ProgrammingRe: Contest[closed] : Program A Function to find if a phrase. is in a string by orimion(m): 8:23pm On Aug 02, 2017
Haskell


words' :: String -> [String]
words' "" = []
words' s = transform s "" []
where
transform "" cur acc = (if cur /= "" then cur:acc else acc)
transform (x:xs) cur acc =
case x of
' ' -> transform xs "" (if cur /= "" then cur:acc else acc)
_ -> transform xs (cur ++ [x]) acc

finder :: String -> [String] -> Int
finder _ [] = 0
finder needle (x:haystack) = if x == needle then 1 else (finder needle haystack)

find :: String -> String -> Int
find needle haystack = finder needle (words haystack)


the first two functions (words' and finder) are helper functions
there is a builtin "words" function that does what " words' " did hence the quote

Normally, we wouldn't return an Int we would return a Maybe Int but as per the spec..
ProgrammingRe: 2017 Generation Of Programmers - What Languages Are You Using? by orimion(m): 10:23pm On Jul 29, 2017
silento:
php and Python and c and c++ I haven't found anything this Lang can't do if somebody can use c to program an os what else do I need again that it cannot offer
web?
TV/MoviesRe: Game Of Thrones And 4 Other Series Nigerians Overhype by orimion(m): 8:49pm On Jul 29, 2017
Rorachy:
Valar morgulus.
valar dohaeris
TV/MoviesRe: Game Of Thrones And 4 Other Series Nigerians Overhype by orimion(m):
Winter is here

Op doesn't know fine movie

Arya FTW

Edenoscar:
After watching the first season of game of thrones.i made it a habit not to believe everything i read on the internet.the way dem hype this film ehn
3 bad things happened today

* My friend said he didn't like GOT embarassed
* Someone stabbed him to death wink
* I was arrested angry

Sorry I said 3 things, it was only 2 things(1 & 3)
ProgrammingRe: Learnt Web Development, What Next? (web-dev challenge) by orimion(m): 11:43pm On Jul 15, 2017
chigozie391:
how were u able to host it on Github
github pages

https://pages.github.com
ProgrammingRe: QUIZ: How Many Lines Of Code Can You Use To Reverse A List by orimion(m): 3:37am On Jul 10, 2017
Febup:
OK in that case you'll need to add 7 more lines for JavaScript.

<HTML>
<head>
<script type="text/javascript">
/* Your code goes hear */

alert('Your Results');
</script>
</head>
</html>
Its like you didn't read it well, he said
badthinds:
How about the nodeJs console grin

Lol. The examples you gave, eg in the case of javascript, all those html,body stuffs ain't necessary (the <script> is only necessary if its gonna be executed by a browser)...above all, they are not part of Javascript.
all those tags are not part of Javascript, they are HTML just fire up your browser and go to console in the dev tool or better still the nodejs repl
ProgrammingRe: Learn Angular 4 by orimion(m): 10:24am On Jul 07, 2017
Don't you mean angular 4 grin
PhonesRe: Easiest Way To Rename And Sort All Your Downloaded Images in bulk by orimion(m): 4:39pm On Jul 05, 2017
grep sed awk guys will laugh at this
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by orimion(m): 6:06pm On Jul 04, 2017
feddiferri:
first of all, decide what platform you like most.

Web programming
Desktop development
Mobile Apps development

once you decide then ask such type of question.

Example

I love web programming. from which programming language should I start with?
Machine learning
Data Science
System programming

etc
ProgrammingRe: Learnt Web Development, What Next? (web-dev challenge) by orimion(m): 3:42pm On Jul 02, 2017
chigozie391:
am still new to Javascript.. .. Wonder if I will be able to do that
you definitely will, just keep calm and code
ProgrammingRe: Learnt Web Development, What Next? (web-dev challenge) by orimion(m): 10:56pm On Jul 01, 2017
chigozie391:
how did do this
HTML, CSS and JS (react)
ProgrammingRe: Learnt Web Development, What Next? (web-dev challenge) by orimion(m): 4:21pm On Jun 30, 2017
ProgrammingRe: Python Vs Php by orimion(m): 1:37am On Jun 29, 2017
klefjoxey:
Php Is good but just like JavaScript it is a bad language. Python rules the web for backend. Why do you think Facebook have been trying really hard to improve pup. Its because by the time they are rewriting their backend in another language twitter will beat them in terms of daily active users
How is JS a bad language? I mean your bad experience with it, not something you read online. Saying py rules the backend is far-fetched
ProgrammingRe: Best Programming Language by orimion(m): 9:44am On Jun 09, 2017
zanga420:
Thanks, nice. But in respect to developing app and web design what's your take between JavaScript and Python?
Web design is different from development
Tools used in web design include Photoshop, Sketch etc

Web development is divided into front-end and back-end
Front-end is the use of HTML, CSS and JavaScript
Back-end languages include Python, Java, Go, JavaScript (node), Php etc

As for developing apps, it depend on what platform you want to develop for
Web? JavaScript
Mobile? Java(android) , Swift(iOS), Kotlin(android) etc
Desktop? C++, C#, Python etc

Do read more on the subject

1 2 3 4 5 6 7 8 9 10 (of 14 pages)