current

C/C++: How to obtain the full path of current directory?

Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless they're standard ones like clib or STL.) (If there's no platform/filesystem-agnostic method, sugge...

Transforming selected text with a hotkey

I have this code: myVariable which I want to change into trace("myVariable: " + myVariable); using a direct hotkey like "alt-f12" to do it. I.e not using "ctrl-space" and arrow buttons. is it possible in eclipse? ...

What current tutorials exist for c/c++ for antrl 3.1?

I have written a parser in boost:spirit and now I wish to write the same stuff in antlr 3.1.1 to see if there are any performance gains or if it might be a better way to go about it as it also exports to many other languages besides c++ (The current 3.x branch actually does not export to c++). 3.1.1 is built using 2.7.x yet, it supports...

How to find path from where current process/executable is running?

I am running some executables while connected to a local unix server box. Say, I'm trying to run an executable 'abc'. Now the server might have provided an alias for 'abc'.. How do I get to know of this path? As in, if I invoke 'abc', it might actually run it from, say, /opt/corp/xyz/abc .. How do I get to know from what path I'm invoki...

Starting exe as a current user domain in Vista

I am starting an application (EXE) through Installer( MSI). While installing the MSI in Vista, it automatically run with Administrator rights (after thorough UAC). Hence the application started also runs under system user. I want this application to run Under Current User instead. In order to run application in current user I need to ex...

Runtime directory of Python

How do I find out the current runtime directory from within a Python script? ...

ASP.Net: List of Object in httpcontext.current.cache

Is there a way to look through the cache for all objects in the cache? I'm dynamically creating objects and I need to periodically go through the list to purge out objects I'm no longer using. ...

Jquery Show Current Page in Navigation Sliding Doors

I'm currently building www.scenes-online.co.uk/test/ I've got this code sliding up and down the links on hover using jquery... <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery", "1.3.2"); //load version 1.3.2 of jQuery google.setOnLoadCallback(fun...

Get identity of currently logged-on user, not System account

I have a process which is running within the security context of the local system account. From C#, how can I start (using System.Diagnostics.Process.Start) a process that will run within the security context of the currently logged-on user, not the system account? ...

Opening file in another directory in C

How is this achieved? I want to use pFile = fopen( file, "rb" ); Where file is a char, string or long containing the literal text containing a local path to a binary file C:\Documents and Settings\Supernovah\Desktop\Supernovah.bin but of course that crashes. I am also interested in how to recur over the current directory in a port...

Get IP of my machine C# with virtual machine installed

I want to get the current IP address of the computer that has say 3 virtual machines (VM Ware) installed. I want to get LAN address of that computer. current code that i have returns me an array but how to identify current computer lan address ? public static string getThisCompIPAddress() { IPAddress[] addresslist = Dns.Get...

Set Current Database in MySQL Script

I have a script file for MySQL that needs to be run on about 30 databases. Here's a snippet: ALTER TABLE <whatever_database>.`tblusers` ADD COLUMN `availability` ... ALTER TABLE <whatever_database>.`tblusers` ADD COLUMN `reliability` INTEGER ... There are many more lines in this script and I'd like to automate it in a loop of current...

Current Datetime in PHP

Hi all I can't just make this work. How can i display the current date in PHP in the format YYYYMMDDHHMMSS. Regards Matt ...

Does xaml has a version?

Wpf 4.0 is a buzzword these days which is the latest version of Wpf, I want to know what is the current version of xaml? and what was the previous version of xaml as well as Wpf? ...

Wrong Time with System.currentTimeMillis () (Java)

Hi, I made a little program to test the System.currentTimeMillis (). And I have a strange result. This is my logs : 1 26-12-09 20:48:21 - [Log] lTime = 1261860501009 2 26-12-09 20:48:21 - [Log] lTime = 1261860501012 3 26-12-09 20:48:21 - [Log] lTime = 1261864899078 4 26-12-09 20:48:21 - [Log] lTime = 1261860501033 5 26-1...

Finding Capacity Remaining In An iPhone Battery

Does anyone know how (if possible) I can find out how much capacity (mAh) is remaining in an iPhone battery at any given time? Something like the program above? Is there a value stored in a plist somewhere?? ...

Selenium: Get current value from drop-down menu

Hi there. I'm trying to find a simple Selenium call to grab the current option from a select drop-down list. I'm aware there are calls which grab all the values in a list but I wish to know which option is currently selected. Apologies if this is trivial but google and Selenium IDE didn't help me. Thanks. ...

WiX: How do you write variables specified on installation to the current user registry key of ALL users?

OS: MS Windows XP Pro (SP3) My application needs to access external databases, the locations of which I specify on installation. The specified file paths are then written to the registry, and the application then pulls this information out of the registry when it needs to. I have implemented this in WiX as follows, using just one of the...

Check file stamp using FTP to see if it is today's file.

Hi, I am using FTP (plain version) to download files from a server. The name of the file is always the same. All I can do to check to know if it is today's file is look at the timestamp manually. How can I write FTP script to check if the time stamp is having today's date? If you have come across this situation and have solved it, plea...

ASP.NET custom user control cannot access sitemap

I have a footer that I am adding to a masterpage. Within this footer, if constructs menus based on the Current Node of the sitemap, however the sitemap is coming back as null. Does anyone know how to fix this issue. Thank you ...