Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,188,113 members, 7,933,716 topics. Date: Wednesday, 28 August 2024 at 11:45 AM

SmartK1's Posts

Nairaland Forum / SmartK1's Profile / SmartK1's Posts

(1) (2) (3) (of 3 pages)

Software/Programmer Market / Re: Dot Net Programmers Wanted by SmartK1(m): 12:54am On May 11, 2013
No contract job.
Software/Programmer Market / Dot Net Programmers Wanted by SmartK1(m): 7:33pm On May 03, 2013
There is an opening for a serious .net programmer web(junior) in our company in Ikeja area of Lagos State. Skills needed is C# or VB. MVC, Javascript (JQuery) will be added advantage. If you are interested contact me on ishmail.rahman@byaxiom.com or send sms to 07083376917. Thank you.
Religion / Re: Pastor Tunde Bakare: A Bastard Can’t Rule The Yoruba by SmartK1(m): 12:05pm On Jun 18, 2011
In as much as I have always respected Tunde Bakare's thoughts and submissions I beg to differ on this. I am yet to see a politician in the whole wide world that is absolutely clean, including Asiwaju, Buhari, Bakare (himself), Obama, etc, not even Fashola. They are all either of two sides of the same coins as Bakare observed. Meanwhile, on PDP, ACN, CPC issue I think I am more tilted towards ACN for these reasons:

i. Buhari lead ANPP to no success and evetually lost out the party's leadership. I believe such a leader does not fit to lead a country else he would not know when the country may be hijacked by some other nationals.
ii. Buhari was a military head of state and was toppled in a coup. I doubt if such a leader can succeed as a civilian president.
iii. PDP has ruled this nation for a decade now and corruption is becoming more popular on daily basis. Even if such party dominates for the next 100 years, I refuse to be a part of this '666' governance. I would rather remain a party-less individual.  The major un-doing of PDP is the lack of political will to fight corruption.
iv. ACN, on the other hand, has produced Governor Babatunde Raji Fashola, Adam Oshiomole and Engr. Rauf Aregbesola (Osun). These people I have absolute respect for as individuals before they ever became political office holders in the nation (with the exception to Fashola, who has proved his worth recently). I encourage PDP to start thinking in competing in service to the people and not election rigging or turn-by-turn politics its currently trying to discard (a +ve change).

My advice to Pastor Tunder Bakare, who I hold in high esteem, is to
i. steer clear of the current politics and concentrate of preaching the gospel. I still hold him in high esteem and I beg him to please leave Buhari alone with his 'friends'. Ole lo mo ese ole to lori apata.
ii. His 'bastard' is much needed at the current political drama in Nigeria. You cannot fight iron with bare hands. It takes one like one to know one. In fact, if not him (the 'bastard'), the Yoruba race might be politically irrelevant today. The current political relevance of Yoruba today goes beyond the issue of house speakership, senate leadership, etc. For avoidance of doubt, watch '24 Hours' (a political film) and you may be able to understand more. Watch out as the drama unfolds.

Thank you.
Programming / Re: Let Share Codes by SmartK1(m): 1:03pm On Aug 30, 2010
Beaf

How you dey? I love the code you provided, but really have not found any need for database mapping in my applications. Could u please give me some scenario. I really would like to know more about this stuff.

Thanx.

Note: I am not talking about creating classes that maps table fields.
Programming / Re: Let Share Codes by SmartK1(m): 5:46pm On Aug 28, 2010
He! long time.

Check me on http://kunlesmart..com for jQuery Cascading Dropdown plug-in.

You can let me know what you think, and if you have any problem using the guy.

Bless u.
Programming / Re: Post Ur Vb 6.0 Questions Here by SmartK1(m): 7:51am On Dec 27, 2009
Pls advice on how to well to get started in programmig: Polytechnic,Degree etc

Pls how can one?

It does not take any degree to program. Hear this:
Success if a function of Sincerety, Determination and Luck.

