background preloader

In JavaScript

In JavaScript
JavaScript is a general purpose programming language that was introduced as the page scripting language for Netscape Navigator. It is still widely believed to be a subset of Java, but it is not. It is a Scheme-like language with C-like syntax and soft objects. JavaScript was standardized in the ECMAScript Language Specification, Third Edition. JSON is a subset of the object literal notation of JavaScript. In this example, an object is created containing a single member "bindings", which contains an array containing three objects, each containing "ircEvent", "method", and "regex" members. Members can be retrieved using dot or subscript operators. myJSONObject.bindings[0].method // "newURI" To convert a JSON text into an object, you can use the eval() function. eval() invokes the JavaScript compiler. var myObject = eval('(' + myJSONtext + ')'); The eval function is very fast. To defend against this, a JSON parser should be used. var myObject = JSON.parse(myJSONtext, reviver); Related:  JQUERYparser xml

Sly Introduction Sly is a JavaScript library for advanced one-directional scrolling with item based navigation support. It can be used as a simple scrollbar replacement, as an advanced item based navigation tool, or as a great navigation and animation interface for parallax websites. This is achieved by a powerful & developer friendly API that provides a bunch of very useful methods giving you control over everything. Dependencies jQuery 1.7+ And that's it. Compatibility Sly works in every desktop browser, and due to some divine intervention, even in IE6+, but that is a complete accident. Mobile Sly does touch events, and I'm generally trying to make it work everywhere, but the fact is that mobile is not tested. Changelog Sly upholds the Semantic Versioning Specification. Support Reward the developer And make him happy for maintaining this library! I don't want to go the Isotope & family route and monetize my libraries. Performance Examples Documentation Forum

JSON JSON (/ˈdʒeɪsən/ JAY-sən),[1] or JavaScript Object Notation, is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML. Although originally derived from the JavaScript scripting language, JSON is a language-independent data format. Code for parsing and generating JSON data is readily available in many programming languages. The JSON format was originally specified by Douglas Crockford. It is currently described by two competing standards, RFC 7159 and ECMA-404. History[edit] Although JSON was originally based on a non-strict subset of the JavaScript scripting language (specifically, Standard ECMA-262 3rd Edition—December 1999[8]) and is commonly used with that language, it is a language-independent data format. Data types, syntax and example[edit] JSON's basic types are: Data portability issues[edit] Using JSON in JavaScript[edit]

Nick Farina - A lightweight XML parser for NodeJS/JavaScript Check out xmldoc on Github or just npm install xmldoc. Ever need to parse a bit of XML in NodeJS? If so, you may be quite confused by your options. Hm, I’m getting deja vu. Of course, there are plenty of other libraries that let you deal with the whole document in memory at once. Node-elementtree is pure JS and looks pretty great, but I wanted a “one file” solution. So, long story short, I wrote one and it’s a single JS file and it suits my needs perfectly. Behold: You can use it in your Node.js app easily: npm install xmldoc …later… var xmldoc = require('xmldoc'); Or just put it in a <script> tag and use it in the browser if you’d like. As usual, you probably shouldn’t be loading large XML documents with this class if you are tight on memory. Go try it out and let me know what you think!

JavaScript Doesn’t Suck At the Web Directions South conference last week, SitePoint’s Kevin Yank had the opportunity to speak with Douglas Crockford, Yahoo architect and expert on all things JavaScript. Douglas presented a talk entitled Web Forward! (formerly Ajax Security), in which he described the potential of – and problems with – JavaScript as a language, and how it would need to change for the Web to continue its evolution. He focused heavily on how the current process for developing web standards is failing us, and how the looming browser war could provide the solution. Hi, this is Kevin Yank from sitepoint.com, and I’m here at Web Directions South, 2008 with Douglas Crockford from Yahoo. Hi Doug. Hi. So, I’ve heard you say several times just how much JavaScript sucks, and how many problems there are with it, and yet you seem to devote yourself to it with a lot of passion. Ah, that’s fair enough. I am very clear about its shortcomings. Yeah. They were really lucky. I think so, and I think we need to.

Hacks to Beat Rapidshare Download Limits and Waiting Time - Tech Here are some hints to help you more efficiently use rapidshare. Skipping waiting time and bypassing download limits are rapidshare hacks that everybody should know. These tips have been retested and continue to work well. Updated Oct, 2010. Rapidshare has been an excellent tool for sharing large files. Recently users have discovered ways of bypassing the download limits and skipping waiting times. Several readers have emailed recently (Oct 2010) that these methods continue to work well. Update: Two new methods of bypassing download limits have been posted. RapidShare: NIC tricks and MAC cloning to bypass download limit Rapidshare traces the users IP address to limit each user to a certain amount of downloading per day. Here are some methods for doing this: 1.Short-Out the JavaScript: 1. 2.Request a new IP address from your ISP server. Here’s how to do it in windows: 1. 5. Frequently you will be assigned a new IP address when this happens. 3.Use a proxy with SwitchProxy and Chrome: 1. 4. 1.

Une galerie d'images simple avec jQuery Ce tutoriel vous guide dans la réalisation d’une galerie d’images simple, avec JavaScript et la bibliothèque jQuery. Introduction Réaliser une galerie photo en JavaScript n'est à première vue pas bien compliqué. Voici un système simple et non intrusif de visualisation d'images avec chargement et effet de fondu, comme on peut le visualiser avec cet exemple. Attention: l’adjectif «simple» dans le titre du tutoriel désigne la galerie d’images réalisée, pas forcément les étapes pour y parvenir. La base HTML Nous allons commencer par créer une liste de vignettes qui, une fois cliquées, afficheront nos images grand format. Nous avons maintenant notre balisage HTML définitif. La surcouche JavaScript Pour tirer parti des bénéfices qu'apporte jQuery, nous devons au préalable charger la bibliothèque depuis notre document HTML. Il reste à créer et lier le fichier qui contiendra le code de création de notre galerie d'images. jQuery(document).ready(function(){ }); $(document).ready(function(){ });

JSON Parse large XML files in Node | Code for geek FATAL ERROR JS Allocation failed – process out of memory SAX xml parser handles large xml files but due to it’s complexity in handling events to capture specific xml node and data, we do not recommend this package either. This code is tested on Ubuntu 14.04. Due to some dependency issue it may not run on Windows. What’s our Requirement ? We wanted XML parser which parse large xml files ( our is 635 megabyte) and allow us to convert it into JSON format for further use or simply allow us to extract only those data which we want and let us traverse through it easily. xml-stream Parser: After testing all most every high reputed parser ( reputation in terms of downloads daily ) we found this awesome parser which work exactly the way our requirement was. Install it using following command. npm install -g xml-stream How to use xml-stream: xml-stream is simple and fast. How it works ! xml-stream parse the xml content and output them in array structure. Input XML Parser Output: Extract specific xml node: <?

Related: