Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~54.6K People Reached
Favorite Tags
Member Avatar for rupali

How to calculate time complexity of any algorithm or program .... need help on this..

Member Avatar for jamie_13
2
48K
Member Avatar for iamsmooth

I know there are benchmarking programs that exist, but I've decided that as an exercise, I want to try and create some sort of simple benchmark program to test schedulers of my Raspberry Pi (CFQ, noop, deadline). I have been switching the schedulers and testing some linux commands using time …

Member Avatar for griswolf
0
286
Member Avatar for iamsmooth

I've never encountered anything like this and have no idea where to begin to troubleshoot. What happens is when I turn on the computer, it will show the motherboard (gigabyte) splash screen, then cut to black and monitor says it's going to sleep... meaning the display signal got cut right …

Member Avatar for flagstar
0
260
Member Avatar for iamsmooth

I'm fairly new to C. I've tried googling but haven't found anything. Can anyone direct me to some relevant functions or readings or whatever that might help with this problem? Basically I need to be able to give a directory as an argument and it needs to be able to …

Member Avatar for griswolf
0
167
Member Avatar for iamsmooth

I was just wondering if it was possible to create a listview that would have more than one line in each of the item. For example, I may want to display a first and last name on two different lines, but selecting it would show that it's part of the …

Member Avatar for kvprajapati
0
63
Member Avatar for iamsmooth

Hi. So I'm new to Visual Studio, and created a project with lots of windows. The problem is I want the program to be seamless, i.e. when you progress through a dialogue that goes to another windows form, I want it to remain in the same location and seem like …

Member Avatar for Antenka
0
147
Member Avatar for iamsmooth

So I have junit tests, let's pretend this is my code: [CODE] @Test public void test1() { Object o = new Object("123"); AssertTrue(o.string == "123"); } @Test public void test2() { Object o = new Object("456"); AssertTrue(o.string == "456"); } [/CODE] Let's pretend the code has a public string field …

Member Avatar for iamsmooth
0
95
Member Avatar for iamsmooth

So I'm redirecting my print outputs to a stream, which becomes a char array. Then, when I use Junit, I use .toString() on the char array to make it become a long string. However, when I compare the string with the exact string that it should be, it says they …

Member Avatar for masijade
0
96
Member Avatar for iamsmooth

I want to be able to ensure that my print is exactly as expected, so I'm wondering if there's some kind of function in java or junit that will catch what system.out.print uses so I can perform some assertions on it. Thanks for your help.

Member Avatar for jwenting
0
1K
Member Avatar for iamsmooth

So let's say I have an interface called ExitInterface.java. Inside there is only one method declaration, exit(). I have two classes that implement this: 1) first one is named Exit.java which does System.exit(exitCode) in the exit method. 2) second one named ExitMock.java which doesn't exit, and instead keeps track of …

Member Avatar for iamsmooth
0
95
Member Avatar for iamsmooth

So if my program exits on a certain condition, it has to exit with a 1, and if something else, it exits with 2. So I want to use junit to assert that the exit code is 2, but I don't know how to do that. I also heard there …

Member Avatar for musthafa.aj
0
122
Member Avatar for iamsmooth

Hi, I'm a second year computer science major. Just started learning about assembly programming. Anyways, I was wondering if there was a good IDE that people usually use to program in SPARC, I've looked at the plugins for netbeans and it doesn't seem to support it. I also have looked …

0
70
Member Avatar for iamsmooth

So I'm using an ArrayList (to create a hash table structure) like so: [CODE]protected ArrayList bucketArray;[/CODE] Later in the constructor, it initializes it as: [CODE]bucketArray = new ArrayList(500);[/CODE] When I use it and try to insert a Node from a linked list in like this: [CODE]bucketArray.add(357, nodeToBeInserted);[/CODE] it gives me …

Member Avatar for masijade
0
93
Member Avatar for iamsmooth

So I have these nodes I'm trying to sort as such, but it's not working. This is psudo code: Node first = new Node(23); //previously construted node [code] put method(newNode) { Node traverseInOrder = first; while (newNode > traverseInOrder) { If (traverseInOrder.successor != null) { traverseInOrder = traverseInOrder.successor; } else …

