# Search:

Type: Posts; User: mjr

Page 1 of 2 1

## Search: Search took 1.47 seconds.

by mjr
Replies
1
Views
264

### Advice for selling an app?

This may have been posted elsewhere...

I'm writing a couple of apps that I think I might be able to sell. I have a couple of questions regarding this.

1. Do I need to/should I set up a separate...

by mjr
Replies
1
Views
495

### A few questions about encryption and decryption

I'm working on an app that I might potentially want to market. I want to encrypt some of the information, and then have the user be able to "recall" that information, which then decrypts the string....
3. ## Thread: Fibonacci numbers? How to define these numbers in some interval (diapazone)

by mjr
Replies
3
Views
490

### Re: Fibonacci numbers? How to define these numbers in some interval (diapazone)

Use Binet's formula, and the range of the numbers, if I understand you correctly.

Let's say your range is from "position" 2 to 5.

You would use a for loop that starts at 2, and go from there.
...

by mjr
Replies
17
Views
226

### [SOLVED] Re: Memoization

I don't know about you, but I'd use a decimal primitive type, and Binet's formula to get large fibonacci numbers. Pass in the "position", have a method that calculates based on Binet's formula, and...
5. ## Thread: I think I did something wrong here. I need some feedback...

by mjr
Replies
5
Views
228

### [SOLVED] Re: I think I did something wrong here. I need some feedback...

Ok, after some refactoring, I think I have it figured out. I changed the for statement in the original code to a while statement.

I also changed the x variable to a long type instead of just an...
6. ## Thread: I think I did something wrong here. I need some feedback...

by mjr
Replies
5
Views
228

### [SOLVED] Re: I think I did something wrong here. I need some feedback...

I get what you're saying about the primitive types. I do notice that in my code above I'm using an int type for the "number" variable, and a long for the step variable. So the step variable can go up...
7. ## Thread: Spaces at the start of every other line in a for loop

by mjr
Replies
12
Views
260

### Re: Spaces at the start of every other line in a for loop

I'd have to agree with the above poster.
8. ## Thread: I think I did something wrong here. I need some feedback...

by mjr
Replies
5
Views
228

### [SOLVED] Re: I think I did something wrong here. I need some feedback...

Interesting. So if I understand what's going on correctly, I'm getting an uncaught overflow error. I thought I was using a large enough data type. Guess not.

Am I correct there?
9. ## Thread: I think I did something wrong here. I need some feedback...

by mjr
Replies
5
Views
228

### [SOLVED] I think I did something wrong here. I need some feedback...

Ok, I was recently writing a small java app that would print out values according to the Collatz Conjecture.

Collatz conjecture - Wikipedia, the free encyclopedia

Anyway, I noticed that after a...
10. ## Thread: I've got a question for you guys about college...

by mjr
Replies
2
Views
301

### I've got a question for you guys about college...

Ok, here's the situation.

I'm almost 37 years old, I've been in IT for almost 15 years, and I started back to school in 2012. I'm taking two classes at a time, essentially starting from zero. I...
11. ## Thread: Problem With File Writing

by mjr
Replies
1
Views
595

### Re: Problem With File Writing

I guess one approach is that if each piece of data is on one line, you could use an array. Read the data from the file into an array, using the line breaks to separate the elements of the array, so...

by mjr
Replies
1
Views
1,128

### [SOLVED] Re: Getting an OpenText LiveLink exception with a Windows Service...any advice?

We finally figured this out. Since we were installing the Windows service on a 64-bit Windows machine, we had to install the J# 2.0 x64 Redistributable. That solved the issue.

by mjr
Replies
1
Views
1,128

### [SOLVED] Getting an OpenText LiveLink exception with a Windows Service...any advice?

Yes, I do believe this is a java-related question.

Ok, here's the scenario: I built a windows service in C# that uses OpenText LiveLink to copy some files. The service works like it should on my...
14. ## Thread: Getting Apache Derby to show up in Eclipse?

by mjr
Replies
2
Views
911

### Re: Getting Apache Derby to show up in Eclipse?

I actually got it to work this morning. I did add the classpath when I first extracted it, but I didn't download the UI plugin. Had to Google for it, but once I did that, I was able to get it to show...
15. ## Thread: Getting Apache Derby to show up in Eclipse?

by mjr
Replies
2
Views
911

### Getting Apache Derby to show up in Eclipse?

Ok, I've been looking into Embedded databases. I downloaded and installed (I think) Apache Derby. I unzipped it per the instructions I found.

I'm trying to get it to show up in Eclipse Indigo,...

by mjr
Replies
1
Views
537

### Re: Application Deployment

I Don't know everything about how to do this (in fact, I'm about to make a related post myself), but I would look into how do deploy your application with an embedded database (such as Apache Derby).

by mjr
Replies
6
Views
578

18. ## Thread: Persisting multiple objects of the same type to a file.

by mjr
Replies
6
Views
578

### [SOLVED] Re: Persisting multiple objects of the same type to a file.

Norm:

Thanks for asking. Before I post the code, yes, I understand that I shouldn't "hard code" paths to files (i.e. C:\MyFiles\somefile.txt), because of the various file systems on various...
19. ## Thread: Persisting multiple objects of the same type to a file.

by mjr
Replies
6
Views
578

### [SOLVED] Re: Persisting multiple objects of the same type to a file.

Good question. Yes, I have. I neglected to mention that.

When I try to do that, the only thing that gets written to the file is the final object. I'm assuming what actually happens is that it...
20. ## Thread: Persisting multiple objects of the same type to a file.

by mjr
Replies
6
Views
578

### [SOLVED] Persisting multiple objects of the same type to a file.

Let's say I have a class called "Names", and it has two properties: firstName and lastName.

And let's say I want to persist the data to a file.

And let's assume that the first time the...
21. ## Thread: Wondering if there's a way to make this more efficient.

by mjr
Replies
2
Views
558

### Wondering if there's a way to make this more efficient.

I have the following method for determining whether or not an integer value is a prime number:

public boolean isPrime(int value){
if(value < 2)
return false;
else
{
...
22. ## Thread: new member need help in java program(typing speed)

by mjr
Replies
1
Views
734

### Re: new member need help in java program(typing speed)

Generally speaking, 5 characters counts as a word. So a sentence like: "My name is Bob." would generally count as 3 words.

If the test itself is not timed, and you're merely typing three...
23. ## Thread: Sieve of Eratosthenes: Memory & Performance

by mjr
Replies
13
Views
1,308

### Re: Sieve of Eratosthenes: Memory & Performance

I've actually written a small program (it was for a homework assignment in a college Java class I took) that actually checked for Prime numbers, and did it fairly quickly.

In fact, I found a list...
24. ## Thread: Problem in understanding the declaration of main.

by mjr
Replies
3
Views
292

### Re: Problem in understanding the declaration of main.

Have you tried declaring it private to see what happens?

I'm still fairly new to Java, but remember: main() is inside a class. The class that holds main() is public. And remember that if a method...

by mjr
Replies
1
Views
409