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
pkg load linear-algebra | |
# Initial Conditions | |
pc = [2,3]; #target pos | |
pb = [12,-2]; #bullet pos | |
vc = [7,3].*(1/3); #target vel | |
sb = 2.8480; #bullet speed | |
tolerance = 0.1; #search tolerance | |
# Routines |
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
https://sites.google.com/site/indy256/algo_cpp/bigint |
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
/// <summary> | |
/// An array-based ring buffer. The internal array can be accessed directly if needed. | |
/// </summary> | |
public class ArrayRingBuffer<T> : IEnumerable<T> { | |
public readonly T[] array; | |
private int startingIndex = 0; | |
private int count; | |
public ArrayRingBuffer(int size, T defaultValue) { | |
array = new T[size]; |
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
// Snake.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include <conio.h> | |
#include <Windows.h> | |
using namespace std; |
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> | |
#include <functional> | |
#include <iterator> | |
#include <vector> | |
struct Node { | |
Node* next = nullptr; | |
int data; | |
}; |
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
// | |
// Trie.cpp | |
// CPPTest | |
// | |
// Created by Eric Fruchter on 12/26/15. | |
// Copyright © 2015 Eric Fruchter. All rights reserved. | |
// | |
#include "Trie.hpp" |
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 System; | |
using System.Collections.Generic; | |
/** | |
* A space-saving data structure to store words and their counts. | |
* Words that share prefixes will have common paths along a branch of the tree. | |
*/ | |
public class Trie | |
{ | |
private TrieNode head; |
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
Shader "Expiremental/CircleCutout" | |
{ | |
Properties | |
{ | |
[PerRendererData] x1 ("1.x", Float) = 0 | |
[PerRendererData] y1 ("1.y", Float) = 0 | |
[PerRendererData] x2 ("2.x", Float) = 0 | |
[PerRendererData] y2 ("2.y", Float) = 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
using UnityEngine; | |
using System.Collections; | |
using System.Text; | |
public class RenderTextureInNewTabExample : MonoBehaviour | |
{ | |
public Texture2D texture; | |
void Start () | |
{ |
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
from nltk.util import ngrams | |
from nltk.model import NgramModel | |
from nltk.probability import LidstoneProbDist | |
# Source: should be formatted on multiple lines for each sentence. | |
SOURCE_TEXT = 'Mystery.txt' | |
LINE_START = "<line>" | |
LINE_END = "</line>" |