Tutorial by Examples: adv

This is an advanced subject, do not attempt without first understanding the other examples of this page. As stated in the official Django Rest Framework on pagination: Pagination is only performed automatically if you're using the generic views or viewsets. If you're using a regular APIView, you...
`To calculate 1D convolution by hand, you slide your kernel over the input, calculate the element-wise multiplications and sum them up. The easiest way is for padding=0, stride=1 So if your input = [1, 0, 2, 3, 0, 1, 1] and kernel = [2, 1, 3] the result of the convolution is [8, 11, 7, 9, 4], whic...
You can use Bluetooth LE Advertising to broadcast data packages to all nearby devices without having to establish a connection first. Bear in mind that there's a strict limit of 31 bytes of advertisement data. Advertising your device is also the first step towards letting other users connect to you....
This section will contain some of the most advanced examples realized using Multithreading. Advanced printer (logger) A thread that prints everything is received and modifies the output according to the terminal width. The nice part is that also the "already written" output is modified w...
The advantage of immutability comes with concurrency. It is difficult to maintain correctness in mutable objects, as multiple threads could be trying to change the state of the same object, leading to some threads seeing a different state of the same object, depending on the timing of the reads and ...

Page 4 of 4