₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,467 members, 8,431,186 topics. Date: Sunday, 21 June 2026 at 10:05 PM

Toggle theme

Nairaface's Posts

Nairaland ForumNairaface's ProfileNairaface's Posts

1 2 3 4 (of 4 pages)

ProgrammingRe: Coding Challenge For Fun by Nairaface: 9:21pm On Aug 19, 2017
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'
Java

public class Result {
private int numDist;
private List<String> charsRepeated = new ArrayList<String>();

//Getters and setters skipped, but assume they have been defined.
}

---Separate file.
public class Naira {
public static int numDistinctChars(String alphaNumWord) {
Result res = new Result();
String[] chars = alphaNumWord.toCharArray();
Set<String> distinctChars = new TreeSet<String>();
for (String char : chars) {
if (!distinctChars.add(char)) {
res.getCharsRepeated().add(char);
}
}
res.setNumDist(distinctChars.size());
}
}

//From the consumer.
.... {
.....
Result res = Naira.numDistinctChars("dsds323212" ) ;
....
}
ProgrammingRe: How Do I Build A Forum Like Nairaland? by Nairaface: 6:54pm On Aug 19, 2017
If you intend to use a relational database, then Yes, you would need to learn SQL (Structured Query Language) or an alternative Query Language.
CelebritiesRe: Toke Makinwa's Hubby Impregnates Ex Girlfriend by Nairaface:
cap28:
I'm beginning to wonder whether Nigerian women are better off being baby mamas rather than wives as there doesn't seem to be any incentive in being a married woman in Nigeria.

Your man can still cheat on you, bring home STDs, have children outside your matrimonial home, kick you out of the home if he gets fed up of the relationship and leave you penniless to bring up the children on your own. undecided undecided undecided

Lesson to all women - Stand on your own two feet and understand that marriage is not the be all and all.
If I were to advise Toke Makinwa I would say - get a divorce, find someone who genuinely loves you and never place 100% of your happiness in a man. Toke take a leaf out of Karrueche Tran's book (Chris Brown's ex) see how quickly she dropped him when she heard he impregnated another woman (and they were not even married) check out Chris Brown's mental state since Karrueche gave him the boot grin

Finally, Toke save your love for those who are genuine eg your family, a good man who recognises your value and any future children you might decide to have.
very sad. I recently met a teenage girl in one of the Nigerian cities living with AIDS. She comes from a rich home, so she is able to afford treatment. She got it from her mom (perinatal transmission). Guess where her mom, a very beautiful woman, got it from? The rich and entitled twerp she married. They are all managing it, but I wonder... would the man had stayed if the tables were turned? Has ne learned his lesson, or has he been infecting ill-trained girls who run after money? My heart bled for the teenager, but she really is an epitome of strength. A victim she refuses to be.

The more excuses we give for men forsaking their homes and vows to cheat we give, the more problems we create: troubled kids, depressed wives, mismanaged businesses, .... Women cheat too, that is a fact. But what is troubling is the acceptance societies, not just Nigeria, have for cheating men.
CelebritiesRe: Toke Makinwa's Hubby Impregnates Ex Girlfriend by Nairaface: 5:05am On Jul 28, 2015
tivta:
. Am beginning to think you are a woman wrapper ( no offense meant) you are giving the impression that a woman must have a job just to support the man to raise their family? What ever happened to living within your means? Why can't she teach? Start a small biz? Etc? Must a woman make millions before she can help the family grow? Don't tell me you will like to marry a celebrity cause I promise you its tougher than going through hell. I will always advice those I met to always live within their means and stop STOP trying to keep up with the joneses. This is why marriages don't last anymore, everyone is too busy chasing money instead of raising the family. I recommend you watch these two movies to see how important family is above all else, the funny thing is that these movies are even from the whites(can you imagine) people nigerians are trying so hard to be like, SMH. They are, THE FAMILY MAN and CLICK. Thank me later.
why did you not become a teacher, if you have the mental capacity to so do? So your daughters, God help them, should only aspire to get by in life, right? You go die the day you find say na blanks u bin dey shoot, and your pikins na.... not quit yours.
CelebritiesRe: Toke Makinwa's Hubby Impregnates Ex Girlfriend by Nairaface:
tivta:
Women in nigeria of this generation just love to be right no matter how truly wrong they are, how can a married woman who is 30years old not have anything to show for her marriage except globe trotting? If she had a kid now I would call Maje a poligamous hegoat, but he has none. I still say just because a woman is working doesn't mean she can't raise a family, that's why I so much love Beyonce, despite her over working life style, she still has time to raise her daughter. She is not a super woman but a virtuous woman, I bet that all the so called women shouting Maje is this and that are all just kids from the early 90's, who are on their way to becoming lesbians. Family must always come first if not there is no way you would be alive. I still say it, Toke was just not ready for marriage, you can't eat your cake and have it. She should have just married her job just like Genevive. I really pity girls of this generation, always trying to eat their cake and have it yet don't have wisdom like Beyonce, what a pity.
you are a world class r3ta4d, and i say this with a guarded sense of responsibility and respect. Why dont you know that? For every woman battling fertility issues, and, wait for this, every man battling fertility issues, I say you are a waste of space. How do you know what is going on in their home, gossip? For you to have cited the bible to buttress your warped view, i say may the Holy Ghost fire burn you to pieces. In the spirit of quoting scriptures, I leave you with Exodus 23:2. "Do not follow the crowd in doing wrong. When you give testimony in a lawsuit, do not pervert justice by siding with the crowd."

Additionally, who died and made you God, that couples must live by your expectations? What if they both were not ready for kids, does that stop you from making yours? Or does it reduce the number of kids abandoned by fathers, each who woke up to the realization that he couldn't afford a baby after impregnating his wife? Or you don't know any of those?

If he was indeed not happy with his wife, he could have walked. But it seemed as if the misogynist boy in a man's body wanted to eat his cake as the husband of the successful Toke, but still have it in his pants for the old flame... and you have the audacity to accuse Toke of wanting to eat her cake but still have it? Vamoose. You just read too dense to be serious.
ProgrammingRe: Help Me Solve This Java by Nairaface: 6:57am On Apr 11, 2015
holmez:
while.. loop
int i = 33;
System.out.println(i);
while(i<70){
System.out.print(" "+i);
i += 3;
}

do....While Loop
int i = 33;
System.out.println(i);
do{
System.out.print(" "+i);
i += 3;
}while(i<70);
why are you looping from 33, and not 30?
ProgrammingRe: Help Me Solve This Java by Nairaface: 6:56am On Apr 11, 2015
@OP: at least make some effort, and show where you are stuck.

for (int i = 30; i <= 70; i++)
{
if (i%3 == 0) { // if the remainder of dividing i by 3 is 0, modulo operator...
System.out.println(i); //then print i on a new line.
}
}
Tech JobsRe: Final Year Project For Computer Science by Nairaface: 6:44am On Apr 11, 2015
jekomo:
For ur final year project all computer science student , pls contact me on
email : opeyemi.kabiru@yahoo.com , jekki.kabiru@gmail.com
telephone/whatapp : 08117713143 , 090248881633

