Posts by Rodrigo • 432 points
20 posts
-
0
votes3
answers1379
viewsA: How to traverse an element by one in a JS array
Javascript ES6 it would be something like that: const qualquer = (a, b) => { return a.map(item1 => b.map(item2 => item1 < item2 ? true : false)); } console.log(qualquer([1, 2, 3, 4], [1,…
-
0
votes2
answers147
views -
1
votes1
answer131
viewsA: Use setSupportActionBar on Fragment
I didn’t really understand the business logic, normally I would advise to use a central Toolbar on Activity and use Fragment only for the content, but following its logic, it would be like this: v =…
-
0
votes1
answer34
views -
0
votes1
answer34
views -
2
votes1
answer942
views -
1
votes1
answer51
viewsQ: Counting records with Room and Livedata in android studio
How I call this function in viewmodel adapter: @Query("select * from PRODUTO") int getCountProdutos(); My viewmodel: public class ProdutoListViewModel extends AndroidViewModel { private final…
-
3
votes1
answer94
views -
1
votes2
answers129
viewsQ: Image loading inside for loop
var image = new Image(); image.src = 'images/logos/jpg_group.jpg'; // image.src = VARimg_categoria[y]; image.onload = function() { var canvas = document.createElement('canvas'); canvas.height = 250;…
-
1
votes1
answer218
viewsQ: Calling Java (Android) function inside a hybrid mobile application with Javascript
We are building a hybrid web application, which needs to print on a portable printer by bluetooth. But the printer is imported and only comes with a Java SDK, which is not our strong! We needed to…
-
0
votes0
answers129
viewsQ: Elastic scroll effect in mobile applications
I would like to know how to make an effect today widely used in mobile applications, in which you move the objects with your finger "elastically" horizontally or vertically, sometimes taking the…
-
0
votes3
answers1099
viewsA: How to keep the default Textbox look changing the value of the Readonly property?
I program in VB6, and this does not happen when I change Readonly, try to change the "Backcolor" of the text at runtime as quoted by Dener Carvalho, if this does not work, change the appearance of…
-
7
votes2
answers16310
viewsQ: How to find an address by latitude and longitude
How do I get the full address of a geolocation, ex: Lat. 37.386196601958 Lon. -121.964346639 (Street tal, Neighborhood tal, cep: tal)
-
4
votes1
answer1086
viewsQ: JSON return from Google API
I make a request to a Google API (API Web Service), in which returns me a JSON (Matrix)... My problem is when trying to extract data that are Arrays within Arrays... As the data from the "Photos"…
-
3
votes2
answers692
viewsQ: Problems with accentuation in Mysql
I can’t save sentences or words with special characters ( ' & " ). My bank is like this: ALTER DATABASE `bancodedados` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; All fields in utf8 and…
-
4
votes1
answer748
viewsQ: Sqlite with Javascript does not work
I am knowing the Sqlite now, to try to deploy in a mobile application, I made this test based on some web codes but I can not return a recording of the data successfully, until it selects but…
-
1
votes1
answer49
viewsQ: What is the best way to work with user data coming from the server?
I’m on a project for an online sales (mobile) app. What is the best way to work with data from tables? Sqlite, JSON, creating a class, Localstorage? For example, when soon, I don’t want to be on the…
-
0
votes1
answer420
viewsA: JSON return to PHP with Ajax
I managed to solve it this way: $matriz = json_decode ( json_encode ($_POST['dados']), true); I do not understand exactly why it worked only this way, encoding and decoding again, if someone can…
-
1
votes2
answers1554
viewsA: Chat with PHP, AJAX and Mysql
Try to update your div temporarily... javascript: var tempo = window.setInterval(carrega, 1000); function carrega() { $('#counteudo').load('teste.html'); } in AJAX have an example here:…
-
0
votes1
answer420
viewsQ: JSON return to PHP with Ajax
I’m trying to pass a JSON (result of a Google Place API) with Ajax to PHP. I believe my problem is in PHP when manipulating the data, follows a part of the code: AJAX: //GRAVA TODO O RETORNO NO…