Skip to content

Instantly share code, notes, and snippets.

View monirulalom's full-sized avatar

Md Monirul Alom monirulalom

View GitHub Profile
import matplotlib.pyplot as plt
g = 9.8
m = 60.5
c = 0
v_ini = 0
t_ini = 0
t_list = list()
v_list = list()
@monirulalom
monirulalom / app.component.ts
Created August 19, 2018 19:46
Two way binding without ngModel
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<input [value]="name" (input)="name=$event.target.value" />
<h1>Hello {{name}}</h1>
<h4>Edit the value in the input field </h4>
`
})
export class AppComponent {
@monirulalom
monirulalom / app.component.ts
Created August 19, 2018 19:26
ngModel two way binding
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<input [(ngModel)]='name' />
<h1>Hello {{name}}</h1>
<h4>Edit the value in the input field </h4>
`
})
export class AppComponent {
@monirulalom
monirulalom / app.module.ts
Created August 19, 2018 19:20
app.module.ts ngModel data binding
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
@NgModule({
imports: [ BrowserModule, FormsModule ], // FormsModule must be added to use ngModel
declarations: [ AppComponent],
bootstrap: [ AppComponent ]
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<button (click)="sayhello()">Say hello</button>`
})
export class AppComponent {
sayhello() {
alert("Hello , I am Monirul Alom");
}
@monirulalom
monirulalom / propertybinding.ts
Last active August 19, 2018 11:39
Angular Property Binding
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1 [innerHtml]='name'></h1>`
})
export class AppComponent {
name: string = 'Monirul Alom';
}
@monirulalom
monirulalom / interpolation.ts
Last active August 19, 2018 11:40
angular interpolation
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>{{ name }}</h1>`
})
export class AppComponent {
name: string = 'Monirul Alom';
}
@monirulalom
monirulalom / .htaccess
Created June 13, 2018 15:22 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@monirulalom
monirulalom / db.json
Last active June 9, 2018 18:18
db.json
{
"users": [
{
"id": 0,
"name": "Monirul Alom",
"email": "[email protected]"
},
{
"id": 1,
"name": "Waldemar Vella",
@monirulalom
monirulalom / users.js
Last active June 9, 2018 19:07
users.js
var faker = require('faker')
module.exports = () => {
const data = { users: [] }
for (let i = 0; i < 20; i++) {
data.users.push({
id: i,