Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
13
votes2
answers1599
viewsA: What is Github really for?
Github is a website and service that provides GIT free and paid and has WEB management interface, without needing to install a GIT client. To understand Github you need to understand the service…
githubanswered Guilherme Nascimento 98,651 -
5
votes2
answers1634
viewsA: Search the city for DDD
There is the http://ddd.pricez.com.br and can use with PHP or jQuery (or any HTTP query medium) DDD query with jQuery: var siglaEstado = "am"; var url = "https://ddd.pricez.com.br/estados/" +…
-
6
votes2
answers173
viewsA: Transform text to text on Hover!
There is no way, first because the only pseudo-element that exists for lines is the ::first-line and he will only catch the first lines, according to the font-style other than font-weight does not…
-
3
votes2
answers507
viewsA: How to make a div Scale without changing the child elements?
Can exchange opacity for rgba in the attributes border, being like this: .quadrado{ width: 18.5vw; margin-left: 5vw; height: 18.5vw; overflow: hidden; float: left; display: inline-block; box-sizing:…
-
0
votes4
answers747
viewsA: Regex in Python to find several possible names
First problem: your regex will not work with .match, he demands that you marry completely string with its regex. Second problem: Another thing, your file .txt may be in UTF-8 and so he might not…
-
4
votes2
answers315
viewsA: Collecting words from an input
Can use LIKE and OR in the query and preg_split (equivalent to explode, but you can isolate more spaces without needing to filter) in PHP to split the string: if (isset($_POST['busca']{0})) { //Tem…
-
1
votes1
answer1395
viewsA: How to send application files to the API
reactive-Native upload It would look something like: const data = new FormData(); data.append('campo_foto_use_no_laravel', { uri: photo.uri, type: 'image/jpeg', // ou photo.type name: 'minhaFoto' //…
-
3
votes1
answer4373
viewsA: How to create a program that enters the web and takes data from the stock exchange
You can use the suggestions of: API for stock exchange quotation Sane all via HTTP and paid, the only one marked as free is for the Excel program and I don’t think will serve for this, the example…
python-3.xanswered Guilherme Nascimento 98,651 -
5
votes2
answers523
viewsA: What is $_GET['path']?
The variable $_GET is a super-global used to take values from querystring. Querystring, it would be anything that comes after the ? in the URL, example: http://site.com/pagina?foo=bar&baz=foobar…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer651
viewsA: Script for Telnet
Being java there is nothing ready that will do just that, you yourself have to create, however if you already have experience with Java, then the way is to use this: Execute cmd commands from Java…
-
4
votes4
answers110
viewsA: message : "div is not defined"
First problem (unrelated), has two jQuerys no need: <script type="text/javascript" src="javascript/jquery.js"></script> <script…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes1
answer29
viewsA: My regular expression filter does not work
First a tip, you don’t need isset if you’re already using empty, just do this: if (empty($_GET['h'])) { Your regex is using \w which is equivalent to doing this [A-Za-z0-9_], however its regex does…
phpanswered Guilherme Nascimento 98,651 -
3
votes3
answers447
viewsA: Comparison operator or isset()?
The isset is only to check if a variable or key exists within an array or stdObject, it is important to note that if the variable has the value NULL will also return false, so as examples: <?php…
phpanswered Guilherme Nascimento 98,651 -
1
votes0
answers244
viewsQ: What’s the difference between "zend_extension" and "Extension" in php.ini?
I noticed that some extensions like Opcache can only be activated (added) via zend_extension, in accordance with http://php.net/manual/en/opcache.installation.php: Platforms "not Windows":…
phpasked Guilherme Nascimento 98,651 -
1
votes1
answer257
viewsA: Undefined index: Submit
That’s not really a mistake, it’s a Notice only, in production this should not even be displayed, read more on: Why use error_reporting with display_errors and display_startup_errors? Still the…
phpanswered Guilherme Nascimento 98,651 -
0
votes2
answers1578
viewsA: Invalid characters in path in File.Move()
There are some problems: First problem: Has two variables path: string path = "C:\inetpub\site\videofolder\nome.mp4" string path = "C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine…
-
2
votes2
answers1249
viewsA: Shortening the names of people
My suggestion is to use mb_convert_case (that will support the accents) to normalize and preg_split to divide Note: to use functions mb_ it is necessary to activate the mbstring In php.ini remove…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer1235
viewsA: Mascara Javascript
Just apply maxlength counting all characters in 999,99, which in case would be 6, basically would give to apply the maxlength for almost any mask you find. Of course some jQuery plugins and the like…
javascriptanswered Guilherme Nascimento 98,651 -
13
votes1
answer1387
viewsA: Difference between exhaust, encodeURI and encodeURIComponent
According to the MDN: Function escape Note: in accordance with Microsoft Docs and MDN the function escape is obsolete, encodeURI and encodeURIComponent in its place (depending on the need) The…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes1
answer57
viewsA: Prevent one image from overwriting another in the input file
Just use is_file and create a recursive function to avoid duplicating function increment_name($path) { //Se o arquivo não existir o nome será aceito if (!is_file($path)) { return $path; } //Pega as…
phpanswered Guilherme Nascimento 98,651 -
9
votes3
answers432
viewsA: CSS operators with @
In accordance with the documentation that’s called at-Rule (probably rule-arroba in English) There are several at-Rules, designated by their identifiers, each with a different syntax: @charset -…
-
5
votes1
answer1548
viewsA: Save PDF file to PHP temp
You can use the stream called php://temp Using MPDF If you are using MPDF (version 7) you probably use Composer to install, then it should look like this: require_once __DIR__ .…
-
7
votes5
answers11566
viewsA: How to find the type of a variable given by the user?
Even if he type 1 or 1.0 will be string anyway, a string can be numerically formatted normally, just because 1 is a number doesn’t mean his type will be int. What you can do is use two regex to…
-
15
votes2
answers916
viewsA: How to minimize an application in C#?
You will have to search the application by name or ID via Process.GetProcesses, or Process.GetProcessByName, or Process.GetProcessById An important detail, there is no way to minimize to the…
-
5
votes3
answers2012
viewsA: Why does Scanner return error on something that is within the expected?
The class Scanner has several methods with the term next*, as being: next() search and return the next complete TOKEN (return: String) nextBigDecimal() Scans the next TOKEN of an input and returns…
-
6
votes2
answers936
viewsA: What is the @media selector in CSS for?
The @media known as media-query would be a condition to which you can specify an equipment, size, resolution, format, rotation, etc. The use is simple: @media(<condição>) { <css desejado…
css3answered Guilherme Nascimento 98,651 -
3
votes1
answer386
viewsA: Recursiveness in PHP
When the fatorial is called within the: return $num*fatorial($num-1); The $num is subtracted by - (in fatorial($num-1)), then the $num that began with 5 next call will be 4, when you get to the…
phpanswered Guilherme Nascimento 98,651 -
0
votes2
answers596
viewsA: Path to JSP image
I don’t know much about Tomcat, but I believe in its application exists the server.xml, in it there must be a place written something like: <Host name="localhost" appBase="webapps" ...> ...…
-
3
votes1
answer1536
viewsA: console.log is not working
Probably <%= sListaCargo %> is returning a string, it would only take effect the way it did if it went to Javascript a format that was interpreted as Number, Object, Array, Boolean, in case it…
-
0
votes1
answer28
viewsA: Image conversion with PHP
I’m not quite sure, but I think I have to convert to VARCHAR SELECT *, CAST(SUBSTRING(blob1 FROM 1 FOR 80) AS VARCHAR(80)) AS IMAGECHAR And would pass like this:…
-
1
votes1
answer676
viewsA: Incorrect mime for XLS files
The HttpPostedFile.ContentType doesn’t catch the mime-type of the file while running, it picks up the content-type that the browser reported in payload during the request, or whatever determined…
-
0
votes1
answer31
viewsA: Does Jcache exist on the JEE platform?
I believe that the Jcache (JSR107) is only available from JEE8, because in 7 there were some problems, as reported in this blog link of Oracle:…
jeeanswered Guilherme Nascimento 98,651 -
2
votes1
answer196
viewsA: Doubt with the ternary operator
This is similar to an if: struct Node *temp = root->left ? root->left : root->right; and would be equivalent to doing this: struct Node *temp; if (root->left) { temp = root->left; }…
-
9
votes3
answers324
viewsA: Why the two points twice?
Because the ::after and ::before are pseudo elements and not selectors, there are others so too, ie they do not affect the element itself, but rather a pseudo element, current pseudo-elements…
css3answered Guilherme Nascimento 98,651 -
1
votes1
answer25
viewsA: Condition on a list
the .ToArray owns the property Array.Length, I think this should work if ( csv.Length == 0 ) { string display = "Não ha registro nesta data."; ClientScript.RegisterStartupScript(this.GetType(),…
-
1
votes1
answer133
viewsA: CSS misaligned menu items
As I have explained in: Div bootstrap misaligned Side by side in Bootstrap, jumping line Problem Aligning Content with CSS The sum of the cols has to be always the same to 12, however its cols-Xs…
-
1
votes1
answer368
viewsA: pause Navigator.getUserMedia
Pause camera (Mediarecorder) Try MediaRecorder.pause() and MediaRecorder.resume() to restore, you can also use . pause in the video (if you have a video player), follow a simple example: Important…
-
0
votes2
answers950
viewsA: Is there any method for me to create translations of pages with Javascript or Typescript?
If you want something automatic you can use the Google Translator, example: <!DOCTYPE html> <html> <head> </head> <body> <div…
-
1
votes1
answer351
viewsA: How to install LLVM?
You can download the installers for windows on: http://releases.llvm.org/download.html In this case there are two versions: http://releases.llvm.org/5.0.0/LLVM-5.0.0-win32.exe…
-
0
votes2
answers4907
viewsA: Which encoding to use when it comes to accent?
The ISO-8859-1 is a Latin alphabet encoding, but I know the ISO has discontinued it, but if it works for you keep using it. perhaps it has to do with your difficult to know ide with little…
javaanswered Guilherme Nascimento 98,651 -
4
votes2
answers539
viewsA: Keep script running
Even if whoever starts the task is a browser that requested your page, still have to schedule, which can be done by functions such as: exec system shell_exec Because PHP on web is requested via HTTP…
-
1
votes1
answer525
viewsA: Magento installation giving php error Extension
Go on the php.ini in Xampp, and look for lines (if it’s Windows): ;extension=php_xsl.dll ;extension=php_soap.dll ;extension=php_intl.dll If you are on Windows open php.ini by Notepad++ or…
-
2
votes1
answer32
viewsA: Order file display according to extension
There is, just use usort, thus: <?php $arquivos = array("semext", "apple.doc", "foo.png", "apple.txt", "foo.png", "banana.jpg", "apple.txt"); function is_image_extension($name) { return…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer119
viewsA: How to project window2 on the secondary wpf screen?
Maybe the Screen.AllScreens[1] is picking up the first screen instead of the second, could try Screen.AllScreens[0], or do exactly similar to reply from @vnbrs, but instead of using DeviceName would…
-
6
votes2
answers615
viewsA: How to play something similar to CSS in Windows Form?
No, CSS is not a matter of web technology, it is whether the renderer supports, and in case it is not something implemented, there are desktop softwares that give some similar support, such as Qt…
-
0
votes1
answer70
viewsA: "D/Error.Response: com.android.Volley.Parseerror: com.google.gson.Jsonsyntaxexception: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $"
This is happening because JSON is malformed, so I opened the URL http://reservacomdomanda.com/areaAdmin/api/admin_estabelecimento/reqScheduleProJson.php and soon noticed the problem Parse error:…
androidanswered Guilherme Nascimento 98,651 -
2
votes2
answers102
viewsA: Problem Aligning Content with CSS
How did I respond in: Side by side in Bootstrap, jumping line Prevent line breaking (encavalating) in col-Md bootstrap The sum of all cols should always be 12, for example: If you have 4 Divs with…
-
2
votes1
answer310
viewsA: How the PNG file works
There is not only 256-color PNG, there are 24bit and 32bit PNG images and they are not only composed of pixels, but are composed of several layers (filters), so your calculation is not correct,…
imageanswered Guilherme Nascimento 98,651 -
5
votes3
answers27822
viewsA: Show/Hide with CSS only
Another way that I think works and that I happen to need if the show/hide button is in another element which will make it impossible to use the ~ as in the example with :checked, would use the…
-
0
votes2
answers977
viewsA: Table body with overflow:scroll misaligned relative to header (HTML/CSS)
It is impossible to hit/fix this, each operating system or browser will have a type of scrollbar, the width will never be the desired Another problem in your code is that you are applying col- which…