Posts by Leonardo Bonetti • 5,313 points
231 posts
-
0
votes1
answer326
viewsA: ASP.Net Web API - JSON without accentuation %20 %C3%A7
You can use the method HttpUtility.UrlDecode to decode your content. string decodedUrl = HttpUtility.UrlDecode(url); //decodedUrl é o conteúdo que você precisa decodificar. This encoding is called…
-
1
votes1
answer446
viewsA: Changing color of a circle of a marker - Google Maps v3
You can change the color through the method setOptions class Circle where circle in the code is the name of its circle object. circle.setOptions({ fillColor: '#F5F5F5', strokeColor: '#528BE2' });…
-
9
votes2
answers228
viewsQ: Is Tuple the same as creating an object?
I’ve used the Tuple a few times and today came the doubt, that: public class User{ public String Name {get; set;} public String LastName {get; set;} } new User(){ Name = "Leonardo", LastName =…
-
5
votes4
answers283
viewsQ: Create list with more than one element as if it were multidimensional
I need to receive these pairs of data from the bank, and I’m thinking of a way to bring the values without creating an object, because I think it’s unnecessary in this case. It is possible to create…
-
0
votes3
answers5808
viewsA: Problem running Visual studio debugger
The problem was solved by changing the door of the http://localhost:54345/ to some other random, example http://localhost:54348/.
-
0
votes1
answer301
viewsQ: Is it possible to connect to a VPN via C#code?
My machine accesses the company’s VPN, and when I run the Console application on my machine, I need to be connected to it because the bank IP(10.0.0.7) is only accessible via VPN. The problem is,…
-
2
votes1
answer51
viewsQ: How to ensure that all information was recorded at the bank?
I’ve been realizing that I’m having trouble recording information in the bank because: -I’m running a block of a method that records data in the database: //codigo aqui…
-
2
votes3
answers80
viewsQ: How to deal specifically with a Keynotfoundexception?
I have a doubt, I tried to find some content on Google but I did not find. I have a block try catch as follows: try { //código string idFormaPgto =…
c#asked Leonardo Bonetti 5,313 -
5
votes3
answers4418
viewsQ: Error in a simple SELECT with Group By - SQL Server
I’m trying to do the following SELECT: SELECT P.Nome,P.TipoId,P.QuantidadeMensal FROM StockPhotos.Pacote P GROUP BY P.QuantidadeMensal; But I’m getting this error message: Message 8120, Level 16,…
-
1
votes2
answers820
viewsA: GET, POST or PUT, which one to use to issue a invoice?
You say: Which should I use when the intention is not to view, save or update the data? And then at the end of the question it says: as the request will end by updating the Nfe status from "Pending"…
-
1
votes2
answers348
viewsA: real money mask in php jquery array
You need to call again the method .maskMoney, you can create a method that calls this other method and within it configure all your masks, and whenever you add a new field, just call UpdateMasks…
-
1
votes1
answer776
viewsQ: How to simulate SSL on ASP.NET localhost?
How to simulate an SSL certificate on localhost, use Visual Studio 2017, running ASP.NET MVC5. I need this because I am running the API da Cielo which only accepts requests via SSL. Edit: If I…
c#asked Leonardo Bonetti 5,313 -
0
votes1
answer252
viewsQ: Map class to XML deserialization for C#
I need to map this XML to a C# class to deserialize via Restsharp Deserialization: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rsp stat="ok"> <items total="1232177"…
-
3
votes1
answer235
viewsA: Return previous page by adding parameter in URL - Javascript
Using the Document.referrer you have access to the previous page. But remember this command uses the browser information so if you have been redirected from Google. > your website it will return…
javascriptanswered Leonardo Bonetti 5,313 -
0
votes2
answers3129
viewsA: How to assemble a Restrequest with x-www-form-urlencoded in Restsharp C#
Another way that I discovered out of the @LINQ response is to add the url in the parameter application/x-www-form-urlencoded writing it manually : var request = new RestRequest(Method.POST);…
-
2
votes2
answers3129
viewsQ: How to assemble a Restrequest with x-www-form-urlencoded in Restsharp C#
I know how to requisition using Restsharp when the content-type = application/json, now I need to make a request application/x-www-form-urlencoded but I can’t find the right way to do it, follow the…
-
0
votes1
answer1167
viewsQ: Unable to load type'<Projectname>. Mvcapplication 'when duplicating project
I duplicated my project in Visual Studio as follows: 1° I entered the filesystem and gave CTRL C + V in the briefcase SiteTeste which is the project folder. 2° I renamed the folder to Siteteste2 and…
-
1
votes2
answers1263
viewsA: Sponse() in XML with Laravel
There is nothing related to XML in specific, but found that document which speaks of file download. But for this you need to download it on the machine before sending it. return…
-
1
votes2
answers362
viewsA: Problem with bootstrap responsiveness
You need to understand the main idea of grids: Let’s go with the acronyms: -sm: Small(Small) - devices with a screen size greater than 576 pixels -md: Medium(Medium) - devices with a screen size…
-
0
votes2
answers596
viewsA: Color RGB in Visual Studio 2017?
In the archive Form1.cs(name of your form) within public Form1()(name of your form) enter the following code: this.BackColor = Color.FromArgb(255, 232, 232); //os 3 parâmetros são os valores RGB…
-
2
votes3
answers189
viewsA: LEN function, know number of characters of a number
Convert using CONVERT for the guy DECIMAL (reference here): DECLARE @valor money = 10.6879 SELECT LEN(CONVERT(decimal(6,4),@Valor)); //7…
-
1
votes1
answer40
viewsQ: How to remove /home/ from a View URL specifies ASP.NET MVC5
I need to create a View called BancoDeImagens but I need her URL instead of being: www.site.com/home/Bancodeimages I would like to remove the /home/ and separate the names by - to keep it that way:…
-
1
votes3
answers1286
viewsQ: Which is faster: NULL or NOT NULL (with an empty string)?
I have a table with fields NOT NULL and they end up being empty. What’s the difference between a NULL (allows null values) and NOT NULL with an empty string ('') within?…
-
5
votes4
answers11349
viewsQ: What is the difference between SMALLINT(3) and INT(3)
I have a question about the difference between two types of data in Mysql: That document has this table: The standard construction of these types is SMALLINT(M) and INT(M) where M = numero máximo de…
-
0
votes1
answer72
viewsQ: Mysql table with performance problem (Too slow)
I have a MYSQL table with only 31,000 records and she’s very slow when I’m going to consult, but I have no idea how to fix it. This is her creation script: CREATE TABLE `PHOTOS_Data_Base` (…
mysqlasked Leonardo Bonetti 5,313 -
0
votes2
answers89
viewsA: Transforming bank information into Link
You can use the component called Html.ValueFor, it returns the value contained in the named attribute within the href, and then stylize the <a>(if you want you can use my css). That is,…
-
3
votes1
answer42
viewsA: Confiscate an EPS export to JPEG on Magick.NET
To have a good quality it is necessary to configure the file before importing it through the MagickReadSettings: MagickReadSettings settings = new MagickReadSettings(); settings.ColorSpace =…
c#answered Leonardo Bonetti 5,313 -
0
votes1
answer164
viewsA: How to use Laravel Localization?
Files of internationalization or localization independent of the language translates only what you previously set up... You could even translate word by word of the phrase, however the output would…
-
3
votes1
answer42
viewsQ: Confiscate an EPS export to JPEG on Magick.NET
I’m using the library Magick.NET to convert an EPS file > JPEG. However the result is not pleasant because independent of the resolution (DPI) and size(Width and Height) that I put the image…
c#asked Leonardo Bonetti 5,313 -
1
votes1
answer1175
viewsQ: How to insert literal double quote without the string " becoming "?
I work with a seeker called Lucene.net nothing more than a search engine. I need to insert the following phrases inside the indexer separated by ;: "bedside Lamp";"Lampshade";"table Lamp" Double…
-
0
votes4
answers382
viewsA: How to call function in JS only once
Just remove the final(); from within Ajax so that it does not go to the end of the chat every 1 second, and call the final(); after popular. window.onload = function(){ //Quando TODO o documento for…
-
0
votes3
answers396
viewsA: Odd Number Calculation - Javascript
In that case you can use the Math.Ceil to round up, as will always miss a few fractions this solves your problem. I used of that answer to solve the problem of decimal rounding/cutting. var numero =…
javascriptanswered Leonardo Bonetti 5,313 -
0
votes2
answers44
viewsA: Loading Google Map
It seems obvious, but it goes like this... inside the <head> of your HTML, put this: <style> /* Always set the map height explicitly to define the size of the div * element that contains…
-
2
votes1
answer77
viewsQ: Is it possible to insert parameters in Filters Attributes?
I use ASP.NET and to do the access control by level, I use a filter that checks the level of permission of the user and allows access to view. [HttpPost] [AutorizacaoFilterAttribute] //Esse filtro…
-
2
votes1
answer206
viewsQ: What is the life cycle of an HTTP request in MVC standards?
I’ve been developing in ASP.NET MVC5 for 1 year and 2 months, and to this day I can’t quite understand who calls who. Researching further, I found that answer that says(in free translation):…
mvcasked Leonardo Bonetti 5,313 -
3
votes2
answers224
viewsQ: Is it possible to force a method to be called only by a specific one?
I have a father method that calls a son method, I wish the son method could only be called exclusively by the father method, it would be possible? Example: public void MetodoPai(){ //codigo…
-
1
votes1
answer24
viewsQ: How to page the Iamazons3.Listobjects method?
The method IAmazonS3.ListObjects that you can check out here limits the return by 1000 items per request but does not say if it is possible to make pagination, I have Buckets with more than 10…
-
4
votes4
answers745
viewsA: Sort Divs by date in dd/mm/yyyy format
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="date-list"> <div class="box" id="box1"> <div…
-
5
votes1
answer269
viewsA: Actionresult or Jsonresult returning Json?
In class JsonResult we have an inheritance of ActionResult: public class JsonResult : ActionResult If you choose to return one JsonResult you will have to return ONLY JsonResult, choosing the…
-
1
votes1
answer2196
viewsA: how to place Rss feed in an HTML page?
Just import the scripts into the header of its HTML and the div within the body, follows the code of an HTML page loading the feed: <html> <head> <title>Titulo da…
html5answered Leonardo Bonetti 5,313 -
6
votes2
answers198
viewsQ: What are the advantages of creating dll’s in the project and not putting the classes directly into it?
In the company where I work use many DLL’s and I have a lot of difficulty debugging and understand this... In my projects (personal) I always put the classes directly in it and do not do as they, I…
-
15
votes1
answer201
viewsQ: Does creating many static classes impact system performance?
I’ve been creating many static classes to facilitate and clear code, such as a Google Translate API call. public static class GoogleTranslate { public static string Translate(string word){ //código…
-
3
votes1
answer1004
viewsQ: FOUND_ROWS() from Mysql is a function that runs relative to local or global session?
I don’t understand much of this Mysql session issue, but to resolve a need I had to use the command FOUND_ROWS(), my query was like this: SELECT * FROM LICENCAS where FK_PEDIDO = 9479174 AND…
mysqlasked Leonardo Bonetti 5,313 -
3
votes1
answer316
viewsQ: How to automatically minify CSS/Javascript in ASP.NET MVC5
I use Visual studio 2017, my application runs on ASP.NET MVC5 (Razor), there is a way to minify all the files I choose at the time of "Publish" ?
-
1
votes1
answer193
viewsA: How to access attributes of a JSON that has been converted with special characters?
When there are special characters in the attribute name, just call it with conchetes([]). {"string":{"@xmlns":"http://schemas.microsoft.com/2003/10/Serialization/","#text":"mechanical"}} Access…
-
1
votes1
answer193
viewsQ: How to access attributes of a JSON that has been converted with special characters?
I am consuming the API of microsoft translation, they work with the return in XML(Because it is, MICROSOFT returns XML in its API’S), I managed to run everything right, but as I hate working with…
-
0
votes3
answers870
viewsA: How to pass a value from one method to another method within the same class ? C#
You can return the value of tot from within the function CadastroDespesas exchanging void by the type of varivell you want to return, in your case is a float, its function would have this header:…
c#answered Leonardo Bonetti 5,313 -
1
votes1
answer1749
viewsA: Capture IP and local machine name
You can access the user’s IP through HttpContext with the following code: HttpContext.Current.Request.UserHostAddress Now the name of the local machine through C# is not possible for security…
-
3
votes3
answers1166
viewsQ: How to access and stop a Thread? ASP.NET C#
I develop in ASP.NET MVC5 and within a Action of POST I start a Thread: [HttpPost] [AutorizacaoFilterAttribute] public ActionResult ProcessarEmails(ProcessEmailModel model) { ViewBag.Processing =…
c#asked Leonardo Bonetti 5,313 -
0
votes0
answers82
viewsQ: How to ignore a "Duplicate entry error" in MYSQL and insert the remaining un-duplicated
How to ignore a exception and insert the rest of the fields when I get this error in MYSQL using mysql . NET Connector? Mine try catch is as follows: try { conexao.Open(); MySqlDataReader reader =…