Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Other Topics > Programming

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 03-15-2012, 01:12 PM   #2851
Carpal \'Tunnel
 
tyler_cracker's Avatar
 
Join Date: Apr 2005
Location: Shallow End OTKP
Posts: 13,905
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

oh, and i'll add: there's nothing at all wrong with sql, but many folks these days choose to implement their complex data stuff in code and use a much simpler (e.g. nosql) store for the persistence layer. maybe this too could help with operation costs? idk.
tyler_cracker is offline   Reply With Quote
Old 03-15-2012, 01:14 PM   #2852
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

If it makes you feel better about AWS - prices are pretty consistently going down.
jjshabado is offline   Reply With Quote
Old 03-15-2012, 04:07 PM   #2853
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,839
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by jjshabado View Post
If it makes you feel better about AWS - prices are pretty consistently going down.
Ye, I get emails pretty much weekly about price reductions. They are usually only a couple of % but for a big company they probably make quite a difference.
MrWooster is offline   Reply With Quote
Old 03-15-2012, 04:58 PM   #2854
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

And it gives pretty good confidence that prices aren't going to be jacked up anytime soon.
jjshabado is offline   Reply With Quote
Old 03-15-2012, 07:49 PM   #2855
Carpal \'Tunnel
 
tyler_cracker's Avatar
 
Join Date: Apr 2005
Location: Shallow End OTKP
Posts: 13,905
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

when amazon starts pimping its cloud offerings with television commercials, we will know we've arrived at the bottom of the market.
tyler_cracker is offline   Reply With Quote
Old 03-16-2012, 07:55 AM   #2856
Carpal \'Tunnel
 
clowntable's Avatar
 
Join Date: Jun 2006
Location: 39, 46, 56, 59, 191
Posts: 39,730
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm usually very much in the "lol IT books" camp, especially for programming since stuff outdates so quickly and yet I just got an order of three paperback books for about 150 Euro total. Two of them are on programming (same language) and one is a "concept book" (related to said language).

Hints:
Spoiler:

Spoiler:

Spoiler:


Anyone willing to guess? I'll reveal this incredibly interesting info later :P
You can win no price except for a thumbsup.
clowntable is offline   Reply With Quote
Old 03-16-2012, 09:11 AM   #2857
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code Complete?

Edit: I missed "related to said language" so I assume my guess was wrong.
jjshabado is offline   Reply With Quote
Old 03-16-2012, 10:16 AM   #2858
Pooh-Bah
 
Jeff_B's Avatar
 
Join Date: Jul 2005
Location: I need Patience NOW
Posts: 3,909
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Stupid question.
MFC C++,
I have a few structs that are used everywhere in my program.
I would like to be able to add a function to the struct that clears/initliatzes all the variables.

Is this possible? I have seen something about adding functions to structs before but when I complied i get errors about the function already being defined. Yes, I could make them classes but I would imagine this would be possible as well especially since they are all just data...

Basically what would be ideal would be

Code:
struct MyStruct
{
	bool mybool;
	double mydouble;
	clear();
}

MyStruct::clear()
{
	mybool = false;
	mydouble = 0.0;
}

and then to intilize I would simple do

MyStruct instance;
instance.clear();
Jeff_B is offline   Reply With Quote
Old 03-16-2012, 10:31 AM   #2859
adept
 
Join Date: Nov 2006
Location: Tunica
Posts: 950
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by tyler_cracker View Post
oh, and i'll add: there's nothing at all wrong with sql, but many folks these days choose to implement their complex data stuff in code and use a much simpler (e.g. nosql) store for the persistence layer. maybe this too could help with operation costs? idk.
I would love to avoid paying out the rear for server costs, but I would need to sit down and figure out if there was a way around it. I need to keep historical stats and a huge player database that is going to be hiding some sensitive info (to the game, not credit card info or anything).
Tim Brice is offline   Reply With Quote
Old 03-16-2012, 10:38 AM   #2860
Carpal \'Tunnel
 
Benholio's Avatar
 
Join Date: Jun 2004
Location: Atlanta, GA
Posts: 6,467
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Jeff_B View Post
Stupid question.
MFC C++,
I have a few structs that are used everywhere in my program.
I would like to be able to add a function to the struct that clears/initliatzes all the variables.

