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 <iostream> | |
using namespace::std; | |
int width = -1; | |
int height = -1; | |
char** mineBoard; | |
int main(int argc, char* argv[]) { | |
while (width != 0 && height != 0) { |
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 "Matrix.h" | |
float const Matrix::identityMatrix[] = { | |
1,0,0,0, | |
0,1,0,0, | |
0,0,1,0, | |
0,0,0,1 | |
}; | |
Matrix Matrix::MultiplyMatrices(const Matrix* m1, const Matrix* m2) { |
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
-*- mode: compilation; default-directory: "~/dev/OpenGL/Test73DOpenGL/" -*- | |
Compilation started at Mon Jun 1 13:49:42 | |
make -k \ | |
g++ -I/usr/local/include main.cpp Vertex.cpp Matrix.cpp Utils.cpp -o main -L/usr/local/lib -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework CoreVideo -lGLEW | |
Matrix.cpp:13:14: error: array type 'float [16]' is not assignable | |
result.m = Matrix::Identity(); | |
~~~~~~~~ ^ | |
1 error generated. | |
make: *** [all] Error 1 |
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
using UnityEngine; | |
using System.Collections; | |
public class ExampleClass : MonoBehaviour { | |
public Transform gunObj; | |
void Update() { | |
if (Input.GetMouseButton(0)) { | |
RaycastHit hit; | |
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); | |
if (Physics.Raycast(ray, out hit)) { |
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
/* | |
Created by | |
Juan Sebastian Munoz Arango | |
[email protected] | |
all rights reserved | |
*/ | |
namespace ProDrawCall { | |
using System; | |
using System.Collections.Generic; |
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
/* | |
Created by | |
Juan Sebastian Munoz Arango | |
[email protected] | |
all rights reserved | |
*/ | |
namespace ProDrawCall { | |
using System; | |
using System.Collections.Generic; |
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
[MenuItem("FixLODRendeer")] | |
static void LODRendeer() | |
{ | |
LODGroup[] lodgroups = (LODGroup[])GameObject.FindObjectsOfType(typeof(LODGroup)); | |
//For every LOD group: get the current groups and get the renderer names.. | |
foreach (LODGroup lodgroup in lodgroups) | |
{ | |
SerializedObject obj = new SerializedObject(lodgroup); | |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
public class LODFixer { | |
[MenuItem("Window/FixLODRendeer")] | |
static void LODRendeer() |
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
/* | |
Problem: | |
Given 2 strings, write a method to know if one is a permutation of the | |
other. | |
Approach: | |
if we assume the string is in ASCII, we can use an integer array of 256 | |
chars and mark the used chars and add them. | |
Assuming the interviewer mentions the string is in UNICODE, then the max # |
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
/* | |
--- Day 4: Repose Record --- | |
You've sneaked into another supply closet - this time, it's across | |
from the prototype suit manufacturing lab. You need to sneak inside | |
and fix the issues with the suit, but there's a guard stationed | |
outside the lab, so this is as close as you can safely get. | |
As you search the closet for anything that might help, you discover | |
that you're not the first person to want to sneak in. Covering the | |
walls, someone has spent an hour starting every midnight for the past |