Skip to content

Instantly share code, notes, and snippets.

View TheSniper102's full-sized avatar

mohamed abdelrahman TheSniper102

View GitHub Profile
i have object that consists of properties each of them is object on it's own
i want to check if certian property exisit or not if it exisit return it's value
```
controlsValidation: Object = {
nameAr: {
required: true
},
nameEn: {
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule, Http } from '@angular/http';
//third party
import { TranslateModule, TranslateLoader, TranslateStaticLoader } from 'ng2-translate/ng2-translate';
import { Angular2DataTableModule } from 'angular2-data-table';
import { IDLE_PROVIDERS } from 'ng2-idle/core'; // Import idle providers
import { KEEPALIVE_PROVIDERS } from 'ng2-idle-keepalive/core';
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/ionicons.min.css" media="all">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/material.indigo-pink.min.css">
export enum ComponentType {
Program = 1,
Report = 2,
Setup = 3,
Dashboard = 4,
Favourits = 5
}
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-color--grey-100">
<header class="mdl-layout__header" *ngIf="userLogged">
<!-- content here should only visiable to members only -->
</header>
<div class="mdl-layout__drawer">
</div>
<main class="mdl-layout__content">
<section class="mdl-layout__tab-panel is-active" *ngIf="userLogged">
import {Directive, Attribute, DynamicComponentLoader, ElementRef} from 'angular2/core';
import {Router, RouterOutlet, ComponentInstruction} from 'angular2/router';
import { AuthService } from '../security/auth/auth';
@Directive({
selector: 'router-outlet'
})
export class LoggedInRouterOutlet extends RouterOutlet {
publicRoutes: Array<string>;
private parentRouter: Router;
{
"pageData": [
{
"name": 1,
"keyWord": [
{
"key": "title",
"value": "sanabel",
"id": 1
},
const int SECOND = 1;
const int MINUTE = 60 * SECOND;
const int HOUR = 60 * MINUTE;
const int DAY = 24 * HOUR;
const int MONTH = 30 * DAY;
var ts = new TimeSpan(DateTime.UtcNow.Ticks - yourDate.Ticks);
double delta = Math.Abs(ts.TotalSeconds);
if (delta < 1 * MINUTE)
<div class="topNav">
<div class="home"><a href="index.php" title="العودة للرئيسية"></a>
</div>
<div class="topMenu">
<ul id="dropmenu">
<li><a target="_blank" href="#">الطور الإبتدائي</a>
<ul>
<li><a target="_blank" href="http://www.etuddz.com/vb/forums/etuddz9/">قسم السنة الأولى </a></li>
<li><a target="_blank" href="http://www.etuddz.com/vb/forums/etuddz10/">قسم السنة الثانية</a></li>
/*Start Code etuddz.com*/
#headerWrapper {
width:1330px;
height:376px;
overflow:visible;
}
.topNav {
width:1330px;