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
// | |
// main.c | |
// Loops | |
// | |
// Created by C4Q on 6/13/15. | |
// Copyright (c) 2015 C4Q. All rights reserved. | |
// | |
#include <stdio.h> | |
#include <stdlib.h> |
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
default | |
{ | |
collision_start(integer num_detected) | |
{ | |
rotation avatarRot = llDetectedRot(0); | |
vector direction = <0.0, 1.0, 0.0> / avatarRot; | |
vector avatarPos = llDetectedPos(0); | |
float angle = llAtan2(direction.x, direction.y); | |
integer directionToPush = llRound(angle * 8 / TWO_PI); | |
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
$ clang++ -Wall -g --std=c++11 test-invalid-read.cpp -o test-invalid-read && valgrind --leak-check=yes ./test-invalid-read | |
==32099== Memcheck, a memory error detector | |
==32099== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. | |
==32099== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info | |
==32099== Command: ./test-invalid-read | |
==32099== | |
counter:0 | |
counter:1 | |
==32099== Invalid read of size 4 | |
==32099== at 0x400EAC: Node::serialno() const (test-invalid-read.cpp:18) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// so useful for formatting a webpage to X pixels wide and centered. So useful! | |
document.body.style.maxWidth = "600px" | |
document.body.style.margin = "0 auto"; |
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
to setup | |
clear-all | |
create-turtles 1 | |
ask turtles [ | |
set size 5 | |
pendown | |
set heading 0 | |
forward 5 | |
right 45 | |
forward 5 |
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
The MIT License (MIT) | |
Copyright (c) <year> <copyright holders> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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/env python | |
import csv | |
import sys | |
import os.path | |
#filename1 = csv with all the important rows (inputfile) | |
#filename2 = csv that sorts filename1 by groups (sortby) | |
#filename3 = alternate filename, by default it is filename1 appended with '-output.csv' (output_file) | |
if len(sys.argv) <= 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
" VAM for plugin management | |
" after setting this up | |
function! ActivateVAM() | |
let addons_base = expand('$HOME') . '/vim-addons' | |
let addons_manager = addons_base . '/vim-addon-manager' | |
execute 'set runtimepath+=' . addons_manager | |
if finddir(addons_base, '') == '' | |
call mkdir(addons_base, '') | |
endif |