Skip to content

Instantly share code, notes, and snippets.

View Atefnouri's full-sized avatar

Atef Nouri Atefnouri

View GitHub Profile
<?php
session_start();
include('../dbconnect.php');
$numero_retour = mysqli_query($connect, "SELECT max(`num_ordre_arrivee`) as num_ord FROM `arrivee` WHERE 1");
$return = mysqli_fetch_array($numero_retour);
$retour = $return['num_ord'] + 1;
$non_extension = 0;
$extension = 0;
$pdf_extension = 0;
$png_extension = 0;
@Atefnouri
Atefnouri / file.text
Created June 6, 2019 13:45
Tommorw Taks
BackEnd [
1 - Change Concour Type to nVarchar(5)
2 - add get by cat method
//Get_Concour_By_Type
[Route("api/Concours/getByType/{_type}")]
[HttpGet()]
public IHttpActionResult getConcourbyType(string _type)
{
//remove packages
sudo apt autoremove
//remove cache
sudo apt autoclean
.subscribe(
(res) => {
console.log('HTTP response', res);
},
(err) => {
console.log('HTTP Error', err)
},
() => {
@Atefnouri
Atefnouri / localestorage.ts
Last active April 9, 2019 16:07
Local Storage in JavaScript
/*
localStorage and sessionStorage accomplish the exact same thing
and have the same API, but with sessionStorage the data is persisted
only until the window or tab is closed,while with localStorage the data is persisted
until the user manually clears the browser cache or until your web app clears the data.
The examples in this post are for localStorage, but the same syntax works for sessionStorage.
*/
@Atefnouri
Atefnouri / app.module.ts
Created April 9, 2019 09:28
Template Driven Form && Validations
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
import { ContactFormComponent } from './contact-form/contact-form.component';
import { SignupFormComponent } from './signup-form/signup-form.component';
import { NewCourseFormComponent } from './new-course-form/new-course-form.component';
@Atefnouri
Atefnouri / app.component.html
Created April 9, 2019 07:26
Component With Input && Output
<favorite [is-favoried]="false" (change)="whenFavIsChanged($event)" ></favorite>
@Atefnouri
Atefnouri / app.module.ts
Last active April 9, 2019 07:42
Reactive Form (Default && Custom Validation )
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
import { ContactFormComponent } from './contact-form/contact-form.component';
import { SignupFormComponent } from './signup-form/signup-form.component';
import { NewCourseFormComponent } from './new-course-form/new-course-form.component';
<!DOCTYPE html>
<html ng-app="todo">
<head>
<meta charset="utf-8">
<style>
.done{
@Atefnouri
Atefnouri / index.html
Last active August 1, 2017 21:10
Dynamic Select Angular js
<!DOCTYPE html>
<html ng-app="myApp" ng-controller="MainCtrl">
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body>