Skip to content

Instantly share code, notes, and snippets.

View mik30s's full-sized avatar
😐
500 lines of template errors

Michael mik30s

😐
500 lines of template errors
View GitHub Profile
@mik30s
mik30s / webcam_capture.cpp
Last active October 26, 2024 01:20
Simple C++ program to capture a webcam frame in Linux
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <fcntl.h>
#include <unistd.h>
@mik30s
mik30s / OptimalBST.cpp
Created April 8, 2016 00:30
Optimal Binary Search Tree in C++
#include "OptimalBST.h"
template<class T>
void clearTable(T **table, int, int, float);
bool greaterThan(float a, float b);
// constructor
OptimalBST::OptimalBST(float* _probabilities, int size)
:numColumns(size+1), numRows(size+2), numberOfProbabilities(size)
{
@mik30s
mik30s / showip.cpp
Last active April 9, 2016 03:03
Display the IP addresses of a host using C++ and UNIX sockets
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cstdlib>
#include <string>
using namespace std;
@mik30s
mik30s / SimplexClass.java
Created April 17, 2016 01:39
Simplex Method in Java
// The Following solves a linear programming problem
// In standardized form using the simplex method
// Please the read below.
/************************************************USAGE*************************************************************
* 1.Create an instance of the simplex class
* 2.Fill in the table with the standardized form of the problem by calling simplex.fillTable()
* 3.Create a while loop and call the simplex.compute() method until it returns ERROR.IS_OPTIMAL or ERROR.UNBOUNDED
* ****************************************************************************************************************/
public class Simplex {
In file included from /home/michael/Code/repos/breckel/compiler/sources/symboltablebuilder.h:9:0,
from /home/michael/Code/repos/breckel/compiler/sources/symboltablebuilder.cpp:1:
/home/michael/Code/repos/breckel/compiler/sources/ast.h: In instantiation of ‘brekell::frontend::Ast::traverse(brekell::frontend::Ast::TraversalType, Processor)::<lambda(auto:1&)>::<lambda(Processor, brekell::frontend::Ast::NodePtr&, auto:2)> mutable [with auto:2 = brekell::frontend::Ast::traverse(brekell::frontend::Ast::TraversalType, Processor)::<lambda(auto:1&)> [with auto:1 = brekell::semantics::SymbolTableBuilder::build()::<lambda(brekell::frontend::Ast::NodePtr&)>; Processor = brekell::semantics::SymbolTableBuilder::build()::<lambda(brekell::frontend::Ast::NodePtr&)>]::<lambda(brekell::semantics::SymbolTableBuilder::build()::<lambda(brekell::frontend::Ast::NodePtr&)>, brekell::frontend::Ast::NodePtr&, auto:2)>; auto:1 = brekell::semantics::SymbolTableBuilder::build()::<lambda(brekell::frontend::Ast::NodePtr&)>;
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
County Voting System Latitude (generated) Longitude (generated)
Yadkin M 100 36.15 -80.657
Wilkes M 100 36.21 -81.207
Wayne M 100 35.392 -78.052
Watauga M 100 36.246 -81.686
Washington M 100 35.84 -76.6
Wake M 100 35.817 -78.624
Vance M 100 36.373 -78.394
Tyrrell M 100 35.879 -76.123
Swain M 100 35.429 -83.554
@mik30s
mik30s / dumb_text.java
Created September 21, 2017 18:53
A dumb text editor
package lab.pkg2.texteditor;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Lab2TextEditor extends Application {
@mik30s
mik30s / EditorMenu.java
Created October 23, 2017 02:15
Lab14 GUI
package edu.tarleton;
import java.util.HashMap;
import java.util.Iterator;
import java.util.function.Consumer;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
@mik30s
mik30s / trajectory.ipynb
Created December 22, 2017 05:06
Generating Trajectories with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mik30s
mik30s / trajectory_fixed.ipynb
Created December 23, 2017 02:00
Generating Trajectories in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.