Tutorial by Examples: cs

By default, all your .scss partials go in the <source>/_sass folder. /_sass/base.scss body { margin: 0; } Your main .css or .scss files go in the <source>/css folder. Note: the two first two lines of triple dashes are necessary in order for Jekyll to transpile your .scss file to...
This shows you how to use Microsoft.Extensions.DependencyInjection nuget package without the use of the WebHostBuilder from kestrel (e.g. when you want to build something else then a webApp): internal class Program { public static void Main(string[] args) { var services = new Se...
There will be times where you only want to import a specific sheet from an excel file with multiple sheets. To do that, we'll use "SHEET=". PROC IMPORT OUT= YourNewTable DATAFILE= "myfolder/excelfilename.xlsx" DBMS=xlsx REPLACE; SHEET="Sheet1&quo...
Using PROC SQL is a good way to get quick results from a table and throw them into variables. I usually find that when I want to get a count of records I just loaded to a table, I can get that count into a variable with a quick PROC SQL call. PROC SQL; SELECT COUNT(*) INTO:aVariable FROM ...
Spacemacs (http://spacemacs.org/) is a variant of Emacs that attempts to end the long-term conflict between Emacs and vim users, by making an Emacs that behaves like vim.
Here is a simple shortcut that runs the command upper_case when you press ctrl+u. { "keys": ["ctrl+u"], "command": "upper_case" } I've set the content of my keybindings like this, but it doesn't work! It's normal! It's because it has to be ...
Rule of thumb: when garbage collection occurs, "live objects" are those still in use, while "dead objects" are those no longer used (any variable or field referencing them, if any, has gone out of scope before the collection occurs). In the following example (for convenience, Fi...
Liquid code can be categorised into objects, tags and filters. Objects Objects tell Liquid where to show content on a page. Objects and variables are denoted with double curly braces. {{ and }} <!-- input --> {{ page.title }} <!-- output --> Getting started with Liquid Tags T...
You can specify a package where the private value can be accessed. package com.example { class FooClass { private val x = "foo" private[example] val y = "bar" } class BarClass { val f = new FooClass f.x // <- Will not compile f.y // <- Wil...
A docstring is a multi-line comment used to document modules, classes, functions and methods. It has to be the first statement of the component it describes. def hello(name): """Greet someone. Print a greeting ("Hello") for the person with the given name. &...
The CSharpSyntaxWalker class is out of the box implementation of the Visitor pattern, that we can use to traverse our Syntax Tree. Here is a simple example of a Syntax Walker that collects all the struct-s that have a name, starting with the letter A: public class StructCollector : CSharpSyntaxWa...
Signals are only available to GObject classes. They can only be public, which means that any part of the code can connect handlers and trigger them. public class Emitter : Object { // A signal is declared like a method, // but with the signal keyword. public signal void my_signal ();...
using UnityEngine; using UnityEngine.Advertisements; public class Example : MonoBehaviour { #if !UNITY_ADS // If the Ads service is not enabled public string gameId; // Set this value from the inspector public bool enableTestMode = true; // Enable this during development #en...
#pragma strict import UnityEngine.Advertisements; #if !UNITY_ADS // If the Ads service is not enabled public var gameId : String; // Set this value from the inspector public var enableTestMode : boolean = true; // Enable this during development #endif function InitializeAds () // Example o...
Getting a GA Account: If you don’t have an Analytics account, create one. If you do have an Analytics account, sign in. Both options are available at google.com/analytics Setting up a property in your Analytics account: A property represents your website or app where the data gets aggrega...
One of the most common and useful ways to replace text with regex is by using Capture Groups. Or even a Named Capture Group, as a reference to store, or replace the data. There are two terms pretty look alike in regex's docs, so it may be important to never mix-up Substitutions (i.e. $1) with Back...
CSRF stands for cross-site request forgery. You can prevent this attack by enabling an option in the application/config/config.php file as shown below. $config['csrf_protection'] = TRUE; When you create a form using the form_open() function, it will automatically insert a CSRF token in a hidden ...
Before checking the specific syntax, let's take a look on how to setup your environment to load needed plugins. Setup To load data directly from ElasticSearch you need to download the elasticsearch-hadoop plugin. You have different ways to make it work, for a quick setup you can do the following. ...
Magics whose name begins with just one % take as argument the rest of the line and are called line magics. Magics that begin with a double percent sign %% take a multi-line argument and are called cell magics. A commonly used magic is %timeit, a wrapper around the Python's timeit.timeit function, f...
To let RestTemplate understand generic of returned content we need to define result type reference. org.springframework.core.ParameterizedTypeReference has been introduced since 3.2 Wrapper<Model> response = restClient.exchange(url, HttpMethod.GET, ...

Page 22 of 24