Posts by Marco Vinicius Soares Dalalba • 1,232 points
59 posts
-
-1
votes2
answers1101
viewsA: Display modal after form validation (fields filled)
Use $("#myform").validate({ submitHandler: function(form) { //showConfirmbox if(confirm) $(form).ajaxSubmit(); } });
-
0
votes2
answers57
viewsA: Initializing Array from a new class
I think the easiest implementation is to create an inline started property public class bClass { public aClass[] bfield => new aClass[10]; }
-
0
votes1
answer128
viewsA: Filter Json from the bank using Lambda C#
You can change the section filtrado = retorno.Select(x => new JsonValue { Name = x.Name, JsonValues = x.Properties.Data.Values.Select(y => new JsonValues { InstanceName = y.InstanceName, Time…
-
1
votes4
answers534
viewsA: Help with distinct
I did it in an uncomplicated way, but solve your problem, I had to add an ID to get the correct registors in Where if you have another logica idenficador the same select c.nome, c.data, c.situacao…
-
0
votes2
answers34
viewsA: How to capture the status rendering (pending) for svg not loaded on the screen?
You can filter the sample images Let all display: None var lengthUnloadImg = Array.from(document.getElementsByTagName("img")).filter(function(a){ return a.complete != true }).length…
-
1
votes2
answers736
viewsA: How to make an HTTP request in Ruby?
Available in ruby documentation DOC, the example below require 'net/http' uri = URI('http://www.example.com/search.cgi') res = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50')…
-
3
votes2
answers167
viewsA: Deserialize Json string[] for string[]
Using the Newtonsoft.Json library which is one of the most widely used. using System; using Newtonsoft.Json; namespace JsonProject { class Program { static void Main(string[] args) { var json =…
-
2
votes1
answer694
viewsQ: Mult Mapping Dapper
I am having problems with Mult Mapping of Dapper, when I try to execute the following query is not mapping the object ids select is this: var sql = @" SELECT ofi.id_oficina, ofi.codigo, p.id_pedido,…
-
2
votes3
answers218
viewsA: Problem with JS/Jquery/JSON/AJAX
you are returning an array. Use This console.log(data.data[0].cardapioId);
-
1
votes1
answer149
viewsA: Return Collection of Products according to Category
I drafted an answer that based on what you put.... I created a whole structure to make it easier to develop Basically what you need is this line, to return the list of products with the desired…
-
0
votes1
answer79
viewsA: Table and table bordered in JQUERY function
So resolve? you want to apply only the tables inside the div #conteudo better use the selector so. $(function () { $("#conteudo table").addClass('table table-responsible'); $("#conteudo…
jqueryanswered Marco Vinicius Soares Dalalba 1,232 -
0
votes1
answer139
viewsA: Error when obtaining value of a property through reflection
The correct way to use Getvalue is to pass the Object, passing this you are passing the class in which this function is, in this context. var key = entity.GetType().GetProperties().FirstOrDefault(p…
-
1
votes1
answer1026
viewsA: Select with max(date), penultimate(date)
I couldn’t test 100% here but I believe this is what you’re looking for... What I did, I made a select like yours, but I took the max data_venda which is not the same as the first obviously being…
-
4
votes2
answers411
viewsA: Textbox_changed is accumulating the sum value c#
Are you changing the value of the property Valuemost, wouldn’t it be easier just to add the values to the textbox6? the way this writing or you define a global variable for the initial sale value or…
-
-1
votes2
answers17484
viewsA: Host images to an HTML in Google Drive
An image generated in google drive, generates a link https://lh5.googleusercontent.com/id_da_imagem But to get this link is kind of complicated, you need to go on share, and click on Get shareable…
google-drive-apianswered Marco Vinicius Soares Dalalba 1,232 -
2
votes2
answers583
viewsA: Script js does not interrupt form Ubmit
You can change the type of button to 'button' and put the jquery event on the button click <button id="btnsalvepost" type="button">Salvar</button> and…
-
0
votes2
answers276
viewsA: Accepting null fields from a Texbox
The error is in the last 3 lines oleCmd.CommandText = _Consulta; _oleCmd.Parameters.Add("@MODELOS", OleDbType.VarChar, 50).Value = txtModelo.Text.Trim(); _oleCmd.Parameters.Add("@QUANTIDADE",…
-
2
votes3
answers34
viewsA: Line up and put div on the other
Only changing the order of the written HTML solves the problem. $(document).ready(function() { // Abre Sidenav $(".overflow-menu").click(function() { $(this).find("ul").animate({ height: 'toggle' },…
-
0
votes1
answer255
viewsA: Fullpage.js + class="Section"
In the example you posted yourself it is using this JS to apply fullPage, add the properties scrollOverflow, scrollOverflowReset, to your script to add the overflow. You can read more in the…
-
1
votes1
answer1414
viewsA: Problem to apply a jQuery mask to a modal
To work jquery code > $("#proxAtual").mask("99/99/9999 99:99"); > $("#prevSolucao").mask("99/99/9999 99:99"); It must be executed after the inputs are rendered on the screen, if you run before…
-
4
votes1
answer4167
viewsA: Call function by Onclick passing parameters
If you will pass the letters by PHP this way <a href="javascript:;" id="Iniciais" onclick="pBuscaFichaEmergencia('<?php echo $Letra; ?>');"> <?php echo $Letra; ?> </a> You…
jqueryanswered Marco Vinicius Soares Dalalba 1,232 -
2
votes2
answers369
viewsA: How to change project type on Github by Visual Studio
Github makes the choice(Automatica) for the highest percent of code with a particular language in the project, in which case you have more JS code than c# in your project.
-
0
votes3
answers58
viewsA: What’s wrong with this js code?
To catch the action value make it easier this way var url_atual = decodeURI(window.location.href); var split_url = url_atual.split('/'); val = split_url[split_url.length -1] [val = "action"]…
-
1
votes1
answer783
viewsA: Populate chart with mysql data
Your error is in SQL select count(*) from produto where pro_cod; Is missing Cod parameter ex: select count(*) from produto where pro_cod = 1 group by parametrodeAgrupamento; something else if you…
-
1
votes1
answer963
viewsA: Change Title to display tooltip
To change the tooltip you can do so it works , it gets lost the way you are doing. $('#batata').tooltip({ title: "Email já cadastrado" }) setTimeout(function(){…
-
4
votes1
answer58
viewsA: How to remove HTML and Scripts in user-written messages?
In a simple way you replace in all < por < e > por > before saving in the bank if php can use htmlspecialchars('<strong>qualquercoisa</strong>')…
-
1
votes2
answers8686
viewsA: How to Resolve "Object Reference not set to an instance of an Object"?
I made minor changes your mistake was on the line RepositorioLivros repositorio = new RepositorioLivros(); and the right in this structure that you are using is RepositorioLivros repositorio =…
-
-1
votes2
answers160
viewsA: Icollection<Object> - how to create and use objects within the collection
The comment class needs to have a change, you will need to do 1-n side ratio for comment, and should put the side in the comment, and to add a comment to the side you should add this way. I…
-
0
votes2
answers174
viewsA: Use of LINQ to query a collection
Linq is a query abstraction language where it focuses on making it easier to write queries. Utilize Linq aims to standardize all your queries made in c#, and this is its main feature, microsoft…
-
1
votes1
answer103
viewsA: Music in jquery slide
Something like that solves your problem? $(window).load(function() { $("#showContent1").click(function() { showContent("Content1") }) function showContent(id) { if (!$("#" + id).is(':visible')) {…
-
0
votes1
answer1055
viewsA: Generate PDF from a Google Spreadsheet
I made this code that should suit your need I could not execute exactly as you want but I assumed that your function returns html with the table ready.... I used this jsFidle as an aid…
-
1
votes1
answer2089
viewsA: Change class according to condition
I believe this is what you want to do, remembering that in this scenario will only work for 1 pizza for more pizzas should totally change the schedule. $(document).ready(function(e) { var mais =…
jqueryanswered Marco Vinicius Soares Dalalba 1,232 -
3
votes2
answers120
viewsA: Error Showing Next Month
This is due to the fact that 1 months in php have 30 days and February have 28 days. it adds 30 days to 31/01 and goes straight to month 3 <?php echo $mes =…
phpanswered Marco Vinicius Soares Dalalba 1,232 -
1
votes2
answers234
viewsA: Positioning of div with jquery
I made a change in javascript has to take a good look at the calculations to be perfect, but basically I am calculating based on the size of the word and if it is capitalized or minuscula…
-
0
votes1
answer96
viewsA: Disable fields before radio button is selected Opencart
Simply add to that =) $(window).ready(function(){ $('input:radio[name^="custom_field[account][1]"]').change() })
-
4
votes2
answers87
viewsA: Scroll down when restarting with JS
This way I tested here giving F5 and Reload on the page and works perfectly. I edited with the function creates br para n to stay with 30 thousand brs on page kk window.onload = function() {…
javascriptanswered Marco Vinicius Soares Dalalba 1,232 -
1
votes2
answers297
viewsA: How to pause CSS animation while music is stopped?
So you can pause the animation use the snipet tool, to make your js because external links may stop working $('video').bind('play', function (e) { $('.bloco').toggleClass('paused'); });…
-
0
votes1
answer484
viewsA: Remove element within iframe
Try it this way. I put a setTimeOut to be more visible setTimeout(function(){ $("img[src='/assets/online/cf_logo-9733d198a764182fc89bc38518f73f91efd7a413394b1ca263e8ba4774ed8b5b.png']").hide();; },…
-
2
votes2
answers43
viewsA: selector does not work: $("div + p")
Code working $('#marcas_select').on('focus', function(evt) { $('#modelos_teste').css('background-color', 'yellow'); }); <script…
-
1
votes1
answer549
viewsA: How to check if a select already has an option selected?
Just execute $('select').change(); after you finish adding the new select. forcing it to perform a change and thus calling every flow of verification…
-
1
votes2
answers45
viewsA: passing a complex object to MVC4 controller
Put the list in json format And in the controller you will receive an array of Products or a list... var data = { date : $('#Data').val(), clienteNo: $('#ClienteNO').val(), clienteRaz:…
-
1
votes3
answers1182
viewsA: Separate a string in C#
I believe that so you can solve your problem assuming that you have the line as described. var linha = "Existem 30 calorias em Abóbora (1 chávena)."; var palavras = linha.split(" "); int calorias =…
c#answered Marco Vinicius Soares Dalalba 1,232 -
1
votes1
answer335
viewsA: Creating a Dropdownlist
you cannot pass null pass new List<SelectListItem>() @Html.DropDownList("batata", new List<SelectListItem>(), htmlAttributes: new { @class = "form-control", id = "Musico" }) if you want…
-
0
votes1
answer85
viewsA: Filling a div using each Jquery
I made some changes to your code, to work properly I believe this is what I was looking for. $(document).ready(function() { var html = "<div class='col-xs-12'>";…
jqueryanswered Marco Vinicius Soares Dalalba 1,232 -
1
votes1
answer351
viewsA: Take calculated values of two inputs and subtract for another input
As said in comment . toFixed(2) adding toFixed will round the value. Here follows the working code. $("#percentual1").change(function () { var valor = $("#valor").val(); var resultado1 = valor *…
-
0
votes1
answer117
viewsA: Responsive mouse events with canvas?
Removing height: 100%; width: 100%; It worked perfectly here var block = false; var context; var drawing; var rect; $(function() { context = $('#canvas')[0].getContext('2d'); drawing = false; rect =…
-
2
votes1
answer1898
viewsA: How to disable <option> according to <option Selected>?
I made some changes to the sample code and based on the response from André Albson I basically created a function to disable the primary dropdown elements, I removed the duplicate Ids.…
-
2
votes2
answers6514
viewsA: Mask in input field
I advise the use of the library https://igorescobar.github.io/jQuery-Mask-Plugin/ example below your use $(document).ready(function(){ $('.money').mask('000.000.000.000.000,00', {reverse: true});…
javascriptanswered Marco Vinicius Soares Dalalba 1,232 -
2
votes4
answers1467
viewsA: Show and hide div
I believe this way would meet your expectations, with an easy-to-understand code function teste(div){ $(".container > div").hide(); $('.' + div).show(); } <script…
-
2
votes4
answers3391
viewsA: Perform Jquery percentage calculation
It would be something like that $(document).ready(function(){ $("#percentual").change(function(){ var valor = $("#valor").val(); $("#resultado").val(valor * (parseInt($(this).val())/100)); }) })…