mooo

https://ift.tt/3sDGaw2 via /r/toronto https://ift.tt/3dYjpir

https://ift.tt/3ky6XY3 via /r/interestingasfuck https://ift.tt/3kDJogr

https://ift.tt/3uyVzj8 via /r/funny https://ift.tt/3bMYXOT

https://ift.tt/3r4EStF via /r/interestingasfuck https://ift.tt/37V5J49

https://ift.tt/3r30qXV via /r/interestingasfuck https://ift.tt/3dU4CFn

https://ift.tt/37X0xwn via /r/interestingasfuck https://ift.tt/3kuCo5D

https://ift.tt/3pVZ53C via /r/movies https://ift.tt/3su7fSk

https://ift.tt/3r63O45 via /r/interestingasfuck https://ift.tt/3bLiH5n

https://ift.tt/2PkLNRH via /r/plants https://ift.tt/3q3Nboz

https://ift.tt/3qKAHDl via /r/science https://ift.tt/3uHbsnV

https://ift.tt/2PlYI5V via /r/interestingasfuck https://ift.tt/37TsTYk

https://ift.tt/3uGFE2b via /r/todayilearned https://ift.tt/3pY6cZf

https://ift.tt/3aWUc65 via /r/houseplants https://ift.tt/3dUzaXU

https://ift.tt/3bR6bRQ via /r/OldSchoolCool https://ift.tt/2NFfBYV

https://ift.tt/3kvdHG9 via /r/interestingasfuck https://ift.tt/3sA0iiL

No text found via /r/quotes https://ift.tt/3kx0Mnd

https://ift.tt/2ZUBuWz via /r/woodworking https://ift.tt/3sxohit

https://ift.tt/3q1HkzR via /r/pics https://ift.tt/3b0ZldB

https://ift.tt/3kycRsb via /r/houseplants https://ift.tt/3bM0zs3

https://ift.tt/3uKW2PB via /r/nottheonion https://ift.tt/2NJRJ68

https://ift.tt/3kw3nh2 via /r/funny https://ift.tt/37VbdvC

https://ift.tt/37TbpLZ via /r/pics https://ift.tt/2Mwbj5k

https://ift.tt/3qa5rwB via /r/aww https://ift.tt/2PiFYEm

https://ift.tt/2ZVHRIX via /r/OldSchoolCool https://ift.tt/3bOM0Ek

https://ift.tt/3uCgdPs via /r/ProgrammerHumor https://ift.tt/3sA2sz4

https://ift.tt/3b0IOGj via /r/interestingasfuck https://ift.tt/37TY1Hm

https://ift.tt/3bFXlXa via /r/BeAmazed https://ift.tt/3b0LdAZ

https://ift.tt/2O3UUWd via /r/aww https://ift.tt/30ciZx3

https://ift.tt/2PgsJE1 via /r/houseplants https://ift.tt/3bQVZbY

https://ift.tt/3stU8R6 via /r/OldSchoolCool https://ift.tt/3kvY2pR

https://ift.tt/3dTp5KA via /r/toronto https://ift.tt/3dT8ars

https://ift.tt/3b1DSB6 via /r/aww https://ift.tt/2NLUqUV

https://ift.tt/3kyyvMI via /r/interestingasfuck https://ift.tt/2O9X6eY

https://ift.tt/3bM4x43 via /r/funny https://ift.tt/3dO0Ihs

https://ift.tt/3bLDpC7 via /r/NatureIsFuckingLit https://ift.tt/37S9TJJ

No text found via /r/quotes https://ift.tt/3dYGamB

https://ift.tt/2ZYGfOW via /r/toronto https://ift.tt/3kyAQHB

https://ift.tt/3dT6iin via /r/todayilearned https://ift.tt/2P72bF9

