Skip to main content

Home/ javascript/ Group items tagged use

Rss Feed Group items tagged

Javier Neira

JavaScript setTimeout Function - JavaScript Timing Events - 0 views

  •  
    JavaScript setTimeout Function - JavaScript Timing Events November 16, 2007 by Blogging Developer JavaScript features a couple of methods that lets you run a piece of JavaScript code (javascript function) at some point in the future. These methods are: * setTimeout() * setInterval() In this tutorial, I'll explain how setTimetout() method works, and give a real world example. You may find the details of setInterval() method in JavaScript setInterval Function - JavaScript Timing Events setTimeout() window.setTimeout() method allows you to specify a piece of JavaScript code (expression) will be run after specified number of miliseconds from when the setTimeout() method is called. Syntax var t = setTimeout ( expression, timeout ); The setTimeout() method returns a numeric timeout ID which can be used to refer the timeout to use with clearTimeout method. The first parameter (expression) of setTimeout() is a string containing a javascript statement. The statement could be a call to a JavaScript function like "delayedAlert();" or a statement like "alert('This alert is delayed.');". The second parameter (timeout), indicates the number of miliseconds to pass before executing the expression. Example An alert box will be shown 5 seconds later when you clicked the button. clearTimeout() Sometimes it's useful to be able to cancel a timer before it goes off. The clearTimeout() method lets us do exactly that. Its syntax is: clearTimeout ( timeoutId ); where timeoutId is the ID of the timeout as returned from the setTimeout() method call.
Javier Neira

HtmlUnit - Welcome to HtmlUnit - 2 views

  •  
    HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc... just like you do in your "normal" browser. It has fairly good JavaScript support (which is constantly improving) and is able to work even with quite complex AJAX libraries, simulating either Firefox or Internet Explorer depending on the configuration you want to use. It is typically used for testing purposes or to retrieve information from web sites. HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit or TestNG. Refer to the document "Getting Started with HtmlUnit" for an introduction. HtmlUnit is used as the underlying "browser" by different Open Source tools like Canoo WebTest, JWebUnit, WebDriver, JSFUnit, Celerity, ... HtmlUnit was originally written by Mike Bowler of Gargoyle Software and is released under the Apache 2 license. Since then, it has received many contributions from other developers, and would not be where it is today without their assistance.
yc c

JavaScript Shell - 0 views

  •  
    Features: You can enter statements and expressions at the same prompt. The result of each non-void statement or expression is shown. User-defined variables. b = document.body User-defined functions. function f() { return 5; } JavaScript error messages are shown in red. Previous statements and expressions are available through Up and Down arrow keys. Tab completion. Multiline input (Shift+Enter to insert a line break). If the shell is opened using a bookmarklet, JavaScript typed into the shell runs in the context of the original window. Works well in Firefox, mostly works in Opera 8 and in IE 6 for Windows. Suggested uses: Test short bits of JavaScript, bookmarklets, or user scripts. (For longer bits of JavaScript, try the JavaScript development enviornment too.) Explore DOM objects such as document.body using props (Alt+P) to figure out what is possible. Explore the DOM of a specific page using the bookmarklet version of the shell. Modify the DOM of a specific page using the bookmarklet version of the shell. Use the shell like you would use the home screen of a calculator such as a TI-83. Alt+M gives you easy access to math functions such as sin and pow.
Mike Chelen

Pipes Blog » Blog Archive » Pipes webservice module and AppJet - 0 views

  •  
    One host that we've been playing around with is AppJet. Using AppJet as your host for your Pipes webservice module is easy to make, fast and effective. AppJet uses JavaScript as the server side language making it even easier to use for web developers.
yc c

jQuery 1.4: What you need to know - 5 views

  •  
    Matt Nowack has taken the awesome HTML5 presentation app in HTML5, which is open source, and has created a presentation discussing jQuery 1.4. It is good stuff, using the fact that you can embed the features that you want to show. Just as long as you can hit the right arrow to get through the "look at all the people who use jQuery" part (we get it! lots of people use jQuery!)
Javier Neira

12 Tips to improve your jQuery code | Geekology - 2 views

  • DOM manipulation is one of the slowest operations JavaScript (and hence, jQuery) can perform.
  • Use IDs instead of classes in selectors
  • When you need to perform multiple methods on elements, jQuery can chain those methods together.
  • ...2 more annotations...
  • 11. Use jQuery’s noConflict() method to rename the jQuery object when working with multiple frameworks: Many JavaScript frameworks use the “$” symbol to reference the framework. If you use multiple frameworks in your project, use the jQuery.noConflict() method to release the “$” object and assign jQuery to a custom-named object:
  • 12. Use shorthand for the $(document).ready() event:
Julian Knight

