Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
4
votes1
answer1079
viewsA: How to block resizing a widget/window?
Just get the minimum and maximum self.setFixedSize(200, 200); Variations: setFixedHeight (self, int h) setFixedSize (self, QSize) setFixedSize (self, int w, int h) setFixedWidth (self, int w) You…
-
4
votes2
answers151
viewsA: How to remove Progressbar margins?
From what I understand after testing the ProgressBar is a part of "outside" (where the margins are) the blue bar would be like a sub-item, it does not count at the defined height of the…
-
7
votes2
answers151
viewsQ: How to remove Progressbar margins?
I added a ProgressBar simple to a LinearLayout, however I noticed that it generates a margin above and another below, such as this in the image: These two white tracks, I tried to remove anyway, the…
-
6
votes3
answers220
viewsA: Attributeerror: 'Qstring' Object has no attribute 'strip'
I’m just answering to explain something: The strip (str.strip) is a method for Python strings, which is also supported by bytes (bytes.strip([chars]) and bytearray.strip([chars])) Already the…
-
2
votes1
answer458
viewsA: Configure Namespace and autoload PSR-0
The PSR-0 other than the PSR-4 supports both _ how much \ to refer to namespaces, of course _ is a namespace simulation that was used until php5.2. The PSR-0 is out of use as a recommendation,…
-
11
votes3
answers9773
viewsA: How to log in PHP?
You can use a proper function for this, the error_log, it basically writes the data to the file defined in php.ini: error_log('Erro customizado'); // mesmo que: error_log('Erro customizado', 0); But…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers2638
viewsA: diff, date_diff, abs - PHP date calculation
Some details: abs() is not to calculate date, it is to make an absolute value, for example a result of an account that generates negative value is converted to positive DateTime is not a plugin, is…
phpanswered Guilherme Nascimento 98,651 -
3
votes1
answer79
viewsA: Doubt about regex
Those quotation marks are weird, this is the problem? Only to summarize the possible problem should be the lack of escape in the parentheses, because they are used for match groups, if not escape it…
-
13
votes1
answer676
viewsA: What is the purpose of the with_jquery function?
You can manually add files with the extension .user.js to the tab with address chrome://extensions/ (on Chrome, other Chromium-based browsers may not work): Click on the image to see the animation:…
-
3
votes2
answers2823
viewsA: Margins of the child element leaking to the parent element
According to this answer https://stackoverflow.com/a/2680515/1518921 In accordance with W3 Collapsing Margins: The adjacent margins of two or more boxes (which may or may not be siblings) can…
-
12
votes2
answers21759
viewsA: What are the main differences between Unicode, UTF, ASCII, ANSI?
According to the @randrade linkou, did a quick translation, removed some things about specific programming and about opinionated things, also tried not to leave to the letter the translation (my…
-
6
votes2
answers199
viewsQ: Is there any difference between the ways of declaring classes in C++?
Ever since I started learning C++ I’ve always done something like: class. h #ifndef CLASSE_H #define CLASSE_H class OutraClasse; class Classe { public: Classe(); void foo(OutraClasse *bar); };…
c++asked Guilherme Nascimento 98,651 -
6
votes1
answer1030
viewsQ: PHP Error Built in Server Invalid request (Unexpected EOF)
Eventually on the console or cmd error appears Invalid request (Unexpected EOF), note that I understand what EOF means, which is Andnd Thef File, but I don’t understand why exactly this happens. At…
-
3
votes1
answer76
viewsA: How to consult abbreviated words or not without differentiating them, as STREET and R.?
I don’t know what the impact of using Regex, but it looks like a use case, for example: SELECT nome_rua FROM enderecos WHERE LOWER(nome_rua) REGEXP '(rua\s+|r\.\s+)BATENTE' Another way you can do is…
mysqlanswered Guilherme Nascimento 98,651 -
0
votes1
answer128
viewsA: PHP Library of Videos
You can experience the getID3, download him into https://sourceforge.net/projects/getid3/files/getID3%28%29%201.x/ require_once '<pasta aonde salvou o getid3>/getid3/getid3.php'; $filename =…
-
2
votes1
answer153
viewsA: Problem using hashid.id library
When you call more than once the require it will cause some exception error because the function has already been declared the first time it called the require '../libs/Hashids.php';, if you call…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer1066
viewsA: Div for canvas
Images of different domains cause the "Taint", just read the README, in fact any LIB you want to use read the entire README, usually there already contain the solutions to the problems, as already…
-
0
votes1
answer105
viewsA: Check for remote file, slow, PHP
What you are doing is not checking files but checking Urls, each URL checked is a connection and a different "download", varying according to content and size this can take a lot of time, since you…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers120
viewsA: How to move form on screen programmatically with animated effect?
If I understood you want an animated effect when the element is moved, I found this answer https://stackoverflow.com/a/6103677/1518921 Create/declare the following class: using System; using…
-
6
votes2
answers184
viewsA: How to turn an INI file into an Array?
Use parse_ini_file it will interpret without the sessions, it will be something like: Array ( [host] => localhost [password] => sabe_de_nada_inocente [port] => 3306 ) But if you apply the…
-
5
votes5
answers2081
viewsA: Hide the last 4 numbers from a string
If you want it to consider any number, before and after a point you can use a for with working the string in a similar way to a vector: <?php function maskIp($value) { $len = strlen($value); $j =…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer393
viewsA: Remove ELEMENT behind Iframe
The getElementById is used to pick up elements by Ids and not by classes. For example: setTimeout(function() { document.getElementById("test").disabled = true; }, 1000); <input id="test">…
-
1
votes2
answers380
viewsA: Firebird - Tools
The site itself offers the links to countless paid and free tools http://firebirdsql.org/en/third-party-tools/ Now what’s best is something very personal, there’s always one better than the other,…
-
56
votes1
answer7183
viewsA: What is it and what is JWT for?
The JWT, in computer science, may refer to: Service of "requests" digitally signed the JSON Web Token Java framework called Java web Toolkit JWT authentication JWT (JSON Web Token), with the…
-
1
votes3
answers548
viewsA: Save image to desktop with html2canvas
It is not possible to control the visitor’s machine through the browser, this would be a security flaw, ask yourself, you would like a website to be able to control your computer folders? However it…
-
1
votes2
answers9302
viewsA: how to make a div float on another div
You can use position: relative; with top negative and the margin: 0 auto; to align in the middle the orange div html, body { padding: 0; margin: 0; } .topo { background: #000; height: 48px; }…
-
9
votes2
answers1707
viewsA: Routes Laravel 5.3
In prevents you from creating your own standard, however the ideal is to organize in the Controllers and Views that, and in the web.php you can use Route::group, for example: /* * todas rotas…
-
1
votes2
answers1970
viewsA: PHP error with Sqlserver Exception 'Pdoexception' with message 'SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]
If you are correct as your comment, you said the door is 1234, then it must be something customized, because the default port of Sqlserver is 1433, to access a different port you must add a comma…
-
4
votes1
answer2308
viewsA: Problems with Xmlhttprequest in Chrome
That: xhr.open("PUT", "*"); It makes no sense, the second parameter in the open must be a URL or relative path, * does not look like a "validate URL". See this part of the error message: The…
-
4
votes1
answer621
viewsA: Creating tables with PHP
According to the response of @rray explains the problem of syntax error, however sometimes it is not possible to create tables in the database dynamically, only manually (I said the times), it would…
-
3
votes2
answers322
viewsA: How to compress the output of an HTML in Laravel?
Assuming you use Laravel 5.2 you can use the method render, then in Controller would look something like, this is an example just to show how to use it, I switched the $data content for a new output…
-
3
votes3
answers303
viewsA: Border Radius does not work within a CSS class
The problem is that the background is in elements within UL and not in UL and these elements are floating right. I think by the effect of the image you want the background to limit the area of the…
-
1
votes1
answer151
viewsA: htacces for Nginx
In Nginx use the try_files and instead of the variable $_GET['url'] use REQUEST_URI Nginx.conf should look something like: location / { autoindex on; index index.html index.htm index.php; try_files…
-
11
votes1
answer347
viewsA: Remove extensions that I don’t use would impact PHP page execution performance
Although I agree with the comments and the another response from Brittz, there are still extensions that when disabled improve the performance of the server, today it is somewhat unusual but in the…
-
2
votes2
answers865
viewsA: How to view image without an extension via direct link in the browser?
Using only. htaccess may not be possible, this is because there are several image types and it would be difficult to add the mime-type to each one, however you can redirect to a php handle this, for…
-
3
votes4
answers541
viewsA: Concatenate 2 PHP variables into SQL statement
This gets very complex, use arrays, for this reason they exist because if not you will have to use eval, which would be something like (recommend that don’t use eval, is only to exemplify): $var1 =…
-
3
votes1
answer212
viewsA: Grab file name that does not have extension using foreach (glob())
You can use: strpos to find out if the name has dot (.) array_filter to filter the array before iterating in the foreach basename to get only the file name It would look something like: <?php…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer329
viewsA: What is the difference between the element and this in jQuery’s $.each function
There is no difference between the two, as described in: Each time the callback runs, it is passed the Current loop iteration, Beginning from 0. More importantly, the callback is Fired in the…
jqueryanswered Guilherme Nascimento 98,651 -
1
votes1
answer77
viewsA: jQuery load access denied
the $().load is not used to insert DOM into the page, it is used for HTML content requests generated by the back end for popular front end elements, if you want to load an Object element do so:…
-
2
votes1
answer169
viewsA: Rename file after 1 minute
With Javascript + Ajax Instead of using embed use tag <audio>, because it has Javascript events that can combine with ajax to achieve the desired effect, so do so: <audio id="audio"…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer651
viewsA: View a Youtube video via videoView via Xamarin
There is no way, youtube provides the API itself, they will never provide the real URL of the Youtube video, so why would it violate various legal concepts, as well as the right of owners, out who…
-
-1
votes2
answers1422
viewsA: Application rejected by Apple Ipv6 error
According to this answer https://stackoverflow.com/a/37896631/1518921 you can resolve in Cordova using this plugin Cordova-HTTP, you’re wearing Afnetworking v3.1.0 And you can do something like: //…
-
3
votes1
answer863
viewsA: How to display an image with file_get_contents
With the URI Scheme data protocol The file_get_contents only returns content binary image, if you want to display an image and delete in the same call you can use the data URI Scheme, thus: function…
phpanswered Guilherme Nascimento 98,651 -
6
votes2
answers215
viewsA: How to determine if a number is infinite using Javascript?
Apart from the example of the other answer that got very good, you can also do so: var n = ...; //Valor infinito ou não var isInfinite = (!isNaN(n) && !isFinite(n)); console.log(isInfinite);…
javascriptanswered Guilherme Nascimento 98,651 -
3
votes2
answers1248
viewsA: I need to create an extension for Google Chrome that runs a . exe or something similar
This is not possible, there is no way around it as it is intentional that it is not possible (for safety reasons) to fire an executable What you can do is try to recreate yours. exe as a…
-
1
votes1
answer57
viewsA: Keep form data when opening and closing extension?
Got it, you want to avoid losing the data on when not completing the form accidentally close the extension popup, is this? You can use localStorage, for example: localStorage.setItem('meuForm', '...…
-
20
votes2
answers11677
viewsA: Namespaces and Use when to use and for what purpose?
The namespaces are similar in several programming languages, as this answer explains How namespaces work in C#? (even though the subject is a different language) I make up the words of Maniero my:…
-
1
votes1
answer1284
viewsA: Eclipse Error: Intializing Java Tooling
This is one of your projects that is causing the problem you will probably have to identify, one of them that is causing the error java.lang.NullPointerException, this error is very Generic, it can…
-
4
votes3
answers12026
viewsA: Vertical text with css (90º)
Outside the Rotate (which will modify the entire div) if you just want to change the writing, without affecting the background, border and spacing, you can use the writing-mode. comes by default as…
-
6
votes1
answer539
viewsA: Automatic textarea
Only an HTML5 note goes beyond tags, so the resolution here is not quite this one. In the case only with HTML and CSS there is no way to do. I don’t quite understand what you mean by arrow and…