1. Be ready to burn candles like never b4;
2. What drives you to programming (love of money, creativity, or both, or lack of something better to do);
3. What kind of programming do you want to involve yourslef in (system, driver, application - windows, web or both);
4. How long are you willing to go (top top, or just to feed urself and possibly some family members);
5. Are you ready to learn mathematics (not the theory u did in school);
6. Above all, are you ready to make Google (and recently, Bing) your friend;

HAPPY NEW YEAR.

Smart K.
Programming / Re: Can You Imagine The Insult? by SmartK1(m): 11:51pm On Jun 26, 2009
whatever,
d guy was probably a programmer gone nuts. PERIOD.
Politics / Re: How Do We Stop This Re-branding movement? by SmartK1(m): 10:23pm On Jun 26, 2009
To d poser
We cannot stop the re-branding but we need to stop something more important: the OBJs, the Yaraduals, the David Marks, the Abdulsalams, etc. Cos these ppl are the Nation's problem. There is no amount of branding or rebranding that can be done on Nigeria that will work. In fact I am ashamed of this Country. How can we have a country that is governed by criminals and hope things will work. These ppl know that they do not have all it takes to govern a nation like Nigeria. In fact they dont have what it takes to govern a local government, so they take things by force. There are ppl in this country who knows better (the Nigerian obamas). i am really sad to call Yaradua my president. As a muslim, an handicap shldnt lead and Yaradua himself knows this. May Allah forgive him and make do a u-turn and change for better.
Politics / Re: Dokubo Rejects Amnesty by SmartK1(m): 10:01pm On Jun 26, 2009
U GUYS AMAZE ME. WHAT HAS YARADUA PROMISED AND GIVEN?
ANYWAY, MAYBE AMNESTY THAT HE IS,

COS, FROM HISTORY YARADUA IS SOMEONE
WHO PROMISES LIGHT, AND GIVES DARKNESS
WHO PROMISES BETTER ELECTION, AND GIVES WORSE ELECTION (COMPARE WITH OBJ)
WHO PROMISES, AND FAILS

SO, AMNESTY TO WHO. I DONT KNOW
TV/Movies / Re: What Movie Do You Never Get Tired Of Watching by SmartK1(m): 12:29am On Jun 26, 2009
There are lots but
24 by Keifer Sunderland - that's d best

(if u ask me for d worst dat i wont like to watch ever again)
Promise by Ola-iya (Iru-Esin) - cos thats d worst.
Programming / Re: Let Share Codes by SmartK1(m): 11:08am On Apr 30, 2009
@blacksta

i. Have genuine interest in programming
ii. Sincerely ask yourself if u have what it takes
iii. Be consistent. It takes time to get used to programming
iv. Always be prepared to go some extra-mile. Go a step higher than the next person
v. Always open ur mind. Never close ur mind door. U could always find a better way of doing it.

Hey, manage this for now. Thanx
Programming / Re: Let Share Codes by SmartK1(m): 6:51pm On Apr 24, 2009
Hi guys, long time no see. Been busy with lots of projects recently.
OK let share this sample code to send mail HTML page using gmail server in C#:

  private String readHtmlPage(string url)
        {
            if (!System.IO.File.Exists(url)) return string.Empty;

            try
            {
                String result;
                WebResponse objResponse;
                WebRequest objRequest = System.Net.HttpWebRequest.Create(url);
                objResponse = objRequest.GetResponse();
                using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
                {
                    result = sr.ReadToEnd();
                    sr.Close();
                }
                return result;
            }
            catch (Exception ex)
            {
                App.LogError(ex);
                return string.Empty;
            }
        }


