Tutorial by Examples: ase

[TestCase(0, 0, 0)] [TestCase(34, 25, 59)] [TestCase(-1250, 10000, 8750)] public void AddNumbersTest(int a, int b, int expected) { // Act int result = a + b; // Assert Assert.That(result, Is.EqualTo(expected)); }
Create a folder Create an index.html inside the new directory. Open it in the Bracket editor Download the Phaser repository from github, then grab the phaser.js file from the build folder. Place the file inside your project directory. Open index.html and link the phaser.js inside the header tag...
For multiple databases, you have the database.php file where you can set as many databases as you need. If you want to "switch" a database for a specific model on the fly, use the setDataSource() method. For example, if you have two databases, you can define them in the database.php file...
Create class and add imports to parse information: import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.IgnoreExtraProperties; //Declaration of firebase references private DatabaseReference mDatabase; //Declaration of firebase atributtes public Stri...
[MetadataType(typeof(RoleMetaData))] public partial class ROLE { } public class RoleMetaData { [Display(Name = "Role")] public string ROLE_DESCRIPTION { get; set; } [Display(Name = "Username")] public string ROLE_USERNAME { get; set; } } If you us...
We would be creating mongodb as a replica set having 3 instances. One instance would be primary and the other 2 instances would be secondary. For simplicity, I am going to have a replica set with 3 instances of mongodb running on the same server and thus to achieve this, all three mongodb instances...
[TestCase(0, 0, 0)] [TestCase(34, 25, 59)] [TestCase(-1250, 10000, 8750)] public void AddNumbersTest(int a, int b, int expected) { // Act int result = a + b; // Assert Assert.That(result, Is.EqualTo(expected)); }
The showcase of Primefaces components you can find here and documentation is here Frontend needs to be saved as a XHTML file. This file can contain JSF, JSTL, JSP, HTML, CSS, jQuery, javaScript and its framework and more front-end technologies. Please, do not mix JSF and JSP technologies together....
Firebase Console information in detail Android : Firebase Analytics Example Steps For Android : Download code from the link Check FirebaseAnalyticsActivity That's all you will understand how's the firebase analytics works for the different scenario.
Okay it took me about a day to figure it out so here I am posting the steps I followed to get my Database First working in a Class Project (.NET Core), with a .NET Core Web App. Step 1 - Install .NET Core Make Sure you are using .NET Core not DNX (Hint: You should be able to see the .NET Core opti...
Another way of doing aggregations is by using the Mongo.Collection#rawCollection() This can only be run on the Server. Here is an example you can use in Meteor 1.3 and higher: Meteor.methods({ 'aggregateUsers'(someId) { const collection = MyCollection.rawCollection() const aggre...
Assume you want to undo a dozen of commits and you want only some of them. git rebase -i <earlier SHA> -i puts rebase in "interactive mode". It starts off like the rebase discussed above, but before replaying any commits, it pauses and allows you to gently modify each commit as i...
To create a user dev with password password123 MongoClient mongo = new MongoClient("localhost", 27017); MongoDatabase db = mongo.getDatabase("testDB"); Map<String, Object> commandArguments = new BasicDBObject(); commandArguments.put("createUser", "dev&qu...
Because of how gerrit relies on change-ids, in order to resolve conflicts (pull changes to your topic branch) the best practice is to rebase topic branch onto master/other branch you want to push to. This way you preserve the change-id without having to ammend the merge commit. For example if you su...
The wxWidgets project has adopted the release model used by the Linux Kernel project where there are alternating sets of releases where one set are considered "stable" and the next set are considered "development." For wxWidgets "stable" and "development" do n...
This simple function will execute the specified Select SQL command and return the result as data set. Public Function ReadFromDatabase(ByVal DBConnectionString As String, ByVal SQL As String) As DataTable Dim dtReturn As New DataTable Try 'Open the connection using the connection...
You can easily create tables for Your database or drop them if You want. If You wish to do that, You should learn how to write Migrations for desired database. Migrations files must be located in config/Migrations folder. File names can be in next formats: YYYYMMDDHHIISS_(Create|Alter|Delete)Ad...
This is a basic example of a Selenium testcase using the python Unittest library from selenium import webdriver import unittest class SeleniumTest(Unittest.testcase): def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(30) def te...
In projects that feature several singleton classes (as is often the case), it can be clean and convenient to abstract the singleton behaviour to a base class: using UnityEngine; using System.Collections.Generic; using System; public abstract class MonoBehaviourSingleton<T> : MonoBehaviou...

Page 26 of 40