- Sort Score
- Num 10 results
- Language All
Results 181 - 190 of 628 for Rewrite (0.05 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/io/FaultyFileSystem.kt
inner class FaultySink( sink: Sink, private val file: Path, ) : ForwardingSink(sink) { override fun write( source: Buffer, byteCount: Long, ) { if (writeFaults.contains(file)) { throw IOException("boom!") } else { super.write(source, byteCount) } } }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 2.8K bytes - Click Count (0) -
cmd/crossdomain-xml-handler.go
if globalServerCtxt.CrossDomainXML != "" { cxml = globalServerCtxt.CrossDomainXML } // Look for 'crossdomain.xml' in the incoming request. if r.URL.Path == crossDomainXMLEntity { // Write the standard cross domain policy xml. w.Write([]byte(cxml)) // Request completed, no need to serve to other handlers. return } h.ServeHTTP(w, r) })Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Mon Mar 18 06:42:40 GMT 2024 - 2.2K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache/DiskLruCacheTest.kt
} /** * We had a bug where the cache was left in an inconsistent state after a journal write failed. * https://github.com/square/okhttp/issues/1211 */ @Test fun journalWriteFailsDuringEditorCommit() { set("a", "a", "a") set("b", "b", "b") // Create an entry that fails to write to the journal during commit. val editor = cache.edit("c")!! editor.setString(0, "c")
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Nov 01 12:18:11 GMT 2025 - 59.4K bytes - Click Count (0) -
guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
ByteBufferHasher(int expectedInputSize) { this.buffer = ByteBuffer.allocate(expectedInputSize).order(ByteOrder.LITTLE_ENDIAN); } /** * Resizes the buffer if necessary. Guaranteed to leave `buffer` in Write Mode ready for new * data. */ private void ensureCapacity(int needed) { if (buffer.remaining() >= needed) { return; } int currentCapacity = buffer.capacity();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 04 15:39:10 GMT 2025 - 4.8K bytes - Click Count (0) -
docs_src/background_tasks/tutorial002_an_py310.py
from typing import Annotated from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 683 bytes - Click Count (0) -
docs_src/background_tasks/tutorial002_py39.py
from typing import Union from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 675 bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/SocksProxy.kt
throw ProtocolException("unexpected address: " + toSocket.localAddress) } // Write the reply. fromSink.writeByte(VERSION_5) fromSink.writeByte(REPLY_SUCCEEDED) fromSink.writeByte(0) fromSink.writeByte(ADDRESS_TYPE_IPV4) fromSink.write(localAddress) fromSink.writeShort(toSocket.localPort) fromSink.emit()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon May 05 16:01:00 GMT 2025 - 7.6K bytes - Click Count (0) -
docs/en/docs/tutorial/background-tasks.md
It is just a standard function that can receive parameters. It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly. In this case, the task function will write to a file (simulating sending an email). And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: {* ../../docs_src/background_tasks/tutorial001_py39.py hl[6:9] *}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.8K bytes - Click Count (0) -
cmd/listen-notification-handlers.go
setEventStreamHeaders(w) // Listen Publisher and peer-listen-client uses nonblocking send and hence does not wait for slow receivers. // Use buffered channel to take care of burst sends or slow w.Write() mergeCh := make(chan []byte, globalAPIConfig.getRequestsPoolCapacity()*len(globalEndpoints.Hostnames())) localCh := make(chan event.Event, globalAPIConfig.getRequestsPoolCapacity())
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Tue Feb 18 16:25:55 GMT 2025 - 6K bytes - Click Count (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt
writer: DerWriter, value: T, ) { if (typeHint) { writer.typeHint = value } if (isOptional && value == defaultValue) { // Nothing to write! return } writer.write(name, tagClass, tag) { codec.encode(writer, value) } } /** * Returns a copy with a context tag. This should be used when the type is ambiguous on its own.Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.4K bytes - Click Count (0)