w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows batch script unable to find the path for library through windows scheduler
You could Replace . in your CLASSPATH with D:CPPschedulerJOB_REPORTS_MAIL if you just ran the compiled code. However, you compile the code each time the script runs, and these lines: javac Constants.java javac DBUtility.java probably depend upon the current working directory being D:CPPschedulerJOB_REPORTS_MAIL, so I don't think you'll be able to get around changing into that directory (unless you modify your build process, e.g. by using ant). Why do you want to avoid changing the directory anyway? If you're concerned about the working directory being different after the script runs, you could use pushd and popd instead of cd: @echo off pushd "D:CPPschedulerJOB_REPORTS_MAIL" javac ... ... java -cp ... popd but that doesn't really matter for a scheduled task. And why do you want a

Categories : Batch File

Windows script seems to be unable to create excel files if run from the windows scheduler
I found out what the problem is. Apparently the scheduled task can only work if the 'run only when the user is logged in' radio button is checked, because Excel hangs at attempts to save the file if the user is not logged in. This is a pain because it means I will need to leave the user logged into the machine for this scheduled task to work.

Categories : Excel

Unable to detect microphone volume
In the line: Runtime:addEventListener( “enterFrame”, soundDetector ) the quotes around enterFrame are not ASCII double quotes. The correct line should be: Runtime:addEventListener( "enterFrame", soundDetector ) probably cut&paste from another source (a PDF document?) triggered an automatic substitution somewhere. The same problem appears to be the error cause in the first snippet you posted: local text_ = display.newText(“Initial…”,200,10,nil,30) versus: local text_ = display.newText("Initial…",200,10,nil,30) P.S.: your code is horribly formatted.

Categories : Iphone

Why is my webapp unable to detect the media query attribute?
If your 700px rule (in the @media block) is above the 70px rule, and the latter applies outside of any @media blocks, then that will override your 700px rule for all media. In order for your @media block to override the general rule, you need to move it beneath it in your stylesheet. See my answer to this question for an explanation.

Categories : CSS

Detect Amazon VM (Windows)
Make a HTTP GET against http://169.254.169.254/latest/meta-data/ on the instance. On EC2(windows or *nix), you will receive information about the instance See: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html

Categories : Windows

Is there much additional overhead when retrieving an additional row from a SQL Server table
You can simply use a SQL Join statement to retrieve Questions along with all corresponding answers. Select * from Questions inner join Answers on Questions.ID = Answers.QuestionID Just to give an example.

Categories : Sql Server

How to detect a running script on windows?
You can use the isAlive method on the thread to check if it is already running. On similar lines, if you were running a process instead, then you could write a pid file everytime you start the process and query the OS for the status of that specific pid anytime you required. Check the following link for more on isAlive. http://docs.python.org/2/library/threading.html#threading.Thread.isAlive

Categories : Python

How do I detect whether my software is running on windows XP?
On the documentation page for the OSVERSIONINFOEX structure, the two relevant fields say this: For more information, see Remarks. Down in the remarks section is a handy table: Operating system Version number dwMajorVersion dwMinorVersion Other Windows 8 6.2 6 2 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION Windows Server 2012 6.2 6 2 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION Windows Server 2008 6 6 0 OSVERSIONI

Categories : C++

Detect OS and Java on Windows and Linux
You can use profiles for such purposes like this: <profiles> <profile> <activation> <os> <name>Windows XP</name> <family>Windows</family> <arch>x86</arch> <version>5.1.2600</version> </os> </activation> ... </profile> </profiles>

Categories : Maven

How to detect changes to the Windows system tray?
On Windows, if you install Visual Studio, among Visual Studio Tools there is a useful tool, named "Spy++", basically it's a tool that shows you all the windows and gives ability to see what messages particular window receives. Using this tool, you can see that whole panel, that contains "Start button", shortcuts, tray, clock, etc. is "Shell_TrayWnd". You can use "Find" menu to search for a particular window just dragging an "aim" on any window. The tray window itself is "SysPager" (000100D2 on attached image), you can log messages for this window and see what type of message this window receives when you receive mail in Outlook. After that you can write a code that will listen to all messages that this window receives, and basing on what you have seen in "Spy++" determine what happene

Categories : C++

How to detect when Windows 8 goes to sleep or resumes
For desktop apps, you can use SystemEvents.PowerModeChanged event to know if Windows is going into sleep state. I don't know if this works for the tablets too, but you can try it... From MSDN: • Resume The operating system is about to resume from a suspended state. • StatusChange A power mode status notification event has been raised by the operating system. This might indicate a weak or charging battery, a transition between AC power and battery, or another change in the status of the system power supply. • Suspend The operating system is about to be suspended. SystemEvents.PowerModeChanged += OnPowerChange; private void OnPowerChange(object s, PowerModeChangedEventArgs e) { switch ( e.Mode ) { case PowerModes.Resume: break; case PowerModes.S

Categories : C#

How can we detect system volume in WIndows 8?
I think you can use Windows.Media namespace. Also these is SoundLevel enum. Also ISimpleAudioVolume interface

Categories : C#

How can I detect Windows 8.1 in a Desktop application
Take a look at this article: Operating system version changes in Windows 8.1 Preview GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target Windows 8.1 Preview, you will get Windows 8 versioning (6.2.0.0). What it says is that GetVersion lies to you about the real OS version unless you explicitly direct 8.1 in your manifest. You need to add the following to the app manifest: <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> * <!-- Windows 8.1 --> * <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!--

Categories : Windows

Is there a way to detect filename encoding on Windows and Linux in c++?
Windows uses UTF-16 and Linux platforms are often "binary". By binary I mean whatever bytes you see as the filename is the filename - don't decode or re-encode the bytes. There is no indicator to state what format they were written in, but it's generally UTF-8.

Categories : C++

Detect windows 2003 and XP using batch file
try this: @echo off setlocal EnableDelayedExpansion ::Identify OS for /F "delims=" %%a in ('ver') do set ver=%%a set Version= for %%a in (95=95 98=98 ME=ME NT=NT 2000=2000 5.1.=XP 5.2.=2003 6.0.=Vista 6.1.=7 6.2.=8) do ( if "!Version!" equ "this" ( set Version=Windows %%a ) else if "!ver: %%a=!" neq "%ver%" ( set Version=this ) ) ::Identify bit if exist "%SYSTEMDRIVE%Program Files (x86)" ( set Type=64 bit ) else ( set Type=32 bit ) ::Display result echo %Version% %Type% goto :eof ::Goto right version goto %Version: =_% :Windows_8 echo Windows 8 :Windows_7 echo Windows 7 © Aacini

Categories : Batch File

How to Detect File Rename / Move in Windows
If you use java 7, you can simply use WatchService and WatchKey. This is a observer to watch a directory and each time something is changed, created or deleted you can do an action/file handling.

Categories : Java

Detect users logging off in Windows service
WM_QUERYENDSESSION is sent to all top level windows on the desktop in the closing session. However since your service usually runs in a different session, you normally won't get the notification. Before Vista you could enable interaction with desktop to share the desktop with the user on session 0, but you won't get the message sent to you if the logging off happens in another session. After XP, you won't get messages from user sessions due to session 0 isolation. To notify your service of this message, you need to run an agent process in each session (that is, register to auto start when the user log in via start menu shortcut or registry) and listen to WM_QUERYENDSESSION (in .Net terms, run a message pump like Application.Run in Windows Forms and subscribe to SystemEvents.SessionEnding

Categories : C#

Detect keyboard input after windows recognition of the key
Try the OemKeyScan function. With yours you should have the scancode (e.g. the "2" key has a given scancode that is always the same depending on position on the keyboard, e.g 17 for the "2" key): int whichscancode= 17; if (key_with_shift) whichscancode|= (1<<16); // shifted values with 1<<16 for (i=0; i<256; i++) { int scan= ::OemKeyScan(i); // try all characters for a matching scancode if (scan==whichscancode) { // i here is the ascii code of the key on that position printf("on that scancode is character %c ", (char)i); } }

Categories : C++

How to detect repainted areas in a Java application (Windows OS)?
Meanwhile I found JXLayer, a SwingLabs subproject with BSD license. After including jxlayer-3.0.4.jar into my project library, I was able to animate repaints. If you have a JFrame and a JPanel, use: JFrame frame = ...; JPanel panel = ...; if (DEBUG_REPAINT) { JXLayer<JPanel> layer = new JXLayer<>(panel); DebugRepaintingUI dp = new DebugRepaintingUI(50); // 50ms delay layer.setUI(dp); frame.setContentPane(layer); } else { frame.setContentPane(panel); } } By default the DebugRepaintingUI draws the changed area in XORMode, but I can adapt the source to create a less obtrusive effect. This approach has the problem that it actually modifies the application. Maybe someone has a better idea.

Categories : Java

Detect touch events in Chrome on Windows 8 with touchscreen
The simplest solution is to include Touch Punch plug-in http://touchpunch.furf.com/ I did it for my project and it works well - U can test it, here is my project: http://englishtotheworld.com/

Categories : Javascript

How can I detect when the "Save as type:" combo box changes using GetSaveFileName on Windows?
If you specify a callback using lpfnHook you will get CDN_TYPECHANGE notifcation messages when the user changes the type.

Categories : C++

Detect multiple keyboard press in windows store app/winRT
Well of course it doesn't work, since e is an instance of KeyEventArgs and it thus only represents one key. I think, however, that the KeyDown event is called for every key that is pressed, even if simultaneously. So, what you need to do is the following: Create an IEnumerable of Keys, which may be a List for example Create a bool indicating if at least one key is down, which you can control via the KeyX events. If you need help on that please comment. On the KeyDown event, add e.key to that list, and clear it when your value is set to false You now have a list containing every key that is currently being held, and you can use it to check multiple keypresses. If you need a code example, I'll add it.

Categories : C#

How to detect Blackberry mobile/playbook and Windows phone by Javascript?
You can detect BlackBerry devices by using: navigator.userAgent.match(/BlackBerry|BB|PlayBook/i); You can detect Windows devices by using: navigator.userAgent.match(/IEMobile|Windows Phone/i); However, if you are just trying to detect if the user is on ANY mobile device, I recommend using this code: if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) { // Do something for mobile users. } else { // Do something for non-mobile users. }

Categories : Javascript

How to detect if IE 'scripted windows' security setting is enabled/disabled
The setting in question applies to the window.prompt() method and does not impact the window.confirm() method. There's no way to detect the state of that setting from JavaScript without actually calling the method.

Categories : Javascript

Detect how long a user has been inactive within a Windows 8 Store app or system wide?
I ended up detecting key presses and mouse down events with javascript. Inside the LoadCompleted event, I inject javascripts by using AW_WebView.InvokeScript("eval", new string[] { scriptsString }); Key Press Script: window.document.body.onkeydown = function(event){ window.external.notify('key_pressed'); }; Mouse Down Scripts: document.onmousedown = function documentMouseDown(e){ window.external.notify('mouse_down'); } And you can add additional scripts for additional user events. When a mouse down or key press is detected, window.external.notify("keypress or mouse down") gets executed. This message gets "received" in my WebView_ScriptNotify event. When I receive a message from my WebView, I set a timer. If the timer is already set,

Categories : C#

Monobjc MSBuild tasks not working (additional libraries/excluded assemblies/additional assemblies)
The ExcludedAssemblies tag should work. Its goal is to exclude some assemblies from being embedded in the generated binary. That also means that these assemblies should be accessible elsewhere (i.e. the Resources folder). For the AddtionalLibraries, this is clearly a bug. Can you file one ?

Categories : Osx

What is the standard practice for memory leak detect with Google Test framework(not windows)
As far as I know, unit tests for memory leaks are not explicitly supported in Google Test. Nevertheless, you have this extension that fills that part for you

Categories : C++

Unable to switch among the windows
One probable solution is to use JavascriptExecutor.executeScript() method to run a javascript code and handle the pop up window without switching into pop up window. For example, from parent window of pop up window, run a javascript code which is something like this. JavascriptExecutor exec = (JavascriptExecutor)driver;exec.executeScript("var popup = <<popupopener function>>; //operate on popup object to manipulate the markup of pop up window");

Categories : Selenium

Unable to debug Windows Service
You may try to include this in the OnStart method: while(!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); } Then, manually attach to the process from the Visual Studio menu: Debug - > Attach to Process. Also, please note that in the Remarks section of the Debugger.Launch Method topic is stated that: If a debugger is already attached, nothing happens.

Categories : C#

