path

LoadLibrary from another DLL

≯℡__Kan透↙ 提交于 2019-12-23 12:47:21
问题 The DLL lookup path, as described in MSDN is: The directory where the executable module for the current process is located. The current directory. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory. The directories listed in the PATH environment variable. Which brings up the following doubt: Suppose I have an executable in some directory, say: c:

Sorting sys.path: first virtualenv, then /usr

纵然是瞬间 提交于 2019-12-23 12:24:28
问题 Why does sys.path contain /usr/... before directories from my virtualenv? I create the virtualenv with --system-site-packages The sys.path looks like this at the moment: /home/my-virtualenv/src/foo /usr/lib/python2.7/site-packages <--- /usr paths should be below /usr/lib64/python2.7/site-packages /home/my-virtualenv/lib/python27.zip /home/my-virtualenv/lib64/python2.7 /home/my-virtualenv/lib64/python2.7/plat-linux2 /home/my-virtualenv/lib64/python2.7/lib-tk /home/my-virtualenv/lib64/python2.7

SVG path positioning

主宰稳场 提交于 2019-12-23 12:07:33
问题 I am making face SVG. Unable to set eyebrow on proper place. Please advice. <svg height="100" width="100"> <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="none" /> <ellipse cx="35" cy="45" rx="4" ry="5" stroke="red" stroke-width="2" fill="none" /> <ellipse cx="65" cy="45" rx="4" ry="5" stroke="red" stroke-width="2" fill="none" /> <path d="M10,20 Q25,10 40,20" fill="none" stroke="#000" stroke-width="1.5px" /> </svg> 回答1: Use the transform attribute to position the path,

commons-exec: Executing a program on the system PATH?

↘锁芯ラ 提交于 2019-12-23 11:49:34
问题 I'm trying to execute a program (convert from ImageMagick, to be specific) whose parent folder exists on the path. Ergo, when I run convert from the command line, it runs the command. The following, however, fails: String command = "convert" CommandLine commandLine = CommandLine.parse(command); commandLine.addArgument(...) ... int exitValue = executor.execute(commandLine); If I specify the full path of the convert executable ( C:\Program files\... ) then this code works. If I don't do this, I

In a batch file, combining two strings to create a combined path string

陌路散爱 提交于 2019-12-23 10:51:20
问题 I need to take two strings and combine them into a single path string inside a batch file similar to the Path.Combine method in .NET. For example, whether the strings are "C:\trunk" and "ProjectName\Project.txt" or "C:\trunk\" and "ProjectName\Project.txt", the combined path will be "C:\trunk\ProjectName\Project.txt". I have tried using PowerShell's join-path command which works, but I need a way to pass this value back to the batch file. I tried using environment variables for that, but I

Installing Mapnik 2.2.0 in windows 7 with Python 2.7

落花浮王杯 提交于 2019-12-23 10:42:19
问题 I've been trying to install mapnik on my computer for hours but what i always get when I import mapnik is ImportError: DLL load failed: The specified procedure could not be found . I'm using Windows 7. The currently installed software is Geoserver from Opengeo suite. Here is my path %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Java\jre7\bin;C:\Program Files\Java\jdk1.7

Ambiguous path separator on Windows - how to handle it?

别说谁变了你拦得住时间么 提交于 2019-12-23 10:35:06
问题 Another question brought up an interesting problem: On Windows, the Java File.pathSeparatorChar is ; , which is correct. However, the semicolon is actually also a valid character to folder or file names. You can create a folder named Test;Test1 on Windows. The question is: How would you determine whether the semicolon in a path list actually separates a path or is part of the directory name, if the path list can contain both absolute and relative paths? 回答1: If the path contains a ; itself

Ambiguous path separator on Windows - how to handle it?

雨燕双飞 提交于 2019-12-23 10:34:35
问题 Another question brought up an interesting problem: On Windows, the Java File.pathSeparatorChar is ; , which is correct. However, the semicolon is actually also a valid character to folder or file names. You can create a folder named Test;Test1 on Windows. The question is: How would you determine whether the semicolon in a path list actually separates a path or is part of the directory name, if the path list can contain both absolute and relative paths? 回答1: If the path contains a ; itself

Batch-file: Check if file with pattern exist

核能气质少年 提交于 2019-12-23 10:15:51
问题 I have a strange situation and I don't know what is wrong I need to check if in a directory exist at least one file with a pattern. IF EXIST d:\*Backup*.* ( ECHO "file exist" ) ELSE ( ECHO "file not exist" ) If on d:\ I have a file x_Backup.txt and a folder Backup I get file exist but if i have only folder Backup I get again file exist , seems that the dot from path is ignored. 回答1: There are undocumented wildcards that you can use to achieve this as well. IF EXIST "D:\*Backup*.<" ( ECHO

conflicting cygwin and windows path

和自甴很熟 提交于 2019-12-23 10:14:54
问题 if my windows path looks like this: c:\ruby\bin;c:\cygwin\bin then when i go into cgywin and enter "ruby" it will execute the ruby from c:\ruby\bin, failing to find the ruby installed in my cygwin. I have to exclude that path so cygwin would execute the one from /usr/bin. But i need those 2 paths, since i want to run ruby in windows too. Anyway to have cygwin have its own path and not inherit those in windows? thanks. 回答1: Add an entry into your .profile to set the path to whatever you want