background preloader

Javascript

JSbooks - free javascript books
Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace. Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications. // global scopevar foo = 42;function test() { // local scope foo = 21;}test();foo; // 21 Leaving out the var statement inside the function test will override the value of foo. // global scopevar items = [/* some list */];for(var i = 0; i < 10; i++) { subLoop();} JavaScript Garden JavaScript Garden
HTML, CSS, PHP, Javascript, XML, Web Service y SOAP

Artículos - Kioskea
Junio 2014 Introducción al protocolo HTTP Desde 1990, el protocolo HTTP (Protocolo de transferencia de hipertexto) es el protocolo más utilizado en Internet. El propósito del protocolo HTTP es permitir la transferencia de archivos (principalmente, en formato HTML). entre un navegador (el cliente) y un servidor web (denominado, entre otros, httpd en equipos UNIX) localizado mediante una cadena de caracteres denominada dirección URL. Comunicación entre el navegador y el servidor La comunicación entre el navegador y el servidor se lleva a cabo en dos etapas: El navegador realiza una solicitud HTTPEl servidor procesa la solicitud y después envía una respuesta HTTP En realidad, la comunicación se realiza en más etapas si se considera el procesamiento de la solicitud en el servidor. Solicitud HTTP Una solicitud HTTP es un conjunto de líneas que el navegador envía al servidor. Por lo tanto, una solicitud HTTP posee la siguiente sintaxis (<crlf> significa retorno de carro y avance de línea): Comandos El protocolo HTTP El protocolo HTTP
REST vs SOAP al servicio de la web REST vs SOAP al servicio de la web Las últimas semanas estuvimos involucrados en un proyecto interesante que me hizo vivir de cerca la materialización de la evolución de la WEB. Es imposible hablar de la WEB moderna sin mencionar a los Web Services, y no entrar en el debate REST vs SOAP. REST (Representational State Transfer) es una arquitectura sencilla que se ejecuta sobre HTTP. En su disertación, Roy Fielding describe a REST como un “estilo de arquitectura” que explora de una forma básica la tecnología existente y los protocolos de la Web, incluyendo XML y HTTP. Por su vez, SOAP, Simple Object Access Protocol es una especificación de protocolo para intercambiar información estructurada en la implementación de Web Services. En este pequeño post haré una breve comparación entre los dos enfoques y animar a la reflexión. Siendo REST un estilo de arquitectura que describe el acto de transferir un estado por sus representaciones, el siguiente ejemplo permite ilustrar el proceso: ¿Porqué escoger REST o escoger SOAP?
Javascript Flavors

mikeaddison93/angular.js · GitHub
Bower
unnamed pearl
Object.create() Object.create() The Object.create() method creates a new object with the specified prototype object and properties. SyntaxEdit Object.create([, ]) Parameters proto The object which should be the prototype of the newly-created object. propertiesObject Optional. Throws Throws a TypeError exception if the proto parameter isn't null or an object. ExamplesEdit Classical inheritance with Object.create() Below is an example of how to use Object.create() to achieve classical inheritance. function Shape() { this.x = 0; this.y = 0;} Shape.prototype.move = function(x, y) { this.x += x; this.y += y; console.info('Shape moved.');}; function Rectangle() { Shape.call(this); } Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; var rect = new Rectangle(); console.log('Is rect an instance of Rectangle?' If you wish to inherit from multiple objects, then mixins are a possibility. Using propertiesObject argument with Object.create() PolyfillEdit if (typeof Object.create ! See alsoEdit
Naked JavaScript

