Posts by Bruno • 1,304 points
185 posts
-
0
votes1
answer81
viewsQ: Edit with modal and ajax does not return data
In the modal that I am creating, insert, I can consult the information of the table of the database, but in the edit part does not return the data in the form that I show to the user, but if put in…
-
-1
votes2
answers88
viewsQ: send 2 variables by url
Sending 2 variáveis for url: var http = false; http = new XMLHttpRequest(); function carrega(){ var nome = document.getElementById('CodigoUtente').value; var nomes =…
-
-1
votes1
answer76
viewsQ: Problems when passing variable by url in wordpress
I intend to pass a variable in the url in my wordpress project. I have the following form: <input type="text" id="CodigoUtente" name="CodigoUtente" placeholder="Digite número do utente" />…
-
0
votes0
answers303
viewsQ: Kyocera SNMP printer page count
I’m trying to create a script to enter my printer counts in the database. To create a file with the general total counts I use the following OIDs with the following command lines in Ubuntu: Total…
-
1
votes2
answers48
viewsA: Doubts with the insert
I came to the solution by creating two for, in the second and third insert, and making the insert_id in a array, like the countryside Responsavel and Contato of form: $nome = $_POST['nome'];…
-
0
votes1
answer39
viewsQ: Problems picking up the previous Insert id
Code to insert: $codigoutente = $_POST['codigoutente']; $codvalencia = $_POST['codvalencia']; $Responsavel = $_POST['Responsavel']; $Contato = $_POST['Contato']; for…
-
1
votes2
answers48
viewsQ: Doubts with the insert
I have a form to be inserted in three different tables: <form name="customer_details" method="POST" onsubmit="return form_validation()" >…
-
0
votes2
answers1617
viewsQ: Create input with fixed value
I intend to create a input to insert cell phone contacts. <h5> <strong>Contato</strong> </h5> <input type="text" id="Contato" name="Contato" value="351"…
-
0
votes1
answer151
viewsQ: Problems with python utf8 encoding
Error I get when running the script: I get this bug by its name ~ which returns from the mysql table. If the table ~ in the name does not give error, if you put the ~ get this error. my script: #!…
-
-1
votes1
answer89
viewsQ: UTF8 invalid codec in python
I’m using this code in the script: #! /usr/bin/env python # coding: utf8 import MySQLdb db = MySQLdb.connect(host="xxx.xxx.x.xx", user="xxxxx", passwd="xxxxxxx", db="xxxxxxx") cursor = db.cursor()…
-
2
votes2
answers493
viewsA: Typeerror: 'datetime.datetime' Object is not callable
Solution found. As Anderson Carlos Woss said in relation to the variable datetime, then flip this variable to a variable of the type date. Initial variable in datetime: date_now =…
-
1
votes2
answers493
viewsQ: Typeerror: 'datetime.datetime' Object is not callable
Python code to send sms only when the difference date of the query is equal to 7 days of the date of the current day. # -*- coding: utf-8 -*- import MySQLdb import pycurl import base64 import json…
-
1
votes1
answer29
viewsQ: Problems picking up data in previous record - Mysql
I have this query that returns the last record and the previous one: SELECT Colaborador FROM centrodb.Registolistagem LEFT OUTER JOIN centrodb.Registolistagem2 ON centrodb.Registolistagem2.IdLista =…
-
0
votes3
answers251
viewsQ: Force to fill in php input
I created a table with 2 input type radio, where one receives the value="Ok" and the other the value="Não Ok" and just ahead an observation column. $tabela1 .= '<td style="float:center">…
-
0
votes1
answer35
viewsQ: Condition that check the registration
I have to create a condition to verify the entry of a record. In that insertion I have dois inputs type radio, one with value="Ok" and another with value="Não Ok": $tabela1 .= '<td…
-
-3
votes1
answer108
viewsQ: Syntax error in print
code: # -*- coding: utf-8 -*- import MySQLdb db = MySQLdb.connect(host="xxx.xxx.x.xx", user="xxxxx", passwd="xxxxxxxx", db="xxxxxxx") cursor = db.cursor() cursor.execute("SELECT Dias, HoraConsulta,…
-
0
votes1
answer164
viewsQ: Save fields back to python variables
I made a query in mysql with python and show the result: cursor = db.cursor() cursor.execute("SELECT Dias, HoraConsulta, HoraSaida, nome, Consulta, centrodb.LocalConsulta.Descricao, Contato FROM…
-
4
votes2
answers1303
viewsQ: Require to mark at least 1 checkbox
I have a table that in each row has two checkbox options, yes and no, as shown in the image: Code to mount the table: $y = 0; while($rows_cursos = mysqli_fetch_array($resultado_cursos)) { $tabela1…
javascriptasked Bruno 1,304 -
0
votes1
answer56
viewsQ: Only send a product inside the email
I insert in 3 different tables and when the checkbox nay is different from empty send an email to the responsible. Everything is working correctly. I will show the code: $Carro = $_POST['Carro'];…
-
0
votes2
answers55
viewsA: Insert only the populated row in the table
I decided this way, but I don’t know if it’s best practice: if(isset($_POST['registar'])) { $Carro = $_POST['Carro']; for ($i=0;$i<count($_POST["Carro"]);$i++) { $car = $_POST['Carro'][$i];…
-
0
votes2
answers55
viewsQ: Insert only the populated row in the table
Table code: $j = 0; while($rows_cursos1 = mysqli_fetch_array($resultado_cursos1)) { $tabela2 .= '<tr>'; $tabela2 .= '<td> <input type="text" readonly="true" size="20" name= "Carro[]"…
-
3
votes1
answer956
viewsQ: Scale of shift services in php
I intend to create a monthly shift schedule. I’ve got four shifts: T.M = Morning shift (has 11 assistants this shift, but on each day break 3) T.T = Afternoon shift (has 5 assistants this shift, but…
-
0
votes1
answer568
viewsQ: Create table with days of the month
I’m creating a table with the days of each month in this way: <?php function nome_mes($num){ $mes = ''; switch ($num) { case 0: continue; case 1: $mes = "JANEIRO"; break; case 2: $mes =…
-
0
votes1
answer59
viewsA: Filter per period in Vb
I decided by formatting the date of the column that comes from the database and the variable @dtInicio, so I just changed the part of where of query as shown below: strsql = "...Where…
visual-basic-6answered Bruno 1,304 -
0
votes1
answer59
viewsQ: Filter per period in Vb
I created a period filter in Vb with the following code: Public Sub filtrar() Dim dtinicio As DateTime Dim dtfim As DateTime Dim tabela As New DataTable Dim strsql As String dtinicio =…
visual-basic-6asked Bruno 1,304 -
0
votes4
answers261
viewsA: Sequencia Fibonacci
Try this way. Write the Fibonacci sequence in Ruby: x, y = 0, 1 10.times do puts y x, y = y, x + y end Java: class Fib { public static void main (String args[]) { int x = 0; int y = 1; int total =…
-
0
votes1
answer295
viewsQ: Show value in a datetime-local type input
I have this code: $tabela5 .= '<td> <input type="datetime-local" name= "DataInicio" id= "DataInicio" value="'. date("Y-m-d H:i:s") .'"></td>'; But the input does not show the…
-
0
votes1
answer477
viewsQ: Send invitation for meeting with Phpmailer
When creating a new event on the calendar, automatically sends an email to the person responsible for that event with the information that a new event has been marked in this way: try { $bdd = new…
-
0
votes3
answers465
viewsA: Send email inside if com phpmailer
First inside my project folder I created a folder with the name phpmailer and inside that folder I put these two files: class.phpmailer.php and class.smtp.php, I downloaded on the site I leave at…
-
-2
votes3
answers465
viewsQ: Send email inside if com phpmailer
I have already created a folder inside my server phpmailer with the classes Phpmailer.php and SMTP.php. Now I have this code to insert into the database table: $data = isset($_POST["DataRegisto"]) ?…
-
1
votes2
answers744
viewsA: Background color on calendar specific days and times
With the help of Ricardo Pontual I managed to solve my problem as follows: $('#calendar').fullCalendar({ defaultView: 'agendaWeek', businessHours: [ // specify an array instead { dow: [ 2 ], //…
-
-1
votes1
answer38
viewsQ: Confirm before making the change
When I change the event on the calendar, before changing ask to confirm: the code: function edit(event){ start = event.start.format('YYYY-MM-DD HH:mm:ss'); if(event.end){ end =…
-
0
votes2
answers744
viewsQ: Background color on calendar specific days and times
I have this calendar as shown in the image: I intended every Tuesday from 2:30 to 5:30 and Thursday from 10:30 to 12:00 to appear with a different background color than the rest of the days. This is…
-
2
votes1
answer482
viewsQ: Place two tables next to a div
I have this code where creates two tables and a div and the tables are below the div: <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <div…
-
0
votes2
answers92
viewsQ: Allow to open only one div
Code to call the Divs: <input style="float: right;" class="botao1" onclick="addRisco()" value="Adicionar Risco"/> </td> </tr> </table> </fieldset> <div…
javascriptasked Bruno 1,304 -
3
votes0
answers253
viewsQ: Use Fullcalendar 3.9.0
I followed this tutorial to create my calendar: https://medium.com/@guimenegussi/criação-um-calend%C3%A1rio-de-eventos-din%C3%A2micos-com-php-ajax-e-fullcalendar-js-6cc21634b1a4 Then I downloaded…
-
0
votes1
answer40
viewsQ: Update the first input when inserting
I have this form: <form name="form1" class="teste" class="form-validate" id="feedback_form1"> <div class="campo"> <fieldset> <h1> <legend> <center>…
-
1
votes1
answer67
viewsQ: Dynamic combobox
I got these two selects: <td> <strong><label for="Valência">Valência</label></strong> <select id="Valencia" name="Valencia" style="width:150px">…
-
1
votes1
answer37
viewsQ: Assign value to input
I have this code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script…
-
0
votes1
answer309
viewsQ: Filter with select in php
I have this code with the 3 selects to filter a query: <form class="shadowbox6" action="" method="post"> <strong><label for="Estado Encomenda">Estado…
-
1
votes1
answer104
viewsQ: create a select within while
I have this consultation: while($rows_cursos = mysqli_fetch_array($resultado_cursos)) { $tabela1 .= '<tr>'; $tabela1 .= '<td style="font-size:…
-
0
votes1
answer447
viewsQ: System.Runtime.Interopservices.Comexception (0x800A175D) error
After filling in the data when I click to generate the pedf I get this error message as shown in the image: If you do the same process on another company pc works, on this computer gives this error,…
visual-studio-2015asked Bruno 1,304 -
1
votes3
answers74
viewsQ: Just clear the field I want
have this script: $(".btn_contact").click(function () { $.ajax({ type: "POST", url: "./Inserir16", data: $("#feedback_form16").serialize(), // serializes the form's elements. dataType: "json",…
-
1
votes2
answers49
viewsQ: Does not return the table
have the page php consumption. where I have the menu: <nav class="menu"> <ul class="menu-list"> <li><a href="#">Registos</a> <ul class="sub-menu"> <li><a…
-
3
votes3
answers67
viewsQ: Insert into database table with second form
I have this menu: <nav class="menu"> <ul class="menu-list"> <li><a href="#">Produtos de Higiene</a> <ul class="sub-menu"> <li><a…
-
0
votes1
answer48
viewsQ: Does not call the form when clicking on the submenu
I have the following menu with submenu: <nav class="menu"> <ul class="menu-list"> <li><a href="#">Produtos de Higiene</a> <ul class="sub-menu"> <li><a…
-
1
votes1
answer46
viewsQ: create menu instead of select to change form
I have several forms inside the same page this way: <section class="hide-section" id="produto_1"> <form class="form-validate" id="feedback_form"> <div class="campo">…
-
-1
votes1
answer3295
viewsQ: Changing the language of osticket
I installed osticket on a virtual machine with Ubuntu server 16.04, where everything is working properly. the language is in English as shown in the image: Now I intend to change the language of…
installationasked Bruno 1,304 -
2
votes1
answer265
viewsQ: Shows wrong date
I have this script: <SCRIPT LANGUAGE="JAVASCRIPT"> <!-- var now = new Date(); var mName = now.getMonth() +1 ; var dName = now.getDay() +2; var dayNr = now.getDate() +1; var…
javascriptasked Bruno 1,304 -
2
votes5
answers889
viewsQ: Automatically delete inputs later
I have this code to send data by POST method, but then does not clean inputs:: <script type="text/javascript"> $(".btn_contact").click(function () { $.ajax({ type: "POST", url: "./inserir",…