Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 02-18-2012, 01:35 AM   #2501
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 33,726
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I think it got reversed. What I thought it was when you had something like
if x == 5 && y=x+6

y=x+6 gets evaluated every time regardless of the value of x. I thought short circuiting was y=x+6 only getting evaluated if x was 5. I like that idea more than y=x+6 always getting evaluated, although there probably isn't a good reason to like one over the other.
kerowo is offline   Reply With Quote
Old 02-18-2012, 02:00 AM   #2502
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,912
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Someone found my resume online, and I stupidly put "Postgresql" on my resume. Looked them up and they seem pretty legit. It's rather shocking to me that they have to ask someone 3,000 miles away if they "know of" a full-out Postgresql DBA. Yeah, I can install it and load it from a csv if they want. Maybe I can run a few triggers with views and you know, toss in a loop construct because it looks pretty?
daveT is offline   Reply With Quote
Old 02-18-2012, 10:31 AM   #2503
wull
journeyman
 
wull's Avatar
 
Join Date: Jul 2007
Posts: 216
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by _dave_ View Post
I thought it was entirely normal?
It is entirely normal and for what it's worth I like it.
wull is offline   Reply With Quote
Old 02-18-2012, 10:44 AM   #2504
Zurvan
Retired
 
Zurvan's Avatar
 
Join Date: Apr 2005
Location: On the front porch, yelling at kids
Posts: 32,281
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by _dave_ View Post
wait, do people not like short circuit evaluation? I thought it was entirely normal?
Not only is it normal, it's completely logical

This, however:

Quote:
I think it got reversed. What I thought it was when you had something like
if x == 5 && y=x+6

y=x+6 gets evaluated every time regardless of the value of x. I thought short circuiting was y=x+6 only getting evaluated if x was 5. I like that idea more than y=x+6 always getting evaluated, although there probably isn't a good reason to like one over the other.
Terrible. If one of my developers did that, they'd get to rewrite it
Zurvan is offline   Reply With Quote
Old 02-18-2012, 01:18 PM   #2505
Xhad
Carpal \'Tunnel
 
Xhad's Avatar
 
Join Date: Jul 2005
Location: hatredcopter
Posts: 10,962
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by kerowo View Post
I think it got reversed. What I thought it was when you had something like
if x == 5 && y=x+6
Just curious, does anyone else think this looks like a bug on first glance? It looks like the classic "== instead of =" bug to me but maybe that's because students do this all the time

And I'm not sure what a better alternative to this would look like:

Code:
if someVariable != 0 and N/someVariable == k:
Xhad is offline   Reply With Quote
Old 02-18-2012, 01:22 PM   #2506
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,298
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by kyleb View Post
Here's that GV + Talkatone + T-Mobile Mobile Broadband blog post:

http://www.kyleboddy.com/2012/02/17/...-save-60month/
Quote:
Originally Posted by kyleb View Post
Yes. #firstworldproblems

did you know that there is a $30/month t-mobile prepaid plan that includes unlimited sms, 5gb data, but only 100 minutes. but if you are using google voice you dont even need minutes. lot of talk of using this setup over at howardforums. better than carrying two gadgets

i guess if you have an att iphone then youre stuck because of your device. i bought a samsung galaxy s2 so im good

Last edited by greg nice; 02-18-2012 at 01:35 PM.
greg nice is offline   Reply With Quote
Old 02-18-2012, 03:16 PM   #2507
clowntable
Carpal \'Tunnel
 
clowntable's Avatar
 
Join Date: Jun 2006
Location: 39, 46, 56, 59, 191
Posts: 45,544
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code:
if x == 5 && y=x+6
WTF is this lol.

Code:
if x == 5:
  y=x+6
  # More stuff
?

Quote:
Just curious, does anyone else think this looks like a bug on first glance? It looks like the classic "== instead of =" bug to me
+1

Quote:
Terrible. If one of my developers did that, they'd get to rewrite it
+1
clowntable is offline   Reply With Quote
Old 02-18-2012, 03:36 PM   #2508
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I've never seen anything like `if x == 5 && y=x+6`, I just tried it in c# and you just can't do this.

