Answerslab

Answerslab
Question and Answers | Ask Question | Share Information| Know Answers

Sunday, April 10, 2011

TUTORIAL PHOTOSHOP METALLIC TUBES



1.Start with a new image, 250x250 pixels. Select a dark gray as the foreground color. Create a new layer, and with the Pen or Paintbrush tool, draw a wire shaped line on it, 15 pixels thick. 


Gradual curves look nice. This may take a few tries to get right.

Name the layer Wire.



2.Make a copy of Wire, by dragging it onto the New Layer button. Double click on the new layer, and rename it Cut Wire.


Hide the original layer Wire, by clicking on it's eye icon in the Layers window. We'll use that layer later on.

Now, grab the Eraser tool, set the brush size to about 5 pixels, and cut the line up.



3.Hold down Ctrl, and click on the hidden Wire layer in the Layers window.


This will create a selection out of the layer Wire's transparency
Next, go to the /b>Channels window, and click the Save selection as channel button.

Select the new Channel in the Channels window, then double click on it and rename it Wire Bevel.



4.Gaussian Blur the selection by 9 pixels, then by 6 pixels, then by 3 pixels, and finally 1pixel.


AutoLevels Ctrl+Shift+L, the selection.



Then, go back to the Layers window, hold down Ctrl and click on the Cut Wire layer to select it's transparency. Return to the Channels window, click on Wire Bevel, press D to reset colors, invert selection Ctrl+Shift+I, and finally clear the selection. Del
Deselect. Ctrl+D



5.Go back to the Layers window, and select the Cut Wire layer.


Filter > Render > Lighting Effects... 

Create a white Directional light, and aim it down, from the top. Then, create a blue directional light, shining up, from the bottom.




Set the Properties to:
Gloss: 100 (Shiny)
Material: -100 (Plastic)
Exposure: 39
Ambience: -21

Set the Texture Channel onto Wire Bevel, and the height to 15.
Now, tweak the positioning and direction of the lights to achieve the desired effect.



6.Now, click on the hidden Wire layer to expose it. Click on it again holding down Ctrl, to create the selection.


To make the line 1 pixel thinner, invert the selection Ctrl+Shift+I, go Select > Modify > Expand... 1 pixel, and clear the selection Del, and Deselect Ctrl+D.

Filter > Render > Lighting Effects... 

And set the Texture Channel to Wire Transparency.

Hit OK, add a dropshadow, and you're finished!

BLOOD EFFECT IN PHOTOSHOP


1. Create new file with 72 PPI and white background. The mode has to be Grayscale. Type the text with thick font. 




2. Select > Load Selection 

(Choose Layer Transparency)

3. Layer > Flatten Image

4. Select > Inverse 



5. Filter > Pixelate > Crystallize (cell size 4)

6. Select > Inverse



7. Noise > Add Noise 

(Guassian, Monochromatic, Amount. 70)




8. Blur > Guassian blur (Radius 2.0)



9. Image > Adjust > Curve 
(make the curve as shown in fig.)



10. Press Ctrl + D to deselect

11. Image > Adjust > Invert



12. Image > Rotate Canvas > 90 CW

13. Filter > Stylize > Wind 

14. Method : Wind Direction : From the Right



15. Image > Rotate Canvas > 90 CCW 

16. Image > Mode > RGB

17. Image > Adjust > Hue Saturation

18. Click Colorize

19. Drag the Saturation slider to 100

20. Drag the Lightness slider to -5

Designing a simple website banner with a logo using Photoshop


TEN STEPS TO DO WEB SITE BANNER

Simple step-by-step tutorial on how to create a web site banner and logo in Photoshop. The sample .psd and completed website are also included.
A banner or a header is a graphic that is found at the top of a web site which usually displays the company name and the logo. It is often the first thing a person sees when they open the website. The blending of colors should be attractive, informative, comfortable for the eye and help to convince the viewer to stay on your site.Let's start with our banner. Here we have a general banner and the colors used are soothing to the eyes. It can be used for a fashion and beauty banner or a personal or holiday banner as well.




