Skip to content

Instantly share code, notes, and snippets.

View fernandozamoraj's full-sized avatar

Fernando Zamora fernandozamoraj

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Knockout Demo</title>
</head>
<body>
<div data-bind="text: firstName">fern</div>
<div data-bind="text: lastName">zamora</div>
@fernandozamoraj
fernandozamoraj / jsinheritance.js
Created June 5, 2017 10:16
Prototypal Inheritance
function Person(firstname, lastname){
this.firstname = firstname;
this.lastname = lastname;
}
function Teacher(firstname, lastname, subject){
Person.call(this, firstname, lastname);
this.subject = subject;
}
var numbers = [1,2,3,6,8,3,4,6,78,10,11,9,1,3,4]
function filter(arr, filterCheck){
var newArray = []
for(var i=0;i<arr.length;i++){
if(filterCheck(arr[i])){
@fernandozamoraj
fernandozamoraj / firebasequicksample.html
Last active August 25, 2017 20:00
FirebaseQuickSample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.3.0/firebase.js"></script>
package com.fzj.app;
import java.util.*;
public class FreakCracker {
public String crack(String message){
int i = 0 ;
@fernandozamoraj
fernandozamoraj / matrix-multiplication-js
Last active September 21, 2017 21:06
Multiply Matrices
function multiplyMatrix(A, B){
console.log("****MULTIPLY****")
let aRows = A.length
let aCols = A[0].length
let bRows = B.length
let bCols = B[0].length
let C = []
let i = 0
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
void print_at_xy(int x, int y, char *val);
void display_score();
void init();
int zero_lives();
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
void print_at_xy(int x, int y, char *val);
void display_score();
void init();
int zero_lives();
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
void print_at_xy(int x, int y, char *val);
void display_score();
void init();
int zero_lives();
<!DOCTYPE html>
<html>
<head>
<title>Books</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "bpdemo";
$password = "bpdemo";