JavaScript Tutorial
Getting Started with Three.js
## Introduction I have used Three.js for some of my experiments, and it does a really great job of abstracting away the headaches of getting going with 3D in the browser. With it you can create cameras, objects, lights, materials and more, and you have a choice of renderer, which means you can decide if you want your scene to be drawn using HTML 5’s canvas, WebGL or SVG. And since it’s open source you could even get involved with the project. For all the awesomeness of Three.js, there can be times where you might struggle. The basics I will assume that you have at least a passing knowledge of 3D, and reasonable proficiency with JavaScript. In our 3D world we will have some of the following, which I will guide you through the process of creating: A scene A renderer A camera An object or two (with materials) You can, of course, do some crazy things, and my hope is that you will go on to do that and start to experiment with 3D in your browser. Support Set the Scene
Functions and stuff
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. In the case that it reaches the global scope and still has not found the requested name, it will raise a ReferenceError. 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 Local Variables var foo = 3; bar = 4;}test(10); Hoisting
FablabJunior2014
Plus de photos : Description voici les infos pour la mise en place d'un stage en partenariat avec ACCOORD, Club Efferv&science et avec le soutien des Petits Débrouillard Pays de la Loire : Du mardi 4 au vendredi 7 mars, PiNG propose un stage d’initiation au bricolage et à la fabrication numérique pour les 11/16 ans. Objectifs Objectifs des rencontres Objectifs pédagogiques Découverte et initiation d'arduino de manière ludique, programmation graphique Créer collectivement un projet-idée de A a Z en mode travail de groupe Imaginer ensemble des espaces de valorisation des productions éventuelles : ExpoSciences44, Festival D ... Carnet de Route Lundi Installation du lieu : 3 espaces ( établi-point chaud, tente1 programmation, tente2 ( robot ) Mardi 14h : présentation du lieu et de la semaine aux participants. Mercredi Mise en place des ateliers. Jeudi Débrief de la veille Continuité des ateliers par groupe ... Vendredi Visites Modalités
Brewing Java: A Tutorial
Copyright 1995-1998, 2000-2002, 2004-2006 Elliotte Rusty Harold elharo@metalab.unc.edu Last-modified: 2005/07/19 URL: This tutorial has grown into a book called The Java Developer's Resource , available now from Prentice Hall. Minor corrections on array dimensions Improve naming conventions in examples Fix a typo and make some efforts (incomplete) toward well-formedness Fix a typo and URLs Minor bug fix Some minor changes about = and := Fixed a few typos. Fixed a few bugs. Fixed a few typos Very minor corrections and updates This tutorial covers Java 1.0. I've fixed a number of typos. I've improved the treatment of recursion, expanded and updated the installation and getting started instructions, fixed a bug in the Mondrian programs, and cleaned up some other parts. I fixed a bug in the Arg method of the complex class. The RAM config program, typewriter applet, Bozo sort algorithm and Java doodle applet are finally included. Don't despair, though. Java Tokens
Javascript using hacks
Javascript is so much fun, except when it’s not. There’s always the fear of runtime errors that keeps us thinking all the time while writing code. It makes us better coders - we have no other option than to visualize every line of code as if it’s running as we write it. That’s why it’s so important to have tidy code. Small code. I gathered some fun snippets I enjoy using instead of boring code that takes too much space. I learned all of this from open source code (until node.js all javascript code was open source, wasn’t it?) Hipster Hack #1 - Method calling I really hate if/else blocks and this is quite a useful trick to call the right function based on a boolean value. Hipster Hack #2 - String joins It’s a known fact that strings like other strings. Hipster Hack #3 - Default Operator || Javascript is all about not knowing what an object holds. Hipster Hack #4 - Guard Operator && Similar to the Default Operator, this one is super useful. Hipster Hack #5 - XXX Operator Hipster Hack #6 - Timing