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
""" | |
GitHub User Repository Language Analyzer | |
Created By: Ben Reeves | |
Date: January 8, 2015 | |
Description: | |
This script uses the PyGithub library to access the Github API in order to perform some data analysis on a user's | |
repositories. Specifically, it will analyze all of the user's code and calculate the percentage of code written in | |
different programming languages. | |
""" |
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
//THIS is where aaalll the magic happens. | |
void MeshRenderer::render() | |
{ | |
ShaderProgram* shader = m_material->getShader(); | |
//Update the "modelMatrix" uniform | |
string modelMatrixStr("modelMatrix"); | |
if (!shader->hasUniform(modelMatrixStr)) | |
{ | |
//throw BengineException("The compiled shader is missing uniform 'modelMatrix'."); |
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
using UnityEngine; | |
using System.Collections; | |
public class ArmController : MonoBehaviour | |
{ | |
public float armSpeed = 10f; //degrees per second | |
public float leftLimit = 310f; | |
public float rightLimit = 50f; | |
public float arm; |
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
using UnityEngine; | |
using System.Collections; | |
public class CameraController : MonoBehaviour | |
{ | |
private TargetChaser chaser; | |
private Vector3 initialPosition; | |
private Quaternion initialRotation; | |
XboxInput xInput; |
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
using UnityEngine; | |
using System.Collections; | |
[System.Serializable] | |
public class Drive | |
{ | |
public MecanumWheel frontRight; | |
public MecanumWheel frontLeft; | |
public MecanumWheel backRight; | |
public MecanumWheel backLeft; |
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
def solve(numbers, value): | |
""" | |
Uses arithmetic (*, +, -, /) to arrive at value, using my custom recursive algorithm | |
:param numbers: The list of numbers we're going to use to arrive at value | |
:param value: The value that we want to arrive at using all of the | |
:return: If solvable, returns a Solution instance. If not, returns False. | |
""" | |
# Referring to the global variables we want to modify | |
global num_attempts | |
global current_attempt |
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
/** | |
* Begins the search to find the device's location. When it finishes or times out, | |
* it will invoke onLocationFound(Location) on all OnLocationFoundListeners | |
* in mLocationFoundListeners. If a listener cancels its request for a Location, | |
* but there are still others waiting, the search will continue. | |
* | |
* @param timeoutMillis The amount of time, in milliseconds, | |
* that we should search for a location | |
* @return True if we were able to include listener in a new or existing search, or false | |
* if we were unable to begin searching or if listener was already listening |
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 <Testing.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <core/GameObject.h> | |
#include <math/RandomGenerator.h> |
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
#ifndef BENGINE_VECTOR3_H | |
#define BENGINE_VECTOR3_H | |
#include <Engine.h> | |
#include <math/Vector2.h> | |
using Math::Vector2; | |
namespace Math |
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
Matrix2x2 Matrix2x2::adjugate(const Matrix2x2& matrix) | |
{ | |
return Matrix2x2( | |
matrix.c1r1 , -1 * matrix.c1r0, | |
-1 * matrix.c0r1 , matrix.c0r0); | |
} | |
float Matrix2x2::determinant(const Matrix2x2& matrix) | |
{ | |
return matrix.c0r0 * matrix.c1r1 - matrix.c1r0 * matrix.c0r1; |
OlderNewer