Tutorial by Examples: er

First we must edit the SSH daemon config file. Though under different Linux distributions this may be located in different directories, usually it is stored under /etc/ssh/sshd_config Use your text editor to change the values set in this file, all lines starting with # are commented out and must ha...
Official roadmap @ Github VersionAnnouncementsRelease DateRC1*1.0.0-rc12015-11-01RC2*1.0.0-rc22016-05-161.0.01.0.02016-06-271.0.11.0.12016-09-131.0.11.0.12016-09-131.11.1.0Q4 2016 / Q1 20171.21.2.0Q1 2017 / Q2 2017 * References to yearly quarters (Q1, Q2, Q3, Q4) are calendar-based
template<class ... Types> struct Tuple {}; A parameter pack is a template parameter accepting zero or more template arguments. If a template has at least one parameter pack is a variadic template.
The pattern parameter_pack ... is expanded into a list of comma-separated substitutions of parameter_pack with each one of its parameters template<class T> // Base of recursion void variadic_printer(T last_argument) { std::cout << last_argument; } template<class T, class .....
Entity entity; //The entity you want to teleport Entity teleportTo; //The entity where you want <entity> to be teleported to boolean success = entity.teleport(teleportTo); //Attempting to teleport. if(success) { //Teleport was successful }else { //Teleport wasn't successful } ...
Functions and procedures in packages can be overloaded. The following package TEST has two procedures called print_number, which behave differently depending on parameters they are called with. create or replace package TEST is procedure print_number(p_number in integer); procedure print_numb...
MediaTypeFormatter is an abstract class from which JsonMediaTypeFormatter and XmlMediaTypeFormatter classes inherit from. Here, JsonMediaTypeFormatter class handles JSON objects and XmlMediaTypeFormatter class handles XML objects. Return only JSON irrespective of the Accept Header value: To return...
CREATE OR REPLACE TRIGGER CORE_MANUAL_BIUR BEFORE INSERT OR UPDATE ON CORE_MANUAL FOR EACH ROW BEGIN if inserting then -- only set the current date if it is not specified if :new.created is null then :new.created := sysdate; end if; end if; -- always s...
public async Task SetProductInactiveAsync(int productId) { using (IDbConnection con = new SqlConnection("myConnectionString")) { await con.ExecuteAsync("SetProductInactive", new { id = productId }, commandType: CommandType.StoredProcedure); ...
This will be a relatively comprehensive tutorial of how to write a command line tool to print the weather from the zip code provided to the command line tool. The first step is to write the program in ruby to do this action. Let's start by writing a method weather(zip_code) (This method requires the...
This example is how to turn an image into a Base64 string (i.e. a string you can use directly in a src attribute of an img tag). This example specifically uses the Imagick library (there are others available, such as GD as well). <?php /** * This loads in the file, image.jpg for manipulation....
Create simple CRUD Operation Using Serverless Framework Install Serverless framework globally npm install serverless -g Create simple Lambda Service serverless create --template aws-nodejs --path myService Go to the myService Directory it should contain serverless.yml handler.js even...
Generators are fast coded and in many cases a slim alternative to heavy iterator-implementations. With the fast implementation comes a little lack of control when a generator should stop generating or if it should generate something else. However this can be achieved with the usage of the send() fu...
To match special characters Double Backslash should be used \. becomes \\. Characters you'll have to escape include (){}[]/\+*$>.|^? The below example get three kinds of opening brackets let specials = "(){}[]" let pattern = "(\\(|\\{|\\[)" do { let regEx = try N...
Install a Common Lisp implementation on the server. (E.g. sbcl, clisp, etc...) Install quicklisp on the server. Load SWANK with (ql:quickload :swank) Start the server with (swank:create-server). The default port is 4005. [On your local machine] Create a SSH tunnel with ssh -L4005:127.0.0.1:400...
ASSERT is used in sensitive areas where you want to be absolutely sure, that a variable has a specific value. If the logical condition after ASSERT turns out to be false, an unhandleable exception (ASSERTION_FAILED) is thrown. ASSERT 1 = 1. "No Problem - Program continues ASSERT 1 = 2. &quo...
Player playerToHide; Player playerToNotSee; playerToNotSee.hide(playerToHide); //playerToHide will no longer be seen by playerToNotSee. If player is already hidden, nothing happens
Player toUnhide; Player toSeeAgain toSeeAgain.show(toUnhide); //Player toSeeAgain will now see Player toUnhide again. If player is already visible, nothing happens.
Player playerToCheck; Player playerSeeing; boolean isVisible = playerSeeing.canSee(playerToCheck); //isVisible returns true if playerSeeing can see playerToCheck and false otherwhise
This can be done by using the event EntityTargetEvent Entities won't target the player if you cancel the event: @EventHandler public void onEntityTarget(EntityTargetEvent e) { Entity target = e.getEntity(); if(target instanceof Player) { Player playerTargetted = (Player) target...

Page 319 of 417