Search Results

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

Page 37/754 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • python list directory , subdirectory and files

    - by thomytheyon
    Hi Alls, I'm trying to make a script to list all directory, subdirectory, and files in a given directory. I tried this : import sys,os root="/home/patate/directory/" path=os.path.join(root,"targetdirectory") for r,d,f in os.walk(path): for file in f: print os.path.join(root,file) Unfortunatly it doesn't work properly, i get all the files, but not them complete path. like : if the dir struct would be : /home/patate/directory/targetdirectory/123/456/789/file.txt It would print: /home/patate/directory/targetdirectory/file.txt What i need is the first result, any help would be greatly appreciated ! Thanks

    Read the article

  • Using Python, How to copy files in 'temporary internet files' folder in Windows

    - by pythBegin
    I am using this code to find files recursively in a folder , with size greater than 50000 bytes. def listall(parent): lis=[] for root, dirs, files in os.walk(parent): for name in files: if os.path.getsize(os.path.join(root,name))>500000: lis.append(os.path.join(root,name)) return lis This is working fine. But when I used this on 'temporary internet files' folder in windows, am getting this error. Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> listall(a) File "<pyshell#2>", line 5, in listall if os.path.getsize(os.path.join(root,name))>500000: File "C:\Python26\lib\genericpath.py", line 49, in getsize return os.stat(filename).st_size WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Documents and Settings\\khedarnatha\\Local Settings\\Temporary Internet Files\\Content.IE5\\EDS8C2V7\\??????+1[1].jpg' I think this is because windows gives names with special characters in this specific folder... Please help to sort out this issue.

    Read the article

  • Alternative ways of setting environment variables through PuTTy?

    - by A T
    Connecting via SSH to a SPARC server but am unable to set environmental variables through the usual PuTTy way, which gives me this error: Server refused to set environment variables I also noticed that export and set techniques don't work from the prompt; the only which works is: $ PATH=/everyones_passwords_in_plain_text/:$PATH How do I automatically run that line on every connect to this server?

    Read the article

  • Linux / UNIX / OS X Binary Directory Structure

    - by Kevin Sylvestre
    Will Linux / UNIX / OS X binaries be stored in the same directories across different platform or distributions? I'm asking because I need to have access to uuidgen (stored in /usr/bin/uuidgen on my development computer) and noticed that my local Apache server does not include /usr/bin in the PATH. I know I could add /usr/bin to the path, but I want to make sure the software can be re-deployed on a number of different systems with ease. Thanks!

    Read the article

  • Remap paths used in Windows Movie Maker projects

    - by Fuxi
    I need to rebuild path structures for old Windows Movie Maker projects under a new Windows 7 install. The problem is that those projects refer to files of a certain file path that can't be rebuiltd in Windows 7 ("Documents and Settings" is blocked). Is there a way to batch convert those projects with updated paths? Some file specs of the WMM file format (for coding a little utility) would be helpful as well.

    Read the article

  • Implement eBay Finding/Feedback API [Java]

    - by zengr
    Hi, I have just started with the ebay Finding API and Feedback API and I need to deploy a basic API implementation on GAE/J. The problems are: How do we start with the local dev environment of the ebay SDK? There is no Java tutorial for the Finding API and feedback. GAE/J + ebay APIs won't cause any complexity right? I am looking for head start in the right direction,I am using Eclipse + GAE plugin.

    Read the article

  • Finding a message in an archive in Kerio MailServer 6

    - by Karl Cassar
    I need to locate some emails from the archive. Kerio is set to archive emails on a daily basis, keeping the last 2 months. From the mail log, I found entries like: [09/Oct/2012 18:02:20] Recv: Queue-ID: 5074589c-00004ddb, Service: SMTP, From: <info@XXXXXXXXXXXX>, To: <Suzette@xxxxxxxxxxx>, Size: 699, Sender-Host: mail.XXXXXXXXXXX, User: automailer@XXXXXXXXXXXXXXX I need to locate this specific email. The archive folder has a lot of ZIP files like: 2012-Oct-06 2012-Oct-07 2012-Oct-08 2012-Oct-09 ... I assumed this would be in the 2012-Oct-09 zip file. I extracted it, and the zip file contains a lot of emails in the /#msgs/ folder, named: 0000000a.eml 0000000b.eml 0000000c.eml ... I did a search for the last part of the Queue-ID, 00004ddb, but it returned no results. I tried other random searches for other emails in the mail log, but I couldn't find a single one. Any idea how one goes about finding such an email in the archive?

    Read the article

  • Finding the file that is on a bad block on a HFS+ volume (debugfs for HFS+)

    - by Blair Zajac
    I have a drive in our iMac that has bad blocks, as booting from an Ubuntu 11.10 live CD and using ddrescue -f /dev/sda /dev/null finds them. I'd like to get the drive to remap them by writing to the blocks, say using hdparm --write-sector, but I don't want to do this without knowing what's in those blocks and finding the file that owns them, so I can restore the file from another source. I found fileXray but don't feel like spending $79 to map a block to a file and hfsdebug has been taken offline. Are there suggestions on a tool or technique to use? I looked at all the Ubuntu HFS+ packages to see if they could provide this info but nothing jumped out at me. BTW, I used Disk Utility to erase the empty space, but it didn't get any of the bad blocks to be remapped, according to smartctl -A.

    Read the article

  • Finding a private (NAT) host's IP using historic destination data

    - by l0c0b0x
    The issue: An unknown private (NAT) client is infected with malware and it's trying to access a Bot server at random times/dates. How we know about this: We receive bot traffic notices/alerts from REN-ISAC. Unfortunately, we don't receive those until the next day after it has happened. What they provide to us is: The source address (of the firewall) The destination addresses (it varies, but they're going to network subnet allocated to a German ISP) The source port (which varies--dynamic ports). Question: What would be the best approach to finding this internal host (historically) with a Cisco ASA as firewall? I'm guessing blocking anything to the destination address(es), and logging that type of traffic/access might allow me to find the source host, but I'm not sure which tool/command would be the most useful. I've seen Netflow thrown into a few responses when it comes to logging, but I'm confused with it's association of Logging, NAL, and nBAR, and how they relate to Netflow.

    Read the article

  • Anyone has implemented SMA* search algorithm?

    - by Endy
    I find the algorithm description in AIMA (Artificial Intelligence: A Modern Approach) is not correct at all. What does 'necessary' mean? What is the memory limit? The queue size or processed nodes? What if the current node has no children at all? I am wondering if this algorithm itself is correct or not. Because I searched the Internet and nobody has implemented it yet. Thanks.

    Read the article

  • Django + Apache wsgi = paths problem

    - by Shamanu4
    Hello. I have this view which generates interface language options menu def lang_menu(request,language): lang_choices = [] import os.path for lang in settings.LANGUAGES: if os.path.isfile("gui/%s.py" % lang) or os.path.isfile("gui/%s.pyc" % lang): langimport = "from gui.%s import menu" % lang try: exec(langimport) except ImportError: lang_choices.append({'error':'invalid language file'}) else: lang_choices.append(menu) else: lang_choices.append({'error':'lang file not found'}) t = loader.get_template('gui/blocks/lang_menu_options.html') data = '' for lang in lang_choices: if not 'error' in lang: data = "%s\n%s" % (data,t.render(Context(lang))) if not data: data = "Error! No languages configured or incorrect language files!" return Context({'content':data}) When I'am using development server (python manage.py runserver ...) it works fine. But when I ported my app to apache wsgi server I've got error "No languages configured or incorrect language files!" Here is my Apache config <VirtualHost *:9999> WSGIScriptAlias / "/usr/local/etc/django/terminal/django.wsgi" <Directory "/usr/local/etc/django/terminal"> Options +ExecCGI Allow From All </Directory> Alias /media/ "/usr/local/lib/python2.5/site-packages/django/contrib/admin/media/" <Location /media/> SetHandler None </Location> <Directory "/usr/local/lib/python2.5/site-packages/django/contrib/admin/media/> Allow from all </Directory> Alias /static/ "/usr/local/etc/django/terminal/media/" <Location /static/> SetHandler None </Location> ServerName ******* ServerAlias ******* ErrorLog /var/log/django.error.log TransferLog /var/log/django.access.log </VirtualHost> django.wsgi: import os, sys sys.path.append('/usr/local/etc/django') sys.path.append('/usr/local/etc/django/terminal') os.environ['DJANGO_SETTINGS_MODULE'] = 'terminal.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() It's look like as problem with path configuration but I'm stuck here ...

    Read the article

  • Need simple advice for graph solving problem

    - by sap
    Hi there, a collegue of mine proposed to me an exercise from an online judge website, which is basically a graph solving problem of an evacuation plan on a small town. i dont need the answer (nor do i want it) i just need an advice on which is the best approach to solving it since im kinda new to these kind of problems. the problem consists of town buildings with workers and fallout shelters in case of a nuclear attack. i have to build an algorithm that will assign the workers of each building to one or more fallout shelters but in a way that some shelters wont became too overcrowded while others remain almost empty (else i would just make the workers go to the nearest one). the problem is this: http://acm.timus.ru/problem.aspx?space=1&num=1237 in case its offline heres the google cached version of it: http://webcache.googleusercontent.com/search?q=cache:t2EPCzezs7AJ:acm.timus.ru/problem.aspx%3Fspace%3D1%26num%3D1237+vladimir+kotov+evacuation+problem&cd=1&hl=pt-PT&ct=clnk&gl=pt what i've done so far is for each building get the nearest shelter and move the number of workers from that build equal to the shelter capacity. then move to the next building. but sometimes the number of workers is greater than the shelter capacity, in that case after i iterate through every building, ill just iterate then again apllying the same algorithm until every building has 0 workers in it, problem is this is hardly the best way to solve it. any tip is welcome, please dont feel like im asking for the answer, i just want an advice in the right direction of solving it. thanks in advance.

    Read the article

  • Checking if an int is prime more efficiently

    - by SipSop
    I recently was part of a small java programming competition at my school. My partner and I have just finished our first pure oop class and most of the questions were out of our league so we settled on this one (and I am paraphrasing somewhat): "given an input integer n return the next int that is prime and its reverse is also prime for example if n = 18 your program should print 31" because 31 and 13 are both prime. Your .class file would then have a test case of all the possible numbers from 1-2,000,000,000 passed to it and it had to return the correct answer within 10 seconds to be considered valid. We found a solution but with larger test cases it would take longer than 10 seconds. I am fairly certain there is a way to move the range of looping from n,..2,000,000,000 down as the likely hood of needing to loop that far when n is a low number is small, but either way we broke the loop when a number is prime under both conditions is found. At first we were looping from 2,..n no matter how large it was then i remembered the rule about only looping to the square root of n. Any suggestions on how to make my program more efficient? I have had no classes dealing with complexity analysis of algorithms. Here is our attempt. public class P3 { public static void main(String[] args){ long loop = 2000000000; long n = Integer.parseInt(args[0]); for(long i = n; i<loop; i++) { String s = i +""; String r = ""; for(int j = s.length()-1; j>=0; j--) r = r + s.charAt(j); if(prime(i) && prime(Long.parseLong(r))) { System.out.println(i); break; } } System.out.println("#"); } public static boolean prime(long p){ for(int i = 2; i<(int)Math.sqrt(p); i++) { if(p%i==0) return false; } return true; } } ps sorry if i did the formatting for code wrong this is my first time posting here. Also the output had to have a '#' after each line thats what the line after the loop is about Thanks for any help you guys offer!!!

    Read the article

  • gnome-terminal -- get path by draging files into terminal

    - by user62046
    I use colinux, see http://www.colinux.org/ ; I used the ubuntu image (ubuntu without desktop environment) and install the packages gdm ?x-window-system-core and gnome-core and update to 10.04. the default user ( which is the only one user) is root. When I try to drag a file into gnome-terminal, I don't get the path of this file, instead the image of this file just came back to the original place. Anyone knows why this happened?

    Read the article

  • gnome-terminal — get path by draging files into terminal

    - by user62046
    I use colinux, see http://www.colinux.org/ ; I used the ubuntu image (ubuntu without desktop environment) and install the packages gdm ?x-window-system-core and gnome-core and update to 10.04. the default user ( which is the only one user) is root. When I try to drag a file into gnome-terminal, I don't get the path of this file, instead the image of this file just came back to the original place. Anyone knows why this happened?

    Read the article

  • "Copy path to clipboard" on Windows 64 bit

    - by Nir
    I had an excellent shell extension that enabled me to right click a file and copy its full path to the clipboard. It doesn't work on windows 64 bit. Does anyone have a utility that works under Windows server 2008 64 bit? Thanks a bunch!

    Read the article

  • How can I get HAProxy backends to include a path

    - by Michael Neale
    When using HAProxy for virtual hosting, I can see how to use the Host from the header at the front end to decide what backend to route to. However, is it possible to make the back end be a URL which includes a path (not unlike what you would do with apache or nginx when setting up virtual hosting). http://www.techrawr.com/tag/haproxy/ - shows most of it. But what if the back ends were on the one server but with backend1 and backend2 as the servers?

    Read the article

  • Mapping Wordpress.com to subdomain or path

    - by Matt Huggins
    According to this and this, Wordpress.com blogs can be mapped to a custom domain (e.g.: example.com). However, I don't see anything that says it can be mapped to a subdomain (e.g.: blog.example.com) or a path within a domain (e.g.: example.com/blog). Does anyone have any experience with this to definitively say whether this is possible?

    Read the article

  • tcsh : path of sourced file

    - by Charles
    I am sourcing a file under tcsh. This file could be anywhere on the filesystem. How can I retrieve the path of my sourced file ? $0 won't work : I don't execute the file, I source it. Many thanks !

    Read the article

  • Changing Physical Path gives blank homepage

    - by Julie
    I have two websites ASP Classic - www.company.com and www.companytesting.com. At this time of year, company.com is pointed to a folder called website2012 and companytesting.com is pointing to a folder called website2013. The contents of those two folders are almost identical, just minor changes for our season change (which I was supposed to do today - lol). Up until a couple of weeks ago, I was running Windows Server 2003. To update the "live" website, I'd make a copy of the test site folder, and rename it website2013R1, and point the test site there, then point the live site at website2012. We now have Windows Server 2008 R2 64. (I had someone migrate the websites to the new server for me.) The companytesting.com site, when I pointed it to website2013R1, worked fine. The company.com site, when I pointed it to website2013 (which worked just before, for the companytesting.com site) gives an empty page. (i.e. view source = nothing there.) There is nothing in the failed request log when this happens. I can use the Explore button/link (upper right) in IIS7.5 and see all of the files there. If I use the browse button (either in general or on the index.asp page) I get the blank page again. One weirdness about how these are set up is that companytesting.com uses a login (which I think is windows authentication - it's simply a single username and password for staff, and to keep the GoogleBots out of it). Obviously, company.com does not. But redirecting the to website2013r1 kept the login in place. (So I'm not absolutely clear whether that's attached to the folder or to the site. Hitting the company.com site after changing the path did not yield a password request.) The permissions on the folders all seem to be the same, but obviously, I'm missing something. Why isn't changing the physical path working? As is probably obvious, I'm not knowledgeable about servers. I did OK in 2003, but since it's not my main task and I'm buried right now, I have barely looked at 2008. So I may have really stupid questions when you ask me to check something.

    Read the article

  • Explorer: programmatically select file/directory with space in the path

    - by Mike L.
    When I try to select a file or directory which has a space in its path in the Windows Explorer, it selects a completely different directory: explorer.exe "/select,C:\Program Files\foobar" I've tried it from Java with Runtime.getRuntime().exec(new String[] { "explorer.exe", "/select," + filePath }); and with the above command line. In both cases, the same result. What can I do to solve the problem?

    Read the article

  • Running an executable from PowerShell does not work with spaces in the path

    - by John Hartley
    From the PowerShell prompt: \Windows\system32\mspaint.exe will run Paint. So will Invoke-Expression -command "\Windows\system32\mspaint.exe" but if there is a space in the path PowerShell spits the dummy e.g. Invoke-Expression -command "\install\sub directory\test.bat" Which complains: The term '\install\sub' is not recognized as the name of a cmdlet, function, script file, or operable program. What am I missing?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >