dotnetomaniak.pl

dotnetomaniak.pl - Artykuły z tagiem dotnet

Hi there! I’ve just had to sort some list alphabetically with specific values on top. Here is one of the possible solution. Worth to know:OrderBy sorts items in ascending order [a, b, c, d] [1,2,3,4]Can be use with boolean functionFalse = 0True = 1 So if we use: list.OrderBy(item => item == "Cat"); Item that equals „Cat” will be placed as last element, because as the only element returns true(1) as a result + as it was mention before OrderBy s...

Tagi: .Net, C#, dotnet, problem
Źródło: buildsolution.net
Dziel się z innymi:
OrderBy with boolean value | How to put specific values on top of the list | Build solution

Sztuka programowania 3 godziny, 53 minuty temu j_boczek 35 rozwiń

In the previous post about Topshelf and Quartz.NET I mentioned that there is a chance to configure the inversion of control container instead of manually pointing which implementation we want to use. In this post, I will explain how to do just that, using a few popular inversion of control containers – Ninject and StructureMap. If you prefer any other container, please let me know. I’ll do my best to include it here. Plain projec...

Topshelf and Quartz.NET with dependency injection | mpustelak.com

Sztuka programowania 21 dni, 16 godzin, 56 minut temu Mateusz Pustelak 72 rozwiń

I often work on applications whose sole task is to execute a script at certain time or day. You may approach it in several ways, eg.: Task Scheduler (Windows), SQL Job (if it is a SQL task) or CRON in Linux. You may also write application, which would run in background and execute a script at certain time. The only question is – do you really want do it? In this post, I would like to introduce other solution to tasks like this. ...

Scheduled jobs made easy - Topshelf and Quartz.NET | mpustelak.com

Programowanie rozproszone 29 dni, 4 godziny, 55 minut temu Mateusz Pustelak 124 rozwiń

How often in your code do you see ifs checking whether the object is not null? Often? Very often? What would happen if you didn’t have to check it out? Surely code would be easier to maintain – no ifs = no test cases. This can all be achieved using Null Object pattern.

Null Object pattern - how and when to use it | mpustelak.com

Sztuka programowania 40 dni, 21 godzin, 20 minut temu Mateusz Pustelak 242 rozwiń

Reading time ~5 minutes In my ongoing series on calculating similarities one angle always seemed worth trying, and was pointed out many times on Reddit - use C++ and matrix manipulations. Similarity calculation fits very nicely into matrix representation, and there are algorithms targeting sparse matrix manipulation. So why did I delay it for so long? Because I had other angles I wanted to try and, from the looks of it required significant changes in the existing code base. But since last op...

Understanding OutOfMemoryException – IndexOutOfRange

Sztuka programowania 41 dni, 21 godzin, 12 minut temu maklipsa 144 rozwiń

Reading time ~4 minutes This post is an analysis of a very interesting optimization proposed by Nicholas Frechette in the comments under the previous post. He proposed to use one of the oldest tricks in performance cookbook - divide and conquer. Well, it did not turn out as I expected.Saga Before I go further here are some link to the previous posts on the problem of calculating similarities and then optimizing. This thread grew to a few post. Here are all of them:How I calculate similariti...

Dziel się z innymi:
Dividing a bit in two for performance – IndexOutOfRange

Sztuka programowania 44 dni, 21 godzin, 21 minut temu maklipsa 78 rozwiń

Reading time ~2 minutes This post was inspired by a discussion on Reddit that followed my previous post In this post, I will cover a suggestion by BelowAverageITGuy that cut down the total execution time by almost one hour. Saga Before I go further here are some link to the previous posts on the problem of calculating similarities and then optimizing it grew to few post. Here are all of them:How I calculate similarities in cookit?How to calculate 17 billion similaritiesIndependent code in ...

Dziel się z innymi:
Making bits faster – IndexOutOfRange

Sztuka programowania 56 dni, 5 godzin, 36 minut temu maklipsa 94 rozwiń

Reading time ~1 minute This will be a fast errata to the previous one. This time I will expand the oldest performance mantra: The fastest code is the one that doesn’t execute. Second to that is the one that executes once Last time I’ve forgot to mention one very important optimization. It was one of two steps that allowed me to go from 1530 to 484 seconds in the sample run.Saga Before I go further here are some link to the previous posts on the problem of calculating similarities and then...

Dziel się z innymi:
Independent code in performance optimizations – IndexOutOfRange

Programowanie rozproszone 69 dni, 7 godzin, 6 minut temu maklipsa 46 rozwiń

Reading time ~6 minutes Last time I’ve shown how I’ve gone from 34 hours to 11. This time we go faster. To go faster I have to do less. The current implementation of Similarity iterates over one vector and checks if that ingredient exists in the second one. Since those vectors are sparse the chance of a miss is big. This means that I am losing computational power on iterating and calling TryGetValue. How to iterate only over the mutually owned ones and do it fast? Saga Before I go furth...

Dziel się z innymi:
Using bit masks for high-performance calculations – IndexOutOfRange

Sztuka programowania 66 dni, 6 godzin, 46 minut temu maklipsa 53 rozwiń

Reading time ~5 minutes The previous post described the methodology I’ve used to calculate similarities between recipes in cookit. If You haven’t read it I’ll give it 4 minutes because it will make understanding this post easier. Go one, I’ll wait. It ended on a happy note and everything seemed to be downhill from there on. It was until I tried to run it. It took long. Very long. How long? I don’t know because I’ve canceled it after about one hour. Going with a famous quote (probably from E...

Dziel się z innymi:
[EN]How to calculate 17 billion similarities – IndexOutOfRange

Sztuka programowania 72 dni, 6 godzin, 41 minut temu maklipsa 140 rozwiń

Reading time ~5 minutes Warning this post contains some math. Even more, it shows how to use it for solving real life problems. This post describes how I calculate similarity between recipes in my pet project cookit.pl. For those of you that don’t know, cookit is a search engine for recipes. It crawls websites extracting recipe texts, then it parses it and tries to create a precise ingredient list with amounts and units. 182 184 recipes2936 ingredients This scale may not seem huge, but tr...

Dziel się z innymi:
How I calculate similarities in cookit? – IndexOutOfRange

Sztuka programowania 80 dni, 5 godzin, 33 minuty temu maklipsa 56 rozwiń

Reading time ~6 minutes This post is covering a subset of what I am talking in my talk How I stopped worrying and learned to love parallel processing (currently only in polish). This will cover on how, in terms of performance, AsParallel can kick you in a place where it hurts a lot, simultaneously being a blessing in terms of… performance. How is that? Let’s look at someHistory AsParallel was introduced as an extension to LINQ with TPL in .NET 4.0. In theory, it’s God’s sent. The promise w...

Dziel się z innymi:
[EN] Problems with AsParallel – IndexOutOfRange

Architektura 82 dni, 3 godziny, 39 minut temu maklipsa 108 rozwiń

Nowa seria: Tajemnice CLR. Dziś na tapetę biorę to jak działa metoda GetType() czyli skąd obiekt wie jakiego jest typu.

Tagi: CLR, coreclr, dotnet
Źródło: blog.kokosa.net
Dziel się z innymi:
Blog Kokosa | Tajemnice CLR - jak działa GetType()

Inne 105 dni, 1 godzinę, 25 minut temu KonradKokosa 228 rozwiń

Reading time ~4 minutes Diagnosing high memory usage can be tricky, here is the second part of how I found what was hogging to much memory in our system. In the previous post I’ve wrote how to create a memory dump and how many possibilities of catching just the right moment for it ProcDump has. When trying to analyze memory leaks, or high memory usage (not necessary meaning a leak) we have a few ways to approach it: Attach a debugger There are many problems with this approach, to name a fe...

[EN]Debugging high memory usage. Part 2 - .NET Memory Profiler – IndexOutOfRange

Narzędzia 134 dni, 22 godziny, 1 minutę temu maklipsa 80 rozwiń

Reading time ~6 minutes This is a sixth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions Parts 3, 4, and 5 covered the BackgroundJob class responsible for enqueuing single jobs (fire and forget). This post will cover RecurringJob class exposing API for recurring jobs (as the name ...

Dziel się z innymi:
[EN] Don't do it now! Part 6. Hangfire details - recurring jobs and cron expressions – IndexOutOfRange

Architektura 145 dni, 38 minut temu maklipsa 36 rozwiń

Reading time ~3 minutes This is a fifth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions Part 3 covered almost all functions in BackgroundJob class except for ContinueWith functions family. So here we go :) The fact that it has the same name as a System.Threading.Tasks.Task funct...

Dziel się z innymi:
[EN]Don't do it now! Part 5. Hangfire details - job continuation with ContinueWith – IndexOutOfRange

Architektura 152 dni, 3 godziny, 51 minut temu maklipsa 65 rozwiń

Reading time ~3 minutes This is the fourth part of a series discussing job scheduling and Hangfire details:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellation This part will cover few small topics:dashboardretriesmore technical part of the Hangfire.BackgroundJob class APIjob cancellationDashboard Let’s start with the administrative dashboard because it gives a good background for the ...

Dziel się z innymi:
[EN] Don't do it now! Part 4. Hangfire details - dashboard, retries and job cancellation – IndexOutOfRange

Architektura 159 dni, 9 godzin, 5 minut temu maklipsa 40 rozwiń

Reading time ~2 minutes In the previous post I’ve wrote about why I think the ability to schedule tasks for later execution is a fundamental technical feature, but also a must have from a business point of view. We are passed the whys, so lets get to the hows. The answer is simple - Hangfire. I’ve wrote about it here, here and here, so yeah, I like it. Hangfire is an amazing library. It has proved itself in my pet project (cookit.pl) and in a huge ERP system that we are building at work, where we repla...

Dziel się z innymi:
Don't do it now! Part 2. Background tasks, job queuing and scheduling with Hangfire – IndexOutOfRange

Architektura 188 dni, 7 godzin, 20 minut temu maklipsa 138 rozwiń

.NET Core 1.0 is here and it’s a great, great opportunity to start playing with it not only on Windows platform but also on Linux. Today I will show you not only how to run .NET Core but how to setup whole developer environment for developing .NET. Since one of Microsoft main goals was multiplatform support, let’s take a quick look on how-to setup .NET Core on Ubuntu. Why Ubuntu? Well.. it’s popular and easy....

Źródło: localwire.pl
Dziel się z innymi:
Setup .NET Core on Ubuntu 14.04 LTS

Narzędzia 227 dni, 5 godzin, 37 minut temu Michał Wilczyński 138 rozwiń

Big updates related to the Warden project are coming this and the upcoming week. The first release (1.0.0) has just been published to the NuGet and additionally the Web Panel is almost completed. Not only the web interface will be available as a part of the repository, but also, it will be running in the Azure cloud in case you’d like to play with it or store your monitoring data without a need to provide own, hosting environment. And there is one more good news – Warden is getting a brand new logo.

[EN] Warden goes Azure and gets a logo | Piotr Gankiewicz

Daj się poznać 291 dni, 56 minut temu spetz 25 rozwiń

1 2
Szkolenia SecurITum

luty

25.

marzec

03.
Wroc#
Wrocław

kwiecień

03.
4developers
Warszawa
Zobacz wszystkie

.NET Developer Days 2015

W tym roku ponownie jak w poprzednim jesteśmy jednym z patronów medialnych konferencji .NET Developer Days. W tym roku jednym z prelegentów będzie Scott Hanselman.  czytaj więcej
2015-07-22

Najaktywniejsi

1

macko (32 816,53)

2

http://pawlos.blo... (31 520,45)

3

pzielinski (27 178,29)

4

gordon_shumway (21 178,87)

5

paduda (20 336,33)

6

psz750 (13 018,14)

7

rroszczyk (10 383,88)

8

Damian (9 011,08)

9

danielplawgo (7 235,99)

10

arek (6 727,86)

11

burczu (6 214,22)

12

PaSkol (5 393,84)

13

lukaszgasior (4 097,38)

14

jj09 (3 418,06)

15

jedmac (3 238,38)

16

http://jakub-flor... (3 224,66)

17

CaMeL (2 954,87)

18

mnikolajuk (2 596,93)

19

spetz (2 533,07)

20

FutureProcessing (2 530,11)