To my understanding a Thread.Sleep(0) force a context switch on the OS.
I wanted to check what was the maximum amount of time that could pass in an application before to receive some CPU time.
So I built an application that does Thread.Sleep(0) in a while loop (c#) and calculate the time that pass between each call.
When this applicat...
I know that I should open a binary file using "rb" instead of "r" because Windows behaves differently for binary and non-binary files.
But I don't understand what exactly happens if I open a file the wrong way and why this distinction is even necessary. Other operating systems seem to do fine by treating both kinds of files the same.
...
How can i manage to get the IP or path like \11.1.1.100\projects of a connected network share with a drive letter.
I only have the drive letter and want to get the IP of the Share with python.
Many Thanks...
Sashmo
...
At my shop we do out code reviews in person and by printing out all the code on paper.
Printing out all those .h and .cpp files are a pain, and getting them in order is more of a pain. Is there any sort of program that will take all the files, print them out all at once and in order(specified by user), and include the line numbers and c...
I have text being passed to a function. That text can contain anything, from a single character all the way to a full book.
I need to extract the first like and use it as a "title" so I can name a file where I am saving that text as a backup. I am using the following:
function GetTitle(var Text:string):string;
var
title: string;
p...
Hello,
I was curious if it is possible to use the Windows Terminal Services API from a Java application? I am trying to deploy an app to a Linux system that can get the statistics of our servers and information about specific sessions. If there is an API out there that would let me use the Terminal Services API I would be very pleased.
...
Is there a way to make my Python console application's window flash in the Windows taskbar, to get a user's attention?
My script will be run exclusively in a relatively homogeneous Windows environment, so I don't care about detecting whether a particular API is present, or whether a solution is cross-platform or not (of course cross-pla...
This must be a real dumb question. And I cant figure out how.
What I want to do is launch a new command line with some arguments and excute some commands there.
Here is what I have in my .cmd
CMD /k %EnvInstallPath% %wo% %var%
cd /d %wo%\src
When I execute test.cmd, I see that the directory changes to %wo%, but the further cd src is...
Hi,
I've an python GUI application, I use pyQt4.
I build binary with bbfreeze (before I was using py2exe but it didn't work with email module well).
On system where I build this app, everything works properly, but when I install it on raw windows (without all those vc_redist and set of python libraries) binary does not work.
Where sh...
Hey all, I'm looking for a more visually appealing emacs. Is there anything I can do to make it look more aesthetically appealing or more up to date?
I understand that its not how it looks but how it functions that counts, but I was wondering if anyone had any success in beautifying emacs.
My platforms are Linux and Windows. I'm aware ...
I'm not exactly sure what you can (or should) do with *.rc files. Most Win32 example code, including Visual Studio templates, creates the main window programmatically in WinMain. I could create a dialog in the resource script and just show it in WinMain, but I'm not sure if that's the best idea, since dialogs are treated differently than...
Hi,
For decades, X11 has provided the possibility to have many virtual desktops that can be accessed by different people from different machines. The virtual desktops are thus independent of the real physical desktop.
I'm wondering whether there is something similar already on MS windows OS. I would think this could be easily done if v...
I am trying to use GMP in a C++ program on windows, and I compiled it successfully with Cygwin, and I get an .a file, which is linux's version of a .lib file. Is there a way I can use this with the Visual C++ compiler, or is there a way to compile GMP for windows to produce a .lib file?
...
I have a question about writing programs to be portable between windows and linux.
Recently I have realized that if you write a program that uses any sort of external library, if that library doesn't have a linux version (or a windows version when developing in linux) then you're screwed.
Here then is my question: if I write a program ...
Hello,
First of all I do know that there is already an identical question but that was answered 2 years ago. It can be found here. http://stackoverflow.com/questions/115045/good-c-gui-library-for-windows
I have exactly the same question as that guy above. Even my demands from a GUI library are the same as his bullet point. For my proje...
I'm following this guide mostly to compile gcc on windows:
http://www.aristeia.com/Misc/gcc4ForWindows.html
The difference is that I am using msys 1.10 and trying to build gcc trunk from SVN. the source tree compiles fine on linux, however when I attempt to build on windows, i get the following error upon running the configure script.
...
Hello!
My problem is the following: i have a state machine inside an app and i need to be able to pause the current states's ProcessInput function as long as the user moves the form along the screen.
I have a property called "Paused" on the state which does that and i override the OnMove event of the form so that the property is set t...
I hit a bug in my code which uses WSARecv and WSAGetOverlapped result on an overlapped socket. Under heavy load, WSAGetOverlapped returns with WSASYSCALLFAILURE ('A system call that should never fail has failed') and my TCP stream is out of sync afterwards, causing mayhem in the upper levels of my program.
So far I have not been able to...
I'm trying to port a piece of code, written in Java (see below), from Linux to Windows and struck at a point.
String sh = "/bin/sh";
String cop = "-c";
String cmd = "netstat -a | grep 9000 | wc -l";
String[] exe = new String[] {sh, cop, cmd};
Process FindCon...
Since we moved from IIS 7.0 to IIS 7.5 the Windows Authentication doesn't work anymore from remote requests. If I open the website on the webserver everything works fine.
web.config:
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
...