Skip to content

Instantly share code, notes, and snippets.

View pablotolentino's full-sized avatar
🏠
Working from home

Pablo Tolentino pablotolentino

🏠
Working from home
View GitHub Profile
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'google';
}
{
"name": "google",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
const numeros = [3, 23, 12];
numeros.sort(function(a, b){return a - b}); // --> 3, 12, 23
const numeros = [3, 23, 12];
numeros.sort(); // --> 12, 23, 3
var ciudades = ['Pachuca','Chilpancingo','Zapopan', 'Acapulco', 'Ciudad Madero', 'Cuernavaca'];
console.log(ciudades.sort());
//resultado: ["Acapulco", "Chilpancingo", "Ciudad Madero", "Cuernavaca", "Pachuca", "Zapopan"]
select [dbo].[DiasLaborales]('2021-03-02','2021-03-19')
--Resultado: 14
CREATE FUNCTION [dbo].[DiasLaborales]
(@FechaInicial DATE,
@FechaFinal DATE )
RETURNS INT
AS
BEGIN
DECLARE @fecha DATE
DECLARE @diaslaborales int
@pablotolentino
pablotolentino / AppComponent.js
Created March 24, 2021 05:47
AppComponent completo
export class AppComponent implements OnInit {
constructor(private httpClient: HttpClient) {
}
private config: {version: string};
ngOnInit() {
this.config = require("./../assets/config.json");
console.log(this.config.version);
const headers = new HttpHeaders()
.set('Cache-Control', 'no-cache')
export class AppComponent implements OnInit {
constructor(private httpClient: HttpClient) {
}
private config: {version: string};
ngOnInit() {
this.config = require("./../assets/config.json");
console.log(this.config.version);
const headers = new HttpHeaders()
.set('Cache-Control', 'no-cache')
@pablotolentino
pablotolentino / app.js
Last active March 24, 2021 05:11
obtener versión de ejecución
export class AppComponent implements OnInit {
private config: {version: string};
ngOnInit() {
this.config = require('./../assets/config.json');
console.log(this.config.version);
}
}