A Pen by SolutionMonk on CodePen.
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Type Checking */ | |
"strict": true, | |
"noImplicitAny": true, | |
"strictNullChecks": true, | |
"strictFunctionTypes": true, | |
"strictBindCallApply": true, | |
"strictPropertyInitialization": true, | |
"noImplicitThis": true, |
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
/* Document | |
* ========================================================================== */ | |
/** | |
* 1. Correct the line height in all browsers. | |
* 2. Prevent adjustments of font size after orientation changes in iOS. | |
*/ | |
:where(html) { | |
line-height: 1.15; /* 1 */ |
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
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Prevent font size inflation */ | |
html { |
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/bash | |
# Enable location services and restart the location daemon. | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Enable location services. | |
enable_location_services() { | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool true |
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
// Hello and welcome to the Array Homework program. This program is designed to demonstrate the use of arrays in C#. | |
// The program will create an array of 3 names, store them in an array variable | |
// prompt the user for a number to select a name from the array | |
// display the name selected by the user | |
// and check for invalid numbers entered by the user. | |
// The program will also demonstrate the use of a do while loop to display the names in the array. | |
string[] names = new string[3] { "John", "Jane", "Joe" }; | |
int nameIndex; |
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 Car | |
{ | |
// Properties | |
public string Color { get; set; } | |
public string Model { get; set; } | |
public int Year { get; set; } | |
// Constructor | |
public Car(string color, string model, int year) | |
{ |
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
/* | |
Requirements: Create a Console Application that has variables | |
to hold a person's name, age, if they are alive, and their phone number. | |
You do not need to capture these values from the user. | |
*/ | |
Console.WriteLine("Hello, and welcome to my first homework assignment"); |
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
// true or false | |
bool isColorBlue = true; | |
bool isNotColorBlue = false; | |
string[] colors = new string[] { "blue", "red"}; | |
if (colors[1] != "red") | |
{ |
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
Console.WriteLine("Welcome to our first C# Application!"); | |
Thread.Sleep(3000); | |
Console.WriteLine("What is your first name?"); | |
var firstName = Console.ReadLine(); | |
Thread.Sleep(3000); | |
Console.WriteLine($"Oh your name is {firstName}? Wonderful first name!"); | |
Thread.Sleep(3000); | |
Console.WriteLine("Now, Please tell me your last name?"); | |
var lastName = Console.ReadLine(); | |
Thread.Sleep(3000); |
NewerOlder