Skip to content

Instantly share code, notes, and snippets.

View chukitow's full-sized avatar

Ivan velasquez chukitow

View GitHub Profile
@chukitow
chukitow / gist:7712025
Created November 29, 2013 21:07
Test Crowd
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
for (var i = 1; i <= 100; i++)
{
var mensaje = "";
@chukitow
chukitow / Examen 2da parcial
Last active December 30, 2015 10:59
Examen de humberto, leer numeros guardados en un archivo de texto y determinar cuantos numeros terminan con 0,1,2,3,4,5,6,7,8,9
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream archivo("C:\\Users\\Ivan Velasquez Rios\\Desktop\\examen.txt", ios::in);
char numeros[20];
int num, sum=0;
int contador[10] = {0};
#include<iostream>
#include<fstream>
using namespace std;
void determinarRangos(int[10], int);
int main()
{
int contador[10] = {0};
int rangos [10];
int extensionRango = 0;
@chukitow
chukitow / Java Sqlite
Created December 10, 2013 17:03
Clase para la conexion a una base de datos sqlite
import java.awt.Component;
import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;
/**
*
* @author chukitow
*/
public class Dbconection {
@chukitow
chukitow / Conexion sqlite c#
Created December 13, 2013 02:33
Clase con helpers para la conexcion a una base de datos en sqlite
class SQLiteDatabase
{
String dbConnection;
/// <summary>
/// Default Constructor for SQLiteDatabase Class.
/// </summary>
public SQLiteDatabase()
db = new SQLiteDatabase();
Dictionary<String, String> data = new Dictionary<String, String>();
data.Add("NAME", nameTextBox.Text);
data.Add("DESCRIPTION", descriptionTextBox.Text);
data.Add("PREP_TIME", prepTimeTextBox.Text);
data.Add("COOKING_TIME", cookingTimeTextBox.Text);
data.Add("COOKING_DIRECTIONS", "Placeholder");
try
@chukitow
chukitow / gist:8130288
Last active January 1, 2016 10:19
Obtener Elemento de un JTABLE
int row = jTable1.getSelectedRow();
String id = (String) jTable1.getModel().getValueAt(row, 0);
//System.out.println(id);
try
{
File archivo = new File("datos.xls");
TableModel modelo = jTable1.getModel();
FileWriter excel = new FileWriter(archivo);
for(int i = 0; i < modelo.getColumnCount(); i++)
{
excel.write(modelo.getColumnName(i) + "/t");
}
excel.write("\n");
package com.example.threads;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
package com.example.threads;
import android.app.ListActivity;
import android.content.Intent;
import android.database.DataSetObserver;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;