Tutorial by Examples

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
Make sure that you first have Node.js and npm installed. Then install sequelize.js with npm npm install --save sequelize You will also need to install supported database Node.js modules. You only need to install the one you are using For MYSQL and Mariadb npm install --save mysql For Postgr...
Using PostgreSQLnpm module. install dependency from npm npm install pg --save Now you have to create a PostgreSQL connection, which you can later query. Assume you Database_Name = students, Host = localhost and DB_User= postgres var pg = require("pg") var connectionString = &q...
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...
PS> console_app.exe PS> & console_app.exe PS> Start-Process console_app.exe
PS> gui_app.exe (1) PS> & gui_app.exe (2) PS> & gui_app.exe | Out-Null (3) PS> Start-Process gui_app.exe (4) PS> Start-Process gui_app.exe -Wait (5) GUI applications launch in a different process, and will immediately return control to the PowerShell host. Sometimes you...
PS> $ErrorActionPreference = "Continue" (1) PS> & console_app.exe *>&1 | % { $_ } (2) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automation.ErrorRecord] } (3) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automati...
PS> $LastExitCode PS> $? PS> $Error[0] These are built-in PowerShell variables that provide additional information about the most recent error. $LastExitCode is the final exit code of the last native application that was executed. $? and $Error[0] is the last error record that was gene...
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...
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...
The Lru Cache will store all the added resources (values) for fast access until it reaches a memory limit, in which case it will drop the less used resource (value) to store the new one. To initialise the Lru cache you need to provide a maximum memory value. This value depends on your application r...
To add a resource to the cache you must provide a key and the resource. First make sure that the value is not in the cache already public void addResourceToMemoryCache(String key, Bitmap resource) { if (memoryCache.get(key) == null) memoryCache.put(key, resource); }
To get a resource from the cache simply pass the key of your resource (String in this example) public Bitmap getResourceFromMemoryCache(String key) { memoryCache.get(key); }
{ "family": "example-task", "containerDefinitions": [ { "environment": [], "name": "example-container", "image": "example-namespace/example-image:latest", "cpu": 1...
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...
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...
Detailed instructions on getting prestashop-1.6 set up or installed. Start by downloading the zip-file from prestashop.com/download In the zip-folder you'll find a folder called prestashop and an html-file with an installation guide Put the contents of the folder prestashop into the location wh...
lib.currentURL= TEXT lib.currentURL.data = getIndpEnv:TYPO3_REQUEST_URL
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...
Some WMI Classes expose Methods that allow you to do something with that object. For example, the Win32_Printer class has 11 methods for interacting with a printer, one of which is the PrintTestPage method. The following code demonstrates how to select a specific printer and print a test page. 'Spe...

Page 1016 of 1336