Chris Adams: Cleaning up the web with jQuery and a little help from Google - 2 views

  •  
    How to use JQuery (or other libraries) in a bookmarklet! With an example of making textarea's resizeable. Chris Adams provides a template for creating your own bookmarklet and explains some of the reasons you might want to use this technique for development and testing. He also points out some gotcha's to be careful of.
  •  
    How to use JQuery (or other libraries) in a bookmarklet! With an example of making textarea's resizeable. Chris Adams provides a template for creating your own bookmarklet and explains some of the reasons you might want to use this technique for development and testing. He also points out some gotcha's to be careful of.
Javier Neira

Why REST ? | /var/log/mind - 0 views

  • ‘ls’ or ‘List Directory’
  • ‘cd’or ‘Change Directory’
  • ‘put’ or ‘Upload’
  • ...26 more annotations...
  • you soon realise that every file and directory is uniquely addressable by its fully qualified path (either absolute or relative) and you can refer to each file and directory by its path. You are also aware that a valid path will uniquely resolve to only one directory or file.
  • the server allows you to retrieve the list of subdirectories and files within your current directory. It always shows you the current state of that directory.
  • following elements
  • A shared understanding of where the files will be uploaded, how they will be uniquely named, their specific file extensions (optionally) and the specific format of the file eg.
  • daemon process on the central office computer (the FTP server) which regularly scans the directory, parses each file as it comes it, does the relevant processing on it, and generates the appropriate result files and places them in the appropriate directories using the shared understanding of the directory structure and the file naming convention to communicate back the results of the processing.
  • RPC allowed you to invoke remote procedures by supporting an ability to pass messages which included the message name and the values for all the parameters necessary to be supplied to the message. Unlike FTP which was meant to do data transfer across a network, RPC was geared to do things remotely.
  • FTP required understanding of very few basic verbs (ls, cd, get, put). Thus the training required to understand FTP semantics was far less than that for RPC. This was partially due to the fact that RPC had a programmatic interface.
  • Moreover each time, new procedures were added or parameters added, these required programmatic changes
  • HTTP protoco
  • Unlike FTP and email, this required the authors to understand a new language, but used a simple markup syntax to keep the learning curve to the minimum
  • get/view/download/save a document
  • Along with RPC, these were essentially different technical manifestations of Service Oriented Architecture (SOA) principles.
  • Many services were usually expected to “do something” though quite often some services would simply return the requested data. Usually but not necessarily the services were identified by using ‘verbs’.
  • allow us to use the web to ‘do something’
  • Resource and media types as the basic units
  • Unique resource identifiers
  • Each resource has often one default manually readable representation
  • Each resource representation optionally includes contextually relevant hyperlinks to other resources
  • REST encourages a uniform interface
  • GET, PUT, POST and DELETE
  • Default Rendering
  • a default HTML rendering capability
  • Aspects such as non maintenance of conversational state, greatly increase the scalability of REST applications even if they do incur a minor cost in efficiency (which can be due to repeated redundant communication of data elements, or additional processing requirements due to preclusion of conversation state).
  • is much easier to understand from a data perspective than an invoice processor API.
  • However the simpler, cleaner and minimalistic abstractions often are far more important than feature richness. A point I would want to make in favour of REST even as I admit that conventional SOA technologies are far more feature rich than REST.
  • REST encourages you to view and model your architecture as a set of resources rather than services.
Dirk Sorensby

JavaScript Object Chaining using Prototypal Inheritance - 2 views

  •  
    how to use the prototype and constructor properties to trace an object's ancestry up to the base Object. H
anonymous

janl/mustache.js - GitHub - 0 views

  •  
    Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values.
Hostforlife Hosting

How to Use JavaScript to Create Simple Animation - - 1 views

  •  
    In this example, you are going to learn how to create simple animation of an object using JavaScript. The object we're referring to here is any image.
qualitypoint Tech

Future of Solar Power? - 0 views

  •  
    I understand that bringing Solar in every day use everywhere is a challenging task. But still, personally I believe Solar power will be playing major role in energy sector very soon.\n\nSo, I am planning to create some kind of web applications (e.g calculating energy output for any Building) related to solar power. And, I am gathering more details about any existing applications. If you know any useful information about solar related web applications you can share it thro' the comments or you can send the details to me
yc c

YUI -- The Yahoo! User Interface Library - 0 views

  •  
    The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. YUI is available under a BSD license and is free for all uses. The YUI project includes the YUI Library and two build-time tools: YUI Compressor (minification) and YUI Doc (documentation engine for JavaScript code).
Javier Neira

