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
var bacon = (function () { | |
var bacon = {}, | |
defaultBase = 2; | |
function getEncodedWidth(alphabet, base) { | |
var width = 1 + Math.floor(Math.log(alphabet.length) / Math.log(base)); | |
return width; | |
} |
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 hasIndex(array, index) { | |
return array.splice(index, 1).reduce(function () { | |
return true; | |
}, false); | |
} | |
var array = []; | |
hasIndex(array, 0); // => false | |
array[0] = 1; |
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 makeWorker(fn, args, callback) { | |
var fnString = 'self.addEventListener("message", function (e) {self.postMessage((' + fn.toString() + ').apply(this, e.data))});', | |
blob = new Blob([fnString], { type: 'text/javascript' }), | |
url = URL.createObjectURL(blob), | |
worker = new Worker(url); | |
worker.postMessage(args); | |
worker.addEventListener('message', function (e) { | |
URL.revokeObjectURL(url); | |
callback(e.data); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Runtime.CompilerServices; | |
namespace Expressions | |
{ | |
public static class Coalesce | |
{ |
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
diff --git a/src/game/movement/packet_builder.cpp b/src/game/movement/packet_builder.cpp | |
index 2e7b4f9..50a93b4 100644 | |
--- a/src/game/movement/packet_builder.cpp | |
+++ b/src/game/movement/packet_builder.cpp | |
@@ -99,16 +99,16 @@ namespace Movement | |
uint32 last_idx = spline.getPointCount() - 3; | |
const Vector3 * real_path = &spline.getPoint(1); | |
+ Vector3 dest = real_path[last_idx]; | |
data << last_idx; |
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
commit 8f235b728ee99be69656ec7674fe160dab64feaf | |
Author: faramir118 <[email protected]> | |
Date: Sat Feb 4 13:59:54 2012 -0600 | |
guard against concurrent read/write access to navMesh | |
Need to add -DMMAP_CONCURRENCY=1 to cmake | |
visual studio support coming later | |
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt |
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
############## details ################ | |
============== structure ================ | |
repository | |
a tree of objects which are under version control | |
objects are any of the following: | |
blob: binary data (usually a file) | |
tree: points to blobs (files) and other trees (subdirectories) | |
commit: points to a tree (your projects root directory), and points to the parent commit(s) | |
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
diff --git a/Client/World/Network/WorldSocket.cs b/Client/World/Network/WorldSocket.cs | |
index 6c3df10..0d6cbd8 100644 | |
--- a/Client/World/Network/WorldSocket.cs | |
+++ b/Client/World/Network/WorldSocket.cs | |
@@ -8,6 +8,7 @@ using Client.Authentication; | |
using Client.UI; | |
using Client.Chat; | |
using Client.Chat.Definitions; | |
+using System.Diagnostics; | |
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
A @ | |
XXXXXXXXXXXXXXXXXX | |
X | |
X Z | |
B C# | |
monster = @, player = #, obstacle = X | |
nice path: @ -> A -> B -> C | |
actual path: @ -> A -> B -> Z |
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
<region name="default"> | |
<scope name="World::Update" count="153" recurses="0" time="23036000"> | |
<region name="default"> | |
<scope name="World::UpdateSessions" count="153" recurses="0" time="922000"/> | |
</region> | |
</scope> | |
</region> |
NewerOlder