Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
Y

yiangos

@yiangos
About
Posts
38
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The future is impossible
    Y yiangos

    Heh. I'll cheat here. Some particles can travel faster than light, under centain conditions (see cherenkov radiation - Wikipedia[^]). I believe the limit we are all talking about here, is the speed of light in vacuo. Supposedly, the speed of light in vacuo is the fastest speed any information can travel. However that too has been debunked under certain conditions (EPR paradox - Wikipedia[^]). We've yet to observe any tachyons, that's true. But we'd yet to observe any gravitational waves up to last year as well (and we did). And the theory we have describing the world around us is just that: a theory. When it stops corresponding to reality, we don't (shouldn't, at least) try to change reality, we change (should, at least) the theory. The same way that the theory of relativity and it's imposed limit that no massive object can travel faster than the speed of light in vacuo, was a better approximation of Newtonian physics in the limit of very large speeds (i.e. it described phenomena that Newtonian physics couldn't), there may be some other theory that describes some exotic (yet unobserved) phenomena that occur in extremely large speeds, and where the limit of the speed of light is no longer applicable (though I can't think of any phenomenon that this has been observed so far) and that degenerates to relativistic theory for large speeds and to Newtonian theory for small speeds. Physics was in a similar position at the turn of the 20th century - there were just a handful of phenomena that had yet to be interpreted adequately by classical physics - one of them was the photoelectric phenomenon, and another one was the linear emission spectrum of gases. Yet these two gave birth to quantum physics, and a whole lot of new areas of research for more than a century. Relativity theory still has a few things not very well defined (naked singularities comes to mind). And the universe is a very big place, so we can't really say we have looked everywhere and there's nothing more to observe. I, for one, believe that we are still in for quite a few surprises in terms of exotic physical phenomena in the future.

    Φευ! Εδόμεθ

    The Lounge performance tutorial

  • 1 = 0
    Y yiangos

    MKJCP wrote:

    But if it were true that 1=0, would that simplify chip design?

    I wonder, I've heard that qubits can be in the "0" and "1" state at the same time, so does that qualify for "1=0" at any level?

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge com design

  • 1 = 0
    Y yiangos

    Corporal Agarn wrote:

    How can I remember this but cannot find my car keys?

    It's called "selective memory". Apparently your car keys are not essential to your survival, but finding the flaw in such a trick is. :-\ :-O :laugh: ;P

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge com design

  • 1 = 0
    Y yiangos

    Please take a look at the thread. There is a number of mathematical proofs that an infinite series of 9s in the decimal part is actually EXACTLY equal to 1. Heck, even I offered a proof. There's no approximation there. 0.999... is EXACTLY equal to 1. Again, the dots play an important role. No dots, no equality. EDIT No I didn't offer a proof. Here's one. 0.999...= 9*(0.111...) 0.999...=9*[(1-1)+0.111...) 0.999...=9*[(1+0.111...)-1] 0.999...=9*[(1+0.1+0.01+0.001+...)-1] Now 1+0.1+0.001+0.0001+... = 1/(1-0.1)=1/0.9 This is the closed form for the sum of an infinite number of terms of aa geometric series. This is NOT an approximation. This is the actual final value of summing infinite terms of a geometric series. You can see e.g. at Geometric series - Wikipedia, the free encyclopedia[^] or you can look it up in wolfram (too tired to look it up myself right now). Therefore 0.999...=9*[(1/0.9)-1] 0.999...=(9/0.9) -9 0.999...=(90/9) -9 0.999...=10-9 0.999...=1 QED. There's no pesky math there (such as dividing by zero, as the OP did).

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge com design

  • Petition to outlaw JS, Ruby and Java??? For real???
    Y yiangos

    Clickety here[^] I can't believe this is actually true... And that it has 18 votes at the time of writing...

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge java javascript ruby question

  • 1 = 0
    Y yiangos

    0.9999 is indeed approximately 1 0.9999... (note the dots there) is EXACTLY 1.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge com design

  • 1 = 0
    Y yiangos

    Well... 0.999... is 0+(9/10) + (9/100) + (9/1000) +... which is 0+9*((1/10)+(1/100)+(1/1000)+...) which is 9* (sum(1/10^n)) where the sum runs over n for n=1 to infinity. Now for the same sum, if n ran from 0 to infinity, there is a convenient formula, that says it is (I'll mark this with a capital S to distinguish it from the one we're trying to calculate): Sum(1/10^n)=1+1/10+1/100+...=1/(1-(1/10))=1/(9/10)=10/9 therefore the sum we want is 1/10+1/100+...=(10/9)-1=1/9 therefore 0.999...=9*(1/9)=1 So it's math. On the other hand, computer calculated numbers are approximations, and in the binary system at that, and this is why you get all those rounding errors. But I get the feeling you already know all this, and that you are just toying with us obsessive compulsive types.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge com design

  • error in jpg...
    Y yiangos

    Mycroft Holmes wrote:

    Next time you send a mock up clearly describe what you are sending, this is a mock up of the the custom error pages and you would not have a pissed off, embarrassed client.

    Yeah, we did describe it. Something along the lines of "please review the images that show the design of the custom error pages". From what I know, a few hours later, both the client and the PM were laughing about it (kudos to the client for being able to be auto-sarcastic).

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge help question announcement

  • error in jpg...
    Y yiangos

    Well... We recently sent our client an update for the mockups of a new website we're about to start developing, in the form of a zip containing a couple of jpeg images (actually the images were mockups for the custom 404 and 500 error pages). So far so good. Minutes later, our PM got an angry call from the client. Here's how it roughly went down: [Client]: Hey, the mockups you sent over are not working at all. All I'm getting is errors! [PM]: What do you mean, that the zip file is corrupt? That you can't open the images? [Client]: No, the zip is not corrupt, and I can "open" the files, but when I do, I get an error! Fix it NOW! [PM]: Ok... What kind of error? [Client]: I get a 404 error on one image and a 500 error on the other. I said, FIX IT NOW!!! [PM]: hm, you do realize that you're seeing the MOCKUPS for the CUSTOM ERROR pages, right? That you're supposed to see an IMAGE displaying an ERROR. Right? [Client]:...

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge help question announcement

  • Give a right username and a right password and you're in...
    Y yiangos

    Well, flying is still somewhat dangerous...

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful database sysadmin question

  • Give a right username and a right password and you're in...
    Y yiangos

    Yeah, that might be the case:suss:. But not anymore :cool:

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful database sysadmin question

  • Give a right username and a right password and you're in...
    Y yiangos

    Actually, the person who originally wrote this little gem currently has something close to 25 years of active development under their belt, with extensive SQL work as well. I've seen other samples of their work, written about the same time as this, and they are REALLY better than this. So this leads me to think that they were smoking something REALLY good when they wrote this.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful database sysadmin question

  • Give a right username and a right password and you're in...
    Y yiangos

    Nah, username and password were sanitized earlier in the code. Surprisingly, the sanitization routine is pretty solid (probably copy-pasted from elsewhere though, seems quite out-of-place in terms of coding style).

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful database sysadmin question

  • Give a right username and a right password and you're in...
    Y yiangos

    I was asked to make small amendments to an ages old ASP Classic website. So I tried to log into the "administration" area, didn't know what username/password to use, and opened up the code to see where in the database (MSAccess) I should look for valid credentials... Behold (some details left out/altered to protect involved parties):

    Dim msg
    msg=""
    Dim sql
    sql="SELECT * FROM USERS WHERE (usr= '" + username +"')"

    Dim rs
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.ActiveConnection = dbconnSTRING
    rs.Source = sql
    rs.CursorType = 0
    rs.CursorLocation = 2
    rs.Open()

    if rs.Eof And rs.Bof then
    msg="Invalid username"
    end if
    sql="SELECT * FROM USERS WHERE (pswd= '"+ password +"')"
    rs.Close()
    rs.Open(sql)
    if rs.Eof And rs.Bof then
    if msg="Invalid username" then
    msg="Invalid username and password"
    else
    msg="Invalid password"
    end if
    end if

    So basically if I know your username and I have my own account, I can use your username and my password and log in as you... Nice eh?

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful database sysadmin question

  • Interesting...
    Y yiangos

    I'm surprised that nobody mentioned Asimov so far (at least AFAIK, nobody mentioned him) I believe that the poll is misleading (particularly the part that says "especially if I paid for it". That's just crap to drive people to pick the suicide choice as the "morally correct" one). The two choices set as possible outcomes to the question posed to the robot are: 1. Kill the occupant(s) only. 2. Possibly kill the occupant(s) and occupant(s) of other bot-car(s) as well If the three laws apply, then both of these choices would be rejected immediately as violating the first law (actively killing the occupants, or by doing nothing - i.e. inaction - possibly kill others). The bot-car would probably try to steer away from ALL oncoming traffic, and ALL oncoming traffic would probably try to steer away from the bot-car. In the end all bot-cars would actively try to save their occupants and the occupants of the other bot-cars first, and themselves (i.e. the bots) second.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge html com question career

  • Don't believe it
    Y yiangos

    Not saying that energy loss has momentum, but technically, fluid temperature is very closely related to the average momentum of the water molecules - if I recall correctly, temperature (being a measure of internal water energy) is proportional to the average kinetic energy of the water molecules (or something along those lines), which in turn is proportional to the average of the square of the molecules' momentum. So I would say that heated water, having a higher average molecular kinetic energy, exchanges higher amounts of energy with its environment, therefore in turn loses more energy to it (and cools faster). Then again, I may be wrong in that. I seem to have forgotten most of the thermodynamics I've been taught.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge adobe question announcement

  • Don't believe it
    Y yiangos

    Rob Philpott wrote:

    I thought it rather sticked together via surface tension

    Not quite. If this was true for any amount of water in the presence of gravity then you could devise a way to overturn a bucketful of water from a tall building and have it fall onto the ground as a single blob. At some critical mass, gravity (and random molecule movement) takes over and then the lower energy state of the fluid as a whole is to split into two (or more) droplets. The "other side of the coin" for the above statement is a leaky faucet. If you have a faucet that's giving a steady supply of water and slowly reduce the supply, at some point the surface tension is such that it's energetically favourable for the water to stop flowing as a "cylinder" and start flowing as a series of spheres (droplets). Actually, even in a showerhead, you can see that although the water comes out as a steady stream from each of the showerhead's holes, it becomes a series of droplets along the way. So, throwing any sizeable amount of water in the air in the presence of Earth's gravity will turn said amount of water into droplets.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge adobe question announcement

  • Developer Side Projects
    Y yiangos

    Simon Lee Shugar wrote:

    How often do you develop outside of work?

    Not as often as I wish. Most of the time I have little to no available time (pun intended) to devote to any personal (or otherwise) pursuits outside of work an family.

    Simon Lee Shugar wrote:

    Are the projects you work on personal or intended for commercial use at some point?

    Generally personal. Though I have 2 projects I would like to promote commercially.

    Simon Lee Shugar wrote:

    What do you like to work on outside of work? (other than the latest bottle of Gin)

    Games. Browser based (HTML5/Canvas/javascript) and tabletop (board games). Then again, my latest project was a life-sized drawing of a Barbie I made on the door of my daughters' room to use as a ruler for measuring their height progress. It's a Barbie drawing with a ruler on the side, where I mark each one's height and date measured. They're 4 and 2 years old now.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Lounge question

  • Why bother with any other exception data? The message should suffice.
    Y yiangos

    Yeah my point exactly. I'd done that same mistake myself, and thankfully it never got past the testing phase: I got that exact error message, and there was no inner exception to see :), so after a bit of digging, I simply changed my

    throw new Exception(ex.Message);

    to

    throw;

    (Of course, I had an error logging call just before that, otherwise the entire catch block wouldn't make much sense...) I was just very (unpleasantly) surprised to come across such a basic coding mistake in an online tutorial.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful tutorial question

  • Why bother with any other exception data? The message should suffice.
    Y yiangos

    Continuing on your serious note: the code per se, should not fail, I agree. But the final program may fail at times. Say you have a web request in there, and any of the following occurs: (a) the remote server times out (e.g. the server is offline) (b) the remote server has a bug, returning a 500 error (c) the remote server cannot find the requested resource, returning a 404 error (d) the remote server forbids access to the requested resource, returning a 403 error Any of the above results in the web request throwing an exception in YOUR application, but your code is not to blame. So there is a chance that a bug-free program CAN fail. That's why you should have error handling and meaningful error reporting.

    Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων! (Alas! We're devoured by lamb-guised wolves!)

    The Weird and The Wonderful tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups