Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 496 for fwrite (0.18 sec)

  1. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

    }
    
    static void Append(const TF_WritableFile* file, const char* buffer, size_t n,
                       TF_Status* status) {
      auto posix_file = static_cast<PosixFile*>(file->plugin_file);
    
      size_t r = fwrite(buffer, 1, n, posix_file->handle);
      if (r != n)
        TF_SetStatusFromIOError(status, errno, posix_file->filename);
      else
        TF_SetStatus(status, TF_OK, "");
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  2. ci/official/containers/linux_arm64/builder.devtoolset/stringop_trunc.patch

    index a5202a1..772d081 100644
    --- a/timezone/zic.c
    +++ b/timezone/zic.c
    @@ -1609,7 +1609,7 @@ writezone(const char *const name, const char *const string)
     		}
     #define DO(field)	((void) fwrite(tzh.field, sizeof tzh.field, 1, fp))
     		tzh = tzh0;
    -		(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
    +		memcpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
     		tzh.tzh_version[0] = ZIC_VERSION;
    Others
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 14:52:45 GMT 2023
    - 42.9K bytes
    - Viewed (1)
  3. src/archive/zip/writer.go

    // for the file metadata. [Writer] takes ownership of fh and may mutate
    // its fields. The caller must not modify fh after calling [Writer.CreateHeader].
    //
    // This returns a [Writer] to which the file contents should be written.
    // The file's contents must be written to the io.Writer before the next
    // call to [Writer.Create], [Writer.CreateHeader], [Writer.CreateRaw], or [Writer.Close].
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  4. src/archive/tar/writer.go

    	"path"
    	"sort"
    	"strings"
    	"time"
    )
    
    // Writer provides sequential writing of a tar archive.
    // [Writer.WriteHeader] begins a new file with the provided [Header],
    // and then Writer can be treated as an io.Writer to supply that file's data.
    type Writer struct {
    	w    io.Writer
    	pad  int64      // Amount of padding to write after current file entry
    	curr fileWriter // Writer for current file entry
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  5. src/archive/tar/writer_test.go

    		}
    	}
    }
    
    // testNonEmptyWriter wraps an io.Writer and ensures that
    // Write is never called with an empty buffer.
    type testNonEmptyWriter struct{ io.Writer }
    
    func (w testNonEmptyWriter) Write(b []byte) (int, error) {
    	if len(b) == 0 {
    		return 0, errors.New("unexpected empty Write call")
    	}
    	return w.Writer.Write(b)
    }
    
    func TestFileWriter(t *testing.T) {
    	type (
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  6. src/archive/zip/writer_test.go

    	w := NewWriter(io.Discard)
    	dw, err := w.Create("dir/")
    	if err != nil {
    		t.Fatal(err)
    	}
    	if _, err := dw.Write(nil); err != nil {
    		t.Errorf("Write(nil) to directory: got %v, want nil", err)
    	}
    	if _, err := dw.Write([]byte("hello")); err == nil {
    		t.Error(`Write("hello") to directory: got nil error, want non-nil`)
    	}
    }
    
    func TestWriterDirAttributes(t *testing.T) {
    	var buf bytes.Buffer
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  7. cmd/local-locker_gen.go

    		return
    	}
    	err = en.WriteBool(z.Writer)
    	if err != nil {
    		err = msgp.WrapError(err, "Writer")
    		return
    	}
    	// write "UID"
    	err = en.Append(0xa3, 0x55, 0x49, 0x44)
    	if err != nil {
    		return
    	}
    	err = en.WriteString(z.UID)
    	if err != nil {
    		err = msgp.WrapError(err, "UID")
    		return
    	}
    	// write "Timestamp"
    	err = en.Append(0xa9, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  8. src/bufio/bufio.go

    // accepted and all subsequent writes, and [Writer.Flush], will return the error.
    // After all data has been written, the client should call the
    // [Writer.Flush] method to guarantee all data has been forwarded to
    // the underlying [io.Writer].
    type Writer struct {
    	err error
    	buf []byte
    	n   int
    	wr  io.Writer
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  9. doc/go_mem.html

    <p>
    Note that if there are no read-write or write-write data races on memory location <i>x</i>,
    then any read <i>r</i> on <i>x</i> has only one possible <i>W</i>(<i>r</i>):
    the single <i>w</i> that immediately precedes it in the happens before order.
    </p>
    
    <p>
    More generally, it can be shown that any Go program that is data-race-free,
    meaning it has no program executions with read-write or write-write data races,
    HTML
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/dict/stemmeroverride/StemmerOverrideFile.java

                    throw new DictionaryException("Failed to write: " + oldItem + " -> " + item, e);
                }
            }
    
            public void write(final String line) {
                try {
                    writer.write(line);
                    writer.write(Constants.LINE_SEPARATOR);
                } catch (final IOException e) {
                    throw new DictionaryException("Failed to write: " + line, e);
                }
            }
    
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 10.6K bytes
    - Viewed (0)
Back to top