Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/*jslint devel: true, indent: 2 */ | |
// 15.2.3.2 | |
if (!Object.setPrototypeOf) { | |
Object.setPrototypeOf = (function(Object, magic) { | |
'use strict'; | |
var set; | |
function checkArgs(O, proto) { | |
if (typeof O !== 'object' || O === null) { | |
throw new TypeError('can not set prototype on a non-object'); | |
} |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
//var csv is the CSV file with headers | |
function csvJSON(csv){ | |
var lines=csv.split("\n"); | |
var result = []; | |
var headers=lines[0].split(","); | |
for(var i=1;i<lines.length;i++){ |
function [J, grad] = costFunctionReg(theta, X, y, lambda) | |
%COSTFUNCTIONREG Compute cost and gradient for logistic regression with regularization | |
% J = COSTFUNCTIONREG(theta, X, y, lambda) computes the cost of using | |
% theta as the parameter for regularized logistic regression and the | |
% gradient of the cost w.r.t. to the parameters. | |
% Initialize some useful values | |
m = length(y); % number of training examples | |
% You need to return the following variables correctly |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
# There are 3 levels of git config; project, global and system. | |
# project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
# system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
# Create a project specific config, you have to execute this under the project's directory. | |
$ git config user.name "John Doe" | |
# Create a global config |
replace-in-selector($what, $with = '') | |
/{replace($what, $with , selector())} | |
{block} | |
root-selector() | |
+replace-in-selector('^(\S+).*', '$1') | |
{block} | |
.foo | |
.bar |