₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,153 members, 8,420,582 topics. Date: Friday, 05 June 2026 at 04:19 AM

Toggle theme

Olyjosh's Posts

Nairaland ForumOlyjosh's ProfileOlyjosh's Posts

1 2 3 4 5 6 7 (of 7 pages)

ProgrammingRe: Simple Factorial Challenge by olyjosh(m): 8:02pm On May 23, 2016
I tried not to post this solution because it breaks the 5secs limit on ideone but I have gat no other improvement on it for now



import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;

/**
*
* @author Olyjosh
*/
public class SimpleFactorial {

private static BigDecimal sum = new BigDecimal("0"wink;
private static final BigDecimal x=new BigDecimal(0.7893);
private static final BigDecimal TWO=new BigDecimal(2);
private static BigDecimal exp = x;
private static BigInteger bi=BigInteger.ONE;


private static BigDecimal factBig(int n){
BigDecimal bd;
BigDecimal div;
for (int i = 2; i <= n; i++) {
bi=bi.multiply(new BigInteger(""+i));
//BigInteger factBig = factBig();
bd = new BigDecimal(bi);
div = bd.subtract(BigDecimal.ONE)
.divide(bd, 21, RoundingMode.HALF_UP);
exp=exp.multiply(x);
sum=sum.add(div.multiply(exp).multiply(TWO));
}
return sum.setScale(20, RoundingMode.HALF_UP);
}


public static void main(String[] args) {
System.out.println(factBig(5000));
}
}



Ans = 5.08845978368001258389

However this run for about 1825millisec on my 2.5 GHz Intel Core i5
ProgrammingRe: Simple Factorial Challenge by olyjosh(m): 8:29am On May 23, 2016
jacob05:
https://ideone.com/DSusUY
Nice one Boss.
Your solution runs for 0.22s 11640KB
ProgrammingRe: Simple Factorial Challenge by olyjosh(m): 7:40am On May 23, 2016
Please guys, do submit your computation time and memory usage for these solutions. Anybody could have solve it, but let's see how effective is your solution in term of space and time.
You can log ur codes here https://ideone.com/ or on your machine(please do state the machine processor and memory configuration).
Thanks
ProgrammingRe: Javafx FXML Help Needed. by olyjosh(m): 9:58pm On May 22, 2016
Have you being able to solve it. IF NOT , let me know how you change the content of TableView. In anyway, you should change the content of a tableview by changing the ObservableList of such tableView. Getting the exact row you click depend on your selection model(single or multiple) though you need to still work on the ObservableList by traversing using index or the getSelectedItem/getSelectedItems of ObservableList .

Please post your code if you can. Should in case you didn't get response in some hours - I must have locked busy, so chat me up 08061662025
Tech JobsRe: I Need Auto Respond For Banking Portal by olyjosh(m): 11:52pm On May 13, 2016
Question/Request not detailed:
What type of alert, sms or mail?
What language or technology are u using?
...
Tech JobsRe: Software Developer Needed by olyjosh(m): 5:45pm On Apr 26, 2016
Sometimes, you have to run into some sadist on nairaland just because you aired your opinion. You are welcome to this place. I have seen nothing bad in what you have said bro, in fact you are right about your spec. That guy just wan talk to person nii grin.
The dude fit carry me be en next chewing gum now ooo
ProgrammingRe: Artificial Intelligence by olyjosh(m): 12:39pm On Mar 28, 2016
I can do computer vision with open cv(java cv). Are you the one building this drone or you are buying one that you want to program?
ProgrammingRe: Final Year Project - Please Help by olyjosh(m): 12:28am On Jan 23, 2016
CUM4WHAT:
dude like seriously? For a call tracking app? U guys amuse me sometimes... .... So u wud use html and js to track calls and get gps data?
I think you should read the post very well. The author never write about call tracking, it was specified that the design considers GPS and Internet for itsfunctionalities. However, you should be a programmer that is ready to read and learn new things extensively. Phonegap among other HTML5/javascript platform has being making a lot of wave for sometime now in mobile app development. I don't use them for my work but that doesn't mean I shouldn't know about them. I wonder if you don't know this is possible in HTML5/javascript app deployment for Mobile. I'm sure you didn't even follow the link to the doc in my earlier response. Note that HTML5 is quite different to the HTML you know.
If all these still amuse you then everybody here is a century ahead of you bro.
ProgrammingRe: Final Year Project - Please Help by olyjosh(m): 3:35pm On Jan 22, 2016
CUM4WHAT:
are u dumb?
Bro, must you use that word

Deploying a native app is the best approach to this, however, there is always a work around in HTML5/javascript Mobile WORA(Write once, run anywhere) platforms. Phonegap among other HTML5/javascript Mobile development platform does it. Check out docs here http://docs.phonegap.com/en/2.0.0/cordova_geolocation_geolocation.md.html
ProgrammingRe: Pacific School Software by olyjosh(m): 1:18pm On Jan 20, 2016
kem82:
I just logged in again now - check your internet connection smiley
My internet is Ok, just tried again now and still getting stuck in the same login page. The GET parameter "?next=/dashboard/" in ur the link I sent to you was actually a redirection from your server and that show I'm not having internet connection problem.

The Django stack trace that I had on using forget my password option was also from your server. You may consider switching off that feature in your configuration files.
Somebody else should verify that the app is serving the same page after login. As for me I still can't login
ProgrammingRe: Pacific School Software by olyjosh(m): 4:54am On Jan 20, 2016
kem82:
The login works perfectly smiley
Abeggi!!!
- Its only showing the link like this http://www.henryschool.com/?next=/dashboard/ but it never load the dashboard for real.
- Using any email on forget my password show some kind of Django stack trace.

Like I said, Nice theme anyway but the app is not yet completed I guess. Or is there any other specila way of sign-in into the system than using the interface provided on that link
ProgrammingRe: Real Hacker Needed!!! (encryption Breaker) by olyjosh(m): 11:55am On Jan 19, 2016
seunthomas:
Bro, just give up already. If am right, you are trying to break AES. It cant be done. AES is kind of indestructable for now. You would need hardware that has not been created yet. You cant use brute force and Rijndael is kind of very bug proof. So forget this and look for more important things to do. If you want to break md5, i can do that for you.
Are you trying to say it's AES? Hell no. If anybody is able to crack AES with any of the current processing power, then he is stinky rich. And he will be as important as one of the world powers cos he will definitely make america to go back into research of another Encryption standard
ProgrammingRe: Pacific School Software by olyjosh(m): 11:45am On Jan 19, 2016
Nice theme, but not a functioning application. Just too buggy, Can't even login
ProgrammingRe: Why Are Nigerian Programmers So Dumb? by olyjosh(m): 12:24pm On Jan 18, 2016
After all these arguments, Seun still got paid. I hope the wisest Nigerian programmer who authored this post will know that he has created this post just to make Seun richer - Ads is already on the post anyway
ProgrammingRe: Using Finger Print Scanner On PHP by olyjosh(m): 6:12am On Jan 18, 2016
webmasteremma:
This is exactly what I need, how do I get in touch with u?
my contact is on my signature
ProgrammingRe: Using Finger Print Scanner On PHP by olyjosh(m): 6:08am On Jan 18, 2016
proxy20:
thumb up Bro , keep doing the cool stuff
Thanks
ProgrammingRe: Real Hacker Needed!!! (encryption Breaker) by olyjosh(m): 4:39pm On Jan 17, 2016
Hope this not coming from Dasuki money grin. Lol. Just joking ni oo.
But come to think of a job like this...
ProgrammingRe: Using Finger Print Scanner On PHP by olyjosh(m):
The fingerprint scanner in used is SecuGen. Can't really remember the model number but the popular one with etisalat sim registration. The sdk is only availabel in java, .net. The real-time facial capturing and recognition was however done on system webcam, though support any other webcam attach to the system, opencv is the library used for this, there is implementation of this in java, C#, python among others but I'm not sure if there is any for php( there may be community project of such).

However, I remember during this very same time I was doing my final year project, that's late quarters of last year, a female friend who understand php very well was trying to solve almost same problem of doing fingerprint scanning in php. Quite impossible though, but we came up with a work around which was to write a java app that will serve as handler and will be invoke by a php code. This works but not efficient in a production for some security reason. This will do for a school project or a close intranet based server system run in an organisation and was not on cloud server. We used a digital personel fingerprint scanner for this though securgen will also work perfectly
ProgrammingRe: Using Finger Print Scanner On PHP by olyjosh(m): 3:31pm On Jan 17, 2016
The last time I deployed a project in this scope was actually done with java/javafx. Though we are actually dealing with taking attendance with finger print or facial recognition.
Check these Images

ProgrammingRe: D Gurus Wie Are U? by olyjosh(m): 8:32am On Dec 23, 2015
Well, Though u didn't specify the version of Microsoft word but as of Microsoft office 2007(2007,...,2010,...) that I know of, You can use "SAVE AS" option(i.e Press CTRL+SHIFT+S on PC , CMD+SHIFT+S on MAC or Goto[b] Fille->SAVE AS[/b]) and change the format to pdf.

If are working on office 2003, You may need to install another printing service application like Nitro PDF, and with this approach you can click on print and change ur priter to Nitro PDF PRINTER then you are will have your pdf file too.

Another approach to this is using some cloud application service which can convert you word file to pdf file. Just google "convert word to pdf" and you have zillion of them
ProgrammingRe: D Gurus Wie Are U? by olyjosh(m): 7:55am On Dec 23, 2015
That question is not detailed. You should at least tell people what approach you are trying to use. Are doing this with programming or just trying to convert some stuffs you typed in editor. No body can help u with such a wide question because there are many answer to that question in which none of them will satisfy ur intent. Almost everybody with voting privilege will vote down a question like this on stackoverflow. Edit your question bro
Tech JobsRe: Apps Developer For Church Materials Needed Urgently by olyjosh(m): 7:16pm On Sep 23, 2015
You can get in touch with me on 08061662025
olyjoshone@gmail.com
Mobile and web apps with proven records
ProgrammingRe: Solution Of Linear Programming Problems Using Simplex Method by olyjosh(m): 12:12am On Jun 25, 2015
jagalo:
I did alot of linear programming (in numerical analysis ) while at school. the first step is writing a good algorithm; further engineering mathematics can be of help. then, you can use any programmiong language to do the job. I did my using C++. java and VB can also do the trick.

enjoy may guy!
ishmael:
In Numerical Analysis?? Are u sure you know what the guy is talking about?? He's talking about Linear programming in Operations Research o! Which school is dat sef?
I beg tell am say plenty people dey here wey study math wella grin cheesy
ProgrammingRe: Classified DNA Database And Fingerprints website and software by olyjosh(m): 2:41pm On Jun 07, 2015
Integrating Bometric to softwares or website is usually done using the sdk( these are usually release by the device manufacturer) of the device you are using for your biometry. However, most sdk of these devices are usually release with support for some languages(and or framework) and not all(mostly C/C++, C# (consider other .net) , Java).

I'm not sure if php base frame work can do what you have describe and I know that thses framework may not support scaling except you thinking of writing your own virtual machine base on php in future.

I will prefer going with java or .net frame work for such project (both web and desktop)
ProgrammingRe: Classified DNA Database And Fingerprints website and software by olyjosh(m): 12:29pm On Jun 06, 2015
proxy23:
Joomla and asp.net is the best platform for such site pls give me the one you to build such site .using Sql or Ftp to transfer Database to site .Site of such use should be built purely by php .
I'm not sure you have the proper knowledge of what you are saying. May be you thinking of proto-type
ProgrammingRe: Image Recognition by olyjosh(m): 9:18pm On May 29, 2015
Well currently doing stuffs on Image/facial recorgnition using javacv/opencv things
ProgrammingRe: Unilorin C Programming Question. by olyjosh(m): 8:51pm On May 29, 2015
Quite simple, NO BIG DEAL, Stop the hype, its what you have been taught
ProgrammingRe: Trivia Coding Questions (euler Project) by olyjosh(m): 4:48pm On May 22, 2015
olyjosh:
/** @author olyjosh */
public class _01Sundays {

public static int year=1901;

public enum Month {
JAN(31),FEB(28),MAR(31),APR(30),MAY(31),JUN(30),JUL(31),AUG(31),SEP(30),OCT(31),NOV(30),DEC(31);

int days;
private Month(int days) {
this.days=days;
}

}

public static void main(String []args){
byte day =3; //first day of jan 1901 will be deinately be tuesday
int count=0;
while(year<=2000){
//iterating over month
for(Month e :Month.values()){
int days=e.equals(Month.FEB) && ((year%4==0 && year%100!=0) || (year%400==0)) ? 29 : e.days;
for (int i = 1; i <= days; i++) {
if(day==coolday=1;
if(i==1 && day==1){
count++;
}
day++;
}
}
year++;
}
System.out.println(count+" Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)"wink;
}

}


171 Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)
I think Calendar or Gregorian calendar should be able work in java anyway. I may post another solution using Calendar
ProgrammingRe: Trivia Coding Questions (euler Project) by olyjosh(m): 4:45pm On May 22, 2015
kudaisi:
You are given the following information, but you may prefer to do some research for yourself.

1 Jan 1900 was a Monday.
Thirty days has September,
April, June and November.
All the rest have thirty-one,
Saving February alone,
Which has twenty-eight, rain or shine.
And on leap years, twenty-nine.
A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
/** @author olyjosh */
public class _01Sundays {

public static int year=1901;

public enum Month {
JAN(31),FEB(28),MAR(31),APR(30),MAY(31),JUN(30),JUL(31),AUG(31),SEP(30),OCT(31),NOV(30),DEC(31);

int days;
private Month(int days) {
this.days=days;
}

}

public static void main(String []args){
byte day =3; //first day of jan 1901 will be deinately be tuesday
int count=0;
while(year<=2000){
//iterating over month
for(Month e :Month.values()){
int days=e.equals(Month.FEB) && ((year%4==0 && year%100!=0) || (year%400==0)) ? 29 : e.days;
for (int i = 1; i <= days; i++) {
if(day==coolday=1;
if(i==1 && day==1){
count++;
}
day++;
}
}
year++;
}
System.out.println(count+" Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)"wink;
}

}


171 Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)
ProgrammingRe: Trivia Coding Questions (euler Project) by olyjosh(m): 10:52pm On May 16, 2015
kudaisi:
See image for question.
import java.math.BigInteger;

/**
*
* @author olyjosh
*/
public class SumOfDigits {

public static void main(String[] args) {
char[] n = new BigInteger("2"wink.pow(1000).toString().toCharArray();
int ans=0;
for (int i = 0; i <n.length ; i++) {
ans+=Integer.parseInt(String.valueOf(n[i]));
}
System.out.println("Sum of digits of number 2^1000 is "+ans);
}
}

Sum of digits of number 2^1000 is 1366
ProgrammingRe: Trivia Coding Questions (euler Project) by olyjosh(m): 5:14am On May 16, 2015
Just coming back from exams. Back here to top up my IQ. cheesy

WhiZTiM:
Will be retiring now..... ....My engagements have drastically increased
Thanks Kudasi for these simple questions... ...I learned some things...
...I am a two time participant in one of the Regionals of the Most prestigious Programming contest in the World, ACM-ICPC. Participated in the ACM-ICPC South African Regionals back in 2012 and 2013.
Needless to say.
- In 2012, my team (ATBU) came 2nd in Nigeria but 40th in Africa. Covenant University's C++ team came 1st in Nigeria but 38th in Africa.
http://icpc.baylor.edu/regionals/finder/south-africa-2012/standings
- In 2013, my team (ATBU) came 1st in Nigeria but 5th in Africa. Covenant University's C++ team came 2nd in Nigeria but 18th in Africa. We would have landed top 2 if I and my partner didn't screw up some things (We correctly attempted 6 questions, but successfully submitted 3)... Since then, I haven't done much of Competitive programming.
http://icpc.baylor.edu/regionals/finder/south-africa-2013/standings
You do too much bro cheesy cheesy You are not simple men you know cool I never do much contest sha oo. Just once and the we are on the winning team at 2013 NACOSS Programming context(Team FUTMinna). 2014 was intern period, so let go 2015 to do something. @Whiztim Seriously, I'm inspired.

Need to reach you on watsapp - 08061662025
ProgrammingRe: Trivia Coding Questions (euler Project) by olyjosh(m): 7:32pm On May 07, 2015
Singapore1:
which language is this?
c++

1 2 3 4 5 6 7 (of 7 pages)