This file contains hidden or 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 initShaders( gl, vertexShaderId, fragmentShaderId ) | |
| { | |
| var vertShdr; | |
| var fragShdr; | |
| var vertElem = document.getElementById( vertexShaderId ); | |
| if ( !vertElem ) { | |
| alert( "Unable to load vertex shader " + vertexShaderId ); | |
| return -1; | |
| } |
This file contains hidden or 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
| // Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem | |
| // throw QuotaExceededError. We're going to detect this and just silently drop any calls to setItem | |
| // to avoid the entire page breaking, without having to do a check at each usage of Storage. | |
| if (typeof localStorage === 'object') { | |
| try { | |
| localStorage.setItem('localStorage', 1); | |
| localStorage.removeItem('localStorage'); | |
| } catch (e) { | |
| Storage.prototype._setItem = Storage.prototype.setItem; | |
| Storage.prototype.setItem = function() {}; |
This file contains hidden or 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
| var upm = 1000; | |
| function Point(x, y, on, interpolated){ | |
| this.xori = x; | |
| this.yori = y; | |
| this.xtouch = x; | |
| this.ytouch = y; | |
| this.touched = false; | |
| this.donttouch = false; | |
| this.on = on; |
This file contains hidden or 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
| 原文 GG 了請參考 archive | |
| https://web.archive.org/web/20090221093708/http://d.hatena.ne.jp/yuki_neko_nyan/20090217/1234850409 | |
| 以下備份 | |
| 2009-02-17 | |
| ■ループが書けなくなる(或いは再帰依存症)レベル10 15:00 ループが書けなくなる(或いは再帰依存症)レベル10 - 猫的怠惰Days | |
| level 0 |
This file contains hidden or 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 CASC (Content Addressable Storage Container) Filesystem | | |
| | Warlords of Draenor Alpha, Build 6.0.1.18125 | | |
| | Written April 14th, 2014 by Caali | | |
| | Version 1.2 | | |
| --------------------------------------------------------------------- | |
| Distribution and reproduction of this specification are allowed without | |
| limitation, as long as it is not altered. Quotation in other works is | |
| freely allowed, as long as the source and author of the quote are stated. |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| // JobManager is just a proxy object so we have a launcher for the coroutines | |
| public class JobManager : Singleton<JobManager> {} | |
| public class Job | |
| { | |
| public event System.Action<bool> jobComplete; |
This file contains hidden or 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
| while (!targetUnit.IsDead()) { | |
| actor.animation.Play("run"); | |
| while (Vector3.Distance(actor.transform.position, target.transform.position) > actorUnit.attackRange) { | |
| actorUnit.MoveTo(target.transform.position); | |
| yield return null; | |
| } | |
| while (Vector3.Angle(actor.transform.forward, target.transform.position - actor.transform.position) > 10) { |
This file contains hidden or 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
| """ | |
| run: pack unpack diff | |
| pack: | |
| python pack.py pack > strokes.bin | |
| gzip -kf strokes.bin | |
| ls -l strokes.bin* | |
| unpack: | |
| gzip -dc < strokes.bin.gz | python pack.py unpack > strokes.unpacked |
This file contains hidden or 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
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
This file contains hidden or 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
| 13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| | FUCKIN PUSSIES | |
| 13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
| 13:16 <luite> | hello | |
| 13:16 <ChongLi> | somebody has a mental illness! | |
| 13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| | compelled to write Node.js! | |
| 13:16 <genisage> | hi | |
| 13:16 <luite> | you might be pleased to learn that you can compile | |
| | haskell to javascript now |