Member Avatar for iamsmooth
0
146
Member Avatar for iamsmooth

So my binary search tree doesn't seem to be traversing through all the nodes. each node has references to other nodes. So I'm traversing through right or left (depending on value) until I hit null, which means I can insert. After insertion, I reset root to first so it can …

Member Avatar for iamsmooth
0
118
Member Avatar for iamsmooth

Just wondering what the difference is. I don't think I need to post my code, but basically for my assignment, I have stubs for a binary search tree. There are nodes created in the constructor, and among them are: Node parent Node predecessor Node sucessor Node right Node left Is …

Member Avatar for quuba
0
127
Member Avatar for iamsmooth

I have a class that creates a stack object implemented with an array: So I have a method contractStack() which is called when the length of an array of the same class is greater than INITIAL_CAPACITY of 8, and the size of the stack (contents within the array) is less …

Member Avatar for iamsmooth
0
138
Member Avatar for iamsmooth

I know Netbeans has its own profiler, but for this assignment I have to use Jrat. I tried adding a command line argument -javaagent:shiftone-jrat.jar like you would put in the console, but it didn't work lol. I think I have the paths set up, I'm just not sure how to …

0
85
Member Avatar for delia29

Hi, im new at computer programming and i need help to do the following algorithm. The algorithm must be in both pseudocode and flowchart. Please help. Thanks!  Calculate the weekly salary of employees for a given number of hours each employee worked for the week.  The NAME and …

Member Avatar for iamsmooth
0
103
Member Avatar for iamsmooth

[code] public int peek () { if (empty() == true) { throw new EmptyStackException(); } return StackContents[top]; } [/code] So I have this piece of code in a class that implements a stack. The program works perfectly. However, when I use Junit to test it, I have this: [code] @Test …

Member Avatar for iamsmooth
0
120
Member Avatar for iamsmooth

I'm not very math profficient yet, since I haven't taken enough Math classes at school, but we're covering asymptotic notation and running times of algorithms in class, which seems pretty mathy (yes mathy is a word). Anyways, first, I need to clarify: upper/lower bounds refers to max/min cost of an …

Member Avatar for iamsmooth
0
124
Member Avatar for iamsmooth

So I have an interface program called: IstackInterface.java, which contains method declarations and it compiles fine. I put it in a package we call package abc. Now I have another java program called IArrayStack.java that says: [code] public class IArrayStack implements IStackInterface { // code goes here } [/code] But …

Member Avatar for BestJewSinceJC
0
145
Member Avatar for iamsmooth

Hi, I'm writing my first program for my second year comsci class and I'm still learning java along the way. Anyways, the signature for one of my functions has to be: "public static BigInteger fNumberRoutes( int n, int m )" So I assume it's a function that returns a BigInteger. …

Member Avatar for jmaat7
0
2K
Member Avatar for iamsmooth

Hey guys: I'm working on a chess program for comsci, and surprisingly, the pawn is the hardest piece to program. If you're not familiar with chess, this is the basic move of the pawn: If the pawn is in its initial position, it can move 2 spaces forward, however, subsequent …

Member Avatar for wildgoose
0
184
Member Avatar for iamsmooth

So my program is taking input from the user, so it's storing it in a string known as x. But I don't want x to take the input after a hard return, it should keep reading until it hits a certain string, let's say "END", so until the user types …

Member Avatar for Duoas
0
209
Member Avatar for iamsmooth

Hey guys: I'm having trouble breaking out of a loop that takes input from a file. I can only break it if I make a code that specifies how many inputs there are and makes it stop when it reaches the max input. I think it has to do with …

Member Avatar for mrnutty
0
129
Member Avatar for iamsmooth

So for my comsci assignment, I need to read in this text file with a butt load of messages. Here is what the text file looks like: [code] 1 R Jemma Harry What were you thinking? Harry, You seriously need to stop claiming your paperclip orders under the heading art …

Member Avatar for thelamb
0
114
Member Avatar for iamsmooth

Hey guys, I'm stuck on an assignment for school, was wondering if you could help me out. So I have a text file similar to this: [code] Joe Jim Hello Jim, Just wanted to say hello! -Jim EOF [/code] This is supposed to be like a message system. The first …

Member Avatar for iamsmooth
0
92