Skip to content

Instantly share code, notes, and snippets.

View euwbah's full-sized avatar
🙃
smile and wave

euwbah euwbah

🙃
smile and wave
View GitHub Profile
@euwbah
euwbah / lol
Created December 7, 2014 16:19
lol
<html>
<body>
<p>
trollollol
</p>
</body>
</html>
@euwbah
euwbah / Random Code music
Created December 18, 2014 16:30
Testing out sonic pi for fun! Seems better than ChucK and super easy to learn! XD
# Welcome to Sonic Pi v2.1.1
define :Cm9 do |time|
play [:C4, :G4, :Bb4, :D5], sustain: time - 0.25, release: 0.25, decay: 0.1
play :G5, sustain: time - 0.25, release: 0.25, decay: 0.1 if one_in(2)
end
define :Eb9 do |time|
if one_in(2)
play [:Eb4, :Bb4, :D5, :F5], sustain: time - 0.25, release: 0.25, decay: 0.1
############
# Buffer 1 #
############
use_bpm 120
firstRun = true;
startFromMeasure = 16;
currChord = nil

#Java From The Top Down

[TOC]

#####Preface (tl;dr)

It begins with a common educational concept. Basics first, then move on. This concept is especially prevalent in the education systems of USA, South Korea and a majority of South East Asian countries (including Singapore). Consensus has it that this is the most logical way to transfer knowledge.

However, this methodology also presents its inhibitions. It is diminished in a fundamental area of the learning process: causation. Learning from the bottom-up will look as if, from the perspective of the educator, 'bottom-up' per se. However, for the student, the quantity of misidentified and misunderstood concepts are legion.

@euwbah
euwbah / ISEC MST
Created May 30, 2016 04:24
ISEC MST
#ISEC MST(L1 - L3)
##1. Goals of ISEC:
- <b>C</b>onfidentiality
- <b>I</b>ntegrity
- <b>A</b>vailablity
Steps to defend against attacks:
1. Layering --- Having multiple layers of security mechanisms
package loginpageforassignment;
/**
*
* @author kenzewee
*/
import javax.swing.JOptionPane;
import static javax.swing.text.html.HTML.Tag.S;
public void takeQuiz() {
for( Question qtn : questions) {
QtnOutcome outcome = qtn.displayQuestion();
while (true) {
if(outcome == QtnOutcome.CORRECT) {
AudioClip right = new AudioClip("file:///C://Users/coolm/Documents/NetBeansProjects/Question/Music/jawsofdeath.wav");
right.play(1.0);
GUIHelper.show("CORRECT");
score += 5;
break;
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { Flight } from '../models/flight';
import { Geocoder } from './geocoder';
/*
Generated class for the AmadeusFlightService provider.
def visible_mountains(heights: List[int], verbose=True):
mstack = []
answer = 0
maxnum = -1
"""What is the maximum number"""
maxcount = 0
"""How many equally maximum height mountains are there"""
idxfirstmax = -1
"""index of first occurrence of max number"""
idxlastmax = -1
@euwbah
euwbah / main.rs
Created July 3, 2022 19:57
rip ears
use std::{fs::File, io::BufWriter};
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
use hound::WavWriter;
fn main() -> anyhow::Result<()> {
println!("Hello, world!");
let host = cpal::host_from_id(cpal::HostId::Wasapi).expect("Failed to initialize wasapi host");