Posts by Leandro Simões • 687 points
23 posts
- 
		0 votes4 answers636 viewsA: Check object array index by propertyTry this way (UPDATE: I upgraded to ES5 and also to delete several): function onRemove(city) { var citiesFound = array.filter(function (a) { return a.id === city.id; });… 
- 
		1 votes1 answer117 viewsA: How to load Textboxfor after onchange of a Dropdownlistfor?After further analyzing, I believe the only problem was the order of the parameters in your url, for example, you were doing so: $.ajax({ url:… 
- 
		8 votes2 answers927 viewsA: What’s the difference when creating a class libray (.net framework) and class library(.net standard) project in VS2017?Imagine that you want your application to have portability for creating any types of API’s, such as . NET Framework, . NET Core, Xamarin, etc. In this case you would use . NET Standard, but its… 
- 
		10 votes3 answers1595 viewsA: Is it bad practice to put numbers as id in HTML elements? If so, why?There really is no technical problem using only numbers as selectors in the CSS since you ensure that you will never repeat the ID selectors for different elements. Now, imagine a more complex… 
- 
		1 votes2 answers655 viewsA: How to assemble dynamic menu?You can do yes Isa, follow the code: https://jsfiddle.net/leandrosimoes/0vt1tvc8/3/ // Objeto JSON retornado do servidor var jsonObject = { items: [ { onclickFunctions: ['displayPracaRamos',… 
- 
		0 votes1 answer169 viewsA: Master page does not load in ASP.NETTo fix this problem, just add the path to the master page in this way: MasterPageFile="~/Community/CommunityMasterPage.master Just to exclaim, after the ~ have to put the full path from the system… 
- 
		1 votes1 answer675 viewsA: Division of tables with Count and SumThe problem is that the division is returning a broken value, and SQL does not convert to DECIMAL automatically, so you need to convert the values in this way: CAST(((CAST(SUM(CASE WHEN… 
- 
		1 votes1 answer51 viewsA: Submit using Ctrl+Enter or Click the buttonI think that’s what you need: $('#chatEnvia').click(function() { $.post( "inc_chatEnvia.php", { acesso: "ok", msg: $("#chatEscrita").val() }); }); $('#chatEscrita').keyup(function (e) { if… 
- 
		0 votes1 answer28 viewsA: How to send this "dt" variable to Promise.done?What happens is that by adding dt in the callback function of the Promise, here on this line: window.srObjc.confirm("message $"+refundVal+" ?").promise.done(function(dt) you end up creating a new… 
- 
		1 votes2 answers167 viewsA: Set an imageI had problems with a project of mine and really took a long time to find the solution, but what solved for me was to put the Source of the image this way: <Image Width="60" Height="60"… wpfanswered Leandro Simões 687
- 
		3 votes1 answer395 viewsA: Can you disable the animation of a Charts.js chart?To disable animations, pass the following settings in options: options: { animation: false } 
- 
		1 votes2 answers28 viewsA: CSS Selector - Run a loop from a particular loop itemYou can use the function slice javascript itself Array. The function works as follows: I have an array [12, 32, 31, 23, 43] and I want to take only from the third, ie I want to take only the… 
- 
		3 votes1 answer105 viewsA: Create table component with KnockoutFor some reason knockout components do not work inside a table other than through the use of "virtual Elements" Feature. So I made this jsFiddle to illustrate how your use would look. I used the… 
- 
		0 votes1 answer46 viewsA: Chrome does not apply Addclass before calling window.confirmJavascript is an interpreted function, and the browser interprets it line by line. But the browser does it very quickly where it ends up running the lines below the function call before the function… 
- 
		0 votes2 answers131 viewsA: Error of responsivenessCome on ... after seeing your code I found some problems. In html, there is a meta tag viewport, this meta tag serves for the browser to understand which resolution it should take into consideration… 
- 
		1 votes3 answers864 viewsA: css select only first levelAfter searching hard, the best alternative I could find was this: $('.menu > ul > li').clone().children().remove().end() See the example in my Jsfiddle I hope I’ve helped.… 
- 
		0 votes1 answer30 viewsA: Firstrun from the startup form program is one and after firstrun the startup form changes Vb.netNext, for this to work, the correct thing is to check this when starting the system before you load any form. To do this you must first create a boot class at the root of your project in this way:… vb.netanswered Leandro Simões 687
- 
		0 votes1 answer46 viewsA: Error using Mappath http:/.. is not a Valid virtual path. 'Well, as you can see at this link, Mappath method only accepts physical paths from the server (the virtual path in the error message). In this case, I believe you would have to pass your way this… 
- 
		-1 votes3 answers548 viewsA: Save image to desktop with html2canvasI don’t think you’ll be able to perform this procedure. A web application will never have access to any user’s local machine information for security, such as folder structure. Not even the browser… 
- 
		0 votes1 answer121 viewsA: Exception error when authenticating login with null values - Simplemembership - ASPNET MVCWell, as the message says, this method does not accept null values or empty strings. In this case you would have to directly validate your values in this way: using System; using… 
- 
		0 votes1 answer37 viewsA: Secure email link sending, which allows the user to access an Action Edit in the controllerWell, first of all it really would not be very safe to send the link this way, I would suggest creating a new action, whose parameter would be an encrypted token where, inside this token you would… 
- 
		1 votes1 answer1474 viewsA: How to set 100% height between a navbar and a div (responsive)Look how I did: html, body { margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden; } div#container { width: 100%; height: 100%; } div#container #topo { width: 100%; height: 30px;… 
- 
		3 votes1 answer114 viewsA: Entity Framework (ORM) and Dropdownlist HtmlI hope I can help you. Note the image below, in it you can notice that the second parameter is of type IEnumerable<SelectListItem>, but you’re passing a IEnumerable<Categorias>. So you…