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
private float calculateDistance(float base, float target) { | |
double sinB = Math.sin((base)*Math.PI/180.0); | |
double cosB = Math.cos((base)*Math.PI/180.0); | |
double sinT = Math.sin((target)*Math.PI/180.0); | |
double cosT = Math.cos((target)*Math.PI/180.0); | |
double ret = Math.sqrt(Math.pow(Math.abs(sinB-sinT),2) + Math.pow(Math.abs(cosB-cosT),2)); | |
return (float)ret; | |
} |
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
/* Gravatar hovercard's class */ | |
.gcard { | |
/* use big enough number */ | |
z-index: 99999 !important; | |
} |
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
//============================================================================= | |
//----------------------------------------------------------------------------- | |
// S L O T C A R P E R I O D F I N D E R A L G O R I T H M | |
//----------------------------------------------------------------------------- | |
//============================================================================= | |
// | |
// This SciNote demonstrates the operation of a very simple thus very specific | |
// period finder algorithm, that was developed for a autonome real-time slot | |
// car race. | |
// |
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
c:\Users\USERNAME\.ssh\known_hosts | |
c:\Users\USERNAME\AppData\Local\VirtualStore\Program Files (x86)\Git\.sshknown_hosts |
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
\[/?social[\w"=\d\s]*\] | |
This pattern will find both pair of tags of this shortcode: | |
[sociallocker id="123"][/sociallocker] |
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
table.highlighttable { | |
border-collapse: separate; | |
border-spacing: 0; | |
@include rounded(6px); | |
@include box-shadow(0 2px 5px rgba(0, 0, 0, 0.09)); | |
overflow: hidden; | |
margin-bottom: 25px; | |
border: 1px solid rgba(147, 161, 161, 0.55); | |
} |
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
from itertools import count | |
def generate_primes(stop_at=0): | |
primes = [] | |
for n in count(2): | |
if 0 < stop_at < n: | |
for p in primes: | |
if not n % p: | |
composite = True |
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
// Solarized light syntax highlight | |
// -------------------------------------------------- | |
$gist-base03 : #002b36; | |
$gist-base02 : #073642; | |
$gist-base01 : #586e75; | |
$gist-base00 : #657b83; | |
$gist-base0 : #839496; | |
$gist-base1 : #93a1a1; | |
$gist-base2 : #eee8d5; |
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
@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, white, 50%)) { | |
// For Google Chrome | |
::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} | |
::-webkit-scrollbar-thumb { | |
background: $foreground-color; |
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
.gist .gist-file { | |
background-color: transparent !important; | |
border: none !important; | |
background-color: #fdf6e3; | |
::-webkit-scrollbar { | |
width: .5em; | |
height: .5em; | |
} |