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 <unistd.h> | |
#include <string.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 | |
const char* RESET = "\x1B[0m"; |
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 "stdafx.h" | |
#include <stdio.h> | |
#include <time.h> | |
#include <chrono> | |
#include <thread> | |
#include <Windows.h> | |
void SetColorAndBackground(int ForgC, int BackC = 0) { | |
WORD wColor = ((BackC & 0x0F) << 4) + (ForgC & 0x0F); | |
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wColor); |
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
// Eddystone and iBeacon example code for Puck.js 1.92 or above | |
// How to use: paste into the web IDE, adjust to your needs, and upload to your puck. | |
// Setup which type of advertising you wish to make, Eddystone, iBeacon, or both. Uncomment ONLY ONE. | |
function doAdvertising() { | |
doEddystone(); //By default, we advertise eddystone only. | |
//doiBeacon(); | |
//advertiseBoth(); | |
} |
NewerOlder