Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Paul T DeveloperPaul123

🎯
Focusing
Block or report user

Report or block DeveloperPaul123

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 1d_interpolation.cpp
#include <iostream>
#include <cmath>
double interpolate(double input_min, double input_max, double output_min, double output_max, double input_value)
{
return output_min + ((output_max - output_min)/(input_max - input_min)) * (input_value - input_min);
}
int main()
{
View random_cpp_algorithms.cpp
#include <iostream>
#include <iterator>
#include <algorithm>
#include <string>
#include <unordered_map>
template<typename InputIterator, typename T, typename Functor>
void split(InputIterator first, InputIterator last, const T& t, Functor f)
{
while(true)
@DeveloperPaul123
DeveloperPaul123 / AudioManager.cs
Created Jul 30, 2017
Audio management in Unity 5.
View AudioManager.cs
using UnityEngine.Audio;
using System;
using UnityEngine;
public class AudioManager : MonoBehaviour
{
public static AudioManager instance;
public AudioMixerGroup mixerGroup;
@DeveloperPaul123
DeveloperPaul123 / DMX_ETH_17_Motor.cpp
Created Sep 19, 2016
Arcus Ethernet Motor Class based on QT
View DMX_ETH_17_Motor.cpp
/**
* Constructor. Miscellaneous initilization of some variables.
*/
DMX_ETH_17_Motor::DMX_ETH_17_Motor() {
isConnected = false;
mSocket = new QTcpSocket();
}
/**
* Returns whether or not the motor is connected.
@DeveloperPaul123
DeveloperPaul123 / ImageSaver.h
Created Nov 13, 2015
Easy way to save a QImage in a background thread in c++ applications based on qt.
View ImageSaver.h
/**
* Image saver class. Saves an image in the background.
*/
class ImageSaver : public QObject
{
//based on: http://stackoverflow.com/questions/13878745/correct-way-of-threading-in-qt
Q_OBJECT
public:
/**
@DeveloperPaul123
DeveloperPaul123 / FileEncoder.java
Created Jun 26, 2015
Simple utility for encoding and decoding files to binary
View FileEncoder.java
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Base64;
/**
* Created by Paul on 6/25/2015.
* Encodes and decodes files to and from binary format.
*/
@DeveloperPaul123
DeveloperPaul123 / TimerGenerator.java
Last active Aug 29, 2015
Simple class that generates a timer and can be bound to an activity or TextView to provide formatted text.
View TimerGenerator.java
import android.os.Handler;
import android.widget.TextView;
import java.lang.ref.SoftReference;
/**
* Created by Pauly D on 4/7/2015.
*/
public class TimerGenerator {
@DeveloperPaul123
DeveloperPaul123 / gist:4b58f761c1644afdcde9
Created Mar 18, 2015
This is an example of a datasource and database open helper method for SQLite databasing in Android
View gist:4b58f761c1644afdcde9
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Pauly D on 3/14/2015.
You can’t perform that action at this time.