windows

MSChart in VB6 - Axis Formatting

I'm putting together a graph with the MSChart control for VB6. Is there a way to adjust the location of the points on the X axis so that the first data point in the series sits against the Y axis? By default it floats in a space between the origin and the first gridline. ...

Need a way to determine if a file is done being written to.

The situation I'm in is this - there's a process that's writing to a file, sometimes the file is rather large say 400 - 500MB. I need to know when it's done writing. How can I determine this? If I look in the directory I'll see it there but it might not be done being written. Plus this needs to be done remotely - as in on the same int...

Local System Account on Windows

Does anybody know how to check the permissions on the local system account on Windows 2008? ...

How can I display different icons for same file extension

Visual Studio has *.SLN files for 2008, and 2010. In explorer, the icon associated with the file is based on the version somehow. I was always under the impression that the associated icon just looked at the extension, but obviously there is more going on. I'm asking on stack overflow as a developer - for my application, but if you fee...

Heroku throws SQLITE3 Read only exception

After I deploy an app to Heroku, I run migration scripts and get this error message ...ites\padrino\prophetmargin> heroku rake ar:migrate rake aborted! SQLite3::ReadOnlyException: attempt to write a readonly database: CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) /disk1/home/slugs/215264_925fd2c_65a3/mnt/.bundle/gem...

CPU Process time using GetProcessTimes and FileTimeToSystemTime do not work in 64 bit win

So I am trying to measure CPU time. It works great on Win 32, but on 64 bit it says error LNK2019: unresolved external symbol __imp_GetProcessTimes referenced in function "unsigned int __cdecl getWINTime(void)" (?getWIN32Time@@YAIXZ) it has similar error for FileTimeToSystemTime error LNK2019: unresolved external symbol __imp_FileTi...

External Connector Licensing with website hosted on windows

I we have created a website that requires users to login. It used forms based authentication and sql server to validation the login credentials. Should we need to purchase an external connector license from microsoft to be able to host this site on a windows .net platform. Edit: More information about external connectors. In microsoft ...

Capture screenshot Including Semitransparent windows in .NET

I would like a relatively hack-free way to do this, any ideas? For example, the following takes a screenshot that doesn't include the semi-transparent window: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown Text = "Opaque Window" Dim win2 As N...

Changing to remove path from Env Variable PATH

Hi, I'm trying to use a command line implementation to change the Path env var to remove a path so I don't have to manually removed it on a bunch of machines. I have found this, which I can't seem to get it to work: %Path:str1=str2% str1 is the path and str2 is null, which I'm not sure how to set it to null on the command line. If the...

How to JSLint in PSPad Editor?

Can you help me to use JSLint with this editor? I have put the JSLint script into the scripts/JScript folder. Now I should go to the scripts menu and recompile scripts. But I cannot find the script menu in pspad. I have installed the latest version. Can you help? ...

IsFile, IsDirectory Test Windows

I'm trying to convert a program from Linux to use on Windows, and it calls test -f, or test -d on Linux. I need it to do the same thing on Windows. Is there a built-in command, or another program I can use to do the same thing? I'm programming using FreeBASIC (horrible, but it's what I got). EDIT: An external program is the best option...

How to register an nsIModule DLL on Windows

I've created a Windows library with an implementation of nsIModule (and nsIProtocolHandler) a while ago. I've only recently got round to debugging it some more, but FireFox doesn't run my library any more. I've tried to register my module again, with regxpcom and deleting xpti.dat and compreg.dat, but my contract-id doesn't get listed. I...

Which socket, the clientSocket = accept() or the listen(socket), do you setsockopt SO_KEEPALIVE on?

Which socket, the clientSocket = accept() or the listen(socket), do you setsockopt SO_KEEPALIVE on to get the connection to clients not to drop? ...

Can I sync an iphone running OS 4 with a PC running iTunes 9.2

Just downloaded the iOS 4 GM seed from the apple developer site. Apparently from what I've read, I can't install it unless I do a full restore of the Phone. If anybody knows of a way to do it without restoring would be part of this question. I normally sync all my music and stuff with my PC. Will I be able to restore my device and re...

How do I use the ASP.NET grid view to instert new records?

Using the ASP.NET grid view. It displays 3 columns with 1 row for each, displaying an integer saved in the database. I would like to have a text input one for each column, so the user can add a new row of integers to the database. (The table only displays the last row updated, that part seems to be working OK) Here is the code I have th...

Is there simple and conscious diagram / algorithm on threads scheduling?

I have soft real-time .NET application run on W2008R2. I just realised that I cant explain how precisely threads are being scheduled. And for my embarassement I dont know how it works down to OS threads at all. So I will explain what I know and I'd appreciate if anyone could help me to fill the gaps and refer me to a simple descripti...

Reading Japanese filenames in windows, using Python and glob not working

I just setup PortablePython on my system, so I can run python scripts from PHP and I got some very basic code (Below) to list all the files in a directory, however it doesn't work with Japanese filenames. It works fine with English filenames, but it spits out errors (Below) when I put any file containing Japanese characters in the direct...

How do I execute an INSERT using SqlCommand?

I have another class that creates the connection (see refined class half way down page) and I believe it connects or at lest I do not hit any of the exceptions in run time. I would now like to insert data into my database but nothing is updated. I am trying to follow this example but it is for reading. I did run "querystring" on the...

C# When a managed thread ends its time-slice will it incur context switch?

In Russinovich book it says that thread (NOTE: this is about OS thread) will need dispatching (scheduling) if it a) became ready b) ended its timeslice, yields or blocks. I have a managed thread in my C# real-time app for which is very important to achieve as fewer context switches as possible. This thread has Highest priority and the ...

Accessing Windows Native API from User-Mode

I'm quite curious about the Windows Native API. I have been searching around the net and have failed to find an example of calling a Native API function from user-mode. I believe I have a basic grasp of what this entails - specifically, I have to define constants and the native API function in my program, and use GetProcAddress to find t...