Tutorial by Examples: api

Microsoft doesn't officially support APIs but with some research more declarations can be found online Office 2016 for Mac is sandboxed Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed. Sandboxing restricts the apps from accessing resources outside the...
Web Api 2 - Hello World example We are going to create a new Web Api simple application which return to us Json with message and user name. Lets start! First create new Web Api project using Visual Studio and select Empty Template. Be sure to check "Web Api" folder: NOTE I didn't choo...
modFTP Option Explicit Option Compare Text Option Private Module 'http://msdn.microsoft.com/en-us/library/aa384180(v=VS.85).aspx 'http://www.dailydoseofexcel.com/archives/2006/01/29/ftp-via-vba/ 'http://www.15seconds.com/issue/981203.htm 'Open the Internet object Private Declare Function...
When performing data science tasks, it’s common to want to use data found on the internet. You’ll usually be able to access this data via an Application Programming Interface(API) or in other formats. However, there are times when the data you want can only be accessed as part of a web page. In case...
Use Nuget to find the Web Api Package. You can do that either by using the Manage Nuget Packages and searching for the Web Api package or use Nuget Package Manager and type PM> Install-Package Microsoft.AspNet.WebApi Add WebApiConfig.cs to the App_Start/ folder The config file should contain...
When there's an expression with a pipe the cmd starts two threads on both sides of the pipe and the expression is parsed twice (for each side of the pipe) so carets need to be doubled. On the left side: echo ^^^&|more On the right side: break|echo ^^^&
Cold observable implementation, emits true when TTS engine finishes speaking, starts speaking when subscribed. Notice that API level 21 introduces different way to perform speaking: public class RxTextToSpeech { @Nullable RxTTSObservableOnSubscribe audio; WeakReference<Context> contextR...
Given a pipe that reverse a string import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'reverse' }) export class ReversePipe implements PipeTransform { transform(value: string): string { return value.split('').reverse().join(''); } } It can be tested configuring th...
data.service.ts: import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/map'; @Injectable() export class DataService { constructor(private http: Http) { } fetchData(){ return this.http.get('https://dinstruct-d4b62.firebaseio....
datepicker-overview-example.html: <md-input-container> <input mdInput [mdDatepicker]="picker" [(ngModel)]="date" placeholder="Choose a date"> <button mdSuffix [mdDatepickerToggle]="picker"></button&gt...
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Api extends CI_Controller { //default value private $login_credential; function __construct() { parent::__construct(); //for user authentication $this->load->library('session'); ...
/***************************** @return all events ****************************/ public function getallevents(){ //get data from model $events = array( array('Event 1', '2015-04-03'), array('Event 2', '2015-04-03'), array('Event 3', '2015-06-16'), array('Event 4', '2015-0...
/***************************** login user @required : username and password via post method only @return user data if login successfull otherwise error message ****************************/ public function login(){ $username=$this->input->post('username'); $password=$this->input-...
/*************************** log out user ***************************/ public function logout(){ //delete all session session_destroy(); $this->output->set_output(json_encode(array('status'=>true,'msg'=>'log Out successfully'))); }
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...
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...

Page 12 of 12