Tutorial by Examples: er

One very simple thing that you might want to do with NMS that Bukkit doesn't support is get the player's ping. This can be done like this: /** * Gets the players ping by using NMS to access the internal 'ping' field in * EntityPlayer * * @param player * the player whose ping t...
Create a new folder called MyClasses and create and add the following class public class GmailEmailService:SmtpClient { // Gmail user-name public string UserName { get; set; } public GmailEmailService() : base(ConfigurationManager.AppSettings["GmailHost"], Int32.Parse...
Use the GitHub repository to get the entire code: https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users Copy or clone the repository in your computer. Now go to your Firebase Console Create a Firebase Project using the Firebase Console. Enable the Google Provid...
If you add this to your functions.php it removes the WordPress version number from the RSS feed and the header. function remove_wordpress_ver() { return ''; } add_filter('the_generator', 'remove_wordpress_ver', 999);
/// <summary> /// Defines a student. /// </summary> [DataContract] public class Student { /// <summary> /// Gets or sets the student number. /// </summary> [DataMember] public string StudentNumber { get; set; } /// <summary> ///...
Below code represents an example of Opt-Out approach using Serializable and NonSerialized attributes. /// <summary> /// Represents a student. /// </summary> [Serializable] public class Student { /// <summary> /// Gets or sets student number. /// </summary&gt...
Opening a browser with to() method. import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; class navigateWithTo{ public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.navigate().to("http://www.example.com...
Each .NET Core component (SDK, Host and Shared Framework) is versioned independently. You can find the version for each of them separately. SDK You can use the --version option to dotnet to see the SDK version. For example: $ ~/dotnet-1.1.1/dotnet --version 1.0.0-preview2-1-003176 dotne...
It's possible to have multiple .NET Core SDKs and Runtimes available on disk. You can select the versions for each separately. To select the version of the SDK to use, use global.json. To select the version of the shared framework to use, target the specified framwork in the .csproj file (or proj...
This example expects an error, as the hello-world bucket already exists and S3 uses a global namespace. New-S3Bucket -BucketName "hello-world" New-S3Bucket : The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a dif...
Validating the Name entered by a User contain the following check Ensure it is not empty Ensure it contain only alphabets, space and/or dot. So, the regular expression for this is ^[A-Z][a-z]*(\.?\s?[A-Z][a-z]*)+$ This means ^ -> Should start with [A-Z] -> the first lette...
Sometimes, we have to take input from users which should contain only alpha numeric characters. For example, lets say a Username system which allow only letters and numbers, Then this can be done with the following Regular Expression ^[a-zA-Z0-9]+$ ^ is restrict the start [a-zA-Z0-9]+ is th...
Minimal example based on PHP manual example found here: http://php.net/manual/en/sockets.examples.php Create a websocket script that listens to Port 5000 Use putty, terminal to run telnet 127.0.0.1 5000 (localhost). This script replies with the message you sent (as a ping-back) <?php set_ti...
Many watchOS apps (like Workout, Weather, Music, etc) have a main WKInterfaceTable or a set of buttons which are hooked up to another controller, similar to the navigation on iOS. This is called hierarchical view structure. To connect a button, Ctrl-Drag from the button to a controller, and select ...
SELECT e.emp_id , e.first_name , e.last_name FROM employees e INNER JOIN managers m ON m.mgr_id = e.mgr_id WHERE m.mgr_id = 'M01' ; Results in: EMP_IDFIRST_NAMELAST_NAMEE02ErinMacklemoreE04RonSonswan Ultimately, for every manager we query for, we will see 1 or more employees returned.
Consult the above example tables when looking at this example. SELECT m.mgr_id , m.first_name , m.last_name FROM managers m INNER JOIN employees e ON e.mgr_id = m.mgr_id WHERE e.emp_id = 'E03' ; MGR_IDFIRST_NAMELAST_NAMEM03BarrelJones As this is the inverse of the above example, we know that for ...
One of the common ways to parametrize your performance scripts is to use a CSV file. The best example of CSV input files usage is a login process. If you want to test your application across different users, you need to provide a list of user credentials. Let’s assume that we have a login request t...
Another way to parametrize your performance scripts is to use database data through JDBC. JDBC is an application programming interface that defines how a client can access a database. First of all, download the JDBC driver to your database (refer to the database vendor). For example, mysql driver c...
If you need to execute a repeating sequence of the same action with different parameters, use the ‘Parameterized Controller’ 3rd party plugin from JMeter-Plugins project. You need to install this plugin first by following installation procedure. Let’s assume that we want to parameterize the login ...
Introduction Put simply, these are variables that are available in all scope in your scripts. This means that there is no need to pass them as parameters in your functions, or store them outside a block of code to have them available in different scopes. What's a superglobal?? If you're thinki...

Page 377 of 417