Thursday, June 18, 2009

Web Page Analyzer - Website Optimization Tool

I found a great tool where you can check the speed of your website and analyze it.
Try it out: http://websiteoptimization.com/services/analyze/

Tuesday, June 16, 2009

Adding "_blank" of all links

var anchors = document.getElementById('div').getElementsByTagName('a');

var sDom = document.domain;

for (var i=0; i<anchors.length; i++) {

var anchor = anchors[i];

if (anchor.getAttribute("href")) {

iPosition = anchor.href.indexOf(sDom);

if (iPosition == -1 ||

iPosition > sDom.length) {

anchor.target = "_blank";

}

}

}

Display Twitter RSS on your website using Google AJAX Feed API

It's a simple code to display twitter rss on your website. You can display the twitter user image, user name, user url, user id, title and content.

Sample Twitter Search with google feed api:

 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("feeds", "1");
function getTwitterSearch(q, id, callbackfunction)
{

q = encodeURI(q);
id = encodeURI(id);
var feed = new google.feeds.Feed("http://search.twitter.com/search.atom?q="+q+"&rpp=100&show_user=true&since_id="+id); feed.setNumEntries(10); feed.setResultFormat(google.feeds.Feed.MIXED_FORMAT); feed.load(function(result) { if (!result.error) { var ava = google.feeds.getElementsByTagNameNS(result.xmlDocument, "http://www.w3.org/2005/Atom", "link"); //google.feeds.getElementsByTagNameNS(result.xmlDocument, "http://search.yahoo.com/mrss/", "content"); ; var imageA = new Array(); j=0; for (var i = 0; i < ava.length; i++) { if(ava[i].getAttribute('rel')=="image") { imageA[j]=ava[i].getAttribute('href'); j++; } } var tA = new Array(result.feed.entries.length); for (var i = 0; i < result.feed.entries.length; i++) { var twitterMessage = new Object; entry = result.feed.entries[i]; temp = entry.link.split("/"); twitterMessage = { text: entry.title, link: entry.link, date: entry.publishedDate, user: entry.author, statusid: temp[5], image: imageA[i] }; tA[i]=twitterMessage; } callbackfunction(tA); } }); } function reverseSimpleWrite(tA) { tA.reverse(); var container = document.getElementById("feed"); for (var i = 0; i < tA.length; i++) { var entry = tA[i]; var div = document.createElement("li"); div.innerHTML="<img src='"+entry.image+"' width='48' height='48' > "+entry.image+"<br>user: "+entry.user+"<br>date: "+entry.date+"<br> text: "+entry.text+" <br> link: <a href='"+entry.link+"'>"+entry.link+"</a><br> statusid: "+entry.statusid+"<br><br>"; container.appendChild(div); } } google.setOnLoadCallback(function(){ getTwitterSearch("iphone", 0, reverseSimpleWrite); } ); </script>




See the original code and sample here:
http://www.facesaerch.com/widget/twitterjs.php

Tuesday, June 02, 2009

List of Content Management Systems

a list of content management systems.

50 Content Management Systems

Monday, June 01, 2009

Php and MySql Book

I want to share with you a very nice book of php and mysql. I really like this book, I learned a lot of making some program using php and combination with the mysql.

Check this out.

http://books.google.com/books?hl=en&id=fGzifMim4qYC&dq=php+and+mysql+web+development&printsec=frontcover&source=web&ots=mB9GW-2nJ3&sig=9LQvdcdH8x_AuTRkl4yomObJ4vc&sa=X&oi=book_result&resnum=1&ct=result#PPP12,M1

Vim Commands Cheat Sheet

Vim Commands Cheat Sheet


http://www.fprintf.net/vimCheatSheet.html

7 Habits For Effective Text Editing 2.0

Vim editor

http://www.truveo.com/7-Habits-For-Effective-Text-Editing-20/id/699137100

List of Best Photoshop Web design Tutorials

A compilation of Photoshop Web design Tutorials. The best, creative and professional web design layout tutorials.

  1. http://dzineblog.com/2008/07/best-photoshop-layout-design-tutorials.html
  2. http://vandelaydesign.com/blog/design/website-layout-photoshop-tutorials/
  3. http://psd.tutsplus.com/articles/web/45-step-by-step-tutorials-on-web-design-with-photoshop/

Table Sort using javascript

a script where you can sort a records on the the table using javascript. you can sort by number or by alphabetical.

Table Sort
http://www.brainjar.com/dhtml/tablesort/default2.asp


Demo
http://www.brainjar.com/dhtml/tablesort/demo.html

Sorting Number using Javascript

simple way to sort a number using javascript.

<script type="text/JavaScript" language="JavaScript">


function compare(a,b){

return a-b;

}


var num = [5,2,10,6,8,1,7,4,3];



document.write("Result :"+num.sort(compare));



</script>

Monday, February 19, 2007

Ruby on Rails Resources

Tutorials:

1.) ONLamp.com -- Rolling with Ruby on Rails
2.) ONLamp.com -- Rolling with Ruby on Rails, Part 2
3.) Rails for Designers
4.) http://wiki.rubyonrails.org/rails
5.) http://railsforum.com/viewforum.php?id=20
6.) http://rorlearn.com/tutorials/index.html

