User Profile
Collapse
-
Without me having to reading your code, you seem to have found the problem yourself: The wallSwitch variable. If you have several enemies and this field is used for each one then you will have to have several wallSwitches as well. You could either save this in the Enemy class or have a Collection of wallSwitches (e.g. a HashMap<Enemy, Boolean> or a List<Boolean>) with one value for every Enemy. -
To add to chaarmanns answer: The interface itself has no functionality and it defines no functions that have to be implemented. It is what you call a marker interface; classes can implement it and thereby say "you can serialize me and everything inside me (that I haven't explicitly marked otherwise)". The latter is not enforced but expected by some tools.
To learn more about the Serializable interface, I'd recommend reading...Leave a comment:
-
Hi jonnmso and welcome to bytes.com!
If you're interested in web applications, some recommendations would be JavaScript, PHP and Java. I would also recommend learning about XML, bash and unix-like OSes (e.g. Linux) in general as these are commonly used in combination with webapps.
Concerning mobile apps, those are normally written in Java (Android), Objective-C (iOS), C# (WP8) or HTML5 and JavaScript.
...Leave a comment:
-
Hi seekingadvice and welcome to bytes.com!
Yes, the MacBook Air is powerful enough for such tasks; I have colleagues who use MacBook Airs for that kind of job and they seem perfectly happy. Personally I prefer the better specs of the MacBook Pro but either should be fine. And the Air is much lighter of course.Leave a comment:
-
Well, that depends on what the intention is. If you want to optimize for several people being able to modify at the same time you will have to have some kind of conflict handling. Take the conflict management in SVN as an example here - if you try to commit changes and someone has already changed it since you last updated your version there will be a merge conflict which must be resolved.
If however you want two users to be shown the same stuff...Leave a comment:
-
Hi Chloe03 and welcome to bytes.com!
Just to make sure I understand this correctly, the above function should return true if the stone passed has a number between 1 and 11 inclusive and false otherwise? If so, you've switched the logic here as if it's neither smaller than 1 nor larger than 11 (which would mean it's not a black stone) it will return false when I would expect it to return true. Alternatively you could check whether it...Leave a comment:
-
Hi DJPoizon and welcome to bytes.com!
There are a few possible reasons for this problem; one would be whether the system recognizes the WiFi device at all. Check the output of both sudo ifconfig and sudo iwconfig to see what shows up; hopefully there is more than just one eth0 device. If it doesn't show up you may have to install proprietary drivers; I've never done that on Mint but I'm sure you can find instructions on how to do that...Leave a comment:
-
If the HashMap is shared between the users then yes, it should be synchronized two instances may be trying to access the HashMap at the same time, causing unforeseen behavior.Leave a comment:
-
If you want to know more about how the java compiler works with Generics, you'll probably want to learn about Type Erasure too.Leave a comment:
-
A clean way to do this would be using the observer pattern (sometimes called the listener pattern). Simply put, you register the progress bar as a listener which waits for something in the thread to change. When something changes the thread says "hey, I've done something!" and the progress bar reacts to that.Leave a comment:
-
Windows 8 is a nice system, though it does need some getting used to. Don't expect it to work like previous versions of Windows because in many cases it doesn't.
As to touch screens, it is clear that Windows 8 was designed with touch screens in mind and I personally prefer using parts of it that way; it is however quite usable with a mouse only. If possible maybe try it with and without one (e.g. in a shop), just to find out whether...Leave a comment:
-
Hi parthrpatel80 and welcome to bytes.com!
I don't know the tutorial but I have a guess as to why the above code doesn't work: for both ID and TopicID it expects an integer and you seem to be passing a string. Try the following:
Code:CREATE TABLE posts ( ID int(5) DEFAULT 0 NOT NULL auto_increment, TopicID int(5) DEFAULT 0 NOT NULL, Name varchar(50) NOT NULL, Email varchar(50) NOT NULL, Password varchar(50)
Leave a comment:
-
Hi p23e and welcome to bytes.com!
I assume you're using Microsoft Excel? If so, what's the contents of that cell? Excel will show those hash symbols in several cases; one is indeed when the entry is too long for the contents but it also shows them on other errors, such as broken formulae.Leave a comment:
-
Hi RajniRamShinde and welcome to bytes.com!
Do you know what a prototype is? If not first of all you should check out the wikipedia article on function prototypes. Basically it is a function definition which shows the signature; in C/C++ these are often in header files though they don't have to be.
Once you've understood that, you can create your own prototype for capture before it is ever used or defined. What this will...Leave a comment:
-
Hi surpsi and welcome to bytes.com!
I guess you're trying to format the output, correct? If so, take a look at the string formatting syntax; this will allow you to set various aspects of your output, including the precision of an output. And such formats are accepted by PrintStream#pri ntf(...), which is exactly what System.out.prin tf(...) is.Leave a comment:
-
Hi wasim and welcome to bytes.com!
What kind of software will this company be making? Do you want to derive it from some persons name (e.g. your own) or from some product? Or is it supposed to be very general or completely fictional?Leave a comment:
-
So, I'm trying to understand the method behind your extractions... If there's a number somewhere in the text behind the last slash but before the question mark, you want that number? And if there's not, you want whatever is behind the slash? Or is there a typo in your 2nd example and you want the part between the last slash and either the end or the question mark?Leave a comment:
-
Hi 2147483648!
Yes, it's always good to know what exactly the question is. ;-) Your solution seems to create random alphanumeric code, though I'm not sure which language that is supposed to be. Maybe VBA?
But back to the question: Iamtrey3, if the replies so far answer the question, great. If not, please specify what exactly you want to know.Leave a comment:
-
Generally speaking, alphanumeric code is code containing latin letters (A-Z and a-z) as well as arabic digits (0 through 9). Or do you mean alphanumeric shellcode?Leave a comment:
-
It isn't a silly question by any means - C is very difficult in terms of string processing. As you probably know, a string in C is an array of chars followed by a binary 0 (which is written '\0'). And arrays are by their very nature defined to have a certain length.
I know of no really easy way to address this problem but there are a few tricks that can be used. Depending on the exact problem you're facing, you could:- Just define a
Leave a comment:
No activity results to display
Show More
Leave a comment: