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
# Cline's Memory Bank | |
I am Cline, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional. | |
## Memory Bank Structure | |
The Memory Bank consists of three essential files in Markdown format: | |
```mermaid | |
flowchart TD |
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
// Add / Update a key-value pair in the URL query parameters | |
function updateUrlParameter(uri, key, value) { | |
// remove the hash part before operating on the uri | |
var i = uri.indexOf('#'); | |
var hash = i === -1 ? '' : uri.substr(i); | |
uri = i === -1 ? uri : uri.substr(0, i); | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { |
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
// make an ajax call before DOM ready. | |
$.ajax({ | |
url: '/myAwesomeService' | |
}).done(function(data){ | |
// when the result arrives, | |
// wait till DOM ready | |
$(function(){ | |
// and attach it to the DOM | |
$('body').append(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
// on document-ready, | |
$(function(){ | |
// make an ajax call.. | |
$.ajax({ | |
url: '/myAwesomeService' | |
}).done(function(data){ | |
// and attach the result to the DOM | |
$('body').append(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
{ | |
"name": "b3c", | |
"version": "0.1.2", | |
"description": "My App", | |
"devDependencies": { | |
"grunt": "git://github.com/gruntjs/grunt.git#ead4eb8f8ed778c6a637577ba812df806b455fe9", | |
"grunt-contrib-jshint": "~0.1.0", | |
"grunt-contrib-nodeunit": "~0.1.0", | |
"grunt-contrib-sass": "~0.2.1", | |
"grunt-contrib-uglify": "git://github.com/gruntjs/grunt-contrib-uglify.git#a2ba9375441d1ba94194b2113b3731b9d399907c", |
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 extract(obj, path) { | |
try { | |
return eval("obj." + path); | |
} catch(e) { | |
return undefined; | |
} | |
} | |
var obj = { |
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
crypto = (function (){ | |
/** | |
* JS Implementation of MurmurHash2 | |
* | |
* @see http://github.com/garycourt/murmurhash-js | |
* | |
* @param {string} str ASCII only |
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
from random import randint, choice | |
p_switch = 0 | |
p_no_switch = 0 | |
for i in range(0, 100000): | |
choices = ['G'] * 3 | |
choices[randint(0, len(choices) - 1)] = 'C' | |
# Dude chooses once |
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
app.addEventListener("activated", function (args) { | |
if (args.detail.kind === activation.ActivationKind.launch) { | |
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) { | |
// paste the code here | |
} else { | |
} | |
... |
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 notifications = Windows.UI.Notifications; | |
var recurrence = notifications.PeriodicUpdateRecurrence.hour; | |
var urls = [ | |
new Windows.Foundation.Uri("http://localhost/tile1.xml"), | |
new Windows.Foundation.Uri("http://localhost/tile2.xml"), | |
new Windows.Foundation.Uri("http://localhost/tile3.xml"), | |
new Windows.Foundation.Uri("http://localhost/tile4.xml"), | |
new Windows.Foundation.Uri("http://localhost/tile5.xml") | |
]; |
NewerOlder