Posts by SachaDee • 541 points
21 posts
-
0
votes1
answer36
viewsA: PHP variable in HTML without form
With a simple ECHO : test.xml : <?xml version="1.0" encoding="UTF-8"?> <Nfe> <dados> <cliente>fulano</cliente> <cnpj>1234</cnpj> </dados> </Nfe>…
-
0
votes3
answers706
viewsA: Read a Json object with javascript
To avoid the problem of [:] we can make a .replace string and recover to simple name : var string = '{"og:locale":"pt_BR","og:type":"article","og:title":"Um titulo…
-
0
votes1
answer62
viewsA: Force the opening of a page
You can use the function header : header('Location: http://www.example.com/'); in your case : if($resl[0]==$login && $resS[0]==$senha){ header('Location:…
-
3
votes2
answers585
viewsA: Delete file with name and path in other file. bat
Using FOR /F @echo off for /f "skip=1 tokens=1,2 delims=," %%a in (in.txt) do echo del "%%b/%%a" Pause I put the remote echo in front of the command del, to test the output of the command. See if…
-
0
votes2
answers34
viewsA: Button problem
Using Jquery can use the method .toggle() : <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button style="display:block;"…
-
6
votes7
answers1322
viewsA: Push element from one array to another array
You can set your variables outside the function if you want to use them later. Vc does not need to put as argument array that is already defined. var array = [1, 2, 3, 4, 5]; var par = []; var impar…
javascriptanswered SachaDee 541 -
2
votes3
answers3006
viewsA: Search directory name of a file. bat
Can use %~dp0 @echo off echo "%~dp0"
-
1
votes2
answers106
viewsA: Does web API without bank access make sense?
A Web API allows you to provide any services to an end-user connected to the Internet. I do not agree 100% with @Maniero, in the case of an online payment API for example, it will be complicated…
-
3
votes1
answer77
viewsA: setTimeOut error Uncaught Referenceerror: lightning_one is not defined
You are playing your function as if it was a string! Must pass t also as second argument in function otherwise it will not wait the 4 seconds ! function lightning_one(t) { $('#container…
-
1
votes2
answers931
viewsA: Rename the process
In that case you can use the PID process to differentiate them with the title example : @echo off set "$title=test2" title %$title% tasklist /FI "WINDOWTITLE eq %$title%" | find /i "console" >nul…
-
0
votes1
answer503
viewsA: Two Ajax requests in the same function
Try it this way : function Inicio(){ // Primeira requisição que é executada $.get('ctrl/administrativo/modcadcon.ctrl.php',{'acao':'todos_atv', 'campo':'mod_status', 'valor':'1'}) .done(function(…
-
1
votes3
answers262
viewsA: Batch programming
The best solution in this case !! only mute origin.txt and txt destination. in the code for your real file name ! @echo off setlocal enabledelayedexpansion for /f "delims=" %%a in (origem.txt) do (…
-
2
votes1
answer68
viewsA: Maximum width and height validation with PHP
can use getimagesize() : list($width, $height, $type, $attr) = getimagesize("img/flag.jpg"); echo "<img src=\"img/flag.jpg\" $attr alt=\"getimagesize() example\" />"; try like this : if…
-
1
votes3
answers2628
views -
4
votes1
answer1028
viewsA: What are the differences between . bat and . cmd?
The only difference between .cmd and .bat, is that in the .cmd the variable ERRORLEVEL also in the case of successful commands affected by command extensions when activated…
-
1
votes1
answer95
views -
1
votes1
answer3356
viewsA: Edit txt file by bat
Thus : @echo off setlocal enabledelayedexpansion for %%x in (*.txt) do ( call:skip "%%x" ) exit/b :skip set/a $c=1 (for /f "delims=" %%a in (%~1) do ( if not !$c!==2 if not !$c!==4 echo %%a set /a…
-
1
votes2
answers271
viewsQ: jQuery with Internet Explorer
I have this code that works perfectly in Firefox, but I can’t make it work in IE. The user can only choose 10 drives in total and when it reaches 10 displays one alert(). Does anyone have a better…
-
0
votes4
answers80
viewsQ: View form when password is set
I have this code : <html> <head> <script> function validarSenha(){ senha1 = document.f1.senha1.value senha2 = document.f1.senha2.value if (senha1 == senha2) { alert("PASS OK");…
-
0
votes2
answers536
viewsA: hide the batch input through this file
Here a method 100% Bat to hide password : ::By SachaDee® (©) 2015 @echo off&cls ::O codigo set "$Mdp=toto1234" ::O tamanho do codigo set "$Long=-1" for /F "delims=" %%c in ('cmd /D /U /C echo…
-
3
votes3
answers11070
viewsA: BATCH SCRIPT - Automating website login
An example in VBS, with internet explorer that you can adapt : Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.AppActivate "Internet Explorer" Wscript.Sleep 1500 WshShell.SendKeys…