Posts by Lucas Queiroz Ribeiro • 1,828 points
83 posts
-
0
votes1
answer43
viewsA: link last slide to next date
Well, I took a quick look at the library documentation you’re using, and I believe something like the following might work : From what I’ve seen this library "unslider" is implementing the Infinite…
-
0
votes2
answers10833
viewsA: Create a button to exit the app
On Android has no way to "close" effectively an application, only who does it is the operating system. What you can do is tell the system that you want to finish all the Activitys of your…
-
0
votes1
answer720
viewsA: React-router not rendering pages not found correctly
I was able to find where the error was. TL;DR By importing the bundle.jsthat contained client logic was not using /bundle.js and yes bundle.js Thus, even though the server did the correct page…
-
1
votes1
answer720
viewsQ: React-router not rendering pages not found correctly
I’m developing an application using React + React-router + Express to render to the server and injecting it into an EJS view. It is working properly, but I noticed that when not finding a route as…
-
1
votes1
answer915
viewsA: Check if page was loaded after button to be clicked
I don’t know exactly how you’re opening the tabs, but I think you need to keep the tab reference open and call the other tab in her onload. For example: var aba=…
-
4
votes2
answers59
viewsA: Table of users with same usernames
The safest way would be to add a single Constraint, in no way will you have equal usernames. In your application you treat code error "1062" which is relative to this single key violation and…
mysqlanswered Lucas Queiroz Ribeiro 1,828 -
2
votes2
answers247
viewsA: how to parse a json return with complex object
Just use json_decode($json,true) this way you will create an associative array. Example: <?php $json = '{ "transacao":{ "codigo":1, "nome":"bruno", "sobrenome":"richart", "idade":28, "endereco":{…
-
6
votes1
answer96
viewsA: What is the purpose of "X" at the beginning of some header names?
The use of "X" is a convention of custom protocol developers. (Practice already discouraged by RFC 6648) I never found an official version of the use of "X", but the most widespread version is that…
-
2
votes2
answers2872
viewsA: Click on button effect
You need to create a different shape for the "status": boot selected.xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"…
androidanswered Lucas Queiroz Ribeiro 1,828 -
1
votes1
answer696
viewsA: Recover firebase data with multiple parameters
Of documentation : You can only use one order-by method at a time. Calling an order-by method Multiple times in the same query throws an error. So that’s why you have a mistake. There may be a…
-
1
votes1
answer89
viewsA: Error when opening Listview of database
Your error is occurring by trying to access something that does not exist in Cursor, try to make the following changes: Implement the search within a block with exception handling. Check if your…
androidanswered Lucas Queiroz Ribeiro 1,828 -
2
votes2
answers1471
viewsA: Transform object array into only one array
If the array is always the same depth you can do : $array = array(); foreach ($arr as $obj){ $array[$obj->key] = $array[$obj->value]; }
-
4
votes1
answer730
viewsA: Recover firebase ID on a Listview
Firebase is not a relational database, so it does not have an "id" that is needed to make relationships. Being a Nosql (Nonrelational) database of type Documental your identifier is the "key", in…
-
0
votes1
answer209
viewsA: How to create a custom filter in the android lestview that searches for words after the space character
The SimpleAdapter does not support some filtors, switch to a ArrayAdapter or use a customized adapter, this for example implements Filterable, then allows a good amount of filters.…
-
1
votes1
answer201
viewsA: Insert image in Listview via JSON + SQL
Well, as it was not specified I would recommend that you do this using some of the existing tools (Glide is even maintained by Google) To use Glide you need to add its dependency. In your buid.Radle…
-
1
votes2
answers887
viewsA: How to send a full PHP page by email ?
Unable to send a PHP page by email, you can send the generated HTML from it. to send HTML you do : include_once("geradorHtml.php"); $geradorDeHtml = new Gerador(); $html =…
-
0
votes3
answers969
viewsA: Creating an Activity and calling multiple Layouts can be harmful?
The correct thing would be to use Fragments, Fragments are classes that have a Layout and require an Activity to work. An Fragment needs a "Manager" who will manage the transitions between one and…
-
4
votes3
answers461
viewsA: How to run . sh file on button
By HTML no, you have to make a call to a PHP page and run the code snippet. exec("/bin/importa.sh", $output); check if you have the necessary permissions to run this file.…
-
1
votes2
answers209
viewsA: Related tables: What is it? What is it? What is it for? What justifies its use?
I believe you refer to the correct related tables ? The relationship between tables is one of the premises of a relational database (SQL), the construction of tables using relationships helps the…
-
1
votes2
answers1489
viewsA: How to execute one code only after finishing another?
If what you need to do is not directly linked to the result of the AJAX call the ideal would be to put in a function the part : success: function(res){ // Faça o que tem que fazer minhaFuncao(); });…
-
3
votes1
answer105
viewsA: Split "100000000000" in JQUERY
It was supposed to work, split is a function of the String class. That works: var campos = "100000000000"; var PISCampos = campos.split(""); PISCampos.forEach(function(e){alert(e)}); // Somente para…
-
7
votes2
answers658
viewsA: What does a class diagram contain?
Actually, I think it does. There are several types of class diagram. Conceptual : It represents in a somewhat more abstract way, not necessarily making reference to the final implementation.…
-
1
votes3
answers191
viewsA: Enable/disable input text generated by a loop with data received from the database
Assign a unique id to each element during HTML code generation and change its Javascript function For example: HTML: Antigo 1<input type="checkbox" id="antigo-1" /> Novo 1<input…
-
0
votes1
answer71
viewsA: Blocking any other application via Service
Unfortunately you won’t be able to stop other apps from running. This is due to the fact that each APP runs on a separate JVM, that is, each wheel in its "box" and none has access to what the other…
-
1
votes1
answer45
viewsA: Mobile Apps, Azure and AWS
Stores will only make their app available for download. You must treat everything else on your own. (Google, for example, offers a back-end service called Firebase). But the Store is just a place to…
-
0
votes2
answers330
viewsA: JSON Array for Swift object 3
You can use the Ocmapper: Example of JSON: { "firstName" : "FirstName", "lastName" : "LastName", "age" : 26, "dateOfBirth" : "01/01/2013", "address" : { "city" : "San Diego", "country" : "US" },…
-
0
votes2
answers359
viewsA: Firebase cloud messaging - Advantages
Firebase Cloud is a backend as a service that has several Features, IE, the idea is that using it, you do not need a language running on the server. How would it work ? For most mobile applications,…
-
1
votes1
answer287
viewsA: How to make an Edittext Material Design style?
This Edittext (No Plain text) is part of the Widgets of the material design present in API 21+ You can use them in older Apis by adding the Support library as a dependency. Layout.xml…
-
1
votes1
answer231
viewsA: Check words in Array php
You can check if the word exists in the Array: $texto1 = preg_replace("<(.|\n)*?>","",file_get_contents('cotidiano.txt')); $array1 = explode("",$texto1); $array2 = explode("",…
phpanswered Lucas Queiroz Ribeiro 1,828 -
2
votes2
answers819
viewsA: Communication between javascript and PHP
It is not possible to "pass" Javascript variables to PHP, as each one works in different locations, the reverse can only occur when the document is rendered. Javascript (pure, as in the case,…
-
1
votes2
answers196
viewsA: Javascript Checkbox All
Using Jquery you can search all checkboxes within a given element (or the whole page) and check all of them: <html> <div id="teste" /> <input type="checkbox" /> <input…
-
1
votes3
answers9006
viewsA: How can I make a Brazilian time clock in real time
Getting the Date by Javascript will always return the current time of the computer where Javascript runs (in the client), so if the user’s clock is incorrect, your clock will also be. I believe the…
javascriptanswered Lucas Queiroz Ribeiro 1,828 -
1
votes1
answer217
viewsA: Better organization of my project
I believe that this kind of question is a little subjective. It takes another class for that ? The implementation of DAO is a bit personal too, some developers "pass the query" that want to run on a…
-
1
votes3
answers611
viewsA: Incorrect counting in electronic voting program
You Zera the variables every time the voting function is called. Declare the count variables outside the function, so they will become global, and will not have their value reset. Another option is…
canswered Lucas Queiroz Ribeiro 1,828 -
1
votes1
answer99
viewsA: Hierarchical database(?) - Sqlite/Android
The link posted in the comment is quite complete, however, I will put here an example of table creation. The simplest way would be for each record to point to its father (for theoretically, every…
-
3
votes1
answer121
viewsA: How to modify CSS inline after page loading?
If your table is printed inside another element you have identified, you can use the method find() of Jquery to search only in this element. Example: $( "#minhaDiv" ).find( "table" ).css( "width",…
-
1
votes2
answers724
viewsA: Pass a string from an Activity to a fragment maps
I switched to passing parameters in the method newInstance, as pointed out in the comments, the previous approach was not a good idea. Ideally create a method that returns a new Instance of Fragment…
-
1
votes1
answer62
viewsA: Save several variables in an Edittext
To store multiple variables, you need a structure to add multiple variables. If you know how many entries you will have you can use an Array: String[] valores = new String[5] // 5 = o número de…
-
1
votes1
answer334
viewsA: Android consuming web service Soap
Try moving your call to an asynchronous call: public String enviaLinhaDigitavel(String chaveIntegracao, int sequencia, String tipo) throws IOException, XmlPullParserException { SoapObject soap = new…
-
1
votes1
answer1567
viewsA: Insert data into Mysql database received from a Json
When using Decode, use true after JSON to transform into an array, I believe it is more practical. $inscrito = json_decode($inscritos,true); So when accessing the content use…
-
0
votes1
answer444
viewsA: Sum values of equal items in a table
I think the best way is to do this in the query, using sum and group by: select sum(quantidade), minhaTabela.produto from MinhaTabela minhaTabela group by minhaTabela.produto This query should…
-
1
votes1
answer50
viewsA: I can’t get out of the mobile app
Jacob, this happens because you cannot "close" an application, only the Android system that can decide when an application will exit the stack, the fact that the application is in the tab of recent…
-
1
votes1
answer31
viewsA: Display specific browser warning
You can detect the user with the command : navigator.userAgent.match(REGEX DO NAVEGADOR A CHECAR); For example, var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i);…
-
1
votes1
answer156
viewsA: Lenovo lives a7010 does not work in android studio
Check if the Android Studio that is not recognizing (what I think unlikely) for this open the terminal of Android Studio and type adb devices, if not, the problem is probably that Lenovo, like many…
-
0
votes2
answers72
viewsA: Tablelayout Android does not beat
Well, Table layout is a bit boring to organize right pictures on account of column divisions. Follow an example with Linearlayouts <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
1
votes2
answers61
viewsA: How to update the background colors of the lines of a listview?
Daniel, To implement this color change in Listview, make a customAdapter that extends the Arrayadapter, so inside it you implement this color change. public class ArrayTeste extends ArrayAdapter {…
-
2
votes1
answer1493
viewsA: Recognize a Jsonobject or Jsonarray
Carlos, You can identify if it is an object or array using Jsontoken: Object json = new JSONTokener(data).nextValue(); if (json instanceof JSONObject) // Você tem um objeto else if (json instanceof…
-
0
votes1
answer412
viewsA: How to add a view dynamically to android as registered in mysql
To implement the list you will need basically 4 parts: The layout that will have the list The layout of each item in the list A custom adapter Assign this adapter to your list by passing a list of…
-
0
votes1
answer75
viewsA: Activity Maps restarts every time I minimize
What happens is this, when the application loses focus, it starts a cycle that is part of the Lifecycle of an Android application, when an Activity is no longer visible (nor in the foreground) the…
-
1
votes1
answer178
viewsA: Notify current Activity which background function has finished running Android
Good afternoon, It has how to do what you want in various ways, for a simpler solution I use a BroadCastReceiver but if you’re going to use it in multiple classes, you might want to create an…