library

A library is an organized collection of sources of information and similar resources, made accessible to a defined community for reference or borrowing. read more at WikiPedia

  • iceSoft

    ICEsoft Technologies, Inc., is a leading provider of standards-compliant, Ajax-based solutions for developing and deploying Java EE, rich Internet applications. ICEfaces is a leading open source Ajax framework for Java EE.

    I search a lot in forums for resolving this small inconvenience in eclipse Helios. The solution is easier as you think:

    Are you using some custom file extensions?

    Name your facelets templates *.jspx if you are using any other extension, Eclipse JSP editor wont be used and you may have limited auto completion support.

    if you still want to use *.xhtml, .iface

    1. Go to Windows – Preferences – General – Content Types –  Text - JSP – and add your extensions
    2. into 'File Associations' and made the 'JSP editor' the default for .xhtml

    Auto completion for facelets, html and core components

    Use Jboss Tools which has enables content assist for f: ui: s: h:

    To install JBoss Tools, start up Eclipse 3.6 then:

    Help > Install New Software... >
    and add this URL:http://download.jboss.org/jbosstools/updates/development/

    Locate your project in eclipse, right click, select configure and choose “Add JSF capabilities” as seen in the picture below

    autocompletionEclipseIcefaces01

    Now open any files with the HTML editor/JSP editor, in fact it will work now with any editors and for all tags

    autocompletionEclipseIcefaces02

    Another solution

    You do not need to install Jboss Tools (I recommend it through) but what about Icefaces support?

    Icefaces provide a plugin 3.5.0 that support auto completion of tags in Eclipse Galileo (3.5) for icefaces 1.8.2.  While Eclipse Helios is only supported with icefaces 2.0 (plugin > 3.6.2)

  • The AIAA (American Institute of Aeronautics and Astronautics) paper [.pdf] plan to use java (For cost reasons)for safety-critical missions.The first fully time-deterministic and open-source library for Java: Javolution is ready to fight!

    Javolution real-time goals are simple: To make your application faster and more time predictable!
    That being accomplished through:

    • High performance and time-deterministic (real-time) util / lang / text / io / xml base classes.
    • Context programming in order to achieve true separation of concerns (logging, performance, etc).
    • A testing framework addressing not only unit tests but also performance and regression tests as well.
    • Straightforward and low-level parallel computing capabilities with ConcurrentContext.
    • Struct and Union base classes for direct interfacing with native applications (e.g. C/C++).
    • World's fastest and first hard real-time XML marshalling/unmarshalling facility.
    • Simple yet flexible configuration management of your application.

     Top 10 Reason to make a try:

    1. Javolution classes are simple to use, even simpler than most JDK classes. You don't need to guess the capacity of a TextBuilder, FastTable or a FastMap, their size expand gently without ever incurring expensive resize/copy or rehash operations (unlike StringBuilder, ArrayList or HashMap).
    2. Developers may achieve true separation of concerns (e.g. logging, configuration) through Context Programming or by using classes such as Configurable.
    3. Javolution classes are fast, very fast (e.g. Text insertion/deletion in O[Log(n)] instead of O[n] for standard StringBuffer/StringBuilder).
    4. All Javolution classes are hard real-time compliant and have highly deterministic behavior (in the microsecond range). Furthermore (unlike the standard library), Javolution is RTSJ safe (no memory clash or memory leak when used with Java Real-Time extension).
    5. Javolution makes it easy for concurrent algorithms to take advantage of multi-processors systems.
    6. Javolution's real-time collection classes (map, list, table and set) can be used in place of most standard collection classes and provide numerous additional capabilities.
    7. Any Java class can be serialized/deserialized in XML format in any form you may want, also no need to implement Serializable or for the platform to support serialization
    8. Javolution provides Struct and Union classes for direct interoperability with C/C++ applications.
    9. Javolution runs on any platform from the simplest J2ME CLDC 1.0 with no garbage collector to the latest J2EE 5.0 with parameterized types.
    10. Javolution is a pure Java Solution (no native code), small (less than 300 KBytes jar file) and free; permission to use, copy, modify, and distribute this software is freely granted, provided that copyright notices are preserved (BSD License).
  • Overlib
    overLIB is a JavaScript library created to enhance websites with small popup information boxes (like tooltips) to help visitors around your website. It can be used to provide the user with information about what will happen when they click on a link.
    You want to see this free script in action? more here at the official Homepage

    • Persistent or session cookies can be set...
    • You can also set the path...
    • A lot of options, see the comments from the authors
    • A very powerful script!!!!!

    //------------------------------------------------------------------------------ // TopDragon CookieJar(tm) //------------------------------------------------------------------------------ // A Javascript CookieJar object with associated methods for using cookies. // // Copyright 2001 by TopDragon Software (www.bydisn.com or This email address is being protected from spambots. You need JavaScript enabled to view it.).
    //
    // This code isn't shareware, it's absolutely free. But if you really want to 
    // (or if your conscience bugs you) feel free to send cash, gifts, liquor,
    // stocks, or just drop me a line and let me know that you're actually using it.
    // That will give me incentive to do more free stuff like this.
    //
    // Be sure to visit the TopDragon software page at www.bydisn.com/software!
    // There's lots of other free stuff (and some stuff that that isn't free too).
    //------------------------------------------------------------------------------
    // You may remove the following instructions/comments to decrease the size of 
    // this file, but PLEASE leave the above copyright info. I worked hard on this.
    //------------------------------------------------------------------------------
    // To use, just include this file in your HTML like this:
    //  <script language="JavaScript" src="./TDCookieJar.js"></script>
    //
    // A CookieJar object is automatically created and initialized.
    //
    // Methods:
    //
    //  getCookie(cookie-name)
    //
    //   Returns the value of the named cookie or "UNDEFINED"
    //
    //   Example:
    //
    //    username = CookieJar.getCookie("username");
    //
    //  setCookie(cookie-name, cookie-value[, cookie-expiration])
    //
    //   Sets the named cookie to the value specified, with the expiration
    //   date specified. Expiration date is optional. If not specified the
    //   cookie is temporary (expires when the browser session ends).
    //
    //   Expiration can be specified in a variety of ways:
    //
    //    Via a Date object (you set it's value)
    //
    //    Via the string "NEVER" or "never" or "Never"
    //    Never in this case is actually 12/31/2099.
    //
    //    Via a date string in any of the formats recognized by the 
    //    Date.parse method. Such as:
    //     "Dec. 25, 2001" or "December 25, 2001"
    //
    //    Via an "incremental" expression string +nu
    //    Where:
    //     + signifies an incremental expression
    //     n is any positive number
    //     u is the "units" designation:
    //      d or D for days
    //      h or H for hours
    //      m or M for minutes
    //    For example: "+30d" means the cookies expires in 30 days
    //
    //   Example:
    //
    //    CookieJar.setCookie("username","TopDragon","never");
    //
    //  deleteCookie(cookie-name)
    //
    //   Deletes the named cookie. Actually, the deletion is done by the
    //   browser. This method sets the value of the cookie to null and it's
    //   expiration date to a year ago. This will make the browser delete it.
    //
    //   Example:
    //
    //    CookieJar.deleteCookie("username");
    //
    //  cookiesEnabled()
    //
    //   Returns true if cookies are enabled on this computer, false otherwise.
    //   It determines this by attempting to set and retrieve a test cookie.
    //
    //   Example:
    //
    //    if ( !CookieJar.cookiesEnabled )
    //     alert("You must have cookies enabled to access this site");
    //
    //  setDomain(domain)
    //
    //   Sets the valid domain for the cookie. Must be in the form:
    //    domain-name.com or subdomain.domain-name.com
    //   Only cookies that match the domain name are returned. If
    //   you do not set a domain, the current domain is used by the browser.
    //
    //   The domain you set is used for all subsequently set cookies.
    //
    //   Example:
    //    CookieJar.setDomain("topdragonsoftware.com")
    //
    //  setPath(pathname)
    //
    //   Sets the valid path for the cookie. Must be in the form:
    //    "/" or "/mypages" or "/mypages/index.html"
    //   Only cookies that match the path are returned. / is the most
    //   general path. If you do not specify a path, the current path
    //   is used (i.e. only the current page will be able to access the
    //   cookie). To allow any page on your site to access the cookie,
    //   set a pathname of "/".
    //
    //   The pathname you set is used for all subsequently set cookies.
    //
    //   Example:
    //    CookieJar.setPath("/")
    //
    //  setSecure([boolean])
    //  setUnsecure([boolean])
    //
    //   Sets or unsets the "secure" status of the cookies. If the status
    //   is "secure", the cookie will only be sent via secure pathways
    //   (i.e. URLs with https:// in front of them). If called without a
    //   parameters, it's the same specifying "true".
    //
    //   The secure status you set is used for all subsequently set cookies.
    //
    //   Example:
    //
    //    CookieJar.setSecure() or CookieJar.setSecure(true)
    //
    //  If you need to access the cookies in the cookie jar, they are stored in
    //  a "hash" array (i.e. an array indexed by cookie name) called "cookies".
    //  For example, to list all cookies in the cookie jar, you can do this:
    //
    //   with (document.demo) {
    //    output.value = "CookieJar Cookies:\n";
    //    for ( var cname in CookieJar.cookies ) {
    //     output.value += cname+"="+CookieJar.cookies[cname]+"\n";
    //    }
    //   }
    //
    //  The CookieJar is automatically refreshed every time you call the 
    //  getCookie, setCookie or deleteCookie methods to make sure that cookies
    //  which have expired during the session are removed from the CookieJar.
    //  If you need to refresh the CookieJar yourself for some reason,
    //  you can call the internal refresh function CookieJar.refreshCookies().
    //
    //  For debugging, you can access the CookieJar as a string. Accessing the
    //  CookieJar as a string (for example, when assigning to a variable or a
    //  field) will automatically call the CookieJar.toString function to format
    //  the output like this: "CookieJar: name=value;name=value;
    //
    //------------------------------------------------------------------------------
    
    //------------------------------------------------------------------------------
    
    function TDCookieJarObj() {
            this.cookies = new Array();
            this.secure = false;
            this.domain = "";
            this.path = "";
            this.theCookie = "";
            this.cookiesEnabled = testCookies();
            if ( !this.cookiesEnabled ) {
                    this.toString = cookiesNotEnabled;
                    this.refreshCookies = cookiesNotEnabled;
                    this.setCookie = cookiesNotEnabled;
                    this.getCookie = cookiesNotEnabled;
                    this.deleteCookie = cookiesNotEnabled;
                    this.setDomain = cookiesNotEnabled;
                    this.setPath = cookiesNotEnabled;
                    this.setSecure = cookiesNotEnabled;
                    this.setUnsecure = cookiesNotEnabled;
            } else {
                    this.toString = CookieJarToString;
                    this.setCookie = setCookie;
                    this.getCookie = getCookie;
                    this.deleteCookie = deleteCookie;
                    this.setDomain = setDomain;
                    this.setPath = setPath;
                    this.setSecure = setSecure;
                    this.setUnsecure = setUnsecure;
                    this.refreshCookies = refreshCookies;
                    this.refreshCookies();
            }
            return this;
    
    //------------------------------------------------------------------------------
    // Internally Used Functions
    //------------------------------------------------------------------------------
    
            function cookiesNotEnabled() {
                    alert("Cookies are not enabled!");
            } // cookiesNotEnabled
    
            function refreshCookies() {
                    delete this.cookies;
                    this.cookies = new Array();
                    this.theCookie = document.cookie;
                    // If there is a cookie string, parse it and store the cookies
                    if ( this.theCookie.length > 0 ) {
                            this.theCookie += ';';
                            var startpos = 0;
                            var endpos = 0;
                            do {
                                    endpos = this.theCookie.indexOf(';', startpos);
                                    var tmp = this.theCookie.substring(startpos, endpos);
                                    var eqpos = tmp.indexOf('=');
                                    if ( eqpos > -1 ) {
                                            var cname = tmp.substring(0,eqpos);
                                            this.cookies[cname] = unescape(tmp.substring(eqpos+1));
                                    } else {
                                            this.cookies[tmp] = "";
                                    }
                                    startpos = this.theCookie.charAt(endpos+1) == " " ? endpos + 2 : endpos + 1;
                            } while ( startpos < this.theCookie.length );
                    }
            } // refreshCookies
    
            function getExpirationDate(exp) {
                    // See if it's a Date object
                    if (exp.constructor == Date) {
                            expdt = exp;
                    // See if it's the string "NEVER" (never is 12/31/2099 in this case)
                    } else if ( exp.toUpperCase() == "NEVER" ) {
                            expdt = new Date(2099,11,31);
                    // See if it's an incremental format: +nD (days), +nH (hours), +nM(minutes)
                    } else if (exp.charAt(0) == '+') {
                            var incr = parseInt(exp.substring(1,exp.length-1));
                            var unit = exp.charAt(exp.length-1);
                            if ( 'DdHhMm'.indexOf(unit) < 0 ) {
                                    alert("CookieJar.setCookie: Invalid expiration date increment unit");
                                    return "";
                            }
                            if ( isNaN(incr) ) {
                                    alert("CookieJar.setCookie: Non-numeric expiration date increment");
                                    return "";
                            }
                            switch (unit.toUpperCase()) {
                                    case "D" : incr *= 24;
                                    case "H" : incr *= 60;
                                    case "M" : incr *= 60;
                                    default  : incr *= 1000;
                            }
                            expdt = new Date();
                            expdt.setTime(expdt.getTime()+incr);
                    // See if it's a date string in a format accepted by the 
                    // Date.parse method, such as "Dec. 25, 2001"
                    } else {
                            if ( isNan(Date.parse(exp)) ) {
                                    alert("CookieJar.setCookie: Invalid expiration date");
                                    return "";
                            }
                            expdt = new Date(exp);
                    }
                    // Got a valid expiration date, format and return the expires string
                    return ";expires="+expdt.toGMTString();
            } // getExpirationDate
    
            function testCookies() {
                    // Sets and gets a cookie to see if cookies are enabled
                    var exp = new Date();
                    exp.setTime(exp.getTime()+(60*1000));
                    document.cookie = "test=1;expires="+exp.toGMTString();
                    if ( document.cookie ) {
                            if ( document.cookie.indexOf('test=1') >= 0 ) {
                                    // Yup, they're enabled. Delete the test cookie
                                    exp.setFullYear(exp.getFullYear()-1);
                                    document.cookie = "test=;expires="+exp.toGMTString();
                                    return true;
                            }
                    }
                    return false;
            } // testCookies
    
            function CookieJarToString() {
                    this.refreshCookies();
                    var str = "CookieJar: ";
                    for ( x in this.cookies ) {
                            str += x+"="+this.cookies[x]+";";
                    }
                    return str;
            } // CookieJarToString
    
    //------------------------------------------------------------------------------
    // CookieJar Public Methods 
    //------------------------------------------------------------------------------
            
            function setCookie(cname,cval) {
                    var cexp = "";
                    if ( arguments.length > 2 ) {
                            cexp = getExpirationDate(arguments[2]);
                    }
                    var cdom = this.domain == "" ? "" : ";domain="+this.domain;
                    var cpath = this.path == "" ? "" : ";path="+this.path;
                    var csec = this.secure == false ? "" : ";SECURE";
                    document.cookie = cname+"="+escape(cval)+cexp+cdom+cpath+csec;
                    this.refreshCookies();
            } // setCookie
    
            function getCookie(cname) {
                    this.refreshCookies();
                    return this.cookies[cname];
            } // getCookie
    
            function deleteCookie(cname) {
                    var lastyear = new Date();
                    lastyear.setFullYear(lastyear.getFullYear()-1);
                    this.setCookie(cname,"",lastyear);
                    this.refreshCookies();
            } // deleteCookie
    
            function setDomain(domain) {
                    this.domain = domain;
            } // setDomain
    
            function setPath(path) {
                    this.path = path;
            } // setPath
    
            function setSecure() {
                    if ( arguments.length == 0 ) {
                            this.secure = true;
                    } else {
                            if ( typeof(arguments[0]) != "boolean" ) {
                                    alert("CookieJar.setSecure: Argument is not boolean");
                            } else {
                                    this.secure = arguments[0];
                            }
                    }
            } // setSecure
    
            function setUnsecure() {
                    if ( arguments.length == 0 ) {
                            this.secure = false;
                    } else {
                            if ( typeof(arguments[0]) != "boolean" ) {
                                    alert("CookieJar.setUnsecure: Argument is not boolean");
                            } else {
                                    this.secure = !arguments[0];
                            }
                    }
            } // setUnsecure
    
    }
    
    var CookieJar = new TDCookieJarObj();
    

  • wideimage-php-image-manipulation

    NOTE: starting with version 3.2 of the extensionRelated Thumbs Articles for Joomla, you can either selectTimThumb for Joomla orWideImage for Joomla for the creation of thumbnails.

    WideImage for Joomla is targeted for developer of Joomla! 3rd party extensions, don’t install it if not asked otherwise

    WideImage is an object-oriented library for image manipulation. It requires PHP 5.2+ with GD2 extension. The library provides a simple way to loading, manipulating and saving images in the most common image formats.

    The library does resizing, cropping, rotating, watermarking (full list is here http://wideimage.sourceforge.net/documentation/manipulating-images/), and it works well with transparent pngs and gifs.

    Currently the library is just the WideImage library, with the defined('_JEXEC'), index.html

    Usage

    Simple usage for Joomla 3rd party extensions developers:

    require_once(JPATH_SITE.DS.'libraries'.DS.'wideimage'.DS.'WideImage.php');
    WideImage::load($sourceImage)
    &160;&160;&160;&160;&160; ->resize($width, $height)->saveToFile($newImage);

    More examples and docs are on the WideImage site:
    http://wideimage.sourceforge.net/documentation/

    Installation

    • Joomla 1.6/1.7&160; install using the extension manager
    • Joomla! 1.5 install by unpacking the zip into your /library folder

    Download / Documentation / Support