₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,360 members, 8,449,918 topics. Date: Wednesday, 22 July 2026 at 01:45 PM

Toggle theme

Cbrass's Posts

Nairaland ForumCbrass's ProfileCbrass's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 179 pages)

ProgrammingRe: Please Have You Seen This Algorithm Question by cbrass(op): 11:40pm On Oct 02, 2021
stanliwise:
Share your code.
It’s straight forward
function fileSum($file) {
return array_sum(array_map(function($val) {
$val = trim($val);
if (is_numeric($val)) {
return $val;
}
return fileSum($val);
}, file($file)));
}

echo fileSum('a.txt');
This code loops through all the files and sums them for just file A.
instead of breaking it by file just as the example given
ProgrammingPlease Have You Seen This Algorithm Question by cbrass(op): 4:06pm On Oct 02, 2021
Write a production-ready function in PHP that sums the numbers in a file and outputs details of the results. The function will receive as input the path to a single file. Each line of the file will contain either a number or a relative path to another file. For each file processed, output the file path and the sum of all of the numbers contained both directly in the file and in any of the sub files listed in the file (and their sub files, etc).



For example, if file A.txt contains:

3
19
B.txt
50


And file B.txt contains:

C.txt
27


And file C.txt contains:

10
2


Then the output of passing A.txt to the function might look something like this:

A.txt - 111
B.txt - 39
C.txt - 12
I have tried everything I can but it only shows result for the first file
ProgrammingRe: Thread For Nairaland Algorithm Questions by cbrass(op): 9:05pm On Sep 24, 2021
cyrielo:
I have a solution for this in JavaScript, will probably like a feedback if you’re interested
okay can I see it, though I prefer php
ProgrammingRe: Algorithm Test Needed by cbrass(op): 9:35pm On Sep 06, 2021
ugonna1054:
why not visit the respective websites to see the questions huh
you need to pay forsome
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 6:14pm On Sep 01, 2021
Sewgon79:
Sir you are right about Oduduwa having many children but the only FEMALE child Oduduwa have gave birth to is called "IYUNADE" which gave birth to the first King of Owu. OLOWU not OLUWO. The story of Oluwo is different. Iwo in Osun was created by son of First Female King of Ile Ife, Ooni Luwo Gbagida, who also happen to be the last Female Ooni. Who married one of her chief and give back to a son which can not lay claim to the throne and has to be sent seek "Ifa" help and went on journey to discover the town that is called Iwo Today. And he became the first King of Iwo being from Ile Ife dynasty.
I am sorry, you are not right on that of Iyunade. Do you know how old Owu is, why did you think that they used to say that Owu la koko da. She married Olowu, she didn't give birth to Olowu. Owu has been before Oduduwa was even born
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 12:28pm On Sep 01, 2021
Bigsunny01:
Sorry I know it's pain to believe, but u don't expect me to believe ur illusion grin
and what is that illusion wink
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 12:26pm On Sep 01, 2021
FMAKJ:
Lol u trying to let my cat out of the bag already.

Maybe cbrass is also the owner of this account.
i don't do that
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 8:34am On Sep 01, 2021
Bigsunny01:
And Izoduwa/Oduduwa is a banish prince from Bini

Get dat
you people have started again grin the story has changed from a young boy running in the forests of Bini to the banished prince. grin
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m):
FMAKJ:
Ok, Okanbi has how many children? and where did they relocated to?
If you are ready to hear undiluted truth about the Yoruba, and ready to hear what you have never heard before then head to YouTube. Search for Tani Yoruba by Laji Abbas cheesy
When I get to work i may help you look for the link to make things faster

modified
start your learning from here. it will take you days to finish it though

https://www.youtube.com/watch?v=I46wmS_dCtE&t=1s
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 7:59am On Sep 01, 2021
FMAKJ:
Im not pushing for oyo or anywhere, I am only saying things as they are and according to correct history.

Do you also know that Oranmiyan met some people in Binin called Igodomigodo. So, is not like there was nobody in Benin when he got there.
I am not talking about Bini, let's focus on the Oduduwa story you started. It is false, it was started to spite Ife. I have never seen an Ife indegine that says the okanbi story. Then when you even said that Okanbi gave birth to Ooni through a slave made me laugh. Did you know what the leader of Ife was called at that time before it became Ooni.
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 7:36am On Sep 01, 2021
FMAKJ:
I am not even from oyo. My own story is for another day which will surprise you. That oduduwa story falling from the sky is a lie. Lamurudu gave birth to Oduduwa,simple!

Now, do you know that Lamurudu met certain people in ife when he arrived?

