This file contains hidden or 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
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import javax.swing.JOptionPane; | |
public class SQLiteConnection { | |
public static final String STRING_CONNECTION = "jdbc:sqlite:"; |
This file contains hidden or 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
<html> | |
<body> | |
<h1 id="title">The Chronos Meter</h1> | |
<script language="javascript"> | |
var divChronometer = document.createElement("div"); | |
divChronometer.id = "chronometer"; | |
document.body.appendChild(divChronometer); | |
startChronometer(); |
This file contains hidden or 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
<?php | |
date_default_timezone_set('America/Lima'); | |
function atras(){ | |
echo "<script>history.back()</script>"; | |
} | |
function abrirBD($nombredb){ | |
$rutadb = $_SERVER['DOCUMENT_ROOT']."/pitaya/db/$nombredb"; | |
$db = sqlite_open($rutadb) or die("No puedo abrir la base de datos "); |
This file contains hidden or 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
import android | |
droid = android.Android() | |
def espacios(num): | |
spaces = "" | |
for i in range(0, num): | |
spaces += " " | |
return spaces |
This file contains hidden or 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
#!/usr/bin/perl | |
$user = `whoami`; | |
$user =~ s/\n//g; | |
$date = `date +%d%m%Y`; | |
$date =~ s/\n//g; | |
system("tar -cvf \"".$user."_source_code_".$date.".tar\" *"); | |
print "Backup finished\n" |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
use DBI; | |
my $database_name = "inmemoriam.dat"; | |
my $dbh = DBI->connect( | |
"dbi:SQLite:dbname=$database_name", | |
"", | |
"", |
This file contains hidden or 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
int simpleSearch(int vector[], int n, int data) { | |
for(int i=0; i<n; i++){ | |
if(data == vector[i]) { | |
return i; | |
} | |
} | |
return -1; | |
} |
This file contains hidden or 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
int binarySearch(int vector[], int n, int data) | |
{ | |
int center; | |
int inf = 0; | |
int sup = n - 1; | |
while(inf <= sup){ | |
center = (sup + inf) / 2; | |
if(vector[centro] == data) { |
This file contains hidden or 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
var password = ""; | |
function generateKeys(i, j, k, l, n) { | |
if (i == n) { | |
return; | |
} | |
password = i + "" + j + "" + "" + k + "" + l; | |
if (l < n) { |
This file contains hidden or 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
import os | |
import boto | |
from boto.s3.key import Key | |
bucket_name = os.getenv("AWS_STORAGE_BUCKET_NAME") | |
conn = boto.connect_s3() | |
bucket = conn.get_bucket(bucket_name) | |
k = Key(bucket) | |
key_name = 'test_file.csv' |