Is this possible? I have seen something about adding functions to structs before but when I complied i get errors about the function already being defined. Yes, I could make them classes but I would imagine this would be possible as well especially since they are all just data...

Basically what would be ideal would be

Code:
struct MyStruct
{
	bool mybool;
	double mydouble;
	clear();
}

MyStruct::clear()
{
	mybool = false;
	mydouble = 0.0;
}

and then to intilize I would simple do

MyStruct instance;
instance.clear();
Shouldn't be a problem, just a couple of tweaks to get it compiling:

Code:
struct MyStruct
{
    bool mybool;
    double mydouble;
    void clear();  // specify return type (void)
}; // semicolon

void MyStruct::clear()
{
    mybool = false;
    mydouble = 0.0;
}
edit: FYI, there is virtually no difference between structs and classes in C++ anymore. The only difference at all is that struct members are public by default and class members are private by default. So don't worry too much about it!
Benholio is offline   Reply With Quote
Old 03-16-2012, 10:38 AM   #2861
adept
 
Join Date: Apr 2010
Location: Deep end of the player pool
Posts: 731
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Jeff_B View Post
Stupid question.
MFC C++,
I have a few structs that are used everywhere in my program.
I would like to be able to add a function to the struct that clears/initliatzes all the variables.

Is this possible? I have seen something about adding functions to structs before but when I complied i get errors about the function already being defined. Yes, I could make them classes but I would imagine this would be possible as well especially since they are all just data...

Basically what would be ideal would be

Code:
struct MyStruct
{
	bool mybool;
	double mydouble;
	clear();
}

MyStruct::clear()
{
	mybool = false;
	mydouble = 0.0;
}

and then to intilize I would simple do

MyStruct instance;
instance.clear();
In c++ you can have functions in structs. I see in your code that you forgot return type, this might be the source of your problem. Try declaring it as

void Clear();

and then

void MyStruct::Clear()
{
}


benholio beat me to it..

Last edited by myNameIsInga; 03-16-2012 at 10:43 AM. Reason: Im slow
myNameIsInga is offline   Reply With Quote
Old 03-16-2012, 11:32 AM   #2862
help me help you
 
Chips Ahoy's Avatar
 
Join Date: Apr 2007
Location: up-at-dawn, pride-swallowing siege
Posts: 21,299
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Jeff_B View Post
I would like to be able to add a function to the struct that clears/initliatzes all the variables.
and then to intilize I would simple do

Code:
MyStruct instance;
instance.clear();
You want a constructor. You might also want a clear if you are into recycling.
Chips Ahoy is offline   Reply With Quote
Old 03-16-2012, 02:27 PM   #2863
Carpal \'Tunnel
 
Join Date: Aug 2004
Posts: 7,145
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

does anyone use a VPS as their actual computer? apparently its popular with day traders who need uptime 24/7. i coudlnt believe it, immediately security concerns popped into my head

was just wondering if anyone has experience with it
greg nice is offline   Reply With Quote
Old 03-16-2012, 04:32 PM   #2864
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,839
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by greg nice View Post
does anyone use a VPS as their actual computer? apparently its popular with day traders who need uptime 24/7. i coudlnt believe it, immediately security concerns popped into my head

was just wondering if anyone has experience with it
Security is not much of a problem (as long as its setup correctly), for me the bigger issue would be speed.

My guess would be that the day traders have some sort of web based portal setup which they can trade through which will be quite fast, but you try using a remote desktop and however fast your connection is, there is going to be lag.
MrWooster is offline   Reply With Quote
Old 03-16-2012, 05:49 PM   #2865
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK
Posts: 9,133
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

yeah i'm sure a lot of "lone wolf" traders use remote desktop vps to a very stable connection in a datacentre, they likely really want the platform to be up and able to close out their positions automatically etc even if your own internet goes down. Can't see lag being much of an issue for day trading, most of them are probably not "scalping" as super-low timescales. like being disconnected while registered for a $5k husng, losing connection with a trade active is most undesirable!

A lot of internet marketers run VPS as main computers too, tho not their only ones. very handy to have multiple / throwaway IPs, and computer(s) that can keep running automation programs 24/7 like xrumer, senuke etc.
_dave_ 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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 03:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2008-2010, Two Plus Two Interactive