Search Results

Search found 403 results on 17 pages for 'pipes'.

Page 12/17 | < Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How to create named pipe (mkfifo) in Android?

    - by Ignas Limanauskas
    I am having trouble in creating named pipe in Android and the example below illustrates my dilemma: res = mkfifo("/sdcard/fifo9000", S_IRWXO); if (res != 0) { LOG("Error while creating a pipe (return:%d, errno:%d)", res, errno); } The code always prints: Error while creating a pipe (return:-1, errno:1) I can't figure out exactly why this fails. The application has android.permission.WRITE_EXTERNAL_STORAGE permissions. I can create normal files with exactly the same name in the same location, but pipe creation fails. The pipe in question should be accessible from multiple applications. I suspect that noone can create pipes in /sdcard. Where would it be the best location to do so? What mode mast should I set (2nd parameter)? Does application need any extra permissions?

    Read the article

  • Behavior of a pipe after a fork()

    - by Steve Melvin
    When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that after a fork that the parent can close() the read end of a pipe and it doesn't close the read end for the child. When a process forks, does its file descriptors get retained? What I mean by this is that before the fork the pipe read file descriptor had a retain count of 1, and after the fork 2. When the parent closed its read side the fd went to 1 and is kept open for the child. Is this essentially what is happening? Does this behavior also occur for regular file descriptors?

    Read the article

  • trying to connect mysql with vb.net

    - by user225269
    I've found this at connection strings.com http://connectionstrings.com/mysql Do I need to download connector-net from this site: http://dev.mysql.com/downloads/connector/net/ I recycled the code that I used in connecting vb.net with ms sql: Imports system.data.sqlclient idnum = TextBox1.Text lname = TextBox2.Text fname = TextBox3.Text skul = TextBox4.Text Using sqlcon As New SqlConnection("Server=localhost;Port=3306;Database=testing;Uid=root;Pwd=nitoryolai123$%^;") sqlcon.Open() Dim sqlcom As New SqlCommand() sqlcom.Connection = sqlcon sqlcom.CommandText = "INSERT INTO [student](ID, LASTNAME, FIRSTNAME, SCHOOL) VALUES (@ParameterID, @ParameterLastName, @ParameterFirstName, @ParameterSchool)" sqlcom.Parameters.AddWithValue("@ParameterID", TextBox1.Text) sqlcom.Parameters.AddWithValue("@ParameterLastName", TextBox2.Text) sqlcom.Parameters.AddWithValue("@ParameterFirstName", TextBox3.Text) sqlcom.Parameters.AddWithValue("@ParameterSchool", TextBox4.Text) sqlcom.ExecuteNonQuery() End Using But I get this error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Please help, what solutions would you recommend to this problem?

    Read the article

  • Piping SoX in Python - subprocess alternative?

    - by Cochise Ruhulessin
    I use SoX in an application. The application uses it to apply various operations on audiofiles, such as trimming. This works fine: from subprocess import Popen, PIPE kwargs = {'stdin': PIPE, 'stdout': PIPE, 'stderr': PIPE} pipe = Popen(['sox','-t','mp3','-', 'test.mp3','trim','0','15'], **kwargs) output, errors = pipe.communicate(input=open('test.mp3','rb').read()) if errors: raise RuntimeError(errors) This will cause problems on large files hower, since read() loads the complete file to memory; which is slow and may cause the pipes' buffer to overflow. A workaround exists: from subprocess import Popen, PIPE import tempfile import uuid import shutil import os kwargs = {'stdin': PIPE, 'stdout': PIPE, 'stderr': PIPE} tmp = os.path.join(tempfile.gettempdir(), uuid.uuid1().hex + '.mp3') pipe = Popen(['sox','test.mp3', tmp,'trim','0','15'], **kwargs) output, errors = pipe.communicate() if errors: raise RuntimeError(errors) shutil.copy2(tmp, 'test.mp3') os.remove(tmp) So the question stands as follows: Are there any alternatives to this approach, aside from writing a Python extension to the Sox C API?

    Read the article

  • Trying to recognize _NSFaultingMutableSet as member of NSSet

    - by Will
    I'm trying to recognize the result of a generic query to a managed object as an NSSet. Currently the class returned is a member of _NSFaultingMutableSet, which is clearly related, but fails the isMemberOf:[NSSet class] and isKindOf:[NSSet class] calls. Given that Cocoa doesn't do a direct implementation of NSSet, it's not surprising that I've got some air in the pipes, but I'm wondering if I'm messing something obvious up or this requires a higher grade of kung-fu than I possess. Code follows: SEL selector = NSSelectorFromString(someString); if(![self respondsToSelector:selector]){ NSLog(@"Error processing item"); return; } id items = [self performSelector:selector]; Class itemsClass = [items class]; if ( [itemsClass isKindOfClass:[NSSet class]]) { // do something }

    Read the article

  • READING stderr from within Awk

    - by Dave
    I want to keep SSH debug info separate (and logged) from other input. However, if I simply redirect stderr to a log file, I risk combining output from SSH and output from the remote process on the host machine (that might send something to stderr): $ ssh -v somemachine 2 file.log So, I want to filter out only those lines that match "debug1": $ ssh -v somemachine | awk '/debug1/ {print "file.log"; next} {print}' Good so far, BUT ssh's debug output goes to stderr. So... $ ssh -v somemachine 2& | awk '/debug1/ {print "file.log"; next} {print}' Foiled again! I don't want to mix stdout and stderr. BAD! What does a kid like me do? I was about to go the route of named pipes or some such wildeness, but really, all I need to know is how to get awk to match patterns from stderr ONLY.

    Read the article

  • 3D Screensaver interfering with WPF application (Windows XP)

    - by Andrew Keith
    I have a fairly large application that uses WPF for its user interface. I recently found an unusual defect regarding 3D screensavers. The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. Other screensavers are fine. My application only encounters this problem on Windows XP. I have some experience with DirectX. When a 3D screensavers activates, the d3d device context will be switched to exclusive mode. I reckon that WPF has trouble restoring the device context when the device switches back to cooperative mode (hence why its only affecting windows XP) Has anyone seen such a scenario occur before ? Is there a remedy for the problem ? Windows XP SP3, DirectX 9.0c, .NET 3.5

    Read the article

  • Cannot connect to sql server

    - by Tony
    Hi I cannot connect to Sql server remotely from management studio , It is corrrect User name and password, but how to enable remote connections to a sql server? what is other chances? Cannot connect to xxxx.xxxx.xxxx.xxxx =================================== A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider) thanks

    Read the article

  • MySQL import in phpmyadmin (CSV) chokes on quotes

    - by Andrew Swift
    I am trying to import a .csv file into a MySQL table via phpMyAdmin. The .csv file is separated by pipes, formated like this: data|d'ata|d'a"ta|dat"a| data|"da"ta|data|da't'a| dat'a|data|da"ta"|da'ta| The data contains quotes. I have no control over the format in which I recieve the data -- it is generated by a third party. The problem comes when there is a | followed by a double quote. I always get an "invalid field count in CSV input on line N" error. I am uploading the file from the import page, using Latin1, CSV, terminated by |, separated by ". I would like to just change the "enclosed by" character, but I keep getting "Invalid parameter for CSV import: Fields enclosed by". I have tried various characters with no success. How can I tell MySQL to accept this format in phpMyAdmin? Setting up these tables is the first step in writing a program that will use uploaded gzipped .csv files to maintain the catalog of an e-commerce site.

    Read the article

  • Aggregating and Displaying Multiple Feeds

    - by Keith
    I want to pull feeds for multiple online services (e.g. Tumblr, Google Reader, Delicious) and aggregate them into a single feed to display on my site. I know of services like YQL or Yahoo! Pipes which will combine feeds, but sometimes those services are too slow. I was wondering what the best method would be if I wanted to run this on my own server (using JavaScript or PHP)? Ideally, I would cache the results to cut down on processing.

    Read the article

  • C IPC waiting for child

    - by Gary
    So I have a program which creates a child process and executes a command (for example, ls). The parent will then use pipes to send to and get from the child. This works fine when I'm inputting commands myself from the command line. However, when the input comes from a file, it seems like the child doesn't have enough time to run and I get NULL when reading from the pipe - even though there will be information coming from it. Short of using sleep(), is there a better way to make sure the child has run before trying to read from it? Thanks a lot!

    Read the article

  • Problem with "write" function in linux

    - by Dumitru Catalin
    I am trying to write 2 server/client programs under Linux, in which they communicate through named pipes. The problem is that sometimes when I try to write from the server into a pipe that doesn't exist anymore (the client has stopped), I get a "Resource temporarily unavailable" error and the server stops completely. I understand that this is caused by using a O_NONBLOCK parameter when opening the fifo chanel, indicating the point where the program would usually wait until it could write again in the file, but is there a way to stop this behavior, and not halt the entire program if a problem occurs (shouldn't the write command return -1 ad the program continue normally)? And another strange thing is that this error only occurs when running the programs outside the ide (eclipse). If I run both programs inside eclipse, on error the write function just returns -1 and the programs continues normally.

    Read the article

  • Including the functionality of a tool within another program?

    - by darren
    Hi there I would like to write an application, for my own interest, that graphically visualizes some network concepts. Basically I would like to show the output from tools like ping, traceroute and nmap. The most obvious approach seems to be to use pipes to call out to these tools from my C program, and process the information they return. However, I would like to avoid this heavy-handed approach if possible. My question is, is it possible to somehow link against these tools, or are there APIs that can be used to gain programatic access instead? If so, is this behavior available on a tool-by-tool basis only? One reason for wanting to do this is to keep everything in a single process / address space and to avoid dependance on these external tools. For example, if I wrote an iphone application, I would not be able to spawn processes to call out to the external tools themselves. Thanks for any advice or suggestions.

    Read the article

  • I can't display my pages on ASP.NET

    - by iva123
    Hi, I'm developing a web site with asp.net on localhost, I'm beginner. I wrote a login page and it works well. However when I click a link, the server can't load the page and gives this error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Any idea?

    Read the article

  • Is there a buffer size attached to stdout?

    - by jameswelle
    I am trying to find some information on data limits related to stdout on Windows. I can't seem to find the information on MSDN. Is there a limit to how much data can be written to stdout? If so, what happens if the limit is reached? Is the data lost? If stdout is redirected (for example, by launching the process from .Net and using the ProcessStartInfo.RedirectStandardOutput property), does that have any effect on how much data can be written? As I read from the stdout stream in the calling process, does that affect the limitations? Are these limits related in any way to named pipes?

    Read the article

  • Fix internal links in JS

    - by FB55
    I just created a script which extracts the article out of a webpage via server-side JS. (If your interested: it's used for http://pipes.yahoo.com/fb55/expandr .) I just got a little problem with internal links. Some pages include links like: /subfolder/subpage.html What I would need to do is fixing them and setting there root, like this: protocol://secondlevel.firstlevel/subfolder/subpage.html I'm using E4X for processing the page. I don't want to show my current creepy try, it's buggy and slow. Does anybody have a solution for me?

    Read the article

  • Regular Expression .net flavor

    - by user1440109
    Dont ask how this works but currently it does ("^\|(.?)\|*$")....kinda. This removes all extra pipes...part one....I have searched all over no anwser yet. I am using VB2011 beta...asp web form......vb coding though! I want to capture special character pipe (|) which is used to seperate words...i.e. car|truck|van|cycle problem is users lead with, trail with, use multiple, and use spaces before and after...i.e. |||car||truck | van || cycle. another example: george bush|micheal jordon|bill gates|steve jobs <-- this would be correct but when I do remove space it takes correct space out. so I want to get rid of whitespace leading, trailing, any space before | and space after | and only allow one pipe (|)....in between alphanumeric of course.

    Read the article

  • dropping user to IRB after reading from pipe

    - by aurelian
    I have this script that drops the user to an IRB session when executed. All good, but when I use *nix pipes to get the input (e.g. with cat), the IRB session ends immediately. I could reduce the script (let's call it myscript.rb) to the following: require 'irb' if $stdin.stat.size 0 @text = $stdin.read else @text= "nothing" end ARGV.clear IRB.start When executed like: ruby myscript.rb, I end up in the IRB session (as expected). But (assuming foo.txt exists in the cwd): cat foo.txt | ruby myscript.rb will just print the IRB prompt and then the IRB session is closed (I'm being dropped to $bash). Any known workarounds or ideas? BTW: it has the same behavior on ruby 1.8.7 as well as on 1.9.2.

    Read the article

  • vb.net : is it possible to connect to sql server 2008 via odbc but not through vb.net code?

    - by phill
    I'm supporting an old vb.net program whose database it connected to was moved from SQL Server 2005 to SQL Server 2008. Is there a setting on SQL Server 2008 which will allow ODBC connections to access the database but not allow VB.NET to connect to it programmatically? the error i keep receiving in the app is: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) however I can connect to it when I create a system dsn to the sql server instance and through VS2005's Tools Connect to Database. Here is the code I'm using to connect: dim strC as string strC = "data source=bob; database=subscribers; user id=bobuser; password=passme" dim connection as New SqlClient.SqlConnection(strC) try connection.open() catch ex as Exception msgbox(ex.message) end try connection.Close()

    Read the article

  • Open zip file without temporary files

    - by Javis Perez
    i've seem this post about extracting a zip without a temporary file via stream and pipes: Open a file from archive without temporary extraction The problem is that i'm using php and have no idea if that is possible. I've search a lot with no luck. My idea is to preview zip files from the dropbox using its API but i dont want to save the files to a local drive, just preview the content. Any idea if that's possible with php? Almost everything i found is about creating the file, not reading it... :-\ I was thinking that i might try with nodejs, but i know mostly nothing about nodejs, do you think it would support it? Any other idea please? thank you.

    Read the article

  • Handling of data truncation (short reads/writes) in FUSE

    - by Vi
    I expect any good program should do all their reads and writes in a loop until all data written/read without relying that write will write everything (even with regular files). Am I right? Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer (using -o direct_io). Some programs work, some not (notably mountlo). Are them buggy or programs should not expect truncated writes and reads from the regular files? In general, are seekable file descriptors expected to truncate data like sockets and pipes?

    Read the article

  • Help me understand the code snippet in c#

    - by Benny
    I am reading this blog: Pipes and filters pattern I am confused by this code snippet: public class Pipeline<T> { private readonly List<IOperation<T>> operations = new List<IOperation<T>>(); public Pipeline<T> Register(IOperation<T> operation) { operations.Add(operation); return this; } public void Execute() { IEnumerable<T> current = new List<T>(); foreach (IOperation<T> operation in operations) { current = operation.Execute(current); } IEnumerator<T> enumerator = current.GetEnumerator(); while (enumerator.MoveNext()); } } what is the purpose of this statement: while (enumerator.MoveNext());? seems this code is a noop.

    Read the article

  • sql server 2008 express. cannot create mdf databse.

    - by yair
    Hi, I'm working with visual studio 2008 express and sql 2008 express. I'm trying to create mdf database (Add new Item ...)and I recieve the following error message: "a network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. Verfy that instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named pipes Provider:40 - could not open connection to SQL)" Why ? Is it possible to create mdf database with SQL 2008 Express ? If it is then what to do ?

    Read the article

  • git, SSH_ASKPASS on windows

    - by Martin Schreiber
    I am writing a graphical git frontend for Linux and Windows (MSEgit) based on MSEide+MSEgui. MSEgit has an internal console window which communicates with git by pipes. On Linux it uses a PTY so SSH asks for key unlocking passwords on the PTY. On Windows I wrote a small password entry application and set the SSH_ASKPASS environment variable accordingly. SSH calls the password application if git is started with CreateProcess() dwCreationFlags DETACHED_PROCESS set but the password entry window will not be focused, its taskbar icon flashes instead. SSH does not run the password application if FreeConsole() is called to be sure that there is no attached console to MSEgit and git is started without DETACHED_PROCESS but CREATE_NO_WINDOW instead. I assume a Windows equivalent of POSIX setsid() should be called. How can I force SSH to use SSH_ASKPASS without the DETACHED_PROCESS flag? If this is not possible, how can I ensure that the password entry window is focused?

    Read the article

  • Running an app that requires an administrator account from a service

    - by Bergvall
    Is it possible to run handle.exe (from sysinternals) from a service (in windows7) without having to turn off UAC? The service is a custom c-app that needs to find out which process is locking a file it tries to access and handle.exe seems to be a good way to solve it but i can't get it to work with UAC turned on. This app runs all the time so i can't have a UAC prompt while its running but its fine if it shows up at startup. Handle.exe works fine from an admin commandprompt but fails when trying to run from a normal prompt. I call handle.exe from CreateProcess() and get the output from pipes. I guess there should be a way to solve this but i can't figure it out. Setting up the service to log in from an admin account does not seem to work.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >