path

How to get my project path? [duplicate]

血红的双手。 提交于 2019-12-31 08:35:33
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: get path for my .exe using c# Hello I have a question: How can I get my root project path? what I mean is the first folder in the project where the solution is. I found that command : System.IO.Directory.GetCurrentDirectory(); However it gives me a specific path to the release folder: wanted_Path/bin/Release So is there other code, should I cut it manually or put my files in the Release folder?? 回答1: You can use

How to get my project path? [duplicate]

為{幸葍}努か 提交于 2019-12-31 08:35:16
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: get path for my .exe using c# Hello I have a question: How can I get my root project path? what I mean is the first folder in the project where the solution is. I found that command : System.IO.Directory.GetCurrentDirectory(); However it gives me a specific path to the release folder: wanted_Path/bin/Release So is there other code, should I cut it manually or put my files in the Release folder?? 回答1: You can use

How to execute programs in the same directory as the windows batch file?

心已入冬 提交于 2019-12-31 08:14:09
问题 I have in the same folder a .bat and a .exe file. I couldn't call the .exe file from the .bat unless I put the full absolute path to it. Is there a way to don't specify the path? 回答1: Try calling the .exe with %~dp0 , like this: %~dp0MyProgram.exe . %0 contains the full path to the called .bat file. ~dp says to get the drive and path, including trailing \ . 回答2: I solved this by changing the working directory using pushd at the start of the script and restoring is at the end of the script

PHP system calls and $PATH in OS X

折月煮酒 提交于 2019-12-31 06:07:57
问题 I'm trying to get PHP to make system calls on OS X. However, it doesn't seem to be able to find anything that's included in the system path. When I run... putenv("PATH={$_SERVER["PATH"]}:/usr/local/bin"); ... just before the system call, it works. This is not a practical solution, since the code that executes the system call is a plugin, so I'd rather not touch source code that'll make it incompatible come an update. Apache2 is running as the same user as I'm logged in, so theoretically it

Adding Image on Paths

拥有回忆 提交于 2019-12-31 05:27:16
问题 My problem is I have paths to draw cities and I want to put images inside these cities I cant put Image inside <Path> tags. Why cant I write such code? any solution? 回答1: Use a canvas or a custom panel with x,y placements and add images to the correct coordinates (same coordinates used by path). You can query the path nodes to find their coordinates if you don't know them. Edit: Since your window size changes and coordinates "stretch" accordingly, you will need to implement a custom panel. -

How to hide the physical path of the images

这一生的挚爱 提交于 2019-12-31 04:10:52
问题 In my application i display the image of user by giving the physical path of the directories like http://www.example.com/user_images/abcdefghijk.jpg But i dont want to expose this physical path to the external users to access the direct files. I want to implement the image retrieval as per the gravtar type image display. How we can do that? 回答1: In PHP you can use GD library to read the image. So the only way you need to create a image.php file & use the following code, <?php $imagepath="your

How to get the relative of a folder from two different projects

白昼怎懂夜的黑 提交于 2019-12-31 03:59:26
问题 I have two projects and one shared library that loads images from this folder: "C:/MainProject/Project1/Images/" Project1's folder: "C:/MainProject/Project1/Files/Bin/x86/Debug" (where there is project1.exe) Project2's folder: "C:/MainProject/Project2/Bin/x86/Debug" (where there is project2.exe) When I call the shared library function to load images, I need to obtain the relative path of "Images" folder, because I will call the function from either project1 or project2. Also I will move my

How can recursively search directories with multiple wildcards?

自闭症网瘾萝莉.ら 提交于 2019-12-31 02:58:31
问题 Using C# (.NET), how can I search a file system given a directory search mask like this: (?) \\server\Scanner\images\*Images\*\*_* For example, I need to first find all top-level directories: \\server\Scanner\images\Job1Images \\server\Scanner\images\Job2Images ...then I need to procede further with the search mask: \\server\Scanner\images\Job1Images\*\*_* \\server\Scanner\images\Job2Images\*\*_* This doesn't seem too complicated but I can't figure it out for the life of me... As mentioned

How can recursively search directories with multiple wildcards?

ε祈祈猫儿з 提交于 2019-12-31 02:58:04
问题 Using C# (.NET), how can I search a file system given a directory search mask like this: (?) \\server\Scanner\images\*Images\*\*_* For example, I need to first find all top-level directories: \\server\Scanner\images\Job1Images \\server\Scanner\images\Job2Images ...then I need to procede further with the search mask: \\server\Scanner\images\Job1Images\*\*_* \\server\Scanner\images\Job2Images\*\*_* This doesn't seem too complicated but I can't figure it out for the life of me... As mentioned

C/C++ - executable path

人盡茶涼 提交于 2019-12-31 02:51:07
问题 I want to get the current executable's file path without the executable name at the end. I'm using: char path[1024]; uint32_t size = sizeof(path); if (_NSGetExecutablePath(path, &size) == 0) printf("executable path is %s\n", path); else printf("buffer too small; need size %u\n", size); It works, but this adds the executable name at the end. 回答1: dirname(path); should return path without executable after you acquire path with, that is on Unix systems, for windows you can do some strcpy/strcat