⌘BABAKOV.NET Let's code!
100% [dark] [ru]
~/posts $

Posts

Let's code!

202 total · page 3 / 21

Calculating the Maximum Number of Points Belonging to One Line from an Array of Points in C#

Given: An array of points on a plane: points[][] Xi and Yi. Need to find: The maximum number of points that belong to one line. Example: Original array: points= [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] Result: 4 Example solution, not the best, but working: Explanation of the algorithm: Create a dictionary where the key is a pair [line equation + index of coordinates in the array].

77 views 0 comments 0 likes ./Read →

Python Bottle Guide (Translation) Part 5 - Request Data (Data in Request)

In the previous part (Python Bottle Guide (Translation) Part 4 - Creating Content) we considered the main aspects related to the transmitted content, in this part we will consider the data transmitted in requests. Files Cookie, HTTP headers, HTML form fields, and other request data are available through the global request object. This special object always refers to the current request, even in multi-threaded environments where multiple client connections are being processed simultaneously:

153 views 0 comments 0 likes ./Read →