<?xml version="1.0" encoding="windows-1251"?>
<!-- generator="wordpress/2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>protsyk.com</title>
	<link>http://protsyk.com/cms</link>
	<description></description>
	<pubDate>Fri, 18 Jun 2010 17:41:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Creating shadows in WPF &#038; Silverlight games</title>
		<link>http://protsyk.com/cms/?p=284</link>
		<comments>http://protsyk.com/cms/?p=284#comments</comments>
		<pubDate>Fri, 18 Jun 2010 17:39:18 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=284</guid>
		<description><![CDATA[In this short post I will show example of creating shadows for isometric games, like one shown on the picture below:
 
For this purpose you need an image with transparent background. Then a copy of the image should be:
1) Flipped - Scale transform (y = -1)
&#60;ScaleTransform ScaleY=&#8221;-1&#8243; /&#62;
2)  Skewed - To simulate position of light
&#60;SkewTransform AngleX=&#8221;20&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>In this short post I will show example of creating shadows for isometric games, like one shown on the picture below:</p>
<p style="text-align: center"> <img src="http://protsyk.com/cms/wp-content/uploads/2010/06/wpfshadow_game.png" alt="wpfshadow_game.png" /></p>
<p>For this purpose you need an image with transparent background. Then a copy of the image should be:</p>
<p>1) Flipped - Scale transform (y = -1)</p>
<blockquote><p>&lt;ScaleTransform ScaleY=&#8221;-1&#8243; /&gt;</p></blockquote>
<p>2)  Skewed - To simulate position of light</p>
<blockquote><p>&lt;SkewTransform AngleX=&#8221;20&#8243; /&gt;</p></blockquote>
<p>3) Blurred</p>
<blockquote><p>&lt;BlurEffect&gt;&lt;/BlurEffect&gt;</p></blockquote>
<p>4) Opacity Mask applied to make shadow more realistic</p>
<blockquote><p>&lt;LinearGradientBrush StartPoint=&#8221;0.5,1&#8243; EndPoint=&#8221;0.5,0&#8243; &gt;</p>
<p>    &lt;LinearGradientBrush.GradientStops&gt;&lt;GradientStop Offset=&#8221;0&#8243; Color=&#8221;Black&#8221;/&gt;</p>
<p>           &lt;GradientStop Offset=&#8221;1&#8243; Color=&#8221;Transparent&#8221;/&gt;</p>
<p>    &lt;/LinearGradientBrush.GradientStops&gt;</p>
<p>&lt;/LinearGradientBrush&gt;</p></blockquote>
<p>5) Source image transformed to Black and White:</p>
<blockquote><p>&lt;FormatConvertedBitmap  Source=&#8221;..&#8221;  </p>
<p>DestinationFormat=&#8221;BlackWhite&#8221; /&gt;</p></blockquote>
<p>As a result you will get something like this:</p>
<p style="text-align: center"> <img src="http://protsyk.com/cms/wp-content/uploads/2010/06/wpfshadow.png" alt="wpfshadow.png" /></p>
<p style="text-align: left"><strong>Links:</strong></p>
<p style="text-align: left"><a href="http://protsyk.com/cms/wp-content/uploads/2010/06/wpfshadow.zip" title="wpfshadow.zip">Download</a> Source</p>
<p><a href="http://www.codeproject.com/KB/WPF/WPFImageEffects.aspx">Code Project Article</a> on the same topic</p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=284</wfw:commentRss>
		</item>
		<item>
		<title>Using S# to generate PDF documents</title>
		<link>http://protsyk.com/cms/?p=280</link>
		<comments>http://protsyk.com/cms/?p=280#comments</comments>
		<pubDate>Thu, 20 May 2010 17:41:36 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<category><![CDATA[.NET Corner]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=280</guid>
		<description><![CDATA[Introduction
S# is a .NET scripting language. It is good for creating domain specific languages and embedding scripts into .NET application. Few days ago a great article revealing integration between S# and XAML in Silverlight was posted.
In this post I am going to show another useful application of S# language as an extensible markup for creating [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p><a href="http://visualizationtools.net/default/?page_id=2436">S#</a> is a .NET scripting language. It is good for creating domain specific languages and embedding scripts into .NET application. Few days ago a great article revealing integration between <a href="http://denisvuyka.wordpress.com/2010/05/19/dynamic-silverlight-forms-embedding-s-scripts-into-xaml">S# and XAML in Silverlight</a> was posted.</p>
<p>In this post I am going to show another useful application of S# language as an extensible markup for creating PDFs.</p>
<p>Obviously S# will not generate PDFs itself. There is a whole range of different components for producing PDF files. They are powerful in their functionality and may be used in .NET languages such as C# or S#.</p>
<p>I am going to use <a href="http://itextpdf.com/">iText library</a>. This is a library that allows you to generate PDF files on the fly. Here is a quote from official iText site: &#8220;Typically you won&#8217;t use it on your Desktop as you would use Acrobat or any other PDF application. Rather, you&#8217;ll build iText into your own applications so that you can automate the PDF creation and manipulation process.&#8221;</p>
<p>Let&#8217;s make a step further and wrap iText into S# scripting language to produce a markup language for generating PDF documents.</p>
<p><strong>Goal</strong></p>
<p>My aim is to get following script working and producing correct document like given on the picture below the script:</p>
<p class="code"><span class="InlineComment">//Create document at given location</span><br />
BeginDocument(<span class="String">&#8220;c:\\output.pdf&#8221;</span>);<span class="InlineComment">//Change title in documentâ&#8217;s meta dataÂ </span><br />
ActiveDocument.AddTitle(&#8217;Sample document&#8217;);</p>
<p><span class="InlineComment">//Create paragraphs with different alignment and color options</span><br />
Paragraph(&#8217;Hello World&#8217;, ALIGN_CENTER);<br />
Paragraph(&#8217;This <span class="Keyword">is</span> demo&#8217;, ALIGN_RIGHT, BLUE);<br />
Paragraph(&#8217;This pdf was generated <span class="Linq">by</span> S#&#8217;, GREEN);</p>
<p><span class="InlineComment">//Create a list of string items</span><br />
BeginList();<br />
  ListItem(&#8217;One&#8217;);<br />
  ListItem(&#8217;Two&#8217;);<br />
  ListItem(&#8217;Three&#8217;);<br />
EndList();</p>
<p><span class="InlineComment">//Create a table with tree columns</span><br />
BeginTable(3);<br />
<span class="InlineComment">//Create cells for the first row</span><br />
Cell(&#8217;1&#8242;);<br />
Cell(&#8217;One&#8217;);<br />
Cell(Paragraph(&#8217;Description of One&#8217;, RED));</p>
<p><span class="InlineComment">//Create cells for second row</span><br />
Cell(&#8217;2&#8242;);<br />
Cell(&#8217;Two&#8217;);<br />
Cell(&#8217;Description of Two&#8217;);<br />
EndTable();</p>
<p><span class="InlineComment">//Flush and close document</span><br />
EndDocument();</p>
<p>Target PDF document:<br />
<img src="http://protsyk.com/cms/wp-content/uploads/2010/05/pdfgenerator.jpg" alt="pdfgenerator.jpg" /></p>
<p><strong>Implementation</strong></p>
<p>S# has many points for extensibility and customization. For the task purpose we will be using context customization via constants and custom functions.</p>
<p>Preferable pattern for such customization is to introduce a new facade over standard RuntimeHost class from S#:</p>
<p class="code"><span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ReferenceType">class</span> PdfRuntimeHost<br />
{<br />
  <span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ValueType">void</span> Initialize()<br />
  {<br />
    RuntimeHost.Initialize();      <br />
    <span class="InlineComment">//Make any required customization to RuntimeHost</span><br />
  }<br />
}</p>
<p>ScriptContext is a part Script instance. ScriptContext store run-time information about variables, functions, scopes, etc which will be used during script execution.</p>
<p>There are two static methods within Script class for compiling and executing code:</p>
<p class="code"><span class="Namespace">namespace</span> Orbifold.SSharp<br />
{<br />
 <span class="Modifier">public</span> <span class="ReferenceType">class</span> Script : IDisposable<br />
 {<br />
  <span class="Modifier">public</span> <span class="Modifier">static</span> Script Compile(<span class="ReferenceType">string</span> code);<br />
  <span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ReferenceType">object</span> RunCode(<span class="ReferenceType">string</span> code);<br />
 <br />
  &#8230; <br />
 }</p>
<p>Again, preferred pattern for customization is to create a new fa&#231;ade class which customizes ScriptContext for those methods. So, I will introduce two new methods to PdfRuntimeHost class:</p>
<p class="code"><span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ReferenceType">class</span> PdfRuntimeHost<br />
{<br />
 <span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ValueType">void</span> Initialize()<br />
 {<br />
  RuntimeHost.Initialize();<br />
 }<br />
 <br />
 <span class="Modifier">public</span> <span class="Modifier">static</span> Script Compile(<span class="ReferenceType">string</span> code)<br />
 {<br />
  Script s = Script.Compile(code);<br />
  CustomizeScriptContext(s.Context);<br />
  <span class="Statement">return</span> s;<br />
 }<br />
 <br />
 <span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ReferenceType">object</span> RunCode(<span class="ReferenceType">string</span> code)<br />
 {<br />
  IScriptContext context = <span class="Keyword">new</span> ScriptContext();<br />
  CustomizeScriptContext(context);<br />
  <span class="Statement">return</span> Script.RunCode(code, context);<br />
 }. . .</p>
<p>Context customization is quite simple itself. I am going to introduce couple of constants:</p>
<p class="code">context.SetItem(<span class="String">&#8220;ALIGN_CENTER&#8221;</span>, <span class="String">&#8220;CENTER&#8221;</span>); <span class="InlineComment">//iText alignment values</span><br />
context.SetItem(<span class="String">&#8220;ALIGN_LEFT&#8221;</span>, <span class="String">&#8220;LEFT&#8221;</span>);<br />
context.SetItem(<span class="String">&#8220;ALIGN_RIGHT&#8221;</span>, <span class="String">&#8220;RIGHT&#8221;</span>);<br />
 <br />
context.SetItem(<span class="String">&#8220;RED&#8221;</span>, <span class="Keyword">new</span> BaseColor(255, 0, 0)); <span class="InlineComment">//iText colors</span><br />
context.SetItem(<span class="String">&#8220;GREEN&#8221;</span>, <span class="Keyword">new</span> BaseColor(0, 255, 0));<br />
context.SetItem(<span class="String">&#8220;BLUE&#8221;</span>, <span class="Keyword">new</span> BaseColor(0, 0, 255));</p>
<p>There will be three variables:</p>
<p class="code">context.SetItem(Functions.ActiveListVariable, <span class="Keyword">null</span>);<br />
context.SetItem(Functions.ActiveTableVariable, <span class="Keyword">null</span>);<br />
context.SetItem(Functions.ActiveDocumentVariable, <span class="Keyword">null</span>);</p>
<p>ActiveDocumentVariable – will store reference to active Document object<br />
ActiveListVariable – will store reference to active list variable<br />
ActiveTableVariable – will store reference to active table variable</p>
<p>Note that it is not possible to have nested objects, like list of lists, or table containing other table in one of cells. However, this limitation may be overcome by introducing stacks of active containers instead of single reference variable.</p>
<p>At the final step I will build functional structure of new language. Let’s consider Paragraph function as example (Other functions may be found in Functions.cs file in supplied solution file).</p>
<p>Paragraph function creates new paragraph object and automatically appends it to the document when necessary.</p>
<p class="code"><span class="Modifier">public</span> <span class="Modifier">static</span> <span class="ReferenceType">object</span> Paragraph(IScriptContext context, <span class="ReferenceType">object</span>[] args)<br />
{<br />
 <span class="InlineComment">//Extract active document from context</span><br />
 Document document = <br />
    context.GetItemAs&lt;Document&gt;(ActiveDocumentVariable);<br />
 <br />
 <span class="InlineComment">//Create new paragraph object. First argument – is a text</span><br />
 Paragraph pf = <span class="Keyword">new</span> Paragraph((<span class="ReferenceType">string</span>)args[0]);<br />
   <br />
 <span class="InlineComment">//If two arguments provided, second may be either color or</span><br />
 <span class="InlineComment">//alignment value</span><br />
 <span class="Statement">if</span> (args.Length == 2)<br />
 {<br />
    BaseColor color = args[1] <span class="Keyword">as</span> BaseColor;<br />
    <span class="Statement">if</span> (color == <span class="Keyword">null</span>)<br />
     pf.SetAlignment((<span class="ReferenceType">string</span>)args[1]);<br />
    <span class="Statement">else</span><br />
     pf.Font.Color = color;<br />
 }<br />
 <br />
 <span class="InlineComment">//If there are three arguments, second is alignment, and</span><br />
 <span class="InlineComment">//third is a color</span><br />
 <span class="Statement">if</span> (args.Length == 3)<br />
 {<br />
    pf.SetAlignment((<span class="ReferenceType">string</span>)args[1]);<br />
    pf.Font.Color = (BaseColor)args[2];<br />
 }<br />
 <br />
 <span class="InlineComment">//Should we add paragraph to the document,</span><br />
 <span class="InlineComment">//or it was generated for other container, i.e. List or Table</span><br />
 <span class="Statement">if</span> (!IsContainerScope(context))<br />
    document.Add(pf);<br />
 <br />
 <span class="Statement">return</span> pf;<br />
}</p>
<p>Now, each new function should be added into ScriptContext like this:</p>
<p class="code">context.SetItem(<span class="String">&#8220;BeginDocument&#8221;</span>, <br />
            <span class="Keyword">new</span> FunctionWrapper(Functions.BeginDocument));</p>
<p>Where FunctionWrapper is class implementing S#’s IInvokable interface. It takes method delegate as a first constructor parameter and executes this delegate as a result of invoking Invoke method with supplied parameters.</p>
<p><strong>Conclusion</strong></p>
<p>This example gives a good example of S# language customization. With a few simple steps you may create your own domain specific language. In this example such language simulates PDF markup.</p>
<p>But it is not only a markup. It is also a program and experienced users may write scripts which benefits from this:</p>
<p class="code">BeginList();<br />
  <span class="Statement">for</span>(i=0; i&lt;10; i++)<br />
ListItem(i.ToString());<br />
EndList();</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="http://protsyk.com/cms/wp-content/uploads/2010/05/protsykpdfdemo.pdf">Generated PDF file</a></li>
<li><a href="http://protsyk.com/cms/wp-content/uploads/2010/05/protsykpdfgeneration.zip">S# PDF Generator (Sources)</a></li>
<li><a href="http://protsyk.com/cms/wp-content/uploads/2010/05/ssharptopdf.pdf" title="ssharptopdf.pdf">This post in PDF</a> format</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=280</wfw:commentRss>
		</item>
		<item>
		<title>Guidelines for Properties in C#: Property vs Field</title>
		<link>http://protsyk.com/cms/?p=272</link>
		<comments>http://protsyk.com/cms/?p=272#comments</comments>
		<pubDate>Wed, 07 Oct 2009 07:03:51 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[.NET Corner]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=272</guid>
		<description><![CDATA[This post is a summary of guidelines and rules for choosing between Property and Field in C# language. In general fields - should be used to store internal state of an object and should not be public. You will never (except maybe few exceptions) find public fields in base .NET class library. 
On the contrary Property [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a summary of guidelines and rules for choosing between Property and Field in C# language. In general fields - should be used to store internal state of an object and should not be public. You will never (except maybe few exceptions) find public fields in base .NET class library.<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; font-size: 11px"> </span>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">On the contrary Property should expose distinguishing feature of an object either public or protected. There should not be much use of the private properties as they are points of confusion with a fields.</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">Property not always represents storage of data values - it may be evaluated at accessing. That is why property might expose side-effect which will never happen while using fields, for example, consider following code snippet:</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">MyClass o = new MyClass();</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">o.Property = &#8220;Hello&#8221;;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">return o.Property == &#8220;Hello&#8221;;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">One would expect this to return true, but as seen from example it would not be always the case. Consider this:</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">string Property</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">{</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  get { return string.Empty; }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  set { }}</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">Ideally following rule should be considered while designing public property: <strong>immediate access to the property getter after setting some value should return this value</strong>.</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">Often properties are used to implement change notification via <strong>INotifyPropertyChanged </strong>interface and I would recommend to follow such pattern initially described to me by <a href="http://denisvuyka.wordpress.com/">Denis Vuyka </a>(notice how property name passed to OnPropertyChanged handler, thus in future it will ease maintaining code during property renaming) :</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">public class MyClass : INotifyPropertyChanged</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">{</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    private string message;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    public string Message</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      get</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        return message;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      set</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        if (object.Equals(message, value)) return;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        message = value;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        OnPropertyChanged(() =&gt; this.Message);</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    #region INotifyPropertyChanged Members</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    public event PropertyChangedEventHandler PropertyChanged;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    protected virtual void</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        OnPropertyChanged(</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      Expression&lt;Func&lt;object&gt;&gt; propertyFunc)</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">      if (PropertyChanged != null)</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">        PropertyChanged.Invoke(this, new</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">          PropertyChangedEventArgs(</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">            ((MemberExpression)propertyFunc.Body)</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">               .Member.Name));</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    #endregion</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">Another common side effect which might be exposed by property - is a modification of the object&#8217;s state during getting value:</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">public class Wrong</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">{</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  string newText = null;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  public string Text</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    get</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    {</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">       if (newText == null)</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">         newText = GetTextConstant();</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">       return newText;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">    &#8230;.</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">  }</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">}</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">This behaviour may lead to unexpected results. Consider example of WinForm multi-threaded application whereas background thread access objects in Read-Only manner, i.e. it uses only property getters. UI in main thread subscribes to all objects changes for updating. Now, if getter in background thread will cause change in state of the instance, it will raise change event. UI update handler will be invoked in background thread which may lead to application crash.</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">&nbsp;</p>
<p style="border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; border-width: 0px; padding: 0px; margin: 0px">So, now we are ready to formulate another fundamental rule: <strong>accessing property getter should never lead to object&#8217;s state change.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=272</wfw:commentRss>
		</item>
		<item>
		<title>S# puzzle game Cli-Q</title>
		<link>http://protsyk.com/cms/?p=270</link>
		<comments>http://protsyk.com/cms/?p=270#comments</comments>
		<pubDate>Thu, 25 Jun 2009 06:35:27 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<category><![CDATA[.NET Corner]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=270</guid>
		<description><![CDATA[Cli-Q is a space-travel puzzle game on Silverlight advertising S# language as scripting language for games.
 
Cliq-Q exposes simple object model allowing developer easily extend functionality, create new levels and in future - new types of gaming objects.
The game field contains player object - white circle, win point - orange circle and a number of static [...]]]></description>
			<content:encoded><![CDATA[<p>Cli-Q is a space-travel puzzle game on Silverlight advertising S# language as scripting language for games.</p>
<p style="text-align: center"> <img src="http://protsyk.com/cms/wp-content/uploads/2009/06/cliqlogo.PNG" alt="Cli-Q Logo" /></p>
<p>Cliq-Q exposes simple object model allowing developer easily extend functionality, create new levels and in future - new types of gaming objects.</p>
<p>The game field contains player object - white circle, win point - orange circle and a number of static obstacles and dynamic objects. Static obstacles simply stops player object from further movement, while dynamic objects - such as triangles may change direction of further movement:</p>
<p align="center" style="text-align: center"><img src="http://protsyk.com/cms/wp-content/uploads/2009/06/game.gif" alt="Game field" /></p>
<p align="center" style="text-align: center"><a href="http://www.protsyk.com/scriptdotnet/sl/Cliq.html">Play Now</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=270</wfw:commentRss>
		</item>
		<item>
		<title>On-Line calculator based on Script.NET for Silverlight 2.0</title>
		<link>http://protsyk.com/cms/?p=249</link>
		<comments>http://protsyk.com/cms/?p=249#comments</comments>
		<pubDate>Tue, 07 Apr 2009 17:49:04 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<category><![CDATA[.NET Corner]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=249</guid>
		<description><![CDATA[As I&#8217;ve promised few weeks ago there is now Silverlight version of Script.NET. I&#8217;ve searched through Web and I think this is a first fully functional scripting engine for Silverlight. If this is wrong - please notify me at piter.protsyk@gmail.com and I will correct this information. Please also note that my understanding of scripting is quite different from those [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve promised few weeks ago there is now Silverlight version of <a href="http://www.protsyk.com/scriptdotnet">Script.NET</a>. I&#8217;ve searched through Web and I think this is a first fully functional scripting engine for Silverlight. If this is wrong - please notify me at <a href="mailto:piter.protsyk@gmail.com">piter.protsyk@gmail.com</a> and I will correct this information. Please also note that my understanding of scripting is quite different from those of Microsoft&#8217;s view with regards of IronPython and IronRuby. Both of these languages emits IL code and generates dynamic assemblies/method which then executed on .NET. In contrast Script.NET is a pure interpreted language which has a number of advantages.</p>
<p>To proof a concept of Script.NET for Silverlight I&#8217;ve created the On-Line calculator on its basis:</p>
<p align="center"><img src="http://protsyk.com/cms/wp-content/uploads/2009/04/silverlightcalc.PNG" alt="Silverlight 2.0 Calc" /></p>
<p align="center"> <a href="http://www.protsyk.com/scriptdotnet/sl/Calc.html">Silverlight 2.0 Calculator Based on Script.NET</a></p>
<p align="center"><a href="http://www.protsyk.com/scriptdotnet/samples/applications/Silverlight%20Calculator.zip">Sources &amp; Binaries</a></p>
<p>Enjoy!</p>
<p>It can execute any valid Script.NET expression and has access to only one .NET type - Math.</p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=249</wfw:commentRss>
		</item>
		<item>
		<title>Script.NET for Compact Framework</title>
		<link>http://protsyk.com/cms/?p=247</link>
		<comments>http://protsyk.com/cms/?p=247#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:57:59 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=247</guid>
		<description><![CDATA[Today I am glad to announce the first version of Script.NET which is able to run on Compact Framework (3.5).
It could be downloaded by the following link:
Script.NET for CF.
Also I would like to thank Steve Higgins without whom CF version of Script.NET most probably would not appear.
Meantime, in the nearest future I will produce a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am glad to announce the first version of Script.NET which is able to run on Compact Framework (3.5).</p>
<p>It could be downloaded by the following link:</p>
<p align="center"><a href="http://www.protsyk.com/scriptdotnet/versions/latest/IronyScriptDotNet.zip">Script.NET for CF</a>.</p>
<p>Also I would like to thank Steve Higgins without whom CF version of Script.NET most probably would not appear.</p>
<p>Meantime, in the nearest future I will produce a Silverlight version of Script.NET.</p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=247</wfw:commentRss>
		</item>
		<item>
		<title>Synchronuos start of many instances of the same process</title>
		<link>http://protsyk.com/cms/?p=242</link>
		<comments>http://protsyk.com/cms/?p=242#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:09:29 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=242</guid>
		<description><![CDATA[Suppose you need to start 5 instances of the same process simultaneously. There are no problems until those process does not use resources exclusively. For example they are trying to write to the same log file at the same time:

In this case you will need to synchronize them in a some way. You may want [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you need to start 5 instances of the same process simultaneously. There are no problems until those process does not use resources exclusively. For example they are trying to write to the same log file at the same time:</p>
<p style="text-align: center"><img src="http://protsyk.com/cms/wp-content/uploads/2009/02/config1.GIF" alt="config1.GIF" /></p>
<p>In this case you will need to synchronize them in a some way. You may want to make those processes to run some sections of code in a mutually exclusive mode:</p>
<p style="text-align: center"><img src="http://protsyk.com/cms/wp-content/uploads/2009/02/config2.GIF" alt="config2.GIF" /></p>
<p> This may be naturally achieved by introducing a <a href="http://protsyk.com/cms/wp-admin/msdn.microsoft.com/en-us/library/system.threading.mutex.aspx">mutex </a>synchronization. The sample below shows this approach on practice: <a href="http://protsyk.com/cms/wp-content/uploads/2009/02/mutex.zip" title="mutex.zip">mutex.zip</a></p>
<p>To see the results start several instances of this application at the same time, and the release mutex lock by pressing any key on the application&#8217;s console. You will see how other processes will react on this event:</p>
<p style="text-align: center"><img src="http://protsyk.com/cms/wp-content/uploads/2009/02/synchronizedstart.JPG" alt="synchronizedstart.JPG" /></p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=242</wfw:commentRss>
		</item>
		<item>
		<title>Script.NET 1.2 is comming!</title>
		<link>http://protsyk.com/cms/?p=241</link>
		<comments>http://protsyk.com/cms/?p=241#comments</comments>
		<pubDate>Fri, 20 Feb 2009 09:04:22 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=241</guid>
		<description><![CDATA[Today I am glad to announce a new improved version of Script.NET. It got its number 1.2. It is not yet a replacement for a previous branch, but is a more treated as public community preview version to gather your feedback.
You may find a download-able package by the link below:
Download Script.NET 1.2
This version achieved a new milestone in the continuous development [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am glad to announce a new improved version of Script.NET. It got its number 1.2. It is not yet a replacement for a previous branch, but is a more treated as public community preview version to gather your feedback.</p>
<p>You may find a download-able package by the link below:</p>
<p align="center"><a href="http://www.protsyk.com/scriptdotnet/versions/latest/IronyScriptDotNet.zip">Download Script.NET 1.2</a></p>
<p>This version achieved a new milestone in the continuous development and improvement of scripting engine. Now, it is even more customizable, more thread safe and more stable then previous releases.</p>
<p>Current version is open for functionality requests and suggestions. So please go ahead and email them: <a href="mailto:piter.protsyk@gmail.com">piter.protsyk@gmail.com</a>  </p>
<p>Please expect official release of the renewed Script.NET in May together with a new web site containing more complete help information, new tutorials and examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=241</wfw:commentRss>
		</item>
		<item>
		<title>Îñòàâüòå ìåñòî äëÿ ÷óäà!</title>
		<link>http://protsyk.com/cms/?p=240</link>
		<comments>http://protsyk.com/cms/?p=240#comments</comments>
		<pubDate>Wed, 04 Feb 2009 20:38:46 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=240</guid>
		<description><![CDATA[Íåäàâíî ÿ íàòêíóëñÿ íà êíèãó Ñòèâåíà Õîêèíãà, &#8220;Êðàòêàÿ èñòîðèÿ âðåìåíè&#8221;. Â íåé àâòîð ïûòàåòñÿ äàòü ñâî¸ òîëêîâàíèå èñòîðèè è ïðîèñõîæäåíèÿ Âñåëåííîé, âñÿ÷åñêè ïîä÷åðêèâàÿ ñâîé íåîñïîðèìûé àâòîðèòåò â ýòîé îáëàñòè.
Íî åñòü îäíî &#8220;íî&#8221;: ýòî ïðèíöèï íåîïðåäåë¸ííîñòè, êîòîðûé ÷àñòî óïîìèíàåòñÿ â êíèãå. À ãîâîðèò, îí î òîì, ÷òî êàê áû íàì íå õîòåëîñü, ìû íå ìîæåì èçìåðèòü [...]]]></description>
			<content:encoded><![CDATA[<p>Íåäàâíî ÿ íàòêíóëñÿ íà êíèãó Ñòèâåíà Õîêèíãà, &#8220;Êðàòêàÿ èñòîðèÿ âðåìåíè&#8221;. Â íåé àâòîð ïûòàåòñÿ äàòü ñâî¸ òîëêîâàíèå èñòîðèè è ïðîèñõîæäåíèÿ Âñåëåííîé, âñÿ÷åñêè ïîä÷åðêèâàÿ ñâîé íåîñïîðèìûé àâòîðèòåò â ýòîé îáëàñòè.</p>
<p>Íî åñòü îäíî &#8220;íî&#8221;: ýòî ïðèíöèï íåîïðåäåë¸ííîñòè, êîòîðûé ÷àñòî óïîìèíàåòñÿ â êíèãå. À ãîâîðèò, îí î òîì, ÷òî êàê áû íàì íå õîòåëîñü, ìû íå ìîæåì èçìåðèòü îäíó âåëè÷èíó, íå ïîâëèÿâ ïðè ýòîì íà äðóãóþ. Äëÿ íàóêè ýòî îçíà÷àåò, ÷òî êàêèå áû òî÷íûå ìåòîäû èçìåðåíèÿ íå èñïîëüçîâàëèñü, êàêèå áû ñîâåðøåííûå òåîðèè íå èçîáðåë áû ÷åëîâå÷åñêèé ãåíèé - âñåãäà íàéäåòñÿ ìåñòî äëÿ &#8220;íåîïðåäåëåííîñòè&#8221;, âñåãäà íàéä¸òñÿ ìåñòî äëÿ &#8220;÷óäà&#8221;.</p>
<p>Òàê âîò, â ýòîò êðèçèñíûé äëÿ íàñ è äëÿ âñåãî ìèðà âðåìÿ, âåðîÿòíî, íå ñòîèò ãíàòüñÿ çà íåñáûòî÷íûìè íàäåæäàìè, ìîæåò ïðîñòî ñòîèò îñòàâèòü ìåñòî äëÿ ÷óäà?</p>
<p><strong>Please, leave a place for a miracle!</strong></p>
<p class="entry"><span onmouseout="_tipoff()" onmouseover="_tipon(this)">I recently came across a book by Stephen Hawking, &#8220;A Brief History of Time&#8221;.</span> T<span onmouseout="_tipoff()" onmouseover="_tipon(this)">he author tries to give his interpretation of the history and origin of the universe there, often stressing his indisputable authority in this field. But its ok, he is really great scientist.</span></p>
<p><span onmouseout="_tipoff()" onmouseover="_tipon(this)">But there is one &#8220;but&#8221;: it is the principle of uncertainty, which is often mentioned in the book.</span> <span onmouseout="_tipoff()" onmouseover="_tipon(this)">And it says that no matter how hard we&#8217;d want we will be unable to measure one value, while not predictably affecting the other.</span> <span onmouseout="_tipoff()" onmouseover="_tipon(this)">For a natural science, this means that whatever exact measurement methods are not used, whatever the theory is not invented by a genius of a man - there will always be a place for the &#8220;uncertainty&#8221;, there will always be a place for &#8220;miracle.&#8221;</span></p>
<p><span onmouseout="_tipoff()" onmouseover="_tipon(this)">So, in this crisis time for all of us in the world we&#8217;d probably should not pursue delusive hopes, but may be simply leave a place for a miracle?</span></p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=240</wfw:commentRss>
		</item>
		<item>
		<title>Script.NET Video Tutorial</title>
		<link>http://protsyk.com/cms/?p=222</link>
		<comments>http://protsyk.com/cms/?p=222#comments</comments>
		<pubDate>Fri, 30 Jan 2009 11:24:23 +0000</pubDate>
		<dc:creator>ppp_extr</dc:creator>
		
		<category><![CDATA[Script.NET]]></category>

		<guid isPermaLink="false">http://protsyk.com/cms/?p=222</guid>
		<description><![CDATA[This post lists video tutorials about Script.NET. I have decided to create them after watching presentations from the latest PDC conference. It is true that: &#8220;its better once to see than ten times to hear&#8221;.
I hope it will simplify the use of Script.NET for a new users and will help me to explain advanced concepts of the [...]]]></description>
			<content:encoded><![CDATA[<p>This post lists video tutorials about Script.NET. I have decided to create them after watching presentations from the latest PDC conference. It is true that: &#8220;its better once to see than ten times to hear&#8221;.</p>
<p>I hope it will simplify the use of Script.NET for a new users and will help me to explain advanced concepts of the language.</p>
<p><strong>Getting started with Script.NET</strong></p>
<p>Describes basic concepts of Script.NET together with simple example of interaction between script and hosting .NET application</p>
<ul>
<li>Presentation: <a href="http://www.protsyk.com/scriptdotnet/video/l1-getting-started.avi">AVI</a>,</li>
<li>Examples used in presentation: <a href="http://www.protsyk.com/scriptdotnet/versions/latest/IronyScriptDotNet.zip">BIN</a>.</li>
</ul>
<p><strong>Using Contracts in Script.NET</strong></p>
<p>Explains contracts and their usage in Script.NET to produce verifiable scripts.</p>
<ul>
<li>Presentation: <a href="http://www.protsyk.com/scriptdotnet/video/l2-contracts.avi">AVI</a>.</li>
</ul>
<p><strong>Making .NET application Scriptable </strong></p>
<p align="left">In this demo I will show how to make existing .NET application available to the script. The script will be able to interact with the hosting application and manipulate with its objects using ObjectModel exposed to the script runtime.</p>
<ul>
<li>
<p align="left">Presentation: <a href="http://www.protsyk.com/scriptdotnet/video/l3-making-scriptable-application.avi">AVI</a>,</p>
</li>
<li>
<p align="left">Sample: <a href="http://www.protsyk.com/scriptdotnet/samples/applications/Lesson3.zip">Source+Bin</a></p>
</li>
</ul>
<p align="left">Please share you feedbacks at: <a href="mailto:piter.protsyk@gmail.com">piter.protsyk@gmail.com</a></p>
<p align="left"><strong>More on Script.NET . . .</strong></p>
<p><a href="http://www.protsyk.com/scriptdotnet/versions/latest/IronyScriptDotNet.zip"><img src="http://www.protsyk.com/scriptdotnet/img/Download.png" style="vertical-align: bottom; border-style: none" /></a></p>
<p><a href="http://www.protsyk.com/scriptdotnet/video"><img src="http://www.protsyk.com/scriptdotnet/img/Screencasts.png" style="vertical-align: bottom; border-style: none" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://protsyk.com/cms/?feed=rss2&amp;p=222</wfw:commentRss>
<enclosure url="http://www.protsyk.com/scriptdotnet/video/l1-getting-started.avi" length="17592320" type="video/x-msvideo" />
<enclosure url="http://www.protsyk.com/scriptdotnet/video/l2-contracts.avi" length="5611520" type="video/x-msvideo" />
<enclosure url="http://www.protsyk.com/scriptdotnet/video/l3-making-scriptable-application.avi" length="38959616" type="video/x-msvideo" />
		</item>
	</channel>
</rss>
