• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:50
CEST 14:50
KST 21: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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Reynor: GSL Loss Wasn't About Preparation Format12[IPSL] Spring 2026 Grand Finals - This Weekend!4Weekly Cups (July 6 - 12): Protoss strike back12BSL Season 22 Full Overview & Conclusion8BSL Season 22 Full Overview & Conclusion8
StarCraft 2
General
Is the larve respawn broken? BGE Stara Zagora to be held again in June 2025 Weekly Cups (July 6 - 12): Protoss strike back Serral wins HomeStory Cup 29 Yamato Cup Series
Tourneys
WardiTV Summer Cup 2026 GSL CK #5 Race War RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together Mutation # 532 Nuclear Family
Brood War
General
Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) BGH Auto Balance -> http://bghmmr.eu/ Etiquete rules in Asl? screpdb: new Starcraft reporting tool ASL 22 Proposed Map Pool
Tourneys
[IPSL] Spring 2026 Grand Finals - This Weekend! Escore Tournament - Season 3 [Megathread] Daily Proleagues [ASL22] Wildcard Qualifier
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
General RTS Discussion Thread Path of Exile Nintendo Switch Thread Stormgate/Frost Giant Megathread Summer Games Done Quick 2026!
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion! Series you have seen recently...
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Tennis[sport] Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Poker (part 2)
Nebuchad
The Experiences We Want and …
TrAiDoS
An Exploration of th…
waywardstrategy
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6119 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
WardiTV Qualifier
12:00
Summer Cup, Qualifier #1
WardiTV389
Liquipedia
CrankTV Team League
11:00
Crank Gathers S4: Group Stage
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko381
SortOf 145
RushiSC 19
StarCraft: Brood War
Calm 9268
Sea 1715
Horang2 694
EffOrt 413
Soma 344
Mini 334
Soulkey 285
BeSt 256
Snow 168
Light 142
[ Show more ]
actioN 141
Mong 139
Last 139
Zeus 115
Larva 97
JYJ 90
Rush 83
hero 76
Killer 54
Sea.KH 52
Pusan 47
ToSsGirL 40
Sharp 37
JulyZerg 34
sorry 34
Bale 21
Sexy 19
HiyA 17
Sacsri 17
Barracks 14
IntoTheRainbow 11
ajuk12(nOOB) 9
zelot 7
Icarus 5
Dota 2
Gorgc6550
XcaliburYe126
syndereN118
League of Legends
Doublelift2161
Counter-Strike
markeloff168
Other Games
singsing1542
B2W.Neo513
hiko388
crisheroes316
DeMusliM254
Happy233
XaKoH 150
Sick140
QueenE47
Organizations
Other Games
gamesdonequick2494
StarCraft: Brood War
UltimateBattle 827
Other Games
BasetradeTV203
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 77
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2276
• TFBlade537
Upcoming Events
OSC
4h 11m
Replay Cast
20h 11m
CrankTV Team League
22h 11m
WardiTV Qualifier
23h 11m
Epic.LAN
1d
Replay Cast
1d 11h
RSL Revival
1d 20h
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
1d 21h
Epic.LAN
2 days
IPSL
2 days
Dragon vs Hawk
[ Show More ]
RSL Revival
2 days
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
2 days
IPSL
3 days
Bonyth vs Ret
WardiTV Weekly
3 days
Monday Night Weeklies
4 days
PiGosaur Cup
5 days
The PondCast
5 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-07-13
HSC XXIX
Eternal Conflict S2 E2

Ongoing

IPSL Spring 2026
Acropolis #4
CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026

Upcoming

Escore Tournament S3: W3
ASL S22 SEASON OPEN Day 1
Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
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.