Tutorial by Examples: er

docker network create -o "com.docker.network.bridge.enable_icc"="false" icc-restricted Blocks Containers accessing other containers on the same icc-restricted network. Does not block Access to host running docker daemon Local LAN Internet
iptables -I INPUT -i docker0 -m addrtype --dst-type LOCAL -j DROP Blocks Access to host running docker daemon Does not block Container to container traffic Local LAN Internet Custom docker networks that doesn't use docker0
docker network create --subnet=192.168.0.0/24 --gateway=192.168.0.1 --ip-range=192.168.0.0/25 local-host-restricted iptables -I INPUT -s 192.168.0.0/24 -m addrtype --dst-type LOCAL -j DROP Creates a network called local-host-restricted which which: Blocks Access to host running docker daem...
After succesfully setup Spring-Boot application all the configuration is handled in an application.properties file. You will find the file at src/main/resources/. Normally there is a need to have a database behind the application. For development its good to have a setup of dev and a prod environme...
Example of how ReplaceAll only applies a rule at most once, while ReplaceRepeated will do so in a loop but always restart application from the first rule. x + a /. { a_ + z :> (Print[0]; DoneA), a_ + x :> (Print[1]; y + z), a_ + y :> (Print[2]; DoneB)} (* Prints "1&quot...
import tkinter as tk root = tk.Tk() rbvar = StringVar() rbvar.set(" ") rb1 = tk.Radiobutton(root, text="Option 1", variable=rbvar, value='a', indicatoron=0) rb1.pack() rb2 = tk.Radiobutton(root, text="Option 2", variable=rbvar, value='b', indicatoron=0) rb2...
How to implement Firebase Real-Time database in Android applications. Setup/Installation: First, install the Firebase SDK (guide) Register your project using the Firebase console After successfuly completing the two steps above, add the following dependency in your application level ...
NOTE This page illustrates use of gulp plugins like browser-sync , gulp-watch and run-sequence , and continues discussing gulp-workflow-automation from where we left off at Gulpjs-workflow-automation-1 of 2. In case you landed here , consider going through that post first. Default Task ...
$user = sanitize_user("attacker username<script>console.log(document.cookie)</script>"); $user value after sanitize is "attacker username"
Lets say you want to filter a query by two columns, but only certain combinations of those columns. For example, it's OK to have account 60400 with reference JE, but you cannot have account 60400 with reference ED, but you can have account 60500 with reference ED. select * from schema.table where ...
First off you create the form @using (Html.BeginForm()) { @Html.AntiForgeryToken() } Action Method [HttpPost] [ValidateAntiForgeryToken] public ActionResult Test(FormViewModel formData) { // ... } Script <script src="https://code.jquery.com/jquery-1.12.4.min.js"&g...
Data Access Object(DAO) design pattern is a standard J2EE design pattern. In this design pattern data is accessed through classes containing methods to access data from databases or other sources, which are called data access objects. Standard practice assumes that there are POJO classes. DAO can b...
page.js var context = { items: [ {id: 1, name: "Foo"}, {id: 2, name: "Bar"}, {id: 3, name: "Joe"} ] } exports.loaded = function(args){ var page = args.object; page.bindingContext = context; } exports.showEntry = functi...
This example shows how you can use IIS Rewrite rules to force HTTPS by making all HTTP requests return a 301 (Permanent) Redirect to the HTTPS page. This is usually better than using the [RequireHttps] attribute because the attribute uses a 302 redirect, and being in the MVC pipeline it is much slo...
Peudo-random generators are frequently useful when designing simulation environments. The following VHDL package shows how to use protected types to design a pseudo-random generator of boolean, bit and bit_vector. It can easily be extended to also generate random std_ulogic_vector, signed, unsigned....
JS // data model var person = { name: ko.observable('Jack'), age: ko.observable(29) }; ko.applyBindings(person); HTML <div> <p>Name: <input data-bind='value: name' /></p> <p>Age: <input data-bind='value: age' /></p> &l...
First install gulp and browserify via npm i gulp gulp-browserify. This will install browserify into your node_modules folder. gulpfile.js var gulp = require('gulp'); var browserify = require('gulp-browserify'); gulp.task('script', function() { gulp.src('./src/script.js') .pipe(br...
First install gulp and browserify via npm i gulp gulp-coffeeify. This will install browserify into your node_modules folder. gulpfile.js var gulp = require('gulp'); var coffeeify = require('gulp-coffeeify'); gulp.task('script', function() { gulp.src('./src/script.coffee') .pipe(c...
If we want to display a jquery calendar for end user who can pick maximum date as current date in the calendar. The below code will useful to this scenario. <?php use yii\jui\DatePicker; use yii\widgets\ActiveForm; ?> <?php $form = ActiveForm::begin(['id' => 'profile-form']); ?&gt...
For some forms you want display the days from future/past days and other days need to disabled, then this scenario will help. <?php use yii\jui\DatePicker; use yii\widgets\ActiveForm; ?> <?php $form = ActiveForm::begin(['id' => 'profile-form']); ?> ..... <?php $day = '+...

Page 274 of 417