《Slides Dev Web》 07. jQuery
keypress, keyup, keydown • Formulaires – submit, change, focus, blur • Document – ready, load, resize, scroll, unload • Exemple $("p").click(function(){ // code à éxecuter ici }); AJAX5 • $(selector)0 码力 | 5 页 | 49.45 KB | 1 年前3
Falcon v3.0.0-b2 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() convert('RGB') converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 340 页 | 1.15 MB | 1 年前3
Falcon v3.0.0 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() convert('RGB') converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.1 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() convert('RGB') converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.0-b1 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) As well as an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() convert('RGB') converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 338 页 | 1.14 MB | 1 年前3
Falcon v3.1.1-b3 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() page) converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() page) converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-a Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() page) converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.0 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() page) converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 362 页 | 1.29 MB | 1 年前3
Falcon v3.1.1 Documentationimg_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) We’ll also add an internal helper to run the Pillow thumbnail operation that is offloaded threadpool executor, again, in hoping that Pillow can release the GIL for some operations: def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO() page) converted = io.BytesIO() rgb_image.save(converted, 'JPEG') return converted.getvalue() def _resize(self, data, size): image = PIL.Image.open(io.BytesIO(data)) image.thumbnail(size) resized = io.BytesIO()0 码力 | 378 页 | 1.29 MB | 1 年前3
共 25 条
- 1
- 2
- 3













