Posts by Renaro Santos • 1,009 points
26 posts
-
1
votes2
answers864
viewsA: Login to facebook using custom button
You call straight the following method: LoginManager.getInstance().logInWithReadPermissions(activity, Arrays.asList("public_profile")); Then, don’t forget to register the Callbacks and pass the call…
-
1
votes1
answer570
viewsA: The form does not send data to the database
The error is quite descriptive, the $_GET['ID'] variable is not defined. Solution: if(isset($_GET['ID'])) $filtro_topico = $_GET['ID']; else $filtro_topico = ID_PADRAO;//ID_PADRAO = valor padrao…
-
1
votes2
answers66
viewsA: Using a map to store 1 ID for N values?
You can use Hashmap. Do the following: HashMap<Integer,ArrayList<Integer>> map=new HashMap<Integer,ArrayList<Integer>>(); // chave = 3 , {1,22,27,28} map.put(3, new…
-
3
votes2
answers4590
viewsQ: Add a line<tr> before another line that has an ID
I need to add a row at a specific table position, using Javascript. Example: <table> <tr><td>Teste</td></tr> <!-- Inserir linha aqui! --> <tr id="id_2">…
-
5
votes1
answer331
viewsQ: Android and HTTP request field X-auth-token
I am trying to send a token, through an Android application in the 'X-auth-token' header field. This request is sent to a PHP server, where I use Codeigniter. Android HttpClient httpClient = new…
-
1
votes2
answers594
viewsA: Validating two date fields
Check that the fields are empty, Voce can do this using Javascript and PHP. Put ID’s in the elements: <script> function validar(){ var data1= document.getElementById("data1").value; var data2=…
-
1
votes2
answers164
viewsA: App Automaticao Residencial
There are different ways to do this: Save button status in the bank (What I recommend). Receive modifications made to your commands Activity using the method onActivityResult(), and then, when you…
-
0
votes1
answer56
viewsA: Android Problems with R
I had that problem once, it was solved with: Build->Clean Project If it still doesn’t work, try: Tools->Android->"Sync Project with Gradle Files"…
android-layoutanswered Renaro Santos 1,009 -
2
votes1
answer419
viewsA: Replace content according to search without having to give
You must create a separate script that receives what you have typed and returns the query. So call this script via Ajax. example: seu_script.php <?php $dados= $_POST['dados']; //faça o…
-
1
votes1
answer1744
viewsQ: Open Android app with link
I want to know, Cerberus, for Android, can open your application when we call a certain number? For those who do not know Cerberus, it is an anti-theft application, so it hides its icon so that…
-
25
votes3
answers9925
viewsQ: Difference between './', '.. /' and '/'
In some codes I work, sometimes there is no global variable that points to the root of the project, such as: $RAIZ='PATH/EXAMPLE/'; So they often use: src='./somePath'; src='../somePath';…
-
1
votes1
answer49
viewsA: Problem with database data visualization
It seems to me that you’re trying to access the bank when it’s closed. Maybe putting a db.open() within the insert method resolve. Do not forget the bd.close() also.…
androidanswered Renaro Santos 1,009 -
0
votes1
answer46
viewsA: Insertion with non-standard characters
Try to modify the encoding of your editor, in Notepad++ for example it is possible to do it this way: Test UTF-8 Encoding (without BOM).…
-
13
votes4
answers6072
viewsA: How to write code as an example, without running?
You can use it <xmp> <p>Blah teste</p> </xmp> The xmp tag does not need to use escape characters. The result will be: <p>Blah teste</p>…
-
0
votes3
answers15590
viewsA: How to call a JS variable for an H1 HTML
You can do it this way: var count = 0; $("li").each(function(){ count++; }); $( "#varh1").html("I have "+count+" list items"); In which varh1 is the ID of element H1…
-
0
votes1
answer82
viewsA: How to name a text file with Edittext information?
The correct is: FileOutputStream ArqTexto = new FileOutputStream(Environment.getExternalStorageDirectory() +"/"+ VariavelNome +".txt"); The bar was missing.
-
1
votes2
answers1198
viewsA: Make an algorithm to calculate the number of days elapsed between two dates
Do not invent the wheel, use what you have ready: Use Datetime $date1 = new DateTime("2007-03-24"); $date2 = new DateTime("2009-06-26"); $interval = $date1->diff($date2); echo "diferença" .…
-
11
votes2
answers4523
viewsQ: Inner Class in Java, when to use?
Sometimes I find class codes with Inner class, such as: class ClasseExterna { private int a = 10; // ... class InnerClass { public void accessOuter() { System.out.println("Outra classe " + a); } //…
-
2
votes1
answer4304
viewsQ: Difference between WADL and WSDL
Simply put, what is the difference between the WSDL and WADL specifications, as far as they are concerned: Access Method Limitations I still don’t understand when I should use one or the other.…
-
0
votes4
answers14347
viewsA: How to take a String value before a Special character
One of the ways to do it, in Javascript is the following: <script> function myFunction() { var str = "E ai mané.Tudo bem?"; var n = str.search(/á|é|í|ó|ú|(|)/); ///coloque aqui todos os…
-
0
votes2
answers2124
viewsA: How to save an Sqlite database table to a text file on Android?
You must use it Assynctask for this type of operation. Has a code practically ready here https://stackoverflow.com/questions/8724866/how-to-convert-data-base-records-into-csv-file-in-android…
-
6
votes5
answers31170
viewsA: What are Try/Catch Blocks for and when should they be used?
To simplify, imagine that Voce is doing some operations, for example splitting. var a = b / c; What happens if C assumes the value of 0? The program will show a 0 division error. Errors of this type…
-
1
votes2
answers423
viewsQ: Codeigniter , Session class is safe?
Codeigniter has its own Session class, that is, it does not use PHP native Sessions. Note: The Session class does not utilize Native PHP Sessions. It generates its Own Session data, Offering more…
-
1
votes2
answers3824
viewsA: What is the best way to save files, Bank or File System?
There is no correct answer to your question, there are many things to take into account, for example : the amount of files to be generated frequency of use security guard others... However, I would…
-
2
votes1
answer36
viewsA: Take Characters from Background
Right click on the code, go to Preferences > General > Editors > Text Editors. It has a checkbox called "Show whitespace characters". If Voce uncheck this checkbox will return to normal. If…
eclipseanswered Renaro Santos 1,009 -
6
votes3
answers325
viewsA: Create select using "for" cycle
Using PHP: <select name="exemplo" id="exemplo"> <?php for($i=1 ; $i <49; $i++) echo"<option value='$i'>'$i'</option>"; ?> </select>…