Search Results

Search found 6242 results on 250 pages for 'named pipe'.

Page 109/250 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • Sorting list of URLs by length in Jython

    - by Eef
    Hi, I am writing a Jython script to sort a list of URLs. I have a list that looks like this: http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 The pipe and the comma separates the path from the amount of files that are under that path. Is it possible some how use Jython to order the URLs by length, so it would end up look like the below list: http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 Hope you guys get what I mean, any help would be appreciated. Cheers

    Read the article

  • Problem with SqlServer 2005 when openning connections

    - by Jose Obregon
    I have a Winforms application and I use EntLib to connect to a SQL Server 2005 DB. The application is working ok, but somethings, and lately more often, we have started receiving this error from the db when openning the connection: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233) The problem is intermittent. The user works nice for a couple of hours and then suddenly the exception is thrown. Sometimes it happens when we run a small process that loads a file and then inserts the data to the db. Please if anybody has any thought on this help me

    Read the article

  • shell script redirect output

    - by Andy
    I have a shell script to monitor process due to preventing the process closed. If the process is closed, that script will restart it. BTW, when the system starts, the crontab will run the script automatically. How can I get the output of the process which started by the shell script? #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH while : do if [ -z "$(ps -ef | grep -v grep | grep 225.0.6.4)" ]; then date +"%m-%d-%y %T" >> /home/andy/log/stream.log echo "225.0.6.4 - 103 not worked and restart process" >> /home/andy/log/stream.log echo "225.0.6.4 - 103 not worked and restart process" /usr/bin/tzap -a 1 -c /home/andy/channels.conf -o - -r -p "D" | /home/andy/ffmpeg -f mpegts -i pipe:0 -c:v libx264 -preset medium -crf 23 -bufsize 3000K -minrate 1200k -maxrate 1200k -pix_fmt yuv420p -g 50 -s 1024x768 -acodec libmp3lame -b:a 128k -ac 2 -ar 44100 -f mpegts udp://225.0.6.4:50000 & fi sleep 1 done

    Read the article

  • Problem with SqlServer 2005 when opening connections

    - by Jose Obregon
    I have a Winforms application and I use EntLib to connect to a SQL Server 2005 DB. The application is working ok, but sometimes, and lately more often, we have started receiving this error from the db when opening the connection: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233) The problem is intermittent. The user works well for a couple of hours and then suddenly the exception is thrown. Sometimes it happens when we run a small process that loads a file and then inserts the data to the db.

    Read the article

  • Running Awk command on a cluster

    - by alex
    How do you execute a Unix shell command (awk script, a pipe etc) on a cluster in parallel (step 1) and collect the results back to a central node (step 2) Hadoop seems to be a huge overkill with its 600k LOC and its performance is terrible (takes minutes just to initialize the job) i don't need shared memory, or - something like MPI/openMP as i dont need to synchronize or share anything, don't need a distributed VM or anything as complex Google's SawZall seems to work only with Google proprietary MapReduce API some distributed shell packages i found failed to compile, but there must be a simple way to run a data-centric batch job on a cluster, something as close as possible to native OS, may be using unix RPC calls i liked rsync simplicity but it seem to update remote notes sequentially, and you cant use it for executing scripts as afar as i know switching to Plan 9 or some other network oriented OS looks like another overkill i'm looking for a simple, distributed way to run awk scripts or similar - as close as possible to data with a minimal initialization overhead, in a nothing-shared, nothing-synchronized fashion Thanks Alex

    Read the article

  • Word mergefield wildcard not correctly matching

    - by aZn137
    Hello, Below is my mergefield code: { IF { MERGEFIELD Subs_State } = "GA" "blah blah" "{ IF { MERGEFIELD CEOrgStates } = "GA" "blah blah" ""} "} I'm pulling records from a MS Access db. My goal is to check whether a record has Subs_State field matching "GA", or the CEOrgStates has the word "GA" (some records have stuff like "|FL|CA|GA|CT|KY|" (no quotes)). When I merged the docs, Word doesnt seem to be able to match with the wildcards: If I use and compare "*GA" (fields ending with GA), it works; however, the double wildcards "*GA*" dont seem to work at all. Here are the things I’ve tried: Have data in lowercase, then compare with lowercase Have data in lowercase, convert to and then compare with uppercase Do the opposite of the above 2 with uppercase data Use “*GA*” and “*ga*” (no pipe) Use different delimiters Nothing seems to work with the double wildcard matching. What am I doing wrong? Thanks!

    Read the article

  • SQL Server Compact 'Data Directory' macro in Connection String - more info needed

    - by codeulike
    So, as described on this msdn page, when you define a Connection String for SQL Server Compact 3.5, you can use the "Data Directory" macro, like this: quote from this msdn page: Data Directory Support SQL Server Compact 3.5 now supports the Data Directory macro. This means that if you add the string |DataDirectory| (enclosed in pipe symbols) to a file path, it will resolve to the path of the database. For example, consider the connection string: "Data Source= c:\program files\MyApp\Mydb.sdf" When using Data Directory, you can instead use the following connection string: "Data Source = |DataDirectory|\Mydb.sdf" For more information, see How to: Deploy a SQL Server Compact 3.5 Database with an Application. However, the 'for more information' link on msdn doesn't actually give any more information. So my question is: How does the |Data Directory| macro translate at run time? For WinForm apps, it seems to just give the location of the executable. Or is it more complicated than that?

    Read the article

  • Install TurboGears on windows xp

    - by coder
    I've been trying to get TurboGears installed on Windows by following this site. I've installed virtualenv but when I execute the command "virtualenv --no-site-packages testproj", I get the following message: New python executable in testproj\Scripts\python.exe Traceback (most recent call last): File "C:\Python26\Scripts\virtualenv-script.py", line 8, in load_entry_point('virtualenv==1.4.5', 'console_scripts', 'virtualenv')() File "C:\Python26\lib\site-packages\virtualenv-1.4.5-py2.6.egg\virtualenv.py", line 529, in main use_distribute=options.use_distribute) File "C:\Python26\lib\site-packages\virtualenv-1.4.5-py2.6.egg\virtualenv.py", line 612, in create_environment site_packages=site_packages, clear=clear)) File "C:\Python26\lib\site-packages\virtualenv-1.4.5-py2.6.egg\virtualenv.py", line 837, in install_python stdout=subprocess.PIPE) File "C:\Python26\lib\subprocess.py", line 621, in __init__ errread, errwrite) File "C:\Python26\lib\subprocess.py", line 830, in _execute_child startupinfo) WindowsError: [Error 14001] This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem Can someone help me debug this ? If any one knows a better tutorial to install turbogears, please let me know.

    Read the article

  • Creating a "less"-like console pager interface for pysqlite3 database

    - by Eric
    I would like to add some interactive capability to a python CLI application I've writen that stores data in a SQLite3 database. Currently, my app reads-in a certain type of file, parses and analyzes, puts the analysis data into the db, and spits the formatted records to stdout (which I generally pipe to a file). There are on-the-order-of a million records in this file. Ideally, I would like to eliminate that text file situation altogether and just loop after that "parse and analyze" part, displaying a screen's worth of records, and allowing the user to page through them and enter some commands that will edit the records. The backend part I know how to do. Can anyone suggest a good starting point for creating that pager frontend either directly in the console (like the pager "less"), through ncurses, or some other system?

    Read the article

  • Is writing to a socket an arbitrary limitation of the sendfile() syscall?

    - by Sufian
    Prelude sendfile() is an extremely useful syscall for two reasons: First, it's less code than a read()/write() (or recv()/send() if you prefer that jive) loop. Second, it's faster (less syscalls, implementation may copy between devices without buffer, etc...) than the aforementioned methods. Less code. More efficient. Awesome. In UNIX, everything is (mostly) a file. This is the ugly territory from the collision of platonic theory and real-world practice. I understand that sockets are fundamentally different than files residing on some device. I haven't dug through the sources of Linux/*BSD/Darwin/whatever OS implements sendfile() to know why this specific syscall is restricted to writing to sockets (specifically, streaming sockets). I just want to know... Question What is limiting sendfile() from allowing the destination file descriptor to be something besides a socket (like a disk file, or a pipe)?

    Read the article

  • vim command to restructure/force text to 80 columns

    - by wickedchicken
    I know there are ways to automatically set the width of text in vim using set textwidth (like http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns). What I am looking for is something similar to = (the indent line command) but to wrap to 80. The use case is sometimes you edit text with textwidth and after joining lines or deleting/adding text it comes out poorly wrapped. Ideally, this command would completely reorganize the lines I select and chop off long lines while adding to short ones. An example: long line is long! short After running the command (assuming the wrap was 13 cols): long line is long! short If this isn't possible with a true vim command, perhaps there is a command-line program which does this that I can pipe the input to?

    Read the article

  • JQuery Autocomplete only suggesting first row

    - by Chris McCall
    I'm doing research using JQuery's Autocomplete plugin and Google Maps' API. What I have so far is located here. I'm using Asp.net MVC to generate the list of potential address matches (limited to US addresses only) and presenting them as a pipe-delimeted list to Autocomplete, which is supposed to be .spliting them up and suggesting them to the user. The problem I'm having (besides a stubborn IE-only javascript error, which I'll break into another question), is that only the first result is suggested. This page clearly shows two results, yet typing "3118" into the textbox produces only the Galax Dr result. How can I get Automplete to produce both results?

    Read the article

  • Launching Vim via Lua

    - by Keith Pimmel
    I'm writing a simple little Lua commandline app that will build a static website. I'm storing my fragments in a sqlite database. Retrieving the data from the db is straightforward as is saving it; my question comes from editing the data. Is there an elegant way to pipe the data from Lua to vim? Can vim edit a memory buffer and return it? I was planning on launching the editor via os.execute('vim') but only after grabbing a temporary file handle and dumping the database output into that. I would like to have to avoid touching the filesystem that way but that is my contingency plan.

    Read the article

  • (fluxus) learning curve

    - by Inaimathi
    I'm trying to have some fun with fluxus, but its manual and online docs all seem to assume that the reader is already an expert network programmer who's never heard of Scheme before. Consequently, you get passages that try to explain the very basics of prefix notation, but assume that you know how to pipe sound-card data into the program, or setup and connect to an OSC process. Is there any tutorial out there that goes the opposite way? IE, assumes that you already have a handle on the Lisp/Scheme thing, but need some pointers before you can properly set up sound sources or an OSC server? Barring that, does anyone know how to get (for example) the system microphone to connect to (fluxus), or how to get it to play a sound file from disk?

    Read the article

  • segfault during fclose()

    - by Hristo
    fclose() is causing a segfault. I have : char buffer[L_tmpnam]; char *pipeName = tmpnam(buffer); FILE *pipeFD = fopen(pipeName, "w"); // open for writing ... ... ... fclose(pipeFD); I don't do any file related stuff in the ... yet so that doesn't affect it. However, my MAIN process communicates with another process through shared memory where pipeName is stored; the other process fopen's this pipe for reading to communicated with MAIN. Any ideas why this is causing a segfault? Thanks, Hristo

    Read the article

  • Can a http server detect that a client has cancelled their request?

    - by Nick Retallack
    My web app must process and serve a lot of data to display certain pages. Sometimes, the user closes or refreshes a page while the server is still busy processing it. This means the server will continue to process data for several minutes only to send it to a client who is no longer listening. Is it possible to detect that the connection has been broken, and react to it? In this particular project, we're using Django and NginX, or Apache. I assumed this is possible because the Django development server appears to react to cancelled requests by printing Broken Pipe exceptions. I'd love to have it raise an exception that my application code could catch. Alternatively, I could register an unload event handler on the page in question, have it do a synchronous XHR requesting that the previous request from this user be cancelled, and do some kind of inter-process communication to make it so. Perhaps if the slower data processing were handed to another process that I could more easily identify and kill, without killing the responding process...

    Read the article

  • Using Unix Process Controll Methods in Ruby

    - by John F. Miller
    Ryan Tomayko touched off quite a fire storm with this post about using Unix process control commands. We should be doing more of this. A lot more of this. I'm talking about fork(2), execve(2), pipe(2), socketpair(2), select(2), kill(2), sigaction(2), and so on and so forth. These are our friends. They want so badly just to help us. I have a bit of code (a delayed_job clone for DataMapper that I think would fit right in with this, but I'm not clear on how to take advantage of the listed commands. Any Ideas on how to improve this code? def start say "*** Starting job worker #{@name}" t = Thread.new do loop do delay = Update.work_off(self) break if $exit sleep delay break if $exit end clear_locks end trap('TERM') { terminate_with t } trap('INT') { terminate_with t } trap('USR1') do say "Wakeup Signal Caught" t.run end end

    Read the article

  • mod_wsgi | linux installation error

    - by MMRUser
    I'm getting the following error when I try to install mod_wsgi ./configure checking for apxs2... no checking for apxs... /usr/sbin/apxs checking Apache version... 2.2.3 configure: creating ./config.status config.status: creating Makefile make /usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm /apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo sh: /apr-1/build/libtool: No such file or directory apxs:Error: Command failed with rc=8323072 . make: *** [mod_wsgi.la] Error 1 libtool is installed on my system.. mod_wsgi 3.2 *Apache 2.2* *Python 2.6*

    Read the article

  • Parallelism in Python

    - by fmark
    What are the options for achieving parallelism in Python? I want to perform a bunch of CPU bound calculations over some very large rasters, and would like to parallelise them. Coming from a C background, I am familiar with three approaches to parallelism: Message passing processes, possibly distributed across a cluster, e.g. MPI. Explicit shared memory parallelism, either using pthreads or fork(), pipe(), et. al Implicit shared memory parallelism, using OpenMP. Deciding on an approach to use is an exercise in trade-offs. In Python, what approaches are available and what are their characteristics? Is there a clusterable MPI clone? What are the preferred ways of achieving shared memory parallelism? I have heard reference to problems with the GIL, as well as references to tasklets. In short, what do I need to know about the different parallelization strategies in Python before choosing between them?

    Read the article

  • Ruby Rack: startup and teardown operations (Tokyo Cabinet connection)

    - by clint.tseng
    I have built a pretty simple REST service in Sinatra, on Rack. It's backed by 3 Tokyo Cabinet/Table datastores, which have connections that need to be opened and closed. I have two model classes written in straight Ruby that currently simply connect, get or put what they need, and then disconnect. Obviously, this isn't going to work long-term. I also have some Rack middleware like Warden that rely on these model classes. What's the best way to manage opening and closing the connections? Rack doesn't provide startup/shutdown hooks as I'm aware. I thought about inserting a piece of middleware that provides reference to the TC/TT object in env, but then I'd have to pipe that through Sinatra to the models, which doesn't seem efficient either; and that would only get be a per-request connection to TC. I'd imagine that per-server-instance-lifecycle would be a more appropriate lifespan. Thanks!

    Read the article

  • MySQL Export with Column Heading

    - by st4nt0n
    Hello - I am very, very, new to mySQL. I've got experience in general technical terms, but not with the syntax or concepts of mySQL. I have been tasked with exporting a table from MySQL into a pipe delimited .txt or .xls that I can use to add 7500 more records to manually, then import back into the table. I tried to use INTO OUTFILE, but I don't get column headings, which I need for reference to merge the new records. Is there a good resource that can explain this to a complete novice? I would usually go down to my bookstore and start learning, but I'm on a bit of a time crunch. Thanks all!

    Read the article

  • How do I Send Email from the Command Line?

    - by Joseph Pecoraro
    I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this. I'm looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows. I want to be able to whip up an email right on the command line or have the flexibility to pipe the message into the command line program. How would you go about doing this? If you have small scripts that would be fine as well. Thanks in advance.

    Read the article

  • sending control+c (SIGINT) to NSPIPE in objective-c

    - by Ron
    Hello, I am trying to terminate an openvpn task, spawned via NSTask. My question: Should I send ctrl+c (SIGINT) to the input NSPipe for my NSTask? inputPipe = [NSPipe pipe]; taskInput = [inputPipe fileHandleForWriting]; NSString dataString = @"\cC"; [taskInput writeData:[dataString dataUsingEncoding: [NSString defaultCStringEncoding]]]; Alternatively, I was thinking about using kill( pid, SIGINT ); but it would be much more complicated since the process ID has to be determined via a detour ([task processIdentifier] does not help here) - the original NSTask calls: /bin/bash -c sudo -S | mypassword .... That's not nice, I know but it is only called once and the sudo password has been entered in that case already. thanks for any suggestions/opinions/etc. Ron

    Read the article

  • Python subprocess.Popen

    - by Albert
    I have that code: #!/usr/bin/python -u localport = 9876 import sys, re, os from subprocess import * tun = Popen(["./newtunnel", "22", str(localport)], stdout=PIPE, stderr=STDOUT) print "** Started tunnel, waiting to be ready ..." for l in tun.stdout: sys.stdout.write(l) if re.search("Waiting for connection", l): print "** Ready for SSH !" break The "./newtunnel" will not exit, it will constantly output more and more data to stdout. However, that code will not give any output and just keeps waiting in the tun.stdout. When I kill the newtunnel process externally, it flushes all the data to tun.stdout. So it seems that I can't get any data from the tun.stdout while it is still running. Why is that? How can I get the information? Note that the default bufsize for Popen is 0 (unbuffered). I can also specify bufsize=0 but that doesn't change anything.

    Read the article

  • read subprocess stdout line by line

    - by Caspin
    My python script uses subprocess to call a linux utility that is very noisy. I want to store all of the output to a log file, but only show some of it to the user. I thought the following would work, but the output does show up in my application until the utility has produced a significant amount of output. #fake_utility.py, just generates lots of output over time import time i = 0 while True: print hex(i)*512 i += 1 time.sleep(0.5) #filters output import subprocess proc = subprocess.Popen(['python','fake_utility.py'],stdout.subprocess.PIPE) for line in proc.stdout: #the real code does filtering here print "test:", line.rstrip() The behavior I really want is for the filter script to print each line as it is received from the subprocess. Sorta like what tee does but with python code. What am I missing? Is this even possible?

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >