Skip to content

Instantly share code, notes, and snippets.

Batname Batname

Block or report user

Report or block Batname

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View directx11.cpp
// Determine the resolution of the clients desktop screen.
screenWidth = GetSystemMetrics(SM_CXSCREEN);
screenHeight = GetSystemMetrics(SM_CYSCREEN);
// Setup the screen settings depending on whether it is running in full screen or in windowed mode.
// If full screen set the screen to maximum size of the users desktop and 32bit.
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
View GameViewportClient.cpp
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "Engine/GameViewportClient.h"
#include "HAL/FileManager.h"
#include "Misc/CommandLine.h"
#include "Misc/FileHelper.h"
#include "Misc/Paths.h"
#include "Misc/CoreDelegates.h"
#include "Misc/App.h"
#include "GameMapsSettings.h"
View udpserver.cpp
Simple UDP Server
#pragma warning(disable:4996)
#pragma comment(lib,"ws2_32.lib") //Winsock Library
#define BUFLEN 512 //Max length of buffer
View polulu.cpp
g++ -o Binaries/polulu1 polulu1.cpp -lpigpio -lrt -lpthread
sudo ./Binaries/polulu1
gpioWrite(18, 0); // high
gpioWrite(18, 1); // low
import time
import RPi.GPIO as GPIO
#Declare the GPIO settings
#print "Set GPIO Board numbers"
# to use Raspberry pi board pin numbers
View arduinomotor
#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").
#define MOTOR_A1_PIN 7
#define MOTOR_B1_PIN 8
View postprocessingInCapture.cpp
void ACaptureActor::BeginPlay()
UE_LOG(LogTemp, Warning, TEXT("AMyGameModeBase::BeginPlay()"));
UGameViewportClient* GameViewportClient = GEngine->GameViewport;
FViewport* Viewport = GameViewportClient->Viewport;
ULocalPlayer* LocalPlayer = GEngine->GetDebugLocalPlayer();
View SceneCaptureRendering.cpp
void FScene::UpdateSceneCaptureContents(USceneCaptureComponent2D* 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)
View udpserver1.c
/* 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 */
View input.c
#define WINVER 0x0500
#include <windows.h>
void ToogleRecordingKeys()
// This structure will be used to create the keyboard
// input event.
INPUT ipAlt;
You can’t perform that action at this time.