Skip to content

Instantly share code, notes, and snippets.

View maqadeersaeed's full-sized avatar

Muhammad Qadeer Saeed maqadeersaeed

View GitHub Profile
@maqadeersaeed
maqadeersaeed / markdown-reference.md
Last active December 28, 2021 18:37
This is reference for How to Format Markdown Files (*.md) Like ReadMe.md Files in Projects.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

@maqadeersaeed
maqadeersaeed / Python Proxy Settings
Created June 12, 2023 06:37
Python Proxy Settings
Open pip.ini file from:
%APPDATA%\pip\pip.ini
Set
---------------------
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
proxy = http://<<username>>:<<password>>@<<hostname>>:<<port>>
// Requires:
// Leaflet: http://leafletjs.com/
// Leaflet.curve: https://github.com/elfalem/Leaflet.curve
//
// Assumes:
// var map is a Leaflet map and already set up.
var latlngs = [];
var latlng1 = [LATITUDE, LONGTITUDE],
@maqadeersaeed
maqadeersaeed / CalcAngleofLineBetweenTwoPoints
Created June 20, 2023 21:14 — forked from darzo27/CalcAngleofLineBetweenTwoPoints
Calculate Angle of Line between two points - Java, C#, Python
==== J A V A ==================================
/**
* Determines the angle of a straight line drawn between point one and two. The number returned, which is a double in degrees, tells us how much we have to rotate a horizontal line clockwise for it to match the line between the two points.
* If you prefer to deal with angles using radians instead of degrees, just change the last line to: "return Math.atan2(yDiff, xDiff);"
*/
public static double GetAngleOfLineBetweenTwoPoints(Point.Double p1, Point.Double p2)
{
double xDiff = p2.x - p1.x;
double yDiff = p2.y - p1.y;
return Math.toDegrees(Math.atan2(yDiff, xDiff));