Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
2
votes2
answers775
viewsA: How to sort an Array alphabetically in PHP?
If they are columns that came from a database as you stated in: All table data is extracted from a mysql table So before inserting into the array you could already bring sorted using ORDER by (ASC…
-
0
votes1
answer79
viewsA: Sending email. php does not redirect page
Actionscript does not interpret HTML, at least not with URLLoader directly (by default), therefore enviosucesso.html or envioerro.html won’t work. The most you’ll get to make Actionscript interpret…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer87
viewsA: Close application in PHP-GUI
You can use the method Gui\Application::terminate(): $button->on('click', function () use ($button, $app) { $app->terminate(); }); Or you can try the method Gui\Application::sendCommand:…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer255
viewsA: How to get around a GOTO problem in PHP
First, I really don’t understand why so many fopen, one enough, and the operation continues with fgetc within a while or in a recursion with functions, that is, you are opening several times the…
-
2
votes1
answer143
viewsA: Syntax error in "Else if"
The else if can’t go after the else {. The else must be the last condition, it says something like, all the others are false, so you must execute it. The correct would be to understand the logic…
javascriptanswered Guilherme Nascimento 98,651 -
3
votes2
answers1662
viewsA: How to convert to Base64 in C#?
If the code is the manipulation of images then in C# will not use string, will use byte[] probably then the use of: System.Text.ASCIIEncoding.ASCII.GetBytes And System.Text.Encoding.UTF8.GetString…
-
6
votes1
answer138
viewsA: How to detect if a string is a regex
The preg_match will return a type value int is valid if the regex is valid but not "match the string" will return zero (0). Now if regex is invalid preg_match will return a boolean value instead of…
-
8
votes1
answer519
viewsA: Regex to optimize code change using Notepad++
Squeeze Ctrl+H and in the field Find what add this: htmlspecialchars\(([^,]+?)\) And in the field Replace with this: htmlspecialchars\($1, ENT_NOQUOTES, "UTF-8"\) See the example on Notepad++:…
-
2
votes2
answers996
viewsA: Error in PHP 7: Call to Undefined Function sql_regcase
The sql_regcase has long been obsolete, you can try to use as an alternative: preg_match() preg_quote() Of course you will have to adapt the code and read the documentation of how to use, not enough…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer233
viewsA: Cannot resolve method 'getSupportFragmentManager()'
Probably his main class is not FragmentActivity, the method getSupportFragmentManager is only supported on it. Try using the method: Activity.getFragmentManager You can also change the class that is…
androidanswered Guilherme Nascimento 98,651 -
8
votes3
answers538
viewsA: How to take the value of each TD inside each TR dynamically using jQuery?
First of all, JSON cannot have repeated keys: "ambiente":"Saibro", "ambiente":"Campo" I suggest this structure: [ { "esporte":"Futebol", "ambiente": ["Campo"] }, { "esporte":"Volei", "ambiente":…
jqueryanswered Guilherme Nascimento 98,651 -
6
votes4
answers549
viewsA: Footer with one line
Just use float: and separate each one into an element, for example: Note: the pseudo element :after in .footer .container:after is just a technique to break the floats if necessary, chance the…
-
3
votes1
answer272
viewsA: Create a video by javascript
I think you want to add it somewhere, if that’s it then you have to use it appendChild to add to a desired location of the page, for example: var lastVideo; function tocar_video(mysrc){ if…
-
2
votes1
answer111
viewsA: AJAX/PHP pass $_GET and $_POST?
In this way: $.post('../core/Query/students/student_search.php?usrdelete=5382', {st_process: name}, function(data){ $("#display_students").append(data); }); If you use the value of a variable just…
-
1
votes3
answers110
viewsA: How to access img of a JQUERY figure?
The mistake is that you have to understand what it is string and what is not string, without the quotation marks: $(figure img).attr('src'); It’s like waiting for a variable called figure, the…
jqueryanswered Guilherme Nascimento 98,651 -
1
votes1
answer70
viewsA: Is it safe to make mysql queries using cookie values?
First, functions with prefix mysql_ are obsolete and have been removed in PHP7 to ensure that your codes work use PDO or Mysqli. On the security of the use of cookies will be the same safety level…
-
2
votes2
answers6731
viewsA: Shortcut in the editor to open HTML in the Navigator
You can use the https://github.com/adampresley/sublime-view-in-browser In sublimetext open the Package Control (use the shortcut Ctrl + Shift + P) Then select Install Package After this type View in…
sublime-textanswered Guilherme Nascimento 98,651 -
0
votes2
answers76
viewsA: Fetch input value from another php file
The window.parent it is not necessary, therefore window.parent will search on the page above, as the script is already running on the page above so it is irrelevant, just pick up the <iframe>.…
phpanswered Guilherme Nascimento 98,651 -
3
votes2
answers640
viewsA: Header error when sending email with PHP
Many emails often fall into SPAM or do not even reach the recipient due to filters on the servers, understand one thing, when you use the function mail() or the program sendmail generally does the…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer51
viewsA: How to upload in php
The value 1 in the variable error indicates the error UPLOAD_ERR_INI_SIZE, all constants are in this link: http://php.net/manual/en/features.file-upload.errors.php How number should be compared to a…
-
0
votes3
answers155
viewsA: How can I stop systems from incorporating my website?
I believe that your problem is totally related to some Bots attack, that is your problem is not to include your site elsewhere, but rather one or more Bots that try to break the security of your…
-
2
votes2
answers2965
viewsA: Combobox appearance on bootstrap
You confused the https://github.com/harvesthq/chosen with the https://github.com/alxlit/bootstrap-chosen, this CDN you used is not the same as the link http://alxlit.name/bootstrap-chosen/, are…
-
2
votes1
answer133
viewsA: Ajax request back Undefined
Note: Missing a comma between post" and async: method: "Post" async: false Please DON’T USE async: false, this is obsolete and in the future browsers will remove this feature, this because the…
-
4
votes3
answers485
viewsA: Select a div without it having a class or an id?
Use the selector :nth-child(), thus: var elemento = $("#teste div:nth-child(2)"); console.log(elemento.text()); <script…
jqueryanswered Guilherme Nascimento 98,651 -
1
votes1
answer278
viewsA: Problems with PHP upload
The lock can be on post_max_size or in the upload_max_filesize, a very important detail, after editing the PHP.INI or the PHPRC you need to restart the HTTP server (and/or fastcgi if you are using…
phpanswered Guilherme Nascimento 98,651 -
14
votes2
answers3110
viewsA: Mysql = Mariadb, huh?
Your teacher is mistaken, Mariadb is compatible in many things with Mysql, but it is nothing renamed, it is another database anyway, can even be considered a mysql Fork, since it was created by the…
-
0
votes1
answer308
viewsA: Type error: Argument 1 passed to: hasPermission() must be an instance of: Permission string Given
The hasAnyRoles wait on the first argument needs to be an object of the type Api\Acl\Models\Permission, in case you passed the $permission->roles which probably contains another type of object or…
-
8
votes1
answer1840
viewsA: lang difference and meta charset in html
Both attributes have no relation, each has an objective. The attribute lang= is only to specify for bots and the like which is the likely language of the page or a specific HTML element, for example…
-
0
votes1
answer46
viewsA: upload Mutiplos files
Your Ajax does nothing but send {acao:'inserir',id:id}, that is there is no way PHP can receive the upload since you have not sent anything, to send the files you need to pass the FormData in the…
-
5
votes2
answers1483
viewsQ: How to create a toggle button with input=checkbox without using the <label> element?
Is to create/transform a <input type="checkbox"> on a toggle button without needing the element <label> as in these examples: How to create a toggle on and toggle off button? An example…
-
6
votes2
answers1483
viewsA: How to create a toggle button with input=checkbox without using the <label> element?
It is possible using two pseudo elements, the ::before and the ::after, will also need to use properties -webkit-appearance: and -moz-appearance: (and in the future appearance:). In old Msedge…
-
1
votes3
answers259
viewsA: How to get response from 'apt remove' via shell_exec with PHP or Python?
The popen other than exec and similar may interact similar to a Handler file I/O, probably with it will be able to catch the whole "exit", for example: $response = ''; $handle = popen('apt-get…
-
2
votes1
answer527
viewsA: Tkinter function running even without clicking the button
It is because you have already directly called the function in: btn=Button(win, text="Somar", activebackground='green', command=add(a,b)) the command= being defined with the value of return of def…
-
0
votes2
answers496
viewsA: Upload webp images
This is done using Content negotiation using the header Accept:, as I explained in this reply: In an Ajax XHR request, in HTTP_ACCEPT what is the meaning of q=0.01? In Chrome, Opera and other…
-
1
votes1
answer229
viewsA: Friendly Urls with flask
URL friendly is just a term for a standardized URL that is usually easier and intuitive to the end user, the goal of Flask is this same, write Urls as you wish without needing anything else, as well…
-
1
votes1
answer356
viewsA: Configure virtual host on Ubuntu
Change the extension to: /etc/apache3/sites-available/meusite.dev To .conf /etc/apache3/sites-available/meusite.dev.conf The same for: /etc/apache3/sites-available/gymdoctor.dev To .conf…
-
3
votes1
answer493
viewsA: Loading script asynchronously
The message says the opposite of what you understood; What is being discontinued (has become obsolete) is the SYNCHRONOUS (that crashes the browser many times), for example this is synchronous:…
-
2
votes1
answer1781
viewsA: Fatal error: Uncaught Error: Class 'COM' not found with PHP 7.2.x
Things have changed in PHP7.2 Extensions in php.ini as extension=php_com_dotnet.dll It was a used format up to PHP7.1, but from PHP7.2 all extensions now use a format like these:…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer129
viewsA: Error installing Symphony: fopen failed to open stream: Unable to find the socket transport "http"
This might be your SSL not activated, to activate with PHP5 no Ubuntu va no php.ini and uncomment (remove the ; in front of the extesion=) the line: ;extension=openssl.so Should stay like this:…
-
2
votes1
answer76
viewsA: URL redirection http
This %{QUERY_STRING} ^(.*)/teste(.*)$ check if you have /test in QUERY_STRING, something like http://localhost/foo/bar?foo=/test, is that right what you want? Now if the goal is to reach the URL…
-
2
votes1
answer1128
viewsA: Rename file after upload, PHP?
No need to rename, just make use of the move_uploaded_file to save with the desired name directly, for example: move_uploaded_file( $fileTmp, $local . $novoNome); $local = substr($local, 3, 120);…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer336
viewsA: word-wrap: break-word; not working vertically
And it’s not working horizontally either, so the problem isn’t with transform, but the lack of width, since the element is a <p> within a td you can use width: 100%; It is important note that…
-
1
votes1
answer346
viewsA: REQUEST_URI or REDIRECT_QUERY_STRING?
The REDIRECT_QUERY_STRING is generated exclusively by .htaccess and will only get the querystring, REQUEST_URI will fetch the URL+querystring. It is worth noting that the REDIRECT_QUERY_STRING is…
-
1
votes2
answers572
viewsA: Check if item exists in array
Using isset public function atualizar($where, $dados) { if (!isset($dados->senha)) { return 'Falta o campo senha'; } $operador = [ 'ope_nome' => $dados->nome, 'ope_cpf' =>…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer5091
viewsA: How to keep div size independent of text size?
DIV elements have no original size, except the size that accompanies the content or the size you set via css with the property height: How could I get the div to keep the original size independent…
-
1
votes1
answer657
viewsA: problem when changing PHP environment variable
I believe that by the time of execution this will not work, this because when it executes the putenv the Oracle client is already running, and if I am not mistaken, the communication of PHP with the…
-
2
votes2
answers1343
viewsA: How to check the format and type of a text file?
Not necessarily with jQuery, but with the API File Javascript native, for example: $('input:file').change(function (e) { console.log("Tipo:", this.files[0].type); }); If uploading multiple files…
-
0
votes1
answer261
viewsA: Embed PPSX in HTML
Browsers do not have support for PPSX and will hardly come to have, perhaps with third-party software, but this will depend on installing something on the machine. Maybe IE11 supports if Office…
htmlanswered Guilherme Nascimento 98,651 -
1
votes1
answer33
viewsA: Import function with php 5.4
The use function is supported only by PHP5.6+, as well as with constants: use const Foo\Bar\CONSTANT; Now concerning the functions in https://github.com/guzzle/psr7/blob/master/src/functions.php you…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer44
viewsA: How do I use point and comma in injected javascript?
It will only be part of the Javascript syntax if it is outside the string, the strings start and end with quotes: "..." Or apostrophes: '...' The problem with your script is that you are using…
javascriptanswered Guilherme Nascimento 98,651