Posts by Hiago Souza • 5,837 points
240 posts
-
1
votes1
answer135
viewsA: Reading and writing problems
When the file is already opened by one process you cannot edit it in another. Example: If the arquivo01.php is with the open file (fopen), php. or even another process of arquivo01.php cannot open…
-
3
votes2
answers626
viewsQ: Encrypt ini files
I need a script that Compile a .ini to avoid an easy read. The file should be read with PHP. It seems that C# has a similar feature. The question is how do I do it and then read the .ini with PHP.…
-
0
votes0
answers64
viewsQ: Throwable error returns null
I have a problem I need to receive the memory stream of a webservice that was developed in C#. The following routine worked correctly, but now it keeps falling in the catch and the exception comes…
-
6
votes1
answer604
viewsQ: Run Fullscreen program on Windows 7
Hello I have a project already finished, it was written in C language as I do so that it runs in fullscreen in windows 7? Do you have a library for this? I’ve been looking on the internet but I…
-
1
votes5
answers11840
viewsA: Upload limit with php.ini in Wordpress
Go to your wp-config.php and add the line below ini_set("upload_max_filesize","128M"); // essa linha serve para alterar o valor do upload_max_filesize.…
-
0
votes3
answers3234
viewsQ: Picking up IP LAN for sending with ajax
I need to get the ip "LOCAL" (LAN) using javascript. I happen to have an application on my servers, but a client requested a customized service. I need to retrieve the client’s local IP address over…
-
3
votes1
answer1352
viewsQ: Generate 10-character random alphanumeric code
I have today an application that is presenting data divergence because of the return time of a webservice. To get around this we created a code to prevent this particular information from ever…
-
5
votes1
answer130
viewsQ: Time is early in program . C
I have an application in .c, I finished it but I have a problem with the time. Example: I am recording everything that is done with date and time only the time is early. When I do an operation at…
-
0
votes2
answers381
viewsA: Text that slides when hovering the mouse
You can use a jQuery plugin in case, there are several options. design site: http://remysharp.com/2008/09/10/the-silky-smooth-marquee online example: http://download.remysharp.com/marquee.html…
-
1
votes1
answer600
viewsA: How to automatically select menu item?
Put a name tag in your iframe, right after clicking the link put the target to the iframe name. <a href="http://www.hiago.me" target="teste" >Teste</a> <iframe id="if" name="teste"…
-
0
votes2
answers97
viewsA: Attr with Internet Explorer
I use with attr the data-* attributes in IE all the time, I never had a problem. Here is an online version, only tested on IE6, IE7 and IE9. It doesn’t have my IE8 box handy, but again, I never had…
-
1
votes2
answers757
viewsQ: Analyzing resource consumption by script
I have a server with S.Ubuntu Server 12.04 LTS, on this machine I have apache2 with PHP5 and PERL installed, but it consumes a lot of CPU resource, I wonder if it is a script with more problem for…
-
1
votes1
answer1336
viewsA: Perform action when closing browser
You might consider using logic to determine whether the person is online or not! Example, create in your table in the database a field called ping_usuario ai you can create an ajax function that…
-
7
votes1
answer576
viewsA: Dynamic site with multiple pages of results
You search for PHP paging, before that you need to understand what paging is. Result paging is something very simple. We do a search in a certain table of the Database, and with the search result,…
-
5
votes1
answer4892
viewsA: How to use the pointer concept in php?
In PHP it can be called both pointers and references. References, in PHP, means accessing the same variable content through several names. But it is common to erroneously hear the expression "use of…
-
2
votes3
answers14211
viewsA: Pass data through POST with jquery
You can look at the documentation of $.ajax. Below is an example of how I would do! $.ajax({ url : '../pdfprotuna.php', dataType : 'html', type : 'POST', data : {npis : npis}, beforeSend : function…
-
1
votes1
answer232
viewsQ: Reading file in Objective C
I’m trying to read a file on. c, I can read everything right there but in the variable it returns me a whole content and a " n" that harms the rest of my code. Below is the section that performs the…
-
1
votes1
answer493
viewsA: Title in friendly URL
Well as I understand it, this is only a matter of logic. In your file, config.php I believe that it is in it that you are rescuing the url, you could create a variable to contain the title. <?php…
-
1
votes1
answer1277
viewsA: Error with SOAP webservice using PHP
The expected response type is an XML and it is receiving an HTML. Response not of type text/xml: text/html You can consume your service using REST Client for testing, and if so force the php header…
-
1
votes2
answers1677
viewsA: Jquery mask when typing text
I always have trouble with these masks, I just change the way the call works. For example you can change its implementation and put in the event on Focus follows an example below.…
-
0
votes0
answers266
viewsQ: Telephonymanager Android
I wonder what is returned on android in Class TelephonyManager when I call the method getDeviceId, the device has no chip. Because I need an identifier for the device and I thought about using the…
-
0
votes3
answers17687
viewsA: Get HTML and JS database connection
No, it is not possible to consider using webservices and communicating with jquery ajax.
-
4
votes1
answer108
viewsQ: Problem in Context and Sharedpreferences on android with service
I’m trying to create a service on android, it is ready however in running the application to. If I comment on the variables ctx and prefs, it works but I need them, can you tell me if there is…
-
1
votes2
answers75
viewsA: Rescue only the Multipart response body
Guys I redid everything and now it worked, below below the code I hope it will be useful to you. @SuppressLint("NewApi") public static JSONObject downloadMultiPart(String url) throws JSONException {…
-
1
votes2
answers75
viewsQ: Rescue only the Multipart response body
I am trying to download a JSON file, it is sent to me via Multipart, I can recover it but I don’t want to save it in a physical file, so I am taking the return and converting it into string. My…
-
2
votes1
answer431
viewsQ: Problem with large size JSON on android
I am receiving a JSON file from a Webservice, this file comes with the approximate size of 5.7M, ai ai quando eu converter seu conteúdo para Jsonarray usando a biblioteca Gson, ele apresenta me o…
-
0
votes1
answer77
viewsA: Reading XML with bug
In xml try to tag CDATA, follow example below: <![CDATA[ Matrículas para o 2º semestre inciadas! Não perca o prazo de sua re-matrícula que é de 10/08/2014 a 15/08/2014. Em caso de dúvidas entre…
androidanswered Hiago Souza 5,837 -
0
votes3
answers1119
viewsA: PHP is not displaying array output
The return is an object, you already solved another solution would be to use a foreach to traverse it. foreach($d as $dados){ echo $dados->nome.' - '.$dados->cpf_1.' - etc...<br>'; }…
-
1
votes3
answers953
viewsA: php script running as sudo
first - I don’t recommend running scripts by php with sudo, because as you said yourself, you don’t have much knowledge of linux, and that would be a huge loophole not only in your application but…
-
1
votes2
answers653
viewsA: How to generate PDF with little memory on the server?
I always use the MPDF, in terms of memory you can increase the maximum size of memory allocation in PHP with the ini_set("memory_limit","120M"); or the size I find necessary, in terms of performance…
-
1
votes1
answer215
viewsQ: Giving permission to another application to access my package
I have an application that has a certain audio file, which is in /data/data/meu_pacote/audio_anexo/audio.mp3, so far so good, the problem is that the Mediaplayer class of Android fails to run the…
-
0
votes2
answers392
viewsA: Page does not stop loading when using exec in WAMP
Exec waits for the end of the process to finish interpreting your code, a cool example for you to understand would be to do a test with the Notepad ("Notepad Windows."); <?php…
-
1
votes5
answers7780
viewsA: How to use str_replace in single quotes without removing the ones that are required?
Look up regular expressions with PHP, I’m not experienced with them yet, but I believe the example below solves your problem: <?php function ModificarTXT($str) { // Pego toda palavra que começa…
-
6
votes8
answers64831
viewsA: How to check if a checkbox is checked with PHP?
//Aqui verifico se o post do checkbox me retorna um valor verdadeiro ou falso (true ou false) $checkbox = $_POST["CheckBox"] ? "Marcado (true)" : "Desmarcado (false)"; echo $checkbox; //…
phpanswered Hiago Souza 5,837 -
3
votes9
answers30430
viewsA: How to debug code in PHP?
I don’t know where you are developing, but if it were on a Linux system it would be nice for you to disable errors by php.ini changing the keys expose_php = off and display_erros = off. So your…
-
0
votes3
answers856
viewsA: Query search for value in Database
Name the tables to show in which table the field you pass by "WHERE". Ex: $sql = mysql_query ("SELECT *, COUNT(*) FROM tabela1 AS tbl1, tabela2 AS tbl2 WHERE tbl1.campo1 = 0 and tbl2.campo2=…
-
1
votes3
answers5281
viewsA: Navigation without a refresh!
Follow an example of using ajax with jquery. <!-- Incluo o jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>…
-
0
votes6
answers2251
viewsA: Upload files (always in different folders)
I find it very useful to change the folders, but I believe you could do this procedure in a more dynamic way. Could generate the PDF already direct in PHP and set the header of the same, there are…
-
0
votes3
answers519
viewsA: Why can’t I connect to my Mysql server?
Try modifying your code and put this, if it doesn’t work select, I switch your id field to an integer so you can remove the simple quotes, and I also added a link to identify the connection.…
-
7
votes4
answers15751
viewsA: How to check if an image exists in a remote URL?
I’ve set up the function below that can check both images and web pages, or any other content that comes from the web. I get the answer from header request and compare codes. If 200 or 302 exists;…