Posts by Miguel Silva • 491 points
59 posts
-
-1
votes1
answer57
viewsQ: Replace multiiplas words with a
I would like to replace multiple words with a single for example: This is what I tried, here only the first occurrence is changed var replaceGN = "Gênesis" var str = "Este é o livro de GEN, Gn é o…
-
1
votes1
answer64
viewsQ: Header fixed over subtitle by clicking on a content index anchor
I have a fixed header at the top of the page, which calls a index, this index allows you to navigate the text using anchor, the point is that when I click on an item of the index, navigate to the…
-
0
votes2
answers239
viewsA: Checklist using checkbox, javascript and Localstorage
function checkItem(item) { var check1status = document.getElementById(item).checked; localStorage.setItem(item, check1status);…
-
0
votes2
answers239
viewsQ: Checklist using checkbox, javascript and Localstorage
I have this simple Checklist that I created, using checkbox, javascript and Localstorage It’s working, but how to make it more practical and more lean? function check1() { var check1status =…
-
1
votes1
answer274
viewsA: How to make Select from all table ids except the first 2?
If you are using PHP you can create a query that returns the -2(first two lines) amount of record and use the value obtained to call the results, except the first two lines Edited Response <?php…
-
0
votes1
answer35
viewsA: Graph bars in red when value below the stipulated average
Response based on this link: https://stackoverflow.com/a/40720444/5675325 google.charts.load('current', { callback: drawChart, packages: ['corechart'] }); function drawChart() { var data =…
-
-1
votes1
answer123
viewsQ: Replace input text field by button maintaining filter functionality in Javascript
I found this javascript filter that is working and very well, but it is a text type input, and I would like to convert the input into hrefs links, but I haven’t been able to yet How is it:…
-
0
votes1
answer463
viewsQ: Wrong sequence MYSQL line numbering
Simply put, I have two tables, perguntas and respostas, for each pergunta 4 or more respostas, turns out I’m not getting numerar as linhas correctly when grouped by questions. My result: | linha |…
mysqlasked Miguel Silva 491 -
0
votes1
answer35
viewsQ: Graph bars in red when value below the stipulated average
I use this script to generate average graph of questions, how to make the bars change color (red for example) when the media is less than 8 (for example) <script type="text/javascript">…
-
3
votes1
answer131
viewsQ: Column for Mysql row
I have the following table: | Roll No | Student Name | Q1 | Q2 | Q3 | |--------------|--------------|--------|------|------| | 1 | Aluno 1 | 1 | 1 | 1 | | 2 | Aluno 2 | 1 | 1 | 0 | | 3 | Aluno 3 | 1…
-
0
votes2
answers529
viewsQ: Avoid double quotes in CSV file exported with PHP
It is possible to prevent the file CSV come with aspas duplas in string fields, I am using the script below, but the field nome is coming between aspas duplas, how can I avoid this? <?php…
-
0
votes2
answers106
viewsQ: Background image is not replicated on other pages when using onChange function
Staff I am trying to select a background image according to selected option in a function onChange, but it turns out that it (the image) is only applied on the first page if I NÃO use the function…
-
0
votes1
answer88
viewsQ: Help with onchange function
I’m trying to use the function onchange, I can even pick up the value, but I can’t make use of the value obtained, Follow the code: function myFunction() { var x =…
-
0
votes1
answer54
viewsA: Adjust elements on an image
I managed to solve, follow the complete solution, including logic: <?php // definições de host, database, usuário e senha $host = "localhost"; $db = "simrede"; $user = "root"; $pass = ""; //…
-
-1
votes1
answer54
viewsQ: Adjust elements on an image
I’m developing a generator formulário de resposta I need to adjust the elements (black circles) using css, but I’m not succeeding, I tried with the property of position but unsuccessfully the tebela…
-
0
votes1
answer55
viewsQ: Linux Package . TAR Autoinstallable
I am following this procedure to create a file compactado autoexecutável but I’m not succeeding, something is missing? Compact the files to pacote.tar.gz I create file pacote.sh with the following…
-
0
votes1
answer235
viewsQ: Prevent images from being cropped between pages when generating PDF of an html
How can I avoid an image of a particular page that saved as PDF be cut. as in the example below: The file is generated using the command print javascript:window.print() Follow my html code:…
-
1
votes1
answer114
viewsQ: Export password protected csv from a DB
It is possible to generate a file CSV protegido por Senha from a banco MySql using PHP? the password is to open the file in the client. I use this PHP script to generate the CSV file: <?php…
-
1
votes2
answers5048
viewsA: Run . BAT in the background on Windows startup
In my case I did the following: I created a script in .vbs with the following content and add in Startup to start on logon: set objSh = CreateObject("WScript.Shell") objSh.Run "cmd /k…
-
0
votes2
answers5048
viewsQ: Run . BAT in the background on Windows startup
How can I run this BAT script in the background or invisible or without window? I added .bat in Startup, it shows the terminal running, but I don’t want to show any window, I’ve used conversion tool…
-
0
votes2
answers34
viewsQ: Adjust query sql according to available discipline
I have this query, working well, but it only works if I have data for the two disciplines PORTUGUES and MATEMATICA, how can I do so that, without harming the result, regardless of there being only…
mysqlasked Miguel Silva 491 -
1
votes1
answer182
viewsQ: How to cover this connection and code with DB for PDO with charset utf-8?
My question was not clear, I edited the title, it seemed only about UTF-8, but it is not, it is a connection and query conversion to PDO with UTF-8 <?php //export.php if(isset($_POST["export"]))…
-
0
votes1
answer265
viewsQ: Export DB table in csv format with columns separated by semicolons
I can already export in CSV, but the columns are coming apart by vírgula, how to make them come apart by ponto e vírgula? My code: <?php //export.php if(isset($_POST["export"])) { $connect =…
-
0
votes1
answer83
viewsQ: How to save an array to separate lines in DB
How can I send a textarea containing multiple names, one per line, so that each line is a record in the database? in addition also to each line receive the amount sent per school and class, I am…
-
0
votes1
answer202
viewsA: Help with GROUP_CONCAT (Mysql)
I decided to make two views, one for perguntas and another to respostas, then just select the two by doing Join, and using the group-concat for answer and filename, worked perfectly, follows fiddle…
-
2
votes1
answer202
viewsQ: Help with GROUP_CONCAT (Mysql)
I’d like to use a grupo_concat for filename and answer but not to repeat the values of filename and answer Follows sqlfiddle: http://sqlfiddle.com/#! 9/f32d78/1/0 It is a question that has 2 images…
-
0
votes2
answers115
viewsA: Replace with variable - mysql
I did the following, I make the consultation using group_concat of the values I wish to replace others' to get them concatenated separated by commas. I use the Replace and Substring_index for, at…
-
0
votes2
answers115
viewsQ: Replace with variable - mysql
How can I do Replace using a variable? A certain variável receives values from a query, so I need to make a Replace in a given column, with the obtained values ,how can I do this? follows example in…
-
0
votes2
answers842
viewsQ: Sharp word problem from Mysql database
I’m using this query to show data coming from a Moodle database, but the words that have accents are shown with a query, I’ve used two types of charset utf-8 and ISO-8859-1 but the error continues,…
-
1
votes1
answer79
viewsQ: Help in joining these two Mysql queries
I found the option UNION ALL but the results are shown one below of the other, I would like you to create a column for each discipline I have these two queries and I would like to put them together,…
mysqlasked Miguel Silva 491 -
1
votes4
answers1088
viewsQ: Add Word Links to a Text
On an html page how to make the words of the text be converted into links? so that when clicking on a given word, open the google page with the word translation. For example, in this sentence: "The…
-
1
votes3
answers458
viewsQ: Javascript check broken links
It is possible to check broken links in an html file using javascript and if it is broken flag with different color, or to signal links that are not broken with a specific color as when they are…
javascriptasked Miguel Silva 491 -
1
votes1
answer114
viewsQ: Prevent values from some columns from being repeated, Mysql
I have the following Mysql query, the results are shown as in the image below, I would like the values of the columns not to be repeated Aluno and NotaGeral based on the column Usuario which is a…
mysqlasked Miguel Silva 491 -
1
votes1
answer48
viewsQ: Zipping folder except a subdirectory
To zip a folder in the Linux use the command below. zip -r arquivoZipado.zip pastaSerZipada/ How can I zip, except for a subdirectory of pastureSerZipada?…
-
1
votes1
answer76
viewsQ: Add via app command line in "Login Applications"
How do I add an app to "Initial Apps for Session" via terminal in the Ubuntu?
-
2
votes2
answers11993
viewsQ: Break line in link text with &text
How to perform a line break after the word inicial <a>https://web.whatsapp.com/send?phone=seu-numero&text=Mensagem Inicial</a>
htmlasked Miguel Silva 491 -
-2
votes2
answers959
viewsQ: Check whether mobile or desktop
I would like to check if the user is accessing the site by mobile or desktop, how can I do this? for example: if (typeof window.orientation !== 'undefined') { <a…
-
0
votes1
answer79
viewsQ: Add size column (Mb) in php script that lists directory files
This php script lists files in directory, would like to add the file size column in Mb, but am not succeeding, follow script: <?php $path = "arquivos/"; // Título echo "<h2>Lista de…
-
0
votes1
answer1554
viewsQ: List directory files in a table using php
I have this php and html code that lists files from a folder, but I would like to put the results in a table, but for each row is being repeated the column title, Directoryiterator managed to solve,…
-
0
votes1
answer648
viewsQ: Sed - delete text from a position until the beginning of the file
I have this command that erases from a position until the end of the file, but how to delete from this position to the beginning of the file? sed -i '/Enviar mailBlogThis/,$d' *.txt…
sedasked Miguel Silva 491 -
1
votes1
answer101
viewsQ: Command to Check if a software is installed on Ubuntu
Script that checks if a software is installed on Ubuntu. If installed, continue with the command sequence. if you do not ask if the user wants to install it anyway Example: if (programa1=Instalado,…
shell-scriptasked Miguel Silva 491 -
0
votes2
answers95
viewsQ: Display alert in case of no record found - Ireport
How to make Ireport send only one alert in case of no record found? Currently, is with a }else{ echo "Nenhum dado encontrado!!!"; so I get a page like this, I would like to get just an alert, not…
-
-1
votes1
answer544
viewsQ: Github with automatic user and password
How to make git memorize user and password, so you don’t have to type every time you upgrade to a project?
githubasked Miguel Silva 491 -
1
votes1
answer113
viewsQ: Add value at the beginning and end of a mysql string
How to add text at the beginning and end of a string? For example, I would like to add <p style="display:inline;"> at the beginning and </p> at the end of all rows in the column answer…
-
0
votes1
answer781
viewsQ: Javascript does not work in Webview
I have this simple search engine, works on all browsers, even on android Chrome, but does not work on Webviews, any suggestion of what might be and if there is any other compatible code that can…
-
0
votes1
answer21
viewsQ: Function that opens a given address by adding input value
I have an input and would like to click Search or enter to open a certain address by adding the input value: Example <form align="center" method="GET"> <input type="text" placeholder="Faça…
-
1
votes2
answers408
viewsQ: Search result open in new tab
I have a simple search engine that does the search in html itself, how can I make the search results be shown in a new tab? <input type="text" placeholder="Digite sua pergunta" autofocus…
-
0
votes0
answers123
viewsQ: Terminate ssh remote connection
I have the following script that opens a remote connection on the terminal: xterm -e ssh -t user@IP -p porta "cd pasta && bash script.sh && exit ; bash" How to get the connection…
-
1
votes1
answer1573
viewsQ: Open this window.open in a centralized window
I have the following script that takes all links from a page and opens in a window, how can I open the result in a centralized window? javascript: var w = window.open('', '', 'height=800,…
javascriptasked Miguel Silva 491 -
1
votes3
answers99
viewsQ: Run Shell Script by checking the 32bit or 64bit system architecture
How can I make a script that checks the system architecture and so it would execute the commands for the appropriate architecture, for example: if 32bit; then comandos para 32 bits else comandos…
shell-scriptasked Miguel Silva 491