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

@ -5,14 +5,14 @@ func main() {
} else { } else {
return -x return -x
} }
// You can put one statement before the condition // You can put one statement before the condition
if a := b + c; a < 42 { if a := b + c; a < 42 {
return a return a
} else { } else {
return a - 42 return a - 42
} }
// Type assertion inside if // Type assertion inside if
var val interface{} var val interface{}
val = "foo" 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: * Here's the same function, but expanded about a different point, x = 3pi/2:
*) *)
Series[Cos[x], {x, 3 Pi/2, 6}] 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 (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 * 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 * 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. * Mathematica to actually evaluate the function rather than hold it as an expression.

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

@ -3,7 +3,7 @@ sudo apt-get install nodejs-legacy
sudo apt-get install npm sudo apt-get install npm
sudo npm install -g azure-cli 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 azure login
# This will prompt for your password in the console # 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 # Remove all disks of VMs labeled with LABEL
for disk in $(azure vm disk list | grep LABEL | awk '{print $2}') for disk in $(azure vm disk list | grep LABEL | awk '{print $2}')
do do
azure vm disk delete --blob-delete "$disk" azure vm disk delete --blob-delete "$disk"
done done

Loading…
Cancel
Save