Those are your contributions to Social Security (OASDI) and Medicare (MED). The MED figure should be 1.45% of your gross pay (but remember to deduct anything taken out of your pay for your employers health plan). The OASDI figure will be 6.2% of the same figure unless you are earning more than about $90,000 per year. you should ensure these are deducted each paycheck. If they are not you will get fewer benefits than you anticipated when you retire.
http://answers.yahoo.com/question/index?qid=20061016115741AArhlLz
Monday, January 30, 2012
Thursday, January 26, 2012
How do I implement a Linked List in Java?
The obvious solution to developers familiar to Java is to use the LinkedList class already provided in java.util.
Say, however, you wanted to make your own implementation for some
reason. Here is a quick example of a linked list that inserts a new link
at the beginning of the list, deletes from the beginning of the list
and loops through the list to print the links contained in it. Enhancements to this implementation include making it a double-linked list, adding methods to insert and delete from the middle or end, and by adding get and sort methods as well.
Note: In the example, the Link object doesn't actually contain another Link object - nextLink is actually only a reference to another link.
http://stackoverflow.com/questions/10042/how-do-i-implement-a-linked-list-in-java
Note: In the example, the Link object doesn't actually contain another Link object - nextLink is actually only a reference to another link.
http://stackoverflow.com/questions/10042/how-do-i-implement-a-linked-list-in-java
Friday, January 13, 2012
Mojarra JavaServer™ Faces JSF 2.0 from Sun
What is JavaServer™ Faces (JSF)?
>JSF is the Java™ EE and de-facto standard web framework that hides complexity to maximize
developer productivity. JSF provides a component model, page templating, Ajax support, client device
independence, and world-class IDE integration from every available Java IDE.
>There is a vibrant market for high quality third party extensions such as components, including ADF
Faces, Trinidad, ICEFaces, RichFaces, NetAdvantage, JViews, and many others
>Easy Integration with popular enterprise technologies, including Hibernate, Spring, Seam, Jasper
Reports and more.
>JSF 2.0 is compatible with JavaEE 5 application servers, or any server implementing Servlet 2.5.
>The JSF 2.0 standard was finalized in May 2009 and will be included in JavaEE 6, and in all
application servers that meet the JavaEE 6 standard, including Glassfish V3, available in a preview
release for JavaOne 2009.
>JSF is very widely used in production. A selection of users taken from the public Wiki page, at
. includes: Credit Suisse, Federal Express,
Deutsche Bank, Apple Computer Inc., Garmin, RiteAid, BigLOTS!, Virgin online, and more.
What is Mojarra?
>Mojarra is Sun's high performance, battle-tested implementation of JSF, and is used in IBM
WebSphere™, Oracle WebLogic™, Oracle 10g Application Server, SpringSource dm Server™, and
other popular enterprise platforms.
>Like all of Java, Mojarra is open source, dual licensed with GPL+Classpath Exception and CDDL.
>Mojarra was the first JSF runtime to support Groovy, and does so for all of JSF
Why should you use JSF 2.0?
>Built in templating with Facelets
>Full support for Ajax, as easy as adding one tag
>Easy component creation, as easy as building a Facelets page
>OO component model maximizes maintainability
>Great support for building internationalized and accessible applications
>“Pay as you go” complexity tax: features you don't need don't get in the way
>Highly secure, with built in protection from cross site scripting, CSRF, and other kinds of attacks
>Java EE standard guarantees the safety of your IT investment
>Comes with every Application Server, giving you a large pool of developer talent, training, and books in
many languages.
Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Phone 1-650-960-1300 or 1-800-555-9SUN Web sun.com
©2009 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, Java, Glassfish, JavaOne, and NetBeans are trademarks or
Registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All other terms are the property of their respective trademark owners.
Information subject to change without notice.
http://javaserverfaces.java.net/presentations/20090520-jsf2-datasheet.pdf
>JSF is the Java™ EE and de-facto standard web framework that hides complexity to maximize
developer productivity. JSF provides a component model, page templating, Ajax support, client device
independence, and world-class IDE integration from every available Java IDE.
>There is a vibrant market for high quality third party extensions such as components, including ADF
Faces, Trinidad, ICEFaces, RichFaces, NetAdvantage, JViews, and many others
>Easy Integration with popular enterprise technologies, including Hibernate, Spring, Seam, Jasper
Reports and more.
>JSF 2.0 is compatible with JavaEE 5 application servers, or any server implementing Servlet 2.5.
>The JSF 2.0 standard was finalized in May 2009 and will be included in JavaEE 6, and in all
application servers that meet the JavaEE 6 standard, including Glassfish V3, available in a preview
release for JavaOne 2009.
>JSF is very widely used in production. A selection of users taken from the public Wiki page, at
Deutsche Bank, Apple Computer Inc., Garmin, RiteAid, BigLOTS!, Virgin online, and more.
What is Mojarra?
>Mojarra is Sun's high performance, battle-tested implementation of JSF, and is used in IBM
WebSphere™, Oracle WebLogic™, Oracle 10g Application Server, SpringSource dm Server™, and
other popular enterprise platforms.
>Like all of Java, Mojarra is open source, dual licensed with GPL+Classpath Exception and CDDL.
>Mojarra was the first JSF runtime to support Groovy, and does so for all of JSF
Why should you use JSF 2.0?
>Built in templating with Facelets
>Full support for Ajax, as easy as adding one tag
>Easy component creation, as easy as building a Facelets page
>OO component model maximizes maintainability
>Great support for building internationalized and accessible applications
>“Pay as you go” complexity tax: features you don't need don't get in the way
>Highly secure, with built in protection from cross site scripting, CSRF, and other kinds of attacks
>Java EE standard guarantees the safety of your IT investment
>Comes with every Application Server, giving you a large pool of developer talent, training, and books in
many languages.
Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Phone 1-650-960-1300 or 1-800-555-9SUN Web sun.com
©2009 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, Java, Glassfish, JavaOne, and NetBeans are trademarks or
Registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All other terms are the property of their respective trademark owners.
Information subject to change without notice.
http://javaserverfaces.java.net/presentations/20090520-jsf2-datasheet.pdf
Thursday, January 12, 2012
Resources and tutorials to get started on algorithms
MIT has a course on algorithms in their Open Courseware Program with video, audio and PDF lectures.
There is also an online course, also with video lectures, at ArsDigita University.
At University of Florida there is the course Data Structures and Algorithms in Java, and just as the above it has video lectures available online.
At freescienceonline.blogspot.com you can find a whole lot of video lectures on algorithms, as well as a lot of other interesting videos.
http://stackoverflow.com/questions/366418/resources-and-tutorials-to-get-started-on-algorithms
There is also an online course, also with video lectures, at ArsDigita University.
At University of Florida there is the course Data Structures and Algorithms in Java, and just as the above it has video lectures available online.
At freescienceonline.blogspot.com you can find a whole lot of video lectures on algorithms, as well as a lot of other interesting videos.
http://stackoverflow.com/questions/366418/resources-and-tutorials-to-get-started-on-algorithms
What is the difference between JSF, Servlet and JSP?
JSP (JavaServer Pages)
JSP is a Java view technology running on the server machine which allows you to write template text in (the client side languages like HTML, CSS, JavaScript and so on). JSP supports the so-called taglibs which are backed by pieces of Java code with which you can control the page flow and/or output dynamically (programmatically). A well known taglib is JSTL. JSP also supports Expression Language which can be used to access backend data (actually, the attributes which are available in page, request, session and application scopes), mostly in combination with taglibs.When a JSP is requested for the first time or when the webapp starts up, the servlet container will compile it into a class extending
HttpServlet
and use it during the webapp's lifetime. You can find the generated source code in the server's work directory. In for example Tomcat, it's the /work
directory. On a JSP request, the servletcontainer will execute the
compiled JSP class and send the generated output (usually just
HTML/CSS/JS) through the webserver over network to the client side which
in turn displays it in the webbrowser.Servlets
Servlet is an Java application programming interface (API) running on the server machine which can intercept on the requests made by the client and can generate/send a response accordingly. A well known example is theHttpServlet
which provides methods to hook on HTTP requests using the popular HTTP methods such as GET
and POST
. You can configure HttpServlet
s to listen on a certain HTTP URL pattern, which is configureable in web.xml
, or more recently with Java EE 6, with @WebServlet
annotation.When a Servlet is requested for the first time or when the webapp starts up, the servlet container will create an instance of it and keep it in memory during webapp's lifetime. The same instance will be reused for every incoming request whose URL matches the servlet's URL pattern. You can access the request data by
HttpServletRequest
and handle the response by HttpServletResponse
. Both objects are available as method arguments inside any of the overridden methods of HttpServlet
, such as doGet()
and doPost()
.JSF (JavaServer Faces)
JSF is a component based MVC framework which is built on top of the Servlet API and provides components in flavor of taglibs which can be used in JSP or any other Java based view technology such as Facelets. Facelets is much more suited to JSF than JSP. It namely provides great templating capabilities such as composite components, while JSP basically only offers the
for templating, so that you're forced to create custom components
with raw Java code (which is a bit opaque and a lot of tedious work in
JSF) when you want to replace a repeated group of components by a single
component. If you can, I recommend to drop JSP and go for Facelets when
you want to develop with JSF. As being a MVC (Model-View-Controller) framework, JSF provides the
FacesServlet
as the sole request-response Controller.
It takes all the standard and tedious HTTP request/response work from
your hands, such as gathering user input, validating/converting them,
putting them in model objects, invoking actions and rendering the
response. This way you end up with basically a JSP or Facelets (XHTML)
page for View and a Javabean class as Model. The JSF components are been used to bind the view with the model (such as your ASP.NET web control does) and the FacesServlet
uses the JSF component tree to do all the work.http://stackoverflow.com/questions/2095397/what-is-the-difference-between-jsf-servlet-and-jsp
Wednesday, January 11, 2012
What does the servlet value of 0 (zero) signify?
Short Answer: value >= 0 means that the servlet is loaded when the web-app is deployed or when the server starts.
value < 0 : servlet is loaded whenever the container feels like.
Long answer (from the spec):
http://stackoverflow.com/questions/809775/what-does-the-servlet-load-on-startup-value-of-0-zero-signify
Long answer (from the spec):
The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. If the value is a positive 128 integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value.
http://stackoverflow.com/questions/809775/what-does-the-servlet-load-on-startup-value-of-0-zero-signify
Wednesday, January 4, 2012
Tuesday, January 3, 2012
How can I define multiple sessionfactory instances in Spring?
You might define an abstract bean and use bean inheritance. This means you'll have a bean definition that works as a template and you may have multiple beans just copying the attributes set by the parent bean.
Here's an example:
Using the attribute 'abstract' you ensure that bean won't be instantiated and it will be used just as a template.
More info here: link text
http://stackoverflow.com/questions/794496/how-can-i-define-multiple-sessionfactory-instances-in-spring
http://stackoverflow.com/questions/794496/how-can-i-define-multiple-sessionfactory-instances-in-spring
How Do You Control WebSphere Application Server?
All application servers have an Admin Service. The Admin Service
does just what the name implies. In most application servers, the admin
service does a really good job of system administration for one
application server. When you try to run five or ten application servers
in parallel, things get flakey. WebSphere Application Server is really
a network of servers connected by a network of management. This is
what IBM means by "network deployment" or the initials ND. At any
moment, some servers will be running, some servers will be stopped, and
some servers will be in some in between state. Large, distributed
networks are like that. If the network is large enough -- we are
talking tens of thousands of computers spread across several continents
-- just knowing what is running on any given part of your network
becomes a chore. The admin service for WebSphere Application Server is
meant to control everything in an extended network of thousands of
servers. It is possible to control a network that large from one laptop
computer located anywhere in the world. Everything means
IBM goes to great lengths to separate the actual code that executes from the settings that configure and control how that code behaves. Anything information that influences the way WebSphere Application Server behaves is isolated in something that IBM calls a profile. There is one profile for every node in the network of servers that we call WebSphere Application Server. Every time you create a profile, you have created a node. That node and the servers it contains might stand alone or it might be part of a collection of nodes that IBM calls a cell.
A node contains a collection of application servers and web servers that all happen to live on the same physical computer. One physical computer can contain many nodes as long as it has enough memory and enough CPU to power all the servers in all the nodes it contains. Every server in a node is guaranteed to live on the same physical computer.
An application server in the network of servers and services that we call WebSphere Application Server is Java Enterprise Edition platform code running on a Java Virtual Machine. That code produces dynamic content. This article describes how WebSphere Application Server produces dynamic content. Each application server has its own separate Java Virtual Machine. Sometimes, application servers are just called servers. Notice that any one application server is just a very small part of the product we call WebSphere Application Server. In the competing products, that application server is the entire product. Notice the difference in scale
A web server is a computer program that serves up static content. Sometimes, web servers are just called servers.
A cell is a collection on nodes. All the nodes could be on the same physical computer, but more likely, they will be on a network of physical computers
Configuration determines how all the application servers, web servers, message queues, and various internal services of WebSphere Application Server come to life. The configuration information that system administrators are allowed to modify is stored in a collection of XML files and properties files in the config directory of a profile.
XML files and properties files in the config directory of a profile define how the various servers and services in a node come to life. But those configuration files only get read once. They get read when a server or service is initializing. The moment initialization is complete, the XML files and the properties files are ignored. The only way to get a server to pay attention to changes you make in an XML file or a properties file is to stop the server and then start it again.
A network of JMX beans called MBeans control the way the network servers and services behave once they are running. Those same JMX beans also monitor the behavior of the servers and services while they execute.
Two kinds of specialized application servers enable us to configure, control, and monitor the behavior of the distributed network of servers and services that IBM calls WebSphere Application Server
A deployment manager is an application server that runs exactly one application -- an application that manages the configuration and behavior of an entire cell. There is only one deployment manager in any cell. The deployment manager holds the official configuration records for every server and service in the entire distributed network that is part of a cell. When a deployment manager orders a node agent to change the configuration of its servers and services to match this master record, we say the deployment manager has performed a synchronization. Deployment managers only talk to node agents
A node agent controls, configures and monitors all the servers and services in a node. Node agents talk to a deployment manager and node agents talk to the servers in their node. They relay administrative traffic from the deployment manager to the individual servers in their node. They relay status from the servers in their node to the deployment manager.
MBeans do several things
Once you know what you are doing, wsadmin becomes more attractive than the admin console for many administrative tasks. For one thing, the script language of wsadmin allows you to automate tasks. Once your network reaches a certain size, the admin console becomes a source of errors because of the large number of mouse clicks you must make and the amount of text entry you must provide. Again, the script language provides ways to automate tasks
The most powerful way to control the network of servers and services we call WebSphere Application Server is to write a JMX client. JMX clients have complete unfettered access to the entire admin service and everything that happens across the entire network.
http://www.edu4eng.com/articles/WAS/overview/control.html
- configuration -- the way the internal parts of WebSphere Application Server come to life when we start them
- control -- the way those internal parts behave after we start them
- monitoring -- reports and alerts we get
IBM goes to great lengths to separate the actual code that executes from the settings that configure and control how that code behaves. Anything information that influences the way WebSphere Application Server behaves is isolated in something that IBM calls a profile. There is one profile for every node in the network of servers that we call WebSphere Application Server. Every time you create a profile, you have created a node. That node and the servers it contains might stand alone or it might be part of a collection of nodes that IBM calls a cell.
A node contains a collection of application servers and web servers that all happen to live on the same physical computer. One physical computer can contain many nodes as long as it has enough memory and enough CPU to power all the servers in all the nodes it contains. Every server in a node is guaranteed to live on the same physical computer.
An application server in the network of servers and services that we call WebSphere Application Server is Java Enterprise Edition platform code running on a Java Virtual Machine. That code produces dynamic content. This article describes how WebSphere Application Server produces dynamic content. Each application server has its own separate Java Virtual Machine. Sometimes, application servers are just called servers. Notice that any one application server is just a very small part of the product we call WebSphere Application Server. In the competing products, that application server is the entire product. Notice the difference in scale
A web server is a computer program that serves up static content. Sometimes, web servers are just called servers.
A cell is a collection on nodes. All the nodes could be on the same physical computer, but more likely, they will be on a network of physical computers
Configuration determines how all the application servers, web servers, message queues, and various internal services of WebSphere Application Server come to life. The configuration information that system administrators are allowed to modify is stored in a collection of XML files and properties files in the config directory of a profile.
XML files and properties files in the config directory of a profile define how the various servers and services in a node come to life. But those configuration files only get read once. They get read when a server or service is initializing. The moment initialization is complete, the XML files and the properties files are ignored. The only way to get a server to pay attention to changes you make in an XML file or a properties file is to stop the server and then start it again.
A network of JMX beans called MBeans control the way the network servers and services behave once they are running. Those same JMX beans also monitor the behavior of the servers and services while they execute.
Two kinds of specialized application servers enable us to configure, control, and monitor the behavior of the distributed network of servers and services that IBM calls WebSphere Application Server
A deployment manager is an application server that runs exactly one application -- an application that manages the configuration and behavior of an entire cell. There is only one deployment manager in any cell. The deployment manager holds the official configuration records for every server and service in the entire distributed network that is part of a cell. When a deployment manager orders a node agent to change the configuration of its servers and services to match this master record, we say the deployment manager has performed a synchronization. Deployment managers only talk to node agents
A node agent controls, configures and monitors all the servers and services in a node. Node agents talk to a deployment manager and node agents talk to the servers in their node. They relay administrative traffic from the deployment manager to the individual servers in their node. They relay status from the servers in their node to the deployment manager.
MBeans do several things
- They simple pieces of Java code that can represent an application, a service, a server, or almost anything else in your enterprise.
- They can report the status of anything in the enterprise
- They can generate alerts concerning anything in the enterprise
- They can be created automatically by WebSphere Application Server on behalf of anything installed in a cell
- a web browser based graphic user interface called the admin console
- a command line shell called wsadmin. This shell has a very powerful scripting language
- any JMX clients that you might choose to write
Once you know what you are doing, wsadmin becomes more attractive than the admin console for many administrative tasks. For one thing, the script language of wsadmin allows you to automate tasks. Once your network reaches a certain size, the admin console becomes a source of errors because of the large number of mouse clicks you must make and the amount of text entry you must provide. Again, the script language provides ways to automate tasks
The most powerful way to control the network of servers and services we call WebSphere Application Server is to write a JMX client. JMX clients have complete unfettered access to the entire admin service and everything that happens across the entire network.
http://www.edu4eng.com/articles/WAS/overview/control.html
Subscribe to:
Posts (Atom)