Posts by Leonardo Bonetti • 5,313 points
231 posts
-
2
votes1
answer71
viewsQ: How to force the updating of some values when I use the Javascript window.history.back()?
It is possible to force updating some values of my View even when using the window.history.back() of Javascript? My example: In my layout, I have a cart icon with the number of items inside it. When…
-
1
votes2
answers67
viewsA: Route c# redirecting to wrong action
I believe the problem lies at the url of your route. You have entered "Selectactions" and not "Selectcitingsporcode" which is the correct name of Action and the name you call in Ajax.…
-
1
votes0
answers32
viewsQ: How could I create a class that would serve both the sandbox API and the production API?
I am integrating the CIELO API into my system, they have two types of API, the sandbox and production. Each with his own merchantKey , merchantID , apiUrl and apiUrlQuery I have 4 constants for each…
c#asked Leonardo Bonetti 5,313 -
-1
votes2
answers342
viewsQ: How to receive a javascript value within a c# ASP.NET block
What I’d like to do is convert a value from within a JSON to Double and apply the String.Format("{0:N}", valor_JSON)); so I’d be converting 1000 -> 1.000. However, as already answered, it is not…
-
1
votes0
answers28
viewsQ: Does Bootstrap have legacy code if I update the version in my project?
I can update my project that is using Bootstrap version 3.3 to the Bootstrap version 4.0 current? There is a legacy code that assures me that I will not have GREAT problems?…
-
6
votes2
answers496
viewsQ: What is the technical difference between SSL and EV SSL certificates?
I am in the implementation phase of the Cielo API on my website. On the integration site there are two types of certificatesat that link, EV SSL, and SSL. Honestly I am dealing with certificate for…
-
0
votes1
answer501
viewsA: Pass parameter through GET with Asp.Net MVC?
You don’t need to pass each parameter individually, just pass the model, and within the get method access it like this: public ViewResult viewAllPropPropriedadeIM(SearchPropostaPropriedadeModel…
asp.net-mvcanswered Leonardo Bonetti 5,313 -
5
votes1
answer117
viewsQ: Is it bad practice to use an "optional" variable inside an object?
When I download a photo on my system, the download process goes through a security method that returns me an object called DownloadResponse. public class DownloadResponse{ public bool IsValid{get;…
-
4
votes3
answers1355
viewsA: Simple sum returning Nan
The OR(||) operator will return the first valor == true, as the return of a ParseInt("") == Nan, for Javascript NaN == false will be returned the second value of your expression, which in case is 0,…
javascriptanswered Leonardo Bonetti 5,313 -
3
votes1
answer325
viewsQ: Where to place asynchronous request methods following ASP.NET MVC standards?
I always put in the View Controller, is the right way to do it? I doubted it because I realized that I am filling my view with asynchronous methods, and I would like to leave it all separate so that…
-
4
votes1
answer107
viewsQ: Beginform from ASP.NET does not apply route mapping when making the request
I have a route problem(again), I use the ASP.NET MVC5, and I have the following route mapped: routes.MapRoute( "Search_route", "Home/Search/{search_input}/{search_input_category}", new { controller…
-
0
votes2
answers348
viewsA: check user type for php access
I would do so, because then it would already be checking whether the user exists/is or not administrator. Because if there is no date on mysql_fetch_array($result) automatically it will report that…
-
0
votes3
answers625
viewsA: Set shadow in email HTML table
With this code you compatibility in ALL the browsers. table { -moz-box-shadow: 3px 3px 5px 6px #ccc; -webkit-box-shadow: 3px 3px 5px 6px #ccc; box-shadow: 3px 3px 5px 6px #ccc; } <table>…
htmlanswered Leonardo Bonetti 5,313 -
2
votes2
answers83
viewsA: Jquery does not exclude rows from the table
You were using $(this).parent().parent().remove(); that is, from the bottom up the elements were: button > td > tr you were removing the tr that composes the two buttons and not the tr that…
jqueryanswered Leonardo Bonetti 5,313 -
2
votes2
answers796
viewsA: How to put a json code in textarea html?
You can both use with the <textarea> how much <code> <pre>, in the <textarea> enter the attribute readonly so that characters cannot be removed or inserted, and <code>…
-
0
votes1
answer58
viewsQ: How to pass more than one Controller option in Routes.Maproute()
I have the following route: routes.MapRoute( "Contracts", "Home/Contract/{contract}", new { controller = "Home", action = "Contract", contract = UrlParameter.Optional }, new { contract = @"\w+" } );…
-
3
votes2
answers3664
viewsA: What is string ISO-8859-1?
ISO/IEC 8859-1 is the default character set of Majority of browsers. The first 128 characters of ISO-8859-1 is the original ASCII set (numbers 0-9, upper and lower case letters of the English…
-
1
votes2
answers1169
viewsA: Place border-bottom online table with css
As much as it was considered the first correct answer, I think another solution would be to apply the border to <td> because the edge is not applied to the Tables when not set: table {…
-
1
votes1
answer94
viewsQ: How to create 90° "edges" in the div
It is possible to create 90° edges on the tip of div's by CSS? Follow example:…
-
3
votes1
answer39
viewsA: How to make a Validator jQuery
When detecting the error, you should add a red border in the field. I don’t know how you’re treating/detecting the error, but the code to let red is $(".input-error").css("border","1px solid red");,…
-
1
votes1
answer3653
viewsA: Navbar Bootstrap 4 Collapse now automatic
Simple, in the div <div class="collapse navbar-collapse" id="nav-content"> is the class collapse that just "collides" your Nav. Just remove, getting so <div class="navbar-collapse"…
-
1
votes1
answer479
viewsA: Select Like in Oracle
Use the REGEXP_LIKE passing your column and your regexp: WHERE REGEXP_LIKE (column_name, '(^|\s)ERRO(\s|$)');…
-
2
votes2
answers1183
viewsA: How to send form data via Javascript and redirect
The method swal() has a Overload who receives a function, that performs the action after clicking on "Ok" Follow an example using the library you use, Sweet Alert setTimeout(function() { swal({…
-
1
votes2
answers221
viewsA: Meter with percentage
I was trying with Jquery (Hide show) but it broke element line inline and it was getting very strange, with this I decided to use the good old Javascript Puro and to set the value within each…
-
1
votes1
answer559
viewsA: Is it possible to connect to a Mysql database without Mysql.Data.dll?
The System.Data.SqlClient(reference here) is exclusive to SQL Server(as in this LINQ response). Without a third-party DLL it is almost impossible to connect. According to my searches there are other…
-
2
votes2
answers6724
viewsA: How to put Font-Awesome icon on a boot?
Basically you will insert your icon inside the input, like this: <button> CODIGO ICONE </BUTTON> practical example(CSS IS MERELY ILLUSTRATIVE): button{ width:200px; height:30px;…
htmlanswered Leonardo Bonetti 5,313 -
1
votes2
answers371
viewsA: Sending email C# The remote name could not be resolved
I do not have an exact solution, but I believe it will solve the doubt. A few months ago I had the same problem you are having, I use Godaddy’s service with SMTP: relay-hosting.secureserver.net I…
-
2
votes1
answer59
viewsQ: It is possible to know in which Routes. Map() the call of an Action fell? ASP.NET MVC5
Afterward of that question I was wondering, is it possible to know on which route map my Action used? Example: I have two routes.MapRoute() routes.MapRoute( "Home", "Image/{id}", new { controller =…
-
2
votes1
answer160
viewsQ: ASP.NET route does not receive the parameter in Action after being set
I Mapeed a new route on my site like this: routes.MapRoute( "PaymentEdit", "Payment/{type}", new { controller = "Contributor", action = "Payment" }, new { type = UrlParameter.Optional } ); My Action…
-
3
votes3
answers4984
viewsA: Get the highest value from a list?
You will use the function Max() read more here example: List<int> lista = new List<int>{1,2,3,4,5,6,7,8,9,10}; int maiorValor = lista.Max(); Debug.WriteLine(maiorValor); //10…
c#answered Leonardo Bonetti 5,313 -
1
votes1
answer61
viewsA: Receiving Request in View
As I don’t know the whole hierarchy of your project I’ll give an example of my project. I have a Homecontroller with the Image view(is an image result view): public class HomeController : Controller…
-
1
votes1
answer298
viewsA: Accessing a JSON with JS
Just create an object from your JSON myObj ={json aqui} and access by object name point attribute: myObj.competencia. Simple, easy and fast. myObj = {status: "0", ano: "Não Informado", competencia:…
-
2
votes2
answers459
viewsA: Javascript concatenated into input name
You first have to create an ID for your input, assign it to a variable: var element = document.getElementById("inputConcatenar"); Then you assign to the name a new value, in which case I used the…
-
3
votes3
answers1142
viewsA: Remove whitespace when counting Javascript
Just use .replace(/\s/g,'') of Regex in the value from your Input, so it will remove the blanks. Regex taken out of that question. function contar(e) { var num_caracteres; num_caracteres =…
javascriptanswered Leonardo Bonetti 5,313 -
4
votes3
answers388
viewsQ: Is it possible to offer return options in a method?
As far as I know Overload in the creation of methods, which are execution options, example(very simple), a method where you have the option to pass 2 or 3 parameters calling the same function:…
-
2
votes1
answer2591
viewsA: How to create a JSON using jquery?
Your JSON is not valid! Paste it on that website and validate it, your JSON returns: Expecting string or }, not [. I created a valid JSON of names for you. Remembering that { } = objeto and [ ] =…
-
4
votes3
answers1538
viewsA: How to insert the data into a specific field of a _mysql_table?
You can run a UPDATE, but beware ! apparently you don’t have a ID single for each field. I did the UPDATE selecting by name, and this is not correct at this time, however it will work, you can…
-
0
votes3
answers331
viewsA: Jquery calculation of centimeters with coin result
I assume that my answer is 50% of the question: I could not apply masks. But I have some things to tell you: It is not good to add everything in divs how you did ! Use inputs is what they serve,…
-
1
votes1
answer269
viewsA: Error starting WPF application
The Exception says: Configurationerrorsexception: Only one element is allowed per configuration file and, if present, must be the first child of the element Update if config by placing…
-
1
votes1
answer144
viewsQ: How to create a track extending an Image in c#
I am developing a method to add a purple stripe to the images that are processed in my application. I’m using c# to draw in the image, currently I do so: using (Image image =…
c#asked Leonardo Bonetti 5,313 -
0
votes1
answer1700
viewsA: Bootstrap Collapse does not work
You need some external files: jQuery2.1.1 and bootstrap.js Now Collapse will work: Read more on Get Bootstrap <script…
-
0
votes2
answers44
viewsA: Allow only delete key
The key code delete is the 46. You will only run e.preventDefault(); if it is different from delete. Every event in Jquery takes a parameter, in this case e, in it you can access the keycode of the…
-
5
votes4
answers8801
viewsA: What is it and what is a "truth table" for?
Like in that explanation if you need to focus your application on a single output, you can use the truth table to know which entries you need. Let’s say you have a two-sensor alarm system and you…
-
0
votes1
answer24
viewsA: Add a page size controller
Taken directly from W3schools, the event onresize no body runs whenever the screen is increased or decreased by calling the myFunction() that updates the DOM by displaying the width and height of…
-
1
votes2
answers581
viewsA: Resize Input Bootstrap in Inline Form
Old I managed to solve by dividing the width of each inline element and applying inline-block for the same. Remembering that, never let arrive at 100% otherwise it will automatically break line.…
-
7
votes3
answers649
viewsA: What is the Target Framework and what is it for?
When you target a framework in an app or library, you’re specifying the set of Apis that you’d like to make available to the app or library. You specify the target framework in your project file…
-
2
votes6
answers630
viewsA: Is there a problem compressing CSS?
It’s important yes! Including for your website’s SEO. A basic example of this is in Speedpage Google, it always warns that it is necessary to compress or compress (or minify) your CSS and…
cssanswered Leonardo Bonetti 5,313 -
5
votes1
answer5004
viewsQ: How to remove Input type="number" buttons
How to remove both buttons from Input type="number" in HTML5? Example: <p>Quero que isso:</p> <input type="number"> <p>Vire isso porém sem usar o text, pois preciso do…
-
1
votes2
answers166
viewsA: Loading on top of the map
I assign position:absolute on Divs Upload, so it will override the rest, I MANUALLY positioned it by choosing the top and left of the div and I set the index-z at 1 to overlay the canvas. To check…
-
1
votes2
answers4019
viewsA: How to change the color of the text ?
You can change the tag directly: <div id="lugar" style="color:rgba(255, 0, 0, 0.8);"> Or by Javascript: document.getElementById("lugar").style.color =rgba(255, 0, 0, 0.8); You can create…