Category Archives: C#

XAML Peak new feature in Visual Studio 2015


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).

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 MainWindow class and choose “Peak Definition”:

peakxamlsl1

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.

peakxamlsl2

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:

peakxamlsl31

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:

 

peakxamlsl4

Inline windows are edited windows so you can edit or add new code without leaving xaml editor.

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.

 

 

 

Sarajevo Azure DevCamp Review


Jučer je u prostorijama HUB387 u Sarajevu održan Azure DevCamp, na kojem se okupilo stotinu polaznika i u radnoj atmosferi pratili predavanja oko Microsoft Azure. DevCamp se sastojao od šest predavanja u kojima se govorilo o Azure Cloud i Mobilnim servisima, Azure WebSites, Podacima na Azure poput SQL Server DB, MySQL, BigData, DocumentDB i sl,te virtualnim mašinama i virtualnim mrežama. Publika bila vrlo aktivna, a podjelilo se i prigodnih poklona u obliku majica sa Azure logom.

Još jednom se zahvaljujem publici na pažnji i prisustvu, a demo slajdove i primjeri koji su jučer bili na Campu mogu se skinuti sa donjeg linka.

azuredevcamp03201503 azuredevcamp03201501

Azure DevCamp @ HUB387 Sarajevo


azure_dev_Camp_sarajevo2014

Nakon decembarskog AzureDevCampa u Banjaluci, Microsoft BiH organizira jos jedan AzureDev Camp. Naime, u subotu 21. marta u tehnološkom parku HUB387, održat će se cjelodnevni trening o Microsoft Azure za developere, softverske arhitekte te IT profesionalce.

Kao i prethodni ut meni je pripala čast da vodim ovaj trening i nadam se da ću zahtjevnoj publici uspjeti prezentirati očekivano.

Koncept Azure DevCampa sastoji se od 6 predavanja koja uključuju osnovne cjeline koje Microsoft Azure nudi.

Polaznici će na radionici imati priliku vidjeti osnovne konceptima razvoja rješenja u cloud-u, prvenstveno paradigmama kao što su to SaaS, PaaS i IaaS. U nastavku, kroz različite Azure servise, biće demonstrirani različiti scenariji počevši od hostiranja web aplikacija baziranih na različitim tehnologijama (.NET, PHP, Java, Node.js, …) , skladištenja i upravljanja podacima (SQL, NoSQL, BLOB, …), podizanja infrastrukture (Win/Linux virtuelne mašine, virtuelne mreže,…) pa do integracije sa mobilnim uređajima.

 

Vidimo se na Azure DevCampu.

GPdotNET 4.0 first look: Classification with Neural Networks


After some time of implementation and testing, the new version of GPdotNET is out. Go to codeplex page and download 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. gpdotnetv4_firstlook1

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:

  1. New Start Page will be extended with new examples of Neural Nets : – binary classification, – multiclass classification and – regressions examples.
  2. Improved module for loading experimental data, which now supports nonnumeric data like categorical or binary data.
  3. 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.

Classification problem with GPdotNET

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 location.

  • Open GPdotNET choose New Command
  • New Dialog pops up, check Artificial Neural Nets, and Press Ok Button.

gpdotnetv4_firstlook2

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. gpdotnetv4_firstlook3

  • Press Load Data button.
  • New Popup dialog appears.
  • Press File button select the file you previously downloaded.
  • Check Semicolon and First Row Header check buttons.

Note: When the data is analyzed correctly you should see vertical line “|” between columns. Otherwise data will not be loaded correctly.

  • When the experimental data is formatted correctly, press the “Import Data” button.

The next step is preparing columns for modeling. gpdotnetv4_firstlook4

For each columns we have to set:

  • a) proper type of the column (numeric, categorical or binary),
  • b) type of the parameter (input, output or ignore)
  • c) normalization method (MinMax,Gauss or Custom normalization of the column values ).

To change Column Type, double click on the cell which shows the column type, combo box appears with list of available types.

gpdotnetv4_firstlook5

  • To change Parameter Type, double click on the cell which shows the param type, combobox appears with list of available parameter types.
  • gpdotnetv4_firstlook6
  • To change Normalization Type, double click on the cell which shows MinMax value, combobox appears with list of available normalization types.

gpdotnetv4_firstlook7

Note: you can set only one Output column. Put Parameter Type to Ignore if you want to skip column from modelling.

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.

Settings Page

gpdotnetv4_firstlook8

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.

Modeling Page

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. gpdotnetv4_firstlook9

Prediction Page

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. gpdotnetv4_firstlook10

Features don’t work in this BETA

1. Exporting Neural Network model

2. Saving to gpa file Neural Network Models

Follow

Get every new post delivered to your Inbox.

Join 600 other followers