Posts by V.Avancini • 496 points
41 posts
-
-1
votes1
answer37
viewsQ: Number of elements in ndarray vector
I have the following function to count how many "player" appear in the array estado[i], which is a line of a matrix: for i in range (0, len(estado)): if (estado[i].count(jogador) == len(estado)):…
-
0
votes2
answers38
viewsA: Comparison of content in matrices
I used the following solution: for i in range (0, len(tab)): if (tab[i].count('X') == len(tab)): print (i) Basically this code checks if the amount of "X" in the vector is equal to the size of the…
-
0
votes2
answers38
viewsQ: Comparison of content in matrices
Have some python solution to use something similar to np.all in arrays that are filled with strings or ints? Below an example of what I wish, perform the comparison of a row of the matrix to verify…
-
1
votes1
answer63
viewsQ: Could a Web system be considered as software?
The question is whether a web system could be considered software. What are the definitions of the web system? What are the definitions of software? And what is the threshold between them?
-
0
votes1
answer384
viewsQ: Dropdown menu does not appear - Laravel Project
I made a layout in which I want to put a navbar where I want to put a dropdown, but the dropdown menu does not appear, only the button is there... I tried to put Jquery but it didn’t work, follow…
-
1
votes2
answers52
viewsA: Inner Join does not work - Error 1054
Select mensagem.mnsg, aluno.nome as nomea, turma.curso as cursoa From mensagem Inner join aluno on aluno.rm=mensagem.RM Inner join turma on turma.Turma_ID = mensagem.Turma_ID Order by id asc; You…
mysqlanswered V.Avancini 496 -
0
votes1
answer90
viewsQ: Calculation of Javascript rows and columns for PDF
I need to understand this section of js code that is responsible for calculating the positioning of rows and columns, from a html table, to PDF.…
-
0
votes1
answer251
viewsQ: Multi-line jsPDF header
I need to generate pdf from a table, only my header has several lines and my code is overlapping those lines, follow picture: I need each tr to be in a different line, as it would be possible? var…
-
1
votes0
answers1260
viewsQ: Normalisation of data in R
I’m trying to normalize the data and give the following error: Error in if (colSd != 0) res[, i] <- (x[, i] - colMean)/colSd else res[, : missing value where TRUE/FALSE needed the code in R is…
-
5
votes1
answer106
viewsQ: Only positive numbers in SUM aggregation
In this consultation, in ,SUM(quota_re_mes1) AS NO_MES i would like it to add up only the positive numbers, is there any way to do that? SELECT orcdotac.conta_desp ,orcplade.descricao…
sql-serverasked V.Avancini 496 -
1
votes1
answer32
viewsQ: Problem storing HTML combobox label
I have the following HTML combobox: var concelhos = $('select[name="Concelho"] option'); $('select[name="Distrito"]').on('change', function () { var Distrito = this.value; var novoSelect =…
-
6
votes2
answers9028
viewsQ: Insert character in a specific position
Problem How to insert a character in a specific position? Example In my case in the fourth character str = 30000000 gostaria que ela ficasse assim: 3000.0000…
phpasked V.Avancini 496 -
1
votes2
answers143
viewsA: Concatenate the field and group the rest
I ended up solving the problem through PHP, as I would display in a table in a browser able to use some artifacts, I did as follows: $linha = sqlsrv_fetch_array($resultado); $data =…
-
2
votes2
answers143
viewsQ: Concatenate the field and group the rest
I have the following query: SELECT finempe.data_empenho , finempe.num_empenho , finhisem.quantidade , finhisem.historico , finhisem.valor , finhisem.valor_total FROM finempe RIGHT JOIN finhisem ON…
-
0
votes1
answer395
viewsQ: Consider NULL as 0
In the following query I need the transaction value to be considered as 0 when it is NULL in the highlighted aggregation, how can it be done? I tried using isnull but it didn’t work SELECT…
-
0
votes2
answers1317
viewsA: Turn rows into SQL columns
I used the tips given in the post and arrived at the following answer: SELECT num_empenho AS EMP, data_empenho AS DATA, nome_fornecedor AS FORNECEDOR, valor_empenhado AS EMPENHADO, valor_anulado AS…
-
0
votes2
answers1317
viewsQ: Turn rows into SQL columns
I have the following Query: SELECT distinct finmovem.num_transacao ,finempe.codigo_orgao ,finempe.cod_reduzido ,finempe.num_empenho ,finempe.data_empenho ,finempe.nome_fornecedor…
-
3
votes1
answer31
viewsQ: Dynamic checkbox with unwanted behavior
I have these checkboxes, the idea is to be dynamic, appear only the organs that refer to the entity, but has a detail that I would like to correct: before selecting something in "Entity" all options…
-
1
votes2
answers211
viewsQ: Select only tuples from a table with JOIN
I have the following query: SELECT finpag.cod_forn ,sicforn.nome ,finpag.data_pagto ,finempe.cod_reduzido ,finpag.num_empenho ,finpag.ano_empenho ,num_liquid ,ano_liquid ,valor_transacao FROM finpag…
sql-serverasked V.Avancini 496 -
-1
votes1
answer100
viewsQ: CSS does not load with $_SESSION
I load the CSS this way: <link href="../css/style.css" rel="stylesheet"> But I’d like to give you a different reference, something like: <link href="<?php echo…
-
0
votes1
answer2100
viewsQ: Include in file with include
I own a file that makes one include from a file, which is in a different folder, which in turn makes another include from another file which is also in a different folder. This is the include:…
phpasked V.Avancini 496 -
1
votes2
answers3112
viewsQ: Include in previous folder
I have the following include: include('../header.php'); on the pages that are the same folder as the include header works, but when there is a folder above it doesn’t work. The include page is…
phpasked V.Avancini 496 -
1
votes1
answer137
viewsQ: Combine SQL queries with different columns
I have the following queries, Q1: SELECT finempe.codigo_orgao ,finempe.cod_reduzido ,finempe.num_empenho ,finempe.data_empenho ,finempe.nome_fornecedor ,finempe.valor_empenhado…
sql-serverasked V.Avancini 496 -
0
votes0
answers31
viewsQ: First line access of a query without sqlsrv_fecth_array
I have a query and would like to access the first line without using sqlsrv_fetch_array, because this function already jumps to the next line and I would not like it to occur. $resultado =…
phpasked V.Avancini 496 -
0
votes2
answers893
viewsQ: Retrieve label value from select HTML
I have the following select: <span class="IWLABEL11CSS" id="IWLABEL7">Órgão: </span> <select name="Distrito" size="1" width="180" class="COMBODISTCSS" id="COMBOFAB" tabindex="1">…
-
0
votes1
answer170
viewsQ: Accept only specific numbers in an input
I have the following input: Conta Despesa: <input type="number" name="cod_reduzido"> However, it should only accept specific numbers (there are 30 numbers that are not in sequence, such as:…
-
0
votes0
answers11
viewsQ: Refactor variable only in file
I want to refactor a variable only in the current file, when refactor it changes on all pages of the project, how to do?
netbeansasked V.Avancini 496 -
0
votes2
answers223
viewsA: How to convert a Datetime object to string?
with a brief search I found the following solution: <td align = "center"> <?php echo date_format($linha["data_pagto"], 'd/m/y');?> </td>
-
0
votes2
answers223
viewsQ: How to convert a Datetime object to string?
I need to convert a Datetime to a string, I have the following error: Catchable fatal error: Object of class Datetime could not be converted to string. I print in a column of an HTML table like…
-
0
votes1
answer27
viewsQ: Reuse JS code from a bootstrap-datepicker
I have a bootstrap-datepicker with the following JS: $(document).ready(function() { var dataIni = $("#calendarioIni"); var dataFim = $("#calendarioFim"); $('#calendarioIni').datepicker({ startDate:…
javascriptasked V.Avancini 496 -
1
votes1
answer35
viewsQ: Appear table after filling fields and press button
I have the following table: <table width="100%" class="table table-bordered table-hover table-responsive table-striped" id="empenho_solicitante"> <thead> <tr>…
-
0
votes0
answers40
viewsQ: Select chained HTML does not work properly
I have the following select in html <span class="IWLABEL11CSS" id="IWLABEL7">Órgão: </span> <select name="Distrito" size="1" width="180" class="COMBODISTCSS" id="COMBOFAB"…
-
2
votes3
answers657
viewsQ: Changing the pointer on a bootstrap-datepicker
I own a bootstrap-datepicker, when I place the mouse on top of the calendar on the day or on the month navigator the pointer that appears is that of selection, similar to I, but I wish it was the…
-
3
votes5
answers545
viewsQ: Different format for display and return (bootstrap-datepicker)
I have the following calendar: Início do período: <input type="text" id="calendarioIni" name="dataInicio"> $(document).ready(function() { var dataIni =…
-
2
votes1
answer33
viewsA: Store a query attribute in a variable
After a brief search I found the following solution: $linha = sqlsrv_fetch_array($resultado); $unidade = $linha["descr"];
-
1
votes1
answer33
viewsQ: Store a query attribute in a variable
I have the following consultation: <?php define("DATABASE_MS_DB_98", "Cont98"); $conninfo98 = array("Database" => DATABASE_MS_DB_98, "UID" => USER_MS_DB, "PWD" => PASS_MS_DB,…
-
0
votes4
answers1914
viewsQ: Show table on page after clicking a button
I have the following table: <table width="100%" class="table table-bordered table-hover table-responsive table-striped" id="empenho_solicitante"> <thead> <tr> <th…
-
1
votes3
answers1297
viewsQ: Datepicker does not apply changes made
I’m using the bootstrap datepicker, but when I make some modifications they don’t apply var defaults = $.fn.datepicker.defaults = { autoclose: false, beforeShowDay: $.noop, calendarWeeks: false,…
-
0
votes1
answer1239
viewsQ: Change date that appears on a datepicker
I have the following datepicker: var dataIni = document.querySelector("#calendarioIni"); var dataFim = document.querySelector("#calendarioFim"); function checaVazio(){ var botao =…
-
1
votes2
answers662
viewsQ: Appear button after filling two fields
I have 2 date fields and I will use these dates in a select and I would like a "query" button to appear only when the two fields are filled, follow the current code: <form method="post"…
-
0
votes1
answer6946
viewsQ: Take HTML input value and move to PHP variable
I have this input: <p>Início do período:</p> <input type="text" id="calendario"> <script> var start = new Date(1997, 12, 01); var end = new Date(1998, 11, 31) ;…