JavaScript_Enlightenment.pdf
Understanding Design Patterns in JavaScript Today, we're going to put on our computer science hats as we learn about some common design patterns. Design patterns offer developers ways to solve technical problems in a reusable and elegant way. Interested in becoming a better JavaScript developer? Republished Tutorial Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. Solid design patterns are the basic building block for maintainable software applications. A design pattern is a reusable software solution Simply put, a design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software. patterns are proven solutions to software development problems patterns are scalable as they usually are structured and have rules that you should follow patterns are reusable for similar problems We'll get into some examples of design patterns further in to the tutorial. Creational patterns focus on ways to create objects or classes. Understanding Design Patterns in JavaScript
Today we have decided to showcase a 'map' of the current state of web animation by compiling highly regarded libraries, frameworks and plugins based on their versatility and performance. Infographic 1: The Map of Web Animation The infographic is divided into three sections, the first part is a selection of a few of the most comprehensive animation libraries which offer up all the tools one could ever wish for from easing functions and callbacks to timing control, not to mention the generic animation functions we have come to expect. Infographic 2: List of Tools The second section is dedicated to the various methods for animating UI elements and any others objects in the DOM like scroll animation, parallax, sprites, 3D transformations, physics engines, and transitions. Infographic 3: Performance Tips Last but not least, the third section lays out some basic performance tips to help choose between CSS or Javascript-based animation depending on the requirements of any given project. Web Animation Infographics: A Map of the Best Animation Libraries for JavaScript and CSS3 plus Performance Tips Web Animation Infographics: A Map of the Best Animation Libraries for JavaScript and CSS3 plus Performance Tips
15 Beautiful Text Effects Created with CSS Beautiful text or typography will make your design look attractive. In web design, CSS helps to give style to design including various effects in text or typography. With CSS, you can use clipping and add animation to text to spice things up a little. And to illustrate this, we have collected 15 stunning and cool text effects that are made possible with CSS (some with a little help from Javascript codes). For more things you can do with CSS, check out: Elastic stroke Animation Yoksel animates the stroke of the text with a cool color scheme. SVG Glitch Want to make effects that look like a broken analog TV? Shop Talk logo The Shop Talk logo is recreated by Hugo using only CSS. Slashed Effect This idea by Robet Messerle gives the knife sliced effect, done with less than 70 lines of CSS. Elegant Shadow Effect Long Shadow effect comes to text, made using CSS. Foggy text effect Andreas creates an awesome cinematic foggy effect. SVG text mask Text Animation Hit The Floor Background Clip Text CSS Text-FX 15 Beautiful Text Effects Created with CSS
6 CSS Tricks to Align Content Vertically 6 CSS Tricks to Align Content Vertically Let’s talk about vertical alignment in CSS, or to be more precise how it is not doable. CSS has not yet provided an official way to center content vertically within its container. It’s a problem that probably has frustrated web developers everywhere. But not to fear, in this post, we’re going to run by you a few tricks that can help you imitate the effect. These tricks may however have limitations, and you may have to use more than one trick to complete the illusion. Recommended Reading: How To Obtain Equal Column Height With CSS 1. The first trick we are going to see here uses the position property. We will first set the position of the container element to relative, then we set the child element position to absolute. To align it vertically, move the child element position from the top, by half of the container’s height, and pull it up by half of the child element width. 2. CSS3 Transform has made it easy to put content at the center. 3. 4. 5. 6.
Web - HTML / CSS / JavaScript

<How to>use COM Object and Javascript in IE11 - Tutorials
COM_L Inject javascript COM_L Inject javascript Hi TLM,Thanks for the reply. Sorry for my late reply. I got involved with the ie_inject function, but it usesthe execscript function which will be discontinued by Microsoft with IE 11+, I hear.BTW: I am using AHK_L version 1.1.13.00 Unicode. jethrow does not like the phrase COM_L so Ihave stopped using it.Your idea is very interesting but I don't see how a javascript would get executed after it is appended.pwb.document.getElementsByTagName("Body")[0].innerHTML := StringI have tried this and many other variations. Note the ` escaping for % characters to avoid errors for String = String = ( <script> function Go() { document.body.style.overFlow = "hidden"; var img1 = document.getElementsByTagName("img").item(0); var sw = screen.width; var sh = screen.height; var iw = img1.width; var ih = img1.height; var ir = iw/ih; var sr= sw/sh; if(sr <= ir) img1.style.width = "100`%"; else img1.style.height = "100`%"; } </script> ) pwb.document.getElementsByTagName("Body")[0].innerHTML .= String
IE_InjectJS(hWnd_MainWindow, JS_to_Inject, VarNames_to_Return="", JS_to_Invoke1="", JS_to_Invoke2=""){global Block, fURL, myProg;FixSilent ;MsgBox, 4096,, fURL is: %fURL%, 2 ;theURL := IE_InjectJS(hwnd, "", "document.location.href");return theURL ;MsgBox, 4096,, hWnd_MainWindow is: %hWnd_MainWindow%`nJS_to Inject is: %JS_to_Inject%`nVarNames_to_Return is: %VarNames_to_Return%`nJS_to_Invoke1 is: %JS_to_Invoke1%`nJS_to_Invoke2 is: %JS_to_Invoke2% ;Prevent running again before this one is finished. If ThisWinClass = AVL_AVVIEW{ if KeepBlock = Block =return} ;Initialize the COM interface. code modified from SEAN IID_IHTMLWindow2 := "{332C4427-26CB-11D0-B483-00C04FD90119}" COM_AccInit();COM_Init() ;COM_Error(False);COM_Error(True) pwin := COM_QueryService(pacc,IID_IHTMLWindow2,IID_IHTMLWindow2) COM_Release(pacc) IID_IWebBrowserApp := "{0002DF05-0000-0000-C000-000000000046}" pwb := COM_QueryService(pwin,IID_IWebBrowserApp,IID_IWebBrowserApp) Com_Release(pwin) COM_L Inject javascript - View topic • AHKScript COM_L Inject javascript - View topic • AHKScript
AHK & javascript

Introduction To Photoshop Scripting Automation is useful in the work of every designer. It saves precious time on repetitive tasks and helps us solve certain problems more quickly and easily. You can automate your workflow in Photoshop with actions, which are pretty popular and which most of you already know about and use. Today, we’ll introduce you to an advanced automation technique: scripting. All you need for this is basic knowledge of JavaScript, which some of us Web designers already have. I’ve known about Photoshop scripts for years but decided to really dive in a few months ago. But first, we have to answer the obvious question. Why Do We Need Scripts? Why should we would learn to script if Photoshop already has pretty nice actions? A script is more dynamic; its behavior changes according to the parameters you input or the context of its application. Requirements Link You don’t have to be an advanced programmer to be able to write scripts; I’m just a graphic designer, like most of you. Getting Started Link Tools Link
Ps script / javascript / Batch renaming / etc

Best Photoshop Export Action Ever | Uncorked Studios Recently here at Uncorked we’ve been looking at ways to optimize and improve our processes, and in reflecting on how we do things here at Uncorked, I brought up the number of times I’ve been standing over a designers shoulder and been telling them to “just press F5”. A blank stare always ensues, huh? While I’ve been using this export action for forever myself, I’ve never shared it. Shame on me. Provided here is an action set containing two actions: Layer Export (F5)Layer Export Retina (F6) After downloading and unzipping, go to your Actions palette in Photoshop and from its options pulldown, select “Load Actions...” and choose the unzipped file. So what do they do? Select any layer in your photoshop document. The “retina” version will actually prompt you a second time to save an asset. So what’s it doing under the hood? The stuff about the group nesting and flattening is very relevant and the missing key to many other people's attempts at this same thing. flare@2x.png flare.png
Introduction To Photoshop Scripting
jquery - Animate.css + Viewport Checker delay?
JavaScript-2

On scroll animations using waypoints.js and animate.css - Did you ever wonder how the best themes implement on scroll animations? This tutorial will allow you to recreate the effect using the popular jquery-waypoints plugin as well as the animate.css library. On scroll animation is a technique which has gained popularity over the past several months. It suits one-page websites as well as websites with many illustrations perfectly, giving them a more dynamic appearance. However, the animations can be applied to any element as we will soon see. For this tutorial we assume the reader has some prior experience with javascript and more specifically with the jQuery library, as we will need the aid of the popular jQuery-waypoints plugin. The following example will alert the user when he scrolls on any element that has a class ‘notify’: One can pass a second argument to the waypoint function, which is an options object. In the example above we express the offset as a percentage of the viewport’s height. But what if I want staggered animations?
Detecting a "Touch Screen" Device Using Modernizr I’m amazed at how the mobile phone evolved over the years. Today, mobile phones are touch-enabled, can be used to surf sites like on a desktop PC, and carry a lot of handy apps to help you be more productive. When we build responsive websites that aim for mobile devices, sometimes we want to include specific and extra capabilities for users to make use of its multi-touch capability. Pin it But before that, we need to first identify if the device has support for touch interaction, and it is easy to do so with Modernizr. Check out: Getting Started with Modernizr Feature Detection with Modernizr At the Modernizr download page, ensure that the Touch Event option is selected. You can then add this Modernizr.touch in your script. It’s a basic JavaScript that will show the following popup. Furthermore, you can also use this method to load touchSwipe, a jQuery plugin for touch gestures, conditionally. The above code will test for touch capability. Final Thought
Download jQuery | jQuery Compressed and uncompressed copies of jQuery files are available. The uncompressed file is best used during development or debugging; the compressed file saves bandwidth and improves performance in production. You can also download a sourcemap file for use when debugging with a compressed file. The map file is not required for users to run jQuery, it just improves the developer's debugger experience. To locally download these files, right-click the link and select "Save as..." from the menu. The jQuery 1.x line had major changes as of jQuery 1.9.0. Download the compressed, production jQuery 1.12.3 Download the uncompressed, development jQuery 1.12.3 Download the map file for jQuery 1.12.3 jQuery 1.12.3 release notes jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. Download the compressed, production jQuery 2.2.3 Download the uncompressed, development jQuery 2.2.3 Download the map file for jQuery 2.2.3 jQuery 2.2.3 release notes
Curriculum — JS for absolute beginners
JavaScript - jQuery

HTML Event Attributes
JavaScript events and CSS classes

curriculum/README.md at master · dev-academy-programme/curriculum
Event reference
Pearltrees
Add-in development best practices - Docs - Office Dev Center
UX design patterns - Docs - Office Dev Center
Color Picker — HTML Color Codes
Error – TypeError: d is undefined
Utilidades JavaScript

javascript fevrier

maps javascript

Javascript,Ajax,Jquery

Css Html Javascript