|
|
Prerequisite: .NET Framework 2.0, you can download it from Microsoft's site
1. Download binary from this link and unpack it anywhere on your disk (.exe and .config file must remain together)
2. Double click on WordAutoSaver.exe to start the program
3. Select monitor directory - directory where you save your word files. DO NOT select root directory (C:\\ or D:\\ or any other) but rather go deeper into structure (C:\\Documents is OK)
4. Select archive directory - where your files will be archived. Again - DO NOT select root directory
5. 'Save files from last x minutes' setting allows you to influence how often backup process will be triggered. If you select 10 minutes, than your file will be backed-up every 10 minutes
6. 'Send (CTRL+S)', your file will not be backed up if it hasn't changed in that, previously mentioned, 10 minute period. If you are one of those persons that forgets to Save their document, check this box and WordAutoSaver will send CTRL+S for you every time before starting the backup of file (kinda like AutoSave).
7. 'Delete files older than x minutes', you of course do not wish to keep backup files in archives for too long (after all you are saving them in your normal directory) which can be influenced with this setting - default is 2 days (2 * 24 * 60).
Couple settings that are not exposed in UI (they are embedded in config file):
-MonitorFilter1: filter used for finding files to backup in MonitorDir
-MonitorFilter2: another field if you wish another file type
-MonitorProcessName: name of process (in your TaskManager) that you want to target for sending CTRL+S
(You can change these settings to MonitorFilter1: *.xls, MonitorProcessName: EXCEL, in order to have same AutoSave functionality for Excel)
-StartMinimized: if you want to have WordAutoSaver start with Windows (by coping shortcut to it into Start Menu -> Startup), you'll probably want to start it minimized (replace False with True)
That's it. Leave comments/contact me if you run into any kind of problems.
*Utility is dedicated to my friend Stephen Vizinczey -> http://stephenvizinczey.com/
|
|
|
|
|
%@ Object
%d, %i signed int
%u unsigned int
%f float/double
%x, %X hexadecimal int
%o octal int
%zu size_t
%p pointer
%e float/double (in scientific notation)
%g float/double (as %f or %e, depending on value)
%s C string (bytes)
%S C string (unichar)
%.*s Pascal string (requires two arguments, pass pstr[0] as the first, pstr+1 as the second)
%c character
%C unichar
%lld long long
%llu unsigned long long
%Lf long double
http://www.cocoadev.com/index.pl?NSLog
|
|
|
|
|
Bah... this proved tougher than I originally thought, because all I could find were bunch of smart-ass comments that contained no code. You'll hopefully evade that path by following these steps:
1. Download Solution from -> http://www.sendspace.com/file/465sb6[^]
2. Open .sln, press F5 -> press Button -> you should get dialog with bunch of variables showing that server is aware of calling client's credentials and culture
3. Open SilverlightWcf/Page.xaml.cs to see how calls are initialized - note that you only set culture/username/password during proxy's creation.
How to import this into your solution? Easy:
1. Copy Util.CustomHeader.Silverlight & Util.CustomHeader.WcfService projects into your solution's folder
2. Reference Util.CustomHeaders.Silverlight from your Silverlight project, Util.CustomHeaders.WcfService from your WCF project
3. Decorate your WCF service with [CustomHeadersBehaviorAttribute] attribute (alternatively you can set this in config by using CustomHeadersBehavior, see ref #3 for more details)
4. Add reference to your WCF service from Silverlight project and after proxy class generation is finished you'll use code like this to initialize your service:
public Page()
{
InitializeComponent();
ClientChannelBinding binding = new ClientChannelBinding();
ClientChannelBinding.Culture = "sr-Latn-CS";
ClientChannelBinding.Username = "username";
ClientChannelBinding.Password = "password";
EndpointAddress endpoint = new EndpointAddress(
"http://localhost:1654/SilverlightWcf.Web/Services/Service1.svc");
client = new SilverlightWcf.ServiceReference1.Service1Client(binding, endpoint);
client.GetDataCompleted += client_GetDataCompleted;
}
private ServiceReference1.Service1Client client;
Of course, I recommend that you create some kind of WebServiceFactory.cs in your Silverlight project that will create services for you and do this initialization... while also exposing that web service URI in some config.
For those interested in details of how this works:
#1 - http://fluffyidentity.blogspot.com/2008/08/custom-wcf-channel-in-silverlight.html[^]
#2 - http://geekswithblogs.net/SunnyCoder/archive/2009/03/15/username-password-amp-ws-security-with-silverlight.aspx[^]
#3 - http://weblogs.asp.net/paolopia/archive/2007/08/23/writing-a-wcf-message-inspector.aspx[^]
|
|
|
|
|
|
Hmm, I have to question the randomness of the cards. My hand has a 2, four 3's and a 4. The dealer has two 2's, three 4's and a 5. Combined, that's three 2's, four 3's, four 4's and a 5. Somethings fishy here.
Just to see if it's a fluke, I've played another hand. This time the dealer has two 5's and I've got a five and three 6's.
Seems it's just incremental, not random at all. Oh, and my next hand is all 7's, so I split the first two, then got another and tried to split again which it allows, but doesn't do properly (just adds the new seven to the first split hand).
So, to make this better I suggest you check out how you're handling the randomness of the cards and also establish the rules you're using for splits and double downs: can you double down after a split? Can you split more than once? If you can, it's important to know up front.
Good work so far, though.
Cheer,
Drew.
|
|
|
|
|
Agrh...
I've managed to publish test version that doesn't shuffle the cards. Thanks for letting me know! I've just published new version; please try it out when you have time and tell me if everything is OK.
As for splitting and doubling - I was thinking about exposing those settings. For now you can only split once, and you are allowed to double on any cards after splitting.
Also I thought about exposing other important settings - like number of decks, what percentage of deck is dealt, does dealer hits soft 17 (now he doesn't). And now that I started thinking about it - you are allowed to get as many cards as you want after splitting aces, that would be another important setting.
As soon as I get time I'll work on that... and in the meantime please do not hesitate to drop more comments if you have them.
Thanks again for notice on shuffling!
modified on Monday, December 21, 2009 2:44 PM
|
|
|
|
|
I just tried it and it shuffles much better now.
I'll probably try it out again later and give you more feedback then if I have any.
Cheers,
Drew.
|
|
|
|
|
OK, I played a bit more. Here are my suggestions so far:
1) When asking for insurance, use a themed popup, rather than the standard message box. It seems out of place (and the beep it does drives me nuts).
2) When asking for insurance, change the buttons to read "Yes" and "No" rather than "OK" and "Cancel"
I played about a hundred hands - everything seems to work fine.
Cheers,
Drew.
|
|
|
|
|
on beep
I'll correct that javascript alert... agree that it is awkward (put it because Silverlight 2 doesn't natively support dialogs).
By the way, how you fared against dealer? Had any luck?
|
|
|
|
|
I quit when I was back to even. That's why I like blackjack. You can play for quite awhile without losing too much money (I just got back from Vegas a week ago, but didn't get to play much - too many other things going on).
I didn't keep count, but it seems to shuffle fairly often - is it using a single deck?
Cheers,
Drew.
|
|
|
|
|
Yeah - 1 deck... I made it that way in order to see if I can put in practice things I've read from that Blackjack book. Allegedly, with proper card counting and ranging bets from 1-8 units you have advantage of 2.5% over the house.
As said previously - plan is to expose this as setting in UI (my Shoe class already supports it), so user can practice with any number of decks... but as you are saying - too many other things going on.
Anyway, Drew, thanks a lot for providing valuable feedback!
|
|
|
|
|
Ya, you can count and have an advantage. It's a lot tougher in real-life, though, because of all the distractions and other players at the table. I've heard that most online blackjack games reshuffle after each hand, so counting doesn't work on them.
Fun to learn, though. I went through all that back in the late 80's before a trip to Vegas where I got to try everything I learned. I won some money that time, but probably more due to luck than my counting ability.
Cheers,
Drew.
|
|
|
|
|
Haha... it's deja vu.
About 20 days ago I went to casino to "try everything I learned". Brought $200 and went out of casino with another $200. Played perfect Basic Strategy but couldn't keep count... and ended with same thought: "I've had luck".
Talk about history repeating itself...
|
|
|
|
|
Sure is fun though!
Cheers,
Drew.
|
|
|
|
|
Either the list of timezone keys here is wrong or what Microsoft is using is wrong. I thought I'd just compare this list to the one found in Windows' change timezone drop down and within about 20 seconds I saw that the values for "Moscow, St. Petersburg, Volgograd" are different between the two lists. The one here has it GMT+3:00 and Microsoft Windows is using GMT+4:00.
|
|
|
|
|