Posts by Cleiton Oliveira • 610 points
29 posts
-
1
votes2
answers185
viewsQ: Add onclick or listener to a non-existent element
I have an external widget that has a form, but I can’t change the way it works (because it’s proprietary). However I need to know when the user clicked on it to auto fill some fields like name and…
javascriptasked Cleiton Oliveira 610 -
0
votes3
answers277
viewsA: Overwrite native HTML scroll
It is not possible. Alert blocks the content that is in the browser by creating another temporary window above, including the scroll or even the entire window if necessary. A modal will not be…
javascriptanswered Cleiton Oliveira 610 -
1
votes1
answer292
viewsA: Keyboard does not override button in Relative Layout
It seems that what is causing the button not to be overwritten is the item layout_alignParentBottom="true". What it does is to literally align the view (in this case the button) with the end of the…
-
4
votes1
answer1366
viewsQ: Laravel 5 - How to connect multiple Bases at the same time?
I’ve researched several places, and they all end up leading to that link. But I could not work using the methods given in the link. The problem: I have 3 banks configured in config/database.php:…
-
1
votes1
answer152
viewsQ: Grid with Laravel 5.3 searching for the Foreign Keys
Hello. I have an application where I need to mount a grid with all table data produtos. This table has Foreign Keys for two other tables, grupo and subgrupo. To mount my grid, I need the product…
-
0
votes1
answer77
viewsQ: Single ajax with different outputs that doesn’t work without async
Hello. I have a function with an ajax request inside (that’s the real function): function carregaAjax(caminho,tabela,funcao,dados){ dados.push({name:"funcao", value:funcao});…
-
0
votes1
answer46
viewsA: Filters with PHP priority
If I understood correctly, one of the ways to do this is to mount the query in PHP, save it in a string and then run. The assembly of the query can be done through text substitution. So it is…
-
0
votes3
answers219
viewsA: How to create a top numeric bar on your Android keyboard
One option is to use a custom keyboard and add to your project. As far as I know you will not achieve this with the standard Android keyboard, because there are no options on android:inputType that…
-
0
votes2
answers226
viewsA: How to construct this regular expression?
/((^[\s\S]+)2\.8)|((^[\s\S]+)6v)|((^[\s\S]+)2p)/g Explaining: [\s\S] picks up everything. + takes all characters that meet the above condition, so "all of everything". ^ indicates the beginning of…
-
2
votes2
answers798
viewsA: Mariadb ERROR: ERROR 1709 (HY000): Index column size Too large. The Maximum column size is 767 bytes
Exchange the INT(11) and the INT(10) for SERIAL. SERIAL is an alias("nickname") for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE The problem in your code is the primary key type declaration, so…
-
0
votes3
answers48417
viewsA: Make text have line break inside the div
The <p></p> serves exactly that. You can also separate the contents with display:block using <span></span>, assigning a class exclusively for this. If one of these forms…
cssanswered Cleiton Oliveira 610 -
12
votes6
answers17379
viewsA: How to improve reading performance of a SQL Server database?
Since it is a very large comic book, the ideal is that you use more in-depth knowledge to make a more accurate analysis. The solutions presented here may help, but it will be a long shot without a…
-
2
votes1
answer49
viewsA: I would like to turn "a"+str(1) into a1 without being a strig, so I can associate a value "a"+str(1)=2 as I do?
Make a list instead of trying to create variables programmatically (which is possible, but not a good idea): a =[] a[1] = 2 I believe that’s what you want to do.…
-
2
votes4
answers8334
viewsA: How to list all tables in a Sqlite database?
List the database tables: .tables Show table details: .schema tablename Show all table records: SELECT * FROM tablename; List of all Sqlite commands (terminal/prompt): .help Source…
-
4
votes2
answers59
viewsQ: Unusual way to use a jquery function
This answer to a question brought something I didn’t know: a return with two pairs of square bracketsreturn[][] in a role, solving a problem in a simple but unknown way to me. The question called…
-
1
votes1
answer303
viewsA: How to make a rotary banner in JS with array
The name is Carousel. I recommend using Slick or the Owl Carousel. They are very light and simple to implement. No need to reinvent the wheel.…
javascriptanswered Cleiton Oliveira 610 -
-1
votes2
answers796
viewsA: Update Combobox receiving a list from another panel
In the combobox, the line you need to pay attention to is as follows: comboBoxSelecionarFilme.setModel(new DefaultComboBoxModel(stringFilme)); In it you pass the string with the movies to the…
-
1
votes2
answers10833
viewsA: Create a button to exit the app
One solution is to use this.finishAffinity(), but I believe it would only work at Activity Launcher. According to the documentation, this method closes the current Activity and all below the stack.…
-
1
votes1
answer528
viewsA: Select and calculate columns - Sqlite
//você precisa abrir a conexão antes db = banco.getReadableDatabase(); //salvando a query antes. Eu NÃO conferi se a query está correta //só coloquei a maneira certa de fazer um…
-
2
votes1
answer386
viewsA: Sending ajax with notification
PHP has no Return, that’s the problem. In ajax, in line: success:function(data){ "data" will be what you have returned from PHP. For example, let’s say you want to know if the query was successfully…
-
1
votes1
answer830
viewsA: Send Edittext data to a Listview in another Activity
You cannot instantiate an Activity as you are doing and simply assign values as you did in: mainActivity.inserirArray(cat);, Android does not work like this for security reasons. For this, you need…
androidanswered Cleiton Oliveira 610 -
0
votes4
answers1038
viewsA: How to create a regex to filter and delete files with a particular chunk in the name
String trechoParaRemover = "(Copia - Copia)"; fileName = filename.replace(trechoParaRemover,""); Only this would solve your case, I do not believe you need a regular expression or delete().…
-
1
votes5
answers375
viewsA: Make <a> change href=" button on each new visitor ( IP ) on a given page
I was just going to edit the reply of @Gabriel Gomes but ended up getting bigger than I expected. I would record each IP in the database making the condition to add only if he is not already…
phpanswered Cleiton Oliveira 610 -
0
votes2
answers58
viewsA: Linearlayout dimensions, defined in java, do not maintain proportionality between resolutions
According to the Android website, the ideal is you have a layout for each screen size. However, if you only do xhdpi(2x) and hdpi(1.5x), it can adjust to mdpi(1x) and ldpi(0.75x) because of…
-
1
votes3
answers179
viewsA: Select the Controller name via Javascript
Alternatively, you can set an ID for each <li> and insert the Current class at each controller call. This way, you won’t have to worry about which controller is being accessed and the code is…
-
-1
votes2
answers341
viewsA: Stop an ajax request and create a new one
Try this: $(document).on("keypress", ".meuInput", function() { var val = $(this).val(); if (val != '') { setTimeout(minhafuncao, 500); //não coloque () ou a função vai ser executada ignorando os…
-
0
votes2
answers286
viewsA: Can you get the value of an autoincrement column before it is saved in the database?
Use last_insert_rowid(). It returns the last INSERT. It is important that you use this function immediately after insertion to avoid picking up the wrong value. Your query would be only: SELECT…
-
2
votes4
answers857
viewsA: Compare if variable is number within an if
That alone solves: var chute = Math.round(parseInt(prompt("Adivinhe em qual número estou pensando"))); var numeroPensado = Math.round(Math.random() * 100); if(chute != numeroPensado &&…
-
-1
votes2
answers781
viewsA: how to protect access to a php file?
Ideally, you do not put the server files (i.e., PHP) into the same folder or into "daughter" folders in the application. In that case, the way would be as follows:…