background preloader

Programming

Facebook Twitter

Sorting algorithm. The output is in nondecreasing order (each element is no smaller than the previous element according to the desired total order);The output is a permutation (reordering) of the input.

Sorting algorithm

Further, the data is often taken to be in an array, which allows random access, rather than a list, which only allows sequential access, though often algorithms can be applied with suitable modification to either type of data. Since the dawn of computing, the sorting problem has attracted a great deal of research, perhaps due to the complexity of solving it efficiently despite its simple, familiar statement. For example, bubble sort was analyzed as early as 1956.[1] A fundamental limit of comparison sorting algorithms is that they require linearithmic time – O(n log n) – in the worst case, though better performance is possible on real-world data (such as almost-sorted data), and algorithms not based on comparison, such as counting sort, can have better performance. Classification[edit] Stability[edit] means.

Promises. You-Dont-Know-JS/README.md at master · getify/You-Dont-Know-JS. HTTP/1.1: Status Code Definitions. Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. 10.1 Informational 1xx This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.

HTTP/1.1: Status Code Definitions

There are no required headers for this class of status code. Since HTTP/1.0 did not define any 1xx status codes, servers MUST NOT send a 1xx response to an HTTP/1.0 client except under experimental conditions. A client MUST be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 (Continue) status message. Proxies MUST forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself requested the generation of the 1xx response. 10.1.1 100 Continue The client SHOULD continue with its request.

Library Genesis. == vs === Salary Negotiation: Make More Money, Be More Valued. [Editor’s note: At nearly 7,000 words, you probably don’t want to try reading this on an iDevice.

Salary Negotiation: Make More Money, Be More Valued

Bookmark it and come back later.] Imagine something a wee bit outside your comfort zone. Nothing scandalous: just something you don’t do often, don’t particularly enjoy, and slightly more challenging than “totally trivial.” Maybe reciting poetry while simultaneously standing on one foot. If I told you I would pay you a hundred thousand dollars if you did five minutes of poetry recital while standing on one foot, would you do it? Would you read poetry for me?

The Command Line Crash Course Controlling Your Computer From The Terminal. JavaScript’s Apply, Call, and Bind Methods are Essential for JavaScript Professionals. Prerequisite: — Understand JavaScript’s “this” With Ease, and Master It. — JavaScript Objects — Understand JavaScript Closures (This is an intermediate to advanced topic) Duration: About 40 minutes.

JavaScript’s Apply, Call, and Bind Methods are Essential for JavaScript Professionals

Functions are objects in JavaScript, as you should know by now, if you have read any of the prerequisite articles. And as objects, functions have methods, including the powerful Apply, Call, and Bind methods. On the one hand, Apply and Call are nearly identical and are frequently used in JavaScript for borrowing methods and for setting the this value explicitly. JavaScript’s Apply, Call, and Bind Methods are Essential for JavaScript Professionals. Bootstrap Tutorial. CSS-Tricks. GitHub - michaelcheng429/rewrite-underscore-library. _.defaults method - underscore (1.3.1) documentation - Omniref. Underscore.js.   Google Developers. Prototypal Inheritance. Douglas Crockford www.crockford.com Five years ago I wrote Classical Inheritance in JavaScript (Chinese Italian Japanese).

Prototypal Inheritance

It showed that JavaScript is a class-free, prototypal language, and that it has sufficient expressive power to simulate a classical system. My programming style has evolved since then, as any good programmer's should. I have learned to fully embrace prototypalism, and have liberated myself from the confines of the classical model. My journey was circuitous because JavaScript itself is conflicted about its prototypal nature. New () produces a new object that inherits from .prototype This indirection was intended to make the language seem more familiar to classically trained programmers, but failed to do that, as we can see from the very low opinion Java programmers have of JavaScript.

Fortunately, it is easy to create an operator that implements true prototypal inheritance. Function object(o) { function F() {} F.prototype = o; return new F(); } Underscore.js. Javascript Arrays – passing by reference or by value? – Oren Farhi – Thoughts On Javascript and Development. I stumbled across a great article about javascript arrays – Mastering Javascript Arrays.

Javascript Arrays – passing by reference or by value? – Oren Farhi – Thoughts On Javascript and Development

One fact that i didn’t realize until reading this article is that if you pass an array to a function – it is passed by reference by default. Actually, any non primitive object is passed by reference. Array By Reference Basically it means that if you make any changes to the array inside the function, these changes are saved in the original array so you don’t have to “return myArray” at the end of this function (or at any other return statement inside this function) – that’s what’s so great about javascript – being dynamic enough and consolidate various tricks from other low-level languages. var a= [3, 'my new post', {345}] function renderData(a) { a.push(4); } renderData(a); alert(a); // will output the new a - [3, 'my new post', {345}, 4] Array By Value.

Remedial JavaScript. Douglas Crockford www.crockford.com The JavaScript Programming Language suffers from premature standardization.

Remedial JavaScript

It was rushed to market and then instantly had a huge user base and, soon after, a formal international standard. There was no time during its development to polish the language. As a result, it still has some rough spots. Some of the problems we can easily avoid by not using misfeatures like the with statement.

JQuery

HTML+CSS. Javascript.