Search Options

Results per page
Sort
Preferred Languages
Advance

Results 351 - 360 of 916 for close1 (0.06 sec)

  1. guava-tests/test/com/google/common/io/IoTestCase.java

            byte[] buf = new byte[4096];
            for (int read = in.read(buf); read != -1; read = in.read(buf)) {
              out.write(buf, 0, read);
            }
          } finally {
            out.close();
          }
        } finally {
          in.close();
        }
      }
    
      @CanIgnoreReturnValue
      private boolean delete(File file) {
        if (file.isDirectory()) {
          File[] files = file.listFiles();
          if (files != null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 31 12:36:13 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/collect/PowerSetBenchmark.java

     */
    public class PowerSetBenchmark {
      @Param({"2", "4", "8", "16"})
      int elements;
    
      Set<Set<Integer>> powerSet;
    
      @BeforeExperiment
      void setUp() {
        Set<Integer> set = ContiguousSet.create(Range.closed(1, elements), integers());
        powerSet = Sets.powerSet(set);
      }
    
      @Benchmark
      int iteration(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (Set<Integer> subset : powerSet) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  3. docs_src/app_testing/tutorial002.py

        return {"msg": "Hello World"}
    
    
    @app.websocket("/ws")
    async def websocket(websocket: WebSocket):
        await websocket.accept()
        await websocket.send_json({"msg": "Hello WebSocket"})
        await websocket.close()
    
    
    def test_read_main():
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200
        assert response.json() == {"msg": "Hello World"}
    
    
    def test_websocket():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Feb 08 10:23:07 UTC 2023
    - 757 bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/FilesTest.java

        Files.copy(i18nFile, temp);
        assertTrue(Files.equal(i18nFile, temp));
    
        Files.copy(asciiFile, temp);
        RandomAccessFile rf = new RandomAccessFile(temp, "rw");
        rf.writeByte(0);
        rf.close();
        assertEquals(asciiFile.length(), temp.length());
        assertFalse(Files.equal(asciiFile, temp));
    
        assertTrue(Files.asByteSource(asciiFile).contentEquals(Files.asByteSource(asciiFile)));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  5. cmd/fmt-gen.go

    	if err != nil {
    		log.Fatalln(err)
    	}
    
    	zipFile, err := os.Create("format.json.zip")
    	if err != nil {
    		log.Fatalf("failed to create format.json.zip: %v", err)
    	}
    	defer zipFile.Close()
    	fmtZipW := zip.NewWriter(zipFile)
    	defer fmtZipW.Close()
    	for _, pool := range pools { // for each pool
    		setCount, setDriveCount := pool.SetCount, pool.DrivesPerSet
    		format := newFormatErasureV3(setCount, setDriveCount)
    		format.ID = deploymentID
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial010.py

    class MySuperContextManager:
        def __init__(self):
            self.db = DBSession()
    
        def __enter__(self):
            return self.db
    
        def __exit__(self, exc_type, exc_value, traceback):
            self.db.close()
    
    
    async def get_db():
        with MySuperContextManager() as db:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 292 bytes
    - Viewed (0)
  7. cmd/naughty-disk_test.go

    	return d.disk.Hostname()
    }
    
    func (d *naughtyDisk) Healing() *healingTracker {
    	return d.disk.Healing()
    }
    
    func (d *naughtyDisk) Close() (err error) {
    	if err = d.calcError(); err != nil {
    		return err
    	}
    	return d.disk.Close()
    }
    
    func (d *naughtyDisk) calcError() (err error) {
    	d.mu.Lock()
    	defer d.mu.Unlock()
    	d.callNR++
    	if err, ok := d.errors[d.callNR]; ok {
    		return err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/FaultHidingSink.kt

        if (hasErrors) {
          return
        }
        try {
          super.flush()
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    
      override fun close() {
        try {
          super.close()
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. internal/ioutil/append-file_windows.go

    	appendFile, err := lock.Open(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o666)
    	if err != nil {
    		return err
    	}
    	defer appendFile.Close()
    
    	srcFile, err := lock.Open(src, os.O_RDONLY, 0o666)
    	if err != nil {
    		return err
    	}
    	defer srcFile.Close()
    	_, err = io.Copy(appendFile, srcFile)
    	return err
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  10. src/main/webapp/WEB-INF/view/admin/failureurl/admin_failureurl_details.jsp

                                                            </h4>
                                                            <button type="button" class="close" data-dismiss="modal"
                                                                    aria-label="Close">
                                                                <span aria-hidden="true">×</span>
                                                            </button>
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 13 07:47:04 UTC 2020
    - 10.8K bytes
    - Viewed (0)
Back to top