Tutorial by Examples: core

Okay it took me about a day to figure it out so here I am posting the steps I followed to get my Database First working in a Class Project (.NET Core), with a .NET Core Web App. Step 1 - Install .NET Core Make Sure you are using .NET Core not DNX (Hint: You should be able to see the .NET Core opti...
Created this really bad program #include <stdio.h> #include <ctype.h> // forward declarations void bad_function() { int *test = 5; free(test); } int main(int argc, char *argv[]) { bad_function(); return 0; } gcc -g ex1.c ./a.out //or w...
Spring is a vast framework, so the Spring framework has been divided in several modules which makes spring lightweight. Some important modules are: Spring Core Spring AOP Spring JDBC Spring Transaction Spring ORM Spring MVC All the modules of Spring are independent of each other except S...
Objective-C Just log this see how to use a particular filter NSArray *properties = [CIFilter filterNamesInCategory:kCICategoryBuiltIn]; for (NSString *filterName in properties) { CIFilter *fltr = [CIFilter filterWithName:filterName]; NSLog(@"%@", [fltr a...
Core Plot provides a podspec, so you can use cocoapods as your library manager which should make installing and updating much simpler Install cocoapods on your system In the project directory add a text file to your project called Podfile by typing pod init in your project directory In the Podfil...
Objective-C Create a new iOS project and add CoreSpotlight and MobileCoreServices framework to your project. Create the actual CSSearchableItem and associating the uniqueIdentifier, domainIdentifier and the attributeSet. Finally index the CSSearchableItem using [[CSSearchableIndex defaul...
1)In project.json, add below dependencies- "Serilog": "2.2.0", "Serilog.Extensions.Logging": "1.2.0", "Serilog.Sinks.RollingFile": "2.0.0", "Serilog.Sinks.File": "3.0.0" 2)In Startup.cs, add below lines in constru...
To use an in memory cache in your ASP.NET application, add the following dependencies to your project.json file: "Microsoft.Extensions.Caching.Memory": "1.0.0-rc2-final", add the cache service (from Microsoft.Extensions.Caching.Memory) to ConfigureServices method in Startup...
In this example we will ask the bitcoin network for the merkle block number 442603. In order to do this we need to send a filterload message and then we have to send a getdata message using the inventory type MSG_MERKLEBLOCK. The peers should reply with a merkleblock message for the requested bloc...
One needs the predicted probabilities in order to calculate the ROC-AUC (area under the curve) score. The cross_val_predict uses the predict methods of classifiers. In order to be able to get the ROC-AUC score, one can simply subclass the classifier, overriding the predict method, so that it would a...
IMPORTANT This is just an example code, do not use in production. In order to download an header chain we have to send a getHeaders message. In this example we will require as much as possible headers after the 40000th one.The peer will respond with batch of 2000 headers so, we have to take the la...
If you do not want to use ASPNETCORE_ENVIRONMENT from environment variables and use it from web.config of your application then modify web.config like this- <aspNetCore processPath=".\WebApplication.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\lo...
UseExceptionHandler can be used to handle exceptions globally. You can get all the details of exception object like Stack Trace, Inner exception and others. And then you can show them on screen. You can easily implement like this. app.UseExceptionHandler( options => { options.Run( as...
The following example shows other ways you can use the underscore in numeric literals: long creditCardNumber = 1234_5678_9012_3456L; long socialSecurityNumber = 999_99_9999L; float pi = 3.14_15F; long hexBytes = 0xFF_EC_DE_5E; long hexWords = 0xCAFE_BABE; long maxLong = 0x7fff_ffff_ffff_ffffL;...
Prerequiste steps: Get dotnet core for your platform: Dotnet Core Follow instructions and make sure dotnet core is working Get Visual Studio Code for your platform: VS Code Launch Visual Studio Code (VS code) and install the C# extension then reload Create self hosted NancyFx project: ...
Windows 10 IoT Core is available only for Raspberry Pi 2 and 3. It is important to note that this is not a full version of windows as one might expect, it is designed specifically for IoT (Internet of Things) applications. It will not run most standard windows applications, and does not have a start...
Glass.Mapper.Sc allows you to move your data from Sitecore and into your code seamlessly using strongly typed objects. The framework allows you to map data on to c# classes and interfaces without any additional mark-up. As the data is mapped to your target objects it is converted to the target type...
After installing Visual studio code configure .net core and C#. Configure C# based on market-place. Reference Url: C# market place .net core Launch Visual studio code. Press [ctrl + P] paste "ext install csharp" this and hit. Once done above steps , C# extension available i...
Steps: Create Empty .Net Core Web App: Go to wwwroot, and create a normal html page called Index.html: Configure Startup.cs to accept static files (this will require to add "Microsoft.AspNetCore.StaticFiles": "1.0.0" library in the “project.json” file): ...

Page 3 of 4