Follow the below steps to create the above website banner :

Step 1 : Creating the banner size
Open a new file by clicking on File>Open. Make the file size width of 780px and height of 120px. You can go till 140px for the height. You can make a banner flexible according to your design.

Step 2: Giving the background color 
Create a new layer. Name it bgcolor. Give a background color by doing the following:
  • Change the foreground color to #E4D1B8.
  • Click on the  Paint Bucket Tool seen in the tools panel on the right.
  • Click on the canvas with your mouse. Your background color is now changed to the new color.
Step 3 : Giving the inside background color 
Create a new layer. Name it insidecolor. Select  Rectangular Marquee Tool seen in the tools panel on the right. Make the rectangle size width of 760px and height of 100px inside the background. Fill it with color # C64866 using the paint bucket tool.
Step 4 : Creating the logo background
Create a new layer. Name it logobkg. Select Rectangular Marquee Tool. Make the rectangle size width of 120px and height of 100px. Put the rectangle in the left side of the banner. Fill it with black color # 000000.
Step 5 : Creating a logo using the custom shape tool 
Create a new layer. Name it logo. Choose the  custom shape tool seen in the tools panel on the right. Click on the Shape drop down menu seen on the top toolbar. Click on the arrow and select Ornaments. Look for the ornament which is in the banner.
Drag it in the logo space and position it so it comes in the middle of the logo background. Now you have a temporary ornament as a logo which can be replaced with your company logo if needed.
Step 6 : Creating the vertical lines in the banner 
Create a new layer. Name it band. Select Rectangular Marquee Tool. Make the rectangle size width of 7px and height of 120px. Put the rectangle in the middle of the banner. Fill it with color # E8B0BD. Make four copies of the layer band.
To make a copy, right click on the layer and click on duplicate. A screen named Duplicate Layer will appear.


Enter name of the layer as band copy. Click on OK. Do the same with band copy2, band copy3, band copy4. Place the bands properly in the banner.
Step 8 : Creating the Logo Border 
Create a new layer. Name it border. Select Rectangular Marquee Tool. Make the rectangle size width of 20px and height of 100px. Fill it with color # A63D56. Put the rectangle on the right of the logo background. Make a copy and place the new rectangle on the left of the logo background.

Step 9 : Creating the dashed lines 
Now select the  Horizontal Type Tool (text tool). Type" _________" using the hyphen key. Place it on the top of the banner. Make a copy, right click on the layer and click on duplicate. Place it at the bottom of the banner.

Step 10 : Adding your Company Name
With the text tool  type your company name or website name with the color # FCF3E5.

Sunday, April 3, 2011

facebook


Facebook (stylized facebook) is a social networking service and website launched in February 2004, operated and privately owned by Facebook, Inc. As of January 2011, Facebook has more than 600 million active users. Users may create a personal profile, add other users as friends, and exchange messages, including automatic notifications when they update their profile. Additionally, users may join common interest user groups, organized by workplace, school or college, or other characteristics. The name of the service stems from the colloquial name for the book given to students at the start of the academic year by university administrations in the United States to help students get to know each other better. Facebook allows anyone who declares themselves to be at least 13 years old to become a registered user of the website.
Facebook was founded by Mark Zuckerberg with his college roommates and fellow computer science students Eduardo Saverin, Dustin Moskovitz and Chris Hughes The website's membership was initially limited by the founders to Harvard students, but was expanded to other colleges in the Boston area, the Ivy League, and Stanford University. It gradually added support for students at various other universities before opening to high school students, and, finally, to anyone aged 13 and over.
A January 2009 Compete.com study ranked Facebook as the most used social networking service by worldwide monthly active users, followed by MySpace Entertainment Weekly included the site on its end-of-the-decade "best-of" list, saying, "How on earth did we stalk our exes, remember our co-workers' birthdays, bug our friends, and play a rousing game of Scrabulous before Facebook?" Quantcast estimates Facebook has 135.1 million monthly unique U.S. visitors in October 2010. According to Social Media , in April 2010 an estimated 41.6% of the U.S. population had a Facebook account.

