Search Results

Search found 18841 results on 754 pages for 'path finding'.

Page 4/754 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Windows 7 - User-specific %PATH%

    - by MiffTheFox
    I'd like to set up a system for Windows 7 where each user has their own private directory in %PATH%. I tried setting %PATH% to %HOMEDRIVE%%HOMEPATH%\Bin;%SystemRoot%\System32;[...] but it doesn't seem to work. For those who don't realize what I'm trying to do, it's sort of like EXPORT PATH=~/bin would be on *nix. It can be on a user specific basis if need be (and that would actually be prefer to the machine-wide settings).

    Read the article

  • Is finding graph minors without single node pinch points possible?

    - by Alturis
    Is it possible to robustly find all the graph minors within an arbitrary node graph where the pinch points are generally not single nodes? I have read some other posts on here about how to break up your graph into a Hamiltonian cycle and then from that find the graph minors but it seems to be such an algorithm would require that each "room" had "doorways" consisting of single nodes. To explain a bit more a visual aid is necessary. Lets say the nodes below are an example of the typical node graph. What I am looking for is a way to automatically find the different colored regions of the graph (or graph minors)

    Read the article

  • Could I do this blind relative to absolute path conversion (for perforce depot paths) better?

    - by wonderfulthunk
    I need to "blindly" (i.e. without access to the filesystem, in this case the source control server) convert some relative paths to absolute paths. So I'm playing with dotdots and indices. For those that are curious I have a log file produced by someone else's tool that sometimes outputs relative paths, and for performance reasons I don't want to access the source control server where the paths are located to check if they're valid and more easily convert them to their absolute path equivalents. I've gone through a number of (probably foolish) iterations trying to get it to work - mostly a few variations of iterating over the array of folders and trying delete_at(index) and delete_at(index-1) but my index kept incrementing while I was deleting elements of the array out from under myself, which didn't work for cases with multiple dotdots. Any tips on improving it in general or specifically the lack of non-consecutive dotdot support would be welcome. Currently this is working with my limited examples, but I think it could be improved. It can't handle non-consecutive '..' directories, and I am probably doing a lot of wasteful (and error-prone) things that I probably don't need to do because I'm a bit of a hack. I've found a lot of examples of converting other types of relative paths using other languages, but none of them seemed to fit my situation. These are my example paths that I need to convert, from: //depot/foo/../bar/single.c //depot/foo/docs/../../other/double.c //depot/foo/usr/bin/../../../else/more/triple.c to: //depot/bar/single.c //depot/other/double.c //depot/else/more/triple.c And my script: begin paths = File.open(ARGV[0]).readlines puts(paths) new_paths = Array.new paths.each { |path| folders = path.split('/') if ( folders.include?('..') ) num_dotdots = 0 first_dotdot = folders.index('..') last_dotdot = folders.rindex('..') folders.each { |item| if ( item == '..' ) num_dotdots += 1 end } if ( first_dotdot and ( num_dotdots > 0 ) ) # this might be redundant? folders.slice!(first_dotdot - num_dotdots..last_dotdot) # dependent on consecutive dotdots only end end folders.map! { |elem| if ( elem !~ /\n/ ) elem = elem + '/' else elem = elem end } new_paths << folders.to_s } puts(new_paths) end

    Read the article

  • Python os.path.join on Windows

    - by Jim
    I am trying to learn python and am making a program that will output a script. I want to use os.path.join, but am pretty confused. According to the docs if I say: os.path.join('c:', 'sourcedir') I get "C:sourcedir". According to the docs, this is normal, right? But when I use the copytree command, Python will output it the desired way, for example: import shutil src = os.path.join('c:', 'src') dst = os.path.join('c':', 'dst') shutil.copytree(src, dst) Here is the error code I get: WindowsError: [Error 3] The system cannot find the path specified: 'C:src/*.*' If I wrap the os.path.join with os.path.normpath I get the same error. If this os.path.join can't be used this way, then I am confused as to its purpose. According to the pages suggested by Stack Overflow, slashes should not be used in join—that is correct, I assume?

    Read the article

  • How to find full module path of a class to import in other file

    - by Pooya
    I have method that returns module path of given class name def findModulePath(path, className): attributes = [] for root, dirs, files in os.walk(path): for source in (s for s in files if s.endswith(".py")): name = os.path.splitext(os.path.basename(source))[0] full_name = os.path.splitext(source)[0].replace(os.path.sep, '.') m = imp.load_module(full_name, *imp.find_module(name, [root])) try: attr = getattr(m, className) attributes.append(attr) except: pass if len(attributes) <= 0: raise Exception, "Class %s not found" % className for element in attributes: print "%s.%s" % (element.__module__, className) but it does not return the full path of the module, For example I have a python file named "objectmodel" in objects package,and it contains a Model class, So I call findModulePath(MyProjectPath,"Model"). it prints objectmodel.Model but I need objects.objectmodel.Model

    Read the article

  • Getting a partial path to a file in a bash script

    - by Massif
    I have a path that is stored in a variable $FULLPATH="/this/is/the/path/to/my/file.txt" I also have another variable containing a partial path $PARTIAL="/this/is/the/" I want to remove the partial path from the full path so that I am left with: path/to/my/file.txt What's the best way to do this?

    Read the article

  • sendmail is using return-path instead of from address

    - by magd1
    I have a customer that is complaining about emails marked as spam. I'm looking at the header. It shows the correct From: [email protected] However, it doesn't like the return-path. Return-Path: <[email protected]> Received-SPF: neutral (google.com: x.x.x.x is neither permitted nor denied by domain of [email protected]) client-ip=x.x.x.x; Authentication-Results: mx.google.com; spf=neutral (google.com: x.x.x.x is neither permitted nor denied by domain of [email protected]) [email protected] How do I configure sendmail to use the From address for the Return-Path?

    Read the article

  • 32-bit java dominates my PATH magically

    - by Kos
    I have a 32-bit Java installed just for Chrome and 64-bit Java JDK for everything else. When I type java -version in the cmd, the 32-bit Java answers: C:\>java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing) This is the 32-bit JRE installed for Chrome (the installer name was chromeinstall.exe). However, I'd like the default Java to be this one: C:\>"Program Files\Java\jre6\bin\java.exe" -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) And for the fun part, only the 64-bit one is in PATH! C:\>echo %PATH% C:\Windows\system32;C:\Program Files\Java\jre6\bin (snipped irrelevant entries) So long story short: 64-bit JRE is in PATH, but 32-bit JRE is ran by default. What is happening here? How to fix it? Tried reinstalling the 64-bit JDK as a whole, didn't help.

    Read the article

  • Changing path to basedir of mysql

    - by shantanuo
    When-ever I need to start mysql from command line, I need to cd to the base directory and then use mysql command as shown below: # cd /home/ec2-user/percona-5.5.30-tokudb-7.0.1-fedora-x86_64/ # ./bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 mysql> How do I start mysql simply by typing "mysql" at command prompt? I tried to export the path but it did not work. export path=$PATH:/home/ec2-user/percona-5.5.30-tokudb-7.0.1-fedora-x86_64/bin/

    Read the article

  • Windows 7 PATH not expanding

    - by trinithis
    I am using the following to create and edit environment variables for Windows 7. Control Panel\All Control Panel Items\System -> Advanced system settings -> Environment Variables Under System variables I have the following pertinant variables: PROG32=C:\Program Files (x86) REALDWG_SDK_DIR=%PROG32%\Autodesk\RealDWG 2011 Path=%REALDWG_SDK_DIR%;%PROG32%\Haskell\bin However, the following happens: C:\>echo %PROG32% C:\Program Files (x86) C:\>echo %Path% %REALDWG_SDK_DIR%;C:\Program Files (x86)\Haskell\bin Is it possible to have a chain of variables expand? If I rename Path to something else, I sometimes get the problem, and sometimes I don't.

    Read the article

  • Mac OS X 10.6 executable not found without full path

    - by Danack
    I just installed Apache via MacPorts. It seems that my Mac was absolutely confused about which version of the Apache executables to run. After moving the Apache executables that ship with the Mac to a directory that is not listed in the PATH variable, trying to run the httpd built by MacPorts fails even though the correct directory (/opt/local/apache2/bin) is listed in the PATH variable. If I navigate to the directory /opt/local/apache2/bin and type the command httpd I still get the error message -bash: httpd: command not found If I type the command with the full path /opt/local/apache2/bin/httpd it works fine. I've run the command alias to see if something was clashing but the only thing listed is: alias wget='curl -O' How do I find what is intercepting the command and preventing the executable being found in the directory, even when I'm inside the same directory? By the way, the httpd file is executable: -rwxr-xr-x 1 root admin 442496 9 May 2012 httpd

    Read the article

  • PATH env variable on Mac OS X and/or Eclipse

    - by Jason S
    When I print out the path in bash, it prints this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin When I run System.out.println(System.getenv("PATH")); in Java running under Eclipse, it prints /usr/bin:/bin:/usr/sbin:/sbin How can I figure out why there is this discrepancy? I need to add /usr/local/bin to the PATH and make it available to Java apps under Eclipse. (note: I have made no modifications system paths, so these are the defaults set by the OS or perhaps by one or more of the applications i've installed.)

    Read the article

  • Path erased in Debian

    - by Lyon83
    I'm trying to deploy a rails app in Debian, using Apache/Passenger. I was trying to fox a problem with some GEMs and in the process I put executed this in console: export PATH=/var/lib/gems/1.8/bin/:${vendor/cache} Now my path environmental variable is gone, or at least its content. My server is running under Debian 6. Is there a way to recover my path info? Or at least can someone point me where to find the file where that variable i s stored? Some help please. This is a BIG problem for me. Thanks in advance!

    Read the article

  • Give the mount point of a path

    - by Charles Stewart
    The following, very non-robust shell code will give the mount point of $path: (for i in $(df|cut -c 63-99); do case $path in $i*) echo $i;; esac; done) | tail -n 1 Is there a better way to do this? Postscript This script is really awful, but has the redeeming quality that it Works On My Systems. Note that several mount points may be prefixes of $path. Examples On a Linux system: cas@txtproof:~$ path=/sys/block/hda1 cas@txtproof:~$ for i in $(df -a|cut -c 57-99); do case $path in $i*) echo $i;; esac; done| tail -1 /sys On a Mac osx system cas local$ path=/dev/fd/0 cas local$ for i in $(df -a|cut -c 63-99); do case $path in $i*) echo $i;; esac; done| tail -1 /dev Note the need to vary cut's parameters, because of the way df's output differs: indeed, awk is better. Answer It looks like munging tabular output is the only way within the shell, but df /dev/fd/impossible | tail -1 | awk '{ print $NF}' is a big improvement on what I had. Note two differences in semantics: firstly, df $path insists that $path names an existing file, the script I had above doesn't care; secondly, there are no worries about dereferncing symlinks. It's not difficult to write Python code to do the job.

    Read the article

  • A good file path builder library for C#?

    - by Igor Brejc
    System.IO.Path in .NET is notoriously clumsy to work with. In my various projects I keep encountering the same usage scenarios which require repetitive, verbose and thus error-prone code snippets that use Path.Combine, Path.GetFileName, Path.GetDirectoryName, String.Format, etc. Scenarios like: changing the extension for a given file name changing the directory path for a given file name building a file path using string formatting (like "Package{0}.zip") building a path without resorting to using hard-coded directory delimiters like \ (since they don't work on Linux on Mono) etc etc Before starting to write my own PathBuilder class or something similar: is there a good (and proven) open-source implementation of such a thing in C#?

    Read the article

  • Linux Exim set return-path header automaticly using from header

    - by solomongaby
    Hello, I use Exim on a Centos distribution and have some problems with the mail sending. In order to make all the email pass the spam filters the "Return-path" and "Sender" headers have to be attached to each email. What should I do in order to have "Return-path" and "Sender" headers added by Exim to be exactly the same as the "From" header created by my mail client ? Thanks

    Read the article

  • I need to create a volume/symbolic link from a UNC Path

    - by Sebas
    I have a workstation with Windows XP and I need to make a symbolic link or mount a UNC Path like a local Drive. I need the same behavior that produces M-Daemon tools when you mount an .iso File but with a remote directory. This is because I have a software client that perform several task but only with local drives and directorys. The remote UNC path is a NAS server, thats the why I need to perform all the tasks from a workstations. Thanks a lot!

    Read the article

  • Updating the $PATH for running an command through SSH with LDAP user account

    - by Guillaume Bodi
    Hi all, I am setting up a Mac OSX 1.6 server to host Git repositories. As such we need to push commits to the server through SSH. The server has only an admin account and uses a user list from a LDAP server. Now, since it is accessing the server through a non interactive shell, git operations are not able to complete since git executables are not in the default path. As the users are network users, they do not have a local home folder. So I cannot use a ~/.bashrc and the like solution. I browsed over several articles here and there but could not get it working in a nice and clean setup. Here are the infos on the methods I gathered so far: I could update the default PATH environment to include the git executables folder. However, I could not manage to do it successfully. Updating /etc/paths didn't change anything and since it's not an interactive shell, /etc/profile and /etc/bashrc are ignored. From the ssh manpage, I read that a BASH_ENV variable can be set to get an optional script to be executed. However I cannot figure how to set it system wide on the server. If it needs to be set up on the client machine, this is not an acceptable solution. If someone has some info on how it is supposed to be done, please, by all means! I can fix this problem by creating a .bashrc with PATH correction in the system root (since all network users would start here as they do not have home). But it just feels wrong. Additionally, if we do create a home folder for an user, then the git command would fail again. I can install a third party application to set up hooks on the login and then run a script creating a home directory with the necessary path corrections. This smells like a backyard tinkering and duct tape solution. I can install a small script on the server and ForceCommand the sshd to this script on login. This script will then look for a command to execute ($SSH_ORIGINAL_COMMAND) and trigger a login shell to run this command, or just trigger a regular login shell for an interactive session. The full details of this method can be found here: http://marc.info/?l=git&m=121378876831164 The last one is the best method I found so far. Any suggestions on how to deal with this properly?

    Read the article

  • How do I create a symbolic link to a UNC Path in Windows XP

    - by Sebas
    I have a workstation with Windows XP and I need to make a symbolic link or mount a UNC Path like a local Drive. I need the same behavior that produces M-Daemon tools when you mount an .iso File but with a remote directory. This is because I have a software client that perform several task but only with local drives and directorys. The remote UNC path is a NAS server, thats the why I need to perform all the tasks from a workstations.

    Read the article

  • What should be in the path variable?

    - by Paperflyer
    Recently, I had some programming problem. Some files could not be found. I checked the PATH variable and guess what? It was empty except for Quicktime. I guess Quicktime somehow managed to delete my path. Great. So. What should be in there? (Win7 x64)

    Read the article

  • Unable to get defined path in 'source' type on AIX node

    - by haris
    hi all, I am trying to create a set of users on my AIX node and trying to get their authorized_keys which are already hosted on my server with name like, 'myuser_id_dsa.pub'. Currently i am managing 2 nodes (1. SLES 2. AIX). I defined the 'source' file paths in 2 separate contexts in fileserver.conf; [AIX] path myfiles/users/ssh/ allow *.another.mydomain.com [SLES] path myfiles/users/keys/ssh/ allow *.mydomain.com but when I run puppet then it ended successfully on my SLES node but encountered failure on AIX; with following err; /* Could not describe /AIX/myuser_id_rsa.pub: Fileserver module 'AIX' not mounted*/ in my code i have defined the 'source' with $filserver variable as: case $operatingsystem { "AIX": { $fileserver = "AIX" } default: { $fileserver = "SLES" } } file { "${home}/${username}/.ssh/authorized_keys": source = "puppet:///$fileserver/${username}_is_dsa.pub", ... ... } why AIX is not able to get the source path from my fileserver.conf while SLES is running absolutely fine? and how can I do it? I have to run similar configuration across different servers so I can only deal it with case statement. looking forward for your help Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >