Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes2
answers3113
viewsA: Obsolete PECL/PHP PDO_OCI extension. How to proceed?
According to the link which is obsolete is the PECL version, from PHP5.3 this extension is standard in PHP and so maybe the PECL repository has been discontinued. If extensions are not already on…
-
1
votes1
answer50
viewsA: Set the variable value as an equation
If I understand correctly, you want to save a mathematical equation and run it only when it’s interesting? A simple example would be to use eval();: var x = "1 + 2 * 3"; var y = eval(x);…
-
0
votes1
answer199
viewsA: How to use client ip in file_get_contents
In a short answer Is not possible do this via PHP, as well as: Your browser is client from your PHP server. PHP will be client mp4upload. In other words, it is your server that is taking the data…
phpanswered Guilherme Nascimento 98,651 -
3
votes2
answers362
viewsA: Is it necessary to invoke the functions "Showwindow" and "Updatewindow"?
I don’t know how you wrote the application, but we can say that some functions already call these cited functions "automatically" which would actually make it redundant. Showwindow But note that the…
-
2
votes1
answer203
viewsA: How to modify the view path with htaccess
Use the RewriteBase and set the whole path in Regex and the file . htaccess should be in the root folder. You should use to point everything to the folder /view/html: RewriteEngine On RewriteBase /…
htaccessanswered Guilherme Nascimento 98,651 -
0
votes3
answers3573
viewsA: How to display only half of the div background-color
Being a "color" you can use linear-gradient .horizontal .inner, .vertical .inner, .diagonal .inner { width:320px; height: 80px; margin: 0 0 10px 0; } .horizontal .inner { background:…
-
1
votes2
answers6568
viewsA: Connect PHP with Oracle
The function ora_logon was a function used in the old days (at the same time) in the PHP4, today we no longer use it, now we use it oci_login for example, which allows access to 12c, 11g, 10g, 9i…
-
4
votes2
answers1209
viewsA: Can Enum values only be integer?
In accordance with the documentation the only types accepted by Enum sane: byte, sbyte, short, ushort, int, uint, long and ulong I don’t use much C#, but in other programming languages, if I’m not…
-
1
votes1
answer111
viewsA: Adding Event Click on a Twitter Typeahead Result
The event typeahead:selected does not exist, the correct would be typeahead:select, to take the value of the array, use the second argument (value that is displayed in the input):…
-
2
votes1
answer388
viewsA: Curl PHP login url post 302
Actually it is going "perfect", the problem is that you have not enabled redirection, for this use: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); Use this way: $ch = curl_init(); curl_setopt($ch,…
-
3
votes2
answers501
viewsA: Open an executable file using VB or CMD
In VB you can use the arguments, for example call the Notepad: System.Diagnostics.Process.Start("notepad.exe", "c:\arquivo.txt") And the cmd would be something like: start "notepad.exe"…
-
2
votes1
answer761
viewsA: C++ class with multiple constructors - Header and cpp file
Instead of "run" the class call directly with: private: Ui::MainWindow *ui; Calculadora calc; // aqui dá o erro!!!! Do so: private: Ui::MainWindow *ui; Calculadora *calc; And on CPP call it that:…
-
4
votes2
answers1225
viewsA: How to read and render a.txt file in the Django template?
I’ll assume the apostrophes ' do not exist, so your file . txt should be something like: 1;one;foo 2;two;bar 3;foo;bar Each line would be equivalent to a database line, this format is very similar…
-
13
votes2
answers11938
viewsA: Get national holidays
You can use the http://holidayapi.com which is an API that supports the following countries/regions BE, BR, GB, NO or US (note that you use the ISO 3166-1 alpha-2 which is version alpha). Just make…
-
3
votes1
answer656
viewsA: Ajax is returning Undefined
Try this, this will generate an error json, like this {error: "Erro de conexão"}: $conexao = mysqli_connect($server, $usuario, $senha) or die(json_encode(array( 'error' => mysqli_connect_error()…
-
3
votes2
answers2104
viewsA: How to camouflage a page link
What happens is the call checks the REFERER, as per wikipedia: The referer, or HTTP referer (is misspelled as a referer in the official HTTP specifications and has been standardized since then), is…
-
4
votes2
answers485
viewsA: Return and console.log do not work as expected in Codecademy
The return is an instruction for the function, has no connection with the console.log. The console.log is a method that was "idealized" a short time ago (when there was already javascript and…
javascriptanswered Guilherme Nascimento 98,651 -
3
votes1
answer610
viewsA: How to set up mopub ads?
While reading these messages 06-19 14:31:10.973 2319-2319/NomeDaPeckage. D/MoPub﹕ Failed to retrieve GPS location: access appears to be disabled. 06-19 14:31:10.983 2319-2319/NomeDaPeckage. D/MoPub﹕…
-
4
votes3
answers487
viewsA: Navigate horizontal scroll by pressing tab
I don’t know what version of Internet Explorer, but many problems are caused due to Chircksmode, to help avoid problems of this type recommend using this meta-tag: <meta…
-
5
votes2
answers2851
viewsA: Check if user closed browser
In a short answer Is not possible send a request as soon as the browser window is closed to instance of it is destroyed and has no way to send a request in time for the back-end. The best way, as…
-
6
votes1
answer859
viewsA: How to convert String that contains String quotes even using replaceAll?
replaceAll in quotes It would be something like: String a = "Meu pai é um Grande "baio" de fada"; a = a.replaceAll("\"", "\\\""); In this case will exchange any quotes found, regardless if it is…
javaanswered Guilherme Nascimento 98,651 -
2
votes1
answer1585
viewsA: Logout with Javascript Event when closing the window
The window.confirm will not work because the structure of onbeforeunload already owns a return to the confirmation screen, I believe that the correct would be this: window.onbeforeunload =…
javascriptanswered Guilherme Nascimento 98,651 -
4
votes1
answer998
viewsA: Does PHP support Bluetooth?
The Bluetooth control will only work on the server (on the server side), ie if the user accesses from his computer he will only be able to send "commands", but the machine that will be running this…
-
1
votes1
answer586
viewsA: How to transfer content from a contenteditable div to a textarea or input?
The .text("\""+valor + "\"") is usually used to manipulate the DOM and not the value of the field (I don’t know the core of jQuery deeply), also did not understand the quotes here "\""+valor + "\"".…
-
4
votes1
answer1449
viewsA: Enable PHP File Info Extension - Runtime
At runtime to enable an extension you must use dl: dl('/path/fileinfo.so'); But I’m almost sure this will not work due to users' permission level. In accordance with @bfavaretto - Heed: The function…
phpanswered Guilherme Nascimento 98,651 -
6
votes3
answers161
viewsA: This Javascript loop is taking down my browser. Any idea why?
This is because at each loop it takes the value of str.length again, but with each loop length of str is updated and probably always increases when using str.splice. I recommend that you define a…
-
6
votes2
answers304
viewsA: Make a subdomain or create a subfolder?
Not necessarily, seems to me a little exaggeration of it (and even lack of knowledge, or confusion of it). What is insecure If the site.com.br/intranet page contains session cookies (or other…
-
0
votes1
answer541
viewsA: Directory Listing: 403 Forbidden Nginx
Instead of root C:\Project ; use like this root C:/Project;, recommend using inside location / { (as it is in the default configuration). It looks like you’re trying to set it up with PHP, note that…
nginxanswered Guilherme Nascimento 98,651 -
1
votes2
answers364
viewsA: slideToggle hides multiple Ivs when it should hide/display only one at a time
Apparently he’s using jQuery, in case you could avoid using the "protocol" javascript: and use something less obstructive as for example $(document).on('click', seu seletor) combined with the…
-
4
votes2
answers123
viewsA: Error Unexpected token for
What the @Jair said is correct, just to complement, you created an object that is not added anywhere and still added a comma at the end without purpose, it makes me think that you still need some…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer115
viewsA: Error creating "Google Sitelinks"
These links sites are usually automatic and the json used would only be to configure the search "internal directed" (in the case appears that search engine and it directs to the search engine of…
rich-snippetsanswered Guilherme Nascimento 98,651 -
1
votes1
answer391
viewsA: Android SDK Build-tools 22.0.1 inventing folders inside res in generated APK
Some features of Material Design like the Material Theme and custom transitions activities are only available on Android 5.0 (API level 21) and higher. However, you can design your applications to…
-
1
votes2
answers6623
viewsA: Website does not update in real time, cache problem
If the pages you refer to are PHP files they usually don’t cache (ranging from browser to browser), to avoid caching create a file called global.php and add the following content: <?php $g =…
-
1
votes3
answers262
viewsA: How to Pass Arguments to a class Ex: Dim t as new TL("string","string","string")
The mistake Too many arguments to "Public Sub New" means that you passed over arguments in the constructor method. Looking at the code it seems that the amount of arguments is ok: Public Sub…
vb.netanswered Guilherme Nascimento 98,651 -
1
votes1
answer2358
viewsA: How to send data via POST and recover in a PHP?
The only parameter you did not submit was the method, in case I believe it lacks valores.add(new BasicNameValuePair("method", "send-json")); The code must be something like: HttpClient httpClient =…
-
2
votes3
answers1202
viewsA: Remove a letter from the alphabet with FOR
You can use a if simple for this and can also use the implode to concatenate, do this: <?php $todasLetras = array(); //Salvar o valor em uma variavel pode melhorar um pouco a performance $final =…
phpanswered Guilherme Nascimento 98,651 -
1
votes2
answers108
viewsA: Converting mp3 to ogg in php in joomla
The safe_mode this in disuse in PHP5.3 and was removed in PHP5.4 The most correct way is to use the function exec with $output and pass the arguments with escapeshellcmd (in the case of Windows), if…
-
1
votes3
answers2076
viewsA: Wampserver 2.5 installation/run error
I make the following recommendation: Back up the folder c:\wamp\www Back up tables by using on cmd (change the folder mysql5.5.24 as needed) First view the tables with the command: cd…
-
1
votes1
answer371
viewsA: Add current page to browser bookmarks
Virtually all functions that you used still work, but does not work in all browsers and there is no solution for this, for example Chromium browsers (Google Chrome, Opera, Comodo Dragon, etc) block…
-
1
votes2
answers494
viewsA: Directing all root traffic to sub folder results in "403 Forbidden" error if you do not have "index.php"
By using the flag (flare) R=301 the rewrite force the redirect, which I understand you don’t want to redirect, but just rewrite the URL, if that’s the case, you nay must use this flag, just use:…
-
1
votes1
answer265
viewsA: How to attach file in email?
For this I believe you will have to use the module MIME::Lite, download him into http://www.cpan.org/authors/id/R/RJ/RJBS/MIME-Lite-3.030.tar.gz Note: if the link is out of date access here…
-
2
votes1
answer3563
viewsA: When selecting an option in select Exchange form fields
You’ll have to use a little css and a little js Notes before you start I recommend not using accents in the Names and ids attributes, e.g. <select name="Inscrição"> for <select…
-
2
votes1
answer840
viewsA: Anomalous Behavior of Google Analytics
We can say that yes, all seem to me "correct" with the logic of the functioning of most of the "online accountants", I hope this helps you: Q: When I open 2 to infinite pages of my site in a single…
-
4
votes1
answer1205
viewsA: Picking URL parameters in PHP
You can use .htaccess chance is using Apache. Create a file called .htaccess in the main folder of your website and add the following content: RewriteEngine On RewriteBase / #Verifica se o arquivo…
phpanswered Guilherme Nascimento 98,651 -
4
votes1
answer476
viewsA: Session does not start in php via htaccess
Note: in case the author is experiencing the free version of Hostinger, which is probably limited and lacks full support (I can’t say, it’s an assumption) and this seems to be the reason for the…
-
1
votes2
answers1280
viewsA: How to redirect the user (to another page) after your choice?
Like I posted on another answer the example of redirecting and explained: Use the event change, as in the example the beginning of the code should look like this: window.onload = function() { var…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes2
answers56
viewsA: Distribute programs without losing the path/path at runtime
Assuming both executables are in the same folder, you will have to use Directory.GetCurrentDirectory(), an example of folder structure: projeto ├── programa.exe └── resources ├── app1.exe ├──…
-
1
votes2
answers1590
viewsA: GNRE Webservice Integration with C#
The mistake 500 Internal Server Error occurs when: Failure in server configuration A server dependency has stopped working Instructions sent incorrectly to the headers or to the content body Note…
-
6
votes2
answers3577
viewsA: Filter states and cities from library cities-states-js
I suggest that after executing dgCidadesEstados, you can use removeChild, for this it will be necessary two loops and a if, example: Note: recommend updating the library to version 1.4 (27/05/2015 -…
javascriptanswered Guilherme Nascimento 98,651 -
0
votes2
answers1263
viewsA: Shooting click event with Trigger does not work as expected
It is likely that the selector is wrong, to make the test use the console.log (I noticed that you are already familiar with advanced features of browser and javascript so I will not go into detail),…