Found 24 packages
It is well known that DateTime.Now is often used inappropriately. For example, it may be used together with TimeSpan to produce a task's timeout point or subtracted from another DateTime to calculate a duration. This can cause subtle bugs because DateTime is not monotonic: the system clock can change, making the result of the subtraction inaccurate -- potentially causing a premature timeout or an infinite loop. Yet, DateTime is an incredibly convenient and widely used value type in .NET code and is especially useful when printed in ISO-8601 format (with the "O" format specifier). With the "O" specifier, you can resolution down to tenths of a microsecond, which is nice. Until you learn that the resolution of the system clock is usually more coarse than several *milliseconds*, making the additional decimal places misleading garbage values. For calculating durations (time between events), it is better to use a high-resolution and monotonic clock like that provided by System.Diagnostics.Stopwatch: on most computers it is far more **accurate** than DateTime.Now even though, seemingly paradoxically, on a few systems, its *resolution* is lower than that of DateTime. Also, unsurprisingly, Stopwatch does not provide values that correlate to times of day: while it is appropriate for calculating durations, it is inappropriate for timestamping against a readable date and time. This library provides timestamps (both as DateTime and as analogous value types it defines) that use the Stopwatch (and your system's high peformance event counter) as its clock, but returns values as DateTimes or an analog thereto so that these values can be used for a mixed purpose of timestamping and providing a meaningful way to calculate time elapsed between events or to calculate how long to perform a programmatic task.
Introduces IAsyncEnumerable, IAsyncEnumerator, ForEachAsync(), and ParallelForEachAsync() GitHub: https://github.com/Dasync/AsyncEnumerable PROBLEM SPACE Helps to (a) create an element provider, where producing an element can take a lot of time due to dependency on other asynchronous events (e.g. wait handles, network streams), and (b) a consumer that processes those element as soon as they are ready without blocking the thread (the processing is scheduled on a worker thread instead). EXAMPLE using Dasync.Collections; static IAsyncEnumerable<int> ProduceAsyncNumbers(int start, int end) { return new AsyncEnumerable<int>(async yield => { // Just to show that ReturnAsync can be used multiple times await yield.ReturnAsync(start); for (int number = start + 1; number <= end; number++) await yield.ReturnAsync(number); // You can break the enumeration loop with the following call: yield.Break(); // This won't be executed due to the loop break above await yield.ReturnAsync(12345); }); } // Just to compare with synchronous version of enumerator static IEnumerable<int> ProduceNumbers(int start, int end) { yield return start; for (int number = start + 1; number <= end; number++) yield return number; yield break; yield return 12345; } static async Task ConsumeNumbersAsync() { var asyncEnumerableCollection = ProduceAsyncNumbers(start: 1, end: 10); await asyncEnumerableCollection.ForEachAsync(async number => { await Console.Out.WriteLineAsync($"{number}"); }); } // Just to compare with synchronous version of enumeration static void ConsumeNumbers() { var enumerableCollection = ProduceNumbers(start: 1, end: 10); foreach (var number in enumerableCollection) { Console.Out.WriteLine($"{number}"); } }
A timing tool that loops an action at the given rate, able to make up lost time
The WinSCP .NET assembly is a .NET wrapper around WinSCP’s scripting interface that allows your code to connect to a remote machine and manipulate remote files over SFTP, FTP, WebDAV, S3 and SCP sessions. The library is primarily intended for advanced automation tasks on Microsoft Windows that require conditional processing, loops or other control structures for which the basic scripting interface is too limited. The library is not a general purpose file transfer library. It particularly has a limited support for an interactive processing, and as such it is not well suited for use in GUI applications. For the same reason it is also difficult to use the assembly within a restricted environment like a web server, that limits or even restricts execution of external processes. For documentation and examples of use, see project website. The NuGet package includes the assembly itself and a required WinSCP executable. When installed, it adds the assembly as reference to your project and sets up WinSCP executable to be copied to project output directory, so that it can be found on run-time.
CalculateETA is a project to calculate estimated time to arrive on loops whether it is in single-thread or multi-thread applicatons.
The C++ Mathematical Expression Toolkit Library (ExprTk) is a simple to use, easy to integrate and extremely efficient run-time mathematical expression parsing and evaluation engine. The parsing engine supports numerous forms of functional and logic processing semantics and is easily extendible. https://www.partow.net/programming/exprtk/index.html
Bumps assembly versions, project properties, assembly attributes, according to consumer specified strategies.
FluentSharp is an API that dramatically simplifies the use of .NET Framework APIs. It makes extensive use of .NET ExtensionMethods and it reduces the amount of code required. This is the FluentSharp REPL which provides a C# REPL enviroment (REPL is Read Eval Print Loop) which allows for real-time execution of complex C# code (and GUI manipulation)
View videos in Xamarin Forms with the VideoView control. Supports Android, iOS, and UWP. The VideoView control uses native controls on each platform. VideoView for Android, AVPlayerViewController for iOS, and MediaElement for UWP. The VideoView control in its simplest form can be used with the built-in controller. The VideoView control can also be bound to your own controls. The VideoView.Source property is of type ImageSource. This means you can set the VideoView.Source in the same way you would set the Image.Source property, including being able to use ImageSource.FromResource(). **************** XAML Usage: ---------------- xmlns:roxv="clr-namespace:Rox;assembly=Rox.Xamarin.Video.Portable" <roxv:VideoView AutoPlay="True" LoopPlay="True" ShowController="True" Source="http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4" /> **************** Sample Application is available at: ---------------- https://github.com/Rod-at-Rox/RoxXamarinVideo **************** In your iOS project "AppDelegate" code file, you must call "Rox.VideoIos.Init()" before "Xamarin.Forms.Forms.Init()". It should look something like: ---------------- Rox.VideoIos.Init(); global::Xamarin.Forms.Forms.Init(); LoadApplication(new MyVideoApplication()); **************** The VideoView has the following methods: - Task Start(); (Start and Resume playing the video) - Task Pause(); (Pause and Resume playing the video) - Task Stop(); (Stop playing the video) ---------------- The VideoView has the following bindable properties: - bool AutoPlay { get; set; } (Automatically starts playing the video, when video has finished loading) - TimeSpan Duration { get; } (The duration of the video, available after video has loaded) - bool FullScreen { get; set; } (View the video in full screen mode) - bool LoopPlay { get; set; } (Start playing the video again from the start, once it has finished) - bool Muted { get; set; } (Mutes the volume) - TimeSpan Position { get; set; } (The current position of the video during playback, available after video has loaded) - TimeSpan PositionInterval { get; set; } (The interval at which to update the current position of the video during playback, PositionInterval of TimeSpan.Zero will disable timer) - bool ShowController { get; set; } (Determines if the built-in controller is visible) - ImageSource Source { get; set; } (The source of the video to load, See Xamarin article "Working with Images") - VideoStateType VideoState { get; } (The current state of the VideoView: Empty, Error, Buffering, Playing, Paused, Stopped) - double Volume { get; set; } (The sound level of the audio, from 0 to 1) - ICommand PropertyChangedCommand { get; set; } (Executes a command when any of the VideoView properties change) ****************
CSharpRAPL is a framework for benchmarking C# in regards to energy. In the Benchmarks folder, all the benchmarks created for this project can be found. CSharpRAPL contains the library code we have implemented to use for benchmarking. This code is a continuation and extension of lrecht/ParadigmComparison, which is an earlier university project. By default, the CSharpRAPL tries to make each loop iteration take 2 seconds called Dynamic Loop Iteration Scaling. CSharpRAPL also has Dynamic Iteration Calculation which scales the number of loop iterations according to the deviation of the results. The results generated is a CSV file that contains the DRAM Energy, Temperature, Elapsed Time, Package Energy, and the return value of the Benchmark.
A C# SDK for Facebook Marketing API. The Facebook SDK for .NET helps developers build applications interacting with Facebook Marketing API. This project aims to help developers working with Facebook marketing API. Facebook supports REST API endpoints to interact with core object models. This SDK will help you in doing various API calls & converting API response into structured response. For Facebook entity classes you can refer to Facebook.MarketingApi.Entities project. This project was originally created by Ketan Jawahire and can be found at https://github.com/ketanjawahire/Facebook.ApiClient. The project has not seen activity in quite some time and so it was forked and the most recent updates to .NET and the Facebook Marketing API will be applied here.
A simple 2D physics package for SFML. It only supports circular and AABB bounds. It makes no attempt to detect or handle inter-frame collision misses. It is however perfectly suitable for most classic 2D games. Version 2.3.3 fixes a bug in rotating sprites. It has not yet been tested for the other PhysicsShapes. Note that for this to work you must use sprite.setImage() NOT sprite.setTexture Version 2.2.1 contains a bug fix in the new world update code Version 2.2.0 has been released. There are 2 API changes (1) PhysicsShapeList<T> now rerturns a T* from its iterator (2) UpdatePhysics now takes an optional second parameter of a fixed MS per upate. It will loop and make multiple updates as necessary for the frame deltaMS. This allows the programmer to tradeoff compute time for better acuray. A value of 0 sets the update period to the current frame deltaMS, which is to say it mimics the old behavior of one update per call. Basic documentation is at https://github.com/profK/SFPhysics.
A time-looping variable container for quantum misfits and deterministic dreamers.
* Allows you to Subscribe to a queue instead of polling it in a busy loop. That is, you provide a delegate function in “Subscribe” method and this callback will be invoked every time a new message is added to the queue. This library will also handle serialization and deserialization for your objects that you put in the queue. * Also, optionally, would automatically delete messages from the queue once they processed successfully, which is not done by the AWS SDK library. * It creates a new queue either in Send or in Subscribe if the queue with the given name doesn’t exist yet under your account on AWS. Small and Simple. Requires AWSSDK.SQS, Newtonsof.Json and log4net.
Introduces IAsyncEnumerable, IAsyncEnumerator, ForEachAsync(), and ParallelForEachAsync() GitHub: https://github.com/Dasync/AsyncEnumerable PROBLEM SPACE Helps to (a) create an element provider, where producing an element can take a lot of time due to dependency on other asynchronous events (e.g. wait handles, network streams), and (b) a consumer that processes those element as soon as they are ready without blocking the thread (the processing is scheduled on a worker thread instead). EXAMPLE using Dasync.Collections; static IAsyncEnumerable<int> ProduceAsyncNumbers(int start, int end) { return new AsyncEnumerable<int>(async yield => { // Just to show that ReturnAsync can be used multiple times await yield.ReturnAsync(start); for (int number = start + 1; number <= end; number++) await yield.ReturnAsync(number); // You can break the enumeration loop with the following call: yield.Break(); // This won't be executed due to the loop break above await yield.ReturnAsync(12345); }); } // Just to compare with synchronous version of enumerator static IEnumerable<int> ProduceNumbers(int start, int end) { yield return start; for (int number = start + 1; number <= end; number++) yield return number; yield break; yield return 12345; } static async Task ConsumeNumbersAsync() { var asyncEnumerableCollection = ProduceAsyncNumbers(start: 1, end: 10); await asyncEnumerableCollection.ForEachAsync(async number => { await Console.Out.WriteLineAsync($"{number}"); }); } // Just to compare with synchronous version of enumeration static void ConsumeNumbers() { var enumerableCollection = ProduceNumbers(start: 1, end: 10); foreach (var number in enumerableCollection) { Console.Out.WriteLine($"{number}"); } }
Light object model shim that abstracts Selenium WebDriver operations and simplifies running test automation with multiple browsers. SeleniumShim uses implicit retry until timeout loops within calls to FindElement and user actions on IWebElement objects which solves race conditions and problems with 'stale' references to WebElement. The implicit retry until timeout gives the browser engine threads time to de-serialize and render HTML and Java Script.
Advanced progress indicator supporting sub-task measurement and estimated end time calculation for long-running loops.
Library with extensions to SFML.Net types + some useful for gamedev classes. Features: * Vector extensions: conversion, dot, projection, comparision, rotation, angle, length, direction(normalization), bounding rectangle * Rect extensions: Bottom, Right, Position, Center, AABB from vectors, depth of intersection * Spatial partitioning: quad tree, grid, hash * Game class with basic game loop * TileMap renderer * SpriteBatch * Texture.Update with Color[] * Misc: measure execution time of method, assert(throws exception), conditional break * Fast sin and cos * Content manager
Aardwolf is an asynchronous HTTP API service provider for C# that does not depend on ASP.NET nor IIS. Aardwolf is based on the HttpListener API provided as part of the .NET framework and the Windows implementation makes use of the low-level HTTP.SYS driver to handle and queue HTTP requests in the kernel and forward those to user-mode applications. IIS versions 6 and up make use of this same HTTP.SYS driver so it is a trusted and well-tested component that can be relied upon for production scenarios. The Aardwolf framework builds an asynchronous request event loop to handle HTTP requests, taking full advantage of the asynchronous features of the .NET 4.5 framework. A very simple and efficient C# library is exposed to the developer who wants to write fast, asynchronous web services or web sites. At this time, the framework is solid and runs very efficiently. However, it is incomplete with regard to features. It is not official package created by Alexey Suvorov for your convenience.