Tutorial by Examples: ar

We will start by making a simple class that gets all our parent(Configurable products) <?php namespace Test\Test\Controller\Test; use Magento\Framework\App\Action\Context; class Products extends \Magento\Framework\App\Action\Action { public function __construct( \...
Here we first fetch our parent product and the we will get all children products that this parent have. <?php namespace Test\Test\Controller\Test; use Magento\Framework\App\Action\Context; class Products extends \Magento\Framework\App\Action\Action { public function __cons...
Arrays values should be accessed using a number specifying the location of the desired value in the array. This number is called Index. Indexes starts at 0 and finish at array length -1. To access a value, you have to do something like this: arrayName[index], replacing "index" by the num...
There are 3 usages of the $ character in a DOSKEY macro. Command separator $T is the equivalent of & in a batch script. One can join commands together like so. DOSKEY test=echo hello $T echo world Command-line arguments Like bash(not batch), we use $ to indicate command-line argument....
class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var firstTabNavigationController : UINavigationController! var secondTabNavigationControoller : UINavigationController! var thirdTabNavigationController : UINavigationController! var fourth...
I have read and watched a lot of different Dagger2 tutorials but most of them are too long or hard to understand so I decided to write a new simple and short tutorial for Dagger2, I hope you like it. Why we need it? Simplifies access to shared instances: It provides a simple way to obtain refere...
var myVariable = "This is a variable!"; This is an example of defining variables. This variable is called a "string" because it has ASCII characters (A-Z, 0-9, !@#$, etc.)
var number1 = 5; number1 = 3; Here, we defined a number called "number1" which was equal to 5. However, on the second line, we changed the value to 3. To show the value of a variable, we log it to the console or use window.alert(): console.log(number1); // 3 window.alert(number1); //...
var myInteger = 12; // 32-bit number (from -2,147,483,648 to 2,147,483,647) var myLong = 9310141419482; // 64-bit number (from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807) var myFloat = 5.5; // 32-bit floating-point number (decimal) var myDouble = 9310141419482.22; // 64-bit floating-...
var myArray = []; // empty array An array is a set of variables. For example: var favoriteFruits = ["apple", "orange", "strawberry"]; var carsInParkingLot = ["Toyota", "Ferrari", "Lexus"]; var employees = ["Billy", "Bob...
Let's first brush up with what are the Instance Variables: They behave more like properties for an object. They are initialized on an object creation. Instance variables are accessible through instance methods. Per Object has per instance variables. Instance Variables are not shared between object...
Creating an Snackbar without the need pass view to Snackbar, all layout create in android in android.R.id.content. public class CustomSnackBar { public static final int STATE_ERROR = 0; public static final int STATE_WARNING = 1; public static final int STATE_SUCCESS = 2; publi...
For a convenient way to iterate through an arrayBuffer, you can create a simple iterator that implements the DataView methods under the hood: var ArrayBufferCursor = function() { var ArrayBufferCursor = function(arrayBuffer) { this.dataview = new DataView(arrayBuffer, 0); this.size = a...
In Spark, a DataFrame is a distributed collection of data organized into named columns. It is conceptually equivalent to a table in a relational database or a data frame in R/Python, but with richer optimizations under the hood. DataFrames can be constructed from a wide array of sources such as stru...
Let's try to look at the differences between client and cluster mode of Spark. Client: When running Spark in the client mode, the SparkContext and Driver program run external to the cluster; for example, from your laptop. Local mode is only for the case when you do not want to use a cluster and in...
let storyboard = UIStoryboard(name: "StoryboardName", bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: "ViewControllerID") as YourViewController self.present(vc, animated: true, completion: nil)
@Module class AppModule(val app: Application) { @Provides @Named("the_answer") fun providesTheAnswer(): Int { return 42 } }
In order to clear the selection of those values which are selected using a Select2 drop down,we can use the empty() function. <select id="select2_example"> <option>Option1</option> <option>Option2</option> <option>Option3</option> </select&...
This is a simple parser which will parse an integer variable declaration token stream which we created in the previous example Simple Lexical Analyser. This parser will also be coded in python. What is a parser? The parser is the process in which the source text is converted to an abstract syn...
<div ng-app="MainApp" ng-controller="SampleController"> <input ng-model="dishName" id="search" class="form-control" placeholder="Filter text"> <ul> <li dir-paginate="dish in dishes | filter : di...

Page 215 of 218