Tutorial by Examples: c

Task Rebuild -Depends Clean, Build { "Rebuild" } Task Build { "Build" } Task Clean { "Clean" } Task default -Depends Build
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...
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...
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...
config.paths.html represents the path to your HTML file. gulp.task("watch", function() { gulp.watch(config.paths.html, ["html"]); }); The task should be added to default as well: gulp.task("default", ["html", "watch"]);
Build: xcodebuild -exportArchive -exportFormat ipa \ -archivePath "/Users/username/Desktop/MyiOSApp.xcarchive" \ -exportPath "/Users/username/Desktop/MyiOSApp.ipa" \ -exportProvisioningProfile "MyCompany Distribution Profile" Archive: xcodebuild -pro...
To consume a REST API with RestTemplate, create a Spring boot project with the Spring boot initialzr and make sure the Web dependency is added: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dep...
ActiveRecord includes default_scope, to automatically scope a model by default. class Post default_scope ->{ where(published: true).order(created_at: :desc) } end The above code will serve posts which are already published when you perform any query on the model. Post.all # will only lis...
The qsort() standard library function is a good example of how one can use void pointers to make a single function operate on a large variety of different types. void qsort ( void *base, /* Array to be sorted */ size_t num, /...
JSON_MODIFY function can be used to update value on some path. You can use this function to modify original value of JSON cell in UPDATE statement: update Product set Data = JSON_MODIFY(Data, '$.Price', 24.99) where ProductID = 17; JSON_MODIFY function will update or create Price key (if it do...
If you have a "child table" formatted as JSON collection and stored in-row as JSON column, you can unpack this collection, transform it to table and join it with parent row. Instead of the standard JOIN operator, you should use CROSS APPLY. In this example, product parts are formatted as ...

Page 427 of 826