Various String Functions in Java.

Posted by JDK | 11:59 PM | | 0 comments »

String Functions

These are some of the basic String Functions which we extensively use in Java.

1. compareTo(String anotherString)
Compares two strings lexicographically.

2. charAt(int index)
Returns the character at the specified index.

3. getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copies characters from this string into the destination character array.

4. length()
Returns the length of this string.

5. equals(Object anObject)
Compares this string to the specified object.

6. equalsIgnoreCase(String anotherString)
Compares this String to another String, ignoring case considerations.

7. toUpperCase()
Converts all of the characters in this String to upper case using the rules of the default locale.

7. toLowerCase()
Converts all of the characters in this String to upper case using the rules of the default locale.

9. concat(String str)
Concatenates the specified string to the end of this string.

10. indexOf(int ch)

Returns the index within this string of the first occurrence of the specified character.

11. indexOf(int ch, int fromIndex)

Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.

12. indexOf(String str)

Returns the index within this string of the first occurrence of the specified substring.

13. indexOf(String str, int fromIndex)

Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.

14. lastIndexOf(int ch)

Returns the index within this string of the last occurrence of the specified character.

15. lastIndexOf(int ch, int fromIndex)

Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.

16. lastIndexOf(String str)

Returns the index within this string of the rightmost occurrence of the specified substring.

17. lastIndexOf(String str, int fromIndex)

Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index.

18. substring(int beginIndex)

Returns a new string that is a substring of this string.

19. substring(int beginIndex, int endIndex)

Returns a new string that is a substring of this string.

20. replace(char oldChar, char newChar)

Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.

21. trim()

Returns a copy of the string, with leading and trailing whitespace omitted.

22. toString()

This object (which is already a string!) is itself returned.

Web Presentations Made Easy with 280 Slides

Create beautiful presentations, access them from anywhere, and share them with the world. With 280 Slides, there's no software to download and nothing to pay for – and when you're done building your presentation you can share it any way you like.


The Awesome features are:


  • Take it With you

    We store your presentations securely on our server so you can take them anywhere in the world where there's an Internet connection.

  • Download to Powerpoint

    With a single click you can download a copy of your presentation in the Microsoft PowerPoint 2007 format.

  • Built-in Media Search

    Add photos and movies to your presentation directly from popular web services like Flickr and YouTube.

  • Publish to Web

    Put your presentation on SlideShare, e-mail it to a friend, or embed it directly on your own website, all with just a few clicks.

  • Run in your Web Browser
    280 Slides runs right in the browser, with no download and no installation, and it works just like the desktop applications you're used to.



Watch out for this coool Presentation creator right away on your Web browser!!




Hi Guys,

In the Web World every body is trying to be on Top with their product with latest features such as RIA, Web 3.0 features with high quality and less development work.

Very recently we have seen Major changes in the Web world, Very big companies are in the competetion to prove their products to win the markets. The Recent Major successful tools we have seen are:

  • Adobe Flex

  • Microsoft Silver light

  • EXT JS

  • Prototype.js

  • YUI



Now another technology is coming in with the bang to all the other products. Nothing but JAVA FX. What James Gosling is saying..see below..

“Most scripting languages are oriented at banging out web pages.. This is oriented around interfaces that are highly animated.” —James Gosling, [1]

“There are parts of the world where a person's desktop computer is their cell phone, and that's the kind of end point that we're going to get to.” —James Gosling, [2]

It is a natural phenomenon to think about learning and adopting new technologies while there exists some well-established and popular ones, it is the scenario prevailing with the rich internet application (RIA) development landscape. There has been a constant demand for RIAs to provide interactive content applications and services that would run on a variety of clients with new features and capabilities. RIAs are basically the web applications that have the features and functionality of traditional desktop applications. They typically transfer the processing necessary for the user interface to the web client but keep the bulk of the data (i.e., maintaining the state of the program, the data etc) back on the application server.

To simplify and speed up the creation and deployment of high-impact content for a wide range of devices, Sun Microsystems announced JavaFX, a family of products based on Java technology to create Rich Internet applications (RIAs).


JavaFX: Sun’s New Product Family and Technologies

The Java revolution, which started more than a decade ago, gains even more momentum with the arrival of JavaFX. It is a new innovation targeting the billions of consumer devices and computers powered by Java technology.

JavaFX comprises a comprehensive set of runtime environments, widgets, development tools, and scripting environments. It aims to provide a consistent user experience across a wide variety of devices including desktops, (as applets and stand-alone clients) set-top boxes, mobile devices and Blu-Ray players.

Sun Microsystems, first announced JavaFX at the JavaOne developers conference in May 2007. The JavaFX products are intended to create Rich Internet applications (RIAs). Currently JavaFX consists of JavaFX Script and JavaFX Mobile (an OS for mobile devices), although further JavaFX products are planned. Sun plans to release JavaFX Script as an open source project, but JavaFX Mobile will be a commercial product available through an OEM license to carriers and handset manufacturers.


Now, JavaFX is going to compete with Adobe AIR and Microsoft's Silverlight technologies to occupy space in the current RIA market.

Hope this will happen and Rock the web world, once again Java will prove the its trendy features not only in business applications but also in Web Apps.

Hi Folks,

This is really very interesting and fun to learn Java from here.

From long ago i want to learn Java, i have done a course on it as well, but i didnt do much practice with the code and course was done finally. I know all java concepts but couldn't implement on my own. I Struggled a lot to find time to do practice again. It didn't happened.

Now i found a great way to learn Java. www.javapassion.com is providing free online training classes for the people who want to learn Java. This is really a good opportunity to learn Java and practice with thousands of people. You will be given with some home work and that will be validated at the end and you will be given an award of graduation and your name will be updated on the site as well.

You can learn all the Concepts of Java from Basic level to Advanced level. Now i have started the training and feeling very much comfortable. Common lets start with that Now.

Please find all the training material here in two formats

Step by Step HTML Approach
PDF Version

Basic Concepts in Core JAVA:

Getting started


Learning the basics of Java language

Classes and Objects

Object-Oriented Programming (OOP) concepts

Learning the advanced features of Java language

IDE

Collections framework

GUI programming

I/O & Networking & Database

Threading

J2SE 5.0 Features


With this information hope you all people learn Java and become Javaexperts.

Thanks to Sang shin to help Java Aspirants..

Please click google ads if you like this post.

Google Gears


There are several technologies coming in the Web world and creating a huge difference in the Web technology Market trends. Recently we have seen several new revolution software tools such as Javascript API's, FLEX, Silverlight, etc.. In the Same way, A new Innovative tech-idea from Google is Google Gears. Recently they have launched this tool, this will be very useful for web browsers as we can work offline with our websites having browser interacting with the local databases and with little bit Javascript running in the background.

Gears is an open source project that enables more powerful web applications, by adding new features to your web browser:

What was the Idea behind Gears?

What i thought was: Its just to bring forward the features of tomorrow’s web technologies into today’s browsers and make them more light weight and increase their Performance drastically.

Gears is a plug-in that extends your browser to create a richer platform for web applications. To install Gears, visit http://gears.google.com

Gears was designed to be used on both Google and non-Google sites. A number of web applications currently make use of Gears, including two Google products: Google Reader and Google Docs. Additionally, Zoho and Remember the Milk have been using Gears since its original launch. If you're running Windows Mobile on your cellphone, Picasa Web Albums also makes use of Gears.

Gears has basically 3 Modules:

They are :

1) Local Server

2) Database

3) Worker Pool

Local Server: Where as Local Server Cache and serve application resources (HTML, JavaScript, images, etc.) locally.

Database: Store data locally in a fully-searchable relational database

Worker Pool: Make your web applications more responsive by performing resource-intensive operations asynchronously.

This will a great news for Web developers. Now we can do what ever desktop related stuff.

Type of work we can do using Gears:

1) You can save the data in the local database and can access whenever you want.

2) Save information locally and access anytime.

3) Create Desktop Shortcuts, Can work very easily with Desktop Applications such as saving the settings at runtime etc..

If you're a developer interested in making your site available offline, we recommend visiting the Gears developer site for more information.

In the Recent Past google conducted some sessions on the Google Gears and other few technologies to discuss. Luckily they have all the videos recorded and posted in Youtube. So guys, Dont forget to watch the videos online. Watch here...

Key Points:

Google Gears Support WINDOWS, LINUX
Supports Mozilla Firefox 3.0

YSlow - An Add-on from Yahoo for FireBug

YSlow analyzes web pages and tells you why they're slow based on the rules for high performance web sites. YSlow is a Firefox add-on integrated with the popular Firebug web development tool. YSlow gives you:

  • Performance report card

  • HTTP/HTML summary

  • List of components in the page

  • Tools including JSLint

Performance View

YSlow analyzes any web page and generates a grade for each rule and an overall grade. If a page can be improved, YSlow lists the specific changes to be made.



Stats View

YSlow calculates the total size of the web page for both empty cache and primed cache scenarios, as well as information about cookies.



Components View

YSlow lists all the components in the page including their type, URL, Expires date, gzip status, load time, size, and ETag. You can also view the HTTP response headers for any component.




For more information on YSlow Visit: YSlow Docs & Help.

One more API into this Widget World - ASTRA

ASTRA - ActionScript Toolkit for Rich Applications

ASTRA, the ActionScript Toolkit for Rich Applications, is a collection of Flash and Flex components, code libraries, toolkits and utilities developed by Yahoo! for ActionScript developers. These libraries available under the terms of the open source BSD license.

Yahoo is offering Several ASTRA Components which can be directly customized for your work and are re-usable.

ASTRA Components we have in FLASH CS3

Yahoo! offers the ASTRA Flex components for use in your Adobe Flex 3 applications. These Flex components are designed to work like any other components for Flex with familiar properties, styles, and events. They're fully documented, and each component comes with multiple examples that demonstrate its various uses.
Download the Components and API.

We have several ASTRA Components available for FLEX 3 as well.

ASTRA Components for FLEX 3

Components:
Download FLEX Astra Components and API.

Hurray!!!!! Now we got lot of freedom in choosing domain names for our web sites. ICANN Has decided to introduce new methodology in domain name registration. now our domain name can be .india, .name, .mobile etc

NEW YORK: The Internet's key oversight agency relaxed rules Thursday to permit the introduction of hundreds, perhaps thousands, of new Internet domain names to join ".com," making the first sweeping changes in the network's 25-year-old address system.

The Internet Corporation for Assigned Names and Numbers unanimously approved the new guidelines as weeklong meetings in Paris concluded. ICANN also voted unanimously to open public comment on a separate proposal to permit addresses entirely in non-English languages for the first time.

New names won't start appearing until at least next year, and ICANN won't be deciding on specific ones quite yet. The organization still must work out many details, including fees for obtaining new names, expected to exceed $100,000 apiece to help ICANN cover up to $20 million in costs.

Domain names help computers find Web sites and route e-mail. Adding new suffixes can make it easier for Web sites to promote easy-to-remember names -- given that many of the best ones have been claimed already under ".com."

New names could cover locations such as ".nyc" and ".berlin" or industries such as ".bank." The hefty application fees could curb a rush for individual vanity names, though larger companies might claim brands like ".disney."

The new guidelines would make it easier for companies and groups to propose new suffixes. ICANN had accepted bids in 2000 and 2004, but reviews took much time, and one -- ".post" for postal services --remains pending more than four years later. Ultimately, only 13 have been approved in those two rounds.

The streamlined guidelines call for applicants to go through an initial review phase, during which anyone may raise an objection on such grounds as racism, trademark conflicts and similarity to an existing suffix. If no objection is raised, approval would come quickly.

Some ICANN board members expressed concerns that the guidelines could turn the organization into a censorship regime, deciding what could be objectionable to someone, somewhere in the world.

"If this is broadly implemented, this recommendation would allow for any government to effectively veto a string that makes it uncomfortable," said Susan Crawford, a Yale law professor on the board. She voted in favor of the rule changes, but called for more clarity later.

None of the new names is likely to dethrone ".com" as the world's leader, and critics fear new suffixes will merely force companies and organisations to spend more money registering names such as "microsoft.paris" simply so others can't. Legal battles are possible over common but trademarked names like ".apple."

The other proposal before ICANN would permit addresses entirely in non-English characters for the first time. Specific countries would be put on a "fast track" to receive the equivalent of their two-letter country code, such as Bulgaria's ".bg," in a native language.

The ICANN board said it would seek public comment on the guidelines before its next major meeting in November.

Demand for such names has been increasing around the world as Internet usage expands to people who cannot speak English or easily type English characters. Addresses partly in foreign languages are sometimes possible today, but the suffix has been limited to 37 characters: a-z, 0-9 and the hyphen.

In other action, ICANN approved recommendations designed to clamp down on domain name tasting -- the online equivalent of buying new clothes on a charge card only to return them for a full refund after wearing them to a big party.

A loophole in registration policies now allows entrepreneurs to grab domain names risk-free for up to five days to see whether they generate enough traffic and advertising dollars. That practice ties up millions of Internet addresses, making it even more difficult for individuals and businesses to find good names in the crowded ".com" space.

The new guidelines would withhold refunds if too many are returned.

Google has introduced a online network community called ORKUT long back. Lot of people started using that and started their own communities and now they are seeing lot of issues with the way the people are using that. Huge no. of Pornographic communicites have been created and distrubuted among thousands of people. Brazilian government asked google to took a stringent action on this.

Internet search company Google signed an agreement with Brazilian public prosecutors on Wednesday to help combat child pornography on its social networking site Orkut, an accord that the company believes is the first of its kind internationally.

Under the agreement, Google will use filters to remove and prevent illegal content on Orkut, which has about half its users in Brazil.

The company will also facilitate evidence gathering under judicial order in suspected crimes against children and teen-agers on Orkut without the need for international legal accords.

Google will also preserve for six months access logs of users being investigated for illegal conduct. Google said it was the first such agreement that the company had signed and the firm believes it is the first internationally.

Alexandre Hohagen, president of Google in Brazil, told a congressional committee, "It's an historic day not only for Brazil but for the Internet in the entire world." Initially, Google had refused to work with prosecutors, saying it was subject only to US laws, said Prosecutor Sergio Suiama.

The company denied this, saying it had always been willing to cooperate with Brazilian authorities.

Brazilian prosecutors say 90 per cent of illegal Internet content being investigated in Brazil involves Orkut. The site has 60 million users, half of them in Brazil. Of 624 investigations by federal prosecutors in Sao Paulo state through the end of last year into human rights crimes on the Internet, 420 involved child pornography on Orkut.

"Orkut was lawless," said Suiama. The accord was signed during a session of a congressional inquiry into pedophilia and follows legal battles since 2006. Under the deal, public prosecution withdrew a lawsuit against Google, a company spokesman said.

The committee, which under Brazilian law has some police and judicial powers, ordered the investigation of 18,000 Orkut photo albums accused of harboring child pornography. Google has more than a 60 per cent share of the Web search market, according to industry figures.

Download Photoshop CS3 Shorctus for MAC OS


Download Photoshop CS3 Shorctus for WINDOWS OS


Please Subscribe to this blog if you like this postings.



Flash is the most used Component on Web based pages to show the interactivity to the User and create the user experience, but till now we can't be able to search flash piece through for search engines. Now this can be possible as Adobe has come up with a way for the search engines to read SWF files and index all of the information they contain. That means any text or links in a Flash application can now be indexed. This is a huge step forward for Adobe and anyone who develops in Flash/Flex.

As anyone who has had the pleasure of doing web design and development through marketing agencies knows, Flash tends to be wildly popular among clients and wildly unpopular among, well, pretty much everyone else. Part of the reason for this is because Flash is so inherently un-Googleable; anything that goes into a Flash-only site is basically invisible to search engines and therefore, the world. That will no longer be the case, however, as Adobe announced today that it has teamed up with Google and Yahoo to make Flash files indexable by search engines.

This announcement has been a long time coming, as Flash developers have been wishing for ways to make their content searchable for close to a decade. Adobe acknowledges this in its announcement, saying that although search engines are able to index static text and links within Flash SWF files, "[Rich Internet Applications] and dynamic Web content have been generally difficult to fully expose to search engines because of their changing states—a problem also inherent in other RIA technologies." This announcement may also result in some major usability changes (for the better) for Flash on the web. In a post to its Webmaster Central Blog, Google wrote that it can now index all kinds of textual content in SWF files, like that included in Flash gadgets, buttons, menus, entirely self-contained Flash web sites, "and everything in between."

Google can now also follow URLs embedded within Flash files to add to the crawling pipeline. This new indexing technology does not, however, include FLV files (video files that are found on sites like YouTube) because those are generated as videos and don't contain any text elements like an SWF file does.

Google says it's able to do this by developing an algorithm that "explores Flash files in the same way that a person would," by clicking buttons and manually going through Flash content. "Our algorithm remembers all of the text that it encounters along the way, and that content is then available to be indexed," wrote the company. "We can't tell you all of the proprietary details, but we can tell you that the algorithm's effectiveness was improved by utilizing Adobe's new Searchable SWF library."

Of course, Google (and eventually Yahoo) won't be able to index everything embedded within a Flash file—at least not yet. Anything that is image-related, including text that is embedded into images, will be invisible to the search engines for the time being. Google also noted that it can't execute certain JavaScripts that may be embedded into a Flash file, and that while it indexes content that is contained in a separate HTML or XML file, it won't be counted as part of the content in the Flash file. These are all issues that are being worked on, however, and are likely to change in the future.

Yahoo is also working with Adobe to index SWF files, but doesn't appear to be as far along as Google just yet. One player that is noticeably missing is Microsoft, though. From Adobe's announcement and the language used by Google, it appears as if each search engine has to work with Adobe to make this possible—meaning that Microsoft has either been excluded by Adobe for this round or has decided to voluntarily sit this one out. Either way, with searchable SWF files down, usability experts can now focus all of their attention on other Flash-related concerns, like blatant design perversion and excessive animation abuse.

So in the coming future we can have more flexible searches with Flash pieces as well. Hope this will create a new revolution in the web world and provide more market shares for Google and Yahoo as well.

Post your comments. Subscribe to get latest info to your mails.

Hi Folks,

This is about a New Software Introduced by Microsoft. Which is called Sharepoint.

What is a Sharepoint? Features of Sharepoint? Ok, We will discuss below.

Office SharePoint Server 2007 helps organizations gain better control and insight over their content, streamline their business processes, and access and share information. In addition, Office SharePoint Server 2007 gives IT professionals the tools they need for server administration and application extensibility and interoperability. Office SharePoint Server 2007 helps you to:

Get more out of your information.

Streamline your business processes.

Simplify the way people work together.

Ease server administration, extensibility, and interoperability.

These benefits are further described in the Product Overview section of this guide. The Top 10 Benefits section highlights the most important ways Office SharePoint Server 2007 can help your organization make better use of its business information and processes.

Features at a Glance details the new and enhanced features for this release of Office SharePoint Server including:

Portal

Search

Content Management, including Document, Records, and Web Content

Business Processes

Business Intelligence

With this knowledge, you will be able to properly evaluate these new features and readily describe their capabilities to your colleagues, clients, and business partners.

An evaluation guide is also available for Microsoft Windows® SharePoint Services (version 3). However, solution developers, IT professionals, technical business decision makers, journalists, and analysts can read the Office SharePoint Server 2007 Evaluation Guide without referring to the Windows SharePoint Services Evaluation Guide.

Download Microsoft Sharepoint Guide for complete Information

Folks,

Thanks for your interest Here we will be explaining the Very Basic Starter of Flex Application. "Hello World!" Application. Follow the below steps to build this App.

//Note:- This Tutorial is based on FLEX 3.
Step 1: Open Flex Software and Create a New Project. File-> New Flex Project.

Step 2: Enter Project Name ex:- "Hello" and Click on Finish button.

Now you can see the hello.mxml with some XML code. This is nothing but basic code to initialize the application. You will have two views "Source View" and "Design View"

Step3: Click on the Source View and copy the below code and replace with the existing code.


// Save this as Greeter.as //

package
{
public class Greeter
{
public function sayHello():String
{
var greeting:String;
greeting = "Hello World!";
return greeting;
}
}
}

Step 4: save it as Greeter.as

Step 5: Overwrite the code from "Helloworld.mxml" in the below zip file into the Newly created page and drag and drop the Greeter.as file into the lib folder of the project.

Step6: Click on Run to see the Output.

Explanation:
-------------
1) In Greeter.as file we are just writing a class to initiate a variable called "greeting" and assigning some value "Hello World!" to it.

2) In the Helloworld.mxml code what we did is, we just created few basic components.
they are

2 text Labels just to write some intro text and 1 text area and we set the text area name to "maintxt" and in runtime we are calling "creationComplete = "initApp()" . This will call the function initApp() once it loads the Flex application. So the value in the variable will appear on the text area.

Conclusion:

Here we have worked with

1) How to create a simple class in Flex and initiate values to the variables
2) Calling simple functions in the MXML Application
3) How to use Text Labels, Text areas.

Hope you like the tutorial. Please download the Sources files for practice. Please send us your comments / questions to help you.

Download Source files

Flex Introduction

Posted by JDK | 10:53 AM | | 0 comments »

All though this is a late post on Flex Introduction, This Article has much importance and difference than the other ones.

I am a web developer working with various Softwares and i came to know about the Latest Software Flex from Adobe labs. I have studied completely about the origin of the Flex, Importance and all the features and did some applications as well.

Now Flex will be going to rule the Web World!! Don't You Believe this?? Yes You should!!

I have prepared a clear PPT on Flex Introduction. Flex Architecture and basic examples to start learning Flex. Please go through the PPT and start learning Flex.

In Future i will be writing more articles on Flex. Please send your comments/questions and get answers.

Click Here to Dowload PPT



Subscribe to this Blog to get Latest Updates to your Mail.

Domains:-

Why Domains are such important in the Internet World. What happens if the length of the domain is so long?


Don't have an idea which name to select?? Dont worry Listen to this Audio by Ben Hart.


An Excellent Speech by Ben Hart on Domains exclusively for Object-web users. Share this with your friends.



Please give your comments on this.....


Subscribe to get these posts directly to your mails