path

ASP.NET Relative Paths in Referenced Libraries

坚强是说给别人听的谎言 提交于 2019-12-23 10:08:06
问题 I have an ASP.NET website in which I am loading some validation rules from an xml file. This xml file name, with no path info, is hard coded in a library. (I know that the hard coded name is not good, but let's just go with it for this example). When I run the website, ASP.NET tries to find the xml file in the source path, where the C# file in which name is hard coded is. This is completely mind boggling to me, as I can't fathom how, at runtime, we are even considering a source path as a

Undefined reference to MySQL libraries using g++

牧云@^-^@ 提交于 2019-12-23 09:55:44
问题 I am getting undefined reference to 'mysql_suchandsuch@#' messages when trying to link my program with the MySQL libraries supplied with the 5.5 server. When MySQL was installed, I used the default path, which for me on Windows is C:\Program Files\MySQL\MySQL Server 5.5\ . Originally, I had thought that the spaces are causing my grief, but I think I've correctly worked out how to point to the library path without spaces (still with no luck). If there's another probable cause, please let me

Specifying path in makefile (GNU make on Windows)

橙三吉。 提交于 2019-12-23 09:33:09
问题 I'm using GNU make to build a project using Microsoft Visual C++, and I'd like to be able to run it from any CMD window rather than having to open the preconfigured one where the path (and various other environment variables) are preconfigured by a batch file. Ideally I'd like to define the relevant environment variables in the makefile itself, so all I need to do is pop open a CMD window and type "make". By and large this is straightforward, but I'm struggling with PATH; so far every syntax

What is the advantage of Path.TryJoin over Path.Combine in .NET Core?

依然范特西╮ 提交于 2019-12-23 09:26:27
问题 I just started using .NET Core 2.1, and found the Path.TryJoin and Path.Join method. There is no documentation on the method. I ran some unit tests calling the method, and it did nothing different than Path.Combine. Is there any advantage to this other than utilizing the new C# Span<T> data type to minimize string manipulation execution? 回答1: You can find the rationale behind the Path.Join being introduced here. IMHO it seems to be trading simplicity for performance and some minor fixes, also

PHP include with a variable in the path

若如初见. 提交于 2019-12-23 09:25:59
问题 So we build websites that have to ported from local development servers, to a test server, then to a live server. For this reason we have created a variable: <?php $path = '/_Folder_/_SubFolder_'; ?> When we move the website from server to the next, the idea is to simply change the $path definition to retrofit to the new development server. Currently, on each page when we call an include we write: <?php include('../_includes/_css.php'); ?> but what I'm trying to do is to: <?php include($path.

Can Process.Start() take the system PATH into account?

会有一股神秘感。 提交于 2019-12-23 09:07:13
问题 I've been searching and experimenting for a while with this, but I have had no luck. I am trying to make a console program to automate some tasks that I couldn't quite do with a BAT file. I want to call "signcode.exe" from the Windows SDK, the bin folder with all the tools in my system PATH, and I can call "signcode" from anywhere, but Process.Start is ignoring the path. Current code: System.Diagnostics.Process sign = new System.Diagnostics.Process(); sign.StartInfo.FileName = signCommand

Python os.path is ntpath, how?

那年仲夏 提交于 2019-12-23 08:03:10
问题 Can someone tell me how Python "aliases" os.path to ntpath ? >>> import os.path >>> os.path <module 'ntpath' from 'C:\Python26\lib\ntpath.pyc'> >>> 回答1: Look at os.py, lines 55-67: elif 'nt' in _names: name = 'nt' linesep = '\r\n' from nt import * try: from nt import _exit except ImportError: pass import ntpath as path import nt __all__.extend(_get_exports_list(nt)) del nt The import ntpath as path is the specific statement that causes os.path to be ntpath on your platforms (doubtlessly

How to handle undecodable filenames in Python?

守給你的承諾、 提交于 2019-12-23 07:32:11
问题 I'd really like to have my Python application deal exclusively with Unicode strings internally. This has been going well for me lately, but I've run into an issue with handling paths. The POSIX API for filesystems isn't Unicode, so it's possible (and actually somewhat common) for files to have "undecodable" names: filenames that aren't encoded in the filesystem's stated encoding. In Python, this manifests as a mixture of unicode and str objects being returned from os.listdir() . >>> os

“SystemFolder” in WIX and C#

风格不统一 提交于 2019-12-23 07:25:54
问题 An installer I have created with WiX installs a DLL using the SystemFolder variable, as well as a C# app into another folder. I want to directly reference the DLL from the app. Do I need to look up registry keys to find where the SystemFolder is? 回答1: No, you don't need to query the registry. Windows Installer has a series of built-in properties that automatically resolve to special well known locations such as SystemFolder. See System Folder Properties for more general information. For WiX,

“SystemFolder” in WIX and C#

狂风中的少年 提交于 2019-12-23 07:25:40
问题 An installer I have created with WiX installs a DLL using the SystemFolder variable, as well as a C# app into another folder. I want to directly reference the DLL from the app. Do I need to look up registry keys to find where the SystemFolder is? 回答1: No, you don't need to query the registry. Windows Installer has a series of built-in properties that automatically resolve to special well known locations such as SystemFolder. See System Folder Properties for more general information. For WiX,