Recently I’ve posted a question – what is the most difficult for you to understand when you’re learning C#? https://ift.tt/3aYfyjC of the things that you guys have mentioned was interfaces. Let’s put some light on interfaces and their purpose.What is an interface?You can think about an interface as a contract that the class implementing that interface has to fulfill. We can say that interface tells us WHAT needs to happen. The class needs to “worry” about HOW to do it. Interface can declare property, event, or method.public interface ISampleInterface { string Name { get; set; } // Property event Action SomethingHappened; // Event int Add(int a, int b); // Method } ExampleLet’s take a look at the INotification interface.interface INotification { void Send(string message); } It has only one method declared. The method is Send, which takes message parameter, type of string. Its purpose is to mark the class that implements its interface as a class that can Notify a user about something, by sending a message.Let’s take Email Notifications on the wallpaper.class EmailNotification : INotification { public void Send(string message) { // code responsible for sending email } } The interface is forcing EmailNotification class to implement (write code to execute) Send method. Class implementing an interface has to have exactly the same method declaration.Does the INotification interface care about the technical details of how the email notification is sent?Nope, it doesn’t. All it has to do is to make sure that this class declares to have the method that is contained in the interface. Technical details are not important. The implementation can be either written by a developer or delegated to an external library.The important thing is that the class implementing INotification interface declares that it’ll send a message to the user, somehow. Class implementing an interface provides an implementation of declared functionalities.Let’s look at example usage. Something happened in the system and it should notify the user about that with some kind of message. Notification preferences normally would be taken from some kind of storage, like a database. For this example, I just used a manually initialized list.Notice that I am able to initialize a list with the type of Interface that has been declared. Classes implementing this interface can be added to such a list. Thanks to that, in foreach loop, I can execute .Send(string message) method declared by the interface. In effect, user would be notified of every preferred notification method. static void Main(string[] args) { var notificationPreferences = GetUsersNotificationPreferences(); foreach (var notificationPreference in notificationPreferences) { notificationPreference.Send(args[0]); } } static List GetUsersNotificationPreferences() { // This should come from user’s preferences, // which could be stored in database for example return new List { new EmailNotification(), new SmsNotification(), new PushNotification() }; } Default implementationSince C# 8.0 an interface may provide a default implementation. It may also define static members in order to provide a single implementation for common functionality.public interface ILogger { void Log(string message) => Console.WriteLine($”Log: {message}”); } I am programming mostly in medium-large scale business web applications and we haven’t really used it too much. My recommendation is not to abuse it and think twice about whether you really need to have a default implementation.Class can implement multiple interfacesOne class can implement multiple interfaces.class EmailNotification : INotification, ILogger { public void Send(string message) { // code responsible for sending email } public void Log(string message) { Console.WriteLine($”Email sent with message: {message}”); } } Interface can implement another interfaceinterface INotification : ILogger { void Send(string message); } Then every class implementing that interface needs to implement the other one as well.Ok, but how does it help me? Do I really need to split things into WHAT (interface) and HOW (class) to do my project? Well… Interfaces are part of something bigger. But to give you one small example. If you’ve heard about Dependency Injection you may recall that abstractions should not depend on details. For a simple example, think about architecture with layers. Let’s say that there are only two layers, outer and inner. The outer layer declares an interface saying that I need you (the inner layer) to do something. For example, send an email. An engine that is responsible for running the application starts executing a piece of code of the outer layer that declares the need to send an email. Then, it looks for implementation of that interface, so a class that knows how to send an email. How does the “engine” know what class to provide here? It’s all set up in something called dependency injection’s container, but that’s definitely for another topic.Those are the next steps. I hope I’ve been able to make interfaces at least a little bit more understandable.Is there something else that bothers you about interfaces? via /r/learncsharp https://ift.tt/3b0vH83

Interfaces explained

Recently I’ve posted a question – what is the most difficult for you to understand when you’re learning C#? https://ift.tt/3aYfyjC of the things that you guys have mentioned was interfaces. Let’s put some light on interfaces and their purpose.What is an interface?You can think about an interface as a contract that the class implementing that

Read More

https://ift.tt/2NDiJ7C via /r/interestingasfuck https://ift.tt/3q3T2dg

https://ift.tt/3sySHRz via /r/OldSchoolCool https://ift.tt/3aZxASv

https://ift.tt/37SgXpO via /r/funny https://ift.tt/3r1uBhR

https://ift.tt/3pVrCpT via /r/pics https://ift.tt/3su1kNl

https://ift.tt/3aZhrg3 via /r/DIY https://ift.tt/2NJsEs8

https://ift.tt/3sxKugp via /r/plantclinic https://ift.tt/3swzKir

Hi guys,Today I am writing about ML.NET and Model Builder in Visual Studio. I think every developer at least should be familiar with this tool. In 4 simple steps you can build up and train a model. Microsoft did a fantastic job in simplifying Deep Learning.AutoML automatically explores different machine learning algorithms and settings. This allows us to find the best possible model for our scenario. This way we don’t have to worry about NN Layers, architecture and hyper parameters.TF.NET is a C# wrapper class for Tensor Flow. Now we can import Tensor Flow models into our .NET environment with just couple of lines of code.I am very happy about this, and so I am writing this new blog post explaining all there is to build up a simple image classification model. The focus being on how to work with the Model Builder and explaining the things it does for us.How to use ML.NET Model Builder for Image Classification – CODE-AI (code-ai.mk)I did my best to explain all there is to know on the subject without going into too much detail. I will post more tutorials and more examples soon. I am working on a complete series on how to use ML.NET in different project scenarios and how to import Tensor Flow models in .NETThank You, via /r/csharp https://ift.tt/2ZU3KbA

Deep Learning with ML.NET and Model Builder in Visual Studio

Hi guys,Today I am writing about ML.NET and Model Builder in Visual Studio. I think every developer at least should be familiar with this tool. In 4 simple steps you can build up and train a model. Microsoft did a fantastic job in simplifying Deep Learning.AutoML automatically explores different machine learning algorithms and settings. This

Read More

https://ift.tt/3swu9sr via /r/interestingasfuck https://ift.tt/3dVUWdB

https://ift.tt/3sxKugp via /r/plantclinic https://ift.tt/3swzKir

https://ift.tt/2NNDZXW via /r/OldSchoolCool https://ift.tt/3sy9hRz

https://ift.tt/3aH6EH8 via /r/Damnthatsinteresting https://ift.tt/2NR5e3S

