This file contains hidden or 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
triggers query_lc => qr/^\s*(?:([knaw](?:[a-z][0-9][a-z]{1,3}|[0-9][a-z]{2,3}))|uls\s+(.+)|(.+)\s+(?:radio|fcc|ham)\s+licenses?)\s*$/ |
This file contains hidden or 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
HTMLCanvasElement::relativeMouseCoordinates = (event) -> | |
x = new Number() | |
y = new Number() | |
if event.x isnt undefined and event.y isnt undefined | |
x = event.x | |
y = event.y | |
else | |
x = event.clientX + document.body.scrollLeft + | |
document.documentElement.scrollLeft |
This file contains hidden or 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
(new Date().valueOf() * 0.001)|0 |
This file contains hidden or 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
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) | |
c = 2.atan2(√a, √(1−a)) | |
d = R.c |
This file contains hidden or 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
<?php | |
// Open the memory location; read-only. | |
$memoryHandle = shmop_open(0x13c, "a", 0644, 100); | |
// Read the memory location and print it. | |
$string = shmop_read($memoryHandle, 0, 0); # Setting the byte count to 0 reads all bytes. | |
echo 'Data in RAM reads: '.$string; | |
shmop_close($memoryHandle); |
This file contains hidden or 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
<?php | |
$_HEADERS = apache_request_headers(); # Get client headers. | |
$updateTime = strtotime('yesterday'); # Makes sure that it always caches. | |
/* | |
Mock page content. | |
Change this after first view. If refreshing | |
shows the old content, then the test worked! | |
*/ |
This file contains hidden or 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
Input Q | |
int(Q)→Q | |
Lbl ITERATE | |
If Q≠1 | |
Then | |
If (Q/2)=int(Q/2) | |
Then | |
(Q/2)→Q | |
Disp Q | |
Goto ITERATE |
This file contains hidden or 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
class Controller | |
{ | |
public static bool InProcess = false; | |
public static bool RemoteStop = false; | |
const int PAINT_FROMTOP = 150; | |
const int PAINT_FRONLEFT = 100; | |
[DllImport("user32.dll", SetLastError = true)] | |
static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo); |
This file contains hidden or 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
SELECT MATCH(Content, Title) AGAINST ('%[[KEY1]]% %[[KEY2]]%') as SearchRelevance FROM [[TABLE]] WHERE MATCH(Content, Title) AGAINST('+[[KEY1]]+[[KEY2]]' IN BOOLEAN MODE) HAVING SearchRelevance > 0.1 ORDER BY SearchRelevance DESC |
This file contains hidden or 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
<?php | |
/** | |
* @author Jonathan Lettman | |
* @param input Array or String to convert to a natural list. | |
* @param alphabetical Option to sort the list input alphabetically before turning it into a string. | |
* @return string Product of Natlist in the natural English grammar of a list. | |
*/ | |
function natlist($input, $alphabetical = false) | |
{ | |
if(is_array($input)) $arrayCount = count($input); |
NewerOlder