path

URI formats are not supported in c#

僤鯓⒐⒋嵵緔 提交于 2019-12-12 09:44:26
问题 I am trying to insert my data in to xml file. the xml file location path: http://AutoCompleteInGridView%20new1/Design/Pro/pricelist.xml . when inserting my data i got error URI formats are not supported . It shows argument exception was unhandled.I want to save my xml file in server system .these url belongs to ServerPath location. can anyone give me a suggestion or links to solve these problem. here is the error: 回答1: Use this sample: string uriPath = "YourAddress/pricelist.xml"; string

Resolve Windows device path to drive letter

泄露秘密 提交于 2019-12-12 09:36:10
问题 How do you resolve an NT style device path, e.g. \Device\CdRom0 , to its logical drive letter, e.g. G:\ ? Edit: A Volume Name isn't the same as a Device Path so unfortunately GetVolumePathNamesForVolumeName() won't work. 回答1: Hopefully the following piece of code will give you enough to solve this - after you've initialised it, you just need to iterate through the collection to find your match. You may want to convert everything to upper/lower case before you insert into the collection to

How to decode url to path in python, django

人盡茶涼 提交于 2019-12-12 09:29:30
问题 Hi I need to convert url to path, what i got is this url as bellow: url = u'/static/media/uploads/gallery/Marrakech%2C%20Morocco_be3Ij2N.jpg' and what to be looked something like this: path = u'/static/media/uploads/gallery/Marrakech, Morocco_be3Ij2N.jpg' thx. 回答1: Use urllib.unquote to decode % -encoded string: >>> import urllib >>> url = u'/static/media/uploads/gallery/Marrakech%2C%20Morocco_be3Ij2N.jpg' >>> urllib.unquote(url) u'/static/media/uploads/gallery/Marrakech, Morocco_be3Ij2N.jpg'

Calculating the path relative to some root- the inverse of Path.Combine

為{幸葍}努か 提交于 2019-12-12 09:29:28
问题 Is there a reliable way to calculate the inverse of Path.Combine()? Path.Combine("c:\folder", "subdirectory\something.txt") might return something like "c:\folder\subdirectory\something.text". What I want is the inverse, a function where Path.GetRelativeUrl("c:\folder", "c:\folder\subdirectory\something.text") would return something like ""subdirectory\something.txt". One solution is to do string comparisons and trim the roots, but this would not work when the same path is expressed in

how to configure xampp in windows if project files are not in root directory

半腔热情 提交于 2019-12-12 09:17:18
问题 i am using windows .my xampp is install in drive C ,firstly i worked here in my files C->xampp->htdocs->SVN data->php_clients->trunks->myproject but than for SVN i copy paste my all files here now SVN Is configured here D->SVN data->php_clients->trunks->myproject i am testing my project locally i mean in localhost,firstly it was in C->xampp->htdocs->SVN data->php_clients->trunks->myproject so i was able to work ,test,update now i am suppose to work in files which is located here D->SVN data-

Ansible: How to globally set PATH for solaris

心不动则不痛 提交于 2019-12-12 08:58:22
问题 I am writing Ansible playbooks to setup and install our applications on Solaris servers. The problem is that the (bash) scripts which I need to execute all assume that a certain directory lies on the PATH, namely /data/bin - which would normally not be a problem were it not for Ansible ignoring all the .profile and .bashrc config. Now, I know that you can specify the environment for shell tasks via the environment flag, for example like this: - shell: printenv environment: PATH: /usr/bin:/usr

Missing scheme (IllegalArgumentException) while using java.nio.file.Paths interface

十年热恋 提交于 2019-12-12 08:47:16
问题 this is a really simple java question. I am using Java 8 with eclipse kepler on a linux system. I've been trying to try out NIO.2. My code is: package lucasTest; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.*; public class Lucas { public static void main(String[] args) throws URISyntaxException{ URI u = new URI("./Lucas.java"); Path p = Paths.get(u); } } I get the following error: Exception in thread "main" java.lang

Which path module or class do Python folks use instead of os.path?

半世苍凉 提交于 2019-12-12 08:46:59
问题 Just wondering how many people use a path module in Python such as Jason Orendorff's one, instead of using os.path for joining and splitting paths? Have you used: Jason's path module (updated for PEP 355) Mike Orr's Unipath, basically a more modern version of the above Noam Raphael's alternative path module that subclasses tuple instead of str I know Jason's path module was made into PEP 355 and rejected by the BDFL. This seems like it was mainly because it tried to do everything in one class

In MATLAB exist( x, 'file' ) takes forever

只谈情不闲聊 提交于 2019-12-12 08:21:53
问题 I am using exist(x, 'file') to check for the existence of a file on my machine. The execution of this command takes FOREVER (over 10 seconds per call!). My matlabpath is not too long (about 200 entries) and all folders on path are on my local drive (no network). Why does exist takes forever? Is there a way to make it run FASTER? PS, This call to exist is part of Matlab's execution of loadlibrary . So, if you are calling loadlibrary and you don't know why it takes forever - this question is

How to determine path to php.exe on windows - search default paths?

佐手、 提交于 2019-12-12 08:19:39
问题 I'm currently developing a couple of plugins for Sublime Text 2 on OS X and I would like to make them cross platform, meaning I have to find out if and where php.exe is installed. Right now I call /usr/bin/php in Python, which obviously works only on OS X and Linux: phppath = '/usr/bin/php'<br> pluginpath = sublime.packages_path() + '/HtmlTidy/tidy.php'<br> retval = os.system( '%s "%s"' % ( phppath, scriptpath ) ) But on Windows, there seems to be no definitve default path for php.exe. The