Tutorial by Examples: al

With OptionsParser, it's really easy to set up default values. Just pre-populate the hash you store the options in: options = { :directory => ENV['HOME'] } When you define the parser, it will overwrite the default if a user provide a value: OptionParser.new do |opts| opts.on("-d&...
Detailed instructions on getting identityserver4 set up or installed.
The ValuesAttribute is used to specify a set of values for an individual parameter of a test method with parameters. [Test] public void Sum_Works_Correctly( [Values(1, 2, 3)] int x, [Values(4, 5)] int y) { // Arrange var calculator = new Calculator(...
Given the following multi-release Jar: jar root - demo - SampleClass.class - META-INF - versions - 9 - demo - SampleClass.class The following class prints the URL of the SampleClass: package demo; import java.net.URL; public class Main...
The following prints all stack frames of the current thread: 1 package test; 2 3 import java.lang.StackWalker.StackFrame; 4 import java.lang.reflect.InvocationTargetException; 5 import java.lang.reflect.Method; 6 import java.util.List; 7 import java.util.stream.Collectors; 8 9 pu...
The following prints the current caller class. Note that in this case, the StackWalker needs to be created with the option RETAIN_CLASS_REFERENCE, so that Class instances are retained in the StackFrame objects. Otherwise an exception would occur. public class StackWalkerExample { public stat...
Use Nginx map to parse fields and reject requests. # Allowed hosts map $http_host $name { hostnames; default no; example.com yes; *.example.com yes; example.org yes; *.example.org yes; .example.net yes; wap.* yes; } # Allowed count...
The installation is very simple. If you are used to this kind of thing, just go to https://download.racket-lang.org. If you prefer, there are more detailed step-by-step installation instructions for the following systems: Installation steps (Windows) Installation steps (Linux) Installation step...
Visit https://download.racket-lang.org and choose between the two available distributions: Racket is the main distribution, it comes with several additional packages like math/number-theory as well as the DrRacket IDE. Minimal Racket is far smaller and comes only with the needed packages. ...
Visit https://download.racket-lang.org and choose between the two available distributions: Racket is the main distribution, it comes with several additional packages like math/number-theory as well as the DrRacket IDE. Minimal Racket is far smaller and comes only with the needed packages. Ins...
Fetching the values from the SQLite3 database. Print row values returned by select query import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() c.execute("SELECT * from table_name where id=cust_id") for row in c: print row # will be a list To fetch single match...
To use sqlalchemy for database: from sqlalchemy import create_engine from sqlalchemy.engine.url import URL url = URL(drivername='mysql', username='user', password='passwd', host='host', database='db') engine = create_engine(url) # sqlalchemy eng...
webpack-dev-server can be installed via npm npm --save-dev webpack-dev-server now you can start server ./node_modules/.bin/webpack-dev-server To simplify usage you can add script to package.json // package.json { ... "scripts": { "start": "webpack-dev-se...
Introduction So you want to start using bootstrap for your project? Great! then lets get started right now!. What is bootstrap? Bootstrap is an open source library wich you can use to make amazing responsive projects with using responsive design and simple code. Responsive Design is a design phil...
Example using JsonCoverter to deserialize the runtime property from the api response into a Timespan Object in the Movies model JSON (http://www.omdbapi.com/?i=tt1663662) { Title: "Pacific Rim", Year: "2013", Rated: "PG-13", Released: "12 Jul ...
Add any JSR 303 implementation to your classpath. Popular one used is Hibernate validator from Hibernate. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.2.0.Final</version> </dependen...
Referring to non-static members in initializer lists before the constructor has started executing can result in undefined behavior. This results since not all members are constructed at this time. From the standard draft: §12.7.1: For an object with a non-trivial constructor, referring to any no...
There are different approaches to the installation of SFML on Linux: Install it directly from your distribution's package repository Get the source code, build it and install it Download the precompiled SDK and manually copy the files Option 1 is the preferred one; if the version of SFML tha...
The most common way to install SFML on windows is to download the official SDK You can then unpack the archive and use it in your environment of choice. vcpkg Although it's still heavily in development, if you use Visual studio 2017 or newer, you can also install SFML via vcpkg which integrates w...
First of all you need to download the SFML SDK. Then, in order to start developing SFML applications, you have to install the following items: Header files and libraries SFML is available either as dylibs or as frameworks. Only one type of binary is required although both can be installed simultan...

Page 249 of 269