Posts by LSA • 558 points
30 posts
-
2
votes1
answer105
viewsQ: Break line when components inside Recyclerview occupy full screen width
Is it possible to make that when the width of the components of a list occupies the total width of the screen, the next component drops a line? I don’t want to use scroll if it’s not possible to do…
-
0
votes1
answer218
viewsA: Methods for changing orientation of the UI Automator Framework do not work
The "problem" was fixed, in the previous version of the application it only worked in the mode Portrait, to keep the look of the application interesting, so had the rule in activitys in the…
-
2
votes1
answer218
viewsQ: Methods for changing orientation of the UI Automator Framework do not work
The methods setOrientationLeft() and setOrientationRight() below simply do not work, both on emulated devices and on physical devices. I would like to know if there are any rules for using sponges…
-
0
votes1
answer28
viewsQ: Doubt about a Fragmentstateadapter constructor
Fragmentstateadapter has three builders according to the documentation. (@Nonnull fragmentActivity: Fragmentactivity) (@Nonnull Fragment: Fragment) (@Nonnull fragmentManager:…
-
-2
votes1
answer509
viewsQ: Android app generating Exception: androidx.fragment.app.Fragment$Instantiationexception
My app is in production and I’m having a problem in a small part of the devices, I haven’t been able to identify the reason or at least reproduce the problem in a test environment, I did some…
-
3
votes2
answers387
viewsA: Problem with audio stream on android
The problem was generated due to a lack of attention, I was thinking that the problem was in this code and I forgot the context that it was inserted. I realized that in my project was implemented…
-
4
votes2
answers387
viewsQ: Problem with audio stream on android
My shorthand code is this: MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setDataSource("http://stm43.srvstm.com:8474/;");…
-
2
votes2
answers139
viewsA: Print Checkbox with Jquery
Use as in the example below: $('#btn').click(function () { $('input[type="checkbox"]').each(function() { if(!$(this).prop('checked')){ $(this).remove(); $('label[for='+this.id+']').remove(); } });…
-
1
votes1
answer137
viewsA: Authenticate in another PHP/Laravel application
You can use the function login of Auth, you pass the model User as a parameter, in this way: public function logar_com($id) { Auth::login(User::findOrFail($id)); return redirect()…
-
2
votes1
answer601
viewsA: Undefined variable Laravel error
In your Blade there’s a foreach that’s like this: @foreach($grupos as $divisao) Replace, and leave it so: @foreach($campeonato->getGrupos as $divisao) You are not specifying who $groups are, you…
-
1
votes1
answer1780
viewsA: How can I change the attribute of a column with Laravel Migrations
To make a change in the field, first add depence doctrine/dbal in your Composer.json and then, you can make the change this way: Schema::table('users', function (Blueprint $table) {…
-
4
votes2
answers128
viewsQ: Query conditional ordering in Mysql
I have a table called comentarios, formed by the columns: id, descricao, criado_em and comentario_pai, how it is possible to see in the photo. I need to create a query, in which the answers are…
-
3
votes1
answer348
viewsA: Android Studio error while passing array between Activity
Try it like this: ArrayList<String> nEncontrados = new ArrayList<>(); Fill in data from example: lista.add("1"); lista.add("2"); etc.... Then run him through the Internet like this:…
-
1
votes3
answers1739
viewsA: Cleaning Up Form Fields
This way it works, when you take the name, the return is an array. function limpaCampos() { var x = document.getElementsByName("form_txt"); for (i = 0; i < x.length; i++) { x[i].value = ""; } }…
-
1
votes2
answers1168
viewsA: Appear two decimal places
Try this way: var total = 200; console.log(total.toFixed(2).replace(".", ",")); Edit. I added an example to better illustrate. $('#numero').keyup(function(){…
-
1
votes1
answer28
viewsQ: Build templates in PHP or JAVASCRIPT?
The question seems obvious, but I would like to understand it in more technical terms. In my application I need to place objects in an HTML template for user viewing. I have two options and I would…
-
1
votes2
answers66
viewsA: Size of arrays
You didn’t change the size of the vector, you instated it again with a larger vector size.
-
0
votes3
answers75
viewsA: Why in the second example (unlike the first) the result is concatenated and not summed?
In the first example you use the "(" and ")" to separate the types, if you do so in the second example, it will work. System.out.print("Will take " + (STOPTIME + FLOORTIME * (floorCome - floorCall)…
-
4
votes1
answer444
viewsA: Modelling Edge of an Element (DIV)
You can use: border-width: 2px 10px 4px 20px; border-style: solid; caption: border-width: (top border) (right border) (bottom border) (left border) Example: <div style="height: 100px; width:…
-
0
votes2
answers308
viewsA: Div alignment
Add in the . Father width:30%; See if it solves your problem .label{ font-weight: bold; float: left; text-align: right; display: inline; margin-right: 5px } .blue-box{ background-color: aquamarine;…
-
2
votes1
answer105
viewsQ: Api for file organization similar to tree structure
I am developing a meeting module, which contains management of staves, the staves are organized as follows: 1. pauta c 1.1.pauta x 2. pauta v 2.1. pauta b 2.1.1. pauta y Each staff of this is a…
-
1
votes1
answer518
viewsA: Attach File to Gmail via Intent
Do it that way: File f = new File("/storage/emulated/0/Android/data/teste.com.br.cartaovisitateste/files/business.pdf"); i.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));…
-
0
votes1
answer231
viewsA: Crud Ajax Laravel 5.*
You’ve made a tremendous mess of your code.. When you start your code, javascript is loaded and fires an event store pro button id "#dashboard_register category", when you will change the record you…
-
1
votes2
answers2936
viewsA: How do I search the table with Sqlite?
You can do it this way: public boolean pesquisar(String texto){ SQLiteDatabase db = getReadableDatabase(); String sqlSelect = "SELECT * FROM TABELA WHERE texto= '"+texto+"'"; Cursor c =…
-
1
votes2
answers220
viewsA: Open a lightbox image in the same layout from a button
You can do as follows, create an Activity with transparent background put the component imageView and textView below, and at the time you click the photo, you start this Activity…
-
2
votes1
answer94
viewsA: Disable form autocomplete in Laravel?
In your email you are not disabling. Use as follows: {{Form::email('email',null,['class' => 'col-lg-8 form', 'autocomplete'=>'off'])}} I just tested and disabled normal.…
-
0
votes1
answer104
viewsA: Error while updating profile photo
Appendage ->getRealPath() being like this: Image::make($avatar->getRealPath())->resize(300, 300)->save( public_path('uploads/avatars/' . $filename ) );…
-
1
votes1
answer933
viewsA: Running a git project on my machine
No. gitignore you choose which file or folder, which will not be uploaded, when committing that file is not added and while pushing that file or folder is not uploaded, if you want it . env be sent…
-
0
votes2
answers348
viewsA: Root with Bigdecimal
Do it this way, depending on the size of the accuracy you need, solve.. public BigDecimal raiz() { return new BigDecimal(Math.pow(new BigDecimal(1.172544).floatValue(), (1.0 / 7))); } //retorno…
-
0
votes1
answer105
viewsA: Vanish a component using jQuery when loading the page. And then appear it after a certain event in a while loop
You can use the .hide() and the .show() jquery. Example: $('#id_do_componente').hide(); //Some $('#id_do_componente').show(); //Aparece Source: https://www.w3schools.com/jquery/jquery_hide_show.asp…