This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) create the service name.service.ts | |
2) sintaxis on de service | |
/* | |
@Injectable() lets Angular know that a class can be used with the dependency injector. | |
@Injectable() is not strictly required if the class has other Angular decorators on it or does not have any dependencies. | |
*/ | |
import {Injectable} from "@angular/core"; | |
@Injectable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section id="contact"> | |
<div class="section-contact"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-8 offset-md-2"> | |
<h2><span class="bold-orange">Registrate</span></h2> | |
<form #registerForm="ngForm" (ngSubmit)="onSubmit()" class="form-horizontal"> | |
<div class="form-group"> | |
<label for="name" class="col-sm-2 control-label">Usuario</label> | |
<div class="col-sm-10"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--area de registro y de atencion --> | |
<div> | |
<div class="col-lg-6"> | |
<div class="alert alert-success" *ngIf="status_backend =='success'"> bienvenido | |
</div> | |
<div class="alert alert-danger" *ngIf="status_backend == 'failed'"> No es posible iniciar secion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acumulator = 0 | |
module_3 = 0 | |
while acumulator <= 500: | |
number = float(input('insert any number: ')) | |
if number % 3 == 0.0: | |
module_3 += number | |
else: | |
pass | |
acumulator += number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counter = 0 | |
numbers = [0 , 0 , 0] | |
while counter < 3: | |
numbers[counter]= float(input('insert the {} number: '.format(counter +1))) | |
counter +=1 | |
print('the highest number is : ', max(numbers)) | |
# OTHER LOGIC IF YOUR NOT PERMIT USE MAX FUNCTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def discount(price, result): | |
if result == 0: | |
return price - (price * 0.1) | |
elif result == 1: | |
return price - (price * 0.05) | |
else: | |
return price + (price * 0.15) | |
result = int(input(" pagar: \nefectivo: 0\ndebito: 1\ncredito: 2 (monto adicional del 15%)\n: ")) | |
price = float(input("ingrese el precio del producto: ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def numbers(): | |
counter = 0 | |
acumulator = 0 | |
while counter < 10: | |
number = float(input("igrese el {} numero: ".format(counter+1))) | |
acumulator += number | |
counter += +1 | |
return acumulator / counter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pair(): | |
numbers = [15,74,110,9,8,1,0,14,78,13,150,4] | |
counter = 0 | |
acumulator = 0 | |
while counter <= len(numbers) -1: | |
if numbers[counter] % 2 == 0: | |
acumulator += numbers[counter] | |
counter += +1 | |
return str(acumulator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
receptor=$1 | |
echo $receptor | |
fdisk_lvm_cmd="n | |
p | |
1 | |
#\n | |
#\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dec=97 | |
counter=0 | |
counter_disk=0 | |
cant=0 | |
read -p "Cantidad de discos a Formatear ?: " cant | |
while [ $counter -lt $cant ] | |
do |