I would expect it to work in some langs though but it's damn ugly and make it a lot harder to read for hardly any benefit at all.
Gullanian is offline   Reply With Quote
Old 02-18-2012, 04:02 PM   #2509
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

In a lot of languages ' if(y=x+6) ' will always be true (assuming x is the correct type).
MrWooster is offline   Reply With Quote
Old 02-18-2012, 04:16 PM   #2510
myNameIsInga
adept
 
Join Date: Apr 2010
Location: Deep end of the player pool
Posts: 746
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Gullanian View Post
I've never seen anything like `if x == 5 && y=x+6`, I just tried it in c# and you just can't do this.

I would expect it to work in some langs though but it's damn ugly and make it a lot harder to read for hardly any benefit at all.
It works in C/C++ since 0 converts to false and any other number to true while(12) becomes while(true) . And its legal to assign values in if-statements.

In C# they made a point of not allowing either of that since it obv. can cause alot of hard to find bugs
myNameIsInga is offline   Reply With Quote
Old 02-18-2012, 07:37 PM   #2511
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 33,726
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I couldn't think of an example where you would have multiple statements in an and statement where one of them would change the value in a variable and would depend on the outcome of the and statement to determine if it was evaluated....
kerowo is offline   Reply With Quote
Old 02-18-2012, 07:57 PM   #2512
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Our site is being absolutely blasted with spam at the moment, soaking up a lot of our time. Am looking at signing up to http://www.akismet.com, anyone used them before? Any good? Most spam we get is comment spam on our blog/releases, forum seems fine. They are not new users either, they seem to be silent for 15-40 days, visit the site every day quietly then hit the site hard.

We don't want to introduce CAPTCHAS or anything that will affect usability like that (I'm pretty sure these are human sign-ups tbh, they circumvented our honeypots no problem). Thinking Akismet might be good, if their first comment is spam then we just ban them automatically.
Gullanian is offline   Reply With Quote
Old 02-19-2012, 01:23 PM   #2513
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,298
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Gullanian View Post
Our site is being absolutely blasted with spam at the moment, soaking up a lot of our time. Am looking at signing up to http://www.akismet.com, anyone used them before? Any good? Most spam we get is comment spam on our blog/releases, forum seems fine. They are not new users either, they seem to be silent for 15-40 days, visit the site every day quietly then hit the site hard.

We don't want to introduce CAPTCHAS or anything that will affect usability like that (I'm pretty sure these are human sign-ups tbh, they circumvented our honeypots no problem). Thinking Akismet might be good, if their first comment is spam then we just ban them automatically.
my forum was loaded with spam, and one simple change fixed everything, removing permission to post links or images for everyone. maybe you can do that in your blog permissions?

i have heard good things about akismet tho
greg nice is offline   Reply With Quote
Old 02-20-2012, 03:19 AM   #2514
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,298
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

suppose i wanted to be alerted via sms txt message each time some event happened on my website, say a certain user logged in, a certain number of hits, whatever

how would i do that?

i remember seeing some startup a while ago that you could send out txt messages from for like 1c per message. basically i want a way to send myself txt alerts, either from my home machine or via web service

edit/
nevermind: http://stackoverflow.com/questions/5...hrough-website

Last edited by greg nice; 02-20-2012 at 03:28 AM.
greg nice is offline   Reply With Quote
Old 02-20-2012, 03:53 AM   #2515
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 33,726
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Be careful of excessive chattiness, no one wants 600 texts in an hour...
kerowo is offline   Reply With Quote
Old 02-20-2012, 08:47 AM   #2516
clowntable
Carpal \'Tunnel
 
clowntable's Avatar
 
Join Date: Jun 2006
Location: 39, 46, 56, 59, 191
Posts: 45,544
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

In the age of unlimited traffic flatrates and whatnot I'd just send an email to my smartphone and not bother with texts.
clowntable is offline   Reply With Quote
Old 02-20-2012, 12:43 PM   #2517
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,298
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

