Posts by Netinho Santos • 2,366 points
126 posts
-
0
votes1
answer77
viewsA: Can anyone help me with this json error in c#
As the error itself points out, you are trying to deserialize an array to an object. Use: var post = JsonConvert.DeserializeObject<RootObject[]>(objResponse.ToString()); Another thing is that…
c#answered Netinho Santos 2,366 -
2
votes2
answers1018
viewsA: Api Climatempo C#
Your class UsuarioCliente is not the same as the properties of Json. To ensure the mapping of all property use this site: http://json2csharp.com/. Your class must be like this: public class Data {…
-
2
votes1
answer852
viewsA: Change framework from a version to a newer one
Right-click on the Solution explorer of your project Select Properties Select the App tab Change the framework destination to the framework desired Note If your code contains references to a…
-
1
votes2
answers80
viewsA: Why does image transparency on the Firefox Button not work?
I recently had a similar problem and I managed to solve by applying the event hover the parent element, that is to say button. Apparently in Firefox, the child elements of the tag button are not…
-
1
votes1
answer522
viewsA: Problem with autoplay of videos in Chrome
Use $("video").prop('muted', bool) to enable or disable sound and $("video").prop('muted') to check that it is muted. Example $("video").prop('muted', true); $("#mute-video").click(function() { if…
-
0
votes4
answers844
viewsA: How to Make Material Design Style Button Only with CSS
Source: Material design ripples with CSS button { position: relative; overflow: hidden; padding: 16px 32px; } button:after { content: ''; display: block; position: absolute; left: 50%; top: 50%;…
-
7
votes1
answer118
viewsA: In Devtools is there any way to capture the entire screen of the site, even if it has scroll?
I do not know if the following solution fits: I’m not looking for an extension of Chorme or screen capture code etc. With the DevTools typhoon CTRL + SHIFT + P and then opens the command menu Then…
-
1
votes1
answer468
viewsA: Convert Json to a Csharp Object
First use json2csharp to map all Json fields to a class. Model: public class Moeda { public string code { get; set; } public string codein { get; set; } public string name { get; set; } public…
-
0
votes5
answers2417
viewsA: How do I get the value of an Hidden input with jquery
One solution is to define a class for the fields hidden and then make a loop $('.escodido').each(function() { console.log($(this).val()) }); <script…
jqueryanswered Netinho Santos 2,366 -
2
votes2
answers3370
viewsA: Bring Datatable columns by Datatabe Ajax itself
According to this FAQ cannot set columns in the JSON of the return of DataTables. One solution is to load your table via $.ajax Example $(document).ready(function() { $.ajax({ url:…
answered Netinho Santos 2,366 -
1
votes2
answers981
viewsA: Change a text value using a C pointer
You missed your last printf that displays the message: O valor de z antes da modificao eh the %c #include <stdio.h> #include <stdlib.h> //Programa principal int main() {//Declaração de…
-
0
votes2
answers1195
viewsA: How to "break" a pure C string to assign the parts to other variables?
I’m assuming the scenario would be the same as example #include<stdio.h> #include<string.h> int main(){ char str[] = "Bom dia pessoal"; char *str1, *str2, *str3; str1 = strtok(str, " ");…
-
2
votes1
answer251
viewsA: Jquery validate with type button
You can use .Valid() returning true or false depending on whether your form is valid or not. $("#login_submit_patient").on("click",function(){ if(!$("form").valid()) console.log("Formulário…
-
0
votes1
answer84
viewsA: Insert value into input value when expanding image with javascript
Use expandImg.value to receive the value. function myFunction(imgs) { var expandImg = document.getElementById("expandedImg"); var imgText = document.getElementById("imgtext"); expandImg.src =…
javascriptanswered Netinho Santos 2,366 -
0
votes1
answer66
viewsA: How to validate value that comes by json from php to ajax
Try var data = [{ "invalido": true }, { "scalar": false }]; if (data[0].invalido == true) { console.log('invalido'); } <script…
-
1
votes12
answers79762
viewsA: Formatting Brazilian currency in Javascript
Follow another solution. function formatMoney(n, c, d, t) { c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "," : d, t = t == undefined ? "." : t, s = n < 0 ? "-" : "", i = parseInt(n =…
javascriptanswered Netinho Santos 2,366 -
2
votes1
answer779
viewsA: How to format monetary values to be displayed in Brazilian format with chartjs
To format data on tooltip use Tooltip Callbacks tooltips: { callbacks: { label: (tooltipItem, data) => { //Format data }, }, To access the tooltip values:…
chartjsanswered Netinho Santos 2,366 -
0
votes2
answers1472
viewsA: Swap letter by number in C
Follow another well-reduced solution based on the table ASCII #include <stdio.h> int main(int argc, char *argv[]) { char texto[30], result; int i = 0; printf("Pressione A B C para 2");…
-
5
votes1
answer320
viewsA: jQuery / javascript - Skip input when maxlength is reached
Try $(".idade-viajantes").keyup(function() { if (this.value.length == this.maxLength) { $(this).next('.idade-viajantes').focus(); } }); <script…
-
3
votes5
answers2803
viewsA: How to make CSS a paragraph with Capitular letter (Drop Caps)
You can use p::first-letter Select and style the first letter of each element <p> Definition and Use The selector ::first-letter is used to add a style to the first letter of the specified…
-
4
votes5
answers713
viewsA: indexof does not find element in an array
Use indexOf would be feasible if your array contained only primitive types in this case use Array.prototype.findIndex() Note: The findIndex() method returns the index of the first element in matrix…
-
0
votes1
answer43
viewsA: Transform hexcode "+" into "+" in Javascript
Try function htmlDecode(input) { var e = document.createElement('div'); e.innerHTML = input; return e.childNodes[0].nodeValue; } console.log(htmlDecode("+")); A lib he (for "HTML entities")…
-
0
votes1
answer1266
viewsA: Exception without treatment: System.Stackoverflowexception
System.StackOverflowException An exception StackOverflowException is launched when the runstack exceeds by having many nested method calls. Associated tips: Make sure you don’t have an infinite loop…
c#answered Netinho Santos 2,366 -
1
votes2
answers931
viewsA: Remove specific input file Multiple type="file"
The list of files on <input type="file" multiple> is read-only, but you can keep a separate list to handle the files as follows. Source example Example var dropZoneId = "drop-zone"; var…
-
3
votes1
answer38
viewsA: Checkbox field is not recognized marked
You can pass the current selector to the function using the this function checkProduto(chekProduto) { console.log($(chekProduto).is(':checked')) } function checkServico(chekServico) {…
-
1
votes3
answers377
viewsA: Onclick to display result
Just change keyup for click Description: Link an event handler to the event Javascript "click" or trigger this event in an element. This method is a shortcut .on("click", handler) the first two…
-
1
votes1
answer31
viewsA: Nan error when using datatable sorting
Try: jQuery.fn.dataTableExt.oSort['uk_date-pre'] = function (a) { var partsDate = a.split("/"); var date = new Date(parseInt(partsDate[2], 10), parseInt(partsDate[1], 10) - 1, parseInt(partsDate[0],…
-
1
votes1
answer79
viewsA: Problem sending email with HTML in your body using PHP
To send email in HTML, the header Content-type must be defined. $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; Source: PHP: Documentation…
-
5
votes1
answer62
viewsA: Reverse graph direction to horizontal on c3js
To change the position of the x and y axes use axis.rotated. Standard: false Format: axis: { rotated: true } Source Example var chart = c3.generate({ bindto: '#chart', padding: { left: 60 }, data: {…
javascriptanswered Netinho Santos 2,366 -
0
votes1
answer213
viewsA: Open Input type Month calendar by clicking any part of the field
You can do it using CSS input[type="month"] { position: relative; } input[type="month"]:after { content: "\25BC"; color: #555; padding: 0 5px; } input[type="month"]:hover:after { color: #bf1400; }…
-
1
votes1
answer488
viewsA: Requests POST AJAX ASP net MVC
Based on some research I found that: The error message is generated only by Firefox when the rendering is empty. For some reason, .NET generates a type of response of application/xml when creating…
-
3
votes1
answer1998
viewsA: Dependency Injection - Error: Invalidoperationexception: Unable to resolve service for type
Missed you register interface ICompanyService. For further questions see documentation public void ConfigureServices(IServiceCollection services) { services.AddScoped<ICompanyService,…
-
1
votes1
answer375
viewsA: Jquery HTML Currency Mask (no input)
You can do this through toLocaleString $(".myvalue").text(parseInt($(".myvalue").text()).toLocaleString('pt-br', { style: 'currency', currency: 'BRL', })); <script…
-
1
votes3
answers873
viewsA: Key modal Event
You can use the Keyboard Events. To know the key code use as reference: https://keycode.info/ Example $(document).keypress(function(event) { if (event.keyCode == 13){ $("#myModal").modal("show"); }…
-
2
votes4
answers238
viewsA: Variable feed within variable
You are receiving the value in the variable recebeMensagem and is not using it anywhere. To set the value of the variable in div use the function text() var recebeMensagem = ''; var mensagemBot =…
-
0
votes3
answers1134
viewsA: Create DIV with border crossing the title
Use the tag fieldset Definition and usage: A tag <fieldset> is used to group elements related on a form. The tag <fieldset> draws a box around the elements related. Tip: The tag…
-
1
votes2
answers409
viewsA: Jquery function to select tab with required fields not filled
Follows a solution with Jquery Validation $('#validate').validate({ ignore: [], errorPlacement: function() {}, submitHandler: function() { alert('Cadastro salvo com sucesso'); }, invalidHandler:…
-
0
votes1
answer120
viewsA: How to make an animation start at the beginning of the process and only finish at the end of jquery?
To display a message or a loading before the data is loaded in Datatables use: sLoadingRecords Note: When using data originated from Ajax and during the first draw when the Datatables collects the…
-
2
votes1
answer1329
viewsA: How to display chart values in chartJS without mouseover?
You can user the events Chartjs provides. For example, for the chart to respond only to click events, you can use: options: { //Este gráfico não responderá ao mousemove, etc events: ['click'] } To…
chartjsanswered Netinho Santos 2,366 -
1
votes1
answer326
viewsA: How to change the Datepicker format dynamically?
In the radio change event use the method Destroy to insert the new format. Destroy Arguments: none Remove datepicker. Remove attached events, attached objects internal and added HTML elements.…
-
0
votes2
answers1048
viewsA: Changing Width of a Modal
You can add a class modal-long where the class modal-dialog is. .modal-long { width: 1080px !important; } <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>…
-
0
votes1
answer145
viewsA: Highcharts limit the amount of items that will be displayed in the categories on the y-axis
Highcharts has the minimum and maximum value properties of the axis, see documentation yAxis: {min: 0, max: 100} ...and will always display the first and last variable item categorias. For the above…
-
0
votes2
answers80
viewsA: Generate model-based Migration (Entity Framework)
You need to add your table to your implementation of DbContext public class DatabaseEntities : DbContext { public virtual DbSet<AcademicosMig> AcademicosMigs{ get; set; } }…
-
2
votes3
answers424
viewsA: Block enter if textarea is empty
Use preventDefault Definition and Use The preventDefault() method cancels the event if it is cancellable, which means that the default action belonging to the event will not occur. For example, this…
javascriptanswered Netinho Santos 2,366 -
7
votes2
answers10703
viewsA: Dynamic fields mask for Javascript phone
Follows a method for telephone mask. Source here. Example function mask(o, f) { setTimeout(function() { var v = mphone(o.value); if (v != o.value) { o.value = v; } }, 1); } function mphone(v) { var…
javascriptanswered Netinho Santos 2,366 -
1
votes2
answers529
viewsA: Compare objects with object array
You can use the lib Lodash. _.isEqual(value, other) Perform a deep comparison between two values to determine if they are equivalent. Note: This method supports comparison of matrices, matrix…
javascriptanswered Netinho Santos 2,366 -
1
votes1
answer122
viewsA: how to add semicolon in animated number that activates with the scroll movement in javascript
I don’t know if I understood your question correctly, but do you want to format the number and insert decimal places in it? If so, use: toLocaleString() The toLocaleString() method returns a string…
-
1
votes2
answers59
viewsA: Jquery Validation only after dropdown is selected
jQuery Validation works with the attribute name Note: attribute name is required for all input elements that need validation, and the plugin will not work without it. A attribute name should also be…
-
0
votes1
answer144
viewsA: Version of ASP.Net Core
Make sure you are using Visual Studio 2017 Update 3 (version 15.3) To check your version of Visual Studio 2017: In the Help menu, choose About Microsoft Visual Studio. In the About Microsoft Visual…
-
0
votes1
answer1641
viewsA: How to play a video automatically on google Chrome?
According to that Article in google developers., from version 53 of Chrome automatic playback is respected by the browser if the video is muted. For that use: autoplay muted <video autoplay…