Thanks.
Expecting ur call /mail .
basically, you want to help people cheat, no? This is is how corrupt leaders are groomed.
ProgrammingRe: Programmer Should Please Help Me To Solve This C++ Questions by Nairaface: 6:34am On Apr 11, 2015
Oladg2:
my area network is bad sir , this is what have tried
one cannot but to respect the Nigerian spirit. In spite of network and power issues, we forge ahead. Resilience! May God reward your efforts. Should make the people in places with better infrastructures have better appreciation for what they have.
PoliticsRe: A Showdown Between Pdp And Apc Youths On Channels Tv. Did you watch by Nairaface: 5:42am On Mar 09, 2015
F22RAPTOR:
bro, me self been no know, I had to go online to confirm. Apparently, there was a cover up.
you are very easily impressed. Any clod who schooled or lived in US, or read US history knows that. That is a weak comeback, as the point is that he was not gallivanting at a time when the nation was in crisis. Let's focus on substance, shall we?
PoliticsRe: VIDEO Of The Debate Between APC & PDP Youths On Channels by Nairaface: 5:02am On Mar 09, 2015
In the about five years in office, this administration has failed woefully. Corruption has continued so brazenly, electricity supply has gotten worse, thousands internally displaced due to Boko Haram, unemployment rate has increased, Obanikoro is yet to be held accountable for the allegations leveled against him but has rather been asked by the president to march onwards to a ministerial post, pensioners are still getting short-changed, Chibok Girls are still missing,... What more can go wrong? And we are supposed to take the rise to action to fight Boko Haram this past few weeks, just as election approaches, as a reason to keep these guys in power? Thanks, but no thanks. What will happen after they've been elected in? Rob the nation blind until the next election? Move and give someone else a chance. If in four years he has not delivered, we'll vote him out. This is about our future, and generations unborn.

The thuggery this Ayedee guy displayed is exactly the same thuggery the person alleged to be Fayose in the Ekitigate scandal displayed. Is this the brand of leaders PDP Has to offer: emotionally unstable, intellectually handicapped, conspiracy theorists, falsehood peddlers? Why do they need thugs if they have intellectuals? Or do they not have intellectuals? The Olarewaju guy did rely on his intellect, I must admit, even as we disagree on policies.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 2:14am On Nov 17, 2014
tintingz:
You forgot that religion like Islam, Judaism, Mormon etc practice polygamy.

What's your argument?
some claim Islam supports murder too. Your point?
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface:
ad84ada:
useless? Your opinion though but be true to yourself. If one of your parent will cheat. I bet you wont want it to be you mum. Motherhood has something about it. Mind you its not that am endorsing cheating itself but a woman is special. Something our women have failed to realise. Cheers.
selective respectability? Too special, but not too special to be cheated on?
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 2:00am On Nov 17, 2014
Acidosis:
but na she carry the shame na

Now her swag and bride price don reduce... her market don fall small


If women must retaliate by cheating on a cheating husband, they should always remember that na woman dey carry the shame pass. A rich randy guy can still get married to a decent woman, but it will take grace, pity and extreme love for a dude to fall flawlessly with Ini Edo now that we all read about her divorce stories and s €xcapades with the Island dude, mr governor, and how some girls flog her to coma in Obalende Lagos grin grin
grin grin grin
another assumption: she is ashamed because you expect her to be. What if she isn't?
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 1:31am On Nov 17, 2014
sauceny:
Only this your post can kick you outta your matrimonial home.

As soon as you find your husband cheating on you,i think you do the same & see who pays the price.

Your ex-husband can get married at any time,any day,even in his 80s...But no man would even think twice to look at you,even if you have not given birth to your ex,no Nigerian man wants to get married to a divorcée.
Your post makes too many assumptions. Like your assumption that she wouldn't be financially empowered to partly, or fully, own her matrimonial home. You assume the man will build, and then go shop for a maid to come serve up food, meal, sex, babies, and more on demand. Wake up and smell the akamu. Another assumption: all men think like you. Decent women think twice before marrying left-over, community penis, dear.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 1:21am On Nov 17, 2014
berem:
Are you serious? So you're justifying why a man must cheat because no one raises an eyebrow?

