Ethan Bauer

Greenhorn
+ Follow
since Sep 22, 2010
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ethan Bauer

Code:


Screenshot:




Description:

I'm having a problem with changing the text of the Button ("Ej färdig med städningen" <--> "Färdig med städningen") and changing the text of the lower TextView ("Status: Städat" <--> "Status: Ej städat"). What happens is the text changes once, when I click the button, then the text doesn't change at all, although I've check LogCat and the boolean 'cleaned' is change and sent accordingly to the server. So it's just a matter of the TextView and the Button not refreshing/redrawing, how do I fix it?
12 years ago
My problem is fully described:
http://stackoverflow.com/questions/6002756/setcontentviewr-layout-main-error



The Problems tab show me 0 errors but 38 warnings, the app crashes when I click on the button.
13 years ago

Tim Holloway wrote:Both SVN and CVS were designed for distributed development. GIT was designed for detachable distributed development.


SVN = Subversion and GIT = GitHub, I'm guessing.. what's CVS?

So from what I gather, you don't really need real-time collab when working in projects, so I'm gonna drop that for now..
Our group for this project is rather small, only 4 programmers (including me) involved.
What I want to know though is how you document the changes, do you change small bits at a time and explain them when you meet up with the team? Or maybe you just break up classes/objects and assign each member to make his/her own part?
Are revision control software necessary? Tell me how you manage "distributed development" of software.
Yeah, too bad there's no ideal tool for real-time paired programming right now.
We're thinking of using Subversion (http://en.wikipedia.org/wiki/Apache_Subversion) or GitHub (http://en.wikipedia.org/wiki/GitHub)
as a revision control system, I hope it'll do for our little project.
It'd be great if I could get some feedback/recommendations if anyone here has used Revision Control Software before. (http://en.wikipedia.org/wiki/Revision_control) (http://en.wikipedia.org/wiki/Comparison_of_revision_control_software)
Was wondering if there's a tool (maybe a plugin for Netbeans or Eclipse) that allows you to write code with others in real-time, of course it would have the full-functionality of any good IDE like Netbeans or Eclipse.
Something similar to what you can do with Google Docs: http://en.wikipedia.org/wiki/Google_Docs
Tell me what you use when you collab with other people on coding? Hope that there's something more effective than just dropboxing static files and having to re-upload when you've done your own part, looking for something that would allow multiple users to edit code at the same time.


Could anyone explain how you use % as a logical operator?
Maybe another example is better but this was the one I found in the course I'm taking on Java..
13 years ago
Yeah, I usually use int for integers and double for floating point numbers, but I was just curious in this case and thought I'd try float..
13 years ago
I'll just stick with having them split up for now then, I was just thinking that putting it together would have saved some space.. but you make a good point in that it can become troublesome to have a clear overview of the get's and also later on I'd have to split them up again if I wanted to call/retrieve the value from a single get-method.. better let it stay like this for now..

Funny vid you posted Hauke, although I think it's grossly exaggerated (maybe it's a parody) xD
I took Danish class for 1 year when I was in high school. It was tough, is the least I can say :P

And I'm sorry if my code becomes unclear with the use of Swedish words, however
I do think that the clarification does the job of translating and making it understandable.
I wish I could write everything in English (I actually take notes in English, scribble down notes in English,
google in English and even think in English sometimes :p) but the programming class I'm taking
right now is in Swedish.. so I kinda have to go along with it at the moment.. I've meant to ask my
teacher why the course is in Swedish, it'd be so much easier to just use the English language and a-z
in the code. Whenever I import new code (that pertains to the course material) I have to change the native characters
because I get "illegal character" errors (the Swedish characters appear as "mojibake"/empty squares ).. it's an unnecessary pain imo, but at the moment there's little that can be
done (every week, I have to present the source and explain, would be a hassle to change everything to English,
also reading the instructions would confuse me if I changed the name of too many variables to English).
So please bear with it for now, I promise that, when I write my own code from scratch, it will have NO Å, Ä, Ö
13 years ago
haha, alright, I'll try it next time and THEN follow up with a question.
Didn't know Java automatically thinks it's a double if you write down a number with decimals, now I know that I gotta mark it with "f" for floats, same as when you write longs, you mark it with L
Thanks for the help.
13 years ago
hmm, ok.
But how is the value 1.3 too wide for float, doesn't 1.3 fit into 32 bits?

And what is aket.* ?

Would it work if I change this: to this?

I think I'll just accept the double for now, but I'm still curious.
13 years ago

The code (the question is in the code as a comment):

13 years ago

Here's the first source code:


And here's the second source code (the one which contains the main method):



I've commented, so just read the comments.
The problem is as you can see, that it runs just fine if I declare "vikt" as a double, but I can't declare it as a float.. (which is weird, since they're the same except double takes more space in the memory and you can define more precise numbers with it, maybe there are even more details, but please, let's stick to the basics for now, which is explaining why double works and float doesn't :P )
13 years ago

Wouter Oet wrote:Look at the classes DateFormat and SimpleDateFormat.



Alright, not too familiar with the documentation, it looks confusing to me, but I guess you gotta start somewhere, I mean it's documented for a reason :P
13 years ago
Here's the code I have so far:


I've commented my problem in the source, so read that please.
"Dagens datum" is Swedish for "Today's date" and "Klockan är" is "The time is", just to clarify.


(I'll also ask one more question which is just a thought that popped up while I was writing this source:
Why is it that I have to assign Calendar.getInstance to a variable, in this case "cal", which I then use "get" on with arguments like
Calendar.MINUTE ? Why can't I just do something like:


Why can't I just bundle it, so to speak?

This is nothing important (to progress), but I was just wondering why it is this way..)
13 years ago
Thanks for all the advice and cleanup tips. I'm taking things one step at a time though for now so I'll put this question in the backburner and maybe get back to it later when I know Java better.. but thanks.
Gonna go with this explaination for now:

W. Joe Smith wrote:As for res, you are getting it because you are doing res += .... Basically, that is like saying res = res + ...., and since res hasn't been initialized you will get an error. If you change the statement to res = ...., then it should work.

13 years ago