Remove trailing whitespaces

pull/117/head
terminalforlife 4 years ago
parent 04830f284c
commit 4e5d24464c

@ -1,44 +1,44 @@
// classes are like structs, but everything is by default private.
// classes are like structs, but everything is by default private.
// Declaration
ObjectName className {
// Sets everything below it to be private.
// Declaration
ObjectName className {
// Sets everything below it to be private.
private:
// Declaration of variables
int a;
// Declaration of variables
int a;
string b;
// Implement any private / helper functions below
// Sets everything below it to be public.
public:
// Constructor
structName(new_a, new_b) {
a = new_a;
b = new_b;
structName(new_a, new_b) {
a = new_a;
b = new_b;
}
// accessors or getters functions
int getA() {
return a;
// accessors or getters functions
int getA() {
return a;
}
string getB() {
return b;
string getB() {
return b;
}
// mutators or setter functions
// mutators or setter functions
void setA(int new_a) {
a = new_a;
}
void setB(int new_b) {
b = new_b;
void setB(int new_b) {
b = new_b;
}
// Implement any public functions below
};
// Accessing PUBLIC variables
ObjectName v = structName(5, "Hello"); // Creates a struct via the constructor
// Accessing PUBLIC variables
ObjectName v = structName(5, "Hello"); // Creates a struct via the constructor
std::cout << v.a << " " << v.b << std::endl; // Prints to console "5 Hello"

@ -1,21 +1,21 @@
// structs are like classes, but everything is by default public
// Declaration
ObjectName structName {
// Declaration of variables
int a;
// Declaration
ObjectName structName {
// Declaration of variables
int a;
string b;
// Constructor
structName(new_a, new_b) {
a = new_a;
b = new_b;
structName(new_a, new_b) {
a = new_a;
b = new_b;
}
// Implement any public functions below
};
// Accessing PUBLIC variables
ObjectName v = structName(5, "Hello"); // Creates a struct via the constructor
// Accessing PUBLIC variables
ObjectName v = structName(5, "Hello"); // Creates a struct via the constructor
std::cout << v.a << " " << v.b << std::endl; // Prints to console "5 Hello"

@ -5,14 +5,14 @@ func main() {
} else {
return -x
}
// You can put one statement before the condition
if a := b + c; a < 42 {
return a
} else {
return a - 42
}
// Type assertion inside if
var val interface{}
val = "foo"

@ -14,11 +14,11 @@ Series[Cos[x], {x, 0, 6}]
*
* Here's the same function, but expanded about a different point, x = 3pi/2:
*)
Series[Cos[x], {x, 3 Pi/2, 6}]
(x-3pi/2) - 1/6*(x-3pi/2)^3 + 1/120*(x-3pi/2)^5 + O[x-3pi/2]^7
(*
(*
* When plotting series, remember to wrap the function in both a call to Normal AND
* a call to Evaluate: this strips the extra term mentioned previously and tells
* Mathematica to actually evaluate the function rather than hold it as an expression.

@ -8,7 +8,7 @@
// * Character
// * Optional a variable that can hold either a value or no value.
// * Tuples
//
//
// | -------|-------------------|-----------------------------------------------|
// | Type | Typical Bit Width| Typical Range |
// | -------|-------------------|-----------------------------------------------|
@ -27,7 +27,7 @@
typealias Feet = Int
var distance: Feet = 100
print(distance)
// Type inference:
//
// varA is inferred to be of type Int

@ -3,7 +3,7 @@ sudo apt-get install nodejs-legacy
sudo apt-get install npm
sudo npm install -g azure-cli
# This will output an url and a device code for you to use browser to login
# This will output an url and a device code for you to use browser to login
azure login
# This will prompt for your password in the console
@ -23,7 +23,7 @@ azure vm disk list
# Remove all disks of VMs labeled with LABEL
for disk in $(azure vm disk list | grep LABEL | awk '{print $2}')
do
do
azure vm disk delete --blob-delete "$disk"
done

Loading…
Cancel
Save