Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
3
votes1
answer1704
viewsA: Warning error: mysql_fetch_array() expects Parameter 1 to be Resource, Boolean Given in
Your script has at least 5 errors First, this line is wrong: $resource = mysqli_query($sql) or die(mysqli_error($conexao)); Another strange thing is that for the connection you have two variables…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers268
viewsA: Doubt with Jquery Load
Ajax doesn’t work in protocol file://, have to use a server HTTP like Apache or Ngnix, the message itself says this: Xmlhttprequest cannot load file://... Cross origin requests are only supported…
-
1
votes1
answer1120
viewsA: How to authenticate Json with php by passing header
I don’t know this API, but the header I believe is like this: Authorization: Basic [login e senha em base64] If it is of the kind Basic, to summarize it works like this: Authorization: [tipo]…
-
5
votes5
answers988
viewsA: Error Split by 0
As Isaac said, put an IF to the y, should look like this: elsif operacao == "Divisão" if y != 0 return resultado = x / y else return "Invalido, não pode ser divido por 0" end end So this: result =…
-
1
votes1
answer684
viewsA: Manage video with PHP
Making a brief remark on the script https://gist.github.com/h2ero/ccf90f3592b06d9510655902b274b61d there were some "problems", this script was probably set to a .htaccess specific, that is it would…
-
1
votes1
answer330
viewsA: raise Keyerror(key) from None Keyerror: 'TCL_LIB (.Py to Exe)
Yes, the Stable version of pyinstaller is only compatible with Python 2.7, 3.3-3.5, Python 3.6 is only supported in the Development version of pyinstaller, but it is not yet stable software. You can…
pythonanswered Guilherme Nascimento 98,651 -
3
votes2
answers107
viewsA: Estimating the response time of a server using Python or regex
You can try using ready libs for this, I found two: pypcapfile To install use the pip: pip install pypcapfile An example of use: from pcapfile import savefile testcap = open('1.pcap', 'rb') capfile…
-
4
votes1
answer797
viewsA: PHP function in input text action
Not possible, as I explained in a similar post: When we are a variable I passed from JS to PHP it adds up PHP is usually server-side and in the case of websites, it is always server-side, or PHP…
-
2
votes1
answer789
viewsA: How to hide the token generated in the url by the variable
This generated TOKEN will exist in the source of the generated HTML you want or not, make it hidden in GET forms is virtually unnecessary, the TOKEN is only a key of comparison with the TOKEN that…
-
2
votes2
answers165
viewsA: How to access the version of a.exe file with PHP?
I found this answer in Soen which looks very good, however nay I can say that it will work in all environments, anyway the code returns enough thing: function…
phpanswered Guilherme Nascimento 98,651 -
4
votes2
answers530
viewsA: Phpmailer error: Hostnet configuration
The door 587 is usually a port that uses SSL or TLS, so you should uncomment the $mail->SMTPSecure and first test tls: $mail->SMTPSecure = 'tls'; If the test fails ssl: $mail->SMTPSecure =…
-
4
votes3
answers3621
viewsA: How to readjust the image to the size of the div
You can use the child selector >, thus #conteudo > img and apply width and height with 100%;, so it will only affect the image that is direct child of #conteudo Example: #conteudo{…
-
1
votes1
answer2846
viewsA: How to translate dynamic texts with php?
Can use https://github.com/Stichoza/google-translate-php, that uses Google Translator: Install via commiserate in your project folder: composer require stichoza/google-translate-php The use is…
-
1
votes2
answers1098
viewsA: Run automatic click on form input
Maybe the .stop do not perform because it will only be processed on page loading and not on download, I can not affirm with conviction this because I am not sure of the behavior in different…
-
1
votes2
answers1075
viewsA: mpdf only displays in firerox
Probably the version you’re using of mpdf is not the latest version as you stated, as the most updated version of MPDF has namespace: <?php require_once __DIR__ . '/vendor/autoload.php'; $mpdf =…
-
1
votes1
answer369
viewsA: My login won’t catch $_SESSION
Foul session_start in init.php, you can do: <?php session_start(); if((!isset ($_SESSION['dbuser'])) and (!isset ($_SESSION['dbpass']))) { Assuming init.php is included in another file include it…
-
2
votes2
answers828
viewsA: Creation of diagonal div
How did I respond in How to Make Tilt Button? and Button diagonally only the left side, you can use pseudo elements: .main-banner { width: 600px; height: 200px; background: #ccc; position: relative;…
-
1
votes1
answer1772
viewsA: How to use functions that are in a different file? - Python
In the PDI.py add: import funcoes_uteis And call: imagem[i][j] = funcoes_uteis.calcular_media(filtro) Or if you don’t want to use it as funcoes_uteis.calcular_media call it that: from funcoes_uteis…
-
16
votes3
answers39830
viewsA: Configure . gitignore to not upload certain files
If the .gitignore is at the same level as the folder Application then add this to the .gitignore: Aplication/src/Domain/bin/* Aplication/src/Domain/obj/* And save the document, check git, so you…
gitanswered Guilherme Nascimento 98,651 -
1
votes1
answer65
viewsA: How to work with multiple codec’s in pdf?
What you want is to actually read various types of encodings and convert them all to the encoding you’re using in your python script, you should probably be using something compatible with latin1,…
-
0
votes2
answers1190
viewsA: How to put text on an icon?
You can use the pseudo-element selector called ::after (for older browsers use :after) to position a text above and use the HTML5 attribute called data- to customize the value, so let’s create a…
-
1
votes1
answer3685
viewsA: separate Divs HTML
A detail, col- should always be son of row! <!--//CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"…
-
0
votes2
answers184
viewsA: Enable PHP page with jquery
Create a file called log.js or anything like that and put it in the "root" of the publish folder (public_html or www, depends on your system) Then create a file called log.php also at the root Now…
jqueryanswered Guilherme Nascimento 98,651 -
0
votes1
answer487
viewsA: send a post to a Localhost on a Chrome extension
You are forcing the popup to redirect to the address, this is considered "insecure" in terms of Chrome extensions and probably the application blocks, IE will not work because this would allow…
-
2
votes2
answers1120
viewsA: How to read Json with Android
This JSON is wrong: {\"nome\": \"JOA\", \"cpf\": 7.4417, \"idade\": \"15\"},{\"nome\": \"PAT\", \"cpf\": 8.5528, \"idade\": \"20\"}; This format is broken and will not be read, you probably want…
-
3
votes2
answers859
viewsA: Return File Name in VBS
The Wscript.Arguments recognizes the file in the sequence of the parameters as if it were a normal executable and with GetFileName you can take the name and GetAbsolutePathName will take the full…
-
1
votes1
answer508
viewsA: What is the purpose of Moment.js?
This message indicates that whoever created the template used discontinued commands from moment.js: Deprecation Warning: Moment(). subtract(period, number) is deprecated. Please use Moment().…
-
2
votes1
answer129
viewsA: Why isn’t my consultation working?
The mysqli_query returns an object and not the result query, to get the SELECT COUNT(*) first of a nickname uses AS (alias): $prevJan= "SELECT COUNT(*) as TOTAL FROM participantes WHERE PREVISTO =…
-
3
votes5
answers4863
viewsA: How to make a regex that ignores non-alphanumeric characters?
If I understand with the term "capture", what you want is to remove the characters non-alphanumeric, use replace, the negation regex must be so: [^a-z0-9] The sign of ^ inside [...] denies any…
regexanswered Guilherme Nascimento 98,651 -
1
votes2
answers972
viewsA: How to start Owl Carousel after 2 seconds?
Change the autoplay to false: var owl = $('.slider').owlCarousel({ items: 1, loop: true, autoplay: false, //AQUI autoplayTimeout: 6000, autoplayHoverPause: false, margin: 0, stagePadding: 0,…
owl-carouselanswered Guilherme Nascimento 98,651 -
3
votes2
answers606
viewsA: Empty function return
If I understand the code, I believe that there is a lack of a: if( ($select->rowCount()) > 0) { return "O ".$campo_unico." informado já existe em nossos registros"; }else { insert2($dados,…
-
3
votes1
answer6164
viewsA: PHP Startup: Unable to load Dynamic library '/usr/lib/php/20151012/php_pdo_mysql.dll
You must be on a Linux or Mac OSX operating system, the extensions .dll are for windows, so it is likely that you have downloaded manually, it will not work. The PDO extension is usually native to…
phpanswered Guilherme Nascimento 98,651 -
5
votes2
answers618
viewsA: Grid styling for gallery using flex display
A very simple example is to create a "father div": /*o BODY no doctype HTML5 ou Strict não ocupa 100%, então isso deve ajustar*/ html, body { height: 100%; } .flex-parent { display: -webkit-flex;…
-
2
votes1
answer657
viewsA: Run Function when the element appears in the gift
I suggest you use one of these 3 ways to check: Setting a property in the element First of all I recommend you read this: Why do they say that recursive setTimeout is better than setInterval? So if…
-
3
votes3
answers327
viewsA: How to get the variation of the dollar of the website Infomoney?
I think it could simplify a lot and make things easier, including possible maintenance, if you use DOMXpath::query. Note: used curl due to some certificate issues, in the new versions of PHP (5.6…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer816
viewsA: Transfer file to linux server with Python
If Centos has access via SSH/SFTP you can install the module https://pypi.python.org/pypi/pysftp and run a python script like this: import pysftp with pysftp.Connection('NOME DO HOST',…
-
1
votes1
answer1114
viewsA: Laravel with error in Composer install
There are two ways to install Laravel, the first and perhaps most common is to install the "Laravel/installer", first run the command in any folder, it does not need to be where you will create the…
-
2
votes1
answer12692
viewsA: How to change button color with Hover over a single button (CSS)
This will only affect the elements to the right of the selected element: [class*=box]:hover, [class*=box]:hover ~ [class*=box] { background-color:red; } <div class="row"> <button…
-
2
votes2
answers346
viewsA: Main differences between structuring CSS with PHP and LESS/SASS
The difference is that PHP processes in server side, that is to the user will actually get a CSS file. Since the front end does not interact directly with the back end. LESS/SASS and the like can be…
-
0
votes1
answer93
viewsA: How to compile software through a website?
The part of designing the Forms and etc, would have to be converted from a structure to WPF and so on, now the part that I think it will be necessary that the back-end server has the VS compiler…
-
5
votes2
answers51
viewsA: Only stylize if the element belongs to a class
The dial should look like this: .status.fa { /*coloque o estilo aqui*/ } It should not contain spacings, because then separated would be children, but united refer to the same element.…
cssanswered Guilherme Nascimento 98,651 -
7
votes1
answer3821
viewsA: Error "Uncaught Pdoexception: could not find driver" in Wordpress on localhost
Open php.ini (and not httpd-xampp.conf), Xampp php.ini must be in a folder similar to this C:\xampp\php\php.ini, on windows native Notepad may not open properly, can open by programs like…
-
3
votes1
answer145
viewsA: Put 00 left into another variable
In mysql @rray already suggested /a/126604/3635 It would be something like your case: SELECT lpad('1', 3, 0) In Javascript you have this example https://stackoverflow.com/a/20460414/1518921 just…
-
4
votes1
answer1228
viewsA: Read fasta files in python and skip the first line
Assuming the file has a format similar to this: >SEQUENCE 1 MTEITAAMVKELRESTGAGMMDCKNALSETNGDFDKAVQLLREKGLGKAAKKADRLAAEG LVSVKVSDDFTIAAMRPSYLSYEDLDMTFVENEYKALVAELEKENEERRRLKDPNKPEHK…
-
1
votes1
answer44
viewsA: Is it possible to use the W3C validator for websites built in Angular.JS?
According to the link from Angular Guide Normalization Normalization makes: Remove x- and data- front of elements and attributes. Converts the :, -, or _ delimited to camelCase. So to validate just…
-
2
votes1
answer798
viewsA: Error "X-UA-Compatible HTTP header must have the value IE=edge, was IE=Edge,Chrome=1"
The message: X-UA-Compatible HTTP header must have the value IE=edge, was IE=Edge,Chrome=1 If translated says something like: The HTTP header X-UA-Compatible should contain the value "IE=edge", but…
-
1
votes1
answer1284
viewsA: Sending data to Controller via Ajax Laravel
PHP is back-end, it processes and generates pages, whether HTML, txt, image, etc... The variable data is Javascript and in turn is processed on the front end, well after the HTML page has been…
-
0
votes1
answer1224
viewsA: How to call an ID in HTML more than once?
Ids are attributes that cannot be repeated, this is because ID means "Identity", ie two elements cannot have the same identity. Perhaps the ideal would be to create an ID for each one, to adjust you…
-
1
votes1
answer322
viewsA: Problems making Arduino serial connection with PHP
This seems to indicate only that the door COM5 is not the correct port, or this off, to check the correct port open the driver manager, then go to COM & LPT Something like: If nothing appears in…
-
5
votes2
answers119
viewsA: What is the difference between # and #! in HTML 5?
The symbol #, called hash, is mainly used to indicate elements with the attribute id="", take the test: <a href="#!">Foo bar</a>…