Posts by Jhonatan Pereira • 537 points
60 posts
-
2
votes1
answer844
viewsQ: Multiple connections with PHP Socket to receive HTTP messages and save to Mysql
I need to set up a port on my dedicated server that runs the Centos 6.10 kvm OS, so that it receives messages (geolocation) from some trackers via TCP (IP:PORT), and saves this data in the Mysql…
-
0
votes1
answer34
viewsA: Use findViewById in Android Studio’s standard Mapsactivity
The problem was in XML. As I am running the Nexus emulator, it is getting the folder component layout-v26 instead of layout, and the archives activity_maps.xml of these two folders were different,…
-
0
votes1
answer34
viewsQ: Use findViewById in Android Studio’s standard Mapsactivity
I’m using the standard Maps template available on Android Studio, and in the activity_maps.xml added a EditText with the id towhere. In the Mapsactivity class I just added a…
-
1
votes2
answers1326
viewsA: Barcode reading on a single screen
In addition to Uzziah’s answer: The code reads tickets, but if it is dealer accounts (phone, light, etc.), one should calculate the check digit of each block (Barcode example:…
-
2
votes2
answers300
viewsA: How to Protect the Clickjacking Site
Add this to PHP: header('X-Frame-Options: SAMEORIGIN'); Specifically I added in header.php, which is included on all other pages. Source: codeengineered…
-
0
votes1
answer205
viewsA: Error when implementing Tensorflow in React Native
I was able to solve the problem in question after analyzing the file ResourceManager.java contained in the folder node_modules\react-native-tensorflow\android\src\main\java\com\rntensorflow. The new…
-
0
votes1
answer205
viewsQ: Error when implementing Tensorflow in React Native
Save! I’m trying to implement the library Tensorflow in my React Native application, based in that and in that tutorials. But I can’t even run the project, getting the following error: Unable to…
-
0
votes1
answer20
viewsA: Select Indicator, Indicated and Indicated
I managed to solve! http://sqlfiddle.com/#! 9/7bae60/6 Serves for Multi-level Marketing, if anyone wishes.
mysqlanswered Jhonatan Pereira 537 -
0
votes1
answer20
viewsQ: Select Indicator, Indicated and Indicated
All right, y'all. I have a table in Mysql in which each record has the member’s CPF and the indicator’s CPF (who indicated it). I’m trying to select both the nominee and your indicators. For…
mysqlasked Jhonatan Pereira 537 -
0
votes1
answer136
viewsQ: Access React Native Scrollable Tab View state
I have an React Native application with the React-Native-scrollable-tab-view library, where this tab view contains 3 child nodes: App.js <ScrollableTabView style={{marginTop: 0, backgroundColor:…
react-nativeasked Jhonatan Pereira 537 -
0
votes1
answer92
viewsQ: React Native Compile Update
Whenever I execute the command React-Native run-android some components appear in the command prompt that require updating. Like these: :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues…
react-nativeasked Jhonatan Pereira 537 -
0
votes1
answer537
viewsA: React Native - fetch(url) always returning a Promise
Since Promise.resolve is asynchronous, within a function also asynchronous, I solved the problem by placing it in the main class. It works like this: In the main class, I call the method that…
-
1
votes1
answer537
viewsQ: React Native - fetch(url) always returning a Promise
I’m starting in React Native, I had no problems until I started making HTTP requests. I’m using this function: async getJSON(url, parameters){ try{ //check if URL isn't empty if(url.length == 0)…
-
0
votes1
answer41
viewsA: Error creating Trigger with more than one table
The Trigger who solved the problem, although to me it seems strange a OLD be used alone when there are 3 tables in the scope of UPDATE: DROP TRIGGER IF EXISTS vendedor_pago; DELIMITER $$ CREATE…
-
0
votes1
answer41
viewsQ: Error creating Trigger with more than one table
I’m having trouble creating a Trigger that modifies more than one table. DROP TRIGGER IF EXISTS vendedor_pago; DELIMITER $$ CREATE TRIGGER vendedor_pago AFTER UPDATE ON parcelas FOR EACH ROW BEGIN…
-
0
votes1
answer51
viewsA: Delete table data with no need to reload page to update
when you reload the page the browser understands the action as if there had been another Ubmit, ie, re-enter the last inserted product. Classic error. You must create another PHP file to do the…
-
1
votes1
answer57
viewsQ: Mysql - Foreign Key constraint between tables
Below I created 4 dummy tables for illustration The Teacher and Student tables are referenced by Address and Documents. However, how can I create a foreign key in the last two tables referencing…
mysqlasked Jhonatan Pereira 537 -
1
votes1
answer2389
viewsQ: Customize Select Option
I need a Select equal to the image: But this is from Twitter Bootstrap and I use Bootstrap 4 and in the documentation I did not find anything like this. You can do it with Bootstrap 4 or even in…
-
0
votes1
answer156
viewsA: How do I print array on the selected segment and location one at a time?
I made a jQuery Ajax request from the form page for the file connecting to the database. Using the JSON result to "write" to a DIV. HTML page: <html> <head> <script…
-
1
votes2
answers1269
viewsA: Pass the GET variable over more than one page
USING SESSION At the beginning of the PHP file add session_start(); Create an array with $Loc and $ori and save to SESSION: $dados = array( "local" => $loc, "origem" => $ori );…
-
0
votes1
answer460
viewsA: How to change the color of the button when pressed?
buttoncolor.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true"…
-
1
votes1
answer320
viewsA: Form does not send email to another server outside of hosting
Use SMTP even, check the settings: $mail = new PHPMailer(true); $mail->IsSMTP(); try{ $mail->Host = "smtp.seudominio.com.br"; $mail->SMTPAuth = true; $mail->Port = 587;…
-
1
votes1
answer78
viewsA: Return does not work
Remove that line $p->cadastrarProduto(); Who is before that if if($p->cadastrarProduto()) { When you set the function as a condition in if, it runs. Then you are running the same function…
phpanswered Jhonatan Pereira 537 -
1
votes2
answers11171
viewsA: What is -Webkit-Moz-box- for in css?
Prefixes of browsers. Because there are many browsers, and each one with its specification, it is necessary to add these prefixes for a CSS style to work on all. So we have to: -Webkit- (Chrome,…
-
0
votes1
answer66
viewsQ: HTML Entities in PHP and Java
I’m using htmlentities() in PHP to store data in the database, overwriting c, ã, and other characters by HTML entities: <?PHP htmlentities ("Ampliação"); //Resulta na string…
-
0
votes2
answers2523
viewsQ: SQL - Merge order table and products
I have the following table of REQUESTS: `PEDIDOS`(`PEDID`, `PEDIDUSUARIO`, `PEDSTATUS`, `PEDVAL`, `PEDFORMAPAG`, `PEDTROCO`, `PEDDATA`) And the following product table, where each inserted row…
mysqlasked Jhonatan Pereira 537 -
1
votes1
answer132
viewsA: Error with Onitemclicklisten/Adapterview.Onitemclicklisten
Error is setting Click Listener. On onCreate change the line listView.setOnClickListener(chamaAtividade()); For listView.setOnItemClickListener(chamaAtividade()); In the method called Activity…
androidanswered Jhonatan Pereira 537 -
0
votes1
answer134
viewsA: Bootstrap - Always show side-bar
The theme had a settings menu where I chose where I wanted the side-bar and other elements, without messing with code.
-
0
votes1
answer134
viewsQ: Bootstrap - Always show side-bar
Good afternoon, my friends. I just downloaded a bootstrap template from Dashboard through this link, item 6. I expected the side menu to look like this, always visible on the left: But it came…
-
0
votes1
answer383
viewsQ: Sum of Records per group
I need to add the field value from the table I’m working on, but the sum is done by blocks where the user id is the same. Exemplifying: It is a shopping cart, each registration is a product in the…
-
0
votes1
answer52
viewsQ: Thread does not run
Adding Breakpoints I could notice that the Thread below is not executed. I search the typed zip code using HTTP, returning a JSON, via the viacep.com webservice. if (cep.length() == 8) { final…
-
2
votes0
answers28
viewsQ: Permutation of words
The intention is to create "keywords" using a few words. For example, from "idea" "title" "test" I would like the output to result in the combination possibilities: ideiatituloteste tituloideiateste…
google-playasked Jhonatan Pereira 537 -
0
votes0
answers45
viewsQ: addView List - The specified Child already has a Parent
I’m getting the bug "java.lang.Illegalstateexception: The specified Child already has a Parent. You must call removeView() on the Child’s Parent first." even removing Parent from View. Follows the…
androidasked Jhonatan Pereira 537 -
0
votes1
answer79
viewsA: When filling Listview it becomes empty
I found the problem, I was losing the reference to the first Listview, so I was returning Listview as null. Now the problem is another: Update data in Listview with Arrayadapter…
-
1
votes1
answer328
viewsQ: Update data in Listview with Arrayadapter
I have a Listview that will be filled with some different data, which may or may not be called (simultaneously or not). Example: The user can add and remove ingredients from a product. However, he…
-
0
votes1
answer79
viewsQ: When filling Listview it becomes empty
This is a shopping cart screen, where the product purchased is added to a Listview using an Arraylistadapter. So far everything is working. However, each product contains a list of additional and/or…
-
0
votes2
answers121
viewsQ: Animation when modifying Linearlayout height
I’m changing the height of a LinearLayout of WRAP_CONTENT for 0 (zero) and vice versa listening to the event onClick of a Button. I would like this change to occur gradually over a few milliseconds,…
-
0
votes1
answer365
viewsA: listview with text image and subtitle
To upload image and text to a custom Listview, there is nothing better than Lazyadapter. Maybe you need to redo part of the code, but it’s worth it. That question Stack in English is well completed…
-
0
votes1
answer471
viewsQ: Listview does not load all items
I’m using Listview in my project, it was duplicating the values, until I put the ELSE of this condition: if(convertView == null)... else... After this it stopped duplicating, but also stopped…
-
0
votes1
answer57
viewsQ: Save images to device without expiration
I have an application made with Intel XDK, running on iOS and Android. The intention is to display images that are on the server, and store them on the device to not download every time it is…
-
0
votes3
answers1997
viewsQ: Pagseguro getPaymentMethods Error
59001 - "Unknown web Session id" I am implementing Transparent Pagseguro Checkout using PHP v2 API, but I always get the above error in the Javascript part. Their support is horrible, there’s…
-
4
votes1
answer970
viewsA: Change variable from another class
Two forms. The first is to set the variable maxima as public Static and change it directly from any other class: Velocimetro.maxima = value; Or Activityforresult method() Your first Activity calls…
-
2
votes1
answer2265
viewsA: How to center an image using bootstrap in the bootstrap Navbar?
To center against the screen, use the css next: .navbar-header { float: left; padding: 3px; /*opcional*/ text-align: center; width: 100%; } .navbar-brand { position: absolute; float: none; }…
-
1
votes3
answers268
viewsQ: String string.fromCharCode()
The following script found here in Stack prints from "aaa" to "zzz" by incrementing letters in order, one by one: var str= 'aaa', s= str; while(str!=='zzz') { str= ((parseInt(str,…
javascriptasked Jhonatan Pereira 537 -
1
votes1
answer417
viewsA: Confirm SQL Delete using Javascript confirm
Example with jQuery In the official website download jQuery library and add to head: <script src="js/jquery-1.12.2.min.js"></script> Call the function below, replace the URL with your…
-
2
votes1
answer1556
viewsA: PHP page returning HTTP/1.1 200 OK
Headlines of server and should not be presented on the side client. HTTP / 1.1 200 OK It means the server is responding using HTTP protocol version 1.1. 200 is the code used when everything is ok.…
-
0
votes1
answer1556
viewsQ: PHP page returning HTTP/1.1 200 OK
After SQL query and return data using JSON, using the browser Firefox is written the following on the screen: 0 HTTP/1.1 200 OK Date: Sun, 12 Jun 2016 22:52:42 GMT Server: Apache X-Powered-By:…
-
4
votes1
answer153
viewsQ: Unwanted texts in Bootstrap
Why does my text appear with another under it after I add the Bootstrap library to the page? (Note the Copyright and top text)…
-
0
votes0
answers71
viewsQ: Slide with rounded base
First time I need to make a slide of this type, it came into mind to use a normal slide with a div superimposing the bottom of the slide, giving the rounded effect. There is another way to do this?…
-
0
votes2
answers1101
viewsQ: getJSON Ajax for JSON with multiple objects
To search for data in a JSON simple, like: { "chave1":"valor1", "chave2":"valor2" } I use something like this: $.getJSON(dados, function(json) { $.each(json, function() {…