path

PHP Get only a part of the full path

Hello, I would like to know how can I subtract only a part of the full path: I get the full path of the current folder: $dbc_root = getcwd(); // That will return let's say "/home/USER/public_html/test2" I want to select only "/public_html/test2" How can I do it? Thanks! ...

VS2008 adding pl\bin to %PATH%

Guys, How do I add: pl\bin to my VS2008 PATH? I read in a forum post: . . . ensure pl\bin is in %PATH% But I can't seem to find such an option in my VS2008 Project Properties, etc... Thanks, ...

How can we protect ourselves from other third parties installing DLLs with the same names as some of ours into C:\WINDOWS?

Our product includes several DLLs built from open source into files with default names as delivered by the open source developers. We're careful to install the files in our own directories and we carefully manage the search path (only for our processes) to keep the loader happy. Another developer -- a towering intellect -- decided it wo...

How do I find the root path of a website from a dll?

I have a C# website. It references several compiled dlls. My dlls need to access folders on the website. How do I find the root path of the website from the dlls? I've tried System.Environment.CurrentDirectory - > "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" Assembly.GetExecutingAssembly().Location - > C:\WINDOWS\Micro...

Kohana3: Absolute path to a file

Say I have a file in my kohana 3 website called assets/somefile.jpg. I can get the url to that file by doing echo Url::site('assets/somefile.jpg'); // /kohana/assets/somefile.jpg Is there a way I can get the absolute path to that file? Like if I want to fopen it or get the size of the file or something like that. In other words, I ...

Populate InfoPath Combo Box

I am trying to populate a drop down and found this page, which provides part of the solution: http://www.bizsupportonline.net/infopath2007/programmatically-fill-populate-drop-down-list-box-infopath-2007.htm I got this to work, but if players.xml was changed, the drop down list didn't reflect it. I had to rename the file and add the ...

.Net: How do I check for illegal characters in a path?

Is there a way to check if a String meant for a path has invalid characters, in .Net? I know I could iterate over each character in Path.InvalidPathChars to see if my String contained one, but I'd prefer a simple, perhaps more formal, solution. Is there one? I've found I still get an exception if I only check against Get Update: I've...

WPF, convert Path.DataProperty to Segment objects

I was wondering if there was a tool to convert a path data like "M 0 0 l 10 10" to it's equivalent line/curve segment code. Currently I'm using: string pathXaml = "<Path xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" Data=\"M 0 0 l 10 10\"/>"; Path path = (Pa...

How to get the absolute path of the calling file in a function that's called in PHP?

in file.php: call()... How to get absolute path of file.php inside call() ? Pay attention that call() may be defined in another file. another.php: function call(){..} file.php: include(path_to_another.php); call(); ...

Converting a URI path to a relative file system path in .NET

How do I convert an absolute or relative URI path (e.g. /foo/bar.txt) to a (segmentwise) corresponding relative file system path (e.g. foo\bar.txt) in .NET? My program is not an ASP.NET application. ...

Path for Delphi libraries

Where do you guys store 3rd party (and your own) components? Do you keep separate copies per Delphi version? For years I've been using c:\program files\borland\delphi7\lib\, even for Delphi 2006, 2007, 2009 and 2010, like this: c:\program files\borland\delphi7\lib\AggPas\ c:\program files\borland\delphi7\lib\DeHL\ c:\program files\bor...

C/C++ full file path in assert macro

hello, I am wondering if it's possible to display full file path using the assert macro? I cannot specify full file path in compilation command, is there still a way to do it? My debug environment is linux/g++ ...

splitting a bezier curve in actionscript3

Hi I would like to "grow" a path with bezier-curves. After the path has been drawn, it should be shaking a bit: Weave-like look and feel. visual example: weave example At the moment I use TweenMax.bezier, which let me move a point along this curve and at the same time (onEnterFrame) I draw lines to the current Position of the Point. Un...

Mimic property/list changes on an object on another object

I need to mimic changes (property/list) changes on an object and then apply it to another object to keep the structure/property the same. In essence it's like cloning etc. the biz rules require certain properties to not be applied to the other object, so I can't just clone the object otherwise this would be easy. I've already walked th...

How do I get the path to your the iPhone resources folder?

I am currently using [[NSBundle mainBundle] resourcePath]. Is there a different way to do this? ...

How to determine path to project folder in .Net?

I have a project folder called XSL which contains xsl files used for transforming xml. I use the following code to fetch an xsl file: string html = @"c:\temp\export.html"; XslCompiledTransform transform = new XslCompiledTransform(); Uri uri = new Uri(@"XSL\ToHtml.xsl", UriKind.Relative); transform.Transform(CurrentXmlFile, html); System...

File System Types in .Net

I don't get the abstractions and the terminology :-( For example, DirectoryInfo.FullName is defined as the full path of the directory or file, but it's a string! So is DirectoryInfo.Name, FileInfo.FullName, Path.GetDirectoyName and so on. This means that in .Net there is no "depth" (or "meat" - my English isn't so good) for the file s...

Please help me with a Power shell Script which rearranges Paths.

Hi, I have both Sybase and MSFT SQL Servers installed. There is a time when Sybase interferes with MS SQL because they have they have some overlapping commands. So, I need two scripts: A) When runs, script A backs up the current path, grabs all paths that contain sybase or SYBASE or SyBASE (you get the point) in them and move them all...

Nunit Relative Path failing

I'm having an issue with Nunit where I cannot find an image file when I run my tests and each time it looks for images it looks in the Nunit folder instead of looking inside the folder where the binary resides. Below is a detailed description of what's happening. I'm building a binary that is under test which contains the definition f...

How could I make geometry advanced operations on bezier paths?

I have a library that draws regular bezier path figures (complex paths formed of a lot of bezier points), using midpoint approximation. I can draw them without problem, but I need to add support for advanced geometry operations: Nearest point of a curve, intersection, figure contains point, and more importantly, path combinations: diffe...