• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:50
CEST 09:50
KST 16:50
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists16[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0
Community News
2026 GSL Season 1 Qualifiers15Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid24
StarCraft 2
General
Maestros of the Game 2 announced 2026 GSL Tour plans announced Team Liquid Map Contest #22 - The Finalists MaNa leaves Team Liquid Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
INu's Battles#14 <BO.9 2Matches> 2026 GSL Season 1 Qualifiers Sparkling Tuna Cup - Weekly Open Tournament GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 522 Flip My Base The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees
Brood War
General
ASL21 General Discussion Data needed ASL21 Strategy, Pimpest Plays Discussions Pros React To: ASL S21, Ro.16 Group C BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Small VOD Thread 2.0 [ASL21] Ro16 Group C Escore Tournament StarCraft Season 2 [ASL21] Ro16 Group D
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Diablo IV Nintendo Switch Thread Total Annihilation Server - TAForever Dawn of War IV Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread YouTube Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion Cricket [SPORT]
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2021 users

The Big Programming Thread - Page 394

Forum Index > General Forum
Post a Reply
Prev 1 392 393 394 395 396 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
November 16 2013 04:17 GMT
#7861
My professor said we weren't supposed to use weak entities. This is bugging me.

Like my assignment is to draw out an ERD. It sounds simple but not having any weak entities just seems like unnecessary complexity to a system.

Eg my system has users
It also has items
and it has bids

the bids table might not have bid ids. I might want that to be a weak entity. What's wrong with that?
I guess if I delete the user or the item the bid will disappear too, but if my item disappears or the user does, don't I want the bid to disappear?
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
ObviousOne
Profile Joined April 2012
United States3704 Posts
November 16 2013 04:38 GMT
#7862
Bid is linked to a user and an item and has an amount. Doesn't that qualify as a strong entity?

Bid table:
PK- bid id
FK- user id
FK- item id
bid amount

No? Been ages since I had this class.
Fear is the only darkness. ~Destiny Fan Club operator~
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
November 16 2013 06:22 GMT
#7863
On November 16 2013 13:38 ObviousOne wrote:
Bid is linked to a user and an item and has an amount. Doesn't that qualify as a strong entity?

Bid table:
PK- bid id
FK- user id
FK- item id
bid amount

No? Been ages since I had this class.

That would qualify, and that's what I'm thinking of doing just so I'll have a strong entity, but then what's the point of calling them foreign keys? Isn't this overly complicated?
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
ObviousOne
Profile Joined April 2012
United States3704 Posts
Last Edited: 2013-11-16 07:26:55
November 16 2013 07:17 GMT
#7864
On November 16 2013 15:22 obesechicken13 wrote:
Show nested quote +
On November 16 2013 13:38 ObviousOne wrote:
Bid is linked to a user and an item and has an amount. Doesn't that qualify as a strong entity?

Bid table:
PK- bid id
FK- user id
FK- item id
bid amount

No? Been ages since I had this class.

That would qualify, and that's what I'm thinking of doing just so I'll have a strong entity, but then what's the point of calling them foreign keys? Isn't this overly complicated?

FK reienforces relationships, right? You want to make sure there are no bids without corresponding items or users, so you get referential integrity or w/e the word is.

bid_id user_id item_id bid_amount
1 101 1001 999.99
2 105 1001 1499.99
3 101 1001 1999.99

You can then look up all bids from X person on Y item. You never want a situation where the user_id or item_id is invalid. This gives you bid history and a query can give you the max bid based on item to find the winner or whatever other business goals you might have.

The DBMS enforces the relationships for you, I think is the purpose of calling it a FK.
Fear is the only darkness. ~Destiny Fan Club operator~
FakePseudo
Profile Joined January 2012
Belgium716 Posts
November 16 2013 08:02 GMT
#7865
Hi guys,

So I've been using git for more then a year now, and I'm starting to go a bit beyond the basics, as I have to maintain several repos for some groups assignment where most users are really inexperimented (with git I mean). However, one thing still bothers me: what is your easiest and fastest way to apply changes across all branches (like a .gitignore change or w/e makes sense to you) that does not involve git push force right after it (so no rewinding history to a common ancestor or other weird rebasing)? For the time being I use cherry-picking or merging but it really isn't efficient nor meaningful for anyone reading the git log or tree, but I figure there should be a better way...(googling and all didnt help much)
I am the 0.0007% /forum/viewpost.php?post_id=17208334|| Big Black Women Vocals Is Like Porn to my Ears ||San Antonio Spurs|Boston Celtics||#1EZToss Hater;
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-11-16 08:29:48
November 16 2013 08:29 GMT
#7866
On November 16 2013 16:17 ObviousOne wrote:
Show nested quote +
On November 16 2013 15:22 obesechicken13 wrote:
On November 16 2013 13:38 ObviousOne wrote:
Bid is linked to a user and an item and has an amount. Doesn't that qualify as a strong entity?

Bid table:
PK- bid id
FK- user id
FK- item id
bid amount

No? Been ages since I had this class.

That would qualify, and that's what I'm thinking of doing just so I'll have a strong entity, but then what's the point of calling them foreign keys? Isn't this overly complicated?

FK reienforces relationships, right? You want to make sure there are no bids without corresponding items or users, so you get referential integrity or w/e the word is.

bid_id user_id item_id bid_amount
1 101 1001 999.99
2 105 1001 1499.99
3 101 1001 1999.99

You can then look up all bids from X person on Y item. You never want a situation where the user_id or item_id is invalid. This gives you bid history and a query can give you the max bid based on item to find the winner or whatever other business goals you might have.

The DBMS enforces the relationships for you, I think is the purpose of calling it a FK.

Alright thank you. I wasn't even sure if an entity could have a foreign key and primary key in the same setting. I think I've tried it out in code but I was getting some errors whenever I did anything with foreign keys. That's why I couldn't just try to have a primary key and foreign key together.

I still don't know if this is a best practice but it's what the professor wants.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
PVJ
Profile Blog Joined July 2012
Hungary5221 Posts
November 16 2013 12:23 GMT
#7867
Hey guys, is anyone here using Scala w the play! framework? I'd like to organise a get together at the ping conference but I'm not sure if anyone would be interested.
The heart's eternal vow
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
November 16 2013 20:19 GMT
#7868
On November 16 2013 17:02 FakePseudo wrote:
Hi guys,

So I've been using git for more then a year now, and I'm starting to go a bit beyond the basics, as I have to maintain several repos for some groups assignment where most users are really inexperimented (with git I mean). However, one thing still bothers me: what is your easiest and fastest way to apply changes across all branches (like a .gitignore change or w/e makes sense to you) that does not involve git push force right after it (so no rewinding history to a common ancestor or other weird rebasing)? For the time being I use cherry-picking or merging but it really isn't efficient nor meaningful for anyone reading the git log or tree, but I figure there should be a better way...(googling and all didnt help much)


This really, really sounds like you are trying to solve the wrong problem in a wrong way, so let me ask:
What are you actually trying to accomplish and why?
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2013-11-16 20:29:54
November 16 2013 20:24 GMT
#7869
On November 16 2013 17:29 obesechicken13 wrote:
Show nested quote +
On November 16 2013 16:17 ObviousOne wrote:
On November 16 2013 15:22 obesechicken13 wrote:
On November 16 2013 13:38 ObviousOne wrote:
Bid is linked to a user and an item and has an amount. Doesn't that qualify as a strong entity?

Bid table:
PK- bid id
FK- user id
FK- item id
bid amount

No? Been ages since I had this class.

That would qualify, and that's what I'm thinking of doing just so I'll have a strong entity, but then what's the point of calling them foreign keys? Isn't this overly complicated?

FK reienforces relationships, right? You want to make sure there are no bids without corresponding items or users, so you get referential integrity or w/e the word is.

bid_id user_id item_id bid_amount
1 101 1001 999.99
2 105 1001 1499.99
3 101 1001 1999.99

You can then look up all bids from X person on Y item. You never want a situation where the user_id or item_id is invalid. This gives you bid history and a query can give you the max bid based on item to find the winner or whatever other business goals you might have.

The DBMS enforces the relationships for you, I think is the purpose of calling it a FK.

Alright thank you. I wasn't even sure if an entity could have a foreign key and primary key in the same setting. I think I've tried it out in code but I was getting some errors whenever I did anything with foreign keys. That's why I couldn't just try to have a primary key and foreign key together.

I still don't know if this is a best practice but it's what the professor wants.


There is a common problem people run into when they start to use foreign keys and from the sound of it, you encountered it as well:
Foreign keys are in the database scope, meaning you can't use two equally named foreign keys, even if they are in different tables. They always have to have a unique name. MySQL has horrible error messages which really never explain the actual problem, so it's possible you tried to use two equally named foreign keys when you tried to use a primary and foreign key together.

On November 16 2013 13:17 obesechicken13 wrote:
My professor said we weren't supposed to use weak entities. This is bugging me.

Like my assignment is to draw out an ERD. It sounds simple but not having any weak entities just seems like unnecessary complexity to a system.

Eg my system has users
It also has items
and it has bids

the bids table might not have bid ids. I might want that to be a weak entity. What's wrong with that?
I guess if I delete the user or the item the bid will disappear too, but if my item disappears or the user does, don't I want the bid to disappear?


There are lots of situations where, even when the item it relates to is deleted, you want to keep the entry. As a simple example, think of a message board. If you delete a user, you still want the posts to remain so the discussion stays consistent and doesn't suddenly have holes. For bids, yes, you'd probably want them to disappear. It always depends on the program.
FakePseudo
Profile Joined January 2012
Belgium716 Posts
November 16 2013 21:57 GMT
#7870
On November 17 2013 05:19 Morfildur wrote:
Show nested quote +
On November 16 2013 17:02 FakePseudo wrote:
Hi guys,

So I've been using git for more then a year now, and I'm starting to go a bit beyond the basics, as I have to maintain several repos for some groups assignment where most users are really inexperimented (with git I mean). However, one thing still bothers me: what is your easiest and fastest way to apply changes across all branches (like a .gitignore change or w/e makes sense to you) that does not involve git push force right after it (so no rewinding history to a common ancestor or other weird rebasing)? For the time being I use cherry-picking or merging but it really isn't efficient nor meaningful for anyone reading the git log or tree, but I figure there should be a better way...(googling and all didnt help much)


This really, really sounds like you are trying to solve the wrong problem in a wrong way, so let me ask:
What are you actually trying to accomplish and why?


Well last time it occured to me, I basically wanted to add so random merge backup file (.orig) to the .gitignore.
I am the 0.0007% /forum/viewpost.php?post_id=17208334|| Big Black Women Vocals Is Like Porn to my Ears ||San Antonio Spurs|Boston Celtics||#1EZToss Hater;
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-11-17 03:34:25
November 17 2013 00:14 GMT
#7871
Is every relationship also a table in an ERD?

edit: no they aren't. You just need to join the tables later on primary keys to work with them.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Housemd
Profile Joined March 2010
United States1407 Posts
November 17 2013 03:06 GMT
#7872
Ok guys, I'm a complete newbie so please bear with me. I'm also not sure if this is allowed but here goes nothing.

The task is to write Java code using a for statement to sum the numbers from 1 through 50.

This is what I have so far:

int sum = 0;
for (int y = 0; y<=50; y++);
{
sum = sum + y;
}
System.out.println(sum);


Now, the problem is that Eclipse keeps on saying "y" is an unresolved variable. I just can't understand it. I have declared y in my for loop and while searching online, I saw the same thing. I need to get through this problem to make sure my sum is correct so if someone could please point out my mistake, it would be a big help.
Fantasy is a beast
ZenithM
Profile Joined February 2011
France15952 Posts
Last Edited: 2013-11-17 03:15:41
November 17 2013 03:12 GMT
#7873
On November 17 2013 12:06 Housemd wrote:
Ok guys, I'm a complete newbie so please bear with me. I'm also not sure if this is allowed but here goes nothing.

The task is to write Java code using a for statement to sum the numbers from 1 through 50.

This is what I have so far:

int sum = 0;
for (int y = 0; y<=50; y++);
{
sum = sum + y;
}
System.out.println(sum);


Now, the problem is that Eclipse keeps on saying "y" is an unresolved variable. I just can't understand it. I have declared y in my for loop and while searching online, I saw the same thing. I need to get through this problem to make sure my sum is correct so if someone could please point out my mistake, it would be a big help.

Should probably be:
int sum = 0;
for (int y = 0; y<=50; y++)
{
sum = sum + y;
}
System.out.println(sum);

without the semicolon after the closing parenthesis.

for (int y = 0; y <= 50; y++); essentially means "do nothing 51 times"
and Java doesn't know what "y" means outside of the for loop it has been declared in, so "y" is unresolved in the following block (the "{ }" delimitate what is called a block, which is essentially a sequence of lines of code where variables declared inside mean something. Look up http://en.wikipedia.org/wiki/Scope_(computer_science)#Block_scope).
Housemd
Profile Joined March 2010
United States1407 Posts
November 17 2013 03:14 GMT
#7874
On November 17 2013 12:12 ZenithM wrote:
Show nested quote +
On November 17 2013 12:06 Housemd wrote:
Ok guys, I'm a complete newbie so please bear with me. I'm also not sure if this is allowed but here goes nothing.

The task is to write Java code using a for statement to sum the numbers from 1 through 50.

This is what I have so far:

int sum = 0;
for (int y = 0; y<=50; y++);
{
sum = sum + y;
}
System.out.println(sum);


Now, the problem is that Eclipse keeps on saying "y" is an unresolved variable. I just can't understand it. I have declared y in my for loop and while searching online, I saw the same thing. I need to get through this problem to make sure my sum is correct so if someone could please point out my mistake, it would be a big help.

Should probably be:
Show nested quote +
int sum = 0;
for (int y = 0; y<=50; y++)
{
sum = sum + y;
}
System.out.println(sum);

without the semicolon after the closing parenthesis.

for (int y = 0; y <= 50; y++); essentially means "do nothing 51 times"
and Java doesn't know what "y" means outside of the for loop it has been declared in, so "y" is unresolved.



You my friend, are a lifesaver.

Argh, such a stupid mistake. I always whiff on semicolons so the one time I make sure I put them, it comes back to haunt me

Thanks again though.
Fantasy is a beast
ZenithM
Profile Joined February 2011
France15952 Posts
Last Edited: 2013-11-17 03:21:12
November 17 2013 03:18 GMT
#7875
Yeah, it's not easy at the beginning
For now I would advise you to remember not to put any semicolon after something like if (...), for (...), while (...), switch (...) and such. Always make sure to write something like:

while ( [your condition] ) {
[fill in your code here]
}

Maybe putting the opening "{" just after the ")", on the same line, will help you forget about putting a semicolon there
typeid
Profile Joined November 2013
United States1 Post
November 17 2013 05:10 GMT
#7876
Hello All!

This is my first post on TL! How exciting!!!!!
With that being said, if this is in the wrong forum or perhaps it is inappropriate to post something like this in another thread I apologize in advance and ask any mods to move or remove it as necessary.

(a little about me for honesty's sake...)
I don't have any professional experience programming but I have been researching and practicing since 1999. I have current gone through about 3 years of college on the subject though.

On several occasions I've considered different ways of creating some kind of more extensive programming tutorial for others to use and reference. I feel that a large amount of the information you can find on the internet is too specific and therefore difficult to extrapolate to your own projects.

For example, you might look at an article or tutorial about say spatial partitioning. More often than not it will give you one specific system, tell you how it works, throw some code at you (the good ones will explain it!) and let you be on your way. Now don't get me wrong these are invaluable resources and I am by no means trying to tell anyone not to use them.

On the other hand, I would like to share some of the knowledge I've accumulated through the years and I was think about doing it through a live stream. That way I could have some immediate feedback and viewers could ask questions through the chat.

I was thinking of doing it a few hours a day (6 pm - 10 pm EST) for three days a week (Wed, Thurs, Fri).

I planned on doing three different broad topics, one for the each of the three days.

Day one would probably be something like a "programming for newbies" approach, if you have no prior knowledge what so ever this would be where we start.

Day two would something more game programming specific. I have composed a few games over the years some text, 2D, and 3D. I love programming games it is very rewarding and I would be happy to give some other interested people that same enjoyment.

Day three I though would be good for a Q&A. (Questions of course could be asked other days, but if the answer is long winded I will just write it down and save it for day three).

An important note the language I prefer is C++ and as such will be the only language I'll talk about. C++ is fast, generic, and cross platform for the most part (not necessarily APIs though). Also, like most programmers, I'm incredibly biased towards my language of choice. Most of the ideas will be applicable to any language but the responsibility of figuring out the syntax semantic differences will be on you.

DISCLAIMER: I do not know anything officially.

I can't guarantee that I will have an answer immediately, but if it's a good question and I can't answer immediately I will definitely look into it.

I would like to know if anyone is actually interested in something like this before I start though as I would hate to waste valuable game time (lol).

I'll probably make a new thread on the matter in a couple days!

My e-mail: bghomashi@gmail.com
Twitch ID: typeid

Shoot me an e-mail or reply if you have any thoughts on the matter or even if you think its a silly idea.

Thanks guys (and maybe the one or two females? Maybe?)!
CatNzHat
Profile Blog Joined February 2011
United States1599 Posts
Last Edited: 2013-11-17 05:34:00
November 17 2013 05:25 GMT
#7877
On November 16 2013 17:02 FakePseudo wrote:
Hi guys,

So I've been using git for more then a year now, and I'm starting to go a bit beyond the basics, as I have to maintain several repos for some groups assignment where most users are really inexperimented (with git I mean). However, one thing still bothers me: what is your easiest and fastest way to apply changes across all branches (like a .gitignore change or w/e makes sense to you) that does not involve git push force right after it (so no rewinding history to a common ancestor or other weird rebasing)? For the time being I use cherry-picking or merging but it really isn't efficient nor meaningful for anyone reading the git log or tree, but I figure there should be a better way...(googling and all didnt help much)


I work at a company with an engineering team of about 16 and we keep all branches up to date with production by automatically merging master in after every successful deploy. If you could explain a bit more about why you want to apply a change across all branches that would be helpful. Usually you'd just branch off master and then make a pull request into master, and then everyone would have that change if they're keeping their branch up to date with master. They could resolve any conflicts themselves, or if they didn't want to deal with that they could just let their branch fall behind master and then you could handle the merge while processing their pull request.

It seems to me like this problem is occuring because you're all committing to branches and merging them yourselves instead of making pull requests to merge your feature branch into master or an appropriate integration branch.

One of the biggest benefits of working with a group of people on a project is having your code reviewed by someone else. They don't' have to be more experienced than you, or even understand all of your code, just having a second set of eyes makes a huge difference. Get into the habit of making pull requests, assigning them to someone, getting feedback, and iterating. This helps everyone enforce good programming habits, and it makes it easier for you to stray outside your comfort zone, knowing that you can get someone who knows more about what you're trying to accomplish to look over your code and help you make it the best it can be.

Good luck with Git!
Rollin
Profile Joined March 2011
Australia1552 Posts
November 17 2013 05:42 GMT
#7878
On November 17 2013 14:10 typeid wrote:
An important note the language I prefer is C++ and as such will be the only language I'll talk about. C++ is fast, generic, and cross platform for the most part (not necessarily APIs though).



I'll see if I can stop in sometime next week if you're running it to sus it out .
Throw off those chains of reason, and your prison disappears. | Check your posting frequency timeline: http://www.teamliquid.net/mytlnet/post_activity_img.php
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
November 17 2013 12:37 GMT
#7879
On November 17 2013 06:57 FakePseudo wrote:
Show nested quote +
On November 17 2013 05:19 Morfildur wrote:
On November 16 2013 17:02 FakePseudo wrote:
Hi guys,

So I've been using git for more then a year now, and I'm starting to go a bit beyond the basics, as I have to maintain several repos for some groups assignment where most users are really inexperimented (with git I mean). However, one thing still bothers me: what is your easiest and fastest way to apply changes across all branches (like a .gitignore change or w/e makes sense to you) that does not involve git push force right after it (so no rewinding history to a common ancestor or other weird rebasing)? For the time being I use cherry-picking or merging but it really isn't efficient nor meaningful for anyone reading the git log or tree, but I figure there should be a better way...(googling and all didnt help much)


This really, really sounds like you are trying to solve the wrong problem in a wrong way, so let me ask:
What are you actually trying to accomplish and why?


Well last time it occured to me, I basically wanted to add so random merge backup file (.orig) to the .gitignore.


What you want to do in this case, as CatNzHat already mentioned, is to put your change into the root branch, usually master, and let the users of the other branches update themselves at an appropriate time with "git merge master". Changes should generally be deployed with pull or merge, not with push, because otherwise you'll run into trouble when there are already conflicting changes.

Just put the .gitignore into your master branch and let the others merge the change into their branches.
FunkyLich
Profile Blog Joined August 2010
United States107 Posts
November 18 2013 01:44 GMT
#7880
On November 17 2013 12:06 Housemd wrote:
Ok guys, I'm a complete newbie so please bear with me. I'm also not sure if this is allowed but here goes nothing.

The task is to write Java code using a for statement to sum the numbers from 1 through 50.

This is what I have so far:

int sum = 0;
for (int y = 0; y<=50; y++);
{
sum = sum + y;
}
System.out.println(sum);


Now, the problem is that Eclipse keeps on saying "y" is an unresolved variable. I just can't understand it. I have declared y in my for loop and while searching online, I saw the same thing. I need to get through this problem to make sure my sum is correct so if someone could please point out my mistake, it would be a big help.


So it sounds like you found the problem with the semicolon. I just wanted to point out something I would consider a mistake. Your for loop took y from 0 to 50 instead of 1 to 50. I'm not trying to be nit picky. I understand it produces the same result; I just wanted to make sure you were not being careless. When programming loops, it can get very tricky to think about all the plus ones and minus ones. I've been doing this for a while and the nuances of inclusive/exclusive addition still get me.
Prev 1 392 393 394 395 396 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 2h 10m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Britney 65567
Leta 278
Dewaltoss 64
soO 37
Dota 2
NeuroSwarm427
League of Legends
JimRising 608
Counter-Strike
Stewie2K1156
shoxiejesuss764
ceh9451
allub3
Super Smash Bros
Mew2King106
Heroes of the Storm
Trikslyr21
Other Games
m0e_tv478
crisheroes257
Livibee58
Organizations
Dota 2
PGL Dota 2 - Main Stream10621
Other Games
gamesdonequick701
BasetradeTV278
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• LUISG 25
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt637
• TFBlade516
Upcoming Events
Escore
2h 10m
RSL Revival
9h 10m
Big Brain Bouts
9h 10m
PiG vs DeMusliM
Reynor vs Bunny
Replay Cast
16h 10m
WardiTV Map Contest Tou…
1d 3h
Classic vs SHIN
MaxPax vs Percival
herO vs Clem
ByuN vs Rogue
Ladder Legends
1d 7h
uThermal 2v2 Circuit
1d 7h
BSL
1d 11h
Sparkling Tuna Cup
2 days
WardiTV Map Contest Tou…
2 days
[ Show More ]
Ladder Legends
2 days
BSL
2 days
CranKy Ducklings
2 days
Replay Cast
3 days
Wardi Open
3 days
Afreeca Starleague
3 days
Soma vs hero
Monday Night Weeklies
3 days
Replay Cast
3 days
Replay Cast
4 days
Afreeca Starleague
4 days
Leta vs YSC
Replay Cast
5 days
The PondCast
6 days
KCM Race Survival
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-04-22
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Escore Tournament S2: W4
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W5
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.