JavaScript EE, Part 1: Run JavaScript files on the server side - 0 views

  • freedom to use the same JavaScript routines on both servers and clients. In addition, the techniques presented throughout this series will allow you to maintain a single code base for both Ajax and non-Ajax clients
  • This double-coding issue can be avoided by using JavaScript combined with Java code on the server side, getting full support of scripting languages through the javax.script API. In addition, the Java SE Development Kit (JDK) 6 already includes Mozilla's Rhino JavaScript engine, which means no setup is required.
  • the toSource() method, which all JavaScript objects must have.
  • ...5 more annotations...
  • engine.eval(scriptReader, vars);
  • sun.org.mozilla.javascript.internal.NativeObject
  • all data exchange between the Java code and the executed script should be done through primitive variables, strings, and Java objects (for example, beans) whose properties and methods can be accessed very easily in the JavaScript code. Simply said, don't try to access native JavaScript objects in your Java code. Use Java objects in the JavaScript code instead.
  • Note that javax.script.Invocable is an optional interface, which some script engines may not implement. The JavaScript engine that comes with JDK 6 does support this interface.
  • you can significantly reduce the execution time by compiling the scripts, using the methods provided by another optional interface named javax.script.Compilable, which is supported by the JavaScript engine of JDK 6.
yc c

moo.fx - size does matter - 1 views

  •  
    moo.fx is a superlightweight, ultratiny, megasmall javascript effects library, to be used with prototype.js or the mootools framework. It's very easy to use, blazing fast, cross-browser, standards compliant, provides controls to modify any CSS property of any HTML element, including colors, with builtin checks that won't let a user break the effect with multiple, crazy clicks. Optimized to make you write the lesser code possible, the new moo.fx is so modular you can create any kind of effect with it. moo.fx is open source, released under the very liberal MIT License, so feel free to do anything you want with
Julian Knight

Jash: JavaScript Shell - 4 views

  •  
    "Jash is a DHTML-based window that gives you command-line JavaScript access to the current browser window. With this console you can quickly debug scripts, manipulate the DOM, view the current page's objects, functions, and variables, execute arbitrary Javascript, enter new CSS (in IE, Firefox, Opera, and Safari), and much more." - A useful tool to execute JavaScript, make live (temporary) CSS changes to a page, discover the page structure, etc. for developers. Written totally in JavaScript so can be used on any platform with any browser. Include in your own pages for debugging or load via a bookmarklet to run on any page.
yc c

Ident Engine - 1 views

  •  
    Without much conscious thought, most of us have built identities across the web. We've filled in profiles, uploaded photos, videos, reviews and bookmarks. The Ident Engine uses semantic web API's to bring together these web footprints.
  •  
    JavaScript library that retrieves and aggregates social profiles from various sites and networks. Currently supports 72 sites and 149 endpoint mappings * 12seconds.tv * 43things.com * 43people.com * backnetwork.com * backtype.com * barcampbrighton3.backnetwork.com * barcamplondon5.backnetwork.com * blip.fm * blip.tv * blogspot.com * blogger.com * brightkite.com * claimid.com * cocomment.com * corkd.com * dconstruct08.backnetwork.com * del.icio.us * digg.com * disqus.com * djangopeople.net * dopplr.com * edenbee.com * emberapp.com * facebook.com * ffffound.com * flickr.com * fotb08.backnetwork.com * fotolog.com * friendfeed.com * getsatisfaction.com * github.com * google.com * hi5.com * huffduffer.com * identi.ca * jaiku.com * jpgmag.com * krop.com * last.fm * linkedin.com * livejournal.com * ufapi.lab.madgex.com * mashed08.backnetwork.com * meetup.com * microformats.org * mybloglog.com * mytvshows.org * mynameise.com * myopenid.com * myspace.com * newsvine.com * odeo.com * orkut.com * picasaweb.google.com * plaxo.com * plazes.com * profilactic.com * readernaut.com * seesmic.com * slideshare.net * stumbleupon.com * technorati.com * threadless.com * timespeople.nytimes.com * tumblr.com * twitter.com * upcoming.yahoo.com * vimeo.com * vox.com * spaces.live.com * yelp.com * youtube.com Content types definitions * Activity * Audio * Bookmarks * Entries * Events * Friends * Friends Status * Images * Interests * Lifestream * None * Profile * Resume * Services * Slides * Status * Video Schemas * Atom * FOAF * None * Rss * XFN * XFN-hCard * hAtom * hCalendar * hCard * hResume
Javier Neira

jQuery is a Monad « Important Shock - 1 views

  •  
    1. Monads aren't esoteric, abstruse computer science - they're useful. 2. You probably have used monads but just haven't realized it. 3. jQuery is awesome.
vikas_jk

Useful Javascript Unit Testing Frameworks - QA With Experts - 0 views

  •  
    Javascript Unit testing frameworks list with it's features and which one you should use.
Julian Knight

Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! - 1 views

  •  
    Great little site listing really useful small JavaScript libraries for all sorts of uses.
1 - 20 of 113 Next › Last »
Showing 20 items per page