Recent content by frankfjf
-
F
Java Trying to come up with simple algorithm of significant time complexity in Java
Hi PF, I'm working on a program that requires measuring how long it takes a given computer to process a certain task, but am having trouble coming up with algorithms that won't take most computers a trivial amount of time to perform. The only one I've got so far is recursively computing...- frankfjf
- Thread
- Algorithm Complexity Java Time
- Replies: 1
- Forum: Programming and Computer Science
-
F
Java Timing a Task in Java – Find Out How!
Oh yeah, I figured I would need threading but wasn't sure how to go about getting started on it. This could work well, thank you.- frankfjf
- Post #3
- Forum: Programming and Computer Science
-
F
Java Timing a Task in Java – Find Out How!
Hi PF, I am trying to write a program that utilizes a for loop that skips the current iteration (via continue) if it takes too long (for instance, longer than 20 seconds, else it finishes the current iteration as per normal), but am not sure how to best do this. Does anyone know of a way...- frankfjf
- Thread
- Java
- Replies: 2
- Forum: Programming and Computer Science
-
F
How to properly use pointers and structs in C?
Ah-ha. I figured it was something like that based on the behavior. Thank you Mark.- frankfjf
- Post #9
- Forum: Engineering and Comp Sci Homework Help
-
F
How to properly use pointers and structs in C?
Will do. Thanks. Playing around with pointers and memory seems to be my stumbling block in C.- frankfjf
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
F
How to properly use pointers and structs in C?
Ooh, I think that fixed it! Thank you so much. Now hopefully I can actually get to the multi-threading part and actually get to the intended practice. :P- frankfjf
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
F
How to properly use pointers and structs in C?
Fair enough, but even implementing that fix causes the problem to persist.- frankfjf
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
F
How to properly use pointers and structs in C?
Hello all, I am experiencing some odd output behavior from a program that I am working on: Header file #include <pthread.h> struct ringbuf_t { pthread_mutex_t mutex; pthread_cond_t cond_full; pthread_cond_t cond_empty; int bufsiz; int front; int back; char* buf...- frankfjf
- Thread
- Pointers
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
F
Multi-threading/Structs in C assignment
Thanks for your help. Oh wow, I had overlooked forgetting to fix the pointer return. Thank you for pointing that out especially!- frankfjf
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
F
Multi-threading/Structs in C assignment
Hi all, Although my homework assignment centers around practicing multi-threading type stuff (by implementing a ring buffer), my question is more centered on trying to figure something out that has nothing to do with multi-threading but nevertheless has me stumped on the assignment itself...- frankfjf
- Thread
- Assignment
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci The Longest Increasing Sequence in a Two-Dimensional Grid of Numbers
Well, after quite a bit of trial-and-error and brainstorming, I've solved the assignment more or less on my own, though I did get a friend's advice on one or two finer points. Thanks to everyone who helped me along on here.- frankfjf
- Post #10
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci The Longest Increasing Sequence in a Two-Dimensional Grid of Numbers
But due to the code as-is checking if a potential move would result in hopping to a number that is greater than the one at the current position, the program does not wind up visiting the same cell twice, nor does infinite recursion take place as-is. My problem remains how to change it to go...- frankfjf
- Post #9
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci The Longest Increasing Sequence in a Two-Dimensional Grid of Numbers
I understand the proposed fix in theory but am a little uncertain as to how to implement it codewise.- frankfjf
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci The Longest Increasing Sequence in a Two-Dimensional Grid of Numbers
Also, I understand about checking all starting positions and streamlining and so forth, but for the moment I'd like to test using the starting position of the posted solution. I can always modify the code to check all possible starting positions later. All it does for me as-written is give a...- frankfjf
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci The Longest Increasing Sequence in a Two-Dimensional Grid of Numbers
Well, how can it visit the same square twice if it's already checking if the square it wishes to jump to is greater than the one it is currently on?- frankfjf
- Post #3
- Forum: Engineering and Comp Sci Homework Help