Questions tagged as 'c#'

1
answer

Problem getting information from the Azure cognitive service (OCR)

I'm developing a windows service that downloads a web image, "flip" it horizontally and sends it to the Azure (OCR) cognitive service, the idea is to capture the texts of that image. However, when I send the image via request, the return is empt...
asked by 10.09.2018 / 19:50
1
answer

How to get all values of 'YamlDotNet' in 'File.yml'?

I'm working on an .yml file and I want to get all the values that contain this file. I am using the YamlDotNet.Serialization reference. What I want to do is take a certain value and display the properties of that particular value. But just...
asked by 04.09.2018 / 13:51
1
answer

How to ensure that all information has been recorded in the bank?

I've come to realize that I'm having trouble writing information to the bank because: -I am running a block of a method that writes data to the database: //codigo aqui MySQLCallDB.InsertData("PEDIDOS", columns, values); //gravando informaçõ...
asked by 08.08.2018 / 20:11
1
answer

Error when simulating distinc in query with Linq and lambda expression

I have 2 tables in a SqlServer database. One call to another and another. I'm trying to return all states of the tbState table that have at least one city (tbCity) and with the properties tbCity.bnlActivityCity and tbCity.blnExibirNoPortal = tru...
asked by 10.01.2018 / 18:34
1
answer

Visual Studio Error - Can not find name 'Record'

I'm working on an ASP.NET project with C # in Visual Studio 2015 and I came across error in the index.d.ts file. The error messages are Cannot find name 'Record' and Cannot find name 'undefined' . I saw that there would be so...
asked by 03.01.2018 / 17:49
1
answer

Verify if a COM port is connected or not

Is it possible via the line of code to check whether a COM port is connected or not? Analyze: I have a program POS (Point of Sale) where it has the integration with SiTef, through a PinPad (card machine) and for it to work, the PinPad m...
asked by 02.01.2018 / 19:19
1
answer

Decrypt MD5 [duplicate]

I need to change this code to decrypt the data encrypted with it: public static string MD5HashCrypt(string text) { MD5 md5 = new MD5CryptoServiceProvider(); //compute hash from the bytes of text md5.ComputeHash(ASCIIEncoding.ASC...
asked by 08.12.2017 / 23:14
1
answer

Using TLS 1.2 in the .NET Framework 2.0

I want to use TLS 1.2 on a Webclient call in the framework .NET 2.0 Is it possible? try { using (System.Net.WebClient client = new System.Net.WebClient()) { string u = client.UploadString(url, xml); return u;...
asked by 04.12.2017 / 18:51
1
answer

Replace with \ does not work

I'm trying to make a Replace() but it does not work. I need to change from \ to \ . "\r\n".Replace(@"\", "\"); It only returns me: "\r\n" and not "\r\n" .     
asked by 04.12.2017 / 19:59
1
answer

How to upload safely?

How to upload a file to an FTP server without the login information of this server being visible in the code? For example, I do not want to do the following: string FTPhost = "ftp://192.168.1.1/"; string FTPpass = "SenhaDoAcessoFTP"; string...
asked by 02.12.2017 / 22:21