windows

What is the best way to sync computer time with an internet time server?

I need to get the current time from one of internet time server in my desktop application. I suppose I need something like a request string and a regular expression to get time from any site that user wants (may be with several predefined sites). Or may be there are some free libraries exist? Thanks. ...

UserControl in a DataGridView in Windows form

Looking for an example of a usercontrol in a datagridview row using Windows forms. The Usercontrol would have multipe controls based on the business logic which depends on the the index of the row. Thanks ...

How can I scan another process memory to find what follows a specific string?

I want to scan the entire heap of a currently running native application through another process. For example, I want to know what follows all the instances of the ASCII sequence "test" in this process memory (in this case I would scan for "test" and keep reading after it). I tried to google for more information but didn't find much: I...

How to setup visual studio for cross platform c++ development

After some time mainly .net development, i need to work in c++ in a cross platform manner. I don't want to give up visual studio, so my hope was that it is possible to use visual studio and the windows target as a testbuild, and then every once in a while through means of a vm test the code on linux or mac. Does anyone have experience ...

Customized UI - Windows or Linux?

I'm not sure if this is possible, but I'll give it a go. I'm creating a device where I have to add a customized user-interface instead of the normal operating system UI. I'm thinking of installing Windows CE (or .NET MICRO) or Linux, but I'm not sure which OS would let me do this. Also, the software (UI) would load instantly and doesn't...

Running R Code from Command Line (Windows)

I have some R code inside a file called analyse.r. I would like to be able to, from the command line (CMD), run the code in that file without having to pass through the R terminal and I would also like to be able to pass parameters and use those parameters in my code: eg. C:>(execute r script) analyse.r C:\file.txt and this would execu...

Downloading a file in Delphi

A google search shows a few examples on how to download a file in Delphi but most are buggy and half of the time don't work in my experience. I'm looking for a simple robust solution which will let me download a single exe (for updating my app) and will hold the execution of the current update thread until the download is done or error...

Windows notification for change of the periodic time adjustment

Can I monitor changes to the System Time Adjustment (which is change by SetSystemTimeAdjustment())? I need to monitor such changes for a high-accuracy real-time spectrogram view. Note: I know that WM_TIMECHANGE is sent whenever the system time is changed. This is not what I'm asking for. ...

Arguments, Plots, Outputs and Lines of best fit in R

I have several questions to do with handling some data in R: I am using this statement: detailsTable <- read.table(file=commandArgs()[6], header=TRUE, col.names=c("a", "b", "c", "d", "e")) and it seems that the table is not being loaded correctly... but if I specify the path of the file I am loading excplicitly then all goes well. What...

IWordBreaker Implementation in C# causes MemoryAccessViolation

Hi, I have inherited some code that makes use of the Windows IWordBreaker and IWordSink interfaces. There is an issue when multiple threads execute and use this code (to break multiple documents concurrently) - The IWordBreaker.BreakText() method throws a MemoryAccessViolation error. Does anyone know how to use this type of Exception t...

Log every window activated in MS Windows using Python based on AHK example

I'm trying to rewrite the following autohotkey script in Python: Gui +LastFound DllCall( "RegisterShellHookWindow", UInt,WinExist() ) MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" ) OnMessage( MsgNum, "ShellMessage" ) LastActiveWindowID := WinActive("A") Return ; // End...

Input Box in an MFC CWinApp prgram?

I need an input box in a UI program that is already written derived from the CWinnApp class and using MFC. I see it is using message boxes but I don't see any examples of input boxes.... How do I do this? (Using Visual Studio 6.0 in C++) Thank You. ...

make my gtk buttons more windows-like

How can I get my gtk buttons to look more like standard windows buttons? In this particular example, I have OK and Cancel buttons, but they're a different size than the OK and Cancel buttons in every windows app. How can I change their size to look more like windows'? ...

Start my program from another application

Hi, i want to know how i can start my c# program when another application is launched. I want only this application to start my program beacuse i will be doing some processing of the output from the application. The app was installed not written by me. I don't want to write a service. ...

TCP packet interception and redirection under windows

I have been trying to find some way of redirecting outbound TCP packets under windows, but so far have not been successful. Does anyone know of any software/code bit that would do something like that? I am not even sure it is possible with the windows stack. I am looking at doing something similar to what "-j REDIRECT" is to iptables. ...

mfc directory picker?

I did see this to modify CFileDialog (http://support.microsoft.com/kb/105497) but it looks like a lot more than I need. I'm using the CFileDialog to pick files, is there a simple way to use it to just select a directory? Any other suggestions? (I also saw this but is for XP only? http://msdn.microsoft.com/en-us/library/aa16394...

Console colors (Windows)

Is it possible to print out things in different colors in Python for Windows? I already enabled ANSI.sys, but this does not seam to work. I want to be able to print one line in red, and the next in green, etc. ...

deploying rails app to heroku migrations rake error on windows

Hi, I am attempting to deploy my app to heroku via a windows 7 machine. I've made it as far as git push heroku master without running into any major issues but when I try to rake the migrations i get the following error $ heroku rake db:migrate --trace rake aborted! No such file or directory - /disk1/tmp/13403_23723015091620/.bundle...

Detect Internet Connection down in windows using batch programming ?

I'm using net conn .which goes down after sum time bt if i repair my connection it works fine , i hv to do it manually always.... i want to do this task automatically. so i want to make a batch file in windows which will constantly running in background . and when my Internet network connection will down it will renew my connection and ...

What's the lowest level of operation you can play in windows?

Since many operations like holding on the PS2 bus are forbidened , what's the lowest level operation still available to windows users? ...