Now, to give you a tip of where I come from, I am from that certain people lamurudu met in ife.
If you are from Ife then why are you pushing Oyo version of Oduduwa history, I am Still not surprised though because it is from Ife they push most of the lies we have in Yoruba land out even though they know the truth
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 7:13am On Sep 01, 2021
FMAKJ:
It was Okani the son of Oduduwa that has Eight children. Oranmiyan is the number 7 while Ooni is the number 8 via a slave woman and Ooni became the king after Okani passed away. Oranmiyan then went to Oyo and found Oyo.
I won't argue with you, it is the stories you hear people saying about that you accepted, and your version of Odudwa story shows you are likely to come from Oyo because they are the ones that started that version. I won't blame you though, I also believed the story of Oduduwa falling from the sky for many years
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 6:55am On Sep 01, 2021
FMAKJ:
Ok, do me a favour. Check the bronze head of the first king of warri
(Ginuwa) and compare the face with the previous king of warri.
Please don't get me wrong o. Itsekiri is 95% Yoruba. Even the Royal family that came from Bini, in fact the royal family is still a combination of Ife and bini. So you are right on that one but the story of oduduwa uou wrote is not the true one, in fact Oduduwas children are so many, he also gave birth to females too. One of them is the mother of the founder of Iwo in Osun srate
CultureRe: Olu Of Warri Dissolves Council Of Chiefs by cbrass(m): 6:43am On Sep 01, 2021
FMAKJ:
Do you know that the first king of warri is a generational son of one of the king of Benin, while the first king of Benin is called Ewaka 1, Ewaka dad is called Oranmiyan the 7th son of Okani, while Okani is the only son of Oduduwa.

By the way, Oduduwa dad is called Lamurudu.

Now you see how Delta,warri and yorubas are related.
Hmm this your history get as e be. Not really true
ProgrammingAlgorithm Test Needed by cbrass(op): 1:08am On Aug 27, 2021
Please if you have hackeranck or leetcode questions, kindly share.

Thanks
BusinessRe: Kevin Ajenifuja: Dangote Drugged My Wife, Got Her Raped, Stole My Trade Secrets by cbrass(m): 10:05pm On Aug 18, 2021
Oluolad86:
cry Dear Lord please heal me now from pericarditis cry cry
I jsut prayed for you now.
You are healed already. Be ready to type the testimony of your healing right now.
Hold fast to Isaiah 53:5
Rejoice greatly because it is done and you will have the healing.

I will be waiting for your testimony thread tomorrow sister wink
HealthRe: How Does One Manage Partial Stroke?? by cbrass(op): 11:15pm On Aug 08, 2021
Jagabanj:
please I will really need your help
Okay, in what ay please?
PropertiesLand For Sale At Ibadan by cbrass(op): 8:38pm On Aug 02, 2021
A Plot of Land for sale at Egan-Arin, Off Bako. Apata Ibadan.
Price :N600k
Contact: 07087057654
RomanceRe: Help! I Don't Feel Sexually Attracted To My Fiancée by cbrass(m): 12:27am On Jul 25, 2021
zyphr:
grin grin I'll like to know more about yours. Can we chat on telegram?
I am more active on WhatsApp than Telegram o, what do you think
RomanceRe: Help! I Don't Feel Sexually Attracted To My Fiancée by cbrass(m): 4:02pm On Jul 24, 2021
zyphr:
I have been in a relationship with my girlfriend since September 2019. I intend to marry her.
The problem is that, I don't desire her sexually. Any intimate touch from her feels like the touch from a blood sister. Very uncomfortable.
She is a strict Christian with a policy of no premarital sex. So we have never had sex except for occasional kissing and romance which I sometimes initiate.
However, since January this year, I lost sexual attraction towards her and I avoid even simple touches. In fact, last Sunday we were walking down the street and when she placed her arms round my shoulder, I stylishly evaded it. I don't feel like this towards every other woman.

I'm currently not seeing any other lady but I have had sexual flings with two different ladies including an ex.

Question is: Is sexual attraction/desire neccesary for marriage? Is it normal not to feel sexually attracted to your partner? Can this be a basis for break up as I fear it might persist in marriage and make me cheat on her.
I am experiencing something similar too at the moment ,please if you found a solution kindly let me know
PoliticsRe: DSS didn't arrest me, Sunday Igboho debunks arrest rumour by cbrass(m): 10:57pm On Jul 02, 2021
what do you want to gain in spreading lies grin grin