private void SendMailBtn_Click(object sender, EventArgs e)
        {               
                string mail = readHtmlPage(url);
                if (mail.Trim().Length == 0) return;

                string toAddress = "to_one@yahoo.co.uk";
                string fromAddress = "someone@gmail.com";

try
{

if (fromAddress.Trim().Length == 0)
{
MessageBox.Show(this, "Cannot send mail from an empty address. Please confirm the setting email.", "Byaxiom SendMail", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (toAddress.Trim().Length == 0)
{
MessageBox.Show(this, "Cannot send mail to an empty address. Please confirm the customer email.", "Byaxiom SendMail", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

MailMessage msg = new MailMessage();
msg.IsBodyHtml = true;
msg.From = new MailAddress(fromAddress);
msg.To.Add(toAddress);
if (AppSettings.Default.EMailCopy.Length > 0)
msg.CC.Add("mycopyemail@yahoo.com"wink;

msg.Subject = subject;
msg.Body = message;

SmtpClient mailClient = new SmtpClient("smtp.gmail.com", 587);
mailClient.EnableSsl = true;
NetworkCredential cred = new NetworkCredential(toAddress, "fromAddresspassword"wink;
mailClient.Credentials = cred;

mailClient.Send(msg);
MessageBox.Show(this, "Track report mail sent to " + toAddress + ". Please confirm by checking your mail copy", "Byaxiom SendMail", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
App.LogError(ex);
MessageBox.Show(this, "There was an error sending mail. Please check your setings and internet connection.", "Byaxiom SendMail", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
        }
Software/Programmer Market / Re: A Lagos Based Vb6 Tutor Needed Pls. by SmartK1(m): 10:49am On Jun 12, 2008
Try 08036982314.
Programming / Re: Let Share Codes by SmartK1(m): 11:32am On May 12, 2008
Long time! Cooking up something , Sorry, I was away for a long time.
Programming / Re: Java Or C++ by SmartK1(m): 10:41am On May 12, 2008
I like the topic: "Java or C++". The question is not which one is better.

Java was developed from C++. It depends on what you want to do. U may use any language of preference. But I must point out that the way it would be meaningless, and time-wasting to use assembly language to web app (in the year 2008) so it would be unthoughtful trying to use Java for device drivers.

In fairness, Java is more modern compared to C++ but C# is more modern compared to Java. In fact, new languages (or dervied languages) borrow or leverage on features of their parents and make them better.

So, Java or C++. Whichever. Giving the fact that we dont code machines in this country, I beleive we are nearer to Java, C#, VB, etc since we mostly develop business app.

Good luck.
Programming / Re: .net Questions by SmartK1(m): 3:15pm On May 08, 2008
Microsoft Visual Studio 2005. Though there is 2008 but it is not yet popupar. Good luck.
Software/Programmer Market / School Management Software by SmartK1(m): 2:10pm On May 07, 2008
Hi, I have a secondary/primary schools management software (web app) that can be implemented for any school. I am looking for clients and  marketers. If u are interested u can call me on 08036982314 for discussion. I can send u the brochure if u contact me. U may also send mail to mcrahmsmart@yahoo.co.uk, mcrahmsmart@gmail.com
Software/Programmer Market / Re: Can Anyone One Give Me A Search Script, I Will Pay Top Naira For It. by SmartK1(m): 4:45pm On Mar 06, 2008
Hi, contact me on 08036982314. I might have something 4 u, depending on ur exact need.
Software/Programmer Market / Re: Need the Service of a Web Designer by SmartK1(m): 7:39pm On Dec 29, 2007
leave your mobile no.
Music/Radio / Re: Who Is King Of Fuji In Nigeria? by SmartK1(m): 1:23pm On Nov 14, 2007
He olodo, Wasiu is d king of Fuji.

Osupa is the king of music.

Is it clear.
You think this violent Mofo should be the fuji King? Nah!!!!!!!!!
Has he fought with u before.

They want someone who is humble and not violent
Like the current king who reportedly goes around with gun.

It's obvious Fuji artistes like him and younger than him don't want him
Bon ba fun were loko, odo ara re ni yio ro oko si. He did not make himself. The fuji creator, someone to be recknoed with in Nigeria music, nominated him.

He knows he will never be King
He is a king already.

Hear him out and see the truth in the lies.

"Ilesanmi dun joye lo"
"Boba ba kan mi, eyin aye ma a wi". You did not hear that. That was the completion of the first one u quoted out of context.

Yeah! He's got a claim to the throne but it will be a disaster if he's made King.His friends will turn to Brutus and he'll be Ceasar.
HE IS KING OF MUSIC.

Is K1 no longer the king?
He is, the king of fuji.

Bros, if u do not know about fuji or music, go and rest.
Religion / Re: The Man Called Pastor Chris Oyakhilome! by SmartK1(m): 11:08am On Nov 14, 2007
theqene
this kind of topic should not have been started in this part of the forum;
Perfect.

am a proud christian
I now of xtians i never knew there are proud ones

(atheism; yes, it's a religion)
No atheism is not a religion. it is a lack of belief in the existence of God or gods (lack of beleif in religion)

, blaise pascal, albert einstein, etc who hitherto presented positions of atheism are reported to have confessed JESUS as LORD before they died.
Albert Einstein (the man of last millennium) was a xtian, not an atheist.

pastor chris' teachings are full of sound christian doctrine and addresses the total man (spiritual(spirit), emotional(soul), and material(body)).
that, i dont know of.

My final submission: if the poser had not tried to sell his pastor here there would have not been any comments about hos pastor here.
Jesus was a lord, is a lord and will always be a lord , forever and ever ( a lord is a person who has general authority over others, not necessarily God.)

If u like u can worship stone not even a pastor. ur palava. Do not just try to sell that kind of crap to some of us who can think and if u dont want comment dont pose.

Good luck.
Celebrities / Re: King Osupa Saheed The Strong Man by SmartK1(m): 10:28am On Nov 14, 2007
NO DOUBT. OSUPA IS STRONG, just like Papa.

For somebody to have stood tall and faced the self-acclaimed Fuji Oluaye who has never offered anything apart from chaos since his inauguration(?). Kudos to him. At least Osupa can lay claim to 2 other fuji musician who he trained and are now doing well in the industry. Where are the Oluayes, the Kebes, etc. At least, Oluaye emerged from Barrister. Do not forget his name initially was Wasiu Ayinde Barrister (after his Oga).

Point of correction. Paso never caused anything, he was a mere tool in causing the problem. He was used by Wasiu Ayinde. Paso has always been a tool for such stuffs in his entire life. Reflect back on his duo with Marshal when Obesere influenced him. He is a man without mind of his own.

Anyway, even if they come together 'morrow and say Osupa is not a king. We, lovers of good music, will always regard him as a king.

Also, a note of warning to Baba Alagbado for taking side in a matter that never concerns him. Olote ni gbogbo won.

OSUPA OBA ORIN TIDE.
Celebrities / Re: Pasuma Vs Obesere. by SmartK1(m): 9:51am On Nov 14, 2007
Pasuma is beta,he has the looks and he is also decent

Na wa ooo. Decent for Paso after marrying a girl a year and still not leaving with one. Or Obesere who only married one after all these years even that ha had been there before Paso, richer than Paso, more exposed (traveled) than Paso.

In fact they are incomparable for reasons below:
i. Obesere started the thread(?) - asakasa [complete garage music as an album]. Pasuma just followed the thread.
ii. Obesere is a musician. Pasuma is an entertainer. Papa (Obesere) has diversified his music over years and u can distinctly distinguish his albums unlike Pasuma albums which always sound same.
iii. Obesere is more creative. Pasuma repeats what has been said.
iv. The list is endless.

Meanwhile, I would not be doing a good job if I fail to point out some plus for Paso over Papa
i. He is more handsome. (though not relevant in this context)
ii. He is more juvenile
iii. He relates more with peers musically. Note that Papa relates more as a brother and their saviour when needs arise.
iv. Ths list is also endless.

Got a job to do. C u later

1 Like

Programming / Re: Programmers, Pls Help ! by SmartK1(m): 5:49pm On Nov 12, 2007
Windows 98 and Windows Me are based on the popular Microsoft Windows 95 Operating System, and are designed for the consumer market. Windows 95/98 were designed for backward compatibility with older DOS and 16bit programs, as well as providing a platform for the newer (back in 1995) 32 bit programs. Although many companies use both Windows 95 and Windows 98, these Operating Systems lack the security and stability of Windows NT/2000. However, Windows 95/98/Me is compatible with more software (including games) and hardware. It is important to remember that Windows 2000 is designed for the corporate environment, and not the average home user.
ref: http://labmice.techtarget.com/FAQ/win2000faq.htm

Learn to google this type of questions.

Good luck
Programming / Re: Let Share Codes by SmartK1(m): 5:26pm On Nov 12, 2007
Here is the code that converts amount in double to amount in words. I did it in C#. You may copy and use it if u like. It uses Nigeria currency :

Usage: AmountInWord(115.50) returns one hundred and fifteen naira fifty kobo only.

public static string AmountInWord(string amount)
{
long num;
long num2;
string str2;
string str3;
string str = "";
string[] strArray = new string[5];
amount = amount.Replace(",", ""wink;
amount = amount.Replace(" ", ""wink;
str = "";
try
{
double num3 = double.Parse(amount);
}
catch
{
throw new Exception("The amount supplied is not a number and therefore not convertuble"wink;
}
strArray[0] = "Trillion ";
strArray[1] = "Billion ";
strArray[2] = "Million ";
strArray[3] = "Thousand ";
strArray[4] = " ";
int index = amount.IndexOf("."wink;
if (index > -1)
{
str2 = amount.Substring(0, index);
str3 = amount.Substring(index, amount.Length - index);
if (str2.Length > 15)
{
throw new Exception("The amount supplied must not be greater than 999 999 999 999 999.99"wink;
}
str2 = string.Format("{0:D15}", long.Parse(str2));
str3 = string.Format("{0:F2}", double.Parse(str3));
}
else
{
if (amount.Length > 15)
{
throw new Exception("The amount supplied must not be greater than 999 999 999 999 999.99"wink;
}
str2 = string.Format("{0:D15}", long.Parse(amount));
str3 = "0.00";
}
amount = str2 + str3.Substring(1, 3);
int num5 = 0;
for (int i = 0; num5 <= 4; i += 3)
{
if (long.Parse(amount.Substring(i, 3)) > 0)
{
if (long.Parse(amount.Substring(i, 1)) > 0)
{
num = long.Parse(amount.Substring(i + 1, 1));
num2 = long.Parse(amount.Substring(i + 2, 1));
if ((num > 0) || (num2 > 0))
{
str = str + convert(amount.Substring(i, 1)) + "Hundred And ";
}
else
{
str = str + convert(amount.Substring(i, 1)) + "Hundred ";
}
}
num = long.Parse(amount.Substring(i + 1, 2));
num2 = long.Parse(amount.Substring(i + 1, 2));
if ((num >= 20) && (num2 <= 0x63))
{
num = long.Parse(amount.Substring(i + 1, 1) + "0"wink;
num2 = long.Parse(amount.Substring((i + 1) + 1, 1));
str = str + convert(num) + convert(num2);
}
num = long.Parse(amount.Substring(i + 1, 2));
num2 = long.Parse(amount.Substring(i + 1, 2));
if ((num >= 1) && (num2 < 20))
{
str = str + convert(amount.Substring(i + 1, 2));
}
str = str + strArray[num5];
}
num5++;
}
if (long.Parse(amount.Substring(0, 15)) > 0)
{
str = str + "naira ";
}
num = int.Parse(amount.Substring(amount.Length - 2, 2));
if (num > 0)
{
num = long.Parse(amount.Substring(amount.Length - 2, 2));
num2 = long.Parse(amount.Substring(amount.Length - 2, 2));
if ((num >= 20) && (num2 <= 0x63))
{
num = long.Parse(amount.Substring(0x10, 1) + "0"wink;
num2 = long.Parse(amount.Substring(0x11, 1));
str = str + convert(num) + convert(num2);
}
num = long.Parse(amount.Substring(amount.Length - 2, 2));
if ((num >= 1) && (num < 20))
{
str = str + convert(amount.Substring(amount.Length - 2, 2));
}
str = str + "kobo ";
}
return (str + "only"wink.ToLower();
}

private static string convert(long amount)
{
return convert(amount.ToString());
}

private static string convert(string amount)
{
switch (int.Parse(amount))
{
case 70:
return "seventy ";

case 80:
return "eighty ";

case 90:
return "ninety ";

case 0:
return "";

case 1:
return "one ";

case 2:
return "two ";

case 3:
return "three ";

case 4:
return "four ";

case 5:
return "five ";

case 6:
return "six ";

case 7:
return "seven ";

case 8:
return "eight ";

case 9:
return "nine ";

case 10:
return "ten ";

case 11:
return "eleven ";

case 12:
return "twelve ";

case 13:
return "thirteen ";

case 14:
return "fouteen ";

case 15:
return "fifteen ";

case 0x10:
return "sixteen ";

case 0x11:
return "seventeen ";

case 0x12:
return "eighteen ";

case 0x13:
return "nineteen ";

case 20:
return "twenty ";

case 30:
return "thirty ";

case 40:
return "fourty ";

case 50:
return "fifty ";

case 60:
return "sixty ";
}
return "";
}

public static bool IsNumeric(string val)
{
try
{
double num = double.Parse(val);
return true;
}
catch
{
return false;
}
}

Good luck
Programming / Re: Post Your "c" Program Questions Here by SmartK1(m): 5:21pm On Nov 12, 2007
Here is a very simple example of an algorithm to convert the number 115 to a string:

let a = 115
let i = 0
allocate memory for string c
loop until a = 0
c[i] = a % 10
a = a / 10
i = i + 1
end loop
reverse string c
Good job (looks fine) but I wonder how the above will produce desired result : one hundred and fifteen.


I don't like doing people's homework for them
That is 4 people like u who still has homeworks. I left university more than 7 years ago (i am trying to figure out where u were then)


I deliberately did not post code for this. However, there should be enough info in both the example above for you to figure it out.
Your thread reads
Re: Post Your "c" Program Questions Here

Sorry man for disappointing u but i do post codes. Here is the code that converts amount in double to amount in words. I did it in C#. You may copy and use it if u like. It uses Nigeria currency if u like:

public static string AmountInWord(string amount)
{
long num;
long num2;
string str2;
string str3;
string str = "";
string[] strArray = new string[5];
amount = amount.Replace(",", ""wink;
amount = amount.Replace(" ", ""wink;
str = "";
try
{
double num3 = double.Parse(amount);
}
catch
{
throw new Exception("The amount supplied is not a number and therefore not convertuble"wink;
}
strArray[0] = "Trillion ";
strArray[1] = "Billion ";
strArray[2] = "Million ";
strArray[3] = "Thousand ";
strArray[4] = " ";
int index = amount.IndexOf("."wink;
if (index > -1)
{
str2 = amount.Substring(0, index);
str3 = amount.Substring(index, amount.Length - index);
if (str2.Length > 15)
{
throw new Exception("The amount supplied must not be greater than 999 999 999 999 999.99"wink;
}
str2 = string.Format("{0:D15}", long.Parse(str2));
str3 = string.Format("{0:F2}", double.Parse(str3));
}
else
{
if (amount.Length > 15)
{
throw new Exception("The amount supplied must not be greater than 999 999 999 999 999.99"wink;
}
str2 = string.Format("{0:D15}", long.Parse(amount));
str3 = "0.00";
}
amount = str2 + str3.Substring(1, 3);
int num5 = 0;
for (int i = 0; num5 <= 4; i += 3)
{
if (long.Parse(amount.Substring(i, 3)) > 0)
{
if (long.Parse(amount.Substring(i, 1)) > 0)
{
num = long.Parse(amount.Substring(i + 1, 1));
num2 = long.Parse(amount.Substring(i + 2, 1));
if ((num > 0) || (num2 > 0))
{
str = str + convert(amount.Substring(i, 1)) + "Hundred And ";
}
else
{
str = str + convert(amount.Substring(i, 1)) + "Hundred ";
}
}
num = long.Parse(amount.Substring(i + 1, 2));
num2 = long.Parse(amount.Substring(i + 1, 2));
if ((num >= 20) && (num2 <= 0x63))
{
num = long.Parse(amount.Substring(i + 1, 1) + "0"wink;
num2 = long.Parse(amount.Substring((i + 1) + 1, 1));
str = str + convert(num) + convert(num2);
}
num = long.Parse(amount.Substring(i + 1, 2));
num2 = long.Parse(amount.Substring(i + 1, 2));
if ((num >= 1) && (num2 < 20))
{
str = str + convert(amount.Substring(i + 1, 2));
}
str = str + strArray[num5];
}
num5++;
}
if (long.Parse(amount.Substring(0, 15)) > 0)
{
str = str + "naira ";
}
num = int.Parse(amount.Substring(amount.Length - 2, 2));
if (num > 0)
{
num = long.Parse(amount.Substring(amount.Length - 2, 2));
num2 = long.Parse(amount.Substring(amount.Length - 2, 2));
if ((num >= 20) && (num2 <= 0x63))
{
num = long.Parse(amount.Substring(0x10, 1) + "0"wink;
num2 = long.Parse(amount.Substring(0x11, 1));
str = str + convert(num) + convert(num2);
}
num = long.Parse(amount.Substring(amount.Length - 2, 2));
if ((num >= 1) && (num < 20))
{
str = str + convert(amount.Substring(amount.Length - 2, 2));
}
str = str + "kobo ";
}
return (str + "only"wink.ToLower();
}

private static string convert(long amount)
{
return convert(amount.ToString());
}

private static string convert(string amount)
{
switch (int.Parse(amount))
{
case 70:
return "seventy ";

case 80:
return "eighty ";

case 90:
return "ninety ";

case 0:
return "";

case 1:
return "one ";

case 2:
return "two ";

case 3:
return "three ";

case 4:
return "four ";

case 5:
return "five ";

case 6:
return "six ";

case 7:
return "seven ";

case 8:
return "eight ";

case 9:
return "nine ";

case 10:
return "ten ";

case 11:
return "eleven ";

case 12:
return "twelve ";

case 13:
return "thirteen ";

case 14:
return "fouteen ";

case 15:
return "fifteen ";

case 0x10:
return "sixteen ";

case 0x11:
return "seventeen ";

case 0x12:
return "eighteen ";

case 0x13:
return "nineteen ";

case 20:
return "twenty ";

case 30:
return "thirty ";

case 40:
return "fourty ";

case 50:
return "fifty ";

case 60:
return "sixty ";
}
return "";
}

public static bool IsNumeric(string val)
{
try
{
double num = double.Parse(val);
return true;
}
catch
{
return false;
}
}

Good luck
Programming / Re: Let Share Codes by SmartK1(m): 1:01pm On Nov 12, 2007
I don't know if anyone needs the source code of my simple application that calculates the determinant of a 3 by 3 square maltrix.

You have tried man. Keep it up. I did exactly that, about 8 years ago when learning C. You can push it a little 4ward by use it to solve 3X3 simultaneous eqns. I mean real life situations like determining prices of known items.

Good luck.
Programming / Passing Business Object Between Dal And Bll by SmartK1(m): 1:49pm On Nov 07, 2007
hi guys,
in the past i had to struggle to get my solution organized so that i would not have troubles of maintenance. I came across a lot of models and methods but I was not really fully satisfied. Hoever, I decided to go for separation of layers of my solution into projects namely, myweb(the site), BLL (Business Logic Layer) and DAL (Data Access Layer).

However, I ran into problem passing data between BLL and DAL because there are times i need to pass complex data and I wanted to avoid passing unreasonable no of parameters. For instance, say i want to update a student data that has 60 fields through DAL from BLL, i needed to pass the 60 parameters to DAL from BLL. I guess this is not a best practice. Note that I could not pass BLL objects to DAL as this will result in circular reference.

So, I introduced another layer to my solution called PRL (Presentation Layer). This layer forms the base layer for the BLL and DAL and contains the basic abstract classes that I would pass between DAL and BLL. As a matter of separation principle I made sure that PRL objects do not contain any methods. I make BLL objects inherit from these objects and therefor can pass BLL objects to DAL without hassles. finito.


Here are my sample codes

PRL (VB)
Public MustInherit Class Account
Private _accountNumber As String
Private _accountName As String
Private _balance As Double

Public Property AccountNumber() As String
Get
Return _accountNumber
End Get
Set(ByVal value As String)
_accountNumber = value
End Set
End Property
Public Property AccountName() As String
Get
Return _accountName
End Get
Set(ByVal value As String)
_accountName = value
End Set
End Property
Public Property Balance() As Double
Get
Return _balance
End Get
Set(ByVal value As Double)
_balance = value
End Set
End Property

End Class

DAL (VB)
Public Class InsertAccount
Public Function Update(ByVal account As Presenters.Account) As Boolean

'//call stored procedure or something and return success or otherwise
Return True

End Function


End Class

BLL (C#)
public class Account : Presenters.Account
{
public bool Update()
{
DAL.InsertAccount ia = new DAL.InsertAccount();
return ia.Update(this);
}
}


SampleSite (C#)
protected void Page_Load(object sender, EventArgs e)
{
BLL.Account acct = new BLL.Account();
acct.AccountName = "Magaji";
acct.AccountNumber = "12346578";
acct.Balance = 123311123321;

if (acct.Update()) this.TextBox1.Text = "Updated";
else this.TextBox1.Text = "Failed";

}

Please, never mind about language mixing. I also use it to relay that .NET solution can contain more language.

Please enjoy.

Good luck.

Programming / Re: Post Your "c" Program Questions Here by SmartK1(m): 11:13am On Nov 07, 2007
Please shed more lıgth on your questıon. Do you want a program that dısplays the correspondıng letter of the alphabet as a result or what?

The function will take a parameter (double) and return string.

Asumming the signature of the function is:

string Convert(double num){
//implementation
}


//usage
string myword = Convert(1234);
print("%s", myword);

expected : one thousand two hundred and thirty four.

10x
Certification And Training Adverts / Re: 70-548 Mcpd Dumps by SmartK1(m): 9:00am On Nov 07, 2007
Programming / Re: Let Share Codes by SmartK1(m): 11:04am On Nov 06, 2007
int s;
JTextField f = new JTextField();
s = f.getText();

the above snipet only works if s is a String. I want i to work for integer.

try this man!

int s;
JTextField f = new JTextField();
s = Integer.parseInt( f.getText());
Software/Programmer Market / Re: Vacancy by SmartK1(m): 10:11am On Nov 06, 2007
Hi,
I am interested in the above job and I sent my CV. I am yet to confirm if the CV is received or not. Can u kindly acknowledge the receipt of my CV and if not I may just re-send it only I am not sure if it will get to you again.

Why don't u leave your number so that at least u may be called.

(1) (2) (3) (of 3 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 96
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.