Sam Acropolis

Greenhorn
+ Follow
since Sep 30, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sam Acropolis

OMG , I totally missed that !! Forgot to create a splash.xml file in the layout folder!

Thank you so much man!
11 years ago
So I made this new Java Class called splash which will be used to display a background image in my app . I wrote a onCreate method and then added this line so the image can be referenced and be placed in the "background" .



the entire code in the Splash class:



The Error that complains on "splash" in setContentView

splash cannot be resolved or is not a field



I dont know if something has to be created in the R.Java file , from what I know its a no-no to touch that ...

any idea?

Thanks everyone
11 years ago
My package name is as you say it com.example.firstandroidproject;

Im pretty much creating a android virtual device and then attempting to launch it , I have even tried 'cleaning' the project to from the 'project' menu in eclipse.
11 years ago
Line 15 and 22 complain that

R cannot be resolved to a variable



I have tried removing the

statement and even renaming it to import com.HelloWorld.firstandroidproject.R;

but the syntax errors still persist ...

any ideas?


Thanks a bunch everyone


11 years ago


Ok I managed to come up with this and solves the recursion issue ... now the program seems to stop after the second prompt asking for the base to which to be converted .
11 years ago
Print out the numbers the user typed , their converted number and then return the toString. Maybe the return is causing the problem probably....
11 years ago


This may be the culprit as to why their is a StackOverFlow
11 years ago
Thanks I think Im very close ..but the issue now is a StackOverFlow error so pretty much lines 92-95 repeated indefinitely.

Sorry for not explaining Im pretty much trying to pass the Input N and InputB Variables into my toString so they will grab the number to be converted and use the the "base" I have supplied and convert it to that , and the program will check
what base using the IF statements I have provided

Thanks
11 years ago
Hey Guys so I finished writing this basic program to convert a number to base 2-10 . I created the IF statements in the toString method, and to get the base convesion using Integer.toString(String s, baseToConvertTo) . My issues is I can define toString 'static' and have it execute from Main and I have tried sending inputB and inputB to the toString via inputB.toString() ...sorry noob in Java. Is there a way when I run the program after I have typed after the prompts I can access the method and it will return me my desired result?

Thanks

11 years ago

Campbell Ritchie wrote:

Sam Acropolis wrote: . . . I wanted to pass parameters would I have to define a new . . . method up above?

Yes. But what does “up above” mean?



good question in more detail would defining a new method after :



work? Or does it go into the superclass(the class above the ListIterator subclass)
11 years ago
ohhh I see wow I totally missed that...but what If I wanted to pass parameters would I have to define a new remove method up above?
11 years ago
alright so Im working on a double linked list and writing a remove method which passes in a argument and throws a illegalStateException if there is no value passed into the variable lastItemReturned (which it has its a check)

my issue I cant seem to fix the error: "method does not override or implement a method from a supertype"

issue is at the public void remove(E remove) method and at the subclass cs340ListIterator which I get: cs340DLL.cs340ListIterator is not abstract and does not override abstract method remove() in ListIterator

am I not implementing the interface correctly and instead in the remove() method do



here is the class file:



any pointers ?

thanks guys as always
11 years ago
Do you know of any good material on the web on Algorithms since my book doesnt go too much into it . I would love to sit down and read a whole bunch on this

@fred rosenberger lol I actually figured it out this morning for some reason when you said "this is pretty straight forward" I was like Hmmm and then Eureka!
11 years ago
I have a book but it just scratches the surface in the algorithm concepts.

Thanks for the pointers!
11 years ago
Im working on some problems on Algorithmic complexities would really love if someone just pointed me in the right direction:

I couple questions:

1.) Prove the following using the formal definition of Big-Oh complexity
a.) Prove that if an algorithm has: simple operations, then its complexity is: <-- honestly i don't know what this is asking .


2.)

for this one the variable 'i' is initialized to 3 and then the length is shifted over by "1" and then in the body the array index is shifted to the "right" and whatever value that is , is assigned to the index? Am I correct if so would that give me the contents of anArray after the loop executes?



3.) This one went way over my head:

Determine algorithmic complexity in terms on n .
How would I even start this ?


11 years ago