Forums:

1.) Rails Forum - http://www.railsforum.com/


Ruby on Rails Cheat Sheet:

1.) http://www.ilovejackdaniels.com/ruby_on_rails_cheat_sheet.pdf


Ruby on Rails Quick Reference:

1.) http://blogs.tech-recipes.com/johnny/rails-quick-reference/


Ruby on Rails Free Hosting:

1.) xmgfree.com
2.) railsplayground.com


Rails Blog Apps
Ajax Hierarchical Category and Calendar browser
For a Typo blog

Typo
Ruby on Rails blog software. (Related post: Ruby on Rails Blog Software)

Rails Wiki Apps
Hieraki
Open source, wiki-like system.

Instant Rails
Drop it in your directory - and you're done

Instiki
A wiki clone which is very easy to use.

Tutorials

Ruby Activity Indicators
Progress Bars with GD2 and Ruby
I went milling about for source for progress bars that would be suitably embedded within a Ruby on Rails application I'm working on and came up with nada.

Ruby Calendar
CalendarGrid
Ruby based calendar

Ruby Chat
AJAX powered chat in 3 hours on Ruby on Rails
A simple Web based chat built with Ruby on Rails. It seems to work okay, but I've only tested on FireFox and Safari. On IE it's bound to look totally out of wack as I'm not sure it supports position: fixed, which I used for the IRC-esque layout.

Ruby Image Manipulation
rmagick
Thumbnailer method for a Rails 'Photo' controller

Ruby Learning and Basics
Try Ruby
An interactive ruby tutorial where you can learn some basics right in your browser,

Tutorial in Ruby on Rails
As a newbie, getting started with Rails was tricky without some help from the IRC folks. If you get stuck, that's a good place for help, as the author hangs out in there pretty regularly. That said, some sample code is worth its weight in gold, so here's how I got a basic Rails application running.

Learning Ruby
A very good article on the basics of ruby.

Introduction to Ruby
For Perl programmers

Introduction to Ruby
For Mac OS X

Ruby Live Grid
AJAX Live Data Grid Example
Historically, data sub-forms are not something that have been presented well on the web. Pop-up windows and browser page refreshing are a significant regression from the interfaces which have been provided by client/server desktop applications for over a decade. Luckily, with the advent of Rails and its partials rendering, we are in a position to do something about this usability shortfall.

Ruby Login
LoginGenerator
Login & Authentication Generator

Ruby Text Editors
Integrate FCKEditor with your Ruby on Rails application
FCKEditor is an open source Javascript application for embedding a rich text box into an HTML form. I will show you have to integrate this application with your Ruby on Rails application.

