View bmp_read.cpp
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
#include <iostream> | |
#include <fstream> | |
#include "main.h" | |
int main(int argc, char *argv[]) | |
{ | |
if (argc < 2) { | |
std::cout << "Usage: " << argv[0] << " file_name" << std::endl; | |
return 0; |
View proxdetector.pwn
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
stock ProxDetector(playerid, Float:max_range, color, const string[], Float:max_ratio = 1.6) | |
{ | |
new | |
Float:pos_x, | |
Float:pos_y, | |
Float:pos_z, | |
Float:range, | |
Float:range_ratio, | |
Float:range_with_ratio, | |
clr_r, clr_g, clr_b, |
View .bashrc
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
# color aliases | |
alias sudo='sudo ' | |
alias ls='ls --color=always' | |
alias dmesg='dmesg --color=always' | |
alias grep='grep --color=always' | |
alias gcc='gcc -fdiagnostics-color=always' | |
alias pacman='pacman --color=always' | |
alias dir='dir --color=always' | |
alias diff='diff --color=always' |
View parents.js
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
Element.prototype.parents = function(selector) { | |
var elements = []; | |
var elem = this; | |
var ishaveselector = selector !== undefined; | |
while ((elem = elem.parentElement) !== null) { | |
if (elem.nodeType !== Node.ELEMENT_NODE) { | |
continue; | |
} | |
View regsys.pwn
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
/* | |
About: mysql orm register system | |
Author: ziggi | |
*/ | |
#include <a_samp> | |
#include "a_mysql" |
View GetTickDiff.pwn
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
stock GetTickDiff(newtick, oldtick) | |
{ | |
if (oldtick > newtick) { | |
return (cellmax - oldtick + 1) - (cellmin - newtick); | |
} | |
return newtick - oldtick; | |
} |
View frandom.pwn
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
stock Float:frandom(Float:max) | |
{ | |
return floatdiv(float(random(0)), floatdiv(float(cellmax), max)); | |
} |
View rgba2bgra.pwn
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
stock rgba2bgra(color) | |
{ | |
return | |
(color & 0xFF) | |
| ((color & 0xFF00) << 16) | |
| (color & 0xFF0000) | |
| ((color >> 16) & 0xFF00); | |
} |
View IsIpAddress.pwn
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
#if !defined IS_IN_RANGE | |
#define IS_IN_RANGE(%0,%1,%2) (((%0) - ((%1) + cellmin)) < (((%2) + 1) - ((%1) + cellmin))) | |
#endif | |
stock IsIpAddress(const string[]) | |
{ | |
new | |
octet, | |
j = 100; |
View sq_api_example.pwn
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
<?php | |
include "SampQueryAPI.php"; | |
$query = new SampQueryAPI('127.0.0.1', '7777'); | |
if ($query->isOnline()) { | |
$aInformation = $query->getInfo(); | |
$aServerRules = $query->getRules(); | |
NewerOlder