Search This Blog

Mind freaker Stuff

Please Visit my new blog http://www.mindfreakerstuff.com for new articles related to web and mobile designing.

Friday, April 29, 2011

Simple Word triming In PHP

      <?php $Title = "This is sample text for Trimming";
                $Title = trim($Title);
                  $limit = 20; /* Trimming Value limit */
                  if (strlen($Title) > $limit) {
                        $Title = substr($Title, 0, strrpos(substr($Title, 0, $limit), ' ')).' ...';
                   }
?>

Wednesday, April 13, 2011

Setting the GIcon parameters ( Google map Custom Marker) API v2

var Icon = new GIcon();
      Icon.image = "mymarker.png";
      Icon.iconSize = new GSize(20, 34);
      Icon.shadow = "myshadow.png";
      Icon.shadowSize = new GSize(36, 34);
      Icon.iconAnchor = new GPoint(5, 34);
      Icon.infoWindowAnchor = new GPoint(5, 2);
      Icon.transparent = "mytran.png";
      Icon.printImage = "mymarkerie.gif";
      Icon.mozPrintImage = "mymarkerff.gif";
      Icon.printShadow = "myshadow.gif";
      Icon.imageMap=[9,0,6,1,4,2,2,4,0,8,0,12,1,14,2,16,5,
       19,7,23,8,26,9,30,9,34,11,34,11,30,12,26,13,24,14,21,
       16,18,18,16,20,12,20,8,18,4,16,2,15,1,13,0];
 
  • Icon.image is simply the name of the main image for the marker.
  • Icon.iconSize is the pixel size of the Icon.image
  • Icon.shadow (optional) is the name of the shadow image.
  • Icon.shadowSize is the pixel size of the Icon.shadow
  • Icon.iconAnchor (indicated by the red pixel) is the pixel which will be placed on the specified geographical location. You can think of it as the point that the image points at.
  • Icon.infoWindowAnchor (indicated by the green pixel) is the pixel that the tip of the info Window stem will touch.
  • Icon.transparent (optional) is the name of a transparent image used for capturing clicks and mouseovers in MSIE.
  • Icon.printImage (optional) is the name of a GIF file to be used for printing.
  • Icon.mozPrintImage (optional) is the name of a GIF file to be used for printing from the Mozilla/Firefox browser.
  • Icon.printShadow (optional) is the name of a GIF file to be used for printing the shadow.
  • Icon.imageMap (optional) is an array of integers representing the x/y coordinates of the image map used fopr capturing image clicks in non-IE browsers.
 simply create the main image file and pass it to Graham's Custom Marker Maker
 www.powerhut.co.uk/googlemaps/custom_markers.php.
 
 
enjoy .....
 
For more detail Please visit (http://econym.org.uk/gmap/custom.htm)  
 

Friday, April 1, 2011

Silverlight simple animation with Easing C#

Animated Rectangle width with Easing


           //Easing effect for Object
            var ease = new PowerEase { EasingMode = EasingMode.EaseOut };

            // Create Storyboard for animation
            Storyboard storyboard = new Storyboard(); 
            DoubleAnimation doubleAnimatoin = new DoubleAnimation();
            doubleAnimatoin.EasingFunction = ease;

           // "objectName " is name of object to be animated.

            doubleAnimatoin.From = objectName.Width;
            doubleAnimatoin.To = 100; 
            doubleAnimatoin.Duration = new Duration(TimeSpan.FromMilliseconds(400));
         
            Storyboard.SetTarget(doubleAnimatoin, objectName);
            Storyboard.SetTargetProperty(doubleAnimatoin, new PropertyPath("(objectName.Width)")); 
  
            storyboard.Children.Add(doubleAnimatoin); 
            storyboard.Begin();


- Amey Raut