duh didnt even think of that lol
greg nice is offline   Reply With Quote
Old 02-20-2012, 02:14 PM   #2518
gaming_mouse
Carpal \'Tunnel
 
gaming_mouse's Avatar
 
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 13,764
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by greg nice View Post
suppose i wanted to be alerted via sms txt message each time some event happened on my website, say a certain user logged in, a certain number of hits, whatever

how would i do that?

i remember seeing some startup a while ago that you could send out txt messages from for like 1c per message. basically i want a way to send myself txt alerts, either from my home machine or via web service

edit/
nevermind: http://stackoverflow.com/questions/5...hrough-website
i like clowntable's idea, but you are thinking of twilio.com if you want to ge texting route
gaming_mouse is offline   Reply With Quote
Old 02-21-2012, 03:12 AM   #2519
e i pi
veteran
 
e i pi's Avatar
 
Join Date: Feb 2010
Location: ☃
Posts: 2,230
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Any drupal gurus in here? Why is it such a cluster **** to add meta tags to a views page? I don't get how drupal has modules for everything but to inject a single line of html into a page seems to have stumped the entire community.

edit: nm figured it out

Last edited by e i pi; 02-21-2012 at 03:21 AM. Reason: ha
e i pi is offline   Reply With Quote
Old 02-21-2012, 06:18 PM   #2520
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Just got a new server in the end, find a USA company that seems good and decided against 1&1:
http://www.reliablesite.net

They seem to get good reviews and have been around ~5 years. $125 p/m we get:

10tb bandwidth
Xeon 4 core @ 3.2ghz
8gb ram
2x500gb HDD on raid 1
100mbs port speed (can upgrade to 1gbit for $20/m)

Rolling 1 month contract as well (setup only $10) so gonna see if this works out, seems ~ same price as 1&1 but the support seems very fast and great, and competitive pricing. We saved a lot of money though as we have valid Win 2008 r2 server licenses and SQL licenses.

I haven't check this with them, but I'm assuming it would be super easy to get more stuff as well, as it's a 1 mon contract we can just move to a better server whenever.
Gullanian is offline   Reply With Quote
Old 02-21-2012, 06:50 PM   #2521
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Not heard of them before, but looks like a solid company.... just make sure you have offsite backups.
MrWooster is offline   Reply With Quote
Old 02-21-2012, 07:02 PM   #2522
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yeah just getting dropbox all set up and get it done automatically. The network speed is very good, I'm just testing it at the moment. 100 megabytes per second up and down, current server we have can do about 10.

So far super impressed with this host, they answered all my emails within about 15 minutes as well (usually <5)
Gullanian is offline   Reply With Quote
Old 02-21-2012, 10:56 PM   #2523
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Oh man does anyone have any good guides on setting DNS up for complete noobs, I can't find much. I'm on Win server 2008, hosted with a US company and my domains are with a UK company.

I believe I've set my forward lookup zones correctly and my site bindings in IIS, but for the life of my I don't know what I'm meant to do about nameservers, should my new host provide me with some?

Edit: Ugh, my domain registrar says I need nameservers from new host, my new host is saying I need to get my domain registrar to register my IP's or something, don't understand this stuff

Last edited by Gullanian; 02-21-2012 at 11:22 PM.
Gullanian is offline   Reply With Quote
Old 02-21-2012, 11:32 PM   #2524
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,403
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I don't know DNS enough to know offhand what a forward lookup zone is

but yeah normally your host gives you configured nameservers, and you just point the entries at your domain registrar to those. but it needn't necessarily be like this, you can have your registrar, nameservers and hosting all in different places. as your new host if they provide nameservers, i guess.
_dave_ is online now   Reply With Quote
Old 02-21-2012, 11:55 PM   #2525
tyler_cracker
Carpal \'Tunnel
 
tyler_cracker's Avatar
 
Join Date: Apr 2005
Location: Shallow End OTKP
Posts: 15,824
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

gull,

one day your company will care about managing its own DNS, but by that time you'll have an IT guy who will take care of everything for you. until then, pay the nominal fee to your registrar or hosting provider and let them manage it.
tyler_cracker is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 07:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online