Tutorial by Examples: c

At first, You should create database with mysql, phpMyAdmin, HeidiSQL or another instruments to work with Database and let user create new one. After that procedure, You should provide access to database for project. You need to go into file /path/to/your/project/config/app.php,then look up for Da...
Sinse structs are value types all the data is copied on assignment, and any modification to the new copy does not change the data for the original copy. The code snippet below shows that p1 is copied to p2 and changes made on p1 does not affect p2 instance. var p1 = new Point { x = 1, y =...
Append the following command to the Codeship setup commands: meteor npm run mgp Now, we need to give Codeship access to these private repositories. There is a Codeship documentation article describing this process in detail but here are the steps that you have to take for Github: Create a new...
using Google.Contacts; using Google.GData.Client; using Google.GData.Contacts; using Google.GData.Extensions; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Web; using System.Web...
The only action method you need to add is to add an action link present below <a href='@Url.Action("Import", "Home")'>Import Google Contacts</a>
To create new archive open zipfile with write mode. import zipfile new_arch=zipfile.ZipFile("filename.zip",mode="w") To add files to this archive use write() method. new_arch.write('filename.txt','filename_in_archive.txt') #first parameter is filename and second parameter i...
Install openfire or any chat server in your system or on server. For more details click here. Create android project and add these libraries in gradle: compile 'org.igniterealtime.smack:smack-android:4.2.0' compile 'org.igniterealtime.smack:smack-tcp:4.2.0' compile 'org.igniterealtime.smack:smac...
Create a class name ErrorMatcher inside your test package with below code: public class ErrorMatcher { @NonNull public static Matcher<View> withError(final String expectedErrorText) { Checks.checkNotNull(expectedErrorText); return new BoundedMatcher<View, ...
All we need are: ViewPager, TabLayout and 2 drawables for selected and default dots. Firstly, we have to add TabLayout to our screen layout, and connect it with ViewPager. We can do this in two ways: Nested TabLayout in ViewPager <android.support.v4.view.ViewPager android:id="@+i...
Service: angular.module('core').factory('print_service', ['$rootScope', '$compile', '$http', '$timeout','$q', function($rootScope, $compile, $http, $timeout,$q) { var printHtml = function (html) { var deferred = $q.defer(); var hiddenFrame = $('<...
To publish a crate on crates.io, you must log in with Cargo (see 'Connecting Cargo to a Crates.io Account'). You can package and publish your crate with the following commands: cargo package cargo publish Any errors in your Cargo.toml file will be highlighted during this process. You should en...
Accounts on crates.io are created by logging in with GitHub; you cannot sign up with any other method. To connect your GitHub account to crates.io, click the 'Login with GitHub' button in the top menu bar and authorise crates.io to access your account. This will then log you in to crates.io, assumi...
Although storing multiple values in a single column violates normalization rules, sometimes one has to deal with badly designed legacy tables. A recursive query can help convert comma-separated values into distinct rows. Create a sample badly designed table and insert some data: create table proje...
The default way to find installed packages with CMake is the use the find_package function in conjunction with a Find<package>.cmake file. The purpose of the file is to define the search rules for the package and set different variables, such as <package>_FOUND, <package>_INCLUDE_D...
On Unix-like operating systems, it is possible to use the pkg-config program to find and configure packages that provides a <package>.pc file. In order to use pkg-config, it is necessary to call include(FindPkgConfig) in a CMakeLists.txt. Then, there are 2 possible functions: pkg_search_mo...
String macros do not come with built-in interpolation facilities. However, it is possible to manually implement this functionality. Note that it is not possible to embed without escaping string literals that have the same delimiter as the surrounding string macro; that is, although ""&quot...
Adding a Product to a Shopping Cart The following example demonstrates how to Add a product (or anything) to a Database Table asynchronously, using AJAX, and TypeScript. declare var document; declare var xhr: XMLHttpRequest; window.onLoad = () => { Start(); }; function Start() { ...
The reduce(), reduceLeft() and reduceRight methods are similar to folds. The function passed to reduce takes two values and yields a third. When operating on a list, the first two values are the first two values in the list. The result of the function and the next value in the list are then re-appli...
Outer joins return all the rows from one or both tables, plus matching rows. Table People PersonID FirstName 1 Alice 2 Bob 3 Eve Table Scores PersonID Subject Score 1 Math 100 2 Math 54 2 Science 98 Left joining the tables: Select * f...
This simple function will execute the specified Select SQL command and return the result as data set. Public Function ReadFromDatabase(ByVal DBConnectionString As String, ByVal SQL As String) As DataTable Dim dtReturn As New DataTable Try 'Open the connection using the connection...

Page 571 of 826