Pointer action | Memory Address | Memory Contents |
---|---|---|
p |
Yes, it's an address | No, this returns the address |
*p |
No, this dereferenced the pointer | Yes, this returns the value at that address |
*p++ |
Incremented after value is read | Unchanged |
*(p++) |
Incremented after value is read | Unchanged |
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
// Based on https://gist.github.com/NikolayIT/d86118a3a0cb3f5ed63d674a350d75f2 | |
// With some tweaks | |
// This file is licensed under MIT license | |
public class LinearRegression | |
{ | |
public static double MinimumLength { get; } = 3; | |
public double Average { get; private set; } = 0; | |
public double R2 { get; private set; } = 1; | |
public double Slope { get; private set; } = 0; |
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
// line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/ | |
// Determine the intersection point of two line segments | |
// Return FALSE if the lines don't intersect | |
function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { | |
// Check if none of the lines are of length 0 | |
if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) { | |
return false | |
} |
BINs (Bank Identification Number) are the first 6 digits of a credit card. these are being distributed around the world all the time, this gist tries to list all possible ranges for the most common brazilian credit cards. Please help me keep it updated 😄
note: All length
fields refer to the max length
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
// Como usar: | |
// Copie todo esse codigo | |
// abra o site do inmet: http://www.inmet.gov.br/sim/cond_reg/tempoCapitais.php | |
// aperte F12, vá na aba console, cole o codigo a aperte enter | |
// Defina as datas de inicio e fim nos campos que aparecem na tela | |
// Clique em 'buscar dados' | |
// Aguarde o fim do processo | |
// Clique no link gerado para fazer donwload do arquivo | |