https://ift.tt/2ZyLrc7 via /r/reactiongifs https://ift.tt/3dvZ4AX

https://ift.tt/3uCZNq8 via /r/interestingasfuck https://ift.tt/3ktZSrt

https://ift.tt/3dO7TGr via /r/aww https://ift.tt/3uDHYr4

https://ift.tt/3891n9J via /r/aww https://ift.tt/3sv5sN1

https://ift.tt/3r2E3lo via /r/interestingasfuck https://ift.tt/3sIPRtx

https://ift.tt/3uBPC4T via /r/mildlyinteresting https://ift.tt/3uwcQcZ

https://ift.tt/3r2E3lo via /r/interestingasfuck https://ift.tt/3sIPRtx

https://ift.tt/2ZyLrc7 via /r/reactiongifs https://ift.tt/3dvZ4AX

https://ift.tt/3aGkmK4 via /r/mildlyinteresting https://ift.tt/3aEiC47

https://ift.tt/1HNeZPZ via /r/todayilearned https://ift.tt/2OTJfJV

https://ift.tt/3aYpCJw via /r/interestingasfuck https://ift.tt/3dJkNWa

https://ift.tt/2NIv1Lp via /r/mildlyinteresting https://ift.tt/3bpRYLB

https://ift.tt/3qOOzMN via /r/pics https://ift.tt/3usmayc

https://ift.tt/3qKHuNr via /r/Damnthatsinteresting https://ift.tt/3qP4I4M

https://ift.tt/37QeOv0 via /r/interestingasfuck https://ift.tt/3pP2d1a

https://ift.tt/2ZK2doD via /r/interestingasfuck https://ift.tt/3bB2QX0

https://ift.tt/1IEhODQ via /r/todayilearned https://ift.tt/3qJsFuk

https://ift.tt/3qJDXyF via /r/pics https://ift.tt/3aHIrjH

https://ift.tt/3dNt0st via /r/interestingasfuck https://ift.tt/3bIdpYj

https://ift.tt/1HNeZPZ via /r/todayilearned https://ift.tt/2OTJfJV

https://ift.tt/2ZJjUVp via /r/science https://ift.tt/2MjIp8o

https://ift.tt/3krAra7 via /r/Damnthatsinteresting https://ift.tt/3qMiDsu

https://ift.tt/3dJMePC via /r/pics https://ift.tt/3bCqzGt

https://ift.tt/3kma8lj via /r/funny https://ift.tt/3qSnU1M

https://ift.tt/3pFIRLY via /r/interestingasfuck https://ift.tt/3buhxeo

https://ift.tt/3pWCxQc via /r/interestingasfuck https://ift.tt/2NyU7wN

https://ift.tt/3stHWzT via /r/OldSchoolCool https://ift.tt/3kp17It

https://ift.tt/2ZVI8M2 via /r/ontario https://ift.tt/3bEzmYp

https://ift.tt/3bGh6xD via /r/worldnews https://ift.tt/2MrhpUF

https://ift.tt/3aTfMbA via /r/todayilearned https://ift.tt/3qYlOxd

https://ift.tt/2ZSy8U0 via /r/OldSchoolCool https://ift.tt/3ksvgq5

https://ift.tt/2O2SbfE via /r/ontario https://ift.tt/3uykoMf

https://ift.tt/3kq6x67 via /r/interestingasfuck https://ift.tt/3bUYvOP

https://ift.tt/3bA1ADC via /r/aww https://ift.tt/3qWzBo8

https://ift.tt/3aTfMbA via /r/todayilearned https://ift.tt/3qYlOxd

https://ift.tt/3swfQEl via /r/plantclinic https://ift.tt/3dHEGwR

https://ift.tt/2Mn7zmB via /r/mildlyinteresting https://ift.tt/2O2FJwj

https://ift.tt/3aPg2Z6 via /r/BuyItForLife https://ift.tt/3qUVHY1

https://ift.tt/2nhIdZf via /r/programming https://ift.tt/3pLNpk1

https://ift.tt/3pSSQO6 via /r/worldnews https://ift.tt/3ktvf5y

https://ift.tt/2ZKQ5ni via /r/canada https://ift.tt/2Pb5MSP

https://ift.tt/3ksBu9K via /r/BeAmazed https://ift.tt/3qWjaIg

https://ift.tt/3khaxpr via /r/graphic_design https://ift.tt/3kkxSXc

https://ift.tt/2NGg38W via /r/interestingasfuck https://ift.tt/37Ksl7o

https://ift.tt/3qXAixp via /r/interestingasfuck https://ift.tt/2P65EUp

https://ift.tt/3dI2S24 via /r/plants https://ift.tt/3dLMJbO

https://ift.tt/1NNikXF via /r/todayilearned https://ift.tt/3unOMJ4

https://ift.tt/3dGLNWc via /r/houseplants https://ift.tt/3uppRF0

https://ift.tt/2NTsQ7Q via /r/funny https://ift.tt/3dSHhEn

https://ift.tt/3pP77eD via /r/houseplants https://ift.tt/2MiPExl
1 93 94 95 96 97 168