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
--- Data module | |
-- @module Data | |
require 'stdlib/core' | |
Data = {} | |
--- Selects all data values where the key matches the selector pattern. | |
-- The selector pattern is divided into groups. The pattern should have a colon character `:` to denote the selection for each group. | |
-- <br/>The first group is for the class of the data type (item, recipe, entity-type, etc) |
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
EvoGUI = {} | |
function EvoGUI.new() | |
function EvoGUI:createEvolutionRateText() | |
local diff = game.evolution_factor - global.exponential_moving_average | |
-- percentage is decimal * 100, * 60 for per minute value | |
local evo_rate_per_min = math.abs(diff * 100 * 60) | |
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
function find_all_entity(entity_name) | |
local surface = game.surfaces['nauvis'] | |
local entities = {} | |
for chunk in surface.get_chunks() do | |
local chunk_area = {lefttop = {x = chunk.x*32, y = chunk.y*32}, rightbottom = {x = chunk.x*32+32, y = chunk.y*32+32}} | |
local chunk_entities = surface.find_entities_filtered({area = chunk_area, name = entity_name}) | |
for i = 1, #chunk_entities do | |
entities[#entities + 1] = chunk_entities[i] | |
end | |
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
#!/bin/bash | |
repo="https://github.com/FeepingCreature/fcc.git" | |
tools="http://svn.dsource.org/projects/scrapple/trunk/tools/tools/" | |
#install git, svn, libc | |
sudo apt-get install git subversion libc6-dev-i386 -y | |
#disable multiarch, 64bit only | |
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64 |
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
#!/bin/bash | |
repo="https://github.com/FeepingCreature/fcc.git" | |
tools="http://svn.dsource.org/projects/scrapple/trunk/tools/tools/" | |
#install git, svn, libc | |
sudo apt-get install git subversion libc6-dev -y | |
#disable multiarch, 64bit only | |
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int select_ai_difficulty(); | |
char* rand_dictionary_word(); | |
char* select_dict_word(char* command, int num); | |
int count_dict(char* word, int exact); | |
void error_exit(char* msg); | |
char* generate_scrambled_word(int difficulty, char** original_word); |
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
<?xml version="1.0"?> | |
<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns="http://www.mozilla.org/2004/em-rdf#"> | |
<r:Description about="urn:mozilla:extension:[email protected]"> | |
<updates> | |
<r:Seq> | |
<r:li> | |
<r:Description> | |
<version>2.4.3.6</version> |
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
#!/bin/bash | |
WORKING_DIR="/home/afforess/workspace/NationStatesPlusPlus/Assembly" | |
BUILD_DIR="/home/afforess/workspace/Assembly-dist" | |
GIT_USER="Afforess" | |
GIT_EMAIL="[email protected]" | |
echo "WORKING_DIR: $WORKING_DIR" | |
echo "BUILD_DIR: $BUILD_DIR" | |
sleep 3 |
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
function softPowerScore() { | |
var html = $('<div>').append($(".highcharts-data-labels").children()[0]).html(); | |
var search = '<tspan x="3">'; | |
var index = html.indexOf(search) + search.length; | |
var end = html.indexOf('</tspan>', index); | |
console.log(index + " " + end); | |
return html.substring(index, 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
# Get the latest Sun Java SDK from Oracle | |
wget http://download.oracle.com/otn-pub/java/jdk/7u17-b02/jdk-7u17-linux-i586.rpm | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u17-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u17-linux-i586.rpm | |
# Install Java | |
sudo rpm -i jdk-7u17-linux-i586.rpm | |
# Check if the default java version is set to sun jdk |
NewerOlder