Skip to main content

Posts

Showing posts from February 21, 2012

VB.NET - Animate GIF File Without Using Any Controls

'Declarations No declarations 'Code: Public Class Form1     Private animatedImage As New Bitmap("c:\an90_e0.gif")     Private currentlyAnimating As Boolean = False     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         AnimateImage()     End Sub     Private Sub AnimateImage()         If Not currentlyAnimating Then             ImageAnimator.Animate(animatedImage, _             New EventHandler(AddressOf Me.OnFrameChanged))             currentlyAnimating = True         End If     End Sub     Private Sub OnFrameChanged(ByVal Sender As Object, ByVal e As EventArgs)         Me.Invalidate()     End Sub        Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint         AnimateImage()         ImageAnimator.UpdateFrames()         e.Graphics.DrawImage(Me.animatedImage, New Point(50, 100))     End Sub End Class Technorati Tags: VB.NET

Java Bitwise Shift Operators

This tutorial will take you step by step through the process of understanding and shift operators that act on individual bits. The best way to learn is to compile and run these programs yourself (copy, paste, compile and run !). Comments such as /* this is a comment */ or // this is another comment are inserted to explain what does the line of code do. The programs are kept simple for the purpose of concentrating on the main idea in question. The bitwise shift operators are : >> , << , >>> >> the SHIFT RIGHT operator << the SHIFT LEFT operator >>> the UNSIGNED SHIFT RIGHT operator Example 1: the >> opearator applied to positive intgers This example shows the effect of using the >> opearator.   class Bits1{    public static void main(String args[]){       System.out.println(" >> opeartor");     // shift all the bits in 20 (in binary form) to the right by 2       System.out.println("20>>2 = "+20

JSP Expression Language

I have place couple of examples demonstrating usage of JSTL core tags and EL… 1) JSTL ForEach Tag <%@ taglib prefix="c" uri=" http://java.sun.com/jsp/jstl/core " %> <html> <head>   <title>JSTL: Iterator Support -- Simple Range Iteration Example</title> </head> <body bgcolor="#FFFFFF"> <h3>Simple Range Iteration</h3> <h4>1 to 10</h4> <c:forEach var="i" begin="1" end="10">   ${i} &#149; </c:forEach> </body> </html> <%@ taglib prefix="c" uri=" http://java.sun.com/jsp/jstl/core " %> <html> <head>   <title>JSTL: Iterator Support -- Iteration Status Example</title> </head> <body bgcolor="#FFFFFF"> <h3>Iteration Status</h3> <h4>Using status information: current, index, count, first, last</h4> <table border="1&q

Add Floating social media sharing buttons to Blogger

  Step of Adding the Floating Social Buttons buttons Login to your Blogger account. Go to Design > Page Elements. Click Add A Gadget. In Add A Gadget window, select HTML/Javascript . Copy the code below and paste it inside the content box. <!-- floating page sharers Start --> <style> #pageshare {position:fixed; bottom:15%; margin-left:-71px; float:left; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;padding:0 0 2px 0;z-index:10;} #pageshare .sbutton {float:left;clear:both;margin:5px 5px 0 5px;} .fb_share_count_top {width:48px !important;} .fb_share_count_top, .fb_share_count_inner {-moz-border-radius:3px;-webkit-border-radius:3px;} .FBConnectButton_Small, .FBConnectButton_RTL_Small {width:49px !important; -moz-border-radius:3px;/*bs-fsmsb*/-webkit-border-radius:3px;} .FBConnectButton_Small .FBConnectButton_Text {padding:2px 2px 3px !important;-moz-border-radius:3px;-webkit-border-radius:3px;font-size:8px;} </