Skip to content

Instantly share code, notes, and snippets.

View gaverdugo's full-sized avatar
💭
No thoughts...

G. A. Verdugo gaverdugo

💭
No thoughts...
  • Sonora
View GitHub Profile
@gaverdugo
gaverdugo / Main.java
Last active February 25, 2016 15:18
Factorial con recursividad en Java.
public class Main {
private static long factorial(int num){
if(num == 0) {
return 1;
} else {
return num * factorial(num - 1);
}
}
public static void main(String[] args) {
System.out.println(factorial(56));
group: ventas
description[[ Esquema de ejemplo
]]
Componentes = { cn, cnombre, color, peso, ciudad
C1, X3A, ROJO, 12, HERMOSILLO
C2, B85, VERDE, 17, OBREGON
C3, C4B, AZUL, 17, MAZATLAN
C4, C4B, ROJO, 14, HERMOSILLO
C5, VT8, AZUL, 12, OBREGON
private void rentasBrowseActionPerformed(java.awt.event.ActionEvent evt) {
final String sql = "SELECT renta_id AS ID, "
+ "cliente_nombre AS Cliente, "
+ "vehiculo_id AS Vehiculo, "
+ "estado_renta_descripcion AS Estado, "
+ "renta_desde AS Desde, "
+ "renta_hasta AS Hasta, "
+ "renta_enviada_confirmacion AS Enviada, "
+ "renta_pagada AS Pagada FROM renta NATURAL JOIN vehiculo NATURAL join cliente NATURAL JOIN estado_renta";
try {
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rentasvehiculos.TableListeners;
import java.sql.SQLException;
import javax.swing.JOptionPane;
import javax.swing.event.TableModelEvent;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rentasvehiculos;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
using System;
namespace PVI_ca1
{
class Auto
{
public string Color;
public string Marca;
public string Modelo;
public string Placas;
namespace GYM_wpf1
{
class Conversiones
{
public static double CentimetersToInches(double centimeters)
{
return centimeters * 0.393701;
}
public static double MetersToFeet(double meters)
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Created by German on 2/2/2017.
*/
class DateFormat {
public static String changeDateFormat(String date) {
String pattern = "(^[0-3]?[0-9])|((?:[0-9]{2})?[0-9]{2})|([0-1]?[0-9])|";
Pattern p = Pattern.compile(pattern);
package reverseread;
import java.io.*;
import java.util.ArrayList;
import java.util.regex.Pattern;
/**
* Created by gava9 on 07/02/2017.
*/
public class ReverseRead {
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;