Pages

Monday, May 31, 2010

About Twitter API

Twitter4J is a Java library for the Twitter API.
With Twitter4J, We can easily integrate our Java application with the Twitter service.

Click to Download Twitter API

example :Code to update Tweets

............
..........
public static void main(String[] args)throws TwitterException{

Twitter twitter = new TwitterFactory().getInstance(username,password);
Status status = null;
try {
status = twitter.updateStatus(statusInput);
} catch (TwitterException e) {
System.out.println("Exception while updating the status to [" + status.getText() + "].");
e.printStackTrace();
}
System.out.println("Successfully updated the status to [" + status.getText() + "].");

Saturday, May 15, 2010

Links for Jquery Learners

ToolTip
http://www.ajaxdaddy.com/javascript-tooltip-jtip.html

Marquee
http://www.seangw.com/wordpress/index.php/2009/01/basic-ajax-tutorial-smooth-scrolling-text-marquee-with-a-jquery-plugin/

Floating Box
http://www.phpletter.com/Demo/Jquery-Floating-Box-Plugin/

Paging
http://rikrikrik.com/jquery/pager/#examples

Slide Show
http://malsup.com/jquery/cycle/

Image Zooming
http://dynamicdrive.com/dynamicindex4/imagepanner.htm

JScrollPane
http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

My first try in Jquery .... :)

Tried a fix for Toggle-css-in-multiple-instances-individually
Include the Script & Style within Head tag

$(document).ready(function(){
$('.showAnswer').click(function(){
var htmlStr = $("li.theAnswer").html();
$("li.theAnswer").html($("li.theAnswer").text().replace(htmlStr,''+htmlStr+''));
$(this).text($(this).text() == 'Hide Answer' ? 'Show Answer' : 'Hide Answer');
});
});


Include the code in Body tag
A list with one alone with class for example
.. class="theAnswer"(C) 6 to 7..
Have A hyperlink with class class="showAnswer"



View Demo