Tutorial by Examples: er

This example shows how to populate report with data returned by a data view delegate. During the exercise, we will develop an inquiry screen showing list of Sales Orders between two dates. Data view delegate will be used to populate Sales Order information. Prerequisites: We start with declara...
import argparse import sys def check(): print("status") return 0 parser = argparse.ArgumentParser(prog="sub", add_help=False) subparser = parser.add_subparsers(dest="cmd") subparser.add_parser('status', help='show status') subparser.add_parser('lis...
const http = require('http'); console.log('Starting server...'); var config = { port: 80, contentType: 'application/json; charset=utf-8' }; // JSON-API server on port 80 var server = http.createServer(); server.listen(config.port); server.on('error', (err) => { if (err.c...
Event stores details for players attempting to log in @EventHandler public void onPlayerLogin(PlayerLoginEvent e) { Player tryingToLogin = e.getPlayer(); //Disallowing a player login e.disallow(PlayerLoginEvent.Result.KICK_FULL , "The server is reserved and is full for you!&q...
Cache references to avoid the expensive calls especially in the update function. This can be done by caching these references on start if available or when available and checking for null/bool flat to avoid getting the reference again. Examples: Cache component references change void Update() {...
When using PowerShell, you can use setx.exe to set environment variables permanently. Start PowerShell Type one of the following: setx ASPNETCORE_ENVIRONMENT "development" setx ASPNETCORE_ENVIRONMENT "staging" Restart PowerShell
Event fired when player enters a bed: PlayerBedEnterEvent PlayerBedEnterEvent(Player who, Block bed) @EventHandler public void onPlayerBedEnter(PlayerBedEnterEvent e) { Player entered = e.getPlayer(); Block bedEntered = e.getBed(); } Event fired when player leaves a bed: P...
If you want to use connection object for query database you can use this sample code. var queryString = "SELECT name, age FROM students " ; var query = client.query(queryString); query.on("row", (row, result)=> { result.addRow(row); }); query.on("end", func...
Extended version of http://www.riptutorial.com/python/example/25282/argparse--default-help-formatter- that fixed help output. import argparse import sys class CustomHelpFormatter(argparse.HelpFormatter): def _format_action(self, action): if type(action) == argparse._SubParsersActi...
This tslint.json example contains a set of configuration to enforce more typings, catch common errors or otherwise confusing constructs that are prone to producing bugs and following more the Coding Guidelines for TypeScript Contributors. To enforce this rules, include tslint in your build process ...
This approach will generate one table on the database to represent all the inheritance structure. Example: public abstract class Person { public int Id { get; set; } public string Name { get; set; } public DateTime BirthDate { get; set; } } public class Employee : Person { ...
This approach will generate (n+1) tables on the database to represent all the inheritance structure where n is the number of subclasses. How to: public abstract class Person { public int Id { get; set; } public string Name { get; set; } public DateTime BirthDate { get; set; } } ...
There is no such things as .sln and .proj files. Instead of them folders are being used in Visual Studio Code. Each project folder should have a seperate project.json file. /MyProject.Core SourceFile.cs project.json /MyProject.Web /Controllers /Views project.json To refe...
This will disable the SSH server side service, as if needed this will insure that clients cannot connect via ssh Ubuntu sudo service ssh stop Debian sudo /etc/init.d/ssh stop Arch Linux sudo killall sshd
CI/CD pipeline Centralized authentication and authorization service API documentation API gateway Centralize log management tool Service monitor Infrastructure Automation Centralized config server
Given a file like this: $ cat file hello/how/are/you i am fine You can use /pattern/ to match specific lines: $ sed -n '/hello/p' file hello/how/are/you If the pattern contains slashes itself, you can use another delimiter using \cBREc: $ sed -n '\#hello/how#p' file hello/how/are/you $...
A generic Car class has some car property and a description method class Car{ name:string; engineCapacity:string; constructor(name:string,engineCapacity:string){ this.name = name; this.engineCapacity = engineCapacity; } describeCar(){ console....
go to codeigniter/application/libraries/ create or replace your library files here. go to codeigniter/application/core/ create a new php file named like MY_Controller.php inside MY_Controller.php <?php class MY_Controller extends CI_Controller{ public function __construct(){ pa...
Layout XML <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"> <data> </data> <LinearLayout android:orientation="vertical" android:layout_wid...
using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.IE; /// <summary> /// Factory for creating WebDriver for various browsers. /// </summary> public static class WebDriverFactory { /// <summary> /// Initili...

Page 320 of 417