Unable to connect to windows shares
I'm not sure if this helps in your case, but it works for me: The 3rd parameter to the SmbConnection should be (I think) the client_machine_name, so I pass there what I get from socket.gethostname(). I'm not using the sign_options and is_direct_tcp I just leave the default values. This works for me with both samba and windows shares (I just have to pass a different port number sometimes). Here is the code I use: class Smb(object): def __init__(self, username, password, server, share, port=139): # split username if it contains a domain (domainusername) domain, username = username.split('\') if username.count('\') == 1 else ('', username) # setup data self.domain = str(domain) self.username = str(username) self.password = str(pas

Categories : Python

Unable to deploy SWT WebStart app on windows 64 bit
Can this problem arise from an incorrect/incomplete manifest file? I think it is instead caused by having the SWT jars mentioned in the manifest at all. Anything mentioned in the Class-Path of the manifest will be provided to every application, regardless of 32/64 bit. Being provided with 2 jars is confusing the class loader, which will probably attempt to load the method from the 1st Jar on the class-path that contains it. Instead reference the SWT Jars in resource sections in the JNLP that are delineated by architecture. That way, each architecture will be provided with only the jars it actually needs (they will be added to the run-time class-path).

Categories : Java

Unable to install socket.io on my windows using npm
Tried it with npm 1.3 and works. Try clearing npm cache with npm cache clean Hope that helps. when all else fails, clear you cache

Categories : Node Js

Unable to use fugitive.vim on gVim on Windows 7
I have found it difficult to get fugitive working on Windows. I do have a few things for you to try, found using :h plugin. :echo has("eval") If this returns 0, your build of vim/gvim does not support plugins. :echo g:loaded_fugitive If this returns an error, vim did not spot your plugin during start, check :h plugin for correct directories to install to. If this returns 1, as mine did and it still did not work, try adding set shellslash to your .vimrc file. This got mine working.

Categories : Vim

Unable to find vcvarsall.bat using Python 3.3 in Windows 8
I am using the same setup and installing visual studio 2010 express was the easiest solution for me. http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express Python 3.3 was built using VS 2010. http://blog.python.org/2012/05/recent-windows-changes-in-python-33.html

Categories : Python

Paths in Lua: Unable to run script in Windows for Lua that requires 'wx'
OK, this was my own stupidity: I named the file wx.lua, so obviously require was trying to pick up the script itself. By simply renaming the file, it works fine.

Categories : Lua

unable to use/load mscomct2.ocx controls in vb6 ide windows 7 32 bit
Have you tried the 5.0 version of them? 5.0 offers the benefit of working with Windows XP/Vista/7/8 themes. I currently am able to use all common controls. So it's likely just a matter of re-registering the ocx file: http://support.microsoft.com/kb/146219 That is, running in command line: CD C:WindowsSysWOW64 regsvr32 /s mscomct2.ocx

Categories : Windows

Unable to install a Windows Service programmatically
public static class SelfInstaller { private static readonly string _exePath = Assembly.GetExecutingAssembly().Location; public static bool InstallMyService() { try { ManagedInstallerClass.InstallHelper(new string[] { _exePath }); } catch { return false; } return true; } public static bool UninstallMyService() { try { ManagedInstallerClass.InstallHelper(new string[] { "/u", _exePath }); } catch { return false; } return true; } public static bool IsInstalled(string serviceName) { var serviceExists = ServiceController.GetServices().Any(s => s.ServiceName == serviceName); if (se

Categories : C#

Unable to load jar manifest when opening from windows server
I'm running into the same issue now. Seems like the workaround is to make a standalone executable. How do I create executable Java program? Haven't found a fix for the root problem though, for me its the new fx launcher that is throwing the error.

Categories : Java

Unable to RDP to Windows Azure Svc VM (RDP enabled, RDP endpoint configured)
While this doesn't really address the problem, here's what I did to fix it. I created an entirely new Azure Cloud Service project, assigned it to use my existing web project, published it and let Azure do all of its magic to create a new service instance (again) and what do you know, works without a problem. I'm not sure if there may be a bug in Visual Studio or what, but this was certainly strange. Also, as a friendly reminder, remember to clean up your 'dead' services so you don't get billed!

Categories : Dotnet

Unable to connect to any of the specified MySQL hosts in c# windows form
Try Server=mysql.main-hosting.com;Database=xxxxxxxxx;User ID=yyyyyyy;Password=zzzzzzzz; Instead of Server=mysql.main-hosting.com;Database=xxxxxxxxx;Uid=yyyyyyy;Password=zzzzzzzz; Maybe it is a connectionstring problem. Or otherwise the server address is wrong.

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.