Tutorial by Examples: ce

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...
Comparison of access controls of Java against Ruby: If method is declared private in Java, it can only be accessed by other methods within the same class. If a method is declared protected it can be accessed by other classes which exist within the same package as well as by subclasses of the class...
Numerous packages are created specifically to access some databases. Using them can save a bunch of time on reading/formating the data. Eurostat Even though eurostat package has a function search_eurostat(), it does not find all the relevant datasets available. This, it's more convenient to brow...
Human Mortality Database Human Mortality Database is a project of the Max Planck Institute for Demographic Research that gathers and pre-process human mortality data for those countries, where more or less reliable statistics is available. # load required packages library(tidyverse) library(ext...
There are various approach to read a excel file. I'll provide a example with file path parameter. You can get various way to read a file at this post. public void ReadExcel(string path) { // Write data in workbook from xls document. XSSFWorkbook workbook = new XSS...
// Import the action types to recognize them import { ACTION_ERROR, ACTION_ENTITIES_LOADED, ACTION_ENTITY_CREATED } from './actions'; // Set up a default state const initialState = { error: undefined, entities: [], loading: true }; // If no state is provided, we take the defa...
You can copy and paste this whole plugin to try it. The class skeleton is used from here. class-oop-ajax.cpp <?php /** * The plugin bootstrap file * * This file is read by WordPress to generate the plugin information in the plugin * Dashboard. This file defines a function that start...
First in case you are consulting mobile.angular.io the flag --mobile doesn't work anymore. So to start , we can create a normal project with angular cli. ng new serviceWorking-example cd serviceWorking-example Now the important thing, to said to angular cli that we want to use service worker w...
(let [xf (comp (map inc) (filter even?))] (transduce xf + [1 2 3 4 5 6 7 8 9 10])) ;; => 30 This example creates a transducer assigned to the local xf and uses transduce to apply it to some data. The transducer add's one to each of it's inputs and only returns the ...
(def xf (filter keyword?)) Apply to a collection, returning a sequence: (sequence xf [:a 1 2 :b :c]) ;; => (:a :b :c) Apply to a collection, reducing the resulting collection with another function: (transduce xf str [:a 1 2 :b :c]) ;; => ":a:b:c" Apply to a collection, and...
When you get started with Java or Android, you quickly learn that (0,0) is in the top-left corner. In LibGDX, however, (0,0) is by default in the bottom left corner. Using an Orthographic camera, you can get (0, 0) to be in the top-left corner. Though by default, (0, 0) is in the bottom-left corner...
function sum(numbers) { var total = 0; for (var i = numbers.length - 1; i >= 0; i--) { total += numbers[i]; } return total; } It's a procedural code with mutations (over total).
<?php //Creating Connection to MySQL database using MySQLi $mysqli = mysqli_connect("IP ADDRESS OR DOAMIN", "username", "password", "database_name"); //Executing Query in the Database using MySQLi $result = mysqli_query($mysqli, "SELECT * FROM T...
Here's a simple example to demonstrate that how can we jump/open a specific screen based on the notification. For example, when a user clicks on the notification, the app should open and directly jump to notifications page instead of home page. 'use strict'; import React, { Component } from 'rea...
#include <vector> #include <string> #include <boost/process.hpp> #include <boost/asio.hpp> #include <boost/process/windows.hpp> int Run( const std::string& exeName, ///< could also be UTF-16 for Windows const std::string& args, ...
Use LocalDate and ChronoUnit: LocalDate d1 = LocalDate.of(2017, 5, 1); LocalDate d2 = LocalDate.of(2017, 5, 18); now, since the method between of the ChronoUnit enumerator takes 2 Temporals as parameters so you can pass without a problem the LocalDate instances long days = ChronoUnit.DAYS.betw...
Excel specifications and limits (Excel 2016-2013, Excel 2010, Excel 2007)
{ "title": "Person", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" ...
service.ts: import { Injectable } from '@angular/core'; @Injectable() export class AppState { public mylist = []; } parent.component.ts: import {Component} from '@angular/core'; import { AppState } from './shared.service'; @Component({ selector: 'parent-example', templ...
Given a service that can login a user: import 'rxjs/add/operator/toPromise'; import { Http } from '@angular/http'; import { Injectable } from '@angular/core'; interface LoginCredentials { password: string; user: string; } @Injectable() export class AuthService { constructor(pri...

Page 132 of 134