Skip to content

Instantly share code, notes, and snippets.

View aziflaj's full-sized avatar
🐍
There's a snake in my boot!

Aldo Ziflaj aziflaj

🐍
There's a snake in my boot!
View GitHub Profile
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.*;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
@aziflaj
aziflaj / max.asm
Last active September 2, 2015 10:44
.data
numarray: .word 2, 5, 48, 6, 9
sizearray: .word 5
maxtext: .asciiz "\nThe maximum of array: "
indextext: .asciiz "\nThe index (zero based) of maximum: "
.text
main:
la $a0, numarray # load the array of nubers
lw $a1, sizearray # load the size of array
---
vagrantfile-local:
vm:
box: puphpet/debian75-x64
box_url: puphpet/debian75-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
<?php
try {
$conn = new \PDO("mysql:host=127.0.0.1;dbname=DragonBallZ", $username, $password);
} catch (\PDOException $ex) {
print "Error!" . $ex->getMessage() ;
exit();
}
$select = "SELECT character_name FROM super_saiyan WHERE power > 9000;";
$resultSet = $conn->query($select);
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
return [
'username' => 'root',
'password' => 'toor',
'host' => 'localhost',
'database' => 'dbname',
// other database configurations
];
CREATE TABLE `User` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(40),
`last_name` VARCHAR(40),
`nationality` VARCHAR(40),
`nationality` VARCHAR(20),
`sex` INT,
`age` INT,
`rating` INT,
PRIMARY KEY (`id`)
CREATE SCHEMA blektu;
CREATE TABLE blektu.products (
productID SERIAL,
productSKU VARCHAR(50) NOT NULL,
productName VARCHAR(100) NOT NULL,
productPrice DECIMAL NOT NULL,
productWeight DECIMAL,
productCartDescription VARCHAR(250) NOT NULL, -- ?
productShortDescription VARCHAR(1000) NOT NULL,
@aziflaj
aziflaj / recommender3.py
Created April 8, 2015 13:09
Guide to Data Mining
import codecs
from math import sqrt
users2 = {"Amy": {"Taylor Swift": 4, "PSY": 3, "Whitney Houston": 4},
"Ben": {"Taylor Swift": 5, "PSY": 2},
"Clara": {"PSY": 3.5, "Whitney Houston": 4},
"Daisy": {"Taylor Swift": 5, "Whitney Houston": 3}}
users = {"Angelica": {"Blues Traveler": 3.5, "Broken Bells": 2.0,
"Norah Jones": 4.5, "Phoenix": 5.0,
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*