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
// Illustrative case | |
// YEAH -- ILLUSTRATIVE OF THE FACT THAT YOU CAN ISSUE PARALLEL QUERIES TO THE DATABASE INSTEAD OF SERIAL ONES LIKE A DUMB THREADED IMPLEMENTATION THAT IS INFERIOR FOR DOING WEB SERVERS | |
function (recentBlogPostIds, callback) { // obviously you need this, but use callback instead of return | |
var results = {}; | |
var count = 0; | |
for (var i = 0; i < recentBlogPostIds.length; i++) { | |
var blogPostId = recentBlogPostIds[i]; |
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
This is the most open letter ever. Other authors claim their letters are "open" because you can all read them, but in reality, they are nothing but the rants of one person, which you might not even completely agree with, or will piss you off. | |
By contrast, this letter is truly open and gives you the freedom to fork and modify it. Pissed about Mike Arrington investing? Want to give Richard Stallman some personal advice to stop publicly mentioning conspiracy theories he may or may not believe in? The choice is yours. Simply fork this letter and post it on Hacker News and other places. Track its changes, and see what happens. | |
Anything you wanted to write about lately? | |
--- THE THREE LINES --- | |
This letter is licensed under the GNU Public License. http://www.gnu.org/licenses/gpl.html | |
You may fork it but you must include these three lines exactly as they appear at the bottom of the letter. |
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
/* | |
* Creates a callback to be called after multiple functions are done | |
* Usage: | |
* var p = Q.pipe(function (params, subjects) { | |
* // arguments that were passed are in params.user, params.stream | |
* // this objects that were passed are in subjects.user, subjects.stream | |
* }, ['user', 'stream]); | |
* mysql("SELECT * FROM user WHERE user_id = 2", p.fill('user')); | |
* mysql("SELECT * FROM stream WHERE publisher_id = 2", p.fill('stream')); | |
* |
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
/* | |
* Sets up control flows involving multiple callbacks and dependencies | |
* Usage: | |
* var p = Q.pipe(function (params, subjects) { | |
* // arguments that were passed are in params.user, params.stream | |
* // this objects that were passed are in subjects.user, subjects.stream | |
* }, ['user', 'stream]); | |
* mysql("SELECT * FROM user WHERE user_id = 2", p.fill('user')); | |
* mysql("SELECT * FROM stream WHERE publisher_id = 2", p.fill('stream')); | |
* |
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
#import "FSURLCache.h" | |
#import <MobileCoreServices/MobileCoreServices.h> | |
@implementation FSURLCache | |
- (NSString*) fileMIMEType:(NSString*) file { | |
NSDictionary *mimeDict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"image/png", | |
@"png", |
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
----- | |
[2015-04-03 11:16:10] (gmba.local) Groups: DELETE slots: (publisherId,streamName) from url: http://gmba.local/Groups/action.php/Streams/interest?Q.ajax=json&Q.slotNames=publisherId%2CstreamName&Q.method=DELETE&Q.nonce=d454a3454f9a29f2cf2c18d376183325 | |
[2015-04-03 11:16:10] (gmba.local) Groups: | |
SELECT * | |
FROM Groups.users_user | |
WHERE `id` = 'ohrxqrzb' | |
LIMIT 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
srogers | |
you cannot possibly expect to have a discussion about whether Objectivism is consistent with “screwing people over” if you hold that man’s nature is subjective | |
mgin | |
The Objectivist ethics holds that the actor must always be the beneficiary of his action and that man must act for his own rational self-interest. But his right to do so is derived from his nature as man and from the function of moral values in human life—and, therefore, is applicable only in the context of a rational, objectively demonstrated and validated code of moral principles which define and determine his actual self-interest. It is not a licens | |
mgin | |
altruists’ image of a “selfish” brute nor to any man motivated by irrational emotions, feelings, urges, wishes or whims. | |
mgin | |
well that's not directly applicable, but there's an indication | |
srogers | |
While you may have read a lot of stuff, you clearly disagree with most of it, in various ways that are more fundamental than ethics |
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
<?php | |
function Groups_location_response_column($params) | |
{ | |
$user = Users::loggedInUser(); | |
if (!$user) { | |
Q_Response::redirect("Groups/groups"); | |
} | |
$miles = array(); | |
foreach (Q_Config::expect('Places', 'nearby', 'miles') as $m) { |
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
/** | |
* Q Promises implementation | |
* @module Q | |
*/ | |
(function (Q) { | |
/** | |
* Q.Promise constructor. | |
* Call the .fulfill(...) or .reject(...) method to | |
* signal that the promise is fulfilled or rejected. |