Tutorial by Examples: bas

A typedef declaration has the same syntax as a variable or function declaration, but it contains the word typedef. The presence of typedef causes the declaration to declare a type instead of a variable or function. int T; // T has type int typedef int T; // T is an alias for int int A[1...
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="${db.host}" port="${db.port}"...
$pwd Displays the present working directory. $who Displays all the users logged in. $who am i Shows the username of the current user. $date Displays the current system date $which <command> Shows the path of the specified command. For example "$which pwd" will sho...
The example assumes you have successfully run and fully understand the tutorial of MNIST(Deep MNIST for expert). %matplotlib inline import matplotlib.pyplot as plt # con_val is a 4-d array, the first indicates the index of image, the last indicates the index of kernel def display(con_val, kern...
Opening a stream fopen opens a file stream handle, which can be used with various functions for reading, writing, seeking and other functions on top of it. This value is of resource type, and cannot be passed to other threads persisting its functionality. $f = fopen("errors.log", "a...
One time definition of a generic base class with recursive type specifier. Each node has one parent and multiple children. /// <summary> /// Generic base class for a tree structure /// </summary> /// <typeparam name="T">The node type of the tree</typeparam> pub...
The horizontal layout set up the object inside it horizontally. basic code: #include <QApplication> #include <QMainWindow> #include <QWidget> #include <QHBoxLayout> #include <QPushButton> int main(int argc, char *argv[]) { QApplication a(argc, argv); ...
The vertical layout set up the object inside it vertically. #include "mainwindow.h" #include <QApplication> #include <QMainWindow> #include <QWidget> #include <QVBoxLayout> #include <QPushButton> int main(int argc, char *argv[]) { QApplication...
select cst.constraint_schema, cst.constraint_name,                        fk.table_name, fk.ordinal_position, fk.column_name,                pk.table_name, pk.column_name                                 from qsys2.syscst cst join qsys2.syskeycst fk                         on fk.constraint_sc...
select cst.constraint_schema, cst.constraint_name,                        fk.table_name, fk.ordinal_position, fk.column_name,                pk.table_name, pk.column_name                                 from qsys2.syscst cst join qsys2.syskeycst fk                         on fk.constraint_sc...
QtCreator is, at the moment, the best tool to create a Qt application. In this example, we will see how to create a simple Qt application which manage a button and write text. To create a new application click on File->New File or Project: Then choose the Projects->Application->Qt Widge...
/* Wiring: LCD pin 1 (VSS) -> Arduino Ground LCD pin 2 (VDD) -> Arduino 5V LCD pin 3 (VO) -> Arduino Ground LCD pin 4 (RS) -> Arduino digital pin 12 LCD pin 5 (RW) -> Arduino Ground LCD pin 6 (E) -> Arduino digital pin 11 LCD pin 11 (D4) -> Ar...
Filename myEmail EMAIL Subject = "My Email Subject" From = "[email protected]" To = '[email protected]' CC = '[email protected]' Type = 'Text/Plain'; Data _null_; File myEmail; PUT "Email content"; PUT &q...
Let's first create a simple "Hello world!" MailboxProcessor which processes one type of message and prints greetings. You'll need the message type. It can be anything, but Discriminated Unions are a natural choice here as they list all the possible cases on one place and you can easily us...
Let's consider the predicate sumDif/2, verified if the structure of a list matches several constraints. The first term represents the list to analyze and the second term another list that holds the part of the first list that is unknown to our constraints. For the demonstration, sumDif/2 recognizes...
Install Firebase resource in the the AppScript To do that click on Resources and then on Libraries. Firebase has a unique project library key that need to be installed in the AppScript. Click on Libraries The following pop-up appears. Enter the following project key in the textbox. MYeP8ZEE...
Simply add an attribute to the controller action [Route("product/{productId}/customer")] public IQueryable<Product> GetProductsByCustomer(int productId) { //action code goes here } this will be queried as /product/1/customer and productId=1 will be sent to the controll...
The yarn init command will walk you through the creation of a package.json file to configure some information about your package. This is similar to the npm init command in npm. Create and navigate to a new directory to hold your package, and then run yarn init mkdir my-package && cd my-pa...
Create your own WSMessageSender: import java.io.IOException; import java.net.HttpURLConnection; import org.springframework.ws.transport.http.HttpUrlConnectionMessageSender; import sun.misc.BASE64Encoder; public class CustomWSMessageSender extends HttpUrlConnectionMessageSender{ @Ov...
There's two ways to create a ByteBuffer, where one can be subdivided again. If you have an already existing byte[], you can "wrap" it into a ByteBuffer to simplify processing: byte[] reqBuffer = new byte[BUFFER_SIZE]; int readBytes = socketInputStream.read(reqBuffer); final ByteBuffer ...

Page 58 of 65