>Other than the culture of generous acceptance of pulling in dependancies and ease of use is it really all that different from downloading a library for say C++ and using it?
The problem is not just pulling in dependencies and ease of use. Other languages have that (Maven, NuGet, Composer, etc.). The problem is the "micropackage" culture. Let's look at mail parsing. The package mailparser
depends on 8 modules that at the same time depends on more than 10 modules. I won't check the whole graph so let's stop at that level. In the .NET world you can use for mail parsing MimeKit that depends on BouncyCastle that at the same time doesn't depend on anything else that's not included in the standard library/framework. This means that if I use MimeKit I only need to check that both MimeKit and BouncyCastle do not include malicious code, or at least I only have to trust the people behind two packages. If I use mailparser
, however, I would need to check way more than 10 packages (again, I didn't check the whole graph) or trust the people behind more than 10 packages.
That's just one example. Node.js projects end up with a ridiculous quantity of third-party dependencies. In the best case escenario you can only hope no module includes malicious code.
Double dash is just convention for console programs to pass "full name" parameters. And one dash for shortened versions.
You can use package https://www.nuget.org/packages/System.CommandLine where you just have to describe your parameters, all parsing work is done by library. There is link to github with documentation on the right side.
​
If you want to implement it manually, your code must check for --random, not just random. Args array is split by whitespaces, not by dashes or anything else.
install dotnet cli. Then:
$ dotnet new sln -o MyDotnetProject $ cd MyDotnetProject $ dotnet new mvc -o Web $ dotnet new classlib -o Domain $ dotnet new xunit -o Tests $ dotnet add Web reference Domain $ dotnet add Tests reference Domain $ dotnet sln add Web Tests Domain
You'll end up with 3 projects inside the cwd.
Domain
is a project that generates a dll. It's supposed to contain the business logic of your webapp.
Web
is a project that generates an executable. This is where you have controllers and html. You'll inject your Domain classes with dependency injection and call them from the controllers.
Tests
is a xunit project to unit test your domain logic.
Use dotnet build
to build all your projects, dotnet restore
to restore all nuget packages, and dotnet test
to test everything.
To run your webapp you enter the Web
folder and dotnet run
.
Instructable I followed for the hardware. Didn't make it specifically for this obviously.
Audio control using Audio Switcher API
If you’re using Xamarin.TestCloudAgent, make sure to remove it from the release build.
It uses private APIs to allow automated UITesting.
#if DEBUG Xamarin.Calabash.Start(); #endif
This isn't the size of the package. It's the number of times it has been downloaded.
The package is only 141.65 KB. See https://www.nuget.org/packages/Microsoft.Extensions.Primitives/6.0.0-preview.7.21377.19
PDF extraction is actually a really tough problem still. My last company worked with a number of the tools you've probably seen, but we found actually the best extractor was, by far, TIKA, which is a Java service. If you can, I'd recommend just putting it in a tiny Java microservice and calling it with PDFs you want the extraction from. Alternatively you can execute a Java application directly in your C# code, or you could use this NuGet package directly: https://www.nuget.org/packages/TikaOnDotNet/
Note, that last one works, and we used it at my last job, but it's built on IKVM, which is a jvm implementation inside of the CLR, and the project is dead and not getting migrated to dotnet core.
Instead of putting Microsoft.Extensions.Logging in your library, it'd be better to just include the interfaces.
They've made this package for this: https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/
Any idea what the actual bug is?
Any idea how to find the source for one of the affected packages? (e.g. System.Text.Encodings.Web)?
e.g. https://www.nuget.org/packages/System.Text.Encodings.Web/ says the package url is the uniquely unhelpful http://dot.net/ - yay.
A few links:
.NET Interactive - kernel for Jupyter supporting .NET
AngouriMath - the repo for our open source computer algebra library (although written in C#, has a simple wrapper in F#)
AngouriMath.Interactive - the package which has built-in LaTeX rendering. In fact, everything it does is just adding the MathJax js library when outputting the html, nothing complicated :).
Feel free to ask about anything, ask for help or offer contributions! :)
It's still possible to do platform-locked stuff in dotnet core (and presumably, therefore, .net 5). I assume nothing will stop third parties from shipping "windows-only" libraries.
For an example, check out IBM's DB2 and EF providers which have separate Windows, Mac, and Linux packages (also, they're buggy and the only way to submit bugs appears to be via an IBM India forum)
It can be real if you try. The UI is very flexible and lets you re-arrange things on the fly. OP took most of the tabs and undocked them, but it would take me 15 sec to clean VS back into a usable state. You just click on the bar at the top of each panel to rearrange it. Panels will automatically tab and dock/undock as you move them, you can also have them auto-hide if you want.
I have used a library called AvalonDock to achieve the same thing in WPF.
That's actually available as a package for .NET 4.0, because the feature is a combination of compiler and library support - nothing special in the runtime: https://www.nuget.org/packages/Microsoft.Bcl.Async/
Hey guys
A few weeks ago I created a post here about this project I was starting. Today I released the first version which I hope is an appealing Proof of Concept. At the time of writing I have implemented 9 diagnostics and have around 30 more in planning. As always: if you're interested in writing your own or requesting one, do get in touch with me or send me a PR!
Some relevant links:
Jeroen
Span<T>
itself is on NuGet https://www.nuget.org/packages/System.Memory/4.4.0-preview2-25405-01
Framework apis taking Span and Memory aren't even released in Core yet ( they are still being worked on)
The Microsoft.Extensions.* libraries are somewhat independent form the framework versions. Although they are released in parallel and the version numbers are mostly the same, you can reference them from older framework versions. If you look at the nuget package https://www.nuget.org/packages/Microsoft.Extensions.Logging/ in the dependencies section, you can see which .net versions are supported - .net core 3.1 for example will use the .net standard 2.1 version
I use LinqPad for that. You can suck in your DbContext and write queries to your hearts content. Add in the Query Plan Visualizer and its a nice little workflow for not only testing to ensure the SQL generated isn't 100% hot garbage, but seeing if the SQL generated plays nicely with existing indexes and the such
Hey guys,
Some of us devs here at sporting solutions recently needed to find the difference between 2 C# objects. Rather than write it by hand for each type of object we wanted to diff, we wanted a library which could perform a diff between any 2 objects. We couldn't find an existing library for this, so decided to create our own - ObjectDiffer.
It's available on nuget as ObjectDiffer
Hopefully this will help some of you guys out if you're struggling with the same problem we were. The library is very early in development, so any pull requests would be very welcome :).
Hello!
I've long wanted an easy to use treemap to drop into a number of my WinForms tools, but haven't ever found anything that worked for me. The controls I've come across have been in some of those expensive collections of commercial controls. There are several different treemap options for WPF and other UI toolkits, but the cross section of WinForms and treemap was a very rare thing. So, for that small handful of us that still uses WinForms, I decided to build it.
Enter cmdwtf.Treemap
. I knew when I set out to build this control, I wanted it to work like System.Windows.Forms.TreeView
. In fact, I even started by trying to inherit from it, and override the drawing behavior. Unfortunately, the built-in TreeView
control is tied far closer to the native windows components than it was living purly in managed code. I decided to then just build my control from scratch, but kept it's shape based entirely on TreeView
. That lets users of TreemapView
to nearly drop it in as a replacement where they had used a treeview before. It doesn't support all the features of the TreeView (some don't make sense, and some things I just haven't quite got to implmenting yet,) but there's enough API similaraties that if you've used a TreeView
, you should be immediatly comfortable with a TreemapView
.
There's tons left to do (e.g.: testing,) and likely to be rough edges. Check the readme on GitHub for more details. All that said, feedback is very welcome.
Depends.
Personal Dev? 1-10
Professional Dev? 1,000 -> 10,000
Remember - If you're a professional and are using "+" to add two numbers together - You're doing it wrong.
There's a package for that - There's a package for everything.
I would recommend SharpOVR, it is available as NuGet package and has a dependency on SharpDX. I update it with every SDK release.
I'll probably invoke a lot of wrath here, but oh well.
Let me start by saying that I love PowerShell [Core]. I started my career in IT operations for a large enterprise (12k+ workstations) and did a ton of PowerShell scripting.
Desktop techs wanted GUIs, though, so I started down this same path of creating them in PowerShell (with WPF as you are).
Eventually, I hit all the technical and maintainability roadblocks that you'll eventually discover. Ultimately, I decided to learn C#, and eventually learned the MVVM pattern.
The learning curve wasn't terrible. And afterward, development was infinitely faster, better, and more enjoyable. After getting first WPF app using C#, I wished I could take back all the hundreds of hours I wasted on developing in PowerShell.
And I'm not saying throw out your PS scripts and rewrite the logic in C#. You can add the PowerShell SDK NuGet package and run your scripts directly from your C# app. Or you can start an external PS process to run the script.
I'm just advocating that the "wrapper" app be done in C# WPF. The development, debugging, and tooling benefits will outweigh the learning effort very quickly.
I think we need to watch this issue https://github.com/dotnet/aspnetcore/issues/26489 closely. As Identityserver 4 is in officially supported templates of Microsoft and used in the ApiAuthorization nuget package of Aspnetcore https://www.nuget.org/packages/Microsoft.AspNetCore.ApiAuthorization.IdentityServer
I am going to expect that the Aspnetcore team is going to build their own. As they already had plans to do this for long but went for a community package because it was used a lot. Well that's not the case anymore atm.
> I like to learn new languages
Then learn PowerShell. There's a lot to love about the learning experience. I may be a bit bias towards it, but it was seriously one of the most fun languages to learn for me. Especially if you are already comfortable on the command line, which is likely if you're mainly into Linux :)
The rest is less important, because at the end of the day the worst thing you could end up with a nice shell to use at work. That being said...
> Now, I would like to pull some data from the web and Outlook into Excel and generate some reports etc
PowerShell is an easy choice for Outlook and Excel. You can use the same COM objects you do in VB, or use a community module. Most community modules are open source with very easy to integrate licenses. ImportExcel uses Apache for instance.
Web scraping is awkward compared to other languages, but the HtmlAgilityPack helps a lot with that. If you are used to using xpath for scraping, you'll want to use HAP. If you don't need xpath look into Invoke-WebRequest
. It's a default cmdlet and get's the job done.
Which flavour of caching do you need? What you're looking for might be here.
This is now in the System.Runtime.Caching
namespace and package, as caching is useful outside of web.
Nuget says differently. https://www.nuget.org/stats/packages
I think this article skews the problem that some companies that don't like risk, revolve around Microsoft because they are seen as a trusted source.
These companies are not representative of the .NET ecosystem community.
I think if you are just starting out then a console app is a good idea. Its the easiest thing to get going and you wont have to worry about any UI stuff.
​
I'd recommend sticking with the excel file for now. What you're describing should really be stored in a database of some kind but again, if you're just starting out a spreadsheet should be fine.
The only issue with the spreadsheet is the "normal" way to edit and read them uses COM interop which is really annoying to use. If your spreadsheet is a .xlsx file or can be converted to one, you can use a library called EPPlus to make editing and reading much easier.
​
At my last job i spent ALOT of time working with excel spreadsheets in C# so feel free to ask me any questions you might have I'd love to help
Actually, it is available as part of a Nuget package for the full Framework: https://www.nuget.org/packages/System.Memory/4.5.0
Not exactly sure which version of C# it supports, I imagine it might need C# 7.2 however. EDIT: I get compiler errors with any C# version < 7.2, so it's safe to assume you'll need at least 7.2
Some more reading material for people that want to be more memory efficient in .NET and are using C# 7.2 https://msdn.microsoft.com/en-us/magazine/mt814808.aspx
With C#, you will probably be using more of the .NET Framework (which is a good thing) compared to when you were programming in C. You can also use the NuGet package manager to easily incorporate third party libraries into your program.
As far as it goes for a TrayIcon i would go with NotifyIcon As it uses WPF and can be transformed to look just as great as anything else, but then again the minimal Ram usage would raise.(WPF)
for a Timer you could use the System.Diagnostics.DispatcherTimer class and its Tick Event. Or you could run a infinite self calling Task Method
TinyMCE is extremely powerful and used by many of the larger CMS systems (WordPress for instance). It is available as a Nuget package, works with jQuery very well. The only configuration change outside of turning on/off the features I wanted was to tell TinyMCE to XML encode the contents of the textarea in order to avoid the YSOD with 'Request Validation Errors' due to the HTML markup coming back from TinyMCE.
TA-Lib is sort of the defacto base library for technical analysis.
I've never used the .net version and a lot of the links on the site are dead. Nuget has this:
https://www.nuget.org/packages/TA-Lib/
If you google for "ta-lib" you'll probably find some related stuff that you might find you like better.
I have enjoyed using PetaPoco. It's simple and does its job and doesn't get in the way. This documentation for an earlier version gives a good overview of what it can do.
To be a bit of a jerk about it, since others have answered:
This code does the same thing that Entity Framework does, but in a less efficient and less safe manner.
Take a look at Entity Framework to see how it works, and check out this NuGet package to let you incorporate EF with SQLite.
Once it is in place then this code becomes something like
databaseContext.MyEntityCollection.FirstOrDefault( x => x.id == idToFind );
it's easy to do package management when the majority of the software is free and you have an army of unpaid volunteers willing to package the software for you.
It's not so easy when companies are selling their software and aren't willing to give their source code to Mark Shuttleworth's work experience guy. As a result there is more variety in the way that software is packaged, there are license agreements to be ticked, serial numbers, activation to consider, etc.
That being said, Nuget has been around for years for developers and there is package management coming in WMF 5.0.
It won't ever be as simple as open an application, search for Photoshop and click install -but then, that is a large part of the reason why Photoshop will never be available on Linux.
>For example, I was looking for a diff library in .NET like Python's difflib but couldn't find it.
Just how did you look!? DiffPlex is one amongst thousands on nuget. I reckon, you looked extremely poorly for some reason.
As for the documentation being abysmal - could be, but I reckon,
you exaggerate with "abysmal"
it is more your expectations of where things should be than anything else. Basic reference is in the XML doc comments, libraries usually do have it. Readmes and basic examples are commonly on the github site of the package.
If you really really want to use an excel workbook as a data store for your application, then I highly recommend using EPPlus
If you just need some file format to store your data, which could be written from Excel and read by your application, I suggest CSV. You could easily read the file into memory and split it into rows/fields. I would say this by far the easiest and quickest way to get going, and even learning some basic stuff like file IO and arrays.
(That could then in the future be easily abstracted so it can be swapped out to use some other store or format if needed.)
The package they were talking about is this: https://www.nuget.org/packages/Microsoft.Windows.Compatibility
But it only provides non-UI APIs.
But... if you used Visual Studio 2019 to create a .NET Core 3 WinForms app, you shouldn't have it be missing. What does your project file look like? My test project looks like this:
test.cproj:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> <UseWindowsForms>true</UseWindowsForms> </PropertyGroup>
</Project>
Form1.cs:
using System.Windows.Forms;
namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); new OpenFileDialog().ShowDialog(); }
} }
> And Span<T> is just too sweet to miss right now.
Can't you just reference System.Memory? Right now, today, when targeting full framework..
> I'm currently targeting dotnet standard 2.0, so will I need to wait for Span<T> support in a new standard, or can I do this now?
You can add a dependency on the <code>System.Memory</code> package to use it now.
Edit: anyone downstream of your library will also have to indirectly depend on that package, so make sure you're comfortable with that.
~~PdfSharp should get you there.~~
edit: The project I worked on that we did this I misremembered. We used Ghostscript.NET to open and rasterize the pdf.
It's Microsoft.EntityFrameworkCore, however it's not a perfect superset. Some features were still downright missing from 6 with no easy workarounds last time I checked, although they just released the 2.0 preview on nuget, hopefully it's more complete.
A problem I've noticed with many parsers is that they don't appear to be ready for real-world usage. The questions in TFA are all very real scenarios that I'd like a parser to handle. Some other ones:
Some of these are niceties, some of them are vitally important. In the real world, the people you're getting CSV from are often very inconsistent. Often you get files from Excel, or from devs who didn't know better and wrote their own broken CSV printer. Maximizing diagnostic information is the only way to maintain sanity in these situations.
I needed to parse a lot of CSV, our current parser was failing miserably, and when I looked at the landscape there just wasn't anything that handled all of this so I wrote my own. If you're using .NET, I'm almost certain this is the highest quality CSV library available right now with ORM-like capabilities built in.
https://www.nuget.org/packages/IdComLog.Data
The parser itself uses a hand-written state machine that, while not trivial, isn't a huge mess that you'd think it would be:
https://idcomlog.codeplex.com/SourceControl/latest#IdComLog.Data/CsvReader.cs
Nuget is a system of sharing dependencies.
There is a remote feed that Visual studio can query and download them from.
check out https://www.nuget.org/
We would need an actual error message to be more specific.
Just a clarification for OP, it's not a requirement to use ASP.NET Core for this. The DI system is used the same in all .NET Core/.NET 5+. Your project template just may not have the NuGet by default.
https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/6.0.0-rc.2.21480.5
Generally speaking, he is not wrong though. For example https://www.nuget.org/packages/WindowsAzure.Storage/ got deprecated and split, if you want the blob library you have https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/ which also has been deprecated and repaced by https://www.nuget.org/packages/Azure.Storage.Blobs
Using the Microsoft.Data.SqlClient
package? https://www.nuget.org/packages/Microsoft.Data.SqlClient/
With
using Microsoft.Data.SqlClient;
Rather than
using Sytem.Data.SqlClient;
https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/
(Assuming Windows OS).
WinAPI has this function:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
Then you need to check if this window is yours.
Here is the package with C# bindings to all WinAPI functions:
For linting, add this package: Microsoft.CodeAnalysis.FxCopAnalyzers. If you know old-school things, this is "FxCop" in a library.
for formatting, .editorconfig
and dotnet format
have been covered already.
If you only Target Excel (and friends) after 2007 you should use https://www.nuget.org/packages/DocumentFormat.OpenXml/ instead.
It is a lot smoother and easier to work with.
Edit:
Just saw you needed to actually print the rendered content. That would require a render engine, which is why you pretty much need interop, so you can use office to render before print.
And if you want it to look exactly like in office, you need office :-(
https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers
Set the rules that are important to your organization to "Error". Then you don't have to worry about manually checking for violations every time someone commits a feature.
In an ecosystem with a larger granularity and smaller dependency trees it is much more difficult to find a project where
I mean, I'm not worried about this kind of attack against any of the .NET libraries I use from Nuget, because I know they have active stewards who have been in good standing with the community for a long time (way longer than two weeks).
There's a lot more attack surface for this kind of attack with something like webpack with its 700+ dependencies compared to Newtonsoft.Json with its... 0 dependencies. Right? Getting unreviewed commit access to Newtonsoft.Json releases would require a HELL OF A LOT more than two weeks of work, but can you say the same for all the dependencies of webpack?
> You cannot directly execute instructions like AVX or TSX in C#.
C# does have hardware SIMD support in the System.Numerics.Vectors package FWIW.
> The first one is AOT to bytecode.
Ryujinx does JIT the guest CPU instructions to bytecode, but is itself compiled ahead of time (to byte code).
Use EPPlus and you can create Excel files and send the entire array of data to the worksheet.
void CreateWorksheet(object[,] cellData) { using (var package = new ExcelPackage()) { var worksheet = package.Workbook.Worksheets.Add("[WorkbookName]"); worksheet.Cells = cellData; package.SaveAs(new FileInfo("[FilePath")); } }
That seems like a whole lot of unnecessary effort when you can just replace the session state memory provider with the redis provider.
https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider
Oh now I see the issue. You need to add the system.net.socket nuget package https://www.nuget.org/packages/System.Net.Sockets/ I guess 4.6.1 implements net standard 2.0 as in targeting it also allows you to add the missing dependency via nuget without having dependency issues
You don't get the case pattern matching syntax, but check out this library me and another dude have been working on for Discriminated Unions.
You can nest the matches, allowing for what is essentially double dispatch as well. I'm using this in my current work and it's actually pretty dang fast considering. Would be nice for the language to support it natively though.
https://www.nuget.org/packages/DiscU
Code at https://github.com/Jagged/OneOf
What /u/grudolf said is correct. I would like to add that there is a nuget package called FrameLog https://www.nuget.org/packages/FrameLog/ that will accomplish exactly what you want to do and is EF friendly.
I have not used it but I read up on it and it seems fairly easy to incorporate into a project.
The MoreLinq package contains a lot of good one too :
> This project enhances LINQ to Objects with the following methods: Acquire, Assert, AssertCount, Batch, Cartesian, Concat, Consume, DistinctBy, EquiZip, ExceptBy, Exclude, Fold, ForEach, Generate, GenerateByIndex, GroupAdjacent, Incremental, Index, Interleave, Lag, Lead, MaxBy, MinBy, NestedLoops, OrderBy, Pad, Pairwise, Partition, Permutations, Pipe, Prepend, PreScan, Random, RandomDouble, RandomSubset, Rank, RankBy, Repeat, RunLengthEncode, Scan, Segment, SingleOrFallback, SkipUntil, Slice, SortedMerge, Split, Subsets, TagFirstLast, TakeEvery, TakeLast, TakeUntil, ThenBy, ToDataTable, ToDelimitedString, ToHashSet, Trace, Window, ZipLongest, ZipShortest
Easiest would be to use a library to parse the json to an object. Newtonsoft has a good library available via nuget.
https://www.nuget.org/packages/newtonsoft.json/
You can deserialize straight to a strongly typed object. Easy peasy.
There is a package for that
https://www.nuget.org/packages/SendGrid.Extensions.DependencyInjection/
private static IServiceCollection ConfigureServices(IServiceCollection services) { services.AddSendGrid(options => { options.ApiKey = Environment.GetEnvironmentVariable("SENDGRID_API_KEY"); });
return services; }
I wrote an application many years ago for my senior seminar in uni that did this among other things. Back then I used TagLib# for reading the ID3 tags. It looks like it's LGPL license, so you should be fine so long as you don't modify and redistribute the code. https://www.nuget.org/packages/TagLibSharp
If you're targeting Windows, you could install this Nuget package (Install-Package cmdlet):
https://www.nuget.org/packages/NFC-ACR122U/
That package would provide ReadData & WriteData methods to work with the device.
If you're targeting MacOS or Linux, it's not clear if it can be done.
Why not use a Behavior ?
For .NET Framework 4.5, .NET Core 3.0, .NET Core 3.1 and later: https://www.nuget.org/packages/Microsoft.Xaml.Behaviors.Wpf/
For .NET Framework 4.0 : System.Windows.Interactivity namespace
Your Behavior is written in C#, attaches to an UI element, and acts on it. You then add it in your XAML. I'd use it on the TabControl.
If you need to use Data Binding, use Dependency Properties in your behavior.
TL;DW
oData was supported for AspCore2 for a longer time, and beta support for aspcore3.0 was released last week. OP walks you through the video of creating a new AspCore project with oData support and walks you through the process of creating a model, controller, routing and walking you through the specifics of the dependency injection/startup logic of using odata.
Thanks /u/HassanRezkHabib!
What you want is extremly niche but I have an answer for you. I'm the developer of a nuget package that can do most of what you're asking. It lets you run a webserver from your exe. I made it so I can have a control panel you can access from a browser, it was not designed for constant use by users but it's running in a few production environments for years without issues. It even supports SSL. https://www.nuget.org/packages/DNA
If you're not happy with all the features you can decompile and modify it. At some point when I've cleaned up the code I'll put it up on github.
Combine this with Costura.Fody and you have your single .exe file also. Fyi what your boss wants is stupid and he doesn't understand the implications of what he is asking for.
It seems the Nuget package is still available to use.
As for the read-only state of the repo, the most likely explanation is that the repo owner is not able to do maintenance on the library anymore, so they made it read-only. It is not ideal, but at least now people know not to expect updates.
If this is a crucial piece of software to you, and you're willing to put in the time to maintain it, perhaps you can approach the owner of the repo and see whether you can take over ownership? I see their email address is on their alternate GH profile.
I highly recommend dbup to slightly tighten your goose. Very low ceremony.
Seems to support Postgres: https://www.nuget.org/packages/dbup-postgresql
I've been working on a .NET library that calculates location based solar/lunar data and converts coordinate formats. I originally put it up in case anyone needed it as I had used it for another project.
The goal was to make a mutable object that could handle conversions and calculations with minimal code. When a property changes, everything updates (conversions, celestial times). For example:
Seattle Coordinates on 5-Jun-2018 @ 1010 (UTC)
Coordinate c = new Coordinate(47.6062, -122.3321, new DateTime(2018,6,5,10,10,0));
Now if I need to get the Moon Rise, or DMS or UTM version at that location.
Console.WriteLine(c.CelestialInfo.MoonRise);
Console.WriteLine(c);
Console.WriteLine(c.UTM);
That's it!
TL:DR - Don't spend hours learning trig math if you need to calculate location based sun/moon times or convert coordinate formats in .NET
Website - for capabilities demo
.net standard 2.0 is the correct choice. You need to add the system.data.sqlclient nuget package. https://www.nuget.org/packages/System.Data.SqlClient/
Yeah so, I'm packaging the native VLC libs (dlls/dylib/so) for each platform on nuget in the form of VideoLAN.LibVLC.{Platform} here: https://www.nuget.org/profiles/videolan
Directory tree of what it contains for Windows for example: https://github.com/mfkl/libvlc-nuget/blob/master/tree.md
Cherry pick plugins with MSBuild in your .csproj: https://github.com/mfkl/libvlc-nuget/blob/master/cherry-picking.md
This System.Memory preview package contains ReadOnlySpan<T>
and Span<T>
types which are amazing for working with strings or data chunks.
You can read how to use these types on the MSDN blog.
Serilog is simply my favorite logger utility to use with .NET Core / Standard.
I don't know what folks are going on about in this thread but at my last gig we used the Xamarin bindings for Firebase and it worked just fine. We used it for push notifications, both for registering devices and receiving notifications
Honestly they should implement this as a discriminated union of None and T. And they should ad actually make real discriminated unions/sum types of classes. Maybe is just a trivial case of a discriminated union.
Check out my library, https://www.nuget.org/packages/DiscU/. We provide very fast, compile time enforced, discriminated unions. You can make your own Maybe<T> out of it by subclassing and making your own sealed singleton sentinel class None to represent absence of a value. This forces people to handle the situation of having no value, instead of just throwing a null ref down the line.
As a dev on c# for 15 years I love c#. One great place to get modules to include in projects is Nuget.
Here is Antshares on nuget: https://www.nuget.org/profiles/antshares They keep track of numbers of downloads for their modules.
Also statistics of number of downloads/version:
https://www.nuget.org/stats/packages/AntShares?groupby=Version
So the trend is up in the dev community.
Fluent Actions for ASP.NET Core MVC (nuget)
I'm currently trying to fix full support for async/await by implementing an IAsyncStateMachine, if anyone got experience with that I would love me some feedback.
I posted this a while back and got some good feedback; primarily asking for a NuGet package. It is now available on NuGet here.
I'd really appreciate if you'd install it and try it out! I'd also appreciate any code feedback.
.NET and ASP Core are supposed to be using Microsoft.Extensions.Configuration - but it currently doesn't even support writing to config files so... ¯\_(ツ)_/¯
If anyone wants to build their own app, here is a C# wrapper I built. It's available on NuGet as well, and it is easy to use :)
https://github.com/glitch100/Halo-API https://www.nuget.org/packages/HaloEzAPI/
> It's brilliant and great of them, not a bad thing.
(disclaimer : this whole post is probably biased due to Linux being both my main operating system and livelihood)
It would be if 10 was all-around an objective improvement upon 7, which it isn't, due to:
Those crippling issues are really a shame, because outside of that Windows 10 was poised to be a good release. (with, at last, virtual desktops hitting Windows, and all the work on modern package management)
I will have a hard time in June choosing between the following:
My pleasure.
You could also try out this Nuget package: https://www.nuget.org/packages/FluentConversions/
I am biased since I wrote it. But it is a convenient tool for converting things easily.
Awesome! That seems very useful for kind of developers like me!
By the way, do you have any plans to make it to the NuGet package like below?
- https://www.nuget.org/packages/Toolbelt.AspNetCore.Blazor.Minimum.Templates/
I have used this library before for authentication in an ASP.NET Core hosted Blazor WASM project. It worked really well. It's as easy as:
public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(options => { /* Authentication options */ }) .AddSteam() .AddOpenId("StackExchange", "StackExchange", options => { options.Authority = new Uri("https://openid.stackexchange.com/"); options.CallbackPath = "/signin-stackexchange"; }); }
public void Configure(IApplicationBuilder app) { app.UseAuthentication(); }
Hey, I decided to clean up the code and wrap it up in a Nuget package library, if you ever need to use it again. The response creation is vastly simplified.
Nothing to add, but have you considered some existing libraries like RBush for this. I'm using it for 2D hit-testing \ visible-detection with > 10.000.000 entries and it is really quick (< 10 ms if I remember correctly).
Maybe try this or other spatial indexes.
Hi u/catInOrbit001
I maintain the .NET client so I can help. This relates to an issue that was fixed in v7.13.1. The bug unfortunately crept into the 7.13.0 release you are using. You should find it resolves if you grab the latest patch release from NuGet.
If the issue persists after upgrading, please do open an issue on the GitHub repository and I'll take a look at it.
Don’t parse CSV files by doing string.Split. CSV files have edge cases that I bet your code doesn’t handle.
https://secretgeek.net/csv_trouble
Use a library like CsvHelper or similar to parse your file.
FYI
New Azure SDK libraries (those with namespaces starting with "Azure.") use System.Text.Json by default, and allow users to opt into custom serializers, like Newtonsoft. See https://www.nuget.org/packages/Azure.Messaging.ServiceBus.
I work on the .NET Core team and in 5.0 we actually shipped a package (library is called System.DirectoryServices.Protocols) which used to be Windows-only but on 5.0 we added a Linux implementation. The windows implementation does depend on a win32 library, but for Linux we now use libldap which is present on most distributions by default. If you want to try it out, here is a link to the NuGet package: https://www.nuget.org/packages/System.DirectoryServices.Protocols/5.0.0 and we welcome all feedback you have on it in our github repo: https://github.com/dotnet/runtime/issues/new?assignees=&labels=area-System.DirectoryServices&template=01_bug_report.md&title=
DocumentFormat.OpenXml is a library to create and modify Word documents by Microsoft. There are some tutorials for it, i.e. this.
You need System.Data.OleDb. It provides OLE database functionality for .Net Core, which didn't exist prior to September 2019.
Alternatively, I think you can use System.Data.Odbc also.
LiteDB is the greatest thing since sliced bread. I'm not sure about its performance when the DB file is big, though - all I know is that as big as several Gb, it doing well.
But anyway, if you're planning to have hundreds of Gb of data, then you better use a separate DB engine (like postgres, as there's the LINQ implementation for it).
Yeah, Proto files is definitely were you put your contracts. You can use grpc's tools to convert the proto contract into service and client codes in a number of different languages. https://www.nuget.org/packages/Grpc.Tools/
There's an Svg.Core nuget package that seems to be the vvvv/SVG library ported to .NET Core.
The nuget package still links to the vvvv/SVG github repository, but it seems like it's probably mccg/Svg.Core based on the nuget author name.
The new template is based on the Microsoft.Extensions.Hosting package. The blog post more or less is announcing the addition of the Windows Service lifetime for hosting package.