Tutorial by Examples: bas

Data annotations are a way of adding more contextual information to classes or members of a class. There are three main categories of annotations: Validation Attributes: add validation criteria to data Display Attributes: specify how the data should be displayed to the user Modelling Attributes...
Once you have node.js installed on your system, you can just follow the procedure below to get a basic web server running with support for both HTTP and HTTPS! Step 1 : Build a Certificate Authority create the folder where you want to store your key & certificate : mkdir conf ...
<?php //Creating Connection to MySQL database using MySQLi $mysqli = mysqli_connect("IP ADDRESS OR DOAMIN", "username", "password", "database_name"); //Executing Query in the Database using MySQLi $result = mysqli_query($mysqli, "SELECT * FROM T...
These locators should be used as a priority when possible, because they are more persistent to changes in an application then locators based on css or xpath, which can easily break. Binding locator Syntax by.binding('bind value') Example View <span>{{user.password}}</span> <s...
Locators by themselves do not return an element which can be interacted with in Protractor, they are simply instructions that indicate Protractor how to find the element. To access the element itself, use this syntax: element(locator); element.all(locator); Note: the element(s) is not actually...
{ "title": "Person", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" ...
The MyFrame class the extends JFrame and also contains the main method import javax.swing.JFrame; public class MyFrame extends JFrame{ //main method called on startup public static void main(String[] args) throws InterruptedException { //creates a frame window ...
basename(): Given a string containing the path to a file or directory, this function will return the trailing name component. This function will return only the last part of an URL $url = "http://example.com/project/controller/action/param1/param2"; $parts = basename($url); // Out...
// array var arr = [ 'one', 'two', 'three', 'four' ]; $.each(arr, function (index, value) { console.log(value); // Will stop running after "three" return (value !== 'three'); }); // Outputs: one two three
import csv #------ We will write to CSV in this function ------------ def csv_writer(data, path): #Open CSV file whose path we passed. with open(path, "wb") as csv_file: writer = csv.writer(csv_file, delimiter=',') for line in data: ...
PSR-1 is an accepted recommendation and outlines a basic standard recommendation for how code should be written. It outlines naming convetions for classes, methods and constants. It makes adopting PSR-0 or PSR-4 recommendations a requirement. It indicates which PHP tags to use: <?php and &lt...
Automatic routing for the DRF, can be achieved for the ViewSet classes. Assume that the ViewSet class goes by the name of MyViewSet for this example. To generate the routing of MyViewSet, the SimpleRouter will be utilized. On myapp/urls.py: from rest_framework import routers router = ...
There are two basic ways that the asset pipeline is used: When running a server in development mode, it automatically pre-processes and prepares your assets on-the-fly. In production mode, you’ll probably use it to pre-process, versionize, and compress and compile your assets. You can do s...
To develop applications for iOS, you need to have a Mac, an Apple developer account (to publish to the App Store; costs $100 annually), the free XCode application on your Mac, and ideally some iOS devices to test with. Experience with either of the programming languages Swift or Objective-C is necc...
override func numberOfSections(in tableView: UITableView) -> Int { // You need to return minimum one to show the cell inside the tableview return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // return the number of rows i...

Page 65 of 65