Tutorial by Examples

Sometimes you want an installation without anything except the bare minimum phoenix setup. The follow command will give you that. mix phoenix.new web --no-brunch --no-ecto Note: You must have installed Elixir, Erlang, Hex, Mix and the Phoenix archive for skeleton installation
Task Rebuild -Depends Clean, Build { "Rebuild" } Task Build { "Build" } Task Clean { "Clean" } Task default -Depends Build
# Will display task as: # -------- Rebuild -------- # -------- Build -------- FormatTaskName "-------- {0} --------" # will display tasks in yellow colour: # Running Rebuild FormatTaskName { param($taskName) "Running $taskName" - foregroundcolor yellow } ...
propreties { $isOk = $false } # By default the Build task won't run, unless there is a param $true Task Build -precondition { return $isOk } { "Build" } Task Clean { "Clean" } Task default -Depends Build
Task Build -depends Clean { "Build" } Task Clean -ContinueOnError { "Clean" throw "throw on purpose, but the task will continue to run" } Task default -Depends Build
For creating your first project in Phoenix framework at this point you should have, Elixir, Erlang, Hex, and the Phoenix archive installed. You should also have PostgreSQL and node.js installed to build a default application. Open terminal or command prompt and go to location on your file system wh...
from selenium import webdriver from selenium.webdriver.common.keys import Keys def set_up_driver(): path_to_chrome_driver = 'chromedriver' return webdriver.Chrome(executable_path=path_to_chrome_driver) def get_google(): driver = set_up_driver() driver.get('http://www.googl...
1..100 | ForEach-Object { Write-Progress -Activity "Copying files" -Status "$_ %" -Id 1 -PercentComplete $_ -CurrentOperation "Copying file file_name_$_.txt" Start-Sleep -Milliseconds 500 # sleep simulates working code, replace this line with your e...
1..10 | foreach-object { $fileName = "file_name_$_.txt" Write-Progress -Activity "Copying files" -Status "$($_*10) %" -Id 1 -PercentComplete ($_*10) -CurrentOperation "Copying file $fileName" 1..100 | foreach-object { ...
The simplest way to understand creating and modifying SVG elements is to operate on the elements using the DOM Level 2 Core interfaces, as you would with HTML or XML. It is imperative that the elements created from JavaScript are created in the same namespace declared in the SVG element - in this e...
You can use either DOM Level 2 Core methods getAttribute(), getAttributeNS(), setAttribute(), and setAttributeNS() to read and write values from SVG elements, or you can use custom properties and methods specified in the SVG 1.1 IDL (Interface Definition Language). Simple Numeric Attributes For ex...
Using the mouse to drag an SVG element (or group of elements) can be accomplished by: Adding mousedown handler to starts the drag: adding a translation on the element to use during dragging (if needed), tracking mousemove events, and adding a mouseup handler to end the drag. During mousemove, tr...
QThread is a handle to a platform thread. It lets you manage the thread by monitoring its lifetime, and requesting that it finishes its work. In most cases inhering from the class is not recommended. The default run method starts an event loop that can dispatch events to objects living in the class...
# Set The Formatting $xmlsettings = New-Object System.Xml.XmlWriterSettings $xmlsettings.Indent = $true $xmlsettings.IndentChars = " " # Set the File Name Create The Document $XmlWriter = [System.XML.XmlWriter]::Create("C:\YourXML.xml", $xmlsettings) # Write the XML ...
The instance_eval method is available on all objects. It evaluates code in the context of the receiver: object = Object.new object.instance_eval do @variable = :value end object.instance_variable_get :@variable # => :value instance_eval sets self to object for the duration of the c...
Many languages feature a with statement that allows programmers to omit the receiver of method calls. with can be easily emulated in Ruby using instance_eval: def with(object, &block) object.instance_eval &block end The with method can be used to seamlessly execute methods on object...
All objects are instances of a class. However, that is not the whole truth. In Ruby, every object also has a somewhat hidden singleton class. This is what allows methods to be defined on individual objects. The singleton class sits between the object itself and its actual class, so all methods defi...
@supports (display: flex) { /* Flexbox is available, so use it */ .my-container { display: flex; } } In terms of syntax, @supports is very similar to @media, but instead of detecting screen size and orientation, @supports will detect whether the browser can handle a given CSS rule....
To detect multiple features at once, use the and operator. @supports (transform: translateZ(1px)) and (transform-style: preserve-3d) and (perspective: 1px) { /* Probably do some fancy 3d stuff here */ } There is also an or operator and a not operator: @supports (display: flex) or (display...
To better understand the semantics of conses and lists, a graphical representation of this kind of structures is often used. A cons cell is usually represented with two boxes in contact, that contain either two arrows that point to the car and cdr values, or directly the values. For instance, the re...

Page 689 of 1336