Friday, April 1, 2011

Rithin: Aquatic life forms

Rithin: Aquatic life forms: "Earth's surface waters are filled with life. The earliest life forms appeared in water; nearly all fish live exclusively in wate..."

Aquatic life forms



Earth's surface waters are filled with life. The earliest life forms appeared in water; nearly all fish live exclusively in water, and there are many types of marine mammals, such as dolphins and whales. Some kinds of animals, such as amphibians, spend portions of their lives in water and portions on land. Plants such as kelp and algae grow in the water and are the basis for some underwater ecosystems. Plankton is generally the foundation of the ocean food chain.

Aquatic vertebrates must obtain oxygen to survive, and they do so in various ways. Fish have gills instead of lungs, although some species of fish, such as the lungfish, have both. Marine mammals, such as dolphins, whales, otters, and seals need to surface periodically to breathe air. Some amphibians are able to absorb oxygen through their skin. Invertebrates exhibit a wide range of modifications to survive in poorly oxygenated waters including breathing tubes (see insect and mollusc siphons) and gills (Carcinus). However as invertebrate life evolved in an aquatic habitat most have little or no specialisation for respiration in water.



Aquatic plants  are plants that have adapted to living within aquatic environments. They are also referred to as hydrophytes or aquatic macrophytes. These plants require special adaptations for living submerged in water or at the water's surface. Aquatic plants can only grow in water or in soil that is permanently saturated with water. Aquatic vascular plants can be ferns or angiosperms (from a variety of families, including among the monocots and dicots). Seaweeds are not vascular plants but multicellular marine algae, and therefore not typically included in the category of aquatic plants. As opposed to plant types such as mesophytes and xerophytes, hydrophytes do not have a problem in retaining water, due to the abundance of water in their environment. This means that aquatic plants have less need to regulatetranspiration, which would require more energy and be of little benefit to the plant.
Characteristics of aquatic plants:
  • A thin cuticle. Cuticles primarily discourage water loss; thus most hydrophytes have no need for cuticles.
  • Stomata that are open most of time because water is abundant and therefore there is no need for it to be retained in the plant. This means that guard cells on the stomata are generally inactive.
  • An increased number of stomata, that can be on either side of leaves.
  • A less rigid structure: water pressure supports them.
  • Flat leaves on surface plants for flotation.
  • Air sacs for flotation.
  • Smaller roots: water can diffuse directly into leaves.
  • Feathery roots: no need to support the plant.
  • Specialized roots able to take in oxygen.
For example, some species of buttercup (genus Ranunculus) float slightly submerged in water; only the flowers extend above the water. Their leaves and roots are long and thin and almost hair-like; this helps spread the mass of the plant over a wide area, making it more buoyant. Long roots and thin leaves also provide a greater surface area for uptake of mineral solutes and oxygen.
Wide flat leaves in water lilies (family Nymphaeaceae) help distribute weight over a large area, thus helping them float near surface.
Many fish keepers keep aquatic plants in their tanks to control phytoplankton and moss by removing metabolites.
Many species of aquatic plant are invasive species. Aquatic plants make particularly good weeds because they reproduce vegetatively from fragments.


Wednesday, March 30, 2011

Adobe Flash


Adobe Flash (formerly Macromedia Flash) is a multimedia platform used to add animation, video, and interactivity to web pages. Flash is frequently used for advertisements and games. More recently, it has been positioned as a tool for "Rich Internet Applications" ("RIAs").
Flash manipulates vector and raster graphics to provide animation of text, drawings, and still images. It supports bidirectional streaming of audio and video, and it can capture user input via mouse, keyboard, microphone, and camera. Flash contains an object-oriented languagecalled ActionScript.
Flash content may be displayed on various computer systems and devices, using Adobe Flash Player, which is available free of charge for common web browsers, some mobile phones and a few other electronic devices (using Flash Lite).Some users feel that Flash enriches their web experience, while others find the extensive use of Flash animation, particularly in advertising, intrusive and annoying, giving rise to a cottage industry that specializes in blocking Flash content. Flash has also been criticized for adversely affecting the usability of web pages.

Software packages for production of two-dimensional animation include:

    This list is incomplete
Adobe Flash, Anime Studio , CTP Pro, Plastic Animation Paper, Toon Boom, TVPaint Synfig , Pivot.

Monday, March 21, 2011

JDBC


Getting Started with JDBC

1. Make the JDBC classes available to your Java program using:
import java.sql.*;
2. Load the driver for the database system using:
Class.forName( "<driverName>" );
3. Establish a connection to the database using :
Connection con= DriverManager.getConnection( "<url>,<user>,<password>" );

Now we have a connection object called con which we can use to create statements. There are 2 methods to create statements:
a) createStatement() returns a Statement object
b) prepareStatement(Q) where Q is a SQL query passed as a string argument, returns a preparedStatement object

There are 4 methods that execute SQL statements.
a) executeQuery(Q) takes a statement Q and is applied to a Statement object. This method returns a ResultSet object, which is the set of tuples produced by the query Q
b) executeQuery() is applied to a preparedStatement object. This method also returns a ResultSet object.
c) excuteUpdate(U) takes a nonquery statement U and, when applied to a statement object, executes U.
d) executeUpdate() is applied to a preparedStatement object. The SQL statement associated with the prepared statement is executed.

Examples

The method Class.forName(String) is used to load the JDBC driver class. The line below causes the JDBC driver from some jdbc vendor to be loaded into the application. (Some JVMs also require the class to be instantiated with .newInstance().)
Class.forName( "com.somejdbcvendor.TheirJdbcDriver" );
In JDBC 4.0, it's no longer necessary to explicitly load JDBC drivers using Class.forName(). See JDBC 4.0 Enhancements in Java SE 6.
When a Driver class is loaded, it creates an instance of itself and registers it with the DriverManager. This can be done by including the needed code in the driver class's static block. e.g. DriverManager.registerDriver(Driver driver)
Now when a connection is needed, one of the DriverManager.getConnection() methods is used to create a JDBC connection.
Connection conn = DriverManager.getConnection(
     "jdbc:somejdbcvendor:other data needed by some jdbc vendor",
     "myLogin",
     "myPassword" );
try {
     /* you use the connection here */
} finally {
    //It's important to close the connection when you are done with it
    try { conn.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
}
The URL used is dependent upon the particular JDBC driver. It will always begin with the "jdbc:" protocol, but the rest is up to the particular vendor. Once a connection is established, a statement must be created.
Statement stmt = conn.createStatement();
try {
    stmt.executeUpdate( "INSERT INTO MyTable( name ) VALUES ( 'my name' ) " );
} finally {
    //It's important to close the statement when you are done with it
    try { stmt.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
}
Note that Connections, Statements, and ResultSets often tie up operating system resources such as sockets or file descriptors. In the case of Connections to remote database servers, further resources are tied up on the server, e.g., cursors for currently open ResultSets. It is vital to close() any JDBC object as soon as it has played its part; garbage collection should not be relied upon. Forgetting to close() things properly results in spurious errors and misbehaviour. The above try-finally construct is a recommended code pattern to use with JDBC objects.
Data is retrieved from the database using a database query mechanism. The example below shows creating a statement and executing a query.
Statement stmt = conn.createStatement();
try {
    ResultSet rs = stmt.executeQuery( "SELECT * FROM MyTable" );
    try {
        while ( rs.next() ) {
            int numColumns = rs.getMetaData().getColumnCount();
            for ( int i = 1 ; i <= numColumns ; i++ ) {
               // Column numbers start at 1.
               // Also there are many methods on the result set to return
               //  the column as a particular type. Refer to the Sun documentation
               //  for the list of valid conversions.
               System.out.println( "COLUMN " + i + " = " + rs.getObject(i) );
            }
        }
    } finally {
        try { rs.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
    }
} finally {
    try { stmt.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
}
Typically, however, it would be rare for a seasoned Java programmer to code in such a fashion. The usual practice would be to abstract the database logic into an entirely different class and to pass preprocessed strings (perhaps derived themselves from a further abstracted class) containing SQL statements and the connection to the required methods. Abstracting the data model from the application code makes it more likely that changes to the application and data model can be made independently.
An example of a PreparedStatement query, using conn and class from first example.
PreparedStatement ps =
    conn.prepareStatement( "SELECT i.*, j.* FROM Omega i, Zappa j WHERE i.name = ? AND j.num = ?" );
try {
    // In the SQL statement being prepared, each question mark is a placeholder
    // that must be replaced with a value you provide through a "set" method invocation.
    // The following two method calls replace the two placeholders; the first is
    // replaced by a string value, and the second by an integer value.
    ps.setString(1, "Poor Yorick");
    ps.setInt(2, 8008);
 
    // The ResultSet, rs, conveys the result of executing the SQL statement.
    // Each time you call rs.next(), an internal row pointer, or cursor,
    // is advanced to the next row of the result.  The cursor initially is
    // positioned before the first row.
    ResultSet rs = ps.executeQuery();
    try {
        while ( rs.next() ) {
            int numColumns = rs.getMetaData().getColumnCount();
            for ( int i = 1 ; i <= numColumns ; i++ ) {
                // Column numbers start at 1.
                // Also there are many methods on the result set to return
                // the column as a particular type. Refer to the Sun documentation
                // for the list of valid conversions.
                System.out.println( "COLUMN " + i + " = " + rs.getObject(i) );
            } // for
        } // while
    } finally {
        try { rs.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
    }
} finally {
   try { ps.close(); } catch (Throwable ignore) { /* Propagate the original exception
instead of this one that you may want just logged */ }
} // try
If a database operation fails, JDBC raises an SQLException. There is typically very little one can do to recover from such an error, apart from logging it with as much detail as possible. It is recommended that the SQLException be translated into an application domain exception (an unchecked one) that eventually results in a transaction rollback and a notification to the user.
An example of a database transaction:
boolean autoCommitDefault = conn.getAutoCommit();
try {
    conn.setAutoCommit(false);
 
    /* You execute statements against conn here transactionally */
 
    conn.commit();
} catch (Throwable e) {
    try { conn.rollback(); } catch (Throwable ignore) {}
    throw e;
} finally {
    try { conn.setAutoCommit(autoCommitDefault); } catch (Throwable ignore) {}
}
Here are examples of host database types which Java can convert to with a function.
setXXX() Methods
Oracle DatatypesetXXX()
CHARsetString()
VARCHAR2setString()
NUMBERsetBigDecimal()
setBoolean()
setByte()
setShort()
setInt()
setLong()
setFloat()
setDouble()
INTEGERsetInt()
FLOATsetDouble()
CLOBsetClob()
BLOBsetBlob()
RAWsetBytes()
LONGRAWsetBytes()
DATEsetDate()
setTime()
setTimestamp()

Sunday, March 20, 2011

GREAT QUOTATIONS BY FREEDOM FIGHTER BHAGAT SINGH


"The aim of life is no more to control the mind, but to develop it harmoniously; not to achieve salvation here after, but to make the best use of it here below; and not to realise truth, beauty and good only in contemplation, but also in the actual experience of daily life; social progress depends not upon the ennoblement of the few but on the enrichment of democracy; universal brotherhood can be achieved only when there is an equality of opportunity - of opportunity in the social, political and individual life." — from Bhagat Singh's prison diary "Inquilab Zindabad" (Long live the revolution)

Saturday, March 19, 2011

LIFE


Life  is a characteristic that distinguishes objects that have signaling and self-sustaining processes (i. e., living organisms) from those that do not, either because such functions have ceased (death), or else because they lack such functions and are classified asinanimate Biology is the science concerned with the study of life.
Living organisms undergo metabolism, maintain homeostasis, possess a capacity to grow, respond to stimuli, The various levels of the scientific classification system.reproduce and, through natural selection, adapt to their environment in successive generations. More complex living organisms can communicate through various means. A diverse array of living organisms (life forms) can be found in the biosphere on Earth, and the properties common to these organisms—plants, animals, fungi, protists,archaea, and bacteria—are a carbon- and water-based cellular form with complex organization and heritable genetic information.
In philosophy and religion, the conception of life and its nature varies. Both offer interpretations as to how life relates to existence and consciousness, and both touch on many related issues, including life stance, purpose, conception of a god or gods, a soul or an after life.

love means


Love is an emotion of strong affection and personal attachment  In philosophical context, love is a virtue representing all of human kindness, compassion, and affection. Love is central to many religions, as in the Christian phrase, "God is love" or Agape in the Canonical gospels  Love may also be described as actions towards others (or oneself) based on compassion. Or as actions towards others based on affection.
In English, the word love can refer to a variety of different feelings, states, and attitudes, ranging from generic pleasure ("I loved that meal") to intense interpersonal attraction ("I love my partner"). "Love" can also refer specifically to the passionate desire and intimacy of romantic love, to the sexual love of eros (cf. Greek words for love), to the emotional closeness of familial love, or to the platonic love that defines friendship, to the profound oneness or devotion of religious love. This diversity of uses and meanings, combined with the complexity of the feelings involved, makes love unusually difficult to consistently define, even compared to other emotional states.
Love in its various forms acts as a major facilitator of interpersonal relationships and, owing to its central psychological importance, is one of the most common themes in the creative arts.
Science defines what could be understood as love as an evolved state of the survival instinct, primarily used to keep human beings together against menaces and to facilitate the continuation of the species through reproduction

Home Video Editing


Like many other technologies, the cost of video editing has declined by an order of magnitude or more. The 2" Quadraplex system cost so much that many television production facilities could only afford a single unit and editing was a highly involved process requiring special training. In contrast, nearly any home computer sold since the year 2000 has the speed and storage capacity to digitize and edit standard definition video. The two major retail operating systems include basic video editing software - Apple's iMovie and Microsoft's Windows Movie Maker.
There are also more advanced commercial products such as AVS Video Editor, CyberLink Power Director, Adobe Premiere Elements, AVID Express DV, CyberLink PowerDirector, Final Cut Express, Sony Vegas, Pinnacle Studio, Ulead VideoStudio, Roxio Easy Media Creator, and muvee autoProducer.
Additionally, there are free opensource video-editing programs. These include Kdenlive, PiTiVi, Kino, Openshot and Cinelerra.

Video editing


Video editing is the process of editing segments of motion video footage, special effects and sound recordings. Motion picture film editing is a predecessor to video editing and, in several ways, video editing simulates motion picture film editing, in theory and the use of non-linear and linear editing systems. Using video or film, a director can communicate non-fictional and fictional events. The goals of editing is to manipulate these events for better or for worse communication. It is a visual art.

Early video recorders were so expensive, and the quality degradation caused by copying was so great, that 2 inch Quadruplex videotape was edited by visualizing the recorded track with ferrofluid and cutting with a razor blade or guillotine cutter and splicing with tape. Improvements in quality and economy, and the invention of the flying erase head, allowed new video and audio material to be recorded over the material already recorded on an existing tape. This technique was referred to as linear editing. If a scene closer to the beginning of the videotape needed to be changed in length, all later scenes would need to be recorded onto the tape again. In addition, sources could be played back simultaneously through a vision mixer to create more complex transitions between scenes.

There was a transitional analog period using multiple source VCRs or LaserDisc players, but modern non-linear editing systems use video digitally captured onto a hard drive from an analog or digital video source. Content is ingested and recorded natively in the appropriate codec which will be used by software such as Sony Vegas, CyberLink Power Director, Avid's Media Composer and Xpress Pro, Apple's Final Cut Pro, and Adobe's Premiere to manipulate the captured footage. High definition video is becoming more popular and can be readily edited using the same software along with related motion graphics programs. Clips are arranged on a timeline, music tracks and titles are added, effects can be created, and the finished program is "rendered" into a finished video. The video may then be distributed in a variety of ways including DVD, web streaming, Quicktime Movies, iPod, CD-ROM, or videotape.