Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ats.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ val y: int = id2 7 // works
// can't have polymorphic t@ype parameters
// fn id3 {a:t@ype} (x: a) = x // doesn't compile

// explicity specifying type parameters:
// explicitly specifying type parameters:
fn id4 {a:type} (x: a) = id {a} x // {} for non-template parameters
fn id5 {a:type} (x: a) = id2<a> x // <> for template parameters
fn id6 {a:type} (x: a) = id {..} x // {..} to explicitly infer it
Expand Down
4 changes: 2 additions & 2 deletions ballerina.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function main() returns @tainted error? {
// Compile-time taint checking for handling untrusted data
string s1 = "abc";
mySecureFunction(s1);
// Explicitely make "s2" a tainted value. External input to a Ballerina
// Explicitly make "s2" a tainted value. External input to a Ballerina
// program such as command-line arguments and network input are by-default
// marked as tainted data.
string s2 = <@tainted> s1;
Expand All @@ -283,7 +283,7 @@ public function main() returns @tainted error? {
string s2x = s2 + "abc";
// The following line uncommented will result in a compilation error,
// since we are passing a tainted value (s2x) to a function which
// exepects an untainted value.
// expects an untainted value.
// mySecureFunction(s2x);

// Instantiating objects
Expand Down
2 changes: 1 addition & 1 deletion crystal.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ class Human
@name
end

# The above functionality can be encapsulated using the propery method as follows
# The above functionality can be encapsulated using the property method as follows
property :name

# Getter/setter methods can also be created individually like this
Expand Down
2 changes: 1 addition & 1 deletion css.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ body {
background-color: var(--main-bg-color)
}

/* Perfom a calculation (CSS 3) */
/* Perform a calculation (CSS 3) */
body {
width: calc(100vw - 100px)
}
Expand Down
6 changes: 3 additions & 3 deletions directx9.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ bool SetupTransform() {
result = _device->SetTransform(D3DTS_VIEW, &view); // apply the view matrix
if (FAILED(result))
return false;
// Create a projection matrix that defines the view frustrum.
// Create a projection matrix that defines the view frustum.
// It transforms the view space to projection space.
D3DXMATRIX projection{ };
// Create a perspective projection using a left-handed coordinate system.
Expand Down Expand Up @@ -611,7 +611,7 @@ ComPtr<IDirect3DDevice9> _device{ };
ComPtr<IDirect3DVertexBuffer9> _vertexBuffer{ };
ComPtr<IDirect3DIndexBuffer9> _indexBuffer{ };
ComPtr<IDirect3DVertexDeclaration9> _vertexDecl{ };
// We have to add a ComPtr for the vertex- and pixel shader, aswell as one
// We have to add a ComPtr for the vertex- and pixel shader, as well as one
// for the constants (matrices) in our vertex shader.
ComPtr<IDirect3DVertexShader9> _vertexShader{ };
ComPtr<IDirect3DPixelShader9> _pixelShader{ };
Expand Down Expand Up @@ -666,7 +666,7 @@ bool SetupTransform() {
return true;
}
// ...
// Vertex and index buffer creation aswell as initialization stay unchanged.
// Vertex and index buffer creation as well as initialization stay unchanged.
// ...
// After checking that shader model 3.0 is available we have to compile and
// create the shaders.
Expand Down
2 changes: 1 addition & 1 deletion easylang.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ b[] = a[]
a[] &= 4
print a[] ; print b[]
#
# array swapping ist fast
# array swapping is fast
#
swap a[] b[]
print a[] ; print b[]
Expand Down
2 changes: 1 addition & 1 deletion emacs.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ briefly.
- Manage tables in plain text (including spreadsheet-like
capabilities)
- Using the extension `org-babel`, write and execute code blocks in
your file. The results are captured and are re-usable within the
your file. The results are captured and are reusable within the
file itself. Think Jupyter notebook for any language.
- Display inline images and LaTeX formulas as images within your file
(makes for a great note-taking system and/or personal wiki)
Expand Down
4 changes: 2 additions & 2 deletions fortran.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ contains ! Start defining the program's internal procedures:
integer :: f
! function return type declared inside the function.
integer :: cnt = 0 ! GOTCHA -
! assigning a value at initalization
! assigning a value at initialization
! implies that the variable is
! saved between function calls.

Expand Down Expand Up @@ -478,7 +478,7 @@ do concurrent (x = 1:size(array, 1), y = 1:size(array, 2))
array(x, y) = real(x)
end do

! loop indices can also declared inside the contruct:
! loop indices can also declared inside the construct:

real :: array(8, 16)

Expand Down
6 changes: 3 additions & 3 deletions golfscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ can pipe in or enter in your input at runtime.
[[1 2 3 0]]
> $ # we can also restore order by sorting the array
[[0 1 2 3]]
> 1 > # we can also use < > and = to get the indeces that match. Note this
> 1 > # we can also use < > and = to get the indices that match. Note this
# is not a filter! This is an index match. Filtering items greater than one
# is done with {1>},
[[1 2 3]]
> 2 < # remember it's zero-indexed, so everything in this array is at an index
# less than 2, the indeces are 0 and 1.
# less than 2, the indices are 0 and 1.
[[1 2]]
> 1= # < and > return an array, even if it's one item. Equals always drops
# it out of the array
Expand Down Expand Up @@ -308,7 +308,7 @@ I drive a stick, BTW.
> 6),(;{*}* # but can we get shorter? We can save some space by incrementing
# the 6, dropping the zero, and folding. 8 characters.
> # we can also use fold to do the same thing with unfold
1 6 # accumlator and multiplicand, we'll call A and M
1 6 # accumulator and multiplicand, we'll call A and M
{}{ # while M
. # copy M, so now the stack is A M M
@ # bring A to the top, so now M M A
Expand Down
2 changes: 1 addition & 1 deletion hcl.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ filename: terraform.txt
## Introduction

HCL (Hashicorp Configuration Language) is a high-level configuration language used in tools from
Hashicorp (such as Terraform). HCL/Terraform is widely used in provisioning cloud infastructure and
Hashicorp (such as Terraform). HCL/Terraform is widely used in provisioning cloud infrastructure and
configuring platforms/services through APIs. This document focuses on HCL 0.13 syntax.

HCL is a declarative language and Terraform will consume all `*.tf` files in the current folder, so code
Expand Down
2 changes: 1 addition & 1 deletion julia.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ascii("This is a string")[1] # => 'T'
# Beware, Julia indexes everything from 1 (like MATLAB), not 0 (like most languages).
# Otherwise, iterating over strings is recommended (map, for loops, etc).

# String can be compared lexicographically, in dictionnary order:
# String can be compared lexicographically, in dictionary order:
"good" > "bye" # => true
"good" == "good" # => true
"1 + 2 = 3" == "1 + 2 = $(1 + 2)" # => true
Expand Down
2 changes: 1 addition & 1 deletion kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fun helloWorld(val name : String) {
println(even(7)) // => false

/*
You can also use lambda functions, with the '->' operator seperating
You can also use lambda functions, with the '->' operator separating
the parameters from the function body.
*/
val fooLambda: (Int) -> Int = {n -> n + 1}
Expand Down
4 changes: 2 additions & 2 deletions m.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Output Formatting characters:

The ! character is syntax for a new line.
The # character is syntax for a new page.
The sequence of the ? character and then a numeric expression is syntax for output of spaces until the number'th colum is printed.
The sequence of the ? character and then a numeric expression is syntax for output of spaces until the number'th column is printed.

Multiple statements can be provided as additional arguments before the space separators to the next command:

Expand Down Expand Up @@ -245,7 +245,7 @@ w "hello"

#### Quit (abbreviated as Q)
Stop executing this block and return to the previous stack level.
Quit can return a value, following the comamnd with a single space.
Quit can return a value, following the command with a single space.
Quit can stop a loop. remember to follow with two spaces.
Quit outside a loop will return from the current subroutine followed by two spaces or a linefeed

Expand Down
2 changes: 1 addition & 1 deletion mercurial.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ anyone working with versioned files.

### What is version control?

Version control is a system that keeps track fo changes to a set of file(s)
Version control is a system that keeps track of changes to a set of file(s)
and/or directorie(s) over time.

### Why use Mercurial?
Expand Down
2 changes: 1 addition & 1 deletion messagepack.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ List<String> dst1 = msgpack.read(raw, Templates.tList(Templates.TString));
System.out.println(dst1.get(0));
System.out.println(dst1.get(1));

// Or, Deserialze to Value then convert type.
// Or, Deserialize to Value then convert type.
Value dynamic = msgpack.read(raw);
List<String> dst2 = new Converter(dynamic)
.read(Templates.tList(Templates.TString));
Expand Down
24 changes: 12 additions & 12 deletions opengl.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ contributors:
(API) for rendering 2D computer graphics and 3D vector graphics.<sup>[1]</sup> In this tutorial we will be
focusing on modern OpenGL from 3.3 and above, ignoring "immediate-mode", Displaylists and
VBO's without use of Shaders.
I will be using C++ with SFML for window, image and context creation aswell as GLEW
for modern OpenGL extensions, though there are many other librarys available.
I will be using C++ with SFML for window, image and context creation as well as GLEW
for modern OpenGL extensions, though there are many other libraries available.

```cpp
// Creating an SFML window and OpenGL basic setup.
Expand Down Expand Up @@ -257,7 +257,7 @@ glDrawArrays(GL_QUADS, 0, 4);
glBindVertexArray(0);
window.display();
// ...
// Ofcource we have to delete the allocated memory for the VAO and VBO at
// Of course we have to delete the allocated memory for the VAO and VBO at
// the end of our application.
// ...
glDeleteBuffers(1, &vbo);
Expand Down Expand Up @@ -472,7 +472,7 @@ You can find the current code here: [OpenGL - 2](https://pastebin.com/R3Z9ACDE).
## Textures

To load out texture we first need a library that loads the data, for simplicity I will be
using SFML, however there are a lot of librarys for loading image data.
using SFML, however there are a lot of libraries for loading image data.

```cpp
// Lets save we have a texture called "my_tex.tga", we can load it with:
Expand Down Expand Up @@ -592,7 +592,7 @@ You can find the current code here: [OpenGL - 3](https://pastebin.com/u3bcwM6q)
layout(location = 0) in vec3 position;
layout(location = 1) in vec3 color;
layout(location = 2) in vec2 texCoords;
// Create 2 4x4 matricies, 1 for the projection matrix
// Create 2 4x4 matrices, 1 for the projection matrix
// and 1 for the model matrix.
// Because we draw in a static scene, we don't need a view matrix.
uniform mat4 projection;
Expand All @@ -606,7 +606,7 @@ void main() {
fTexCoords = texCoords;
// Multiplay the position by the model matrix and then by the
// projection matrix.
// Beware order of multiplication for matricies!
// Beware order of multiplication for matrices!
gl_Position = projection * model * vec4(position, 1.0);
}
```
Expand All @@ -621,10 +621,10 @@ std::vector<float> vertexData {
1.0f, 0.0f, 0.0f, // bottom right
1.0f, 1.0f, 0.0f // top right
};
// Request the location of our matricies.
// Request the location of our matrices.
GLint projectionLocation = glGetUniformLocation(program, "projection");
GLint modelLocation = glGetUniformLocation(program, "model");
// Declaring the matricies.
// Declaring the matrices.
// Orthogonal matrix for a 1024x768 window.
std::vector<float> projection {
0.001953f, 0.0f, 0.0f, 0.0f,
Expand All @@ -640,7 +640,7 @@ std::vector<float> model {
0.0f, 0.0f, 1.0f, 0.0f,
50.0f, 50.0f, 0.0f, 1.0f
};
// Now we can send our calculated matricies to the program.
// Now we can send our calculated matrices to the program.
glUseProgram(program);
glUniformMatrix4fv(projectionLocation, // location
1, // count
Expand All @@ -655,8 +655,8 @@ The application should now display the texture at the defined position and size.
You can find the current code here: [OpenGL - 4](https://pastebin.com/9ahpFLkY)

```cpp
// There are many math librarys for OpenGL, which create
// matricies and vectors, the most used in C++ is glm (OpenGL Mathematics).
// There are many math libraries for OpenGL, which create
// matrices and vectors, the most used in C++ is glm (OpenGL Mathematics).
// Its a header only library.
// The same code using glm would look like:
glm::mat4 projection{ glm::ortho(0.0f, 1024.0f, 768.0f, 0.0f) };
Expand All @@ -676,7 +676,7 @@ glUniformMatrix4fv(modelLocation, 1, GL_FALSE,
Geometry shaders were introduced in OpenGL 3.2, they can produce vertices
that are send to the rasterizer. They can also change the primitive type e.g.
they can take a point as an input and output other primitives.
Geometry shaders are inbetween the vertex and the fragment shader.
Geometry shaders are in between the vertex and the fragment shader.

**Vertex Shader**

Expand Down
4 changes: 2 additions & 2 deletions openmp.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ It is simple to parallelise loops using OpenMP. Using a work-sharing directive w
}
```

A loop must be easily parallelisable for OpenMP to unroll and facilitate the assignment amoungst threads.
If there are any data dependancies between one iteration to the next, OpenMP can't parallelise it.
A loop must be easily parallelisable for OpenMP to unroll and facilitate the assignment amongst threads.
If there are any data dependencies between one iteration to the next, OpenMP can't parallelise it.

## Speed Comparison

Expand Down
6 changes: 3 additions & 3 deletions osl.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ volume multiply(float a = 0.0, float b = 0.0, output float c = 0.0){
int i = 18;
printf("I am %d years old",i); // I am 18 years old

// String functions can alse be used
// String functions can also be used
int strlen (string s); // gives the length of the string
int len = strlen("Hello, World!"); // len = 13

Expand All @@ -225,7 +225,7 @@ volume multiply(float a = 0.0, float b = 0.0, output float c = 0.0){
// HSV stands for (Hue, Saturation, Luminance)
// HSL stands for (Hue, Saturation, Lightness)
// YIQ, XYZ and xyY formats can also be used
// We can also access the indivudual values of (R,G,B)
// We can also access the individual values of (R,G,B)
float Red = p[0]; // 0 (access the red component)
float Green = p[1]; // 1 (access the green component)
float Blue = p[2]; // 2 (access the blue component)
Expand Down Expand Up @@ -303,7 +303,7 @@ volume multiply(float a = 0.0, float b = 0.0, output float c = 0.0){
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0 */

matrix m = 7; // Maked a 4x4 scalar matrix with scaling factor of 7
matrix m = 7; // makes a 4x4 scalar matrix with scaling factor of 7
/* 7.0, 0.0, 0.0, 0.0,
0.0, 7.0, 0.0, 0.0,
0.0, 0.0, 7.0, 0.0,
Expand Down
10 changes: 5 additions & 5 deletions phix.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ filename: learnphix.exw
-- a named constant object
constant myPI = 22/7

// Everything is an ''object'', just two fundemental kinds
// Everything is an ''object'', just two fundamental kinds
/*
┌────────────────────▄
┌─┤ object █─┐
Expand Down Expand Up @@ -91,7 +91,7 @@ filename: learnphix.exw
class ════════════════╝
*/

// Syntax is consistant: "keyword...end keyword"
// Syntax is consistent: "keyword...end keyword"

-- no invisible syntax or extra rules needed.

Expand Down Expand Up @@ -120,7 +120,7 @@ filename: learnphix.exw
elsif p > 10 then
? "p is a large number"
else
? "p is inbetween"
? "p is in between"
end if

// conditional
Expand All @@ -134,7 +134,7 @@ filename: learnphix.exw
default: ? "ch is something else"
end switch

// Operators are always consistant; never overloaded.
// Operators are always consistent; never overloaded.

-- the + operator ''always adds''
? 2+7 --> 9
Expand Down Expand Up @@ -170,7 +170,7 @@ filename: learnphix.exw
end procedure
sum_all( {1,3,9,11} )

// Recursion and mutal recursion are permitted
// Recursion and mutual recursion are permitted

function factorial(number n)
if n == 0 then
Expand Down
2 changes: 1 addition & 1 deletion powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ $False - 5 # => -5
# (-is vs. -eq) -is checks if two objects are the same type.
# -eq checks if the objects have the same values, but sometimes doesn't work
# as expected.
# Note: we called '[Math]' from .NET previously without the preceeding
# Note: we called '[Math]' from .NET previously without the preceding
# namespaces. We can do the same with [Collections.ArrayList] if preferred.
[System.Collections.ArrayList]$a = @() # Point a at a new list
$a = (1,2,3,4)
Expand Down
4 changes: 2 additions & 2 deletions processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ arc(x, y, width, height, start, stop, [mode]);

// Curves
// Processing provides two implementation of curves; using curve() and bezier().
// Since I plan to keep this simple I wont be discussing any further details.
// Since I plan to keep this simple I won't be discussing any further details.
// However, if you want to implement it in your sketch, here are the references:
// (https://processing.org/reference/curve_.html)
// (https://processing.org/reference/bezier_.html)
Expand All @@ -309,7 +309,7 @@ sphere(radius); // Its size is defined using the radius parameter
// More information here: (https://processing.org/reference/sphereDetail_.html)

// Irregular Shapes
// What if you wanted to draw something thats not made available by Processing
// What if you wanted to draw something that's not made available by Processing
// functions?
// You can use beginShape(), endShape(), vertex(x,y) to define shapes by
// specifying each point. More information here:
Expand Down
Loading