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
var urlFotoAnterior = ""; | |
var interval = setInterval(function() { | |
try { | |
var urlFotoActual = document.getElementById("photo_image").getAttribute("src"); | |
if (urlFotoActual != urlFotoAnterior) | |
{ | |
urlFotoAnterior = urlFotoActual; | |
document.querySelector("#edit_tag_list .js-deleteTag .avatar").click(); |
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
// without lookup table | |
function getMonthDays_A (month, year) | |
{ | |
if (month === 1) | |
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0) ? 29 : 28; | |
if (month % 2) | |
return month > 6 ? 31 : 30; | |
return month > 6 ? 30 : 31; |
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
var intervalo = null; | |
function DeleteCommentInterval() | |
{ | |
try { | |
var coment = document.querySelector("#wallpost-list .itm-actions-trans button.action") | |
if (coment == null) | |
{ |
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
var elementoFoto = null, urlFotoActual = "", urlFotoAnterior = "", intervalo = null, fechaAnt = '', dCont = 0; | |
function intervalDescargarFoto() | |
{ | |
try { | |
elementoFoto = document.getElementById("photo_image"); | |
urlFotoActual = elementoFoto.getAttribute("src"); | |
if (urlFotoActual != urlFotoAnterior) | |
return; |
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
#include <stdlib.h> | |
#include <string.h> | |
#include <wchar.h> | |
static char* utf16_to_utf8 (const wchar_t *src) | |
{ | |
size_t len = wcslen(src), si, di; | |
char *dst = (char*)malloc(sizeof(*dst)*(3*len+1)); |
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
bool ispow2(int x) | |
{ | |
return !((~(~0U>>1)|x)&x -1) ; | |
} |
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
#include <windows.h> | |
#define MONITOR_ON -1 | |
#define MONITOR_OFF 2 | |
#define MONITOR_STANBY 1 | |
int main() | |
{ | |
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF); | |
} |
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
#include <windows.h> | |
#include <mmsystem.h> | |
#include <stdio.h> | |
int main() | |
{ | |
sndPlaySound("file.wav", SND_ASYNC | SND_FILENAME | SND_LOOP); | |
getchar(); | |
return 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
#include <stdio.h> | |
#include <windows.h> | |
int main() | |
{ | |
// GetCursorPos | |
puts("Press F8 to next example\n"); | |
POINT p; | |
while(!GetAsyncKeyState(VK_F8)) | |
{ |
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
#include <windows.h> | |
#define CTRL_ALT_F1 101 | |
#define CTRL_F2 102 | |
#define ALT_F3 103 | |
#define CTRL_UP 104 | |
#define CTRL_DOWN 105 | |
#define CTRL_RIGHT 106 | |
#define CTRL_LEFT 107 | |
#define EXIT_KEYS 108 |