Posts by GabrielLocalhost • 1,430 points
81 posts
-
0
votes2
answers63
viewsA: How to open a form behind an already opened Delphi form
open normally and use the Sendtoback command to send back form.show; form.SendToBack;
-
0
votes2
answers40
viewsA: Using formula in SQL
I removed the fields you set as Type, separated the two selects and made a select that already makes the account with the other select. In Firebird would look like this: select ( (select…
-
0
votes2
answers53
viewsA: Help with Stack, to create template as example
You are not using the Stack, all your widgets are within Row and not the Stack, so the Floatingactionbutton is not overlaid, all the widget are on each other’s side. And inside Positioned he said to…
-
1
votes1
answer25
viewsA: subtraction of values between columns other than the same table
I would trade the tipo_lancamento by an int type to gain more performance and be more precise. Failed to put the table name elsewhere too but the rest I would do so: in Firebird: Select ( (SELECT…
-
1
votes2
answers32
viewsA: Save table field to a php variable
Let’s say you’re using postgresql: $sql = "SELECT ped_liberado FROM tb_pedido WHERE ped_id = 1267570"; $resultado = pg_query($sql); $ped_liberado = pg_fetch_result($resultado,0,"ped_liberado ");…
-
0
votes2
answers34
viewsA: Logic for SQL statement - Sum of values between Table A and Table B
I think your Inner Join this wrong spoke the cloister ON, I haven’t tried in sqlite but most works different. Besides you are comparing table_a.id with table_a.id and table_b.id with table_b.id…
-
0
votes1
answer46
viewsQ: In flutter, is there any difference between using dependencies?
Hello, in the pubspec.yaml, there is some difference between using dependencies depedencies and dev-dependencies?…
-
1
votes3
answers1630
viewsA: Update data on Setstate() Flutter page, enter Loop
Put on a timer to do frequently, to start put on iniState void initState() { super.initState(); Timer(Duration(seconds: 60), () => setState((){}); }
-
1
votes1
answer139
viewsA: Problem compiling apk on flutter - R8: Program type already present
Try to open your project in andorid studio, just the same part of java, see if you need to update some library, if you need to update some version of any of the plugins, if all the plugins comply…
-
0
votes1
answer40
viewsA: Make Join using a substring
This form of relationship is not recommended, it would be better with a normalized foreign key, being a unique numerical id. But you could try to put a like Instead of Join use simple union: select…
postgresqlanswered GabrielLocalhost 1,430 -
2
votes1
answer1013
viewsA: Take Textformfield value in double
to receive : controller.text = valor.toStringAsFixed(2); //para retornar com duas casas; controller.text = valor.toStringAsFixed(2).replaceAll('.', ','); //se quiser converter o ponto em virgula,…
-
0
votes2
answers1622
viewsA: Where are the application files in the Android Studio emulator
Looks for the Side Menu "Device File Explorer", in my case it is in the Right corner; Then in the tree that opens go in : Data Data br.com.seuproject database seubanco.db
-
0
votes1
answer177
viewsA: How to access a field (value) of a JSON
In your case is an array within another Voce array has to go "navigating" and picking up the nodes; I put inside an Asynctask and onPostExecute method do the reading treatment. I do so to read…
-
0
votes2
answers355
viewsA: Validate Edittext within Alertdialog
In the creation of the event Voce is placing edtMensagemSatEmail = (Textview) and not edtMensagemSatEmail = (Edittext ) and put on Isis if (edtMensagemSatEmail.getText().length() == 0) {…
-
-1
votes2
answers666
viewsA: Simple Java chained list position change
Just to make the exchange of values is simple, you create a third variable that will serve as exchange for the exchange. trocaPosicao(int m, int n){ int aux = m; m = n; n = aux; } I just don’t…
-
3
votes1
answer729
viewsA: How to convert a string to JSON object
You can do it like this: Within the try will do the treatment. try { obj = new JSONObject(jsonResposta); JSONArray usuarioJArray = (JSONArray) obj.get("result"); obj = (JSONObject)…
-
0
votes0
answers231
viewsQ: Save an image of Imagemview to Postgres
Hello, I am making a screen where the user takes photo of the error and sends in our program. The routine loads the image of both the Camera and the Gallery and I put in Imageview, in this part…
-
1
votes1
answer49
viewsA: Problem with APK
In Android Studio has a function to generate the apk file to be an installer and has another function to compile and run, are two separate routines but the two generate an apk, and the build…
androidanswered GabrielLocalhost 1,430 -
0
votes1
answer112
viewsQ: Excess memory usage with timer in javascript
I want to put a timer on a page, the function works, shows the time progressively, but I realized that the use of "setInterval()" begins to consume a lot of page processing until the point of the…
-
2
votes2
answers358
viewsA: How can I select unique data in SQL?
Having does what you need. This link can help you SELECT column_1, aggregate_function (column_2) FROM tbl_name GROUP BY column_1 HAVING condition;…
-
0
votes1
answer33
viewsA: Problems with Listview Adapter
You can create the event as an interface in the Adapter without any action and in the Activity you instance it and place the desired action. Adapter: //resto da classe private…
androidanswered GabrielLocalhost 1,430 -
3
votes1
answer52
viewsA: How to disable a Ttimer object when clicking a button that opens another form and re-enable it when the other form is closed?
The timer has the property Enabled, only mark as false and then back to true and in the main form you invoke the second with showmodal, So the back form is on hold until the front one closes. stay…
-
4
votes1
answer2699
viewsA: How to save Fastreport to PDF in silent mode?
Change the property FileName and DefaultPath for what you need in export. Also change frxrRelatorio.PrintOptions.ShowDialog := False; not to display the dialog box…
-
0
votes2
answers73
viewsA: how do I stop a sum?
Try putting a try, at least avoid crashing, can make treatments errors sensorX = event.values[0]; sensorY = event.values[1]; sensorZ = event.values[2]; float soma = 0.00; try { soma = (sensorX +…
-
1
votes1
answer63
viewsA: Tedit error / Tdbedit
Did you turn on the DataSet and the DataField of TDBEdit? One for the table component (DataSet) and another to the field (DataField), all bank components need to be connected to the bank.…
-
1
votes4
answers169
viewsA: I can’t convert seconds into minutes
If you extract minutes from the time difference, if you want minutes as the end result this should serve: EXTRACT(minute from TIMEDIFF(DATEFIM, DATEINI))
mysqlanswered GabrielLocalhost 1,430 -
0
votes2
answers3586
viewsA: Why does the 'preview' of the layouts no longer appear after upgrading to Android Studio 3.0?
It happened the same way with you, it was me updating and gave this problem. With me I simply change the version of Android in preview and it works, I put 24 or lower.…
-
1
votes2
answers267
viewsA: SQL helps to join 2 selects
You will have to use a Union Select, and for that the two select have to have the same amount and the same names of return fields; Select prod, id_prod, qtd_prod, total_prod from (( SELECT DISTINCT…
-
4
votes2
answers314
viewsQ: Navigation Drawer customized and colorful
Hello, what I wanted to do was to be able to put colorful icons in the navigation, as I can do this? The images I have in my project are colorful but in navigation they only turn gray like this. I…
-
0
votes2
answers48
viewsA: App does not run on other phones
In Android Studio has a function to generate the apk file to be an installer and has another function to compile and run, are two separate routines but the two generate an apk, and the build…
androidanswered GabrielLocalhost 1,430 -
0
votes0
answers463
viewsQ: How to solve Android Studio 3.1 upgrade issues
Hi, I updated Android Studio last week and after that it got complicated to work. It no longer identifies the Imports, no longer completes the code, Glade had stopped compiling but I was able to get…
-
2
votes2
answers71
viewsA: Adding fields between different tables in Mysql
You have to get the points in common between the tables, the relationships. Roughly that would be: update compra set valortotal_compra = ( (select sum(valortotal_compraprod) from COMPRAPROD where…
mysqlanswered GabrielLocalhost 1,430 -
0
votes3
answers252
viewsA: Return the row of a table when the value of Count(field) is 0 in Mysql
use the coalesce as a subselect: select coalesce( (SELECT c.categoria as categoria, COUNT(c.categoria)AS quantidade FROM anuncio a RIGHT JOIN categoria c ON a.categoria = c.categoria WHERE…
-
1
votes2
answers131
viewsA: How to destroy activex component that is generating Delphi error?
Try to do it this way: if(assigned(AcroPDF1)then freeandNil(AcroPDF1) or if(AcroPDF1 = nil)then freeandNil(AcroPDF1) The Assigned tests if the component is created, if it is instantiated. It may be…
-
1
votes2
answers3375
viewsA: Filter by date in Mysql
use a Where and the between command to filter between a range of values SELECT MONTH(DataCadastro) AS MesCadastro, YEAR(DataCadastro) AS AnoCadastro FROM tabela where DataCadastro between…
mysqlanswered GabrielLocalhost 1,430 -
1
votes3
answers2770
viewsA: Select from the line with the highest ID
Try to do so: Select * from val_produtos where id_produto = (select max(id_produto) from val_produtos) A subselect that will return you the id of the largest
-
1
votes2
answers528
viewsA: Working with custom alertdialog layout
Do so: final LayoutInflater li = LayoutInflater.from(MainActivity.this); View view = li.inflate(R.layout.layout_dialog_numero_trasferir, null); final EditText editText =…
-
1
votes3
answers1476
viewsA: Is it necessary to create a primary key with auto increment?
I recommend the primary key field to always be a number, even if you order a varchar you will get a different result. With values "1,2,3,4,11,21". em Inteiro: 1,2,3,4,11,21 em varchar: 1,11,2,21,3,4…
-
-1
votes1
answer531
viewsA: Android Application and Mysql Database
You can do this using JODBC mysql and Asynctask by connecting directly. Don’t forget to put jodbc in your project’s libs folder.
-
1
votes2
answers1102
viewsA: How to add an icon at each end of an Edittext?
I set in Edittext itself, in the property android:drawableRight. You can do it that way too: <EditText android:id="@+id/edt_mc_locproduto" android:layout_width="match_parent"…
-
0
votes4
answers197
viewsA: Calling Gridview event in Activity
You can create an interface in Gridviewadapter: public class SeuAdapter extends RecyclerView.Adapter<SeuAdapter.SeuViewHolder> { private SeuAdapter.SeuOnClickListener SeuOnClickListener; /** *…
-
1
votes1
answer374
viewsQ: How to make this Floatingactionbutton?
Hello, in my project I would like to be able to make a Floatingactionbutton that by clicking on it it deletes the background screen and displays above 3 more Floatingactionbutton with its respective…
-
0
votes3
answers1406
viewsA: Handling JSON with JAVA
In a class inherited from Asynctask do this: public class RestFulHandler extends AsyncTask<String, String, String> { ... protected enum OPERACAO{POST, GET}; private OPERACAO operacao =…
-
1
votes2
answers24
viewsA: Error returning vector in a method
Here public double MediaMovelSimples(double[] valores) you declare and here double[] previsoes, the two statements have to be equal. That’s what the error is saying incompatible types.…
androidanswered GabrielLocalhost 1,430 -
2
votes2
answers2921
viewsA: Convert String to Integer on Android
First check that the string is not null, as this will cause an error, since there is no empty number. Then do the conversion inside a Ry to be able to do treatments: if(sNum!=null) try { int num =…
-
1
votes1
answer248
viewsA: How to move to the function which imageView was selected and save to Firebase
You can replace Imageview with an Imagebutton, it provides click support. And use your method public void selecionaFoto(View v) to be the onClick of Imagebutton, the View v parameter must provide…
-
5
votes1
answer121
viewsQ: Performance difference from for simple and for iterator
I have a list of customers and on a certain screen the user can do a search and edit the clients of the list that is quite extensive, comparing these two examples which would be the best to work?…
-
1
votes1
answer518
viewsA: Help with android studio apk
This apk that Android Studio generates is a version only it uses to install on your emulator and mobile, if it is running directly on it, but to generate a really installable version you need to use…
android-studioanswered GabrielLocalhost 1,430 -
3
votes3
answers1242
viewsA: Update based on a select
It may happen that he’s not finding any value that matches the a.id. Try it like this: UPDATE pedidos a SET custo = ( SELECT coalesce(b.valor, 0) FROM produtos_pedidos b WHERE b.id_pedido = a.id )…
mysqlanswered GabrielLocalhost 1,430 -
-1
votes2
answers3232
viewsA: Client-server connection via socket
I establish the connection different than what you did: //Imports: import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetSocketAddress; import…