Posts by DiegoSantos • 1,004 points
60 posts
-
1
votes0
answers29
viewsQ: Word Web Add-in - Footer content alignment
Hello! I am developing an add-in for Word, following the template in visual studio. Today, with the code to follow, I have the result almost finalized. However, in Footer, I can not in any way (of…
-
13
votes1
answer1859
viewsQ: Reasons to use private class
When I started in the area, in a course of POO (Object Oriented Programming) the teacher explained about access modifiers... I remember that on this very day he said that it would be possible to…
-
3
votes2
answers83
viewsA: Why does background-color only work with overflow:Hidden?
The problem is not the overflow. The problem is that your ul has no height. She gets the color but can’t see... Behold: ul { list-style-type: none; margin: 0; padding: 0; height:40px;…
cssanswered DiegoSantos 1,004 -
0
votes2
answers2761
viewsA: JS Error: Uncaught Typeerror: Cannot read Property 'addeventlistener' of null
In the import of your script: <script type="text/javascript" src="teste.js"></script> Switch to: <script type="text/javascript" src="teste.js" async></script> Motive: Your js…
-
1
votes3
answers5235
viewsA: pass 2 parameters in button Onclick event
I suggest this way: var btns = { gravar: document.getElementById('btn-gravar'), ler: document.getElementById('btn-ler') }; var txts = ['txtCodEmpreendedor1', 'txtCodEmpreendedor2']; var val = [];…
-
0
votes1
answer34
viewsA: Two Ajax Form on a single page with multiple items
Example Suggestion: $(document).ready(function() { $("form").submit(function(event ) { event.preventDefault(); //Captura o elemento que sofreu o evento de "submit" const formDetails = $(this); var…
-
0
votes2
answers56
viewsA: PHP - Javascript
Main difference PHP: Language running on the server. JS: Language running on the customer. In your example, if you had 1 million records, you would download all this content to the client’s machine…
-
1
votes2
answers2109
viewsA: Update with the SET of another table
Try this way: UPDATE PCPSEQPROC_001 SET PCPSEQPROC.ID_PCPSEQPROC = PCPSEQ.ID_PCPSEQ FROM PCPSEQPROC_001 AS PCPSEQPROC INNER JOIN PCPSEQ_001 PCPSEQ ON PCPSEQ.PRODUTO = PCPSEQPROC.PRODUTO WHERE…
-
1
votes4
answers2605
viewsA: Breakpoint in visual studio does not load at debug
Try this way: Right click on break point, then click on "Conditions" Click on the link right after "Location:" Enable the checkbox "Allow the source code to be Different from the original". Maybe…
-
1
votes2
answers254
viewsA: Items in levels within an HTML Combobox. Is it Possible?
Reference: https://www.w3schools.com/tags/tag_optgroup.asp <select> <optgroup label="Swedish Cars"> <option value="volvo">Volvo</option> <option…
-
1
votes0
answers29
viewsQ: Performance - Helpers
I have seen several times programmers adhering to the helper in the view, instead of html. I agree that there are cases where you actually "save characters" using them, but, and with respect to…
-
0
votes4
answers95
viewsA: Optimization in sql
Here’s an example with Pivot, see if it fits your case: Script Pivot: SELECT p.nome, p.cor, p.tamanho FROM ( select p.nome, a.atributo, a.valor from #produto p inner join #atributos a on p.id =…
-
2
votes5
answers1659
viewsA: What is the best way to pass data between php files
Well, from what I understand, you’re using MVC (maybe changing the name of DAO). Following this premise, it is OK to create several controllers in the controllers folder. Actually, this is the idea.…
-
1
votes2
answers1242
viewsA: get return from sql c#
Example: string constr = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; using (SqlConnection con = new SqlConnection(constr)) { using (SqlCommand cmd = new…
-
0
votes3
answers51
viewsA: Check if phone field is equal
Using your example... $('[name="telc2"]').blur(function () { ValidacaoTelefone(); }); function ValidacaoTelefone() { var telefone1 = $('[name="telc1"]').val(); var telefone2 =…
jqueryanswered DiegoSantos 1,004 -
4
votes3
answers61
viewsA: How to capture background value: url('URL') using jQuery?
Reference: https://stackoverflow.com/questions/8809876/can-i-get-divs-background-image-url var urlFoto = $("#1 > .chatImageUser").css('background-image'); urlFoto =…
jqueryanswered DiegoSantos 1,004 -
4
votes2
answers490
viewsA: Organization of PHP code
As we know, there are several ways of organizing scripts in a project. All of them have positive and other negative points when faced with the need. I will cite below ways in which I have seen and…
-
0
votes1
answer369
viewsA: Pass the id of an element as a parameter to a function?
If I understand correctly, this code (explicit, with native js) will help you. Run, and click the result tds. The Id will appear on the console. var funcao = function(e){ console.log(e.target.id); }…
-
0
votes4
answers2255
viewsA: Changing CSS by class in Javascript, is it possible?
If I understand correctly, it helps! var divId = document.getElementById('div1'); var divClass = document.getElementsByClassName('div-class'); var divElement = document.getElementsByTagName('div');…
-
1
votes2
answers11323
viewsA: View data from a Json file in HTML
Note that it is a very simple example and can be used in several ways... var json = { person: [ { "author": "Nobtaka Nukui", "title": "Want people to use your product? Use it yourself", "url":…
-
1
votes2
answers5957
viewsA: Print HTML page keeping the page CSS
Take the example you asked for. Note: If it doesn’t work here in the stack, take the code and put it in a local html. It will work... @media print{ table tbody tr:nth-child(2n+1){ background: #CCC;…
-
0
votes2
answers765
viewsA: Update PHP function every second
So directly, as the function you want is on the back, it will not be possible. To solve, you can put this function to execute a separate script and call with an ajax. For example (or something like…
-
-1
votes3
answers152
viewsA: Use Session or use database?
Look, I’ll be brief. I believe it should be stored on a server anyway. If you store it in the bank, you may run the risk, depending on some variables, of the Dead lock occurring in the bank.…
phpanswered DiegoSantos 1,004 -
2
votes1
answer565
viewsA: How to not let a CSS Animation stop even after the mouse has left the element
Follow an example, as requested... $(function(){ $('#box').on('mouseover', function(){ var mv = $(this); mv.addClass('box'); setTimeout(function(){ mv.removeClass('box') }, 1000) }) }); html, body {…
-
1
votes2
answers155
viewsA: Div does not track internal bootstrap content 4
I don’t know if I got it right, but that’s about it? html, body { height: 100%; } body { background: linear-gradient(50deg,#6c757d,#dee2e6); background-attachment: fixed; font-family:…
-
1
votes0
answers27
viewsQ: Use of Directives to create almost everything
I worked a few days ago on a project where we used angular 1.*. The case is that, each table that we created on screen, or any element with data and a certain complexity, was created a directive for…
-
1
votes1
answer3217
viewsA: Side div with 100% height with Bootstrap 4
You see, I was able to play the 100% heigth, but I had to move some classes. It might help you, but I recommend revising the structure of your HTML. Maybe by putting the menu out of the container.…
-
0
votes2
answers214
viewsA: Set dynamic height for div with javascript
Look, I don’t think you need to use js for that. I’ve had problems with this before... The case is that the 100% height refers to the parent element, which in this case, has no height defined and…
-
1
votes1
answer75
viewsA: Hide td nulla in JAVASCRIPT print
Well, I can make a suggestion. When you don’t have to show, set a custom class to class="nao-mostrar", shouldn’t be a problem in . js. Create the following in a css: @media print { *{ visibility:…
-
0
votes5
answers3553
viewsA: Only get a part of a url
Try it like this, and see if it fits: window.location.search
javascriptanswered DiegoSantos 1,004 -
0
votes2
answers84
viewsA: Ways of connection in ASP . NET
Look, in fact, in the examples you gave ADO is the only way to connect to the bank. The others are ORM’s or micro ORM’s, etc. Both will use ADO to connect to the bank. Orms convert bank results into…
-
0
votes1
answer70
viewsA: Sqlite Android, 2 apps accessing a database
I’m not sure I understand your question, but if you created the bank on a smartphone, another one probably won’t have access. What you should do in this case is create a web service with a cloud…
-
1
votes1
answer91
viewsA: Error using include
From what I understand, you can’t give a include by passing parameters. When you give a include it looks for a file on the server and does not run it as if it were on the web. That’s why you won’t…
phpanswered DiegoSantos 1,004 -
1
votes2
answers77
viewsA: distinct use in a dropdownlist
You can’t solve this just in the query? select Id, NomeProduto from Compra c group by Id, NomeProduto order by NomeProduto Note: You may need to adjust the field of your Id...…
-
2
votes2
answers1419
viewsA: Create and assign loop variables For
var elems = Array.prototype.slice.call(document.getElementsByTagName('p')); console.log(NaN); elems.forEach(function(elem){ …
-
1
votes1
answer116
viewsA: Why does each browser interpret/format a poorly formatted HTML differently than the others?
Each browser has its own engine, which interprets HTML, Javascript, Css. The bad thing about this (or not) is that every browser will / may present your site in a different way. This mistake you…
-
0
votes2
answers179
viewsA: How to calculate the total value in a dynamically created table?
It is not the same as yours, as I do not have your data I can not simulate. But follows... $(function(){ var total = 0; $('.valor-total').each(function () { total += parseInt($(this).text()); });…
-
1
votes1
answer1857
viewsA: Create JSON with javascript
So resolves? var imdb = { "title": "Justice League", "content_rating": "PG-13", "original_title": "", "metadata": { "languages": [ "English" ], "asp_retio": "1.85 : 1", "filming_locations": […
-
1
votes1
answer25
viewsA: Media Queries messing up the site
Executes the code below and changes the resolution of your page (You can change the width of the window) Note: It may not work here in the stack. Copy and put in the file on your machine. Just…
-
1
votes1
answer94
viewsQ: Mongodb in Azure
A while ago I had an unpleasant surprise on my Azure invoice on account of a Mongodb database that I owned for access to an application. I created, for example, the documents: Client Product Request…
-
1
votes2
answers67
viewsA: Error taking the specific value of a dynamically created input within an html table
$('.btnInsere').on("click", function () { var _id = $(this).parent().parent().find('td:eq(0) input').val(); alert(_id) }); <script…
-
3
votes2
answers179
viewsQ: Why can’t I assign a list of a more specific type than the declared type?
I have this class example: public class User : APerson { private string _userName; [DataMember] public virtual string UserName { get { return _userName; } set { if (string.IsNullOrWhiteSpace(value))…
-
3
votes1
answer5289
viewsA: How to verify that all fields with `required` were filled with form.Ubmit()?
Dude, if you just mess with the form tag, depending on the browser, it already validates. Give one executed in the code below. If you have any questions, tell me which complement with a js to…
-
0
votes5
answers1319
viewsA: Insert "X" value after some characters
$('input').on('blur', function(e){ var txt = e.target.value.split(''); var aux = ""; var i=0; txt.forEach(function(value,…
-
1
votes1
answer57
viewsA: Form with automatic save
Can you reuse that code? $('button').on('click', function(btn){ console.log(btn.target.getAttribute('data-value')) $.ajax({ url: 'url', data: {aba: btn.target.getAttribute('data-value')} type:…
-
2
votes3
answers385
viewsA: Center a circular div within another div
.conteudo-externo{ width:200px; height:200px; z-index:3; background:#ff1; float:left; } .conteudo{ …
-
0
votes2
answers427
viewsA: Difficulty creating summation column in mysql
If I understand the question correctly just use the following query and change for your use: select sum(a.vl_comis + a.ir_comis) as total_valor_bruto If that’s not the answer, explain it to me a…
-
0
votes2
answers1091
views -
3
votes2
answers124
viewsA: Is there a 'native' way of the <form> tag to identify changing the original state of a form?
I’m not sure, but you can try the event onChange. If it doesn’t work out, you can use the onChange us input. Behold Look at the example: <script> function myfunction(f){ alert(f) }…
-
1
votes0
answers39
viewsQ: Construtores Estáticos
Why can’t I declare a static constructor function? Is there any problem with context?
c#asked DiegoSantos 1,004