LMAO!! grin grin
I thought I read her wrong too. She basically made your point, actually.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 1:17am On Nov 17, 2014
Fit2Rule:
A lock that can be opened with many keys is useless, but a key that can open several locks is a master key. Do I still need to remind you that a master key is a treasure?
this line only serves one purpose: comic relief. In that same spirit, one can argue that a lock that can be opened with many keys is either faulty or multifunctional, and a key that opens multiple locks is either indiscriminate or multipurpose.
It depends on where you are standing. None is desirable for a matured, successful marriage.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 1:08am On Nov 17, 2014
koikoi2:
Infertility is no longer an excuse for divorce. Technology has solved d problem for us. Its ignorance dat is killing us. Take a look at this.

Intra cytoplasmic sperm injection
( ICSI) involves the injection of a single
healthy sperm into the cytoplasm – the
jelly-type middle – of an egg. IVF
using the standard insemination
technique requires approximately
150,000 sperm for each egg, but ICSI
requires just one good quality sperm
per egg.

With d technology of ICSI, even d hopeless situation has hope.
but why are people assuming that she is infertile, not that it'll be a sin if true? Did their doctor release a statement? What if the guy is the infertile one?
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 1:01am On Nov 17, 2014
martinnwani:
I can see some of the people here are not married.....you think marriage is a gamehuh?.....in my place if a woman is unfaithful and her husband has paid money on her head.....that unfaithfulness could be the end for him....by the way two wrongs CANNOT make a right!!!
this scare tactic is one of the ploys used to suppress women. I hope you are not implying that only a woman owes her husband fidelity. And when a man is unfaithful, what can that bring the woman? How about potential murder by an over-ambitious side chick? Or contraction of an STD? Or constant battering by a man who sees no value in her?

Marriage is no game, true. Which is why boys and girls have no business getting into it. You lack self-control, and still want to chase anything with breasts? No problem. Stay single. It is allowed? You lack self-control and want to chase anything with a penis? No problem. Stay single.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 12:52am On Nov 17, 2014
Toks2008:
Let me advice every lady reading this.

I am not an advocate of men cheating on their wives but please, the moment you get married,expect that guy to cheat on you. 9 out of 10 guys will cheat on you even if you are the most sexy lady in the world. Hard to take but the truth is that a randy man will be a randy man and there is nada you can do about that and trust me, if you keep changing men from now till eternity, you are almost likely to experience same situation

The best bet is to tel him if you suspect anything to do it far away from your notice and that is the best way he can show respect to you and don't ever think of getting even because that shame will be yours and he can send you packing and that will be even a greater disgrace for you.

Always see other ladies trying to sleep with your man as clueless,hopeless and frustrated attention seekers.

Ladies should stop this competition as regards man cheating as a prerequisite for them to do same.

A lady is wired to be chaste,monogamous and guys naturally are polygamous in nature and any man that remains faithful to you alone is a rare breed.

Please stop this baseless comparison.
is this going to be your advice to your daughter or sister? And when she has contracted a deadly disease -let's leave emotional distress for a second- what would be your pep talk? Why don't you come up with some wise words for the 9 out of 10 boys you know on how real men act?
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 12:48am On Nov 17, 2014
ad84ada:
I actually do admire your zeal but I can assure you that am not daft. I made a comparism here. I am not judging Ini either, I wont deny the fact that we have irresponsible parents either but hey if I MUST see one, I will rather see an irresponsible Father instead of a Mother. QED.
Again, the last part of your comment sounds daft. If you are not daft, as you claim, then I must implore you to engage your thinking faculty more often. Men have more influence on their children. Children fear their fathers more than they do mothers. Why would you think a responsible/honourable father isn't as important as a responsible mother. An absentee father can only raise an irresponsible child, unless where the woman is exceptional enough to manage both roles (which has been the case for a lot of children sired by the kind of men you endorse) and/or fortunate to have other responsible people around to assist her.

