Something went wrong. Try again later

iSylence

This user has not updated recently.

372 12 10 11
Forum Posts Wiki Points Following Followers

iSylence's forum posts

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#1  Edited By iSylence

I use Vim. Occasionally gedit.

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#2  Edited By iSylence

Not sure if this has already been pointed out, I had a look but I couldn't see if anyone else had posted it.

You can download the soundtrack for free from http://www.thinkwithportals.com/music.php

It's very good, I have been enjoying it thoroughly. I can't wait to be finished with University so I can play the game again! In 2 weeks time I be finished with a degree with Honours in Computer Science, yay! Got a job lined up as well, yay again!

Just an insight in to my life there, anyways enjoy!

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#3  Edited By iSylence

Changed. Used to be DrFreeman. Reeeeeeeally original name that was.

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#4  Edited By iSylence

I like the interns.

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#5  Edited By iSylence

You're right it would be cool, but you're also right in assuming it's been discussed before. I think I remember them talking about it on the bombcast at one point and they said that it was just too much content to manage in their databases, as well as the fact that there's already sites purely for videos which do it way better. Like youtube for example. :)

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#6  Edited By iSylence

Gah I just get here and it's answered already. Next time maybe post a small snippet of code to help people understand your situation. :)

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#8  Edited By iSylence
@example1013: Yeah I'm the same, when I'm learning a new language I like to have a few examples to go from to see how it differs from others.

@proggykins: I've put two ways on here as I'm sure you've seen. The second is much more elegant and will only tell them "oops" once for every time they click the button having exceeded their max attempts. The former will give them an infinite loop of "oops" which is bad code. If your lecturer wants that he's crazy and you should just submit the second one (with alerts for errors in it, sorry I commented those out).
Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#9  Edited By iSylence
@takua108: It was because I was just leaving that part of his code. He said he wanted a while loop which did that. I was going to reply to that and say he just wants an if at the top just below the variables like this:

if(attempts>=3){
alert("oops");
return false;
}
   
I wrote out the code again and was trying to find a nice way to post it on here so that the formatting wouldn't get screwed up when I moved it from Notepad++ but I can't be bothered. I'll just post it messy again.

Avatar image for isylence
iSylence

372

Forum Posts

12

Wiki Points

11

Followers

Reviews: 0

User Lists: 1

#10  Edited By iSylence

This is what you want.



Things I changed: 
  • Put the attempts outside of the function to make it a global variable.
  • Put an if statement at the end so it will only increment once if at any point in the code returnValue was set to False. The way it was originally they could potentially get stuck in the loop after 1 attempt to log in.
  • Send an alert to let the user know how many attempts have been made.

I really shouldn't just give the answers, but whatever.