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
var https = require('https'), | |
pem = require('pem'); | |
pem.createCertificate({days:1, selfSigned:true}, function(err, keys){ | |
https.createServer({key: keys.serviceKey, cert: keys.certificate}, function(req, res){ | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); | |
res.setHeader('content-type', 'text/html'); | |
res.end(`<form target="_parent" action="http://localhost:8001/shopping" class="js-search-box-form"><input class="search-box-q js-search-box-q" type="text" value="" name="q" autocomplete="off" autocorrect="off" autocapitalize="off" maxlength="2048"><input id="qo" type="hidden" name="qo" value="homeSearchBox"><button class="search-box-button" type="submit" section="hdr.search" value="">Search</button></form>`); | |
}).listen(8000); |
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
var https = require('https'), | |
pem = require('pem'); | |
pem.createCertificate({days:1, selfSigned:true}, function(err, keys){ | |
https.createServer({key: keys.serviceKey, cert: keys.certificate}, function(req, res){ | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); | |
res.setHeader('content-type', 'text/html'); | |
res.end(`<form target="_parent" action="http://localhost:8001/shopping" class="js-search-box-form"><input class="search-box-q js-search-box-q" type="text" value="" name="q" autocomplete="off" autocorrect="off" autocapitalize="off" maxlength="2048"><input id="qo" type="hidden" name="qo" value="homeSearchBox"><button class="search-box-button" type="submit" section="hdr.search" value="">Search</button></form>`); | |
}).listen(8000); |
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 <stdio.h> | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif | |
int main() { |
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
#define WINVER 0x0500 | |
#include <windows.h> | |
void ToogleRecordingKeys() | |
{ | |
// This structure will be used to create the keyboard | |
// input event. | |
INPUT ipAlt; | |
INPUT ipF9; |
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
/* UDP echo server program -- echo-server-udp.c */ | |
#include <stdio.h> /* standard C i/o facilities */ | |
#include <stdlib.h> /* needed for atoi() */ | |
#include <unistd.h> /* defines STDIN_FILENO, system calls,etc */ | |
#include <sys/types.h> /* system data type definitions */ | |
#include <sys/socket.h> /* socket specific definitions */ | |
#include <netinet/in.h> /* INET constants and stuff */ | |
#include <arpa/inet.h> /* IP address conversion stuff */ | |
#include <netdb.h> /* gethostbyname */ |
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
void FScene::UpdateSceneCaptureContents(USceneCaptureComponent2D* CaptureComponent) | |
{ | |
check(CaptureComponent); | |
if (CaptureComponent->TextureTarget) | |
{ | |
// Only ensure motion blur cache is up to date when doing USceneCaptureComponent2D::CaptureScene(), | |
// but only when bAlwaysPersistRenderingState == true for backward compatibility. | |
if (!CaptureComponent->bCaptureEveryFrame && CaptureComponent->bAlwaysPersistRenderingState) | |
{ |
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
void ACaptureActor::BeginPlay() | |
{ | |
Super::BeginPlay(); | |
UE_LOG(LogTemp, Warning, TEXT("AMyGameModeBase::BeginPlay()")); | |
UGameViewportClient* GameViewportClient = GEngine->GameViewport; | |
FViewport* Viewport = GameViewportClient->Viewport; | |
ULocalPlayer* LocalPlayer = GEngine->GetDebugLocalPlayer(); |
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 <string.h> | |
#define BRAKE 0 | |
#define CW 1 | |
#define CCW 2 | |
#define CS_THRESHOLD 15 // Definition of safety current (Check: "1.3 Monster Shield Example"). | |
//MOTOR 1 | |
#define MOTOR_A1_PIN 7 | |
#define MOTOR_B1_PIN 8 |
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
#!user/bin/python | |
import time | |
import RPi.GPIO as GPIO | |
#Declare the GPIO settings | |
#print "Set GPIO Board numbers" | |
# to use Raspberry pi board pin numbers | |
GPIO.setmode(GPIO.BOARD) |
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
/* | |
analog1.cpp | |
g++ -o Binaries/polulu1 polulu1.cpp -lpigpio -lrt -lpthread | |
sudo ./Binaries/polulu1 | |
gpioWrite(18, 0); // high | |
gpioWrite(18, 1); // low |
OlderNewer