Tutorial by Examples: v

Sometimes you want to keep the switched-out components in memory, to make that happen, you should use <keep-alive> element: Javascript: new Vue({ el: '#app', data: { currentPage: 'home', }, methods: { switchTo: function(page) { this.currentPage = page; ...
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...
Avoid calling methods using strings that can accept methods. This approach will make use of reflection that can slow down your game especially when used in the update function. Examples: //Avoid StartCoroutine with method name this.StartCoroutine("SampleCoroutine"); //Ins...
Avoid empty unity methods. Apart from being bad programming style, there is a very small overhead involved in runtime scripting. Over many instances, this can build up and affect performance. void Update { } void FixedUpdate { }
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...
Many of us start debugging with simple print(). Let's say we have such a class: class Abc { let a = "aa" let b = "bb" } and we have an instance of Abc as so: let abc = Abc() When we run the print() on the variable, the output is App.Abc while dump() output...
Step 1: Create an empty project via File -> New Project. Step 2: Right click the project solution and select Build Dependencies->Build Customizations. Step 3: Check the checkbox ".masm". Step 4: Press the button "ok". Step 5: Create your assembly file and type in th...
When viewing an execution plan, you may see that SQL Server decided to do a Seek or a Scan. A Seek occurs when SQL Server knows where it needs to go and only grab specific items. This typically occurs when good filters on put in a query, such as where name = 'Foo'. A Scan is when SQL Server doesn...
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
here countInstance is a static class variable class StaticTest{ static countInstance : number= 0; constructor(){ StaticTest.countInstance++; } } new StaticTest(); new StaticTest(); console.log(StaticTest.countInstance);
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...
SQlite example Step by step Explanation The steps below demonstrate how to include this component in a Xamarin.Forms Shared Project: to add packages in (pcl,Andriod,Windows,Ios) Add References Click on Manage Nuget packages ->click on Browse to install SQLite.Net.Core-PCL , SQLite Net Ext...
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...
@Override public void onEnable() { String version = Bukkit.getBukkitVersion(); //The string version of this bukkit server }
The following code implements a simple YoutubePlayerFragment. The activity's layout is locked in portrait mode and when orientation changes or the user clicks full screen at the YoutubePlayer it turns to lansscape with the YoutubePlayer filling the screen. The YoutubePlayerFragment does not need to...
To reverse a list, it isn't important what type the list elements are, only what order they're in. This is a perfect candidate for a generic function, so the same reverseal function can be used no matter what list is passed. let rev list = let rec loop acc = function | [] -...
The Dictionary allows getting a unique set of values very simply. Consider the following function: Function Unique(values As Variant) As Variant() 'Put all the values as keys into a dictionary Dim dict As New Scripting.Dictionary Dim val As Variant For Each val In values ...

Page 225 of 296