Skip to content

Instantly share code, notes, and snippets.

View LB--'s full-sized avatar

LB--

  • Clickteam
View GitHub Profile
"About":
{
"Name": "Lacewing Relay Client"
"Author": "James McLaughlin"
"Copyright": "Copyright (C) 2007 - 2011 James McLaughlin"
"Comment": "This extension acts as a client for the Lacewing Relay protocol. More information is available at http://lacewing-project.org"
"URL": "http://www.lacewing-project.org"
"Help": "Help/Lacewing.chm"
"Identifier": "OCli"
}
Exception in thread "main" InfiniteException
at InfiniteException.main(InfiniteException.java:6)
Caused by: InfiniteException
at InfiniteException.getCause(InfiniteException.java:12)
at java.lang.Throwable.printStackTrace(Throwable.java:665)
at java.lang.Throwable.printStackTrace(Throwable.java:643)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1061)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
at java.lang.Thread.dispatchUncaughtException(Thread.java:1952)
Caused by: InfiniteException
#include <iostream>
#include <memory>
struct Base
{
virtual ~Base() = default;
struct Inner
{
Inner(Base &b)
@LB--
LB-- / cs-probability-hw1.cpp
Created September 3, 2014 18:02
Wrote this to speed up my homework solving process instead of using excel.
#include <iostream>
#include <vector>
#include <cmath>
int main()
{
std::vector<long double> v;
{
long double d;
while(std::cin >> d)
@LB--
LB-- / menu text.json
Last active August 29, 2015 14:09
Minecraft-like splash-screen texts that are intended for a game I might never make despite being on my mind for years.
[
"(the reason you can't sleep at night)",
"(fuel for your nightmares)",
"Free jump scares!",
"Don't forget to commentate!",
"Don't turn down the sound!",
"(yes, it's like Minecraft)",
"(the internship from hell)",
"Put it on your resume!",
"Upload it to YouTube!",
@LB--
LB-- / args.cpp
Created November 16, 2014 04:06
C++ program arguments - my personal favorite way to get them into a vector of strings. No undefined behavior.
#include <iostream>
#include <string>
#include <vector>
int main(int, char const *const *plain_args)
{
std::basic_string<char const *> const temp {plain_args};
std::vector<std::string> const args {std::begin(temp), std::end(temp)};
for(auto const &arg : args)
{
@LB--
LB-- / j8time.java
Created February 7, 2015 01:58
Java 8 Time Library - just keeping this for reference
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoField;
class j8time
{
public static void main (String[] args) throws Throwable
//Access the KataPartyService
KataPartyService kps = getServer().getServicesManager().load(KataPartyService.class);
//Get the PartySet
IPartySet parties = kps.getPartySet();
//Get the members for the players p1 and p2
IParty.IMember a = parties.findMember(p1.getUniqueId());
IParty.IMember b = parties.findMember(p2.getUniqueId());
//Check if they are in the same party
if(a != null && b != null && a.getParty() == b.getParty())
{
@LB--
LB-- / ResonanceCascade.cpp
Created September 6, 2015 00:17
C++ supports multiple active exceptions at once - see it in action at http://melpon.org/wandbox/permlink/PscHg988AnzjajyS
#include <iostream>
#include <stdexcept>
#include <exception>
struct ResonanceCascade final
{
ResonanceCascade()
{
std::cout << "ResonanceCascade ctor" << std::endl;
}
Test project C:/Users/LB/GitHub/magnum/build
Start 1: MathAlgorithmsGaussJordanTest
1/129 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.05 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/129 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.02 sec
Start 3: MathAlgorithmsSvdTest
3/129 Test #3: MathAlgorithmsSvdTest ................. Passed 0.02 sec
Start 4: MathGeometryDistanceTest
4/129 Test #4: MathGeometryDistanceTest .............. Passed 0.02 sec
Start 5: MathGeometryIntersectionTest