Skip to content

Instantly share code, notes, and snippets.

View ybakos's full-sized avatar
💭
the machine stops the machine stops the machine stops

Yong Joseph Bakos ybakos

💭
the machine stops the machine stops the machine stops
View GitHub Profile
@ybakos
ybakos / GraphicGlDemoActivity.java
Created November 27, 2012 00:52
A simple example of using an Android Renderer to illustrate OpenGL ES boilerplate.
/* GraphicGlDemoActivity.java
* Author: Yong Bakos
* Since: 11/26/2012
* Thanks to:
* Cube: http://intransitione.com/blog/create-a-spinning-cube-with-opengl-es-and-android/
* OpenGL Boilerplate: http://www.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/
*/
package com.humanoriented.sudoku;
import java.nio.ByteBuffer;
@ybakos
ybakos / Random.jack
Created November 3, 2014 20:12
Jack Pseudo Random Numbers for Nand 2 Tetris
/* Random.jack
* By Mark Armbrust
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Random-number-generator-for-hack-cpu-td4025503.html
* Also see:
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Pseudo-Random-Number-Generator-td4026059.html#a4027617
*/
class Random {
static int seed;
@ybakos
ybakos / main.cpp
Created February 18, 2014 19:27
An example of C++ string functions.
/* Yong Bakos
* This program executes some tests that illustrate the properties
* and behaviors of strings.
*/
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
// A generic test function, that simply prints "PASSED" if b is true
@ybakos
ybakos / main.ino
Last active November 30, 2020 15:34
CS 160 SparkFun Sandbox Project
// Project: Code controls circuitry.
// Outputs: lights
// Inputs: sensors (slider, microphone, light sensor)
//
// This program has three components:
// - light detection
// - temperature detection
// - sound detection
@ybakos
ybakos / dropdown_rating_form_field.dart
Last active March 1, 2020 21:10
A StatefulWidget that Wraps a DropdownButtonFormField so that the selected value displays
// (c) 2020 Yong Joseph Bakos. Use this freely.
// https://github.com/flutter/flutter/issues/27821
// Usage:
// DropdownRatingFormField(
// maxRating: 4,
// validator: (value) { /* ... */ },
// onSaved: (value) { /* ... */ }
// );
import 'package:flutter/material.dart';
@ybakos
ybakos / main.dart
Last active February 24, 2020 07:50
CS 492 Week 8 Exploration 1 Exercise State
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget { // TODO: Convert to StatefulWidget
Widget build(BuildContext context) {
return MaterialApp(
title: 'Example',
@ybakos
ybakos / main.dart
Last active February 24, 2020 01:35
CS 492 Week 8 Exploration 2 Exercise Async
void main() {
print('a');
// TODO: Do the same work, but without the use of `go`.
go().then( (value) {
print(value);
});
print('b');
}
Future<int> go() {
@ybakos
ybakos / main.dart
Created February 17, 2020 04:01
CS 492 Week 8 Exploration 5 Exercise SQLite
// Week 8 Exploration 5
void main() {
runApp(App());
}
class App {
}
@ybakos
ybakos / main.dart
Created February 17, 2020 04:00
CS 492 Week 8 Exploration 4 Exercise Files
// Week 8 Exploration 4
void main() {
runApp(App());
}
class App {
}
@ybakos
ybakos / main.dart
Created February 17, 2020 03:59
CS 492 Week 8 Exploration 3 Exercise Shared Preferences
// Week 8 Exploration 3
void main() {
runApp(App());
}
class App {
}