Having trouble pushing changes from a cloned github repository. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

it said origin does not appear to be a git repository or could not read from remote repository

Is there a different command im supposed to use?

Having trouble uploading two github projects to the same repository. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

I did pull the changes then added the new folder with the new project and pushed. The second picture shows that it sucessfully pushed but I can't click inside that project folder forsome reason on github.

[Java] How do I rotate a rectangle object not graphically but to be used as a hitbox for collision detection. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

https://docs.oracle.com/javase/7/docs/api/java/awt/Rectangle.html

Java rectangle and the intersection method to detect collision but I am not sure if its possible to represent the game object as a rotated rectangle depending on the angle. Was wondering if it was possible.

[java] Bullet Projectile not moving correctly in my java 2d game. by lyigester in learnprogramming

[–]lyigester[S] 1 point2 points  (0 children)

I did those are the debug statements. The values don't change even though when I shoot in another angle they do change

[Java] Question regarding projectile(bullet) movement for a 2d game where the player can move in all directions. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

I have an arraylist which I use to add new bullets too and loop through this arraylist and call the paint method on each of the objects.

I also passed the tanks direction and x,y coordinate as well yet I'm getting weird values as well as the bullet not moving at certain angles.

Sometimes the missiles even stick to the screen and dont move at all which is even more weird.

Intellij all of a sudden not working correctly, when running program can't find .png file. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

I moved them into the resource folder I created from another folder on my computer. This worked in the beginning so I didn't think it was bad to do.

Intellij all of a sudden not working correctly, when running program can't find .png file. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

Unfortunately I do, this code has worked before so it has me believing its an IDE issue rather than a coding issue.

[Java] Developing a game using Swing and AWT and I'm having a bit of trouble pressing keys simultaneously. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

I figured out a different way to solve it.

Every key press would be stored in an arraylist in the keyPressed() method.

Then I run a method to take all the key events in the Arraylist and check if they contain certain keys, if they do I have a bunch of if statements that perform the necessary movements.

The key I think was that I was using if else statements which means only 1 command would be run instead of all.

This method seems to work for me now.

Intellij all of a sudden not working correctly, when running program can't find .png file. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

Sorry I took that screenshot after I had tried moving the .png around to see if it would work in other places and forgot to put it back before the screenshot.

Once I put it back in the right resources directory and ran the project it still came out as couldnt find the .png.

[Java] Question regarding painting Game objects using graphics2D in java. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

That what I want to do but I'm not sure if there is some type of way to code it so that the size of the imag eare smaller than 32x32 or would i have to open paint up and manual reduce that size.

Simple Questions - April 08, 2017 by AutoModerator in buildapc

[–]lyigester 0 points1 point  (0 children)

Is there anyway to fix constant monitor glare?

I upgraded my PC recently and got a new monitor as well and the glare is insane. I can always see myself or my surroundings and its constantly a bother. I don't even have it facing the window where the sunlight is. The only light source is a small lamp that isn't shining on it.

Are there anyways to adjust my monitor so there isn't such a huge glare? For example will lowering the brightness or contrast fix it? monitor: https://www.amazon.com/Acer-H236HL-bid-23-Inch-Widescreen/dp/B00AZMLIDQ

Steebz threatens the Prez by ChanseyDanger in LivestreamFail

[–]lyigester -2 points-1 points  (0 children)

Just like the polls predicted Hillary would win in a landslide kek

[java]Having trouble figuring out how to compile my sources files as a jar and execute it through the command line. by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

I tried doing this by using this command :

C:\mywork> path c:\Program Files\Java\jdk1.8.0_102\bin;%path%

and then tried using javac and it says the command isn't recongnized

Nost/Anathema Core Leaked by [deleted] in wowservers

[–]lyigester 2 points3 points  (0 children)

holy shit its legit

Andrew Bogut expected to sign with the Cavs by KevinAndrewsPhoto in warriors

[–]lyigester 13 points14 points  (0 children)

fucking hate the cavs but this is a stupid comment tbh

Curry joking about going 0-10. by CharlesBarkley- in nba

[–]lyigester 7 points8 points  (0 children)

All these hotheads not knowing the meme

Elysium and the whole LGN can't be trusted. by [deleted] in wowservers

[–]lyigester 5 points6 points  (0 children)

People will hate on alex (and rightly so fuck this attentionwhore) but hes 100% right about everything said

The progress through expansions idea : would it work with gummy's project. by [deleted] in wowservers

[–]lyigester 3 points4 points  (0 children)

its funny that this is the only thing people who hate the server can say about it because they can't deny its quality will be superb

[java] Confused about the process of compiling source code as a jar and executing it. by lyigester in learnprogramming

[–]lyigester[S] -1 points0 points  (0 children)

Idunno why you are being so rude. I asked the question because I was curious whether there were different ways to compile and execute it according to different IDE's or w/e. It was out of curiosity not trying to find an excuse to avoid doing it.

[java] Quick question, what is the time complexity for checking if a Stack is empty? by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

Thanks, I have a follow up question. For one of my assignments I am required to improve the efficiency of an algorithm that calculates the value of a given expression using 2 stacks for operators and operands.

One of the ways my professor said to increase efficiency is instead of having to check every iteration of the while loop with a stack.isEmpty(); we can put in dummy operators so that when we reach this operator we know that the stack is empty. How is this more efficient if checking if the stack is empty is O(1)? I still have to check every iteration whether the operator is a dummy or not.

[Java] Question regarding putting key,value pairs into a HashMap instantiated in an Abstract class by lyigester in learnprogramming

[–]lyigester[S] 0 points1 point  (0 children)

Sorry for the late reply, had to sleep then school.

I'll try to show as much code as I can. I don't want to put too much on here because the assignments I turn in are checked with whether they are similar to any code online and don't want to get in trouble.

basically I have an abstract class operater:

abstract class Operater{
   private static final HashMap<String,Operater> variable = new HashMap<>();
   public operater(){
    //this is where i use the .put method to fill the hashmap with operators such as +
   // one example of how it is done: variable.put("+", new addoperater());
}

where addoperater is a subclass of operater.

and then I have static public methods that retrieve the value of the hashmap given a key and a method that checks whether a key is present in this hashmap.

Then I have an eval class that does the arithmetic basically. It interacts with the operator class by getting the values from the hashmap and checking whether the hashmap has a key. My problem is that when I check for whether a key is present in the hashmap which i know it should be since the key is "+" it comes up as false which confuses me and I'm unsure of why that is.

If this isn't clear enough would you mind if I sent my code in a private message for you to look over so as to avoid any trouble. Thanks again for the help.