similar to: Re: Win32, file descriptors and rb_io_check_writable()

Displaying 20 results from an estimated 100 matches similar to: "Re: Win32, file descriptors and rb_io_check_writable()"

2004 Nov 16
0
Re: Win32, file descriptors and rb_io_check_writable()
Hi Park, > That is due to detault translation mode. > > Insert > _setmode(NUM2INT(args[0]),_O_TEXT); > after > RFILE(self)->fptr->mode = rb_io_mode_flags("w+"); > RFILE(self)->fptr->f = rb_fdopen(NUM2INT(args[0]),"w+"); > in case of TEXT MODE. Ah, thanks. On a side note, any clue as to why Nobu''s suggestion
2004 Nov 11
3
File.nopen alpha
Hi all, I''ve committed an alpha version of File.nopen (native open) to win32-file. This is a wrapper for CreateFile(). A quick synopsis: * File.nopen(file,access_mode,share_mode,creation_mode,flags) * * A ''native'' open method. This uses CreateFile() behind the scenes instead of * the _open() function. This allows much greater flexibility when it comes * to
2018 Oct 31
1
PATCH: Asserting that 'connection' used has not changed + R_GetConnection2()
SUMMARY: I'm proposing that R assert that 'connection' options have not changed since first created such that R will produce the following error: > fh <- file("a.txt", open = "w+") > cat("hello\n", file = fh) > close(fh) > fh2 <- file("b.txt", open = "w+") > cat("world\n", file = fh2) >
2004 Nov 16
2
win32-file: nread and nwrite
Hi all, I''ve got alpha versions of nread and nwrite now added to the win32-file class in CVS. They seem to work fine, although I''ve noticed one bug in the File#read method. Let''s say we have a text file with "hello world" in it. If I call nread with no arguments, it works fine: fh = File.nopen("C:\\test.txt") p fh.nread -> "hello
2004 Nov 11
0
File.nopen alpha - another followup
Hi all, > fh = File.nopen("C:\\temp.txt",File::WRITE_ATTRIBUTES) > fh.hidden = true > fh.close > > I get "test.rb:16:in `hidden='': cannot convert nil into > String (TypeError)" It looks like this line is the culprit: rbPath = rb_funcall(self,rb_intern("path"),0,0); Hm...we could use GetFullPathName() if rbPath is nil. That, however,
2013 Mar 06
2
multi-line content= construct for puppet resource file command
Hello all, How does one enter multi-line content using ''puppet resource file ...'' at the command line? For example, I am trying to create a file called /tmp/hw.txt with two lines of content: $ cat /tmp/hw.txt hello world This does not work: $ puppet resource file hello_world \ path=/tmp/hw.txt \ ensure=file \ content="hello\nworld\n" This does, but use
2005 Feb 07
1
rsyncd.conf is not created although successful installation of rsync on debian but
Hi All, I have installed rysnc-2.6.3 on my debian linux ( 2.2.20-idepci #1 Sat Apr 20 12:45:19 EST 2002 i686). While configuration it was successful and i installed it without any error. Now, in default installation it should create rsyncd.conf as detault configuration file.. but it has not been created anywhere in system. root@jike:/tmp/temp/rsync-2.6.3# which rsync /usr/local/bin/rsync In
2004 Nov 13
0
Sanity check for win32-file
Hi all, The code that I checked in yesterday that seemed to work just fine now fails. When I run this: require "win32/file" fh = File.nopen("C:\\test.txt") fh.close I now get: test.rb:12:in `initialize'': Invalid argument (Errno::EINVAL) from test.rb:12:in `nopen'' Specifically, it''s failing on this in file.c: args[0] =
2007 Oct 09
5
Playing with ReadFileScatter()
Hi all, Looking at the IO.readlines source in io.c, it looks to me like they grab 8k chunks, split on the input record separator, and buffer accordingly. Since it looks like ReadFileScatter() does some of that work automatically (in page file sized chunks), I thought I''d give it a try. Here''s what I''ve got, but it doesn''t work. I have an incorrect parameter
2017 Mar 07
0
Potential clue for Bug 16975 - lme fixed sigma - inconsistent REML estimation
Dear list, I was trying to create a VarClass for nlme to work with Fay-Herriot (FH) models. The idea was to create a modification of VarComb that instead of multiplying the variance functions made their sum (I called it varSum). After some fails etc... I found that the I was not getting the expected results because I needed to make sigma fixed. Trying to find how to make sigma fixed I run into
2015 Jul 29
2
Re: \n didn't lead to a new line while using remote model
On Wed, Jul 29, 2015 at 04:18:02PM +0800, Yu Liu wrote: [...] > Let's make an example: > > #guestfish -a disk.img > >run > >mount /dev/sda1 / > >write-append /a.txt "Hello\n" > >write-append /a.txt "World\n" > >cat /a.txt > Hello > World > > >quit > > Another try: > eval `guestfish --listen` > guestfish
2015 Jul 30
0
Re: \n didn't lead to a new line while using remote model
Ah, I see. Many thanks. BTW, I see a function that it can add a ssh remote image, like guestfish -a ssh://root@example.com/path/disk.img, it's really powerful, but why couldn't I secceed? #guestfish -a http://slcn03cn15.us.oracle.com/packages/test1.img http://slcn03cn15.us.oracle.com/packages/test1.img: No such file or directory On 2015/7/29 20:42, Richard W.M. Jones wrote: > On
2004 May 20
0
Latest win32-file commit
All, I''ve committed an alpha version of a win32-file that supports a native open, close and write. I''ve got a couple issues that I was hoping you could help with. First, should we overload these methods? In other words, for the open method, if it''s 1 argument use the default Ruby method, but if it''s 5 arguments (the number of arguments that CreateFile()
2008 Nov 22
2
GetFinalPathNameByHandle for XP and earlier
Hi all, How''s this look? I based it on http://msdn.microsoft.com/en-us/library/aa366789(VS.85).aspx. I''m undecided as to when I should raise an error versus when I should just let it fall through, but this is how it is for now. You''ll need the latest windows-pr from CVS, btw. Regards, Dan PS - Where should I put it? In Windows::File directly? In a separate helper
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth? I''m doing: self.body_html = RedCloth.new(self.body).to_html(:textile) which works, except that it doesn''t transform hard breaks to <br /> tags, which is really important for me. However, if I do: self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile) then it converts ALL breaks into <br
2012 Feb 07
5
Table rearranging
I have a table that looks like this: measurement?? ?date??? door ?? color 0.93529385?? ?513?? ?open?? ?red 0.97419293?? ?420??? open ?? red 0.962053514?? ?513?? ?closed?? ?red 0.963909937?? ?1230?? ?open?? ?blue 0.97652034?? ?1230?? ?open?? ?green 0.989310795?? ?1230?? ?closed?? ?blue 0.9941022?? ?917?? ?closed?? ?yellow I would like to create a table that has: Open measurement, Closed
2008 Dec 15
5
Apple patches 1-5
Here are the first few simple patches from Apple, based on dovecot-1.1.7. The comments with "APPLE" in them helped us merge in your new releases; feel free to remove them. Please let me know if you want subsequent patches in a different format, or if you have any questions. Patch #1. Some versions of Mac OS X have buggy CMSG_* macros. -------------- next part -------------- A
2005 Feb 14
8
DONT_RESOLVE_DLL_REFERENCES info
For future reference, it looks like we should avoid DONT_RESOLVE_DLL_REFERENCES in any extensions. http://weblogs.asp.net/oldnewthing/archive/2005/02/14/372266.aspx Regards, Dan
2008 Dec 05
0
Wine release 1.1.10
The Wine development release 1.1.10 is now available. What's new in this release (see below for details): - Support for virtual memory write watches. - Workarounds for the WINAPI compiler bug on Mac OS. - Several fixes for the 64-bit build. - Some more GdiPlus functions. - Various bug fixes. The source is available from the following locations:
2004 Jun 10
1
tryCatch() and preventing interrupts in 'finally'
With tryCatch() it is possible to catch interrupts with tryCatch(). Then you can use a 'finally' statement to clean up, release resources etc. However, how can I "protect" against additional interrupts? This is a concern when the hold down Ctrl+C and generates a sequence of interrupts. Example: tryCatch({ cat("Press Ctrl+C...\n"); Sys.sleep(5); }, interrupt =