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
@aziflaj
aziflaj / AddressBook.c
Created February 23, 2016 20:39
An address book manager written in C as a homework
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#define MAX 100
struct PERSON {
char fName[20]; /* emri i nje personi ne librin e adresave */
char lName[20]; /* mbiemri i nje personi ne librin e adresave */
char id[20]; /* ID i nje personi ne librin e adresave */
function $(str) {
return document.querySelector(str);
}
// Test mblidh
var test1 = mblidh(3, 5);
var test2 = mblidh(5, -8);
var test3 = mblidh(0, 0.1);
var mblidh = 0;
// http://aichallenges.appspot.com/intro
function rotateRow(row) {
var len = row.length;
for (var i = 0; i < len/2; i++) {
var tmp = row[i];
row[i] = row[len - 1 - i];
row[len - 1 - i] = tmp;
}
return row;
@aziflaj
aziflaj / Pset1.java
Created February 15, 2016 10:25
My solutions to the Qualification Round of Google Code Jam. You can find the questions here https://code.google.com/codejam/contest/2974486/dashboard
/**
* Google Code Jam 1
* Pset1.java
*/
import java.io.*;
import java.util.Scanner;
public class Pset1 {
@aziflaj
aziflaj / ExchangeagramApplication.java
Created January 2, 2016 10:23
Exchangeagram - Instagram clone developed in an Android course @ udemy
package com.aziflaj.exchangeagram;
import android.app.Application;
import com.parse.Parse;
public class ExchangeagramApplication extends Application {
@Override
public void onCreate() {
<?php
// Create a user
$user = new User();
$user->setLastName("Bond");
$user->setFirstName("James");
// store a user
$entityManager = $this->getDoctrine()->getManager();
$entityManager->persist($user);
$entityManager->flush();
<?php
// The User model
class User
{
private $firstName;
private $lastName;
public function getFirstName()
{
return $this->firstName;
user = User.new
user.last_name = 'Bond'
user.first_name = 'James'
user.save
class User < ActiveRecord::Base
# The rest of your model
end
@aziflaj
aziflaj / User.php
Last active November 28, 2015 14:18
Week #7 codes
<?php
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
// The rest of your model
}