42 Questions

beginer
beginer
262 Points
76 Posts
I'm trying to connect an api which returning gzip compressed data in response. Due to this HTTP client throwing error: Doing something: public async Task<string> GetResponseString(string text) { var httpClient = new HttpClient(); var parameters = new Dictiona ...
Views: 215
Total Answered: 2
Total Marked As Answer: 2
Posted On: 08-Nov-2021 03:32 
 
mongo
mongo
6 Points
3 Posts
I have written group aggregate pile line. It was working fine. But now getting error as: Command aggregate failed: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in..MongoDB.Driver.Core! I'm trying something: var group = new BsonDocument ...
Views: 893
Total Answered: 2
Total Marked As Answer: 1
Posted On: 12-Oct-2021 02:43 
 
Rashmi
Rashmi
Member
170 Points
35 Posts
I'm trying following c# code to parse date with string format "yyMMdd". var provider = CultureInfo.InvariantCulture; DateTime.TryParseExact("320918", "yyMMdd", provider, DateTimeStyles.None,out var dt) It's working fine if we are putting year 29 or less as "290918". And it's parsing as "18th Se ...
Views: 334
Total Answered: 1
Total Marked As Answer: 1
Posted On: 17-Sep-2021 20:01 
 
Smith
Smith
Teacher
672 Points
146 Posts
I'm trying to generate GS1 data matrix code using https://zxing.net . I'm facing issue to generate separator and starting code.  I'm referring to doc: https://www.gs1.org/docs/barcodes/GS1_DataMatrix_Guideline.pdf var writer = new ZXing.BarcodeWriterPixelData { ...
Views: 325
Total Answered: 1
Total Marked As Answer: 1
Posted On: 21-Jul-2021 02:32 
 
beginer
beginer
262 Points
76 Posts
How to get Hours and Minutes as two digits with leading zero from DateTime object? I'm trying following code formulate the file path: var filePath = $"{DateTime.UtcNow.Year}/{DateTime.UtcNow.Month}/{DateTime.UtcNow.Day}/{DateTime.UtcNow.Hour}/{DateTime.UtcNow.Minute}/{Guid.NewGuid()}"; But it' ...
Views: 351
Total Answered: 1
Total Marked As Answer: 1
Posted On: 07-Apr-2021 06:00 
 
beginer
beginer
262 Points
76 Posts
I'm trying following code to scaling image: public static Image ScaleImage(Image image, int maxWidth, int maxHeight) { var ratioX = (double)maxWidth / image.Width; var ratioY = (double)maxHeight / image.Height; var ratio = Math.Min(ratioX, ratioY); var newWidth = (int)(image.Width * rat ...
Views: 281
Total Answered: 1
Total Marked As Answer: 1
Posted On: 16-Mar-2021 08:13 
 
beginer
beginer
262 Points
76 Posts
I have .net core api application when running on IIS or Kestrel Server getting correct locale and culture. But when running on Linux container it's coming blank causing DateTime.Now.ToString("t") showing incorrect format. Using docker command as: FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 ...
Views: 527
Total Answered: 1
Total Marked As Answer: 1
Posted On: 08-Feb-2021 06:09 
 
beginer
beginer
262 Points
76 Posts
I'm trying to build docker image and even any docker command, getting following error: error during connect: This error may indicate that the docker daemon is not running. : Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json : open //./pipe/docker_engine: The system cannot find the ...
Views: 9139
Total Answered: 3
Total Marked As Answer: 2
Posted On: 01-Feb-2021 02:18 
 
Smith
Smith
Teacher
672 Points
146 Posts
I'm using docker-desktop to build containerized image. Build getting failed at restore command in docker file. It's not able to download any package. It's happening in local build.
Views: 330
Total Answered: 1
Total Marked As Answer: 0
Posted On: 28-Jan-2021 06:18 
 
edx
edx
136 Points
38 Posts
I'm using WebRequest to consume/integrate REST api in .netcore project something like: WebRequest request = WebRequest.Create(url); request.Method = "POST"; request.Credentials = MyCredentialCache; try { WebResponse response = await request.GetResponseAsync(); } catch { } It's w ...
Views: 571
Total Answered: 1
Total Marked As Answer: 1
Posted On: 26-Oct-2020 00:36 
 
 Log In to Chat