Skip to content

Instantly share code, notes, and snippets.

View zeptobook's full-sized avatar

ZeptoBook zeptobook

View GitHub Profile
@zeptobook
zeptobook / test.html
Created October 20, 2018 22:49
test gist
<div ng-app="myApp" ng-controller="myCtrl">
<div welcome-customer></div>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', ['$scope',function($scope) {
$scope.customer = {
name: 'Adesh',
@zeptobook
zeptobook / test.html
Created December 14, 2018 02:41
test
<app-header></app-header>
<div class="center">
<div class="panel panel-default">
<div class="panel-heading">Login Here</div>
<div class="panel-body">
<div class="login-form">
<div class="main-div">
<form [formGroup]="loginForm" (ngSubmit)="login()" novalidate>
<div class="form-group">
<label for="user">User Name</label>
@zeptobook
zeptobook / SampleDataController.cs
Created December 15, 2018 14:56
SampleDataController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace zeptoapp.Controllers
{
[Route("api/[controller]")]
public class SampleDataController : Controller
@zeptobook
zeptobook / fetch-data.component.ts
Created December 15, 2018 15:05
fetch-data.component.ts
import { Component, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-fetch-data',
templateUrl: './fetch-data.component.html'
})
export class FetchDataComponent {
public forecasts: WeatherForecast[];
@zeptobook
zeptobook / fetch-data.component.html
Created December 15, 2018 15:10
fetch-data.component.html
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from the server.</p>
<p *ngIf="!forecasts"><em>Loading...</em></p>
<table class='table table-striped' *ngIf="forecasts">
<thead>
<tr>
<th>Date</th>
@zeptobook
zeptobook / test.js
Created December 29, 2018 14:53
Array Declaration
var array1 = []; //Method 1
var array2 = new Array(); //Method 2
@zeptobook
zeptobook / test1.js
Created December 29, 2018 15:00
Initialization at the time of Declaration
var array1 = ['First', 'Second', 'Third', 'Fourth']; //Method 1
var array2 = new Array('First'); //Method 2
@zeptobook
zeptobook / test3.js
Created December 29, 2018 15:04
Declaration after Initialization
//Declaration after Initialization
array1 = ['First', 'Second', 'Third', 'Fourth']; //Method 1
array2 = new Array('First'); //Method 2
@zeptobook
zeptobook / map.js
Created December 29, 2018 15:35
array.map()
var numbers1 = [10, 20, 30, 40, 50];
var numbers3 = numbers1.map(function(value, index, array){
return value * 3;
});
@zeptobook
zeptobook / map1.js
Created December 29, 2018 15:50
array.map()
var numbers3 = numbers1.map(function(value){
return value * 3;
});