Skip to content

Instantly share code, notes, and snippets.

import java.io.*;
import java.util.*;
public class Derp {
public static void main(String[] args) throws IOException {
if (args.length == 0)
return;
BufferedReader r = new BufferedReader(new FileReader(args[0]));
String line = r.readLine();
int n = Integer.parseInt(line);
#include <iostream>
enum values {
V0, V1, V2, V3, V4, V5
};
template<typename T>
struct named_array {
const char* name;
std::size_t size;
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#define MSG "and the random number is: "
size_t num_length(long num) {
size_t result;
- name: STR_FUSION_BALL_LAUNCHER
cost: 242000
space: 6
time: 400
requirements:
- name: STR_ALIEN_ALLOYS
amount: 1
- name: STR_LASER_CANNON
cost: 182000
space: 6
(gdb) break XcomRuleset.cpp:1964
Breakpoint 1 at 0x6283c3: file /home/ben/code/repos/OpenXcom/src/Ruleset/XcomRuleset.cpp, line 1964.
(gdb) run
Starting program: /home/ben/code/repos/OpenXcom/bin/openxcom
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff33fe700 (LWP 16887)]
Breakpoint 1, OpenXcom::XcomRuleset::XcomRuleset (this=0x2bb8450)
at /home/ben/code/repos/OpenXcom/src/Ruleset/XcomRuleset.cpp:1964
warning: Source file is more recent than executable.
Reading symbols from /home/ben/code/repos/OpenXcom/bin/openxcom...done.
(gdb) break XcomRuleset.cpp:1964
Breakpoint 1 at 0x6283c3: file /home/ben/code/repos/OpenXcom/src/Ruleset/XcomRuleset.cpp, line 1964.
(gdb) run
Starting program: /home/ben/code/repos/OpenXcom/bin/openxcom
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff33fe700 (LWP 16981)]
Breakpoint 1, OpenXcom::XcomRuleset::XcomRuleset (this=0x2bb66c0)
at /home/ben/code/repos/OpenXcom/src/Ruleset/XcomRuleset.cpp:1964
class Foo {
public:
template<typename T>
void bar() {
T::derp();
}
};
class Helper {
public:
#include <gtk/gtk.h>
void on_realize(GtkWidget* widget, gpointer user_data);
int main(int argc, char* argv[]) {
GtkWidget* widget;
gtk_init(&argc, &argv);
widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
import std.stdio;
import std.math;
import std.array;
import std.format;
struct Dimension(int m, int kg, int s) {
@disable this();
}
template GetBaseType(T) {
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
size_t check_malloc_size(void* p, size_t n) {
int fd[2];
pid_t child;