diff options
-rw-r--r-- | CHICKEN.html.markdown | 2 | ||||
-rw-r--r-- | angularjs.html.markdown | 31 | ||||
-rw-r--r-- | c.html.markdown | 16 | ||||
-rw-r--r-- | css.html.markdown | 6 | ||||
-rw-r--r-- | java.html.markdown | 4 | ||||
-rw-r--r-- | javascript.html.markdown | 11 | ||||
-rw-r--r-- | powershell.html.markdown | 6 | ||||
-rw-r--r-- | scala.html.markdown | 18 | ||||
-rw-r--r-- | sk-sk/elixir.html.markdown | 2 |
9 files changed, 57 insertions, 39 deletions
diff --git a/CHICKEN.html.markdown b/CHICKEN.html.markdown index c6a3a914..080527a9 100644 --- a/CHICKEN.html.markdown +++ b/CHICKEN.html.markdown @@ -479,7 +479,7 @@ sqr ;; => #<procedure (sqr x)> ;; Functors ;; Functors are high level modules that can be parameterized by other modules -;; Following functor requires another module named 'M' that provides a funtion called 'multiply' +;; Following functor requires another module named 'M' that provides a function called 'multiply' ;; The functor itself exports a generic function 'square' (functor (squaring-functor (M (multiply))) (square) (import scheme M) diff --git a/angularjs.html.markdown b/angularjs.html.markdown index f4f6375f..89afa291 100644 --- a/angularjs.html.markdown +++ b/angularjs.html.markdown @@ -18,9 +18,10 @@ AngularJS extends HTML attributes with Directives, and binds data to HTML with E ##What You Should Already Know Before you study AngularJS, you should have a basic understanding of: -* HTML -* CSS -* JavaScript + +- HTML +- CSS +- JavaScript ```html // AngularJS is a JavaScript framework. It is a library written in JavaScript. @@ -279,11 +280,11 @@ angular.module('myApp', []).controller('namesCtrl', function($scope) { // Filters can be added to expressions and directives using a pipe character. // AngularJS filters can be used to transform data: -**currency: Format a number to a currency format. -**filter: Select a subset of items from an array. -**lowercase: Format a string to lower case. -**orderBy: Orders an array by an expression. -**uppercase: Format a string to upper case. +- **currency**: Format a number to a currency format. +- **filter**: Select a subset of items from an array. +- **lowercase**: Format a string to lower case. +- **orderBy**: Orders an array by an expression. +- **uppercase**: Format a string to upper case. //A filter can be added to an expression with a pipe character (|) and a filter. //(For the next two examples we will use the person controller from the previous chapter) @@ -696,13 +697,15 @@ app.controller('myCtrl', function($scope) { ## Source & References -**Examples -* http://www.w3schools.com/angular/angular_examples.asp +**Examples** + +- http://www.w3schools.com/angular/angular_examples.asp + +**References** -**References -* http://www.w3schools.com/angular/angular_ref_directives.asp -* http://www.w3schools.com/angular/default.asp -* https://teamtreehouse.com/library/angular-basics/ +- http://www.w3schools.com/angular/angular_ref_directives.asp +- http://www.w3schools.com/angular/default.asp +- https://teamtreehouse.com/library/angular-basics/ Feedback is welcome! You can find me in: [@WalterC_87](https://twitter.com/WalterC_87), or diff --git a/c.html.markdown b/c.html.markdown index ae87ca08..57ce72d2 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -202,7 +202,7 @@ int main (int argc, char** argv) 11 % 3; // => 2 // Comparison operators are probably familiar, but - // there is no Boolean type in c. We use ints instead. + // there is no Boolean type in C. We use ints instead. // (Or _Bool or bool in C99.) // 0 is false, anything else is true. (The comparison // operators always yield 0 or 1.) @@ -715,14 +715,14 @@ typedef void (*my_fnp_type)(char *); /******************************* Header Files ********************************** -Header files are an important part of c as they allow for the connection of c +Header files are an important part of C as they allow for the connection of C source files and can simplify code and definitions by separating them into separate files. -Header files are syntactically similar to c source files but reside in ".h" -files. They can be included in your c source file by using the precompiler +Header files are syntactically similar to C source files but reside in ".h" +files. They can be included in your C source file by using the precompiler command #include "example.h", given that example.h exists in the same directory -as the c file. +as the C file. */ /* A safe guard to prevent the header from being defined too many times. This */ @@ -753,12 +753,12 @@ enum traffic_light_state {GREEN, YELLOW, RED}; /* Function prototypes can also be defined here for use in multiple files, */ /* but it is bad practice to define the function in the header. Definitions */ -/* should instead be put in a c file. */ +/* should instead be put in a C file. */ Node createLinkedList(int *vals, int len); -/* Beyond the above elements, other definitions should be left to a c source */ +/* Beyond the above elements, other definitions should be left to a C source */ /* file. Excessive includes or definitions should, also not be contained in */ -/* a header file but instead put into separate headers or a c file. */ +/* a header file but instead put into separate headers or a C file. */ #endif /* End of the if precompiler directive. */ diff --git a/css.html.markdown b/css.html.markdown index 1c569d04..3b378d44 100644 --- a/css.html.markdown +++ b/css.html.markdown @@ -169,9 +169,9 @@ selector { color: transparent; /* equivalent to setting the alpha to 0 */ color: hsl(0, 100%, 50%); /* as hsl percentages (CSS 3) */ color: hsla(0, 100%, 50%, 0.3); /* as hsl percentages with alpha */ - + /* Borders */ - border-width:5px; + border-width:5px; border-style:solid; border-color:red; /* similar to how background-color is set */ border: 5px solid red; /* this is a short hand approach for the same */ @@ -261,7 +261,7 @@ recommended that you avoid its usage. ## Media Queries -CSS Media Queries are a feature in CSS 3 which allows you to specify when certain CSS rules should be applied, such as when printed, or when on a screen with certain dimensions or pixel density. They do not add to the selector's specifity. +CSS Media Queries are a feature in CSS 3 which allows you to specify when certain CSS rules should be applied, such as when printed, or when on a screen with certain dimensions or pixel density. They do not add to the selector's specificity. ```css /* A rule that will be used on all devices */ diff --git a/java.html.markdown b/java.html.markdown index 4fdd06cc..12de0c73 100644 --- a/java.html.markdown +++ b/java.html.markdown @@ -848,6 +848,10 @@ The links provided here below are just to get an understanding of the topic, fee * [Java Code Conventions](https://www.oracle.com/technetwork/java/codeconvtoc-136057.html) +* New features in Java 8: + * [Lambda expressions (functional programming)](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html) + * [Date and time API (java.time package)](http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html) + **Online Practice and Tutorials** * [Learneroo.com - Learn Java](http://www.learneroo.com) diff --git a/javascript.html.markdown b/javascript.html.markdown index 98261334..38119864 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -230,6 +230,17 @@ for (var i = 0; i < 5; i++){ // will run 5 times } +// Breaking out of labeled loops is similar to Java +outer: +for (var i = 0; i < 10; i++) { + for (var j = 0; j < 10; j++) { + if (i == 5 && j ==5) { + break outer; + // breaks out of outer loop instead of only the inner one + } + } +} + // The for/in statement iterates over every property across the entire prototype chain. var description = ""; var person = {fname:"Paul", lname:"Ken", age:18}; diff --git a/powershell.html.markdown b/powershell.html.markdown index 492e7153..f34d5b4e 100644 --- a/powershell.html.markdown +++ b/powershell.html.markdown @@ -113,7 +113,7 @@ if ($Age -is [string]) { echo 'Adult' } -# Switch statements are more powerfull compared to most languages +# Switch statements are more powerful compared to most languages $val = "20" switch($val) { { $_ -eq 42 } { "The answer equals 42"; break } @@ -204,7 +204,7 @@ function foo([string]$name) { # Calling your function foo "Say my name" -# Functions with named parameters, parameter attributes, parsable documention +# Functions with named parameters, parameter attributes, parsable documentation <# .SYNOPSIS Setup a new website @@ -308,7 +308,7 @@ if (-not (Test-Path $Profile)) { notepad $Profile } # More info: `help about_profiles` -# For a more usefull shell, be sure to check the project PSReadLine below +# For a more useful shell, be sure to check the project PSReadLine below ``` Interesting Projects diff --git a/scala.html.markdown b/scala.html.markdown index 5e3ece2d..d33b6234 100644 --- a/scala.html.markdown +++ b/scala.html.markdown @@ -19,20 +19,20 @@ Scala - the scalable language Setup Scala: 1) Download Scala - http://www.scala-lang.org/downloads - 2) Unzip/untar to your favourite location and put the bin subdir in your `PATH` environment variable + 2) Unzip/untar to your favorite location and put the bin subdir in your `PATH` environment variable */ /* Try the REPL - - Scala has a tool called the REPL (Read-Eval-Print Loop) that is anologus to + + Scala has a tool called the REPL (Read-Eval-Print Loop) that is anologus to commandline interpreters in many other languages. You may type any Scala expression, and the result will be evaluated and printed. - - The REPL is a very handy tool to test and verify code. Use it as you read + + The REPL is a very handy tool to test and verify code. Use it as you read this tutorial to quickly explore concepts on your own. */ - + // Start a Scala REPL by running `scala`. You should see the prompt: $ scala scala> @@ -50,7 +50,7 @@ res1: Int = 6 scala> :type (true, 2.0) (Boolean, Double) -// REPL sessions can be saved +// REPL sessions can be saved scala> :save /sites/repl-test.scala // Files can be loaded into the REPL @@ -59,7 +59,7 @@ Loading /sites/repl-test.scala... res2: Int = 4 res3: Int = 6 -// You can search your recent history +// You can search your recent history scala> :h? 1 2 + 2 2 res0 + 2 @@ -594,7 +594,7 @@ for { n <- s; nSquared = n * n if nSquared < 10} yield nSquared * best practices around them. We only include this section in the tutorial * because they are so commonplace in Scala libraries that it is impossible to * do anything meaningful without using a library that has implicits. This is - * meant for you to understand and work with implicts, not declare your own. + * meant for you to understand and work with implicits, not declare your own. */ // Any value (vals, functions, objects, etc) can be declared to be implicit by diff --git a/sk-sk/elixir.html.markdown b/sk-sk/elixir.html.markdown index baadbc0f..7b0c7bde 100644 --- a/sk-sk/elixir.html.markdown +++ b/sk-sk/elixir.html.markdown @@ -7,7 +7,7 @@ contributors: translators: - ["Peter Szatmary", "https://github.com/peterszatmary"] lang: sk-sk -filename: learnelixir.ex +filename: learnelixir-sk.ex --- Elixir je moderný funkcionálny jazyk vytvorený nad Erlang VM (virtuálnym |