Posts by Laércio Lopes • 4,352 points
169 posts
-
3
votes2
answers13376
viewsQ: Generate Nfe Key
I have a closed source software that validates the Nfe key in the invoice entry by the stock module. I need to generate some Nfe keys for testing. So far I know that the Nfe key validates the…
-
2
votes1
answer51
viewsA: Why is my menu not working?
On the line where GOTO:eof you are ordering the interpreter out of execution. When checking, put a space after the variable that needs to be checked. Instead of "%op%" == "1"( place "%op%" == "1" (.…
-
0
votes4
answers1274
viewsA: Make submenu appear by clicking the menu using javascript
Wec0n, in its show and hide functions you are checking multiple elements at the same time, these checks will not work if these attributes are set by CSS. You can do this in a more practical way…
-
1
votes2
answers941
viewsA: How to modify an item at a specific point on the page? (HTML, CSS)
Does it need to be CSS only? If it can be with Javascript can use the scroll touchmove of jQuery. Follow an example: $(window).on("scroll touchmove", function() { if ($(document).scrollTop() >=…
-
2
votes1
answer1177
viewsA: How can I run my script when I’m sure it’s run as administered?
This is currently the best way: @echo off echo Detectando privilegios... net session >nul 2>&1 if %errorLevel% == 0 ( rem //Comandos com privilegios de Administrador echo Privilegios de…
-
2
votes1
answer978
viewsA: How to change the image of the mobile menu icon to indicate toggle closure?
If you want to change the image you can do it this way: $(".brand-topo-mob img").attr("src","img/logo-fechar.png"); But how about doing an animation this way below? //JavaScript…
-
0
votes2
answers48
viewsQ: Select class from load
I have a page that is loaded by function load of jQuery as an example below: <div id="result"></div> <script> $('#result').load('listar.php'); </script> On this page…
-
2
votes2
answers5477
viewsQ: How to remove the first character from a string in a Query
In the Postgresql 9.2 I have a column with the following information: A101 B12 C3 I need one command to select and another to update this column by removing the first character thus: 101 12 3 I…
-
0
votes2
answers548
viewsA: Subtraction in jquery
This example is just an alternative where values can be entered by the user. $('#aplicar').click(function(){ $('#desconto').slideToggle(); }); $('#calcular').click(function(){ if…
-
0
votes1
answer105
viewsQ: Change appearance when passing through Section
In this code below, I can make the clicked item change the background-color, but I would like it to change without clicking, that is, when you are going through the <section> correspondent. I…
-
0
votes5
answers3455
viewsA: Change HTML document to PHP
The change of extension will only present problem if the page needs to execute some instruction in PHP. Code page example that will have no problem in both extensions: <h1>Hello…
-
3
votes3
answers269
viewsA: Click a buttom and a prompt appears
You can do by placing the page link that should be directed already in Javascript: btn = document.getElementById('btn'); btn.addEventListener('click', function() { var b = confirm('Tem certeza que…
javascriptanswered Laércio Lopes 4,352 -
4
votes2
answers546
viewsA: Send form data to a URL
In your HTML the input's has to have the attributes name as the page that will receive the data awaits. The companyId should be in a input with type="hidden". The page will receive the parameters by…
-
1
votes1
answer86
viewsA: List Alignment
If the result below is what you expect, you can add the element div in the HTML with class myClass, put the text-aling: center in div and put the display: inline-block in the list items li in the…
htmlanswered Laércio Lopes 4,352 -
2
votes3
answers1036
viewsA: How to avoid repeating html and css commands?
This solution is only if you want the same content in other pages. If it’s just the styling just import the same file CSS on the other pages and set the same #id's or .classes us same elements. Can…
-
1
votes2
answers682
viewsA: Adjustment of css bootstrap button
This is happening because the button is missing label, put some that will already solve the problem: Click on Execute and then in Whole page to see how it will look in the preview you posted in the…
-
1
votes1
answer2202
viewsA: HTML - How to show/hide content by clicking on a "link"?
Here is a small example of how to do: function mostraResposta(id){ respostas = document.getElementsByClassName('faq'); //recupera todos elementos da classe faq for (var i = 0; i <…
-
5
votes5
answers8294
viewsA: Count characters while typing
You need to count the number of characters that have the name with the function length, but this function counts the number of characters with spaces. So that spaces are not multiplied to the value,…
-
0
votes1
answer55
viewsA: Search validation
Correction When you assign a function to an element by "onSomething" in the code JavaScript using () at the end of her name, the browser understands that it should be run immediately if it removes…
-
1
votes1
answer682
viewsA: Error opening map in modal bootstrap
Error is being occasioned because you are calling the function modal that is of boostrap.min.js, but is only referencing the file after it calls the function. To solve put the code: <script…
-
1
votes1
answer47
viewsA: Man pages on Windows
Using /? after the command. tasklist /?
-
3
votes3
answers1296
viewsA: jquery to click and make appear/disappear different Ivs
I saw you tag jQuery, but this result is quite similar using only CSS: #time { width: 100%; height: 150px; overflow: hidden; text-align: center; background-color: #005500; } .jogadores { width:…
-
1
votes1
answer767
viewsA: Label/Sticky Title - Google Maps Api
You can put the label in this way: var marker = new google.maps.Marker({ position: myPosition, label: 'Nome do Marker', map: map }); She’ll be in the middle of the icon you chose, I already use this…
-
3
votes2
answers6024
viewsA: Initialize apache and mysql in windows 7 32 Bits using Xampp
This is happening because you are trying to run these files .batwithout the privileges of an Administrator or User Account Control is enabled. To disable account control go to: Control Panel, User…
-
2
votes1
answer206
viewsA: How to autocomplete php tag in netbeans?
Netbeans does not complete this code by default, so you will have to manually add the code template. In Netbeans click on: Tools > Options > Editor > Code Templates Choose the language HTML…
-
1
votes1
answer404
viewsA: Differentiate Enter from Shift Enter in a textarea, obtaining the value via javascript
Follow code to get the desired result: function getCaret(el) { if (el.selectionStart) { return el.selectionStart; } else if (document.selection) { el.focus(); var r =…
-
1
votes1
answer226
viewsA: Button to return to initial div
You can leave the link <a id="goback" href="' + document.referrer + '">Go Back</a> in HTML with CSS #goback{ display: none; } and add the line $('#goback').show(); in the Javascript code…
-
0
votes1
answer5713
viewsQ: Change input value with javascript
I have a field to insert notes and I would like if the entered value was greater than 10 or less than 0 the value was deleted from the input. I tried to do with the code below, but without success.…
javascriptasked Laércio Lopes 4,352 -
0
votes1
answer750
viewsA: I need help creating a bat to send SAPLOGON.ini file
If using the command to Windows 7 or higher: cd C:\Users dir /b > Users.txt for /F "tokens=*" %%A in (Users.txt) do ( if exist "C:\Users\%%A\AppData\Roaming\SAP\Common" ( xcopy…
batchanswered Laércio Lopes 4,352 -
2
votes1
answer480
viewsA: How to hide/show one div at a time with Javascript?
Nelson, taking the elements by the class Javascript recovers a collection of elements in an array, so for you to do what you need in this case it would be better to assign a id each paragraph and…
-
2
votes1
answer222
viewsA: Css dropdown menu when opening should make the page dark
Surely there are ways to make it better, but this is the way I found it easier. I added a div with the id back; I put the list items with the class menu-item; I put the id menu on the button; I…
cssanswered Laércio Lopes 4,352 -
1
votes1
answer5038
viewsA: Check file date and time and keep the most current in Batch
This command does not delete, but only copies and overwrites if the source file is newer than the target file. You must put the complete path of the files to work properly. The copy causes the…
-
3
votes1
answer2925
viewsA: Calling more than one script bat
If you call them that, they’ll start in separate windows: @echo off start start-tomcat.bat tgg start start-hsql.bat tgg @pause If you call it so, you will incite in the same window: @echo off start…
-
1
votes1
answer331
viewsA: Slide inside a div
Assign an id to your div, in the example below assign the id slide like this: HTML <div id="slide"></div> Format the dimension of the div: CSS #slide { width: 300px; height: 300px; } And…
javascriptanswered Laércio Lopes 4,352 -
2
votes2
answers1450
viewsQ: Generate error at the end of the copy in case some file is not copied
I have a batch that copies some files on the network, this copy updates the previous files by the newer ones if they already exist in the destination folder, but if any file is in use the system…
-
0
votes1
answer1173
viewsQ: Autocomplete list ul>li*n in Sublime Text 3
Seeing various tutorials on the internet where they use Sublime Text 3 to edit HTML codes, type ul>li{item}*4 and then Ctrl+Space Sublime completes the code with: <ul>…
-
1
votes1
answer354
viewsA: How to save java -version return to cmd
When redirecting an application output using the symbol >, Error messages will still print on the screen. This is because error messages are often sent to the standard error stream instead of the…
-
1
votes1
answer3765
viewsA: Searching and Separating Files Using . bat
In this command below you can modify the variables to fit your environment. Since I don’t know much about for in CMD has not yet been able to remove the error log from {.xml and of }.xml that will…
-
0
votes2
answers82
viewsA: How to pass data in PHP
You can cause the data to be displayed within tags input, which can be placed with the parameter readonly that the values are not modified and the value with the values that appear on the first…
-
3
votes1
answer4621
viewsA: How to create a . bat to run network file
You can install the Psexec and then run the command remotely. psexec \\pc01 C:\Users\NomeDoUsuario\Desktop\lab05.bat psexec \\pc02 C:\Users\NomeDoUsuario\Desktop\lab05.bat psexec \\pc03…
-
1
votes1
answer1353
viewsQ: Submit to the same page and return to the same page
Friends, I have a one-page PHP site that at the bottom of the page has a contact form that submits to the same page. I wanted after submitting the form to return to the same Action to show the…
-
2
votes2
answers2948
viewsA: How to check if a windows service is installed, if you are starting the service via batch file
The command SC QUERY displays information about a particular service, shows the type, status, etc. If the service name passed as parameter is not installed the error code 1060 will be shown, from…
-
0
votes2
answers81
viewsA: Doubt with Query SQL
After the reply of @Pedroe. I managed to do the query below that solved the problem in a better way. This query is taking into account that when the operations of the products are not found the…
sqlanswered Laércio Lopes 4,352 -
1
votes2
answers81
viewsQ: Doubt with Query SQL
I have a stock movement table with the following columns and data: table moves id | operacao | prodinsumo | qtde ---------------------------------- 1 | 1 | 25 | 6 2 | 2 | 10 | 3 3 | 10 | 17 | 1 4 |…
sqlasked Laércio Lopes 4,352 -
0
votes2
answers632
viewsA: Assign directory of a searched file to a CMD variable
I managed to solve the problem with this code: Option to assign all directories to different variables: @Echo Off C: cd / Set "i=0" For /F "Delims=" %%A In ('Dir/B/S/A-D "Program.exe" 2^>Nul') Do…
-
2
votes1
answer1419
viewsQ: Find duplicate words without selecting one by one
In Sublime Text I know I can find duplicate words if I select one by one as the image shows: When I select the word Item the Sublime highlights the other references. There is the possibility to…
-
2
votes1
answer4755
viewsA: I removed the toolbar from Tom, how do you put it back?
You probably set to appear only when pressing the key Alt. Press the button Alt, when the menu appears click on View > Toggle Menu Bar.
-
1
votes2
answers2454
viewsA: A. bat file that changes the background color according to the number the user entered
Use that code: @ECHO OFF SET /p num=Digite um numero de zero a sete: IF %num% LEQ 7 ( color %num%f ) ELSE ( ECHO error. ) pause
-
1
votes3
answers128
viewsA: I need to create a button with this code and I’m not getting it!
Whereas I don’t know what code is in the class manual-optin-trigger adding only that in the style that already looks a little pretty: background-color: lightblue; padding: 10px; border-radius: 3px;…
-
1
votes1
answer2332
viewsA: Bat to finalize process and close application on desktop
Actually it’s not two processes that are open on the clock side, but the Explorer that keeps the icons as if the two were open, but actually has only one. So far the only way to make the process…