All efforts to stop the rally for tomorrow cheesy cheesy
ProgrammingRe: C# Vs Java by cbrass(m): 5:32pm On Jun 17, 2021
how can C# be harder than Javascript grin...well we all have different capabilities sha
ProgrammingRe: Is Web Programming Now Shifting Base? by cbrass(op): 8:27pm On Jun 16, 2021
Karleb:
Bros, e be like say you don dey interview with Microsoft.

In case you need to know, I'm doing well! grin
seems you don dey learn witchcraft o cheesy cheesy
how you take know
ProgrammingRe: Is Web Programming Now Shifting Base? by cbrass(op): 4:02pm On Jun 16, 2021
Arkmanbuddy:
No vex jare, my blood dey hot ni! grin
i understand you grin grin grin
ProgrammingRe: Is Web Programming Now Shifting Base? by cbrass(op): 2:45pm On Jun 16, 2021
Arkmanbuddy:
Only the naive and valueless coders will be edged out o the industry. The experienced ones who have been in the game for sometime will always make money more than the computer science graduates you're talking about. You think it's about degree and some stupid theories that are being taught in schools, the real coders don't need interviews for jobs, they know how they make their money.
Bro calm down nw, you don dey vex ni grin
This is not a fight o, just stating the new trend now
ProgrammingIs Web Programming Now Shifting Base? by cbrass(op): 2:21pm On Jun 16, 2021
I could remember some 10 years ago web developers were not considered or regarded as programmers, even here on nairaland there used to be a fight between web developers and computer science students.
The fact that these web guys make more money even caused most CSE students/graduates to get angrier.
This fight is not limited toNairalnd alone, it happens on almost any forum at that time.

Now it seems the science guys may be winning now as things have changed.
Now if you didn't study computer science or Mathematics in the University you may find it difficult to cope during interview sessions and tests.

The term "Web developer" or "Coder" has been faced out gradually hence the word Software Engineer/Developer is in vogue now.

You need to be grounded now in Data structures, design patterns, algorithms, etc for you to fit in.
If you didn't study computer science while in school you may find it hard to navigate your way,
Then with the way the tech world is going so many branches are now been created eg DevOps and the likes.

Let me know what you guys think
PoliticsRe: Yoruba Nation Rally: Sunday Igboho, Others Storm Osogbo, Defy Police Order by cbrass(m): 5:53pm On May 15, 2021
Cryptodegen:
This post does not change the fact that Bitcoin will continue to pump and that crypto have produced more millionaires this 2021 than Internet scam!
but the market is not looking good at the moment cry cry cry
FamilyRe: In My 7 Years Of Marriage My Husband Has Never Complimented Me by cbrass(m): 11:32am On May 15, 2021
Karleb:
Didn't you observe this while dating? Madam, carry your cross.
God bless you, bro. to add to it the woman doesn't know herself at all eg, her love language. All these are necessary for choosing a partner
InvestmentRe: Wales Kingdom Capital (A Ponzi Scheme Or Legit) by cbrass(m): 12:39am On May 07, 2021
SkyFi:
Nice one there. I have 1.5 million naira worth staked. purchased bnb, swapped to cake, staked to cake pool to earn more cake and bunny at more than 200% APY. How can I be dull to give some company my money to invest, they could be staking my money too and sharing my interest with me.
Please can you put me through how I can do this on Binance
CrimeRe: Three Gays Arrested For Having Sex In Otukpo, Benue State by cbrass(m): 8:56pm On May 04, 2021
Biafranboys:
Even their house of reps members and senetors are gays and even fulanis gay pass, benue people should focus on serious issues, I have no problem with gays or lesbians as long as they stay on their lane.

Go to Saudi Arabia that is gayland ask anyone that have been there to tell you
you mean there are gays in Saudi Arabia too? shocked shocked shocked this is hard to believe o
ProgrammingRe: Why Are Developers Crazy About Startup Jobs? by cbrass(m): 3:51pm On Apr 29, 2021
stanliwise:
You don’t understand the context do you?
C, C++ and Java are static language and are reserved now to serious applications. The scope changed doesn’t mean this serious language went into silence.
Before now even simple project were built with hefty languages such as C, C# and it’s likes and at then people were just so bugged down and disturbed with how fierce it works and looks.
Then there came increase and high rise of prototyping and weakly typed language which gave leverage to people without proper understanding of coding to make their apps and boom that is where it all started.
Meanwhile the spot reserved for static languages can’t be taken.

So in conclusion, there is a rise in less hardware demanding applications. And new language shined. Never has Java, c, c++ and it’s static brother failed in the advancement race.
You are very right, and I think those languages are reserved for Enterprise solutions but if we are going, to be honest there is few Job positions available for these languages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 179 pages)