- Markdown style
[](https://youtu.be/nTQUwghvy5Q)- HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">| #include <windows.h> | |
| void SetWindowBlur(HWND hWnd) | |
| { | |
| const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll")); | |
| if (hModule) | |
| { |
| [DllImport("user32.dll")] | |
| internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data); | |
| [StructLayout(LayoutKind.Sequential)] | |
| internal struct WindowCompositionAttributeData | |
| { | |
| public WindowCompositionAttribute Attribute; | |
| public IntPtr Data; | |
| public int SizeOfData; | |
| } |
| ## | |
| ## How to run multiple uvicorn server apps in the same process | |
| ## | |
| import asyncio | |
| from uvicorn import Server, Config | |
| class MyServer(Server): | |
| async def run(self, sockets=None): | |
| self.config.setup_event_loop() | |
| return await self.serve(sockets=sockets) |
| import math | |
| def average_angles(angles): | |
| """Average (mean) of angles | |
| Return the average of an input sequence of angles. The result is between | |
| ``0`` and ``2 * math.pi``. | |
| If the average is not defined (e.g. ``average_angles([0, math.pi]))``, |
Ref : stackoverflow
The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).
For example for a directory structure like this:
new_project
├── antigravity.py
Since v0.34.0, Electron allows submitting packaged apps to the Mac App Store (MAS). This guide provides information on: how to submit your app and the limitations of the MAS build.
Note: Submitting an app to Mac App Store requires enrolling in the [Apple Developer Program][developer-program], which costs money.
| ; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
| global start | |
| section .text | |
| start: | |
| push dword msg.len | |
| push dword msg | |
| push dword 1 | |
| mov eax, 4 |
| > git fetch | |
| ... | |
| error: non-monotonic index .git/objects/pack/pack-be03d54c63e1a503114461d4c1945b34c7af01c8.idx | |
| ... | |
| > rm .git/objects/pack/pack-be03d54c63e1a503114461d4c1945b34c7af01c8.idx | |
| > git index-pack .git/objects/pack/pack-be03d54c63e1a503114461d4c1945b34c7af01c8.pack |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers