Skip to content

Instantly share code, notes, and snippets.

View AlexJWayne's full-sized avatar
🌈

Alex Wayne AlexJWayne

🌈
View GitHub Profile
<object id="flashObj" width="640" height="384" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"><param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/26806173001?isVid=1&publisherID=26269167001" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="@videoPlayer=26786444001&playerID=26806173001&domain=embed&" /><param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" /><param name="allowFullScreen" value="true" /><param name="swLiveConnect" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://c.brightcove.com/services/viewer/federated_f9/26806173001?isVid=1&publisherID=26269167001" bgcolor="#FFFFFF" flashVars="@videoPlayer=26786444001&playerID=26806173001&domain=embed&" base="http://admin.brightcove.com" name="flashObj" width="640" height="384" seamlesstabbing="false" type="application/x-shockwa
module HasRelations
module ClassMethods
def has_relations
include InstanceMethods
has_many :relations, :as => :from
end
end
module InstanceMethods
def related(relation_type = nil)
def uncool
facet = Facet.find_or_initialize_by_uri(@subject.uri)
facet.holo_field = @holo_field
facet.save
facet = Facet.find_by_uri(@subject.uri)
end
def way_cool
facet = @holofield.facets.find_or_create_by_uri(@subject.uri)
end
<head>
<link rel="SHORTCUT ICON" href="/static/images/icon/favicon.ico" />
</head>
text = Magick::Draw.new
text.pointsize = options[:font_size].to_i
text.font = "#{RAILS_ROOT}/public/fonts/Tahoma.Bold.ttf"
my_image.annotate(text, 0, 0, offset_x, offset_y, string_to_write)
image = Magick::Image.new(width, height) do
self.colorspace = Magick::RGBColorspace
self.depth = 8
self.density = '72'
self.format = 'PNG'
self.background_color = 'none'
end
image.color_reset!(Magick::Pixel(0, 255, 0, 128))
if (nebula.armorRegen > 0 || nebula.shieldRegen > 0) {
// positive nebula
currentShields += nebula.shieldRegen;
currentArmor += nebula.armorRegen;
if (currentArmor > maxArmor && currentArmor > 0.0) currentArmor = maxArmor;
if (currentShields > maxShields) currentShields = maxShields;
} else {
// negative nebula
[self damageShields:-nebula.shieldRegen armor:-nebula.armorRegen];
texture = [[Texture textureNamed:[data objectForKey:@"texture"]] retain];
pos.x = [[data valueForKeyPath:@"position.x"] floatValue];
pos.y = [[data valueForKeyPath:@"position.y"] floatValue];
size = [[data objectForKey:@"size"] floatValue];
angle = (GLfloat)(rand() % 360);
opacity = [[data objectForKey:@"opacity"] floatValue];
drag = [[data objectForKey:@"drag"] floatValue];
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
EnemyName AverageCredits T1Weapons T2Weapons T3Weapons T4Weapons T5Weapons T1Equipment T2Equipment T3Equipment T4Equipment T5Equipment
Alcor 1144.5 0.27 0.48 0.09 0.0 0.0 0.21 0.39 0.09 0.0 0.0
Alcyone 1470.0 0.0 0.31 0.93 0.18 0.0 0.0 0.24 0.75 0.18 0.0
Aldebran 729.75 1.15 0.23 0.0 0.0 0.0 0.92 0.23 0.0 0.0 0.0
Algorab 918.75 0.2 0.42 0.16 0.02 0.0 0.16 0.34 0.14 0.02 0.0
Alioth 4105.5 0.0 0.3 0.74 0.41 0.71 0.0 0.24 0.595 0.36 0.65
Alnitak 1047.375 0.4 0.28 0.04 0.0 0.0 0.32 0.24 0.04 0.0 0.0
Altair 1737.75 0.0 0.0 0.15 0.28 0.05 0.0 0.0 0.12 0.23 0.05
Alula 364.875 0.45 0.09 0.0 0.0 0.0 0.36 0.09 0.0 0.0 0.0
Alya 1304.625 0.16 0.36 0.39 0.07 0.0 0.12 0.28 0.32 0.07 0.0
// cameraPos and angle are instance vars, obviously
- (void)renderCamera {
GLfloat cameraHeightMax = 40.0;
GLfloat cameraHeightMin = 8.0;
if (cameraPos.z > cameraHeightMax) cameraPos.z = cameraHeightMax;
if (cameraPos.z < cameraHeightMin) cameraPos.z = cameraHeightMin;
// Setup camera