Integrating a Rich-text Widget with Struts
The problem was straightforward, all I needed was a rich-text editor that would allow me to create XHTML that I could then send back to the client. I already had a textarea, and I just wanted a rich-text replacement. I thought this was going to be simple, but the problem cost me hours. In this entry, I show the process I used to identify a suitable AJAX/Javascript library, read on...

Ruby Shopping Cart
Open Source Ruby On Rails Shopping Cart | Sublog
The first and only Ruby

Ruby Helpers

Ruby Calendar Helpers
CalendarHelper
Select dates from a calendar popup or in-page

DynamicCalendarHelper
Renders a basic calendar in HTML. Highly configurable and allows for databinding as well as formatting

Ruby Drag and Drop
HowToUseDragAndDropSorting
How to use drag and drop Sorting in Ruby on Rails

Ruby File Uploader
TinyFile
For the longest time I just wanted a quick, ready-to-go example of how to do some basic file uploads in a real rails app. Welcome to TinyFile.

Ruby Live Trees Helpers
LiveTree
DHTML tree widget that can load data asynchronously as-needed

Ruby Pagination Helpers
PaginationHelper
Paginate large tables

Ruby Sorting Helpers
SortHelper
Click column headings to sort tables (uses Ruby to handle sorting)

SortHelper2
Another take on sort via clickable headers (uses SQL to handle sorting)

Sort Helper the third
Sort database result sets with clickable column headers (also uses SQL to handle sorting)

Movtable
A port to rails of Movtable, full featured sort table, filterable, with context menus.

JavascriptSortableTables
Not a Ruby helper as such, but it doesnt require Ajax, Ruby or SQL to work - it's all in client side Javascript

Monday, November 13, 2006

Youtube.com - Web 2.0

dsdsThis is funny Web 2.0:

Saturday, November 04, 2006

Contact Form Script

This is a contact form script. It's easy to use and install. You only need a .cgi hosting or if you don't have .cgi in your hosting you can also use other free hosting like netfirms.com for this email script. Below is the instruction on how to use the email script.


1.) Copy and save the email script into email.cgi, and upload it into your web sever. But if you dont have a cgi in your websever try to use the free hosting netfirms.com which they supported free cgi. This is the example url or location of the email script. http://www.exinrex.netfirms.com/cgi-bin/email.cgi.

Note: change the below example email address("example\@yahoo.com") in your own email address. You just remain \ between the name email and the site. And also change the "Thankyoupages.html" in your own thank you page.

$email = param('email');
$subject = param('subject');

$name = param('name');
$message = param('message');


$mailprog = '/usr/sbin/sendmail';


$myemail = "example\@yahoo.com";

open (MAIL, "|$mailprog -t") or die "Can't send mail.$!\n";
print MAIL "To: $myemail\n";
print MAIL "From: $email\n";
print MAIL "Subject: $subject\n";
print MAIL "\n";
print MAIL "=====================================================\n";

print MAIL "Sender Name: $name\n";
print MAIL "Message: $message\n";
print MAIL "\n";
close(MAIL);

print "Location: Thankyoupages.html\n\n";



2.) Copy the below Html file and save it or If you already have a website you only need is to insert the form tags into your html page. and change the location of the email script of form action tag.

Note: <form action="location of the email script " method="post"> example location of the email script. http://www.exinrex.netfirms.com/cgi-bin/email.cgi


<html>

<head>

<title>sample</title>

</head>

<body>

<form action="http://www.exinrex.netfirms.com/cgi-bin/email.cgi" method="post">


Name: <input type="text" name="name" size ="20"><br>

Email Address: <input type="text" name="email" size ="20"><br>

Subject: <input type="text" name="subject" size ="20"><br>

Message: <textarea name="message" cols="60" rows="6"></textarea><br>

<input type="submit" value="Submit">

</form>

</body>


</html>


If you successfully run the contact form script you now install form validation. Form validation is to validate input data in HTML forms before sending off the content to a server. For more info regarding the script of form validation visit http://www.formassembly.com.

Have Fun !