Posts by Jedaias Rodrigues • 6,718 points
226 posts
-
-1
votes1
answer32
viewsA: Componentization of fabrics
An alternative is to use sections. In the example quoted, we would have 4 separate files: Index.cshtml <form ng-controller="serviceController"> <h1>{{message}}</h1> <div…
-
-1
votes1
answer32
viewsQ: Componentization of fabrics
I have a web project in .NET Framework 4.6.1 and with Angularjs 1.2.29. Currently it perfectly serves our customers in Brazil. The point is that the product has evolved, and now we are going to…
-
0
votes0
answers13
viewsQ: Perform task after debug
I’m using Visual Studio Professional 2019, and I’m applying Transform in the Web.config, similar to that answer: https://stackoverflow.com/a/3994081/4720858 I understood well that it is possible to…
-
5
votes2
answers345
viewsQ: How does the rounding of the string format work?
Consider the following code snippet: decimal myValue = 3.045M; Console.WriteLine("Result by Math.Round = " + Math.Round(myValue, 2)); Console.WriteLine("Result by string.Format = " +…
-
1
votes2
answers45
viewsQ: Plan properties in a single table
Consider the following classes: public class Pessoa { public int Id { get; set; } public string Nome { get; set; } public Telefone Telefone { get; set; } } public class Telefone { public string…
-
1
votes1
answer1191
viewsA: Generate more than one boleto with the DLL "Boleto.Net"
Well, unfortunately I didn’t find a solution in the library itself Boleto.Net, but I had to implement exactly the same requirement of three billets on a single sheet, and because I still had to…
-
0
votes0
answers82
viewsQ: Validation with Modelstate
I have a web application in . NET Framework 4.6.1 with a method similar to the one shown below: public class MeuControladorController : ApiController { public IHttpActionResult…
-
3
votes1
answer66
viewsQ: Httpclient reuse and an Apicontroller lifecycle
Based on that website and also in some answers from Stackoverflow [en] I came to the conclusion that I shouldn’t use the class HttpClient in a block using despite the same implement IDisposable.…
-
1
votes1
answer915
viewsQ: How to request via c#? Webrequest vs Httpclient
I have a project in . Net Framework 4.6.1, and in my research I concluded that I can use the class Webrequest to request other web services via backend. I wish I could make requests using any http…
-
4
votes2
answers4619
viewsA: How do I know if a server is using TLS 1.0 or 1.1?
The TLS protocol is the successor to SSL some time ago, but the term SSL is often used for both by the popularity of the same. It is really very important to always keep your server updated with the…
-
3
votes0
answers190
viewsQ: What is the difference between the terms X.509 and PKCS#7 in digital certificates?
Via a Webapi . Net 4.6.1 I am integrating with a service that requires data to be sent on a connection TLS 1.2 duly digitally signed using the standard PKCS#7, but when checking an example of…
-
1
votes0
answers24
viewsQ: Element without properties
See the following code snippet below: var element = document.getElementById('myDiv'); console.log('element: ', element); console.log('has tagName property: ', element.hasOwnProperty('tagName'));…
-
1
votes0
answers70
viewsQ: Elastic transactions with MS SQL Server
Considering the following code snippet: using (var scope = new TransactionScope()) { using (var conn1 = new SqlConnection(connStrDb1)) { conn1.Open(); SqlCommand cmd1 = conn1.CreateCommand();…
-
0
votes1
answer75
viewsA: Customize output path of converted files by Gulp markdown it
Enough in function gulp.dest return the desired folder. It is still possible to specify some folder to ignore: gulp.task('markdown', function() { return gulp.src(['**/*.md', '!node_modules/**'])…
-
1
votes1
answer75
viewsQ: Customize output path of converted files by Gulp markdown it
I was keeping up this step by step, and then came the need for the markdown files converted to html to be in another folder. View the file code gulpfile.js: var gulp = require('gulp'); var markdown…
-
1
votes0
answers103
viewsQ: Get DPI definition of image extracted from PDF
I’m using the itextSharp to extract images from PDF files. I used this code as a basis: https://psycodedeveloper.wordpress.com/2013/01/10/how-to-extract-images-from-pdf-files-using-c-and-itextsharp/…
-
4
votes5
answers212
viewsQ: Get array object by description in index
It is possible to use the property of an object as an index of a array, as described in the example below? using System; public class Program { public static void Main() { var myObjectArray = new…
-
5
votes2
answers260
viewsQ: How to save changeable parameters in the system?
I have an ASP.NET MVC project and I use web.config to save some parameters that will be used by the system, but should not be changed by any user. Now I have to implement some other parameters that…
-
1
votes0
answers31
viewsQ: Request status after browser close
I have an Asp.Net MVC project and I realized that when I close the browser immediately after the beginning of a request (without waiting for its due ending), it makes somehow the server does not…
-
1
votes1
answer73
viewsQ: Use of Eval to transform Razor to Javascript
Before criticizing the use of eval, I read and recommend that answer. Take into account the following context: Code C# (Razor): var teste = new { prop1 = 123, prop2 = "minha mãe disse 'Háaaaaa!'" };…
-
11
votes3
answers663
viewsQ: Class generic property
I have a class with two properties (Name and Value). The estate Name is a string, already the property Value I want to leave the variable type. public class Field<TValue> { public string Name…
-
3
votes1
answer710
viewsQ: Transforming synchronous into asynchronous method
I have the following method: public string MyMethod1(string myParam1) { // Implementação return myReturnValue; } I needed to create an asynchronous method that did the same thing, to process several…
-
2
votes1
answer777
viewsA: Operation of Request.Files;
According to this Microsoft documentation the files nay are saved directly to the server memory (depending on some criteria). Files are uploaded in MIME Multipart/form-data format. By default, all…
-
2
votes1
answer777
viewsQ: Operation of Request.Files;
I have an Asp . Net MVC project, with a form on View which sends files to the Controller. In control I recover the files as follows: var myFiles = Request.Files; Not saving the file, just reading…
-
6
votes3
answers230
viewsQ: Bi-directional asynchronous communication in layers
I have system in Asp.Net MVC (.Net 4.5) divided in layers: That said, let’s get to the problem... I’m trying to create a screen to send emails asynchronously (3 emails at the same time, for…
-
3
votes1
answer656
viewsQ: How to structure multiple projects in Git
At the company where I work, we use Visual Studio 2013 and TFVC for versioning the projects. I’m used to the Source Control Explorer, be able to give Get Latest Version at any level (the entire…
-
2
votes2
answers997
viewsQ: console.debug is not working in Chrome
I’m using the version 58.0.3029.110 (64-bit) browser (the last one available here when creating this question), and when trying to execute the following code: console.debug("Teste", 1); The result…
-
2
votes1
answer146
viewsQ: Reflection with list property
How to change the value of the class property in the list? My variable classPropValueList always comes void. I’m trying to make a Reflection of every class it inherits from Coisable, to change its…
-
1
votes0
answers179
viewsQ: Where to store private key generated in Webservice?
I have the following scenario: (and unfortunately I can’t change anything in the infrastructure, but I can change anything in relation to the code of the Application and the Webservice) An intranet…
-
1
votes1
answer106
viewsQ: How to align list items
I have the following code: ul { list-style: none; list-style-position: outside; padding-left: 0; } li { margin-bottom: 20px; } li:before { content: "\2192"; padding-right: 10px; } p { display:…
cssasked Jedaias Rodrigues 6,718 -
1
votes1
answer38
viewsQ: Remove type when value is 0
I have the Web Essentials installed in my Visual Studio, and he made me the following recommendation: Logo, I removed the drive type. The style worked perfectly on Chrome, but while testing on…
cssasked Jedaias Rodrigues 6,718 -
5
votes2
answers406
viewsQ: Tolist vs Typed Tolist
I was reviewing some methods of an ASP.NET MVC project and found some cases where it is used only .ToList() and others in which it is used .ToList<type>() (where type is an object type used in…
-
1
votes1
answer913
viewsQ: INSERT in two tables based on SELECT
Imagine the following scenario: At a certain point it is necessary to duplicate people and their respective items. If I have the following data: Table Person +----+------------+ | Id | Nome |…
-
0
votes1
answer1002
viewsQ: Import decimal with comma
On SQL Server, I’m trying to run a SELECT in a *.csv file as follows: SELECT * FROM OPENROWSET(BULK 'C:\Minha_Pasta\meu_arquivo.csv', FORMATFILE = 'C:\Minha_Pasta\format.xml') AS Contents…
-
0
votes3
answers2648
viewsA: Automatic calculation in text box
Based on Sergio’s response, created a simpler example without using eval(). var input = document.getElementById('calculator'); var result = document.getElementById('result');…
-
4
votes3
answers65
viewsQ: Global function for plugin
I’m creating a plugin simple with jQuery and Bootstrap, and in my Javascript I have the following excerpt: $.fn.myPlugin = function(options) { var element = this; var settings = $.extend({ param1:…
-
3
votes1
answer151
viewsQ: MVC Helper with List Energy
I am creating a Helper in my Asp.Net MVC 5 project, and would like to receive as a parameter a generic list, but the following code snippet does not work: @helper MeuHelper(string param1, int…
-
0
votes3
answers857
viewsA: Invalid Pointer
The problem was being caused by some extension, I did the removal and reinstallation of some of them, in addition to the reinstallation of Visual Studio, and everything started to work normally.…
visual-studioanswered Jedaias Rodrigues 6,718 -
0
votes1
answer53
viewsQ: Web Essentials does not display options
I installed the Web Essentials 2015 in the Visual Studio Community 2015, but while trying to minify some css files, the only options displayed were the ones in the image below. I have removed and…
-
0
votes2
answers611
viewsQ: Fix rows in table
I have the following table: .mytable { width: 100%; height: 150px; overflow-y: auto; } .header, .footer { //position: absolute; } <table border="1" class="mytable"> <tr class="header">…
-
7
votes2
answers961
viewsQ: Transactionscopeoption what is the difference between the options?
I was doing some research on the options for Transactionscope and found the following settings: Required A transaction is required for scope. If it already exists, it uses an environment…
-
3
votes3
answers3825
viewsQ: Limit for sending files
I have a project in Asp Net MVC . NET Framework 4 as follows: View: <div class="file-content"> <label class="custom-file-upload"> <input type="file" id="importar-arquivos" multiple…
-
3
votes1
answer399
viewsQ: Alternative to the Transactionscope
I’m using Entity Framework (version 4.4) in a project Aspnet MVC with .NET Framework a little old (version 4.0) and SQL Server. I do not have access to the server where the application is hosted,…
-
3
votes1
answer1791
viewsA: Why do I have to use Formdata to send files via Ajax?
I ended up researching more and found the reason. There is an attribute in the form called enctype, it is defined as the form data must be encoded when sending it to the server. By default…
-
2
votes1
answer1791
viewsQ: Why do I have to use Formdata to send files via Ajax?
I created an HTML page with a form, and in it a imput file and another field hidden, all of them with the attribute name. <form id="meuForm" action="..." method="POST"> <input type="hidden"…
-
2
votes0
answers679
viewsQ: Visual Studio Code does not work on Ubuntu 16.04
I’m trying to use Visual Studio Code on Ubuntu 16.04 x64, but I was not successful. I tried to install via . deb package and the whole procedure apparently went well. But when trying to open the…
-
0
votes2
answers678
viewsQ: Is it possible to definitely change the style of a CSS class using Javascript?
I have the following code snippet: $("#mudarcss").click(function(){ $(".teste").css("background-color", "blue"); }); $("#adicionardiv").click(function(){ $("#conteudo").append("<div…
-
3
votes3
answers823
viewsQ: Method that returns parent class to daughter class
I have the following classes: public class Pessoa { public int PessoaId { get; set; } public string Nome { get; set; } public DateTime DataNascimento { get; set; } } public class Cliente : Pessoa {…
-
0
votes2
answers252
viewsA: Read files twice
Really, from what I understand in the polls, both BinaryReader as to the StreamReader when they leave the context of using, automatically make an "auto" Dispose() and also of all who are IDisposable…
c#answered Jedaias Rodrigues 6,718 -
3
votes2
answers252
viewsQ: Read files twice
I have a project Asp.Net MVC in .Net Framework 4.0, with Entity Framework 5.0. I get multiple files in one method POST and I need to turn them into byte[] to save to Database (VARBINARY(MAX) - SQL…
c#asked Jedaias Rodrigues 6,718