C# & .NET technologiesBlog about C# programming language and related .NET technologies.http://developers.de/blogs/bahro/atom.aspxCommunity Server2015-02-18T11:36:00ZGPdotNET v4.0 has been released/blogs/bahro/archive/2017/02/13/gpdotnet-v4-0-has-been-released.aspx2017-02-13T22:20:00Z2017-02-13T22:20:00Z<p style="text-align:justify;"><i>After almost two years of implementation, I am proud to announce the forth version of the Open source project called GPdotNET v4.0. The latest version completely implements Genetic Programming and Artificial Neural Network for supervised learning tasks in three kind of problems: regression, binary and multiclass classification. Beside supervised learning tasks, with GPdotNET you can solve several Linear Programming problems: Traveling Salesman, Assignment and Transportation problems. The source code and binaries can be download from Github page: https://github.com/bhrnjica/gpdotnet/releases/tag/v4.0
</i></p>
<p style="text-align:center;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv401.png" alt="" /></p>
<p style="text-align:center;margin-left:18pt;"><i>Figure 1. Main Window in GPdotNET v4.0
</i></p>
<h1>Introduction</h1>
<p style="text-align:justify;">In 2006 the GPdotNET started as post-graduate semester project, where I was trying to implement simple C# program based on genetic programming. After successfully implemented console application, started to implement .NET Windows application to be easy to use for anyone who wants to build mathematical model from the data based on genetic programming method. In November 2009 GPdotNET became an open source project, by providing the source code and installer. Since then I have received hundreds of emails, feedbacks, questions and comments. The project was hosted on <a href="http://gpdotnet.codeplex.com">http://gpdotnet.codeplex.com</a>. In 2016 I decided to move the project to GitHub for better collaboration and compatibility, and can be found at <a href="http://github.com/bhrnjica/gpdotnet">http://github.com/bhrnjica/gpdotnet</a>. However, for backward compatibility, the old hosting site will be live as long as the <a href="http://gpdotnet.codeplex.com">codeplex.com</a> would be live. Since the beginning of the development, my intention was that the GPdotNET would be cross-OS application which can be run on Windows, Linux and Mac. Since version 2, GPdotNET can be compiled against .NET and Mono, and can be run on any OS which has Mono Framework installed. Beside this fact, vast majority of users are using GPdotNET on Windows OS.</p>
<p style="text-align:justify;">GPdotNET is primarily used on Academia by helping engineers and researchers in modelling and prediction various problems, from the air pollution, water treatment, rainfall prediction, to the various modelling of machining processes, electrical engineering, vibration, automotive industry etc. GPdotNET is used in more than ten doctoral dissertations (known to me) and master thesis, nearly hundreds paper used GPdotNET in some kind of calculation.</p>
<h1>Modeling with GPdotNET (New in GPdotNET v4.0)</h1>
<p style="text-align:justify;">Working with GPdotNET requires the data. By providing the learning algorithms GPdotNET uses a data of the research or experimental measures to learn about the problem. The results of learning algorithms are analytical models which can describe or predict the state of the problem, or can recognize the pattern. GPdotNET is very easy to use, even if you have no deep knowledge of GA, GP or ANN. Appling those methods in finding solutions can be achieved very quickly. The project can be used in modeling any kind of engineering process, which can be described with discrete data, as well as in education during teaching students about evolutionary methods, mainly GP and GA, as well as Artificial Neural Networks.</p>
<p style="text-align:justify;">Working in GPdotNET follows the same procedures regardless of the problem type. That means you have the same set of steps when modelling with Genetic Programming or Neural Networks. In fact, GPdotNET contains the same set of input dialogs when you try to solve Traveling Salesman Problem with Genetic Algorithm or if you try to solve handwriting recognition by using Backpropagation Neural Networks. All learning algorithms within GPdotNET share the same UI.</p>
<p style="text-align:justify;">The picture below shows the flowchart of the modelling in GPdotNET. The five steps are depicted in the graphical forms surrounded with Start and Stop item.</p>
<p style="text-align:center;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv402.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 2. Modelling layout in GPdotNET 4.0
</i></p>
<p style="text-align:justify;">After GPdotNET is started main window is show, and the modelling process can be started.</p>
<h2>Choosing the Solver Type</h2>
<p style="text-align:justify;">The first step is choosing the type of the solver. Which solver you will use it depends on your intention what you want to do. Choosing solver type begins when you press "New" button, the "GPdotNET Model creation wizard" appear. Soler types are grouped in two categories. The first group (on the left side) contains models implemented prior to v4.0 version. It contains solvers which apply GP in modelling regression problems, and GP in optimization of the GP models. In addition, you can perform optimization of any analytically defined function by using "Optimization of the Analytic function". Also, there are three linear programming problems which GPdotNET can solve using GA.</p>
<p style="text-align:justify;">On the right side, there are two kind of solvers: GP or ANN, which are not limited to solve only regression. Both GP or ANN can build model for regression, binary or multi-class problems. Which type of problem GPdotNET will use, depends of the type of the output column data (label column).</p>
<p style="text-align:center;margin-left:18pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv403.png" alt="" /></p>
<p style="text-align:center;margin-left:18pt;"><i>Figure 3. Available model types</i></p>
<h2>Loading Experimental Data (new in GPdotNET 4.0)</h2>
<p style="text-align:justify;">GPdotNET uses powerful tool for importing your experimental data regardless of the type. You can import numerical, binary or classification data by using Importing Data Wizard. With GPdotNET importing tools you can import any kind of textual data, with any kind of separation character.</p>
<p style="text-align:center;margin-left:18pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv404.png" alt="" /></p>
<p style="text-align:center;margin-left:18pt;"><i>Figure 4. Importing dataset dialog
</i></p>
<p style="text-align:justify;margin-left:18pt;">After the data is imported in forms of columns and rows, GPdotNET implemented set of very simple controls which can perform very powerful feature engineering. For each loaded column, you can set several types of metadata: column name, column type (<span style="font-family:Courier New;">input, output, ignore</span>), normalization type (<span style="font-family:Courier New;">minmax, gauss</span>), and missing value (<span style="font-family:Courier New;">min, max, avg</span>). With those options, you can achieve most of the modelling scenarios. Before "<b>Start Modelling</b>" minimum conditions must be achieved.</p>
<ul style="margin-left:57pt;">
<li>At least one column must be of "<span style="font-family:Courier New;">input</span>" parameter type.</li>
<li>At least one column must be of "<span style="font-family:Courier New;">output</span>" parameter type.</li>
</ul>
<p style="text-align:justify;">Which type of problem (regression, binary or multi class) will be used depends of the type of the output column. The following cases are considered:</p>
<ol style="margin-left:54pt;">
<li>in case of <b><i>regression</i></b> problems ouput column must be of <b><i>numeric type</i></b>.</li>
<li>in case of <b><i>binary</i></b> classinfication output column must be of <b><i>binary </i></b>type.</li>
<li>in case of <b><i>multi class</i></b> classinfication output column must be of <b><i>categorical </i></b>type.</li>
</ol>
<p style="text-align:center;margin-left:18pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv405.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 5. Defining metadata for training data set
</i></p>
<p style="margin-left:21pt;text-align:justify;">When the column should not be part of the feature list, it can be easily ignored when the <span style="font-family:Palatino Linotype;"><b>Column Type</b></span> is set to "<span style="font-family:Courier New;">ignore</span>", or <b>Param type</b> is set to "<span style="font-family:Courier New;">string</span>".</p>
<p style="text-align:center;margin-left:21pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv406.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 6. Changing column type to binary
</i></p>
<p style="text-align:justify;">Change value of metadata by double click on the current value, select new values from available popup list. When you done with Feature Engineering press "Start Modelling" button and the process of modelling can be start.</p>
<p style="text-align:justify;">Note: After you press Start Modelling button you can still change values of metadta, but after every change of the metadata values, Start Modelling button must be pressed.</p>
<h2>Setting Learning Parameters</h2>
<p style="text-align:center;margin-left:18pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv407.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 7. Setting parameters Dialog
</i></p>
<p style="text-align:justify;">After data is loaded and prepared successfully, you have to set parameters for the selected method. GPdotNET provides various parameters for each method, so you can set parameters which can provides and generates best output model. Every parameter is self-explanatory.</p>
<h2>Searching for the solution</h2>
<p style="text-align:justify;">GPdotNET provides visualization of the searching solution so you can visually monitor how GPdotNET finds better solution as the iteration number is increasing. Beside searching simulation, GPdotNET provides instant result representation (only GP models), so any time the user can see what is the best solution, and how currently best solution is good against validate or predicted set of data. (Result and Prediction tabs).</p>
<p style="text-align:center;margin-left:18pt;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv408.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 8. Searching simulation in GPdotNET
</i></p>
<h2>Saving and exporting the results:</h2>
<p style="text-align:justify;">GPdotNET provides several options you can choose while exporting your solution. You can export your solution in Excel or text file, as well as in Wolfram Mathematica or R programming languages (GP Models only). In case of ANN model the result can se exported only to Excel.</p>
<p style="text-align:center;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv409.png" alt="" />
<i></i></p>
<p style="text-align:center;"><i>Figure 9. Searching simulation in GPdotNET
</i></p>
<p style="text-align:justify;">Besides parameters specific to learning algorithm, GPdotNET provides set of parameters which control the way of how iteration process should terminates as well as how iteration process should be processed by means of parallelization to use the multicore processors. During the problem searching GPdotNET records the history, so you can see when the best solution is found, how much time pass since the last iteration process start, or how much time is remaining to finish currently running iteration process.</p>
<p style="text-align:justify;">Due to the fact that GP is the method which requires lot of processing time, GPdotNET provides parallelization, which speed up the process of searching. Enabling or disabling the parallelization processing is just a click of the button.</p>
<h2>GPdotNET Start Page</h2>
<p style="text-align:justify;">In case you have no data or just want to test the application, GPdotNET providers 15 data samples for demo purposes. All samples are grouped in problems specific groups: Approximation and Regressions, Binary Classification, Multi-class classification, Time series modelling and Linear Programming.</p>
<p style="text-align:center;"><img src="http://bhrnjica.files.wordpress.com/2017/02/021217_1107_gpdotnetv4010.png" alt="" /></p>
<p style="text-align:center;"><i>Figure 10. Modelling layout in GPdotNET
</i></p>
<p style="text-align:justify;">By click on appropriate link sample can be opened to see current result and parameter values. You can easily change parameter, press Run button and search for another solution. This is very handy to introduce with GPdotNET. In any time, you can stop searching and export current model or save current state of the program.</p>
<p style="text-align:justify;">Final note: <i>The project is licensed under GNU Library General Public License (LGPL). For information about license and other kind of copyright e.g. using the application in commercial purpose please see <a href="http://github.com/bhrnjica/gpdotnet/blob/master/license.md">http://github.com/bhrnjica/gpdotnet/blob/master/license.md</a>.</i></p>
<p style="text-align:justify;"><i>In case you need to cite it in scientific paper or book please refer to https://wordpress.com/post/bhrnjica.net/5995</i></p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1805934" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxIntroduction to Microsoft Machine Learning package in Microsoft R Server 9.0/blogs/bahro/archive/2016/12/11/introduction-to-microsoft-machine-learning-package-in-microsoft-r-server-9-0.aspx2016-12-11T21:22:00Z2016-12-11T21:22:00Z<h1>MicrosoftML package</h1>
<p>
Microsoft has released Microsoft R Server 9.0 (MRS9.0) with very interesting package called MicrosoftML. "Micrsooft ML" stands for Microsoft Machine Learning R package which you can use on R Server. R Server is commercial version of popular R Client distribution, which solves mayor problems when working with R. R Server contains set of cutting-edge technology to work with big data, as well as set of enhanced packages for parallelization and distributing computing.
MRS 9.0 is coming with "MicrosoftML" package which contains set of several Machine Learning algorithms developed in various Microsoft products in the last 10 years. You can combine the algorithms delivered in this package with pre-existing parallel external memory algorithms such as the RevoScaleR package as well as open source innovations such as CRAN R packages to deliver the best predictive analytic.
MicrosoftML package includes the following algorithms:
</p>
<ul>
<li>Fast linear learner, with support for L1 and L2 regularization,</li>
<li>Fast boosted decision tree,</li>
<li>Fast random forest,</li>
<li>Logistic regression, with support for L1 and L2 regularization,</li>
<li>GPU-accelerated Deep Neural Networks (DNNs) with convolutions,</li>
<li>Binary classification using a One-Class Support Vector Machine.</li>
</ul>
<h1>How to start with MicrosoftML package</h1>
<p>
In order to fully use the power of MicrosoftML, and RevoScaleR you need to download MRS 9.0 from the <a href="https://aka.ms/rserver9.0.1">MSDN</a> or <a href="https://aka.ms/rserver9.0.1.myvs">Visual Studio Dev Essentials</a> subscription. Once the zip file is downloaded, unzip it, and run setup file.
The following required components were missing when my installation is started. Seems the MRS contains the latest .NET Core components, which is pretty cool:</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_11.png"><img height="220" width="377" alt="blog_mrs_9_11" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_11.png" class="alignnone size-full wp-image-6986" /></a>
</p>
<p>After the prerequested components installed, the MRS installation process can start.</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_01.png"><img height="388" width="497" alt="blog_mrs_9_01" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_01.png?w=604" class="alignnone size-large wp-image-6976" /></a>
</p>
<p> </p>
<p>By clicking the Next button the Installation process starts:</p>
<p> </p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_02.png"><img height="412" width="529" alt="blog_mrs_9_02" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_02.png?w=604" class="alignnone size-large wp-image-6977" /></a>
</p>
<p>Select the path where you want to install MRS, and press the Next button:</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_03.png"><img height="421" width="542" alt="blog_mrs_9_03" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_03.png?w=604" class="alignnone size-large wp-image-6978" /></a>
</p>
<p>
If everything went ok, the installation process is finished after less than minute, and the final dialog window appears:
</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_04.png"><img height="433" width="558" alt="blog_mrs_9_04" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_04.png?w=604" class="alignnone size-large wp-image-6979" /></a></p>
<p>
By clicking the Finish button MRS is installed on you PC.
</p>
<h1>Run MRS 9.0 by using R Tool fo Visual Studio, RTVS</h1>
<p>
Now it is time to run some R code. YOu have two posibilities to run R code. The first option is that you use the R Studio proffesion tool for running R code. It is free and open source which you can download from <a href="http://rstudio.com">rstudio.com.</a> If you are MS Developer you usualy write the code in the Visual Studio. So you can download RTVS from this <a href="http://microsoft.github.io/RTVS-docs/">link </a>and run R code from Visual Studio.
Now that you have right tool to run R code, we can start with setting the MRS environment.
First thing you should do is to point RTVS to use MRS 9.0 instead of curently using some other distribution. So open the Visual Studio, select <b>R Tools->Edit Options</b>
</p>
<p><a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_08.png"><img height="426" width="570" alt="blog_mrs_9_08" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_08.png?w=604" class="alignnone size-large wp-image-6983" /></a>
</p>
<p>The Option dialog appears. Set the <b>R Engine</b> to point installation folder of the MRS. Since my installation location was on Program Files folder, the picture below show my installation path.</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_07.png"><img height="305" width="564" alt="blog_mrs_9_07" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_07.png?w=604" class="alignnone size-large wp-image-6982" /></a>
</p>
<p>After you set the right installation folder , restart the Visual Studio:
When the Visual Studio is running, open R Open R Interactive window. You should have similar text if you set up MRS path correctly:</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_13.png"><img height="352" width="556" alt="blog_mrs_9_13" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_13.png?w=604" class="alignnone size-large wp-image-6988" /></a>
</p>
<p>Select New Project from the File->New menu option.
</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_10.png"><img height="431" width="560" alt="blog_mrs_9_10" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_10.png?w=604" class="alignnone size-large wp-image-6985" /></a></p>
<p> </p>
<p>Name it FirstRServerDemo and click Ok. Now you are ready to write first MRS R code:</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_14.png"><img height="324" width="544" alt="blog_mrs_9_14" src="https://bhrnjica.files.wordpress.com/2016/12/blog_mrs_9_14.png?w=604" class="alignnone size-large wp-image-6989" /></a></p>
<p>
In the next post we will continue exploration the <i>MicrosoftML</i> library package and new set of Machine Learning algorithms added in this latest version.</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1803628" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxUsing SSH Keys for License generation and validation in .NET Applications/blogs/bahro/archive/2016/12/06/using-ssh-keys-for-license-generation-and-validation-in-net-applications.aspx2016-12-06T17:37:00Z2016-12-06T17:37:00Z<p style="text-align:justify;"><a href="https://bhrnjica.files.wordpress.com/2016/12/license_generationpng.png"><img height="112" width="604" alt="license_generationpng" src="https://bhrnjica.files.wordpress.com/2016/12/license_generationpng.png?w=604" class="alignnone size-large wp-image-6966" /></a></p>
<p> </p>
<p style="text-align:justify;">This blog post is going to present how can you implement license functionality in your .NET application. Providing license in your .NET application is very challenging because there is no standard procedure for the implementation. You are free to use whatever you want. But be notice, there is no license which is 100% safe and cannot be cracked or bypassed.</p>
<p style="text-align:justify;">For this purpose I have selected the C<b>ocoaFob</b> library for registration code generation and verification in Objective-C applications. Mainly the library is for Objective -C based applications, like iQS mobile applications and other OSX based applications. This is very interesting library but you cannot use it in .NET applications, there is no implementation for .NET Framework.</p>
<p style="text-align:justify;">The library uses DSA to generate registration keys, which is very hard for hackers to produce key generators. The library is also specific because it generates license key in human readable form, when the bytes are converted in to Base32 string to avoid ambiguous characters. It also groups codes in sets of five characters separated by dashes. Also DSA has encryption algorithm generates the license which is different every time because of a random element introduced during the process.</p>
<p style="text-align:justify;">So the License key is produced using a 512-bit DSA key looks like on the following sample:</p>
<p>
<code>GAWQE-FCUGU-7Z5JE-WEVRA-PSGEQ-Y25KX-9ZJQQ-GJTQC-CUAJL-ATBR9-WV887-8KAJM-QK7DT-EZHXJ-CR99C-A</code></p>
<p style="text-align:justify;">More information about CocoaFob can be found at GitHub page: <a href="https://github.com/glebd/cocoafob">https://github.com/glebd/cocoafob</a></p>
<p style="text-align:justify;">The library is using <a href="https://www.bouncycastle.org/">BouncyCastle.Crypto</a> Nuget package for DSA encryption and decryption.</p>
<p style="text-align:justify;">The library CocoaFob for .NET contains two classes:</p>
<ol>
<li style="text-align:justify;"><span style="color:#ff0000;">LicenseData</span> class which provide License properties which is used in license generation. It an be anything: Name, Product number, email, date of expiration etc.</li>
<li style="text-align:justify;"><span style="color:#ff0000;">LicenseGenerator </span> class which is responsible for encrypting and validating the license.</li>
</ol>
<p style="text-align:justify;">For this blog post the License data class has the flowing implementation:</p>
<p>public class LicenseData<br /> {<br /><br /> protected internal string productCode;<br /> protected internal string name;<br /> protected internal string email;<br /><br /> /// <summary><br /> /// Returns the string data input for the CocoaFob algorithm. This implementation returns a comma separated string<br /> /// including the <seealso cref="#productCode"/>, <seealso cref="#name"/> and <seealso cref="#email"/> if set.<br /> /// @return<br /> /// </summary><br /> public virtual string toLicenseStringData()<br /> {<br /> StringBuilder result = new StringBuilder();<br /> if (productCode != null)<br /> {<br /> result.Append(productCode);<br /> result.Append(',');<br /> }<br /><br /> //name is mandatory property<br /> if (name == null)<br /> throw new System.Exception("name cannot be null");<br /> result.Append(name);<br /><br /> if (email != null)<br /> {<br /> result.Append(',');<br /> result.Append(email);<br /> }<br /> return result.ToString();<br /> }<br />...<br />}</p>
<p style="text-align:justify;">As can be seen from the code snippet above the License data contains username, product key and email address. Also, only name property is mandatory, which means you can generate license key based on the user name only.</p>
<h2>Generating the License Key</h2>
<p style="text-align:justify;">One we have License data we can process of License key generation. License is generated using DSA encryption which uses SSH private key. You can generate public and private SSH keys using any of the available tools, eg. OpenSSH, GitHub bash, .... More information about private and public key generation you can find at this <a href="https://help.github.com/articles/generating-an-ssh-key/">link</a>. Once we have public and private keys we can generate license and validate it. One important thing to remember is that you have to care about your private key. It should always be secure and no one should have access to it.</p>
<p style="text-align:justify;">The public key is used for license validation, and it is usualy packed with the application as a part of the deployment stuff. So the process of generating the license is show on the flowing code snippet:</p>
<p>public string makeLicense(LicenseData licenseData)<br />{<br /> if (!CanMakeLicenses)<br /> {<br /> throw new System.InvalidOperationException("The LicenseGenerator cannot make licenses as it was not configured with a private key");<br /> }<br /> try<br /> {<br /> //<br /> var dsa = SignerUtilities.GetSigner("SHA1withDSA");<br /> dsa.Init(true, privateKey);<br /><br /> //<br /> string stringData = licenseData.toLicenseStringData();<br /> byte[] licBytes = Encoding.UTF8.GetBytes(stringData);<br /> dsa.BlockUpdate(licBytes, 0, licBytes.Length);<br /><br /> //<br /> byte[] signed = dsa.GenerateSignature();<br /><br /><br /> string license = ToLicenseKey(signed);<br /><br /><br /> return license;<br /> }<br /> catch (Exception e)<br /> {<br /> throw new LicenseGeneratorException(e);<br /> }<br />}
</p>
<p style="text-align:justify;">First the DSA encryption is created based on the publicKey we have provided as an argument. Then licBytes is generated from the License data, and converted in to UTF8 formatted bytes. Then we have update DSA provider with licBytes. Now the DSA provider can generate signature in bytes. The signature is converted in to LicenseKey by calling ToLicenseKey method. The method is shown on the following code snippet:</p>
<p>private string ToLicenseKey(byte[] signature)<br /> {<br /> /* base 32 encode the signature */<br /> var result = Base32.ToString(signature);<br /><br /> /* replace O with 8 and I with 9 */<br /> result = result.Replace("O", "8").Replace("I", "9");<br /><br /> /* remove padding if any. */<br /> result = result.Replace("=", "");<br /> <br /><br /> /* chunk with dashes */<br /> result = split(result, 5);<br /> return result;<br /> }</p>
<p style="text-align:justify;">The magic happen in this method during the conversion of signature from bytes to human readable string. Conversion is done using Base32 string helper method.</p>
<h2>Verify the License Key</h2>
<p style="text-align:justify;">The License verification process is defined in varifyLicense method. You have to provide SSH publicKey as well as</p>
<p> public virtual bool verifyLicense(LicenseData licenseData, string license)<br /> {<br /> if (!CanVerifyLicenses)<br /> {<br /> throw new System.InvalidOperationException("The LicenseGenerator cannot verify licenses as it was not configured with a public key");<br /> }<br /> try<br /> {<br /> //Signature dsa = Signature.getInstance("SHA1withDSA", "SUN");<br /> var dsa = SignerUtilities.GetSigner("SHA1withDSA");<br /> dsa.Init(false, publicKey);<br /><br /> //<br /> string stringData = licenseData.toLicenseStringData();<br /> byte[] msgBytes = Encoding.UTF8.GetBytes(stringData);<br /> dsa.BlockUpdate(msgBytes, 0, msgBytes.Length);<br /><br /><br /> var dec = FromLicenseKey(license);<br /> var retVal = dsa.VerifySignature(dec);<br /> //<br /> return retVal; <br /> }<br /> catch (Exception e)<br /> {<br /> throw new LicenseGeneratorException(e);<br /> }<br /> }
</p>
<p style="text-align:justify;">As can be seen from the code above, the validation process is done by generating licenseData, converting the license Key in to signatere and the validation process return true is the license is valid, otherwize return false.</p>
<p style="text-align:justify;">The whole project is published at git hub, an can be downloaded from<a href="http://github.com/bhrnjica/cocoafob"> http://github.com/bhrnjica/cocoafob</a></p>
<h2>Testing the Library</h2>
<p style="text-align:justify;">The Library solution contains unit test project which you can see how to use this library in the real scenario in order to implement licensing in .NET app.</p>
<p style="text-align:justify;">Happy programming!</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1803379" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxDemos and Slides of my session about R and DataScience at ATD12 conference/blogs/bahro/archive/2016/11/16/my-session-about-r-and-datascience-at-atd12-conference.aspx2016-11-16T20:29:00Z2016-11-16T20:29:00Z<p><img width="800" alt="atd12_sl02.png" src="https://bhrnjica.files.wordpress.com/2016/11/atd12_sl02.png" class="alignnone size-full wp-image-6941" />
</p>
<p>Today, I gave session at Advanced Technology Day conference in Zagreb. It was very excited to see full room of people at the presentation, mostly developers from .NET world interesting in R and Data Science. This is good sign that the Data Science and the R are becoming more and more popular at daily basis. Most popularity for the R will bring R Tool for Visual Studio, which means the R language became member of the family of the Visual Studio.
</p>
<p> </p>
<p><img height="361" width="481" alt="atd12_sl01.jpg" src="https://bhrnjica.files.wordpress.com/2016/11/atd12_sl01.jpg" class=" wp-image-6920 aligncenter" />
</p>
<p> </p>
<p>For those who was asking about my slides and demo sample here is the information:
</p>
<ol>
<li>Presentation slides can be downloaded <a href="https://bhrnjica.files.wordpress.com/2016/11/r-m-r-tool-for-visual-studio-data-science-org.pptx">here</a>,</li>
<li>Source code of the demo is hosted at git hub at: <a href="http://github.com/bhrnjica/R-Workshop">http://github.com/bhrnjica/R-Workshop</a></li>
<li>For more information about R , you can see my YouTube channel about R and Machine Learning at this <a href="https://www.youtube.com/playlist?list=PLTk-S955yon38LAChqIeWuW03AEqu0hvF">link</a>.</li>
</ol>
<p>
See you next time!</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1802505" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxGPdotNET v4.0 Beta 3 has been released/blogs/bahro/archive/2016/10/30/gpdotnet-v4-0-beta-3-has-been-released.aspx2016-10-30T16:56:00Z2016-10-30T16:56:00Z<p>This is the third beta version of the GPdotNET v4.0 which brings new features and continuation of the new set of solvers. Beta 3 introduce Genetic Programming Multi-class Solver (GPMCS). </p>
<p>As announced <a href="https://bhrnjica.net/2016/10/30/gpdotnet-project-has-been-moved-to-github/">earlier </a>the project has been moved to the GitHUb and can be found at this address: http://github.com/bhrnjica/gpdotnet.</p>
<p>As announced in Beta 1 and Beta 2 there are new set of solvers. Beta 3 finally brings GP Multi-class solver, and announced feature complete of the GPdotNET v4.0.
Here is a quick recap of all new features announced in the last three beta versions:</p>
<p>
1. New Start Page will be extended with new examples of Neural Nets : – binary classification, – multi-class classification and – regressions examples.
</p>
<p>2. Improved module for loading experimental data, which now supports non numeric data like categorical or binary data. New data module also support normalization of the experimental data, handling missing values.
</p>
<p>3. Introduction of the ANN solver for all three kind of problems:
</p>
<ul>
<li>regression</li>
<li>binary</li>
<li>multi-class</li>
</ul>
<p>4. Depending of the output column of loaded experimental data, different learning solver can be selected.
</p>
<p>5. Introduction of the GP Binary class solver.
</p>
<p>6. Introduction of the GP Multi-Class solver. In the flowing text you can see few screen shots:
Picture below shows loaded "iris flower data set" in to the GP multi-class solver.</p>
<p>
<img height="320" width="528" alt="gp_multyclass_sl0" src="https://bhrnjica.files.wordpress.com/2016/10/gp_multyclass_sl0.png" class="alignnone size-full wp-image-6871" />
</p>
<p>The picture below shows GP Multi-class solver in action. As can be seen best solution is found at 242 iteration, with very high value of the fitness value.</p>
<p>
<img height="323" width="532" alt="gp_multyclass_sl2" src="https://bhrnjica.files.wordpress.com/2016/10/gp_multyclass_sl2.png" class="alignnone size-full wp-image-6873" /></p>
<p>
Even better the prediction page shows how best chromosome predict iris value. As can be seen best solution predicts 13 rows correctly, and only 2 row are calculated wrong.</p>
<p> </p>
<p>
<img height="336" width="553" alt="gp_multyclass_sl1" src="https://bhrnjica.files.wordpress.com/2016/10/gp_multyclass_sl1.png" class="alignnone size-full wp-image-6872" /></p>
<p> </p>
<p>The last picture shows the Best Chromosome (solution) for the Iris Flows Data Set :</p>
<p>
<img height="320" width="563" alt="gp_multyclass_sl3" src="https://bhrnjica.files.wordpress.com/2016/10/gp_multyclass_sl3.png" class="alignnone size-full wp-image-6874" /></p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1801529" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxVisual Studio vNext new Installer/blogs/bahro/archive/2016/07/09/visual-studio-vnext-new-installer.aspx2016-07-09T06:57:00Z2016-07-09T06:57:00Z<p style="text-align:justify;">The new version of Visual Studio will come with dramatically new installer, which will allow that you install only stuff you need, without gigabytes of unnecessary never used components. Current version of Visual Studio which is Visual Studio 2015 Update 3 is coming with nearly 8GB installation file. This is to much for the installer, you need special condition when you want to download the installation file. I am doing it by night, when I am sleeping. In some condition the installation process takes an hour to install everything you have specified.</p>
<p style="text-align:justify;">In the next version the installation process will be changed and if you want to see and feel how the future visual studio installer will look like you can download the preview of the Visual Studio vnext code name "Visual Studio 15" at this link.</p>
<p style="text-align:justify;">If you try to install Visual Studio 15 preview 3, it will take less than 5 minutes, with very simple installer. In the next five pictures whole installation process is completed.</p>
<p style="text-align:justify;">After you download the installer, run it and the following pictures will appear:</p>
<ol>
<li>First picture is asking to confirm the installation process:</li>
</ol>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl01.png"><img class="alignnone size-full wp-image-6661" src="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl01.png" alt="vs15_sl01" height="233" width="370" /></a>
</p>
<p>2. The next picture shows the progress of loading installer</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl02.png"><img class="alignnone size-full wp-image-6662" src="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl02.png" alt="vs15_sl02" height="233" width="375" /></a>
</p>
<p>3. The next picture is the main picture which you can select what to install. The whole Visual Studio installer is devided in to the development groups:
</p>
<ol>
</ol>
<ul>
<li>Core Stuff of the Visual Studio- this component is required for all developer group</li>
<li>There are for now 4 installer groups: .NET, C++, Python, Game dev.</li>
<li>The more will come later.</li>
</ul>
<p> <a href="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl03.png"><img class="alignnone size-large wp-image-6663" src="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl03.png?w=604" alt="vs15_sl03" height="416" width="604" /></a></p>
<p> </p>
<ol>
</ol>
<p>
4. After you select right developer group/groups installation process starts by pressing Install button.</p>
<p> </p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl04.png"><img class="alignnone size-large wp-image-6664" src="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl04.png?w=604" alt="vs15_sl04" height="417" width="604" /></a></p>
<p> </p>
<p>5. After the installation process is completed, the following picture appear, which you only need to close by pressing the Close button at the right top edge of the window.
</p>
<p> </p>
<p><a href="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl05.png"><img class="alignnone size-large wp-image-6665" src="https://bhrnjica.files.wordpress.com/2016/07/vs15_sl05.png?w=604" alt="vs15_sl05" height="416" width="604" /></a>
</p>
<p> </p>
<p>As we can see the next version of the Visual Studio will dramatically changed the installation process, offering new simple and effective installer.</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1794075" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxUsing external config files in .NET applications/blogs/bahro/archive/2016/02/08/using-external-config-files-in-net-applications.aspx2016-02-08T08:04:00Z2016-02-08T08:04:00Z<p>The
config file is place where common variables, database connection
strings, web page settings and other common stuff are placed. The config
file is also dynamic, so you can change the value of the variable in
the config file without compiling and deploying the .NET app. In multi
tenancy environment config file can be complicate for deployment,
because for each tenant different value must be set for most of the
defined variables. In such a situation you have to be careful to set
right value for the right tenant.</p>
<p>One
way of handling this is to hold separate config file for each tenant.
But the problem can be variables which are the same for all tenants, and
also the case where some variables can be omitted for certain tenant.</p>
<p>One
of the solution for this can be defining external config files for only
connection strings or appSettings variables, or any other custom config
section. In this blog post, it will be presenting how to define
connection strings as well as appSettings section in separate config
file.</p>
<p>Lets say you have appSettings and connectionStrings config sections, similar like code below:</p>
<pre><strong><?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionStrings>
<add name="SQLConnectionString01" connectionString="Data Source=sourcename01;Initial Catalog=cat01;Persist Security Info=True;Integrated Security=true;"/>
<add name="SQLConnectionString02" connectionString="Data Source=sourcename02;Initial Catalog=cat02;Persist Security Info=True;Integrated Security=true;"/>
</connectionStrings>
<appSettings>
<clear />
<!-- Here are list of appsettings -->
<add key="Var1" value="Var1 value from config01" />
<add key="Var2" value="Varn value from config01"/>
<add key="Var3" value="Var3 value from main config file"/>
</appSettings>
</configuration>
</strong></pre>
<p>There are three appSetting keys Var1 , Var2 and Var3 and two connectionstrings in the app.config.</p>
<p>The
config file above can be split in such a way that variables Var1 and
Var2 be defined in separated file, but the Var3 can be remain in the
main cofing file. Separate config file may be unique for each tenant.</p>
<p>Now the main config file looks like the following:</p>
<pre><?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionStrings configSource="config\connString01.config"/>
<appSettings file="config\config01.config">
<add key="Var3" value="Var3 value from main config file"/>
</appSettings>
</configuration>
</pre>
<p>In the Visual Studio Solution there is config
folder in which we created two config files for appSettings section and
two config files for Connectionstrings section, in case we have two
separate environments for deployments.</p>
<p><a rel="attachment wp-att-6448" href="https://bhrnjica.files.wordpress.com/2016/01/exconfigfile01.png"><img class="alignnone size-full wp-image-6448" src="https://bhrnjica.files.wordpress.com/2016/01/exconfigfile01.png" alt="exconfigfile01" height="236" width="367" /></a><br /> The flowing code snippet shows the appSettings section implemented in the external file:</p>
<pre>
<appSettings file="appSettings.config">
<!-- Here are list of appsettings -->
<add key="Var1" value="Var1 value from config02" />
<!-- ... -->
<add key="Varn" value="Varn value from config02"/>
</appSettings></pre>
<pre>
</pre>
<p>The external config file for connection strings looks similar like the flowing:</p>
<p><a rel="attachment wp-att-6449" href="https://bhrnjica.files.wordpress.com/2016/01/exconfigfile02.png"><img class="alignnone size-full wp-image-6449" src="https://bhrnjica.files.wordpress.com/2016/01/exconfigfile02.png" alt="exconfigfile02" height="175" width="593" /></a><br /></p>
<p>The simple console application shows how to use this config variables in the code:</p>
<pre>
static void Main(string[] args)
{
var var1Value= ConfigurationManager.AppSettings["Var1"];
var var2Value = ConfigurationManager.AppSettings["Var2"];
var var3Value = ConfigurationManager.AppSettings["Var3"];
var conn1 = ConfigurationManager.ConnectionStrings["SQLConnectionString01"];
var conn2 = ConfigurationManager.ConnectionStrings["SQLConnectionString02"];
Console.WriteLine("Values from config01.config and connString01.config files");
Console.WriteLine("Var1={0}",var1Value);
Console.WriteLine("Var2={0}", var2Value);
Console.WriteLine("Var3={0}", var3Value);
Console.WriteLine("ConnStr01={0}", conn1);
Console.WriteLine("ConnStr01={0}", conn2);
Console.Read();
}
</pre>
<p>The complete source code can be downloaded from this <a href="https://onedrive.live.com/redir?resid=8B11BBBF3F0ED903%2170302&authkey=%21AB9jbbofShBkW8k&ithint=file%2czip">link</a>.</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1709114" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxAdd EULA to ClickOnce Installation using Visual Studio 2015/blogs/bahro/archive/2015/09/01/add-eula-to-clickonce-installation-using-visual-studio-2015.aspx2015-09-01T06:10:00Z2015-09-01T06:10:00Z<p>ClickOnce technology is very smart and useful when you want simple, small and smart piece of software for deploying your Windows Forms or WFP application. This is specially useful if you deliver application which doesn't require administrator rights during installation. ClickOnce is very powerful if you wants automatic update of your product, you can decide whenever the update appears before or after app is run. Also by using certificate you can deliver reliable and secure product to your customers. Long time ago I wrote detailed <a href="http://bhrnjica.net/2008/01/18/clickonce-tehnologija-i-vs-2008/">blog post </a> how to make ClickOnce deployment.
But one big thing is missing in ClickOnce deployment and for most of dev community is the feature which should be included by default. The feature which missing is "End User License Agreement" (EULA). There is no simple way to implement it. Searching the internet I have found one forum <a href="https://social.msdn.microsoft.com/Forums/windows/en-US/301d7b68-914b-4a05-8f2b-d9aa53f69cca/sneaky-way-to-get-an-eula-displayed-for-your-clickonce-application-in-vs2005?forum=winformssetup">post </a>on Microsoft site describing how to implement it. Only way you can get ELUA at the beginning of the ClickOnce installation proces is by using it as prererquested component. Actually you build a redistributable component which would be seen as prerequsites dialog box under the publish window. To build custom prerequisites component you need a three files:
</p>
<ol>
<li>Product.xml. - which is the file for bootstrapper and Visual Studio to show a component in prerequisites dialog,</li>
<li>Package.xml - which is the file containing all information about the component to be installed,</li>
<li>EULA.txt - your ELUA text for user to accept.</li>
</ol>
<p>
Those three files must be installed in the location where all components are registered: C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
For this blog post I have prepare demo sample which look like the following picture:
</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl0151.png"><img src="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl0151.png" alt="clickoncelicsl015" class="alignnone size-full wp-image-6354" height="246" width="604" /></a>
</p>
<p>
As can be seen, there is a two folders and one xml file. Each folder contains two files described earlier. Folders "en" and "de" means we are going to have EULA translated on two languages.
In order to successfully registered perquisites to be visible by Visual Studio we need to define proper content of the product.xml. The following xml code show content of our demo sample:
</p>
<p>
<?xml version="1.0" encoding="utf-8" ?></p>
<p><Product<br /> xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"<br /> ProductCode="EULA.Bootstrap.Component"><br /> <!-- Defines list of files to be copied on build --><br /> <PackageFiles><br /> <PackageFile Name="en/eula.txt"/><br /> </PackageFiles></p>
<p><br /> <Commands><br /> <!-- TOpen eula.txt without any parameters --><br /> <Command PackageFile="en/eula.txt" Arguments='' ><br /> <br /> <!-- These checks determine whether the package is to be installed --><br /> <!-- No install conditions --><br /> <InstallConditions><br /> <br /> </InstallConditions><br /> <br /> <!-- Exit codes --><br /> <ExitCodes><br /> <DefaultExitCode Result="Fail" FormatMessageFromSystem="false" String="GeneralFailure" /><br /> </ExitCodes></p>
<p> </Command><br /> </Commands><br /></Product></p>
<p>
As we can see xml content is self-described, it contains product information, files to be installed, installation conditions and exit codes.
</p>
<p>
Each folder (en, de, ...) contains package.xml file which holds localized messages and list of files to copied on build. The following xml content shows content of our en demo sample:
</p>
<p><?xml version="1.0" encoding="utf-8" ?></p>
<p><Package xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" Name="ClickOnceWithLicenseAgreement" Culture="Culture" LicenseAgreement="eula.txt"></p>
<p> <!-- Defines list of files to be copied on build --><br /> <PackageFiles><br /> <PackageFile Name="eula.txt"/><br /> </PackageFiles></p>
<p> <!-- Defines a localizable string table for error messages and url's --><br /> <Strings><br /> <String Name="DisplayName">ClickOnceWithLicenseAgreement 1.0 (x86 and x64)</String><br /> <String Name="Culture">en</String></p>
<p> <String Name="CancelFailure">User Refuse to Accept to ClickOnceWithLicenseAgreement End User License Agreement.</String><br /> <String Name="GeneralFailure">A fatal error occurred during the installation of ELUA Component Execution</String><br /> <String Name="AdminRequired">You do not have the permissions required to install this application. Please contact your administrator.</String><br /> </Strings> <br /></Package></p>
<p>
The EULA.txt file contains the text user need to accept in order to install the product.</p>
<p>
For this demo we created folder EULAPackage, put product.xml and two folders en and de because we are going to support two installation languages (see picture above).
</p>
<p>
Copy the EULAPackage folder in to : C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
Now we have set all necessary information about ELUA component and can be included in our demo sample.
</p>
<ol>
<li>Open Visual Studio 2015 and create new WFP application.Name it as "<em>ClickOnceWithLicenseAgreement</em>"</li>
</ol>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl011.png"><img src="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl011.png?w=604" alt="clickoncelicsl011" class="alignnone size-large wp-image-6349" height="389" width="604" /></a>
</p>
<p>
2. Right-Click on the Project and select Property menu option, then select Publish tab item of the Project Property window.</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl016.png"><img src="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl016.png?w=604" alt="clickoncelicsl016" class="alignnone size-large wp-image-6357" height="434" width="604" /></a>
</p>
<p> </p>
<p>
3. Click on Prerequisites Button, then you will see your prerequisite component in the standard prerequisites lists.</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl013.png"><img src="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl013.png?w=604" alt="clickoncelicsl013" class="alignnone size-large wp-image-6351" height="572" width="604" /></a>
</p>
<p>4. Select ClickOnceWithLicenseAgreement component and click Ok button. Afterwards click Publish button to build installation package. <strong></strong><i></i><span style="text-decoration:underline;"></span><sub></sub><sup></sup><span style="text-decoration:line-through;"></span></p>
<p>5. Open publish folder from the disk. DoubleClick Setup.exe and the ELUA window should be appeared:</p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl014.png"><img src="https://bhrnjica.files.wordpress.com/2015/09/clickoncelicsl014.png?w=604" alt="clickoncelicsl014" class="alignnone size-large wp-image-6352" height="520" width="604" /></a>
</p>
<p>
6. Now user has two choises to accept or Refuse the EULA, which means install or not install the app.</p>
<p>
Prerequested demo sample component for EULA can be downloaded from <a href="https://onedrive.live.com/redir?resid=8B11BBBF3F0ED903!66930&authkey=!AKjwv7-p71nSL9k&ithint=file%2czip">here</a>.
Happy programming.
</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1507462" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxHow to Install Windows 10 on Microsoft Azure/blogs/bahro/archive/2015/07/31/how-to-install-windows-10-on-microsoft-azure.aspx2015-07-31T11:36:00Z2015-07-31T11:36:00Z<p><a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl00.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl00.png" alt="win10Azuresl00" class="alignnone size-full wp-image-6323" height="256" width="604" /></a></p>
<p style="text-align:justify;">It is great time Windows 10 is released and there are huge amount of hype everywhere on the internet. I am using Windows 10 from the beginning through the Insider program, and all I can say the Windows 10 is the greatest and the best OS ever made. There are plenty of blog posts and articles about the Windows 10, and everybody who is using previous version of the Windows OS should upgrade to Windows 10. As soon as you upgrade you will see the difference and better experience in all aspects. For this blog post I would show you how to install Windows 10 on Azure, and how to enable some of the great feature. So lets start.</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl0.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl0.png?w=604" alt="win10Azuresl0" class="alignnone wp-image-6312 size-large" height="472" width="604" /></a> </p>
<p>2. Create New Azure Virtual Machine</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl01.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl01.png?w=604" alt="win10Azuresl01" class="alignnone size-large wp-image-6313" height="469" width="604" /></a></p>
<p> 3. Start defining Virtual Machine Parameters by defining OS version. Select Windows 10 Enterprise (x64)</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl1.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl1.png?w=604" alt="win10Azuresl1" class="alignnone size-large wp-image-6314" height="426" width="604" /></a> </p>
<p>4. Define Virtual Machine Name, username, and password. Note: This User name should not be developer username, because you have some restriction for Administrator when developing Windows Application. For this reason I have defined bhrnjica_admin user name. My developer username will be bhrnjica, which will be defined later. </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl2.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl2.png?w=604" alt="win10Azuresl2" class="alignnone size-large wp-image-6315" height="364" width="604" /></a></p>
<p> 5. Define Cloud service name, DNS Name and Region. In this step it is also neccessery to open all port you will need. In my case I have opened the following port:
</p>
<p>
1. First of all go to your Microsoft Azure Subscription Portal.</p>
<ul>
<li>Remote Desktop – this is default without this port you are not able to connect to this machine.</li>
<li>PowerShell in case you are working on PowerShell.</li>
<li>MSSQL port if you are planning to install Microsoft SQL Server on this machine.</li>
<li>MySQL is you are planning to install MySQL server.</li>
</ul>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl3.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl3.png?w=604" alt="win10Azuresl3" class="alignnone size-large wp-image-6316" height="400" width="604" /></a></p>
<p> 6. The last step is to enable some components to be installed on the virtual machine. You have option to include some Antimalware software as well as some Virtual Machine Agent.</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl4.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl4.png?w=604" alt="win10Azuresl4" class="alignnone size-large wp-image-6317" height="388" width="604" /></a></p>
<p> 7. After you click on the last OK button, wait some time (few minutes) and you should see the following status on you Microsoft Azure Portal.</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl5.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl5.png?w=604" alt="win10Azuresl5" class="alignnone size-large wp-image-6318" height="255" width="604" /></a></p>
<p> 8. To connect to your created Windows 10 machine, click Connect button to download RDP connection (See picture above). Double click to downloaded RDP file, enter your credentials.</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl6.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl6.png?w=604" alt="win10Azuresl6" class="alignnone size-large wp-image-6319" height="534" width="604" /></a> </p>
<p>9. Then you have your Windows 10 Azure Machine.</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl7.png"><img src="https://bhrnjica.files.wordpress.com/2015/07/win10azuresl7.png?w=604" alt="win10Azuresl7" class="alignnone size-large wp-image-6320" height="404" width="604" /></a> </p>
<p> 10. Enjoy on your Windows 10 Azure Machine</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1470963" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxWhere is Debug – Exception menu option in Visual Studio 2015/blogs/bahro/archive/2015/07/23/where-is-debug-exception-menu-option-in-visual-studio-2015.aspx2015-07-23T17:32:00Z2015-07-23T17:32:00Z<p>Few days ago Microsoft launched Visual Studio 2015, the long waited release with tons of great features. In the last three years I held several sessions on Microsoft and Community conferences about some of the new feature in Visual Studio 2015, like new C# and VB compiler so called Roslyn, new JIT 64 compiler, Framework 4.6 , native Compiler, as well as great new Debugging and Profiling tools.
During daily development I am using Debug features a lot. First time I have opened Visual Studio 2015, I could not find Debug Exception option. Usually the option is under Debug menu.</p>
<p> </p>
<p>
<a href="https://bhrnjica.files.wordpress.com/2015/07/debug_exception1.png"><img class="size-medium wp-image-6305" src="https://bhrnjica.files.wordpress.com/2015/07/debug_exception1.png?w=300" alt="Visual Studio 2015" height="196" width="300" /></a> </p>
<p>Visual Studio 2013</p>
<p> <a href="https://bhrnjica.files.wordpress.com/2015/07/debug_exception11.png"><img class="size-medium wp-image-6306" src="https://bhrnjica.files.wordpress.com/2015/07/debug_exception11.png?w=300" alt="Visual Studio 2015" height="205" width="300" /></a> </p>
<p>Visual Studio 2015</p>
<p> </p>
<p>
After some researching I have found the option in <b>Debug->Window->Exception Settings</b>. Now the Exception Setting window is modless dialog, so you can set the option without interrupting debug process. Also there are powerfull filter to quickly find right exception you want to throw.
</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/07/debug_exception2.png"><img class="alignnone size-medium wp-image-6307" src="https://bhrnjica.files.wordpress.com/2015/07/debug_exception2.png?w=300" alt="debug_exception2" height="193" width="300" /></a>
</p>
<p>There is a great video about this feature which you can see here and see why Visual Studio team moved this option to Debug-Windows menu option.</p>
<p><a href="https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2015-Final-Release-Event/Revamped-Exception-Settings-Experience-in-Visual-Studio-2015/player">https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2015-Final-Release-Event/Revamped-Exception-Settings-Experience-in-Visual-Studio-2015/player</a></p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1470936" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxerror CS0433 for 'System.Windows.Automation' type/blogs/bahro/archive/2015/06/16/error-cs0433-for-system-windows-automation-type.aspx2015-06-16T15:41:00Z2015-06-16T15:41:00Z<p><a href="https://bhrnjica.files.wordpress.com/2015/06/vsissu2e.png"><img src="https://bhrnjica.files.wordpress.com/2015/06/vsissu2e.png" alt="vsissu2e" class="alignnone wp-image-6295 size-full" height="223" width="1007" /></a></p>
<p>Few days ago I had a strange issue in one of my Visual Studio 2013 solution. The Test project required functionality of System.Windows.Automation, and I have added assembly UIAutomationClient. When tried to run tests I got the folowing compiler error:</p>
<blockquote>
<p>error CS0433: The type 'System.Windows.Automation.AutomationElement' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\UIAComWrapper.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\UIAutomationClient.dll'</p>
</blockquote>
<p>It was strange issue, because I didn't add UiaComWrapper assembly. Tried to remove the assembly, but as soon I run test the previous error appeared.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/06/vsissue.png"><img src="https://bhrnjica.files.wordpress.com/2015/06/vsissue.png?w=300" alt="vsissue" class="alignnone wp-image-6296 size-medium" height="262" width="300" /></a></p>
<p> </p>
<h3>Fixing the issue</h3>
<p>To fix this issue we have to use "Reference Alias" which is specified <a href="https://msdn.microsoft.com/en-us/library/ms173212.aspx">here</a>. So for our assembly UIAutomatisationClient change the Alias from "global" to "UIAutomationClientAlias". See picture below.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/06/vsissuesl2.png"><img src="https://bhrnjica.files.wordpress.com/2015/06/vsissuesl2.png?w=253" alt="vsissuesl2" class="alignnone wp-image-6297 size-medium" height="300" width="253" /></a></p>
<p>Now that we defined new alias, in the following text it is shown how to use it in your cs file. Open the cs file we have error.</p>
<p>1. At the top opf the file put the folowing line:</p>
<p><span><span style="color:#0000ff;font-family:Consolas;font-size:x-small;">extern</span></span> <span style="font-size:x-small;"><span style="font-family:Consolas;"><span><span style="color:#0000ff;">alias</span></span><span> UIAutomationClientAlias;</span></span></span></p>
<p>2. Define using namespace from the new alias:</p>
<p><span style="font-size:x-small;"><span style="font-family:Consolas;"><span><span style="color:#0000ff;">using</span></span><span> Autom = UIAutomationClientAlias::System.Windows.Automation;</span></span></span></p>
<p>3. Now we can use all members from Automation class safely, and the compiler error is despaired.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/06/vsissuesl3.png"><img src="https://bhrnjica.files.wordpress.com/2015/06/vsissuesl3.png" alt="vsissuesl3" class="alignnone size-full wp-image-6298" height="279" width="604" /></a></p>
<p> </p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1362508" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxCould not connect to GitHub.com in Visual Studio 2015/blogs/bahro/archive/2015/05/04/could-not-connect-to-github-com-in-visual-studio-2015.aspx2015-05-04T14:10:00Z2015-05-04T14:10:00Z<p><a href="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl3.png"><img height="300" width="279" alt="githubext_sl3" src="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl3.png?w=279" class="alignnone size-medium wp-image-6288" /></a></p>
<p>In Visual Studio 2015 when you try to connect to GitHub you may got the message "Could not connect to GitHub.com". The problem for this could be that you didn't include GitHub extenstion feature during installation of the Visual Studio.</p>
<p>1. During installation of Visual Studio 2015 GitHub Extensions must be checked. (See following picture).</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl11.png"><img height="300" width="291" alt="githubext_sl1" src="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl11.png?w=291" class="alignnone size-medium wp-image-6285" /></a></p>
<p>2. Even if you have included this feature in to the installation, you may still get the error. Actually, for some reason you cannot log in to the GitHub. In that case go to <a href="https://visualstudio.github.com/">https://visualstudio.github.com</a> and download the installer and reinstall the extension. That was worked in my case.</p>
<p>For instruction of how to install extension you can find on the web page.</p>
<p>Now you can open Connection from Team Explorer and choose GitHUb Extension.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl21.png"><img height="138" width="300" alt="githubext_sl2" src="https://bhrnjica.files.wordpress.com/2015/05/githubext_sl21.png?w=300" class="alignnone size-medium wp-image-6287" /></a></p>
<p>The Login page for GitHub appears. Log in to the GitHub and start using GitHub.</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1266783" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxXAML Peak new feature in Visual Studio 2015/blogs/bahro/archive/2015/05/03/xaml-peak-new-feature-in-visual-studio-2015.aspx2015-05-03T06:34:00Z2015-05-03T06:34:00Z<p>The latest version of the Visual Studio 2015 is bringing a lot of new features for WPF and XAML programming language. For this blog post I would like to share the XAML Peak Definition. Peak Definition is not new, the current version of Visual Studio 2013 supports peak definition only for C# and VB. Now we have the same functionality within XAML. Event more, in the Visual Studio 2015 peak definition is working in mixed mode, so you can reach any definition regladless of the programming languges (C#, VB or XAML).</p>
<p>XAML peak allows you to get definition or content of any name defined in the XAML code. For example lets see the following XAML code. Right click on the <strong>MainWindow</strong> class and choose "Peak Definition":</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl11.png"><img height="215" width="604" src="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl11.png" alt="peakxamlsl1" class="alignnone size-full wp-image-6269" /></a></p>
<p>After the command is selected, the new inline window appears within xaml, and the user can easily see or change the code behind selected definition. Peak Definition works for any proper name in the XAML.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl2.png"><img height="251" width="604" src="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl2.png" alt="peakxamlsl2" class="alignnone size-full wp-image-6270" /></a></p>
<p>Lets see more interesting thing. Peak Definition is very handy when you want to see or modify the defined style or control template. For Example if we right click on the Style defined resource and choose Peak Definition like the following picture:</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl31.png"><img height="237" width="604" src="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl31.png" alt="peakxamlsl31" class="alignnone size-full wp-image-6272" /></a></p>
<p>Inline window will appears and show the style implementation of the selected xaml element. This is very useful and long waited option of XAML editor:</p>
<p> </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl4.png"><img height="183" width="604" src="https://bhrnjica.files.wordpress.com/2015/05/peakxamlsl4.png" alt="peakxamlsl4" class="alignnone size-full wp-image-6278" /></a></p>
<p>Inline windows are edited windows so you can edit or add new code without leaving xaml editor.</p>
<p>This is one of the plenty of the new features coming with the latest version of the Visual Studio 2015. More features in the coming post.</p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1265836" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxGPdotNET 4.0 first look: Classification with Neural Networks/blogs/bahro/archive/2015/02/22/gpdotnet-4-0-first-look-classification-with-neural-networks.aspx2015-02-22T16:52:00Z2015-02-22T16:52:00Z<p>After some time of implementation and testing, the new version of <a href="https://gpdotnet.codeplex.com/releases/view/611855">GPdotNET </a>is out. Go to codeplex page and <a href="https://gpdotnet.codeplex.com/releases/view/611855">download </a>it. This is huge step in development of this project, because it contains completely new module based on Artificial Neural Network and other optimization methods e.g. Particle Swarm Optimization.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook1.png"><img height="370" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook1.png" alt="gpdotnetv4_firstlook1" class="alignnone size-full wp-image-6176" /></a> </p>
<p>Almost all aspects of the architecture are changed, or will be changed when this version would be released. The new Experiment class will replace existing classes for handling experimental data in GA based models, which is not implemented yet. Also New start page will contain more pre-calculated examples. For this beta here are the new features: </p>
<ol>
<li>New Start Page will be extended with new examples of Neural Nets : - binary classification, - multiclass classification and - regressions examples.</li>
<li>Improved module for loading experimental data, which now supports nonnumeric data like categorical or binary data.</li>
<li>Depending of the output column of loaded experimental data different learning algorithm is selected. For example if the column is of categorical type, GPdotNET selects Neural Net algorithm with Cross-Entropy and Particle Swarm optimization learning algorithm. If the output column is numerical, GPdotNET selects the Neural Nets with Backpropagation learning algorithm. Currently only two learning algorithms are implemented. More will be implemented in the next beta release.</li>
</ol>
<h2>Classification problem with GPdotNET</h2>
<p>This topic will give quick tutorial how to model classification problem with GPdotNET by using Neural Nets. For this tutorial you need some experimental data which you can download from this <a href="https://onedrive.live.com/redir?resid=8B11BBBF3F0ED903%2159268">location</a>. </p>
<ul>
<li>Open GPdotNET choose New Command</li>
<li>New Dialog pops up, check Artificial Neural Nets, and Press Ok Button.</li>
</ul>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook2.png"><img height="369" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook2.png" alt="gpdotnetv4_firstlook2" class="alignnone size-full wp-image-6177" /></a> </p>
<p>After Solver Type selection, GPdotNET Creates “Load Experiment” Page in which you can load experimental data, and define the percentage of data for testing the model. </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook3.png"><img height="367" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook3.png" alt="gpdotnetv4_firstlook3" class="alignnone size-full wp-image-6178" /></a></p>
<ul>
<li>Press Load Data button.</li>
<li>New Popup dialog appears.</li>
<li>Press File button select the file you previously downloaded.</li>
<li>Check Semicolon and First Row Header check buttons.</li>
</ul>
<p>Note: <i>When the data is analyzed correctly you should see vertical line “|” between columns. Otherwise data will not be loaded correctly.</i></p>
<ul>
<li>When the experimental data is formatted correctly, press the “Import Data” button.</li>
</ul>
<p> </p>
<ul>
</ul>
<p>The next step is preparing columns for modeling. For each columns we have to set:</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook4.png"><img height="367" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook4.png" alt="gpdotnetv4_firstlook4" class="alignnone size-full wp-image-6179" /></a></p>
<p>a) proper type of the column (numeric, categorical or binary),</p>
<p>b) type of the parameter (input, output or ignore)</p>
<p>c) normalization method (MinMax,Gauss or Custom normalization of the column values ). </p>
<ul>
<li>To change Column Type, double click on the cell which shows the column type, combo box appears with list of available types.</li>
<li> <a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook5.png"><img height="215" width="237" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook5.png" alt="gpdotnetv4_firstlook5" class="alignnone size-full wp-image-6180" /></a></li>
<li>To change Parameter Type, double click on the cell which shows the param type, combobox appears with list of available parameter types.</li>
<li> <a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook6.png"><img height="237" width="197" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook6.png" alt="gpdotnetv4_firstlook6" class="alignnone size-full wp-image-6181" /></a></li>
<li>To change Normalization Type, double click on the cell which shows MinMax value, combobox appears with list of available normalization types.</li>
<li> <a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook7.png"><img height="276" width="246" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook7.png" alt="gpdotnetv4_firstlook7" class="alignnone size-full wp-image-6182" /></a></li>
<li><br /></li>
</ul>
<p> </p>
<p><i>Note: you can set only one Output column. Put Parameter Type to Ignore if you want to skip column from modelling.</i> Now we have experimental data, and we can start modelling process. Before that we need to choose how much data will be treated for testing. Enter 10% for testing the data and press Start Modelling button. Now we have more Pages: 1. Settings page for setting the parameters of the Neural Nets 2. Run page for simulation of searching solution 3. Prediction page which you can see how solution is good against testing data. </p>
<h3>Settings Page</h3>
<p> </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook8.png"><img height="390" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook8.png" alt="gpdotnetv4_firstlook8" class="alignnone size-full wp-image-6183" /></a> </p>
<p> </p>
<p>As you can see in Settings Page you can set various parameters for Neural Nets and Particle Swarm Optimization. Try to train the model with different parameters values. For this tutorial you can leave parameters as are. </p>
<h3>Modeling Page</h3>
<p>Modeling page contains two diagrams. The first diagram shows errors with respect of the iteration number which is very useful for monitoring the searching process. The second diagram which is below the previous shows current best solution (blue line) in comparison with the experimental data (red line). Also on the left side of the page, you can see several iteration number, error, and other information about searching process. </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook9.png"><img height="389" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook9.png" alt="gpdotnetv4_firstlook9" class="alignnone size-full wp-image-6184" /></a></p>
<p> </p>
<h3>Prediction Page</h3>
<p>Prediction page shows how current best model predict data. Predict page contains tabular and graphical representation of predicted data, which is compared with data for testing. </p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook10.png"><img height="388" width="604" src="https://bhrnjica.files.wordpress.com/2015/02/gpdotnetv4_firstlook10.png" alt="gpdotnetv4_firstlook10" class="alignnone size-full wp-image-6185" /></a></p>
<h2>Features don't work in this BETA</h2>
<p><span style="color:#ff0000;">1. <b>Exporting Neural Network model</b></span> <span style="color:#ff0000;"><b></b></span></p>
<p><span style="color:#ff0000;"><b>2. Saving to gpa file Neural Network Models</b></span></p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1192121" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspxGPdotNET v4.0- Introduction/blogs/bahro/archive/2015/02/18/gpdotnet-v4-0-introduction.aspx2015-02-18T10:36:00Z2015-02-18T10:36:00Z<p><em>This is the first post in series of posts that describe upcomming version of <a href="http://gpdotnet.codeplex.com">GPdotNET </a>v4.0. Besides lot of improvements of the current version, the main part isimplementation of neural networks and set of other optimization methods of machine learning.
</em></p>
<h2 style="text-align:justify;">1. Modelling with GPdotNET v4.0</h2>
<p><a href="https://bhrnjica.files.wordpress.com/2009/11/gplogo_350x134pix.png"><img class="size-full wp-image-5027" src="https://bhrnjica.files.wordpress.com/2009/11/gplogo_350x134pix.png" alt="GPdotNET Logo" width="350" height="132" /></a> </p>
<p style="text-align:justify;">GPdotNET is C#, open source artificial intelligence tool for applying Genetic Algorithm and Artificial Neural Networks in modeling, prediction, optimization and pattern recognitions. With GPdotNET you can solve various engineering problems from classic regression and approximation to linear programming transportation and location problems and other machine learning based problems. By providing the learning algorithms GPdotNET uses a data of the research or experimental measures to learn about the problem. The results of learning algorithms are analytical models which can describe or predict the state of the problem, or can recognize the pattern. GPdotNET is very easy to use, even if you have no deep knowledge of GA, GP or ANN, you can apply those methods in finding solutions. The project can be used in modeling any kind of engineering process, which can be described with discrete data, as well as in education during teaching students about evolutionary methods, mainly GP and GA, as well as machine learning mainly Artificial Neural Networks.
The typical process of modelling with GPdotNET can be described in 5 steps.</p>
<ol>
<li style="text-align:justify;">Choosing the type of the Solver: The first step is choosing the type of the solver. Which solver you will use depends on your intention what you want to do. For example if you want to make model for your experimental measurement you have several options which depend of your experimental data and the method you want to use. In GPdotNET you can use Genetic Programming or Neural Nets for modelling and prediction experimental data. But this is not strictly separate as may look on the flowchart below. That means that you can user Neural Networks for prediction, but training algorithm can be based on Genetic Algorithm or Particle Swarm Optimization or Back Propagation algorithm.</li>
<li style="text-align:justify;">Loading your experimental data: GPdotNET uses powerful tool for importing your experimental data regardless of the type of data. You can import your numerical, binary or classification data. GPdotNET can automatically define classes, or format numerical data with floating or comma separated decimal values. More info can be find in Section 2.</li>
<li style="text-align:justify;">Setting Learning Parameters. After data is loaded and prepared successfully, you have to set parameters for the selected method. GPdotNET providers various parameters for each method, so you can set parameters which can provides and generates best output model.</li>
<li style="text-align:justify;">Searching for the solution: GPdotNET provides visualization of the searching solution so you can visually monitor how GPdotNET finds better solution as increasing the iteration number. If you provide data for testing calculated model, you can also see simulation of prediction.</li>
<li style="text-align:justify;">Saving and exporting the results: GPdotNET provides several options you can choose while exporting your solution. You can export your solution in Excel or text file, as well as in Wolfram Mathematica or R programming languages.</li>
</ol>
<p style="text-align:justify;">As would be seen, working in GPdotNET follows the same procedures regardless of the problem type. That means you have the same set of steps when modelling with Genetic Programming or Neural Networks. In fact GPdotNET contains the same set of input dialogs when you try to solve Traveling Salesman Problem with Genetic Algorithm or if you try to solve handwriting recognition by using Backpropagation Neural Networks. All learning algorithms within GPdotNET share the same UI.</p>
<p style="text-align:justify;">The picture below shows the flowchart of the modelling in GPdotNET. The five steps described previously are depicted in the graphical forms surrounded with Start and Stop elements.</p>
<p><a href="https://bhrnjica.files.wordpress.com/2015/02/modeling_in_gpdotnet_v41.png"><img class="size-full wp-image-6173" src="https://bhrnjica.files.wordpress.com/2015/02/modeling_in_gpdotnet_v41.png" alt="Modeling in GPdotNET v4.0" width="609" height="697" /></a> </p>
<p> Modeling in GPdotNET v4.0</p>
<p> </p>
<p>Besides parameters specific to learning algorithm, GPdotNET provides set of parameters which control the way of how iteration process should terminates as well as how iteration process should be processed by means of parallelization to use the multicore processors. During the problem searching GPdotNET records the history, so you can see when the best solution is found, how much time pass since last iteration process started, or how much time is remain to finish currently running iteration process.
Due to the fact that GP is the method which requires lot of processing time, GPdotNET provides parallelization, which speed up the process of searching. Enabling or disabling the parallelization processing is just a click of the button.
</p>
<h3>1.1 GPdotNET Open source project</h3>
<p>
From developer point of view GPdotNET is .NET (Mono) application written in C# programming language which can run both on Windows and Linux based OS, or any OS which supports Mono framework. Project started in 2006 within postgraduate study for modeling and optimization with evolutionary algorithms. As open source project, GPdotNET is first published on November 5 2009 on codeplex.com. The project is licensed under GNU Library General Public License (LGPL). For information about license and other kind of copyright please see http://gpdotnet.codeplex.com/license. The project is hosted at <a title="http://gpdotnet.codeplex.com" href="http://gpdotnet.codeplex.com">http://gpdotnet.codeplex.com</a>. Main place for all news, documentation and code changes is my blog site at http://bhrnjica.wordpress.com/gpdotnet.
</p>
<h3>1.2 How to citate GPdotNET</h3>
<p>
GPdotNET is used from all around the world, in scientific papers, journals, books, for diploma works, master thesis or Dissertations. It is free to use GPdotNET with proper citation. So if you want to use the GPdotNET you need the right way to citate the tool.
Use this citation example in your paper, book etc.:
<em>[1] B. I. Hrnjica, GPdotNET V4.0- artificial intelligence tool [Computer program], http://gpdotnet.codeplex.com, accessed {date}.</em>
Or
<em>[1] Bahrudin I. Hrnjica, GPdotNET V4.0 – artificial intelligence tool [Computer program], http://gpdotnet.codeplex.com, accessed {date}.</em></p><div style="clear:both;"></div><img src="http://developers.de/aggbug.aspx?PostID=1186941" width="1" height="1">bhrnjicahttp://developers.de/members/bhrnjica/default.aspx