The only reason we still have this double standard is the disparity in earning power. Ladies, empower yourselves financially, and stop waiting for a man to fund your every life. You will never be anything but another piece of possession to him. Which means your feelings will never count. He will disrespect you in every way possible, and men like ad84ada will tell you to deal with because he is the one with a penis, and you should just be glad to have Mrs in front your name, never mind the misery that came with the prefix.
CelebritiesRe: Ini Edo Busted By Her In-law Over Divorce Saga Lies by Nairaface: 7:14pm On Nov 16, 2014
ad84ada:
I bet you. It will feel more confortable when a child sees his/her dads babe than his/her mums guy. Women are mothers and mothers are honourable. Think about this. Even sex happens inside the woman. Haba.
fact is, you sound utterly daft, no insult intended. Why do you think we have a lot of irresponsible boys, growing older to become irresponsible fathers? Because their fathers, men like those you endorse, were not responsible (honourable, you call it) enough to teach them how to be real men. Responsible children feel offended, not just uncomfortable, when either of their parents breaks his/her vow to the other. I know men who, when they were boys in age and deed, sat in the company of their fathers and girlfriends. As older and responsible men, they despise their fathers for, as one puts it, disrespecting his mother so grossly that he would drag her children into his deceit. He overcompensates his mum now.

No one truly knows what happened in Ini's marriage, and it's their business. If in fact he left his wife for her, they are both irresponsible people who deserve each other. Unfortunately, it is Africa, were a man is not expected to be honourable/responsible, according to ada84ada
ProgrammingRe: Game Development: Next Gen 3d PC Game Team by Nairaface: 8:05pm On Nov 19, 2013
jjk24: U guys r 4gettin dah sum of us dnt have d privilege of travellin eni where u want !! And sum of us aint in lagos!! Jst sain I wuld love meetin!! Buh I simply can't!!... Buh odas shuld meet though!!.. And basically everitin is even on track rhyt nw!! We have d 1st mission plan(if we goin wit wah I posted) we have d mission level design layout(if we goin with wah I posted) we have d mOdels @boss kazuna of life don do daht!... All we nid 2 do nw is 2 geht all dis 2 dueal and deal with d programmin and stuff!!.... Its a 3 year project dis is jst a month or so!!.. As lng as we aint gnnaa give up we gnna make it... #peace buh I tink we nid a whatsapp group wah u tink shuld I create 1!?.... Peace...
Virtual meeting.
ProgrammingRe: Game Development: Next Gen 3d PC Game Team by Nairaface:
Ajibel: I've been on this path before. You'd find it difficult accepting your story-line to be perfect. You'd always want to modify. Just think of the first mission and work on it. You're different from the big game companies that alreadi have their story and then set to work on it. If you keep on deliberating on storyline, i doubt you'd go far by nov ending !!
Great work so far. Comments and observations. 1. I agree with Ajibel that it is important to agree on a storyline and improve on it without losing focus. 2. Thinking as a project manager, a meeting of the current members is needed to have a clear understanding of what is expected, the subtasks involved, and a schedule. Then a representative of each subtask needs to be selected to coordinate the subtask development. Then meetings among the representatives, open to other members, on a regular basis. Then feedback from each subtask representative to the subtask members, irrespective of whether or not they were there. Since this started on Nairaland, maybe Seun is open to giving this project a "room" that will take the place of the closed facebook page.
ProgrammingRe: Game Development: Next Gen 3d PC Game Team by Nairaface: 5:35am On Oct 28, 2013
This sounds intersting. Is there room for more programmers? Java, c++.
ProgrammingRe: How To Prevent A Website From Being Hacked by Nairaface: 5:46am On Aug 18, 2013
There is no foolproof way to protect your website, but sanitizing inputs at the client side is one way. Where are the security guys and gals on Nairaland?
Tech JobsRe: Do You Have Any Of The Following Skills? A Freelancer Is Needed For Some Jobs by Nairaface(op): 3:51pm On Mar 27, 2013
Thank you all to those who respondeded. Sorry it took a good while to get back to you, but we've been busy practically begging people to let us do projects for them for free to build our portfolio for our upcoming website. Turns out it's not easy to get people to agree to be served for free if you are yet to have a name. Interesting!

