Tutorial by Examples: ti

As usual, we first need a CFDictionary to represent the item we want to update. This must contain all of the old values for the item, including the old private data. Then it takes a CFDictionary of any attributes or the data itself that you would like to change. So first, let's construct a class ke...
The JAR, WAR and EAR files types are fundamentally ZIP files with a "manifest" file and (for WAR and EAR files) a particular internal directory / file structure. The recommended way to create these files is to use a Java-specific build tool which "understands" the requirements f...
The Oracle Java Tutorials summarize Web Start as follows: Java Web Start software provides the power to launch full-featured applications with a single click. Users can download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through lengt...
Functions are an important part of Julia programming. They can be defined directly within modules, in which case the functions are referred to as top-level. But functions can also be defined within other functions. Such functions are called "closures". Closures capture the variables in th...
import sympy as sy # Symbols have to be defined before one can use them x = sy.S('x') # Definition of the equation to be solved eq=sy.Eq(x**2 + 2, 6) #Print the solution of the equation print sy.solve(eq) The result printed will be: [-2, 2]
This example is divided into two pillars SalaryCalculation Class : Calculating the net salary after tax deduction SalaryCalculationTests Class : For testing the method that calculates the net salary Step 1: Create Class Library, name it WagesLibrary or any appropriate name. Then rename the cl...
In multiple table UPDATE, it updates rows in each specified tables that satisfy the conditions. Each matching row is updated once, even if it matches the conditions multiple times. In multiple table UPDATE, ORDER BY and LIMIT cannot be used. Syntax for multi table UPDATE is, UPDATE [LOW_PRIORITY]...
By default Controllers, ViewComponents and TagHelpers aren't registered and resolved via the dependency injection container. This results in the inability to do i.e. property injection when using a 3rd party Inversion of Control (IoC) container like AutoFac. In order to make ASP.NET Core MVC resolv...
dispatch_group_t preapreWaitingGroup = dispatch_group_create(); dispatch_group_enter(preapreWaitingGroup); [self doAsynchronousTaskWithComplete:^(id someResults, NSError *error) { // Notify that this task has been completed. dispatch_group_leave(preapreWaitingGroup); }] dispatch...
Prerequisites Have a strong grasp of a programming language such as Python, C, C++, Ruby, or any of the other languages out there. Have your favorite code editor or IDE installed (one such example is VSCode) Stay motivated. Constructing a compiler is not easy, so keep pushing; it's worth the ef...
Configuration Log4j configuration file can be in any of these formats: JSON YAML properties (text file) XML Configuration discovery Log4j will inspect the log4j.configurationFile system property and, if set, will attempt to load the configuration. If no system property is set log4j wil...
For example, we have two environments: CI - Staging and want to add some customizations for each environment. Here I will try to customize server URL, app name. First, we create two targets for 2 environments by duplicating the main target: For each target, we will define a custom macro. Here I ...
C++ #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> using namespace std; using namespace cv; // Function Headers void detectAndDisp...
You can nest enumerations one inside an other, this allows you to structure hierarchical enums to be more organized and clear. enum Orchestra { enum Strings { case violin case viola case cello case doubleBasse } enum Keyboards { case...
This example has more tests available in unit testing. Employee.vb (Class Library) ''' <summary> ''' Employee Class ''' </summary> Public Class Employee ''' <summary> ''' First name of employee ''' </summary> Public Property FirstName As String = &q...
Animation to show how selection sort works Below example shows selection sort in ascending order: public class MySelectionSort { public static int[] doSelectionSort(int[] arr){ for (int i = 0; i < arr.length - 1; i++) { int index = i; ...
Many Flask applications are developed in a virtualenv to keep dependencies for each application separate from the system-wide Python installation. Make sure that mod-wsgi is installed in your virtualenv: pip install mod-wsgi Then create a wsgi wrapper for your Flask application. Usually it's kep...
The advantage of using Apache over the builtin werkzeug server is that Apache is multi-threaded, meaning that multiple connections to the application can be made simultaneously. This is especially useful in applications that make use of XmlHttpRequest (AJAX) on the front-end. /etc/apache2/sites-ava...
The multi-line comment can be used to comment out large blocks of code. It begins with /* and ends with */. /* This is a multi-line comment. It spans multiple lines. This is still part of the comment. */
The following are the steps that you will need to follow to setup mysql datasource in JBoss AS 7. Download the MySQL jdbc zip file from here: Create a directory mysql inside /jboss-as-7.1.1.Final/modules/com Inside that create a directory structure like the following: /jboss-as-7.1.1.Final/m...

Page 346 of 505