Ahmad Masykur

Share your knowledge although one function!

About the author

Ahmad Masykur is a Software Architecture Engineer at PT. Freeport Indonesia Jakarta Indonesia.
In this blog, I share things of interest to me. Most topics are likely to be related to software development, but don't hold me to it.

Certificates



Awards


Powered by

Widget Prayer Time not found.

There is an error in XML document (4, 16278).X

Page List

Validators


Ahmad Masykur

BlogEngine.NET 1.5 was released a few days ago

BlogEngine.NET was released a few days ago as announced by Mads in his blog. In this release, blogengine.net now support some IIS7 features. New features in this release are:

  • Nested comments
  • Superb Windows Live Writer integration (including tags)
  • Latest TinyMCE text editor
  • Mono 2.4 support that just works
  • Doesn't screw with jQuery and Prototype anymore
  • Better database support out of the box
  • Higher performance
  • ...and of course a lot of general improvements, tweaks and bug fixes

This release is claimed more stable than older.

Al Nyveldt also posted installation screen cast in his blog.

You can learn by watching this video to install BlogEngine.NET with XML or database data.

This is release is probably be the last release supporting IIS6 and .NET 2.0. In the next release, BlogEngine will be only support II7 and upcoming IIS7.5 to give extra possibilities like extension-less URL even on hosted environment.


Categories: BlogEngine
Permalink | Comments (0) | Post RSSRSS comment feed

Drawing using JavaScript and jQuery

Drawing functionality is not supported in most of popular browsers except Firefox and Safari with Canvas object. Using little trick we can draw line and circle using JavaScript. This is not best practice because need lot of execution time but it can be alternative way to draw simple and little objects.

Basically this trick is drawing many DIV elements with 1x1 pixel size inside the document. Basically we can't draw 1x1 pixel suze DIV element in IE. To resolve this issue, you can add IMG element inside the DIV with 1x1 pixel image. Here's the complete code to draw line and circle into HTML document.

<html> <head> <title>Drawing</title> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { line(50,30, 100, 150); circle(110,110, 100); }); function line(x1, y1, x2, y2) { c = $(document.body); var dx = Math.abs(x2-x1); var dy = Math.abs(y2-y1); var d = Math.max(dx, dy); var i=0; for(i=0; i < d; i++) { var img = $(document.createElement('img')).attr('src', 'blank.gif'); var div = $(document.createElement('div')).width(1).height(1).css({'background-color': '#f00', position: 'absolute', left: Math.min(x1,x2)+(i*dx/d), top: Math.min(y1,y2)+(i*dy/d) }); div.append(img); c.append(div); } } function circle(x, y, r) { c = $(document.body); var l = 2 * Math.PI * r; var i=0; for(i=0; i < l * (1+((10-Math.log(r+1))/10)); i++) { var x2 = r * Math.sin(360 * i/l); var y2 = r * Math.cos(360 * i/l); var img = $(document.createElement('img')).attr('src', 'blank.gif'); var div = $(document.createElement('div')).width(1).height(1).css({'background-color': '#f00', position: 'absolute', left: x+x2, top: y+y2 }); div.append(img); c.append(div); } } </script> </head> <body> </div> </body> </html>

The result of rendered document is

image

I hope this trick is useful.


Categories: JavaScript
Permalink | Comments (2) | Post RSSRSS comment feed