To run the script analyzer against a single script file execute:
Invoke-ScriptAnalyzer -Path myscript.ps1
This will analyze your script against every built-in rule. If your script is sufficiently large that could result in a lot of warnings and/or errors.
To run the script analyzer against a w...
Hot Module Replacement allows to add, change or delete app module when application is running. Page reloading is not needed in this case.
Prerequisites
In addition to webpack-dev-middleware packages:
npm install --save-dev webpack-hot-middleware
Configuration
Simply update configuration of UseW...
This example helper class interacts with the finger print manager and performs encryption and decryption of password. Please note that the method used for encryption in this example is AES. This is not the only way to encrypt and other examples exist. In this example the data is encrypted and decryp...
First, you'll need to install the Kotlin plugin.
For Windows:
Navigate to File → Settings → Plugins → Install JetBrains plugin
For Mac:
Navigate to Android Studio → Preferences → Plugins → Install JetBrains plugin
And then search for and install Kotlin. You'll need to restart the IDE af...
You can create a New Project in Android Studio and then add Kotlin support to it or modify your existing project. To do it, you have to:
Add dependency to a root gradle file - you have to add the dependency for kotlin-android plugin to a root build.gradle file.
buildscript {
repositorie...
In windows Platform
Step 1: Installation of Ruby
If you already have installed ruby in your pc then you can skip this step.
Go to rubyinstaller.org's download page and download one of the stable version of ruby corresponding to architecture of your windows platform.
Again download development ...
(Beginner level; IDE: CLion)
First, install boost from the Cygwin mirror: open the install exe, search for boost, install the packages.
After boost is installed: it will be located in /usr/include/boost. This is where everything is. All #include statements will be a path from the boost folder,...
apm is Atom's native package manager. It allows the user to manage packages and themes without having to initialise Atom itself. apm comes with the official installation and is automatically added to %PATH% if you're on Windows.
To use apm, go to Command Prompt and type
$ apm <command>
He...
It is common to use javax.sql.DataSource with JNDI in application server containers, where you register a data source under a name and look it up whenever you need a connection.
This is code that demonstrates how data sources work:
/**
* Create a data source with connection pool for PostgreSQL c...
You can start Solr by running bin/solr from the Solr directory and this will start Solr in the background, listening on port 8983.
$ bin/solr start
To change the port Solr listens on, you can use the -p parameter when starting, such as:
$ bin/solr start -p 8984
Since Solr is a server, it is more...
What if two (or several) otherwise dead objects reference one another? This is shown in the example below, supposing that OtherObject is a public property of FinalizableObject:
var obj1 = new FinalizableObject1();
var obj2 = new FinalizableObject2();
obj1.OtherObject = obj2;
obj2.OtherObject = ...
The common case for injecting dependencies into a class is with constructor injection. This involves annotating a constructor on the class with @Inject. The CDI manager will look for a constructor with the @Inject annotation when creating an instance of the class. When it finds an @Inject-annotated ...
Server Side example
Create Listener for server
Start of with creating an server that will handle clients that connect, and requests that will be send. So create an Listener Class that will handle this.
class Listener
{
public Socket ListenerSocket; //This is the socket that will listen ...
A MultiTrigger is similar to a standard Trigger in that it only applies to properties within the same control. The difference is that a MultiTrigger has multiple conditions which must be satisfied before the trigger will operate. Conditions are defined using the <Condition> tag.
<TextBlock...
WP_DEBUG_LOG is a companion to WP_DEBUG that causes all errors to also be saved to a debug.log log file inside the /wp-content/ directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request or wp-cron run).
//enable
defi...
WP_DEBUG_DISPLAY is another companion to WP_DEBUG that controls whether debug messages are shown inside the HTML of pages or not. The default is 'true' which shows errors and warnings as they are generated. Setting this to false will hide all errors. This should be used in conjunction with WP_DEBUG_...