.net

Xamarin Media Plugin Auto start or Timer

此生再无相见时 提交于 2021-02-11 15:30:03
问题 In my iOS Xamarin forms project I'm using Xam.Plugin.Media from https://github.com/jamesmontemagno/MediaPlugin as follows async void Handle_Clicked(object sender, System.EventArgs e) { await CrossMedia.Current.Initialize(); var file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions { DefaultCamera = CameraDevice.Front, SaveToAlbum = true, }); } Is it possible to automatically start video recording or set a timer for the recording to start? Ultimately, I

Why is my TPL Dataflow Pipeline slower in reading huge CSV files compared to just looping?

半世苍凉 提交于 2021-02-11 15:02:32
问题 So my requirement is to read multiple CSV files (each having a minimum of a million rows) and then parse each line. Currently, the way I have broken up my pipeline, I am first creating a separate pipeline to just read a CSV file into a string[] and then I plan to create the parsing pipeline later. But seeing the results of my File Reading Pipeline, I am dumbfounded because it is considerably slower than just looping through the CSV file and then looping through the rows. static public

Best option to access network share in docker windows container with Docker Compose

不问归期 提交于 2021-02-11 15:02:28
问题 I am new to docker, so please bear with my naive questions. We are trying to host a dot net application in a Windows container. We were successful in hosting the application in the container. However, the application is accessing the network share like \\machinename\abc. We tried to create a volume of type "NFS" but looks like that does not work well in Windows container(How to directly mount NFS share/volume in container using docker compose v3). volumes: example: driver: local driver_opts:

MSCHART with a transparent background

久未见 提交于 2021-02-11 15:01:18
问题 Any whay to make the background transparent of the MSCHART? thank's 回答1: You need to set the Chart background colour AND the ChartArea colour. Chart c = new Chart(); c.BackColor = Color.Transparent; c.ChartAreas.Add(new ChartArea("ChartArea1")); c.ChartAreas[0].BackColor = Color.Transparent; 回答2: maybe this help you in your .aspx file where your chart code is, look for the asp:ChartArea tag. then add BackColor = "Transparent". <asp:ChartArea Name="ChartArea1" BackColor="Transparent" </asp

How to apply a .msstyles to a .NET app?

ε祈祈猫儿з 提交于 2021-02-11 15:01:11
问题 I code GUIs in .NET frequently, and most of them only have the value of being a GUI, e.g. they don't do anything otherwise impossible. So most of the development goes to making them friendly, intuitive and eye-candy. Then it comes to my mind it would be simply amazing to skin them through .msstyles files, since there are so many places to find those files, and also tools to make your own. And some of those msstyles are just stunning, probably not for your whole desktop, but for styling

Implementing type converter for specific type dropdown items

蹲街弑〆低调 提交于 2021-02-11 14:56:33
问题 The usercontrol that will use the type converter Public Class MYControl : Usercotrol { private ListItem _Language; [TypeConverter(typeof(LanguageEditor))] public ListItem Language { get { return _Language; } set { _Language= value; } } } The type to list in the dropdown property window public class ListItem { private string _Name; public string Name { get { return _Name; } set { _Name = value; } } private string _Value; public string Value { get { return _Value; } set { _Value = value; } }

Read an object variable having “FileInfo” object content in C# script task

廉价感情. 提交于 2021-02-11 14:53:41
问题 I'm trying to loop and read an object variable(as shown in the pic) where it has the file details(name/size/datemodified) from a share point location. Basically I need something similar to below code to just read the "Name" value. using System; using System.Data; using Microsoft.SqlServer.Dts.Runtime; using System.Windows.Forms; using System.Data.OleDb; using System.IO; using System.Collections; using System.Collections.Generic; public void Main() { var fileinfo = Dts.Variables["User::DvarObj

Function to convert from latitude and longitude to UTM X and UTM Y coordinate in SQL Server

最后都变了- 提交于 2021-02-11 14:46:55
问题 I need to create a function that converts longitude and latitude to UTM X and UTM Y coordinates in SQL Server. When the user provides longitude and latitude, the function should convert that information to UTM X and UTM Y coordinates. 回答1: I would recommend using CoordinateSharp which is available as a NuGet package: https://github.com/Tronald/CoordinateSharp It has support for UTM 回答2: I have developed a library in .NET to be called from transact sql Converts WGS84/UTM coordinates to

Why do dotnet keepalive Http connections fail on the second request with “A connection that was expected to be kept alive was closed by the server.”?

♀尐吖头ヾ 提交于 2021-02-11 14:41:29
问题 I have a dotnet framework application which performs POST api requests to a remote server running Apache. It intermittently fails with the error: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. This occurs on the second request to the server when done over a keepalive TLS connection, and so occurs more frequently in production systems under heavy load and less frequently or not at all in development environments. We have tried:

Using WeakEventManager, hiding the actual event

岁酱吖の 提交于 2021-02-11 14:27:54
问题 When using the WeakEventManager , it is apparent that the event is hooked up to the AddHandler using reflection (from nameof() in example). The AddHandler does NOT work if the event is private or protected. I'd prefer to not expose the event and force the consumers to use the Subscribe events. I could use a private class to hold the events. public static event EventHandler<IntensityChangedEventArgs> OnIntensityChanged; public static void Subscribe_OnIntensityChanged(EventHandler