Tutorial by Examples: bas

app.module.ts import {appStoreProviders} from "./app.store"; providers : [ ... appStoreProviders, ... ] app.store.ts import {InjectionToken} from '@angular/core'; import {createStore, Store, compose, StoreEnhancer} from 'redux'; import {AppState, default as reduce...
MCVE's should start the Shiny app when they are copied in the console. An easy way to do this is using the shinyApp function. For example: why is my checkbox not responding? library(shiny) ui <- fluidPage( checkboxInput('checkbox', 'click me'), verbatimTextOutput('text') ) serv...
The most basic implementation of a union-find data structure consists of an array parent storing the a parent element for every element of the structure. Following these parent 'pointers' for an element i leads us to the representative j = find(i) of the set containing i, where parent[j] = j holds....
Consider the following HTML markup: <section> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> <p>...
The same URl for different http methods acts differently. Below is a table depicting the same. HTTP VERBURLDESCRIPTIONGET/api/studentsReturns all studentsGET/api/students/5Returns details of Student Id =5POST/api/studentsAdd a new studentPUT/api/students/5Update student with Id=5DELETE/api/students...
with the number 100 in cell A1, the results of these calculations =DEC2BIN(A1) =DEC2OCT(A1) =DEC2HEX(A1) =BIN2DEC(A1) =OCT2DEC(A1) =HEX2DEC(A1) is 1100100 144 64 4 64 256 note that the first 3 functions are left justified, as they are strings, and the last 3 are r...
In landscape orientation \documentclass[final,t]{beamer} \mode<presentation> { \usetheme{Berlin} } \usepackage[orientation=landscape,size=a1,scale=1,debug]{beamerposter} \usepackage{lipsum} % for dummy text \title[]{\huge Awesome title} \author[]{\large \textbf{Author Name...
Navigation bars are essentially a list of links, so the ul and li elements are used to encase navigation links. <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">...
This code example creates a UDP client then sends "Hello World" across the network to the intended recipient. A listener does not have to be active, as UDP Is connectionless and will broadcast the message regardless. Once the message is sent, the clients work is done. byte[] data = Enco...
if object_id('tempdb.dbo.#temp') is not null drop table #temp create table #temp ( dateValue datetime, category varchar(3), amount decimal(36,2) ) insert into #temp values ('1/1/2012', 'ABC', 1000.00) insert into #temp values ('2/1/2012', 'DEF', 500.00) insert into #temp value...
If you want to see overall test coverage statistics than of course in Angular CLI you can just type below command, and see the bottom of your command prompt window for results. ng test --cc // or --code-coverage
if you want to see component's individual coverage of tests follow these steps. npm install --save-dev karma-teamcity-reporter Add `require('karma-teamcity-reporter')` to list of plugins in karma.conf.js ng test --code-coverage --reporters=teamcity,coverage-istanbul note that l...
ViewModelBase extends ObservableObject and adds some methods useful for viewmodels. The property IsInDesignMode or IsInDesignModeStatic allows to determine if the code is executed in the design mode (in Visual Studio Design View) or not. The two properties are exactly the same.
Using DOSKEY, we can create macros to simplify typing many commands in command prompt. Take a look at the following example. DOSKEY macro=echo Hello World Now if you type macro in the command prompt, it would return Hello World.
For this, we will use the function aggregate, which can be used as follows: aggregate(formula,function,data) The following code shows various ways of using the aggregate function. CODE: df = data.frame(group=c("Group 1","Group 1","Group 2","Group 2",&quo...
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...
// 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...
class MyClass{ @field:[Inject Named("the_answer")] lateinit var answer: Int } In Android Development, this is the way in which you inject dependencies into Activity, Fragment or any other object that is instantiated directly by the OS. To learn more about the @field: annotation i...
class MyClass @Inject constructor(@Named val answer: Int){ /* The nuts and bolts of your class */ }
The Rule An e-commerce have a shipping rule based on zipcodes. All shipping to California is eligible to free shipping. All other west cost are US$ 10.00 and The rest of USA is US$ 20.00 How to apply technique We all know there are lots of zipcodes by state, and we are not going to use them all. ...

Page 64 of 65