Search Results

Search found 5919 results on 237 pages for 'io priority'.

Page 115/237 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • How do I run an interactive command line Python app inside of Emacs on Win32?

    - by sludge
    If I use M-x shell and run the interactive Python interpreter, Emacs on Windows does not return any IO. When I discovered M-x python-shell, I regained hope. However, instead of running the interactive Python shell, I want to run a specific Python script that features an interactive CLI. (See Python's cmd module for details). Is there a way of launching a Python script in Emacs that is interactive? (stdout, stdin, stderr)

    Read the article

  • Best practices for handling binary data in Ruby?

    - by StackedCrooked
    What are the best practices for reading and writing binary data in Ruby? In the code sample below I needed to send a binary file using over HTTP (as POST data): f = File.new("resp.der", "r") # binary file begin while true out.syswrite(f.sysread(1)) # out is an output stream (type IO) end rescue EOFError => err puts "Sent response." end While this code seems to do a good job, it probably isn't very idiomatic. How can I improve it?

    Read the article

  • Bash command that prints a message on stderr

    - by Salman A
    I want to know if there is a built-in BASH command that prints some text on stderr, just like the echo command that prints text on stdout. I don't want to use temporary io-redirection. I use a built-in command to generate an error on stderr such as ls --asdf (ls: unrecognized option '--asdf') but I want something neater,

    Read the article

  • java beginner wants to learn Hibernate

    - by Ashwath
    I am a java beginner and so far have completed learning the core java concepts except io chapter. I also want to finish up the j2ee material and other stuffs like hibernate, springs and struts . At present I have good knowledge of Java . please guide me that how can i finish up studying Hibernate, Springs and Struts in 2 days without going through J2ee in detail .Since I am preparing for the interview ? thanks for the help..

    Read the article

  • Why must I use local path rather than 'svn://' with SVN bindings?

    - by Chad Johnson
    I'm using the Ruby SVN bindings built with SWIG. Here's a little tutorial. When I do this @repository = Svn::Repos.open('/path/to/repository') I can access the repository fine. But when I do this @repository = Svn::Repos.open('svn://localhost/some/path') It fails with /SourceCache/subversion/subversion-35/subversion/subversion/libsvn_subr/io.c:2710: 2: Can't open file 'svn://localhost/format': No such file or directory When I do this from the command line, I do get output svn ls svn://localhost/some/path Any ideas why I can't use the svn:// protocol?

    Read the article

  • Filter to values in collection in one query

    - by dotnetdev
    Hi, I have the following LINQ query: List<string> Types = (List<string>) Directory.GetFiles(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727") Where(x => System.IO.Path.GetFileNameWithoutExtension(x).Contains("Microsoft")) .ToList<string>(); How could I modify this so it can only get the values stored in a collection, without writing another LINQ query (which I assume will impact performance?)? Thanks

    Read the article

  • HTML 5 performance on Firefox ?

    - by asksuperuser
    I tried this sample here: http://9elements.com/io/projects/html5/canvas/ After a few minutes, Firefox slows down so much I can't even popup any menu. When I closed the tab, Firefox comes back to normal again. So is HTML 5 really a good choice now ?

    Read the article

  • OutOfMemoryError loading Bitmap via DefaultHttpClient

    - by Goddchen
    i have a simple problem: Although i'm using sampleSize properly, my code doesn't even reach the BitmapFactorycode, since DefaultHttpClient is already throwing the exception. Here is my code: DefaultHttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(mSongInfo.imageLarge); HttpResponse response = client.execute(request); int sampleSize = 1; while (response.getEntity().getContentLength() / sampleSize / sampleSize > 100 * 1024) { sampleSize *= 2; } BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = sampleSize; final Bitmap bitmap = BitmapFactory.decodeStream(response .getEntity().getContent(), null, options); And here is the exception: 0 java.lang.OutOfMemoryError: (Heap Size=11463KB, Allocated=7623KB, Bitmap Size=9382KB) 1 at org.apache.http.util.ByteArrayBuffer.<init>(ByteArrayBuffer.java:53) 2 at org.apache.http.impl.io.AbstractSessionInputBuffer.init(AbstractSessionInputBuffer.java:82) 3 at org.apache.http.impl.io.SocketInputBuffer.<init>(SocketInputBuffer.java:98) 4 at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:83) 5 at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:170) 6 at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:106) 7 at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:129) 8 at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:173) 9 at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) 10 at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) 11 at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359) 12 at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) 13 at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) 14 at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) 15 at de.goddchen.android.easysongfinder.fragments.SongFragment$1.run(SongFragment.java:79) 16 at java.lang.Thread.run(Thread.java:1027) As you can see, the code doesn't even reach the part where i check the size (Content-Length) of the image and calculate a proper sample size. I wasn't aware that simply calling DefaultHttpClient.execute(...) will already load the complete content into the memory. Am i doing something wrong? What is the right way to first retrieve the content length and then start reading the content from an InputStream? EDIT To avoid common answers that show how to load images from a URL: i already know how to do that, i have also posted the code above, so why do you keep referencing tutorials on that? I explicitly was very clear about the problem: Why is HttpClient.execute(...)already fetching the whole content and storing it in memory instead of providing a proper ÌnputStreamto me? Please don't post any beginner tutorials on how to load aBitmap`from a URL...

    Read the article

  • FileInfo displaying a peculiar date

    - by Berlioz
    Why does the following display 12/31/1600 ??? Imports System.IO Module Module1 Sub Main() Dim fi As New FileInfo("DocFiles\phillips_phone_number.txt") Console.WriteLine(fi.FullName) Console.WriteLine(fi.LastAccessTime.ToShortDateString) Console.ReadKey() End Sub End Module

    Read the article

  • The device is not connected exception

    - by Dani
    I try to open a large number of files but after 5000 files or so I get Exception in thread "Main" java.io.IOException: The device is not connected Is this the expected behavior? Is there a way around it? I want to leave my code as straightforward as possible.

    Read the article

  • How to bypass the user confirmation in J2ME?

    - by abc
    i have a j2me application , it does the File IO operation, but every time it performs it , it asks user for permission. is there any way to bypass it? i heard that suppose if i make this application certified then i would be able to run it in max. secure mode to bypass such issues.

    Read the article

  • Find user independent TEMP directory with Java

    - by GHad
    Hi, when running a Java application as service with the user 'LocalService', the temp directory ("java.io.tmpdir") points to 'c:/windows/temp' (for example). Running a Java application normally gives 'c:/documents and settings/user/local settings/temp' instead. How can I determine the user independent temp folder 'c:/windows/temp' when my application runs normally? Thanks and greetings, GHad

    Read the article

  • [java] run 2 threads simultaneously

    - by lamsaitat
    hi all, in the case of an IM client. i have made 2 separate threads to handle sending packets (by std io) and receiving packets. the question is how to make these 2 threads run simultaneously so that i can keep prompting for input while at the same time be ready to receive packets at any time? i have already tried setting a timer but the data is always lost receiving.

    Read the article

  • how to cancel an awaiting task c#

    - by user1748906
    I am trying to cancel a task awaiting for network IO using CancellationTokenSource, but I have to wait until TcpClient connects: try { while (true) { token.Token.ThrowIfCancellationRequested(); Thread.Sleep(int.MaxValue); //simulating a TcpListener waiting for request } } any ideas ? Secondly, is it OK to start each client in a separate task ?

    Read the article

  • Running 2 threads simultaneously

    - by lamsaitat
    In the case of an IM client. I have made 2 separate threads to handle sending packets (by std io) and receiving packets. The question is how to make these 2 threads run simultaneously so that I can keep prompting for input while at the same time be ready to receive packets at any time? I have already tried setting a timer but the data is always lost receiving.

    Read the article

  • File.Move error in C#

    - by Bi
    Hi I am trying a simple move as shown below and get the following error: "The process cannot access the file because it is being used by another process." How do I fix this? Thanks. FileInfo file1 = new FileInfo(srcFile); if (file1.Exists) { FileInfo file2 = new FileInfo(destFile); if (!file2.Exists) { try { File.Move(srcFile, destFile); } catch (System.IO.IOException e) { Console.WriteLine(e.Message); } } }

    Read the article

  • How do i pass null into stdin like this perl code?

    - by acidzombie24
    This is my question and apparently this is the answer. I found you can stdout to null by writing NUL in command prompt so i tried writing < NUL at the end of my argument. No luck. How do i pass in null or do something with the IO locks like that perl code does so i can get my ffmpeg script not locking up after 15 or so seconds?

    Read the article

  • Twitter Bootstrap: How to make top fixed navbar stay in container and not stretch?

    - by Jryl
    I'm working with Twitter Bootstrap and the regular navbar you see in the guides: http://twitter.github.io/bootstrap/components.html#navbar I don't want the navigation to stretch all the way left or right but stay where I can see both sides just like in the guide. The only difference is it would be fixed to the top. I was wondering, how do I make this become a fixed navbar as if I was using the navbar-fixed-top class?

    Read the article

  • Concurrent processes do not utilize all available CPU

    - by metdos
    I run some processes on an EC2 cc2.8xlarge instance which has 32 virtual processors. For some type of processes, when I run 16 processes on parallel, all of them use 100% of CPU cycles. But for other type of processes, they are not using 100% CPU and they finish considerably slower than a single thread. There is no time spend on IO and all data is served from memory. Do you have any idea about the reason of this problem?

    Read the article

  • What useful minor features of C# 4.0 can you list?

    - by sashaeve
    C# 4.0 has a lot of new major features such as dynamic type, covariance and contravariance, named arguments etc. But C# 4.0 contains new minor (but useful) changes such as TryParse method for TimeSpan, Enum, Guid data types, String.IsNullOrWhiteSpace, System.IO.Stream.CopyTo etc. What other minor and useful features of C# 4.0 can you list?

    Read the article

  • how to read the contents of a file In Erlang ?

    - by Zubair
    I know you can do something like this: readlines(FileName) -> {ok, Device} = file:open(FileName, [read]), get_all_lines(Device, []). get_all_lines(Device, Accum) -> case io:get_line(Device, "") of eof -> file:close(Device), Accum; Line -> get_all_lines(Device, Accum ++ [Line]) end. : Is there a one liner BIF that can do this too?

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >