Showing posts with label Java Script. Show all posts
Showing posts with label Java Script. Show all posts

Friday, 1 April 2011

Printing to the Output Window


You can run the code you have so far, and turn it into a programme. It doesn't do anything, but it will still compile. So let's add one line of code just so that we can see how it works.
We'll output some text to a console window. Add the following line to your main method:
public static void main( String[ ] args ) {
System.out.println( "My First Project" );
}
When you type the full stop after "System", NetBeans will try to help you by displaying a list of available options:
The Java System Options
Double click out to add it to your code, then type another full stop. Again, the list of options appears:
The Java Output Options
Select println( ). What this does is to print a line of text to the output screen. But you need to place your text between the round brackets of println. Your text needs to go between a pair of double quotes:
Println double quotes
Once you have your double quotes in place, type your text:
Text added in double quotes
Notice that the line ends in a semicolon. Each complete line of code in Java needs a semicolon at the end. Miss it out and the programme won't compile.
OK, we can now go ahead and test this programme out. First, though, save your work. You can click File > Save, or File > Save All. Or click the Save icon on the NetBeans toolbar.
To end this section, click below to learn how to share your Java programmes with others.

Monday, 25 October 2010

Design Web with Jomla

What is Joomla?

Joomla is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone.
 

What's a content management system (CMS)?

A content management system is software that keeps track of every piece of content on your Web site, much like your local public library keeps track of books and stores them. Content can be simple text, photos, music, video, documents, or just about anything you can think of. A major advantage of using a CMS is that it requires almost no technical skill or knowledge to manage. Since the CMS manages all your content, you don't have to.
 

What are some real world examples of what Joomla! can do?

Joomla is used all over the world to power Web sites of all shapes and sizes. For example:
  • Corporate Web sites or portals
  • Corporate intranets and extranets
  • Online magazines, newspapers, and publications
  • E-commerce and online reservations
  • Government applications
  • Small business Web sites
  • Non-profit and organizational Web sites
  • Community-based portals
  • School and church Web sites
  • Personal or family homepages
 

Who uses Joomla?

MTV QuizillaHere are just a few examples of Web sites that use Joomla:
More examples of companies using Joomla can be found in the Joomla Community Site Showcase.
 

I need to build a site for a client. How will Joomla! help me?

Simple Admin interfaceJoomla is designed to be easy to install and set up even if you're not an advanced user. Many Web hosting services offer a single-click install, getting your new site up and running in just a few minutes.
Since Joomla is so easy to use, as a Web designer or developer, you can quickly build sites for your clients. Then, with a minimal amount of instruction, you can empower your clients to easily manage their own sites themselves.
If your clients need specialized functionality, Joomla is highly extensible and thousands of extensions (most for free under the GPL license) are available in the Joomla Extensions Directory.
 

How can I be sure there will be Joomla! support in the future?

Winner - Best CMSJoomla is the most popular open source CMS currently available as evidenced by a vibrant and growing community of friendly users and talented developers. Joomla's roots go back to 2000 and, with over 200,000 community users and contributors, the future looks bright for the award-winning Joomla Project.
 

I'm a developer. What are some advanced ways I can use Joomla?

MVC DiagramMany companies and organizations have requirements that go beyond what is available in the basic Joomla package. In those cases, Joomla's powerful application framework makes it easy for developers to create sophisticated add-ons that extend the power of Joomla into virtually unlimited directions.
The core Joomla framework enables developers to quickly and easily build:
  • Inventory control systems
  • Data reporting tools
  • Application bridges
  • Custom product catalogs
  • Integrated e-commerce systems
  • Complex business directories
  • Reservation systems
  • Communication tools
Since Joomla is based on PHP and MySQL, you're building powerful applications on an open platform anyone can use, share, and support. To find out more information on leveraging the Joomla framework, visit the Joomla Developer Network.

Thursday, 7 October 2010

Add some xfbml content

Add some xfbml content

Now it's time to add some xfbml content. This should be inserted as raw html code wherever you want it to appear in your page. A couple of examples are shown below.

Like button

urlofwebpage">

Replace the url of webpage as appropriate

Comments

unique_id">

Note that the unique_id should be unique for each separate comment thread you want.

You can find more social plugins on the Facebook developers social plugins page

You then need to repeat for any other pages that you want to add these features to.

Adding to Wordpress Template

Adding to Wordpress Template

In Wordpress you need to make the same changes as above, but these need to go into the Wordpress templates. You can also add a small amount of wordpress php code to ensure that each blog entry has it's own comment field.

This is all done in the theme for the site, and as such will be propagated across all relevant posts / pages depending upon which you update. You may want to create your own theme and edit that rather than the original, but you can just edit the original.

From the administration dashboard go to "Appearance" and "Editor", then choose the appropriate theme.

You then need to select the appropriate template file.

header.php (Header)
The xmlns tag should be entered within this template file.

footer.php (Footer)
You should insert the JavaScript code for the bottom of the page in this file.

single.php (Single Post) and/or page.php (Page Template)
These template files are used for blog posts and wordpress pages respectively. Update either or both of these depending upon which pages you would like to add your Facebook plugin to.

To include the individual post ID (eg. for the comment unique code) then add:

For example in my single.php file I have inserted the following just before the wordpress comments section:

"> ?>

Adding the Facebook JavaScript SDK to your site

Adding the Facebook JavaScript SDK to your site

To add this functionality you will need to update your web page html code. This will depend upon how you create your web pages as to how you add this. If you are using Dreamweaver you should switch to the code view; using Wordpress see later in this post; using a template based system you will need to edit the templates through a template editor; any other system you need to look for a source code edit feature.

Now start at the top of the page and look for an entity starting and add xmlns:fb="http://www.facebook.com/2008/fbml" at the end of the entity (before the closing angle bracket >). If you don't have an xmlns tag then create one as follows:

xmlns:fb="http://www.facebook.com/2008/fbml">

Now go down to the very bottom of the page and insert the following just before the tag: You will need to change the appID to the one provided when you register your application. Note you could instead copy and paste this section of code directly from the example that Facebook provides when you register.



Adding Facebook Social Plug in

I've used the Facebook Connect social plugins to provide a comments feature to my website blogs (see: Blog comments using Facebook connect social plugins).

The reason I added this was because of the way that I create my blog. I use Wordpress as my blog engine running on my WatkissOnline web server, but then depending upon the category, some of the posts are exported to the First Aid Quiz (Health, Safety and First Aid related) website and some to the PenguinTutor.com (Linux, computer and technology related) website. This works well except for one feature, the comments are not available except on the main Wordpress site. Technically it would be possible to show the comments and even to create a proxy system to submit comments, but this would need a significant amount of time to develop properly. So I looked at what other options were available and came across Facebook Connect. This provides a number of facebook social networking features that can be integrated into other web sites.

There are a number of advantages to using Facebook such as:

  • Easy to add to your web site (only a few lines of code)
  • No additional data protection regulations (Facebook is responsible for those)
  • Encourages other Facebook users to know and engage with your web site

It is the last of these that is very appealing.

There are some downsides as well such as:

  • Lack of direct ownership of the comments
  • Does not directly build your potential customer base - although creates alternative in form of "fans"
  • It is only going to be as good as how well your users trust Facebook (which is working at alaying fears over privicy at the moment)

I believe that the potential benefits more than out way the negative aspects.

Enabling Facebook Connect XFBML

Enabling Facebook Connect XFBML

There are a couple of different ways of embedding Facebook content into a website. I've chosen to use the JavaScript SDK with XFBML which incorporates the Facebook Markup Language into the page's HTML. This sounds quite scary, but is in fact a simple way of embedding the features using only a minimal amount of code. If you are not familiar with what html code is or what it looks like then you may want to learn some html before continuing (see book review HTML, XHTML & CSS Sixth Edition, by Elzabeth Castro).

The JavaScript SDK is a chunk of JavaScript code that is downloaded to your visitor's browser and converts the XFBML tags into code that your web browser can understand.

The first step to using the JavaScript SDK is to register as an application with Facebook. We won't actually be creating an application as such, but it means that you will be allocated an Application ID which is needed to allow your site to use the SDK.

Register as a Facebook application developer here.

Enter an "application name" and you will then be provided with the following information along with an example page. It's the unique App ID we are interested in here.

App name: yoursitename
App URL: http://www.yourwebsite.com
App ID: 123123123123
App secret:123123123123

Categories

Access Media Collection Add HTML facebook on site addurl Administration Tools Adsense All Cat Anatomy Virus Android Animator Anomymity Anti Virus Applications Install BELAJAR PHOTOSHOP Blog Blufftop CA-CLIPPER INTERNAL ERROR cara cari uang dari internet cari uang dari internet cashfiesta Celebs Computer Desk Computer Hang Computer Icon Computer Management Computer Repair Computer Set Up Computer Tablet Computer Touch Screen Computer Troubleshooting Cookies Cookies Definitions Crack Create DVD Create DVD Maker Create PDF Create PDF using Smart PDF Creator D-Link D-Link Router Definitions of Virus Device Device Manager DNS Doc Protect Dongle USB Drive partitions Drive parts Driver Printer HP DVD compress DVD Drive Earn Money Easy Gif Animator Elastomer Eror Solution Error Computer ERROR Solutions Error windows explorer External Hard Drive Facebook Facebook and Site File Sharing Football Game Free Articles Free Internet GAME Game Sport Googel Google Talk Hack Password Hard Drive Hard Drive Partitioning Healty Help and Support Help Support Household Aplieance How to How to Download HP Lapotop Reviews IM Google Inside Adsense intall Intall Windows 7 Ultimates Internet Internet Browser Internet Explore Ipad Java Programe Java Script JPEG JPG GIF PNG BMP Keyboard Keygen Smadav 8.7 Laptop Laptop Computer Skin Laptop vs PC Life Style Local Area Network Maintanance and Repair Make CD iso Make DVD Make money online Make Money with blog Make Your Own Copy-Protected CD with Passive Protection Messenger and Chat Microsoft Mobile Aplications Mobile Phone Modem MotorSport MOVIE Ms Word Applications MS Word to PDF Ms Words My Computer Network Set Up Networking Office Online Shoping Operating System Partitions drive Password Wifi PC Desktop PDF EDITOR PDF Remover Photoshop Picture Portable Prevent Windows XP Print Printer Error Protect CD from Copy Protect Your Computer Reboot Application Remove Pasword Excel Restore Windows Registry Router Search Engine Index Search Engines Optimizer Security Security System Shortcut Smadav 8.7 Smart PDF Creator Social Networking Software software Protection Solving Probelm Startup Programs SuperBike System Registry System Restore Table Manager Test DVD Test DVD Drive Troubleshooting all Tutorial Tutorial Java TUTORIAL PHOTOSHOP uang gratis dari cashfiesta uang gratis dari internet Upload File to blogger Upload Files USB Install USB REMOVE USB Repair VGA Card VGA Conector VGA Informations Virtual Memory is to Low Virus Viture Windows 7 Watermark What is Cookies Wifi Wifi Pasword Finder Win Pes2011 Windows Windows Device Windows DVD Maker windows explorer cannot open Windows Mobile Wireless Wireless router Word Password Remover words documents cannot open Words error XFBML and HTML Facebook