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
clc | |
sum = 0; | |
player = 1; | |
while (sum < 10) | |
choice = -1; | |
fprintf('Player %i\n', player); |
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 class is just a helper package to get the screen dimensions | |
*/ | |
public class ScreenSizeUtils { | |
// helper classes | |
private Context mContext; | |
private WindowManager mWm; | |
private Display mDisplay; | |
private Configuration mConfig; |
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
package csc171.workshop; | |
import java.io.*; | |
public class Main { | |
public static void main(String[] args) throws IOException, FileNotFoundException { | |
// P1 | |
writeHelloWorld(); | |
readHelloWorld(); |
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
// Inverted pendulum (self balancing robot) | |
int i = 0; // Iteration counter | |
byte countS = 0; // ?? | |
double zeroOmegaI = 0; // ?? | |
double recOmegaI[10]; // ?? | |
double omegaI = 0; // Rotational velocity | |
double thetaI = 0; // Rotational angle | |
double sumPower = 0; // ?? | |
double sumSumP = 0; // ?? | |
const double kAngle = 2.5; // (54/200) |
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
/* | |
* The new Design Support Library NavigationView generates a ColorStateList that tints the | |
* selected item with the theme Primary Color | |
* This method generates a ColorStateList the same way but with the theme Accent Color | |
* instead. | |
*/ | |
/** | |
* Util method that builds a themed Color State List with the theme Accent Color as the selected | |
* tint (instead of the Primary Color that NavigationView uses by default) |
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
rem BATCH_RENUMBER.bat | |
rem v1 | |
rem 8 July 2015 | |
rem EAB @ NHF | |
@echo off | |
setlocal EnableDelayedExpansion | |
cls |
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
#!/bin/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
# | |
# To download and run in one step, copy and paste this in to your terminal, | |
# replacing "<thisURL>" with this address and "<remote>" with the name of your endpoint: | |
# sh -c "$(wget -O - <thisURL>)" <remote> |
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 Sub must be in Module1 of the Assembly DocumentProject for the PartsRunner to find it | |
Sub SubPartsRunner(part As PartDocument, parent As AssemblyDocument) | |
Dim parentWidth As String | |
Dim parentHeight As String | |
parentWidth = "WIDTH" | |
parentHeight = "HEIGHT" | |
Dim userParams As UserParameters | |
Set userParams = part.ComponentDefinition.Parameters.UserParameters |
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
function [age,ri,sio,sii,vi,dr,A,T,checkIndex,egen] = ageOfEarth(n,dt) | |
clc | |
format compact | |
fprintf('Running ageOfEarth with parameters %i cells and a time step of %i\n',n,dt); | |
% This function will use an implicit time differencing scheme to solve for | |
% the age of the earth given some stated initial and boundary conditions | |
% Passed Variables |
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
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="[email protected]" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then |
OlderNewer