This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <cstdio> | |
template <typename T> | |
void combination(std::vector<T>& vec, std::vector<T>& tmp, int start, int end, int idx, int r); | |
int main() { | |
std::vector<unsigned int> vec = {1,2,3,4,5}; | |
std::vector<unsigned int> tmp(vec.size()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Quadratic { | |
public static void main(String[] args) { | |
double a,b,c; | |
if (args.length != 3) { | |
System.out.println("Wrong number of Args.\nUsage: [a] [b] [c]"); | |
System.exit(1); | |
} | |
a = Double.parseDouble(args[0]); | |
b = Double.parseDouble(args[1]); | |
c = Double.parseDouble(args[2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
# by charles bailey (@c650) | |
# under MIT License | |
# 9.20.16 | |
require 'fileutils' | |
if ARGV.length != 4 | |
puts "Usage: ./program [code dir] [new project dir] [example dir] [project name]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
count-all-code.rb | |
@author Charles Bailey | |
@version 1.0.0 11/7/16 | |
Ever wanted to know how much code you've written? | |
This nifty little script will download ALL of your | |
public repositories so you can find out! | |
=end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def f(x,y) | |
(((-0.0447 * x ** 6 + 0.2731 * x ** 5 - 0.7935 * x ** 4 + 1.7751 * x ** 3 - 2.561 * x ** 2 + 0.9885 * x + 1.0821) ** 2) - (y ** 2)) ** 0.5 | |
end | |
startx = 0 | |
endx = 2 | |
starty = -1.2 | |
endy = 1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Ways to Represent Graphs | |
Charles (@c650) | |
Showing how to represent _unweighted_ graphs | |
in C++. | |
*/ | |
#include <iostream> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```c | |
// code here | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Mercer 2018 Problem 10: Nth Derivative. | |
Charles Bailey. 03/01/2018 | |
*/ | |
#include <bits/stdc++.h> | |
#include <regex> | |
typedef long long ll; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Problem 6: Drizzle | |
from the Mercer 2018 Spr Programming contest | |
Charles Bailey | |
03 02 2018 | |
*/ | |
#include <bits/stdc++.h> | |
typedef long long ll; |
OlderNewer