LinkedList When we need to put some collections into stack(LIFO) or queue(FIFO). The soulition is simple, we create class Stack if we need a „last in first out” strategy and we got some method like insert object to the top of the stack(PUSH), return last element(POP or PEEK). Similary in Queue function(Enqueue) adds object onWięcej oLinkedList – example[…]
Get out from smog – part IV As i mentioned in a previous post. I create a class that will be calculated the distance in kilometers between the measuring stations and a latitudes, longitudes. First we have to calculate distance in kilometers between latidute and longtidute points. Haversine formula In this example, I use HaversineWięcej o„Get out from smog” – claculate the distance[…]
Get out from smog – part III To measure the distance from the measuring station to current locaction of the user. Is required accurate data such as – latitude and logitude measurement station. Google provide useful api. I send a request to the address https://maps.googleapis.com/maps/api/geocode/json?address= and my adress station and api return me json withWięcej o„Get out from smog” – obtaining precise location[…]
Today I’ll show you how can you freez table columns/rows on website in simple way. The best for it will be another great and powerful tool plug-in for JQuery library DataTables.
In our example we need to include some scripts and styles like this: Czytaj więcej O tej wersjiFreeze table columns – DataTables …
„Get out from smog” part II Today I will focus on parsing data from JSON. Service http://powietrze.gios.gov.pl provides information on air quality in this format. So I would use this information in my application. In the first step I need to download it. Use to this – webClient class to dowload string from website andWięcej o„Get out from smog” – parsing JSON[…]
Dynamic charts When we need to display some charts, we might use simple and fast library – HighCharts.Which I’ll try to explain brefly below. Example In our example we display column chart and linear plot. We will need to this : JQuery, HighCharts scripts.You can also download it from nuget package. At the begining weWięcej oDynamic charts in MVC[…]
How to parse xml?
It’s very simple. Linq offers us an extension specifically for this task – Linq to XML.
Let’s assume that we have to parse XML which is presented below. Czytaj więcej O tej wersjiParse xml – Linq to Xml …
Get noticed I decided to join to the contest „Daj się poznać” (Get Noticed) and I am very happy with it. The truth by saying I don’t have very much free time but I’ll try to persevere to the end.My applicaction it’s called „Get out from smog”. What it will do? Principle of operation: SearchWięcej o„Get out from smog” – DSP[…]
Command pattern Another design pattern it is very popular.I’s used inter alia in approach CQRS (for more information about CQRS). What is command pattern and when to use it: Sometimes, you don’t want to do execute your functions immediately.You can use the Command pattern to add work to a queue, to be done later. YouWięcej oCommand pattern[…]
Observer pattern Today, I will try to present a observer pattern.It is part of behavioral patterns and is relatively simple so I think it’s worth it to present. Subject – the object of which we want to obtain information Observer – objects pending notification of the change in the observed object When we use it? When we have object(subject)Więcej oObserver pattern[…]