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 cribbed from here, but without the emailing - just prints out the results: | |
# https://community.spiceworks.com/scripts/show/4910-remotely-or-locally-run-a-speed-test-via-powershell | |
# https://www.speedtest.net/apps/cli | |
cls | |
$DownloadURL = "https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-win64.zip" | |
#location to save on the computer. Path must exist or it will error | |
$DOwnloadPath = "c:\temp\SpeedTest.Zip" | |
$ExtractToPath = "c:\temp\SpeedTest" | |
$SpeedTestEXEPath = "C:\temp\SpeedTest\speedtest.exe" |
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
var module = angular.module('mySubModule', ['someModule']); | |
module.controller('MyController', ['someService', function MyController(someService) { | |
var self = this; | |
self.coolFun = function() { | |
self.someVar = 'x'; | |
someService.otherFunction(); | |
} | |
}]); |
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
public enum Mode { | |
GROUND, AIR, OCEAN; | |
} | |
// *** GENERIC STYLE *** | |
// 1 command to set the mode | |
public SetModeCommand { | |
private final Mode mode; | |
// constructor, getters, etc | |
} | |
// handler: |
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
String s = Paths.get("").toAbsolutePath().toString(); | |
String newJsonFile = s.replace("\\", "/") + "/src/test/resources/" + jsonFile; | |
try (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newJsonFile), "utf-8"))) { | |
writer.write(json); | |
} catch (IOException ex) { | |
// handle me | |
} |
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
public class Student { | |
//declare variables that will be used | |
private String firstname; | |
private String lastname; | |
private int studentID; | |
private double[] projects; | |
private double[] quizzes; | |
public Student(String first, String last, int id) { | |
//instantiate variables with parameters from the constructor |