Uzotex1000: Please not that the address was no longer used as soon as the positions were filled.

For those who sucessfully got through to us but did not hear from us, it's not because you are not knowledgeable as we got loads of very qualified candidates; it's because we couldn't afford you, being a growing company just coming together.

Thanks, once again.

(once our website is up and running, we'll promote here if the admins permit)
ProgrammingRe: Beginning Android Programming. Come Lets Start Together. by Nairaface:
J ø $ h ù á:
@kennyinusa

About which is better, i cannot say. But from personal use, i prefer eclipse to any other ide.
In eclipse all u have to do is download plug-ins that adapt eclipse to a language, then you go ahead and write.

And you do not do this from your browser but from the ide itself. Its just cool.

You can have just a single eclipse ide and write almost all the languages available on it.
Great thread. Setting up the android plugins in NetBeans is even easier (tried both). But there are more online support for Eclipse than for Netbeans. I use Netbeans because I found it to be more user-friendly generally. I'm new to Android dev too so i'll be watching this space and try to share the great references i found too. So far, i agree with thread starter on the smooth learning curve. Here is a comparison from Netbeans. the most obstacle for me has been the libraries. I have some JavaFX apps that I'm trying to convert, but I am finding out, sadly, that the Java.awt, for example, or even JPanel, are Greek in Android.

http://netbeans.org/features/platform/compare.html
Tech JobsRe: Do You Have Any Of The Following Skills? A Freelancer Is Needed For Some Jobs by Nairaface(op): 12:24am On Oct 30, 2012
uzotex1000: Hello,

I am interested.But this is a public social network to pass such information.

Why don't you put your email so we send our CV.
uzoiwuagwu@yahoo.com
Hello uzotex1000. Please send to me.missus@yahoo.com
Tech JobsDo You Have Any Of The Following Skills? A Freelancer Is Needed For Some Jobs by Nairaface(op):
Greetings!

Do you have experience/advanced skills in any of the following and need a freelance job?
1)Mobile App Development for an array of devices
2)eCommerce Web Development
3)Database Development for integration with a web application
4)Graphics Design

Please send me a message at me.missus@yahoo.com with the following information at the minimum:

1) Which of the above do you have experience in?
2) What is the nature of your experience in your response to 1)?
3) What is your level of skill in 1) above?
4) Do you have an online portfolio or samples? Please include link.
5) Virtually all of our meetings are held electronically, but where are you located (Just as an FYI. You don't have to disclose if you'll rather not)?
6) What is the nature of remuneration you are expecting? (A) monetary (if A, do you want: A1) a flat fee, A2) profit sharing? or B)partnership?

We look forward to hearing from you.
ProgrammingRe: What Is The Difference Between A Programmer And A Web Designer by Nairaface:
Joe50: a web designer is a person that design web pages that you are browing e.g our oga Seun is a web designer that design nairaland website while a programmer is the person that design and create the browser that you use for browsing the nairaland. E.g opera, mozila, internet explorer, other application a programmer developped are anti-virus, PDF reader, all your computer software are design and develop by programmers.
Caution! Seun might be a web administrator/creator and not necessarily a web designer too. He could have contracted the page out to a web designer. A web programmer programs applications for the web, of which a web browser is one, I agree on that. A web designer designs web sites and pages.
ProgrammingRe: Pls Niaralanders, Help Mi Wit Dis Ms Excel Trouble by Nairaface: 2:20pm On Sep 25, 2012
vichofu: if you have a work sheetWorkbook named John that contains Mary and Jane as a work sheet, Write the Syntax to link the 2 worksheets and d steps to achieve that task
If you want to link to Jane from Mary, in the target cell in Mary, input "= Jane!$<source column's letter>$<source row>


Or, write a macro to:
1) select cell in source into a variable
2) select target worksheet name,
3) paste variable into

If you need complete code, I' can help you but I'll need to know exactly what you're trying to achieve.

1 2 3 4 (of 4 pages)