This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
from datetime import datetime | |
from typing import Callable | |
import bpy | |
from bpy.types import Object | |
from mathutils import Vector | |
VECTOR_LENGTH = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var endpoint = new IPEndPoint( IPAddress.Loopback, 6000 ); | |
var server = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); | |
server.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.KeepAlive, true ); | |
server.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveTime, 90 ); | |
server.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveInterval, 5 ); | |
server.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveRetryCount, 3 ); | |
server.Bind( endpoint ); | |
server.Listen( 1 ); | |
Task.Run( ( ) => | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# transaction 1 | |
START TRANSACTION; | |
LOCK TABLE User IN EXCLUSIVE MODE; | |
INSERT INTO User (Name, Dob, Age) VALUES ('John', '10-10-1999', 24); | |
UNLOCK TABLE User; | |
COMMIT; | |
# transaction 2 | |
START TRANSACTION; | |
SELECT * FROM User WHERE ID = '1bd76753-f391-453d-bd98-a212789dd652' FOR UPDATE; |