Tutorial by Examples: amp

{ "id": 89, "name": "Aldous Huxley", "type": "Author", "books":[{ "name": "Brave New World", "date": 1932 }, { &q...
InputBox, userinput This will store what the user types into the input box in the variable named userinput
To get all the server variables run this query either in the SQL window of your preferred interface (PHPMyAdmin or other) or in the MySQL CLI interface SHOW VARIABLES; You can specify if you want the session variables or the global variables as follows: Session variables: SHOW SESSION VARIABLE...
To get the database server status run this query in either the SQL window of your preferred interface (PHPMyAdmin or other) or on the MySQL CLI interface. SHOW STATUS; You can specify whether you wish to receive the SESSION or GLOBAL status of your sever like so: Session status: SHOW SESSION S...
Processlist This will show all active & sleeping queries in that order then by how long. SELECT * FROM information_schema.PROCESSLIST ORDER BY INFO DESC, TIME DESC; This is a bit more detail on time-frames as it is in seconds by default SELECT ID, USER, HOST, DB, COMMAND, TIME as time_second...
This example just illustrates how this keyword can be used. int a = 10; // Assume that type of variable 'a' is not known here, or it may // be changed by programmer (from int to long long, for example). // Hence we declare another variable, 'b' of the same type using // decltype keyword. de...
Let's say we have vector: std::vector<int> intVector; And we want to declare an iterator for this vector. An obvious idea is to use auto. However, it may be needed just declare an iterator variable (and not to assign it to anything). We would do: vector<int>::iterator iter; Howev...
This example demonstrates the use of GET, POST, PUT and DELETE HTTP Methods in doing CRUD operations on a REST resource I am using the below software, frameworks and tools: Jersey 2.25.1 JDK 1.7.x (Java 7) Eclipse IDE Kepler Apache Maven 3.3.9 Apache Tomcat 7.x Please follow the below ste...
To have a look of the different functionalities of the hybris platform, you can use the install recipes. For this, just download the HYBRISCOMMXXXX_X-XXXXXXXX.ZIP and extract it to you local device. Than go through the following steps: The <recipe_names> you can find under the folder \hybris\...
For this example we will test the sum method of a simple calculator. In this example we will test the application: ApplicationToTest. This one has a class called Calc. This class has a method Sum(). The method Sum() looks like this: public void Sum(int a, int b) { return a + b; } The un...
Java Singleton Pattern To implement Singleton pattern, we have different approaches but all of them have following common concepts. Private constructor to restrict instantiation of the class from other classes. Private static variable of the same class that is the only instance of the class. P...
Lets assume that we have a complex api, with many generic views and some generic viewsets. We want to enable PageNumberPagination to every view, except one (either generic view or viewset, does not make a difference) for which we want a customized case of LimitOffsetPagination. To achieve that we n...
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let imageView = UIImageView(frame: CGRect(x: CGFloat(0), y: CGFloat(50), width: CGFloat(320), height: CGFloat(320))) view.addSubview(imageVi...
Q-learning is a variant of model-free reinforcement learning. In Q-learning we want the agent to estimate how good a (state, action) pair is so that it can choose good actions in each state. This is done by approximating an action-value function (Q) that fits in equation below: Where s and a are ...
Input :- 14 15 16 17 18 21 19 10 20 11 54 36 64 55 44 23 80 39 91 92 93 94 95 42 Output:- print value in index 14 15 16 17 18 21 36 39 42 95 94 93 92 91 64 19 10 20 11 54 80 23 44 55 or print index 00 01 02 03 04 05 15 25 35 34 33 32 31 30 20 10 11 12 13 14 24 23 22 21
Ex1:- let str1 = 'stackoverflow'; let str2 = 'flowerovstack'; These strings are anagrams. // Create Hash from str1 and increase one count. hashMap = { s : 1, t : 1, a : 1, c : 1, k : 1, o : 2, v : 1, e : 1, r : 1, f : 1, l : 1, w : 1...
Simple extract of index.html: <div class="sign-in"> {% if user %} [Passing the url we have the opportunity to logout the user] <a href="{{ url|safe }}">LOG OUT</a> [You can include here operations for user authenticated] ...
Now that we know the basics of Selenium, we can make our own project. For this example, we'll be making a program, which finds the Newest questions on stack-overflow. We start easy, lets open stack-overflow. public static void main(String[] args) throws InterruptedException { System.setProper...
This is a very simple image processing and computer vision Python exercise series, designed to introduce these topics with little practicals. I am sorry in advance for any rookie mistakes, it is still under development. In this series, I will be limiting digital images we can use to PNG files for t...
`To calculate 1D convolution by hand, you slide your kernel over the input, calculate the element-wise multiplications and sum them up. The easiest way is for padding=0, stride=1 So if your input = [1, 0, 2, 3, 0, 1, 1] and kernel = [2, 1, 3] the result of the convolution is [8, 11, 7, 9, 4], whic...

Page 41 of 46