Tutorial by Examples: ecs

Swift's C interoperability allows you to use functions and types from the C standard library. On Linux, the C standard library is exposed via the Glibc module; on Apple platforms it's called Darwin. #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin #elseif os(Linux) import Glibc...
<link rel="alternate stylesheet" href="path/to/style.css" title="yourTitle"> Some browsers allow alternate style sheets to apply if they are offered. By default they will not be applied, but usually they can be changed through the browser settings: Firefox l...
In Python 2, exec is a statement, with special syntax: exec code [in globals[, locals]]. In Python 3 exec is now a function: exec(code, [, globals[, locals]]), and the Python 2 syntax will raise a SyntaxError. As print was changed from statement into a function, a __future__ import was also added. ...
Given the following CSV file: Id,Name 1,"Joel" 2,"Adam" 3,"Ryan" 4,"Matt" You can read the data with the following script: #r "FSharp.Data.dll" open FSharp.Data type PeopleDB = CsvProvider<"people.csv"> let people = Pe...
import os import glob import pandas as pd def get_merged_csv(flist, **kwargs): return pd.concat([pd.read_csv(f, **kwargs) for f in flist], ignore_index=True) path = 'C:/Users/csvfiles' fmask = os.path.join(path, '*mask*.csv') df = get_merged_csv(glob.glob(fmask), index_col=None, use...
You can spec a record as follows: (clojure.spec/def ::name string?) (clojure.spec/def ::age pos-int?) (clojure.spec/def ::occupation string?) (defrecord Person [name age occupation]) (clojure.spec/def ::person (clojure.spec/keys :req-un [::name ::age ::occupation])) (clojure.spec/valid? ...
You can spec a map by specifying which keys should be present in the map: (clojure.spec/def ::name string?) (clojure.spec/def ::age pos-int?) (clojure.spec/def ::occupation string?) (clojure.spec/def ::person (clojure.spec/keys :req [::name ::age ::occupation])) (clojure.spec/valid? ::perso...
CSS and JS files should be reside under 'static' directory in the root directory of module (the rest of subdirectory tree under 'static' is an optional convention): static/src/css/your_file.css static/src/js/your_file.js Then add links to these files unsing one of the 3 ways listed in the fol...
Const zipCode As Long = 10012 Dim zipCodeText As String 'Convert the zipCode number to a string of digit characters zipCodeText = CStr(zipCode) 'zipCodeText = "10012"
In Groovy, the inject() method is one of the cumulative methods that allows us to add (or inject) new functionality into any object that implements the inject() method. In the case of a Collection, we can apply a closure to a collection of objects uniformly and then collate the results into a single...
Consider this CSV data: #id,title,text 1,hello world,"This is a ""blog""." 2,second time,"My second entry." This data can be read with the following code: // r can be any io.Reader, including a file. csvReader := csv.NewReader(r) // Set comment char...
1.Download font-awesome from here. 2.Copy the font-awesome directory into your project. 3.In the of your html, reference the location to your font-awesome.min.css. <link rel="stylesheet" href="path/to/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet&quot...
!!! Container should be positioned relatively or absolutely $direction - top, bottom, left, right $margin - margin by the edge in $direction. For top and bottom direction - it's from left to right. For left and right - it's from top to bottom. $colors - first is a border color, second - is a back...
Here is an example of a basic page using the Materialize CSS framework which incorporates the grid system and materialboxed. <!DOCTYPE html> <html> <head> <title>Materializecss Example webpage</title> <!--Import Google Icon Font--> <link href="ht...
files = list.files(pattern="*.csv") data_list = lapply(files, read.table, header = TRUE) This read every file and adds it to a list. Afterwards, if all data.frame have the same structure they can be combined into one big data.frame: df <- do.call(rbind, data_list)
function downloadCsv() { var blob = new Blob([csvString]); if (window.navigator.msSaveOrOpenBlob){ window.navigator.msSaveBlob(blob, "filename.csv"); } else { var a = window.document.createElement("a"); a.href = window.URL.createObjectURL(blob, { ...
Let say you want to create css/js file specific to a platform. For that you have to create a merges folder in root folder of you cordova porject. In merges folder create directory for each platform (android/ios..). then in specific platform folder create a css/js folder and put your css/js file spec...
To add a background-image rule via the CSSOM, first get a reference to the rules of the first stylesheet: var stylesheet = document.styleSheets[0].cssRules; Then, get a reference to the end of the stylesheet: var end = stylesheet.length - 1; Finally, insert a background-image rule for the bo...
Tables for Layout The structure of an HTML email file is similar to that of a web page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hello!</title> </head> <body> &...
'<div style="font-size:11pt">' || expression || '</div>'

Page 1 of 2