<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5143257499073976617</atom:id><lastBuildDate>Wed, 21 Oct 2026 07:18:49 +0000</lastBuildDate><category>C#</category><category>ASP .NET</category><category>Console Application</category><category>Javascript</category><category>Ruby</category><category>Ruby on Rails</category><category>SQL</category><category>WIndows</category><category>Android</category><category>Downloads</category><category>Drawing</category><category>Facebook</category><category>HTML</category><category>Internet Explorer</category><category>Java</category><category>Registry</category><category>RubyMine</category><category>jQuery</category><title>Danpe Solutions</title><description>Your Coding Solutions !</description><link>http://danpesolutions.blogspot.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-2375715115031068136</guid><pubDate>Tue, 02 Oct 2012 22:58:00 +0000</pubDate><atom:updated>2013-03-25T20:50:57.083+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ruby</category><category domain="http://www.blogger.com/atom/ns#">Ruby on Rails</category><title>Route by name, Not by id.</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;u style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Environment:&lt;/u&gt;&lt;/h3&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;m using&amp;nbsp;&lt;b&gt;Ubuntu 12.04 64bit&lt;/b&gt;&amp;nbsp;with&amp;nbsp;&lt;b&gt;RubyMine 4.5.4&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Ruby 1.9.3&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Rails 3.2.8&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Problem:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It&#39;s more a feature than a problem :P&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I wanted to access my model by name and no by id for example:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;By id:&lt;/u&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | &amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;By name:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt; &amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;/friend/1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;|&lt;/b&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;friend/john&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Research:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;By default controllers use the following code to get the required instance from the database:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;
@friend = Friend.find(params[:id])
respond_to do |format|
    format.html # show.html.erb
end
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;so first thing to try is:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;@friend = Friend.find_by_name(params[:name])&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;ERROR!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So next i found map.connect...&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;
map.connect &#39;friend/:name&#39;, :controller =&amp;gt; &#39;friends&#39;, :action =&amp;gt; &#39;show&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I found out that map.connect only available in rails 3.2 and was deprecated in rails 3.x&amp;nbsp;&lt;/span&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;h3 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/h3&gt;
&lt;h3 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/h3&gt;
&lt;h3 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Have you ever heard of &lt;b&gt;to_param&lt;/b&gt; ?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I just needed to add the following to my model (friend.rb):&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;
def to_param
   name
end
&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And in the controller (friend_controller.rb):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;@friend = Friend.find_by_name(params[:id])&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No need to change anything in routes.rb!&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;ActiveAdmin fix:&lt;/u&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For those of us who uses ActiveAdmin gem like me, there is another fix to be able to edit friends by name.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Add the following to your &lt;b&gt;friends.rb&lt;/b&gt;: (&lt;b&gt;ActiveAdmin.register Friend do&lt;/b&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;language-rb&quot;&gt;
before_filter :only =&gt; [:show, :edit, :update, :destroy] do
  @friend = Friend.find_by_name(params[:id])
end
&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;


&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2012/10/route-by-name-not-by-id.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-2950414333153933503</guid><pubDate>Tue, 07 Aug 2012 18:41:00 +0000</pubDate><atom:updated>2012-08-07T21:44:24.301+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ruby</category><category domain="http://www.blogger.com/atom/ns#">Ruby on Rails</category><category domain="http://www.blogger.com/atom/ns#">RubyMine</category><category domain="http://www.blogger.com/atom/ns#">WIndows</category><title>Ruby on Rails GemNotFound / FetchError / connection attempt failed!</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I didn&#39;t post for a very long time!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I had alot of sketches though but didn&#39;t had the time to finish and publish them..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;But i hope to come back now with more posts!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Also i&#39;m gonna stick to a new format in my posts thati think is better to read. maybe i&#39;ll also update old posts to this format.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I just started learning Ruby on Rails few weeks ago and ran into a very weird problem.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Environment:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;m using &lt;b&gt;Windows 7 64bit&lt;/b&gt; with &lt;b&gt;RubyMine 4.5.1&lt;/b&gt;, &lt;b&gt;Ruby 1.9.3&lt;/b&gt;, &lt;b&gt;Rails 3.2&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I was able to install all this working environment on my Desktop but not on my Laptop..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Problem:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I encounterd the following errors on &lt;b&gt;cmd&lt;/b&gt; &amp;amp; &lt;b&gt;RubyMine&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;C:\Users\Danpe&amp;gt;gem install rails&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WARNING: &amp;nbsp;Error fetching data: Errno::ECONNREFUSED: No connection could be made&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;because the target machine actively refused it. - connect(2) (http://rubygems.org/latest_specs.4.8.gz)&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;`block in materialize&#39;: Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Fetching&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; source index &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;`http://rubygems.org/`&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Could&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; reach rubygems repository &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;`http://rubygems.org/`&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Could&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; find gem &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;rspec-rails (&amp;gt;= 2.0.0.beta.22, runtime)&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; any of the gem sources&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f1f1f1; border: 1px solid rgb(68, 68, 68); font-size: 12px; line-height: 18px; margin: 10px 10px 10px 10.600000381469727px; overflow: auto; padding: 5px 10.600000381469727px; width: 487.6000061035156px;&quot;&gt;&lt;code style=&quot;border: none rgb(68, 68, 68); font-family: Monaco, Consolas, &#39;DejaVu Sans Mono&#39;, monospace; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;ERROR: http://rubygems.org/ does not appear to be a repository       ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
 Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2)           (http://rubygems.org/yaml)&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I got all these kind of weird errors!&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Research:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;so i started looking around the web and around my PC network settings.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I double checked my Internet Options to see that there is no proxy enabled, and there was none!&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I opened &lt;b&gt;cmd&lt;/b&gt; and typed &lt;b&gt;SET &lt;/b&gt;to see my Environment Variables:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
C:\Users\Danpe&amp;gt;SET&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
ALLUSERSPROFILE=C:\ProgramData&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
APPDATA=C:\Users\Danpe\AppData\Roaming&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
COMPUTERNAME=DANPE-ZENBOOK&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
ComSpec=C:\Windows\system32\cmd.exe&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
HOMEDRIVE=C:&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
HOMEPATH=\Users\Danpe&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
HTTP_PROXY=192.168.0.1:8080&lt;/blockquote&gt;
&lt;/blockquote&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As you can see there is an Environment Variable for HTTP_PROXY...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Go to &lt;b&gt;Start (WinKey) &lt;/b&gt;type &lt;b&gt;Edit the system environment variables&lt;/b&gt;&amp;nbsp;and you&#39;ll get this window:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf9ZP0p8LfEWHJ-eLOr0EMQdeRPXkCvwaykrrGHTb5x3qzjUUybPDTSR_TDAxWDp3UYcJFgc3PEZRGyBVdQffhFiU0KiqQHeqzkgnkEVJfOdKMUct1jdWDoeyJsoI7I305zubZhWK-4pw/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf9ZP0p8LfEWHJ-eLOr0EMQdeRPXkCvwaykrrGHTb5x3qzjUUybPDTSR_TDAxWDp3UYcJFgc3PEZRGyBVdQffhFiU0KiqQHeqzkgnkEVJfOdKMUct1jdWDoeyJsoI7I305zubZhWK-4pw/s320/Capture.PNG&quot; width=&quot;286&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Click on &lt;b&gt;Environment Variables&lt;/b&gt; and then remove&lt;b&gt; HTTP_PROXY&lt;/b&gt; from &lt;b&gt;System Variables&lt;/b&gt;!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Make sure you reopen &lt;b&gt;cmd&lt;/b&gt; and &lt;b&gt;RubyMine&lt;/b&gt; :)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2012/08/ruby-on-rails-gem-fetcherror-connection.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf9ZP0p8LfEWHJ-eLOr0EMQdeRPXkCvwaykrrGHTb5x3qzjUUybPDTSR_TDAxWDp3UYcJFgc3PEZRGyBVdQffhFiU0KiqQHeqzkgnkEVJfOdKMUct1jdWDoeyJsoI7I305zubZhWK-4pw/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-3263569778079792930</guid><pubDate>Tue, 20 Sep 2011 15:10:00 +0000</pubDate><atom:updated>2011-09-20T20:54:04.823+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android</category><category domain="http://www.blogger.com/atom/ns#">Java</category><title>Android Recursively change fonts ?</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I think it&#39;s time to start blogging about android :)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I just got my &lt;b&gt;Samsung Galaxy S2&lt;/b&gt; a week ago and it&#39;s been so fun playing with !&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So today i&#39;m gonna show how to use custom fonts, There is a nice artical about Styling TextViews in here:&amp;nbsp;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/android/customize-android-fonts/&quot;&gt;Customize Android Fonts&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can see there that they are accessing a TextView using it&#39;s ID and then changing the font of the spacific TextView.&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: java&quot;&gt;TextView txt = (TextView) findViewById(R.id.custom_font);  
Typeface font = Typeface.createFromAsset(getAssets(), &quot;Chantelli_Antiqua.ttf&quot;);  
txt.setTypeface(font);  
&lt;/pre&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, mono; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt;Now that can be a pain in the a** if you have alot of TextViews in your page...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt;So iv&#39;e created a Recursive that changes all TextView&#39;s &amp;amp; Button&#39;s fonts on the same page :)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: java&quot;&gt;void UpdateFonts(ViewGroup parent, Typeface font) {
  for (int i = 0; i &amp;lt; parent.getChildCount(); i++) {
   View child = parent.getChildAt(i);
   if (child instanceof ViewGroup) {
    UpdateFonts((ViewGroup) child, font);
   } else if (child != null) {
    if (child.getClass() == TextView.class) {
     ((TextView) child).setTypeface(font);
    } else if (child.getClass() == Button.class) {
     ((Button) child).setTypeface(font);
    }
   }
  }
 }
&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This is an eay recursive that loops through all children of a parent element and changes all of his children&#39;s fonts.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can call it like that if you want all page: &lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: java&quot;&gt;Typeface font = Typeface.createFromAsset(getAssets(), &quot;fonts/choco.ttf&quot;);
ViewGroup rootView = (ViewGroup) findViewById(android.R.id.content).getRootView();
UpdateFonts(rootView, font);
&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hope you enjoyed my first &lt;b&gt;Android&lt;/b&gt; article :)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;See you next time ;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/09/android-recursively-change-fonts.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-9005481022636116199</guid><pubDate>Fri, 02 Sep 2011 13:51:00 +0000</pubDate><atom:updated>2012-10-03T15:09:28.139+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Console Application</category><title>Fliping lots of text lines... ?</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;u style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Environment:&lt;/u&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;m using&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Windows 7 64bit&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;with &lt;b&gt;Notepad++ 5.9.3&lt;/b&gt;, &lt;b&gt;Visual Studio 2010 Ultimate&lt;/b&gt;, &lt;b&gt;C# .NET 2.0&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Problem:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So i face a really annoying problem today,&lt;br /&gt;
I had an array with &lt;b&gt;400&lt;/b&gt; lines written in C#.&lt;br /&gt;
The problem is that, the list was reversed from the order i wanted.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Example:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;The array i have:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxGx9bJZ1fV1igWu1MA3JwbU7eZE1Mc48QgfiN-1NzDoNH2Sp-k-b-xKmwsPIhVCLxfpu2c0rZIlrAwffoBIAiModtaPzZZhkSI-yijrwoJwVgWiRd9HoDwEYtOpFTBIhrQiXH5TowSe2n/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxGx9bJZ1fV1igWu1MA3JwbU7eZE1Mc48QgfiN-1NzDoNH2Sp-k-b-xKmwsPIhVCLxfpu2c0rZIlrAwffoBIAiModtaPzZZhkSI-yijrwoJwVgWiRd9HoDwEYtOpFTBIhrQiXH5TowSe2n/s320/Capture.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;The array i need:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHRbUsqBgTrXRh9DvtJzWYWKqrE8ReoxGjGcH5mnM-7IA47LtVc_qnlrPLrEsOpK77dyj3wMK1xGY0say7wa_1CnUIU6f_lsw-Q5K9AEaUs1uwKdepNWyLXXQ0dUT2MtwPlf3caGLh5gU/s1600/Capture2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;154&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHRbUsqBgTrXRh9DvtJzWYWKqrE8ReoxGjGcH5mnM-7IA47LtVc_qnlrPLrEsOpK77dyj3wMK1xGY0say7wa_1CnUIU6f_lsw-Q5K9AEaUs1uwKdepNWyLXXQ0dUT2MtwPlf3caGLh5gU/s320/Capture2.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Like i said it&#39;s a 400 lines array...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Research:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I really needed this reversed, i tried &lt;b&gt;Notepad++&lt;/b&gt;&amp;nbsp;with several plugins like &lt;b&gt;TextFX&lt;/b&gt;&amp;nbsp;without any success, i actually found out that it&#39;s possible to do it by recording a Macro in the Notepad++, but it&#39;s like not my thing.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;So i used my best friend! C# :)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;ll make a quick explanation of what i&#39;m doing and then just paste the code.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So i made a &lt;b&gt;Console App&lt;/b&gt; that gets a file path from the application arguments.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It reads all the lines and pushs them into a Stack then writes it to a new file using Pop :)&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Heres the code: (Just compile and it works)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;class Program
{
 static void Main(string[] args)
 {
  if (args == null)
  {
   Console.WriteLine(&quot;args is null&quot;); // Check for null array
  }
  else
  {
   if (args.Length == 0)
   {
    Console.WriteLine(&quot;Please enter a file path to reverse in the console arguments.&quot;);
   }
   else
   {
    string p = args[0];
    string o = Path.GetDirectoryName(p) + Path.PathSeparator + Path.GetFileNameWithoutExtension(p) + &quot;Reversed&quot; + Path.GetExtension(p);
    Console.WriteLine(o);
    try
    {
     String line;
     Stack&lt; string &gt; lines = new Stack&lt; string &gt;();
     // Create an instance of StreamReader to read from a file.
     // The using statement also closes the StreamReader.
     using (StreamReader sr = new StreamReader(p))
     {
      // Read and display lines from the file until the end of
      // the file is reached.
      while ((line = sr.ReadLine()) != null)
       lines.Push(line);
     }
     // create a writer and open the file
     // The using statement also closes the StreamWriter.
     using (TextWriter tw = new StreamWriter(o))
     {
      // write a line of text to the file
      while (lines.Count &amp;gt; 0)
       tw.WriteLine(lines.Pop());
     }
    }
    catch (Exception e)
    {
     // Let the user know what went wrong.
     Console.WriteLine(&quot;The file could not be read/written:&quot;);
     Console.WriteLine(e.Message);
    }
    Console.WriteLine(&quot;Reversed.&quot;);
   }
  }
  Console.ReadLine();
 }
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://danpesolutions.blogspot.com/2011/09/fliping-lots-of-text-lines.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxGx9bJZ1fV1igWu1MA3JwbU7eZE1Mc48QgfiN-1NzDoNH2Sp-k-b-xKmwsPIhVCLxfpu2c0rZIlrAwffoBIAiModtaPzZZhkSI-yijrwoJwVgWiRd9HoDwEYtOpFTBIhrQiXH5TowSe2n/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-3481098772943003237</guid><pubDate>Sun, 28 Aug 2011 09:31:00 +0000</pubDate><atom:updated>2011-08-28T12:31:43.618+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Drawing</category><title>Simple cross drawing :)</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Hey,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here is a simple cross drawing&lt;/span&gt;&lt;/div&gt;&lt;pre dir=&quot;ltr&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: Consolas; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Drawing;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;//Create graphics object to handle drawings
Graphics gfx = picBox.CreateGraphics(); 
//Get client retangle from out PictureBox that we want the cross in
Rectangle rc = picBox.ClientRectangle; 
//Create a new pen to draw the cross
Pen RedPen = new Pen(Color.Red);
int Size = 10
//Draw the actual cross&amp;nbsp;
gfx.DrawLine(RedPen, rc.Width / 2, rc.Height / 2 + Size, rc.Width / 2, rc.Height / 2 - Size);
gfx.DrawLine(RedPen, rc.Width / 2 + Size, rc.Height / 2, rc.Width / 2 - Size, rc.Height / 2);
&lt;/pre&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/08/simple-cross-drawing.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-3514848052988667625</guid><pubDate>Tue, 28 Jun 2011 01:31:00 +0000</pubDate><atom:updated>2011-06-28T04:35:30.924+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Registry</category><category domain="http://www.blogger.com/atom/ns#">WIndows</category><title>Run application on Windows Startup</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hey,&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In this post i&#39;m gonna show you how to &lt;b&gt;run an application on Windows Startup &lt;/b&gt;by adding the application to the registry in the right place.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;First of all add this using:&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 20px;&quot;&gt;using&amp;nbsp;&lt;span style=&quot;color: black;&quot;&gt;Microsoft.Win32;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; line-height: 20px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; line-height: 20px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;So we can accesss the Registry of the computer.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;Define a RegistryKey:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;// The path to the key where Windows looks for startup applications
RegistryKey rkApp=Registry.CurrentUser.OpenSubKey(&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,true);
&lt;/pre&gt;&lt;div dir=&quot;ltr&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can change the &lt;b&gt;CurrentUser&lt;/b&gt; to &lt;b&gt;LocalMachine &lt;/b&gt;if you want your application to run on startup for all users.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create the registry key and close the registry key handler:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;rkApp.SetValue(&quot;notepad&quot;, @&quot;C:\WINDOWS\system32\notepad.exe&quot;); // Make notepad run on startup                 
rkApp.Close(); //Close the RegistryKey handler
&lt;/pre&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now notepad will always run when you turn on your PC :P&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Nice registry locations can be found here:&amp;nbsp;&lt;a href=&quot;http://www.coresec.org/2011/03/12/windows-startup-methods/&quot;&gt;Registry Autostart Locations&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Have fun tweaking the registry :)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/06/run-application-on-windows-startup.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-1847016608578696376</guid><pubDate>Sun, 01 May 2011 20:00:00 +0000</pubDate><atom:updated>2011-09-20T18:11:03.765+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP .NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Downloads</category><category domain="http://www.blogger.com/atom/ns#">HTML</category><title>Danpe Presents: C# HTML Builder</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Having trouble building &lt;b&gt;HTML with C#&lt;/b&gt; ?&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Have you ever used something like this to generate HTML tables for example:&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;StringBuilder sb = new StringBuilder();
for (int i = 1; i &lt;= 32; i++)
{
    sb.AppendLine(&quot;&amp;lt;tr class=\&quot;row\&quot;&gt;&quot;);
    sb.AppendLine(&quot;&amp;lt;td&gt;&lt;span id=\&quot;rptOffers_ctl&quot; + i + &quot;_lblPos\&quot;&gt;&quot; + i + &quot;&lt;/span&gt;&amp;lt;/td&gt;&quot;);
    sb.AppendLine(&quot;&amp;lt;td&gt;&lt;span id=\&quot;rptOffers_ctl&quot; + i + &quot;_lblUserShort\&quot;&gt; &lt;/span&gt;&amp;lt;/td&gt;&quot;);
    sb.AppendLine(&quot;&amp;lt;td&gt;&lt;span id=\&quot;rptOffers_ctl&quot; + i + &quot;_lblAmount\&quot;&gt; &lt;/span&gt;&amp;lt;/td&gt;&quot;);
    sb.AppendLine(&quot;&amp;lt;td&gt;&lt;span id=\&quot;rptOffers_ctl&quot; + i + &quot;_lblID\&quot;&gt; &lt;/span&gt;&amp;lt;/td&gt;&quot;);
    sb.AppendLine(&quot;&amp;lt;/tr&gt;&quot;);
}
return sb.ToString();
&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;(As you see even the &lt;b&gt;SyntaxHighlighter&lt;/b&gt; couldn&#39;t handle all of those &lt;b&gt;Escape Characters&lt;/b&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
I&#39;m pretty sure you did :)&lt;br /&gt;
And you probably you hate all of those &lt;b&gt;Escape Characters&lt;/b&gt;! (/&quot; &quot; +)&lt;br /&gt;
And doing &lt;b&gt;sb.AppendLine&lt;/b&gt; all the time and doing all this formating!&lt;br /&gt;
Imagine you have 50 lines?? OMG...&lt;br /&gt;
&lt;br /&gt;
So anyway i made an Application to make you&#39;r life easier :)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz49r71k6WeD5Rrd4Edt5QrjR6cC7Lqrx16JRAWQQa4E_TFxf8wZS_GCYK1bzzRmCFlKU0CqTyt6fGg3LKlgz2CZT6AXCe_hqqg8cceXJeAR9pfXAS_ruIVkX7GFCxhjM0dC-yiIhBAGBH/s1600/C%2523+HTML+Builder.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz49r71k6WeD5Rrd4Edt5QrjR6cC7Lqrx16JRAWQQa4E_TFxf8wZS_GCYK1bzzRmCFlKU0CqTyt6fGg3LKlgz2CZT6AXCe_hqqg8cceXJeAR9pfXAS_ruIVkX7GFCxhjM0dC-yiIhBAGBH/s400/C%2523+HTML+Builder.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Simple as it looks :)&lt;br /&gt;
Download Here: &lt;a href=&quot;http://www.mediafire.com/?7ew49ti37h3sbyf&quot; target=&quot;_blank&quot;&gt;C# HTML Builder&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/05/danpe-presents-c-html-builder.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz49r71k6WeD5Rrd4Edt5QrjR6cC7Lqrx16JRAWQQa4E_TFxf8wZS_GCYK1bzzRmCFlKU0CqTyt6fGg3LKlgz2CZT6AXCe_hqqg8cceXJeAR9pfXAS_ruIVkX7GFCxhjM0dC-yiIhBAGBH/s72-c/C%2523+HTML+Builder.jpg" height="72" width="72"/><thr:total>11</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-9008918742698152078</guid><pubDate>Mon, 18 Apr 2011 01:12:00 +0000</pubDate><atom:updated>2011-04-18T04:17:14.497+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP .NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>Increase SQL Value By 1?</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hey,&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Fast solution for today.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Ever wanted to increase SQL value by 1 ?&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Yes, a stupid way to do it is by using &lt;b&gt;SELECT&lt;/b&gt; to read the value, and then use &lt;b&gt;UPDATE&lt;/b&gt; to update to the new value. (&lt;u&gt;Your prolly asked your self, why cant i &lt;b&gt;VALUE++&lt;/b&gt;?!&lt;/u&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So you can do it in 1 request using &lt;b&gt;UPDATE&lt;/b&gt; :)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Ever thought of &lt;b&gt;Value = Value + 1&lt;/b&gt; ?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;using (SqlConnection con = new SqlConnection(SQL.ConnectionString())) //Use your own Connection String
{
    con.Open();
    string sqlString = &quot;UPDATE Table SET Value=Value+1 WHERE Condition=@Condition&quot;;
    SqlCommand cmd = new SqlCommand(sqlString, con); 
    cmd.Parameters.Add(&quot;@Condition&quot;, ConditionString); 
    rowAffected = cmd.ExecuteNonQuery(); 
    if (rowAffected &amp;gt; 0) 
        DoSomething(); //Success! 
    else 
        DoSomething(); //Fail!
}
&lt;/pre&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;As you see i&#39;m using &lt;b&gt;Parameterized Query &lt;/b&gt;that i will explain in a later post.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This code will increase &#39;Value&#39; by 1 where &#39;Condition&#39;=&#39;ConditionString&#39;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;connection will automaticly close becuase of the &#39;using&#39; statement.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hope it helps you,&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Have fun and Happy Passover :P&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/04/increase-sql-value-by-1.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-7428078660059323310</guid><pubDate>Mon, 11 Apr 2011 10:15:00 +0000</pubDate><atom:updated>2011-04-11T13:19:15.760+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>SQL NOW() wont work in Stored Procedures</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;direction: ltr;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hey everyone im back after long time.. :)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This time i&#39;m gonna give you a little solution to a problem i faced few weeks ago.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Have you ever wondered why &#39;&lt;b&gt;NOW()&lt;/b&gt;&#39; wont work in MSSQL Stored Procedure?&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Yes, i wondered too.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So the replacment to &#39;&lt;b&gt;NOW()&lt;/b&gt;&#39; is &#39;&lt;b&gt;GETDATE()&lt;/b&gt;&#39; :)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So just use &#39;&lt;b&gt;GETDATE()&lt;/b&gt;&#39; it will give you the same result as &#39;&lt;b&gt;NOW()&lt;/b&gt;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hope this little solution helps you&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow; font-family: Arial, Helvetica, sans-serif;&quot;&gt;And i&#39;m back now to give you all more solutions :)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2011/04/sql-now-wont-work-in-stored-procedures.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-5222741752941885205</guid><pubDate>Thu, 21 Oct 2010 11:08:00 +0000</pubDate><atom:updated>2010-10-21T13:11:31.861+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><title>Disable Direct Access to iframe !</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hey today i&#39;m gonna show you how to NOT let people access your iframe directly !&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It&#39;s quiet simple in JavaScript ;)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;here is the code: (make sure you put it above the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;tag)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    if (top.location == self.location) {
        top.location = &quot;FULL-URL-HERE&quot;;
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Just make sure you replace the &quot;FULL-URL-HERE&quot; to the URL you would like to redirect them ;)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And you&#39;r done no one can access your iframe directly :)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2010/10/disable-direct-access-to-iframe.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-1515130940103476915</guid><pubDate>Wed, 06 Oct 2010 16:51:00 +0000</pubDate><atom:updated>2012-10-03T15:10:43.591+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Console Application</category><title>Run C# Console Application Without a Window</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Or simply run a hidden Console Application. (C#)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Ok first of all if you want the application to be hidden right click the &lt;b&gt;Project&lt;/b&gt; in the &lt;b&gt;Solution Explorer&lt;/b&gt; then &lt;b&gt;Properties &lt;/b&gt;inside Properties go to &lt;b&gt;Application&lt;/b&gt; then &lt;b&gt;Output type &lt;/b&gt;and change &lt;b&gt;Console Application &lt;/b&gt;to&lt;b&gt; Windows Application&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now if you want to run a hidden Console Application from a running Console Application we gonna do some coding :)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;First of all -&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Diagnostics;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;direction: ltr; text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;direction: ltr; font-family: Arial; font-size: small; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;Process myProcess = new Process();
myProcess.StartInfo.FileName = @&quot;C:\App.exe&quot;; // Path to the Application
myProcess.StartInfo.CreateNoWindow = true; // YES create in new window
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //Make the new window Hidden :)
myProcess.Start();&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial;&quot;&gt;Now you&#39;r done :)&lt;br /&gt;
&lt;br /&gt;
Happy coding, and don&#39;t forget to subscribe ! :P&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2010/10/run-c-console-application-without.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-1446909095791820737</guid><pubDate>Mon, 20 Sep 2010 20:10:00 +0000</pubDate><atom:updated>2010-09-20T22:18:08.023+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Internet Explorer</category><category domain="http://www.blogger.com/atom/ns#">Javascript</category><title>Internet Explorer breaks setInterval ?</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Today i faced a stupid bug in Internet Explorer 8 and javascript.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;I had my code in javascript:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;setInterval(timer,&amp;nbsp;0.1);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;If you are not familiar with &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.w3schools.com/jsref/met_win_setinterval.asp&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;setInterval&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; &amp;lt;- click the link :)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This code worked perfectly on any browser except IE 8 and below.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;I sat for hours trying to sort it out, and finely found the problem.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;IE is too slow to make this loop work... (WTF?)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;So i changed it to&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;setInterval(timer,&amp;nbsp;1);&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; And tested it on few computers..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Only fast PCs could run this code on IE.. but on other browsers it worked perfectly even on slow PCs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;SO.... i changed the line to &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;setInterval(timer,&amp;nbsp;10); &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;and its finely did the job.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This article was written to tell you DO NOT USE IE.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;USE &lt;/span&gt;&lt;a href=&quot;http://www.google.com/chrome/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Google Chrome&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Friends doesn&#39;t let friends use Internet Explorer.&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2010/09/today-i-faced-stupid-bug-in-internet.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-3504198251962833765</guid><pubDate>Mon, 20 Sep 2010 16:08:00 +0000</pubDate><atom:updated>2010-09-20T18:11:27.993+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP .NET</category><category domain="http://www.blogger.com/atom/ns#">Facebook</category><title>Facebook Comments Integration</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hey,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This time i&#39;ll show you how to integrate Facebook Comments into your website using&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;ol dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Facebook JavaScript SDK&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;XFBML&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;First of all Sign up to&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.facebook.com/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Facebook&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;;) (&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;em style=&quot;font-style: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Duh)&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;em style=&quot;font-style: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;After you have an account you need to verify your self as a developer.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You need to go&amp;nbsp;&lt;a href=&quot;http://www.facebook.com/confirmphone.php&quot;&gt;Here&lt;/a&gt;&amp;nbsp;and follow the steps, a code will be sent to your Phone and you need to type it there and you will get confirmed.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now you need to sign up for an application go here -&amp;nbsp;&lt;a href=&quot;http://developers.facebook.com/setup/&quot;&gt;Create an Application&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;And fill in the necessary fields.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;Notice&lt;/u&gt;: You may get &quot;&lt;b&gt;Sorry, an error has occurred&lt;/b&gt;&quot; - This is bullshit !&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;After you get this error or succeeds to create application go to&amp;nbsp;&lt;a href=&quot;http://www.facebook.com/developers/apps.php&quot;&gt;My Applications&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Inside your application you&#39;ll see &lt;b&gt;&lt;u&gt;Application ID&lt;/u&gt;&lt;/b&gt;,&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;We will use it later.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;Notice&lt;/u&gt;: It can take between 2 to 20 minutes until it will be ready to use.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now go to the page that you want to the FB Comments to it, go to your &lt;b&gt;&amp;lt;html&amp;gt;&lt;/b&gt; tags and add this line inside the tag: &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;So now your &amp;lt;html&amp;gt; tag should look like this:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;After the &lt;b&gt;&amp;lt;body&amp;gt; &lt;/b&gt;tag add this:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;body&amp;gt;
&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;script src=&quot;http://static.ak.fbcdn.net/connect/en_US/core.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
    FB.init({ apiKey: &#39;YOUR APP ID&#39;,
              status: true,
              xfbml: true });
    FB.XFBML.parse();
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;And change &#39;&lt;b&gt;YOUR APP ID&lt;/b&gt;&#39; to the&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Application ID &lt;/b&gt;we got before.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now go to&amp;nbsp;&lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/comments&quot;&gt;Comments Social Plugin&lt;/a&gt;&amp;nbsp;on facebook, and generate the code you would like to use.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;for an example i use:&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;div id=&quot;RectFacebookComments&quot;&amp;gt;
    &amp;lt;fb:comments xid=&quot;123&quot; width=&quot;640&quot; canpost=&quot;true&quot; candelete=&quot;true&quot;&amp;gt;&amp;lt;/fb:comments&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now offcourse that we want a Dynamic xid...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This is how you do it in ASP .NET (C#):&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Go to the page.cs file and create a method that returns the ID you want as a string:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public string GetID()
{
    if (Request[&quot;id&quot;] != null)
        return Request[&quot;id&quot;].ToString();
    return &quot;&quot;;
}&lt;/pre&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;And change &lt;b&gt;xid=&quot;123&quot;&lt;/b&gt; to&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;&amp;lt;%&lt;/b&gt;&lt;/span&gt;&lt;b&gt;GetID();&lt;/b&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;%&amp;gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Thats it your done :D&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: consolas; white-space: pre;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Let me know if you have any questions ;-)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2010/09/facebook-comments-integration.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>10</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5143257499073976617.post-630312824840672556</guid><pubDate>Sat, 18 Sep 2010 22:58:00 +0000</pubDate><atom:updated>2010-09-19T23:06:07.089+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>jQuery Scrollbars</title><description>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Hey readers this is my first post :)&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Today i wanted my div to have a scrollbar...&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;to make your div support scrollbar you should use CSS property &#39;overflow&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;scroll-pane&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: maroon;&quot;&gt;.Div&lt;/span&gt;&amp;nbsp;{
 &lt;span style=&quot;color: red;&quot;&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;#ccc&lt;/span&gt;;
 &lt;span style=&quot;color: red;&quot;&gt;width&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;640px&lt;/span&gt;;
 &lt;span style=&quot;color: red;&quot;&gt;height&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;385px&lt;/span&gt;;
 &lt;span style=&quot;color: red;&quot;&gt;overflow&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;auto&lt;/span&gt;;
}&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;T&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;his will make a scrollbar, but who want to use those ugly default browser scrollbars? &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;So i found a great plugin fo&lt;/span&gt;r jQuery called &lt;a href=&quot;http://jscrollpane.kelvinluck.com/&quot;&gt;jScrollPane&lt;/a&gt;.&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;This awsome plugin lets you design your own scrollbar using CSS and even more!&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;First of all you need to download it, or you can get his Git from &lt;a href=&quot;http://github.com/vitch/jScrollPane&quot;&gt;Here&lt;/a&gt;.&lt;span id=&quot;goog_939647483&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_939647484&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;(To get Git you can use &lt;a href=&quot;http://code.google.com/p/tortoisegit/&quot;&gt;TortoiseGit&lt;/a&gt;)&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;After you have all the files you need link them to your HTML file&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;href&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;js/jquery.jscrollpane.css&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;rel&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;text/css&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;js/jquery.mousewheel.js&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;pre style=&quot;font-family: consolas; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;js/jquery.jscrollpane.min.js&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;Now define the scrollpane class&lt;/pre&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;pre style=&quot;font-family: consolas; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;text/javascript&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;{
  $(&lt;span style=&quot;color: maroon;&quot;&gt;&#39;.scroll-pane&#39;&lt;/span&gt;).jScrollPane();
 });
&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;(Add this after the links to the files)&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;add a little css:&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;.scroll-pane&lt;/span&gt;
{
 &lt;span style=&quot;color: red;&quot;&gt;width&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;100%&lt;/span&gt;;
 &lt;span style=&quot;color: red;&quot;&gt;height&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;200px&lt;/span&gt;;
 &lt;span style=&quot;color: red;&quot;&gt;overflow&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;auto&lt;/span&gt;;
}&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;Now easily just create a div giving him class=&quot;scroll-pane&quot;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;and thats really it :)&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;scroll-pane&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;p&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;     Content Here
 &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;p&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: small; line-height: 18px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;And you&#39;r done :)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://danpesolutions.blogspot.com/2010/09/jquery-scrollbars.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item></channel></rss>