Skip to content

Instantly share code, notes, and snippets.

View titandiaz's full-sized avatar

Cristian Diaz titandiaz

View GitHub Profile

Estructura del Libro de Preparación PET

1. Comprensión y Uso del Inglés

  • Gramática Básica
  • Vocabulario Común
  • Comprensión de Lectura
  • Referencias:
    • "English Grammar in Use" - Raymond Murphy
    • "Oxford English Grammar Course" - Michael Swan, Catherine Walter
@titandiaz
titandiaz / tracker.swift
Created March 31, 2021 21:54
time tracker
import Cocoa
protocol ApplicationTimeTrackerDelegate: AnyObject {
func timeTracker(_ tracker: ApplicationTimeTracker, didUpdateFrontmostApplication: Application, withTotalSeconds: UInt)
func timeTracker(_ tracker: ApplicationTimeTracker, didFinishTrackingApplication: Application, withTotalSeconds: UInt)
}
class ApplicationTimeTracker: NSObject {
private var trackings: [BundleIdentifier: Tracking] = [:]
private var applications: [String: Application] = [:]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@titandiaz
titandiaz / ejemplo.dart
Created March 10, 2020 00:21
ejemplo de practica
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
computed: {
citiesWithPayOnDelivery() {
if (this.paymentMethods[0] && this.paymentMethods[0].valores !== '') {
return JSON.parse(this.paymentMethods[0].valores)
}else {
return []
}
},
cityLabelsWithPayOnDelivery: {
get() {
@titandiaz
titandiaz / Menu.java
Created February 13, 2017 14:49
Menú con interfaz gráfica JOptionPane
import java.util.Scanner;
import javax.swing.JOptionPane;
public class MenuEstructurado {
static String pedir;
static Scanner scanner = new Scanner(System.in); //Sirve para recoger texto por consola
static int select = -1; //opción elegida del usuario
static int base, altura, area, perimetro, radio, ladoEquilatero, baseRectangulo, alturaRectangulo, baseTrianguloRectangulo, alturaTrianguloRectangulo ; //Variables
@titandiaz
titandiaz / MenuEstructurado.java
Last active February 13, 2017 14:00
Menu Switch
import java.util.Scanner;
public class MenuEstructurado {
static Scanner scanner = new Scanner(System.in); //Sirve para recoger texto por consola
static int select = -1; //opción elegida del usuario
static int base, altura, area, perimetro, radio, ladoEquilatero, baseRectangulo, alturaRectangulo; //Variables
static double areaCirculo, perimetroCirculo, areaEquilatero, perimetroEquilatero, areaRectangulo, hipotenusaRectangulo, perimetroRectangulo;
public static void main(String[] args) {
import java.util.ArrayList;
public class parqueadero {
private ArrayList<Puesto> c;
public parqueadero()
@titandiaz
titandiaz / comisionesYava.java
Last active May 25, 2016 05:29
Calcular las comisiones de los empleados de la empresa según los domicilios
package yava;
import java.util.Scanner;
public class DomiciliosYava {
double [] sueldos= new double[3];
double [] domicilios= new double[sueldos.length];
int i;
Scanner leer= new Scanner(System.in);
@titandiaz
titandiaz / campeonato.java
Last active May 20, 2016 12:53
enfrentamientos de equipos
package mundo;
import java.util.Scanner;
public class Campeonato {
String [] equipos;
int [][] tabla;
int maxEquipos;
int [] puntos;
int [] partidosGanados;