Tutorial by Examples: ect

This is continuation of previous example. Cascading DropDown for country's city name. This method will be called by Jquery when user is done with country selection in parent dropdown. I have followed MVC concept and provided the basic approach for cascading dropdown. Ajax will call GetCityName met...
Create a Redux store with createStore. import { createStore } from 'redux' import todoApp from './reducers' let store = createStore(todoApp, { inistialStateVariable: "derp"}) Use connect to connect component to Redux store and pull props from store to component. import { connect } f...
SECTIONs in COBOL can be required or optional, depending on which DIVISION they are in. DATA DIVISION. FILE SECTION. FD SAMPLE-FILE 01 FILE-NAME PIC X(20). WORKING-STORAGE SECTION. 01 WS-STUDENT PIC A(10). 01 WS-ID PIC 9(5). LOCAL-STORAGE SECTION. 01 LS-CLASS PIC 9(3). LINKAGE SECTION. 01...
Project build.gradle allprojects { repositories { jcenter() // Add this if you use Gradle 4.0+ google() // Add this if you use Gradle < 4.0 maven { url 'https://maven.google.com' } } } ext { archVersion = '1.0.0-alpha5' } Applic...
datepicker-overview-example.html: <md-input-container> <input mdInput [mdDatepicker]="picker" placeholder="Choose a date" [(ngModel)]="value"> <button mdSuffix [mdDatepickerToggle]="picker"></button> </md-input-container&...
When you run mix phoenix.gen.html or mix phoenix.gen.json from command line, migrations are created in priv -> repo -> migrations in your project folder. To run migrations type mix ecto.migrate. To generate migrations for your project mix ecto.gen migrations <model_name> To generate m...
In order to use bootstrap, there are 2 cases. The electron app is connected to internet The electron app is not connected to internet For electron apps that are connected to internet, we can just make use of CDN links for bootstrap and include that in our html files. The problem comes when w...
This API not accessible for public user, authentication is required /*************************** this is protected api this is not accessible if you are not loged in ***************************/ public function protectedapi(){ if($this->session->userdata('logged_in')){ //this secti...
Let's say a user wants to select data from different tables. A table is specified by the user. function get_value(p_table_name varchar2, p_id number) return varchar2 is value varchar2(100); begin execute immediate 'select column_value from ' || p_table_name || ...
While building electron apps, usually the backend is in separate folder (js files) and front end is in a separate folder (html files). In the backend, in order to use the database, we have to include the nedb package with the require statement as follows. var Datastore = require('nedb'),db = new Da...
The default style files generated and compiled by @angular/cli are css. If you want to use scss instead, generate your project with: ng new project_name --style=scss If you want to use sass, generate your project with: ng new project_name --style=sass
Please me mindful of importing all necessary libraries required. This example uses InMemoryDbService from angular-in-memory-web-api to provide the JSON data from mock API. Live demo service.ts: import { Injectable } from '@angular/core'; import { Headers, Http } from '@angular/http'; import...
Steps to create MYSQL database Login to amazon account and select RDS service Select Launch DB Instance from the instance tab By defaul MYSQL Community Edition will be selected, hence click the select button Select the database purpose, say production and click next step Provide the mysql ver...
To find whether an object was constructed by a certain constructor or one inheriting from it, you can use the instanceof command: //We want this function to take the sum of the numbers passed to it //It can be called as sum(1, 2, 3) or sum([1, 2, 3]) and should give 6 function sum(...arguments) {...
Let's assume you got an html after selecting with soup.find('div', class_='base class'): from bs4 import BeautifulSoup soup = BeautifulSoup(SomePage, 'lxml') html = soup.find('div', class_='base class') print(html) <div class="base class"> <div>Sample text 1</div...
Swift: mapView.showAnnotations(mapView.annotations, animated: true) Objective-C: [mapView showAnnotations:mapView.annotations animated:YES]; Demo:
Let's consider situation when you parse number of pages and you want to collect value from element that's optional (can be presented on one page and can be absent on another) for a paticular page. Moreover the element itself, for example, is the most ordinary element on page, in other words no spec...
var sck = "wss://site.com/wss-handler"; var wss = new WebSocket(sck); This uses the wss instead of ws to make a secure web socket connection which make use of HTTPS instead of HTTP

Page 99 of 99