Posts by Matheus Suffi • 611 points
50 posts
-
1
votes1
answer75
viewsQ: Transform View into Bitmap without using buildDrawingCache()
I have a function that takes a view and creates a bitmap. follow the code: public static Bitmap getBitmapFromView(Context context, View view) { DisplayMetrics displayMetrics = new DisplayMetrics();…
-
0
votes3
answers872
viewsA: How to validate if a value is a tuple having a string and an integer?
If I understand correctly, you want a function that takes the code and sees if it is tuple type, if it is, take the 0 position and see if it is string and position 1 and see if it is int... Follows…
-
0
votes2
answers66
viewsA: What permissions need to be requested at runtime?
Follow the code to request permissions from version 23: String [] permissions = {"android.permission.WRITE_EXTERNAL_STORAGE",…
-
0
votes1
answer35
viewsQ: Make the Mediastore.INTENT_ACTION_STILL_IMAGE_CAMERA put the photo in an image view
I needed to open the Android Camera App and take the photo. When having the photo taken, put it in an imageview. My problem is, the client wants to be able to take the photo or else choose from the…
-
0
votes1
answer49
viewsQ: About Activities in Android/Java
Good night. My doubt is simple. My app has a system where I open 5 activities for registration (first Activity 1, then 2 and so on. imagine it is something like a windows installation where you have…
-
0
votes1
answer352
viewsQ: HTML Image Base64 in emails
I have a python API that sends emails. The problem is that I mount an HTML and tag <img> and I put a clothesline from Base64 which is the src. However 90% of email services do not accept…
-
0
votes1
answer45
viewsA: Apache2 error while installing
I believe that the problem is not in the installation no... By what the error says, it is already installed and at start time it is giving an error in the file…
apacheanswered Matheus Suffi 611 -
0
votes1
answer33
viewsQ: Edittexts in wrong position
I am creating a list of Edittexts programmatically. In all I give a margin of 20dp and place one below the other. The problem is that textbox2 is always on top of 1, the other textbox is in the…
-
0
votes0
answers56
viewsQ: Create xml elements inside the activity_controller
I have a program that has a dropdown with 3 options. (Option 1 has value 1, Option 2 value 2 and option 3 value 3). Depending on the selected option, I need to create Textedits below this dropdown.…
-
1
votes1
answer65
viewsA: How to make an ajax request for?
I think yours is wrong... I believe that the value of aux_cont is already 17 before the is Try it this way: for(var i = 0; i < aux_cont; i++ ){ var eval_data = eval(obj_grafico[i].series);…
javascriptanswered Matheus Suffi 611 -
1
votes4
answers2082
viewsA: Compare a table field with another table
It would be a good thing if you put the table next to your question (An image with the table structure, for example). But I read your question and if I understand what you want, you will enter a…
-
2
votes1
answer808
viewsQ: Organize layout files in Android studio
Following, I have a project that will be huge in the end. currently I finished 1 module of a total of 4 modules and it is already full of layouts, etc. Follow an image just for you to be aware of…
-
0
votes3
answers55
viewsA: Relationship between tables varying according to value
You can use the famous OR logic (very well known on if).The 'OR' I usually use a lot in postgresql, so I don’t guarantee it will work in your case. for me and the community to help you better, edit…
sqlanswered Matheus Suffi 611 -
0
votes1
answer213
viewsQ: Cache Session in Python
I have a script Python running a Tornado application. Inside the onmessage I have several variables that will keep an equal value always, so there is no need to fill them in whenever a new message…
-
1
votes2
answers44
viewsA: I place a jquery and the site enters direct id
The problem is the Focus event. It causes the screen to be on top of the item in which it is called by $... Try it this way: $(document).ready(function(){ var position = $(window).scrollTop();…
-
1
votes1
answer121
viewsQ: Select within for
Next, my doubt is more about logic anyway.. I have a python script in which I use psycopg2 to perform database searches. But I need to do this within a for. I have full notion that doing a search…
-
0
votes1
answer613
viewsQ: URL and PORT forwarding in . htaccess
Following, I have a URL: http://ip_do_server/fop2 What I wanted to do is, when someone enters this url, apache redirects to the following address: http://ip_do_server:81/mesa_contact/login I’ve…
-
1
votes4
answers168
viewsA: How to parse in Android Json
Put everything inside a JSONARRAY. Here’s an example: try { JSONArray jsArr = new JSONArray(); JSONObject js = new JSONObject(); JSONObject rssEmpregados = new JSONObject();…
-
0
votes3
answers1413
viewsA: Handle accent with Jquery
replace in javascript works with regex, and vc n is passing a regex to swap the spaces. tries to put like this: string.replace(/ /g, '%20'); You can test regex on websites like this, for example:…
-
2
votes2
answers5485
viewsA: how to put monetary mask for Edittext in an Android app?
Modify the onChanged of Textedit via code that works. And you don’t even need a mask for it. Follow an example: seu_text_edit.addTextChangedListener(new TextWatcher() { @Override public void…
-
1
votes3
answers533
viewsA: Update button using jQuery
You must use the AJAX method to do this. Ajax works with asynchronous requests in the background (simply put, it makes an HTTP request without the user seeing and without the page being reloaded)…
-
1
votes2
answers566
viewsA: Passing information to another Activity
You call Bundle correctly, but still have to pass the Bundle by "Intent". Following example (With Bundle): Bundle bundle = new Bundle(); bundle.putString("id_do_item", "seu_dado"); Intent intent =…
androidanswered Matheus Suffi 611 -
0
votes3
answers8105
viewsA: LIKE and IN command in the same SQL command
Well if the serial number size is bigger, it makes no difference since you are using the % (after all it serves precisely for this) Maybe you are expressing yourself badly, I believe your doubt is,…
-
0
votes0
answers29
viewsQ: Datatables + web2py
I have a table that shows results of a database search and I use the Datatables plugin to mount the pagination. The problem is this: if you go over 500 records the business gets slow (Virtually all…
-
1
votes1
answer105
viewsA: Api for file organization similar to tree structure
Once I needed to do something like what you need. In my case I needed to make a tree of an URA for PABX and in each item of the tree I needed to fire an onClick event. I used Jstree, I found it very…
-
2
votes2
answers75
viewsA: I wonder if I’m doing this ajax the right way?
This certain yes, only missing the return treatment. (Success, error) Follows example: $.ajax({ method: "POST", data: { campoRadio: campoRadio }, url: "test.php", success:function(data){ //Coloque…
-
4
votes1
answer233
viewsA: Error executing delete in Sqlite database
I think the code is wrong. vc ta put double quotes on top of double quotes without single quotes(let’s say he needs to understand that it’s a string)....... Try it this way: db.execSQL("DELETE FROM…
-
4
votes1
answer8313
viewsA: jQuery Mask plugin for CPF
Two things, see if you import JQUERY too, these 2 libs that you’ve imported is only for Mask, all jquery plugins ask for Jquery import too. Second thing, from an F12 (if it’s Chrome) and go to…
-
1
votes2
answers4406
viewsA: Insert into with select
try to do it this way: INSERT INTO tabela (nome_campo1,nome_campo2) VALUES (select nome_campo1,nome_campo2 from tabela) Note: Just replace field name with the fields in question, remembering that…
sqlanswered Matheus Suffi 611 -
0
votes5
answers2427
viewsA: Get clicked element position
Suppose you select one tr and then click a button to delete. Follow the example(I used jquery because I’m used to the code, but just adapt the logic): $(document).ready(function() { var tid = "";…
-
0
votes2
answers26
viewsA: How do I get the field values?
Next, suppose you want to take the 'genre' inside 'Enre'. For you to take values from a list (or json) within another list, we should use a loop within another loop... Example. Suppose your JSON is…
-
0
votes3
answers32
viewsA: Is it possible to modify what the user will enter in a form?
From what I understand you want to change the record while the user type in the field (I believe this pre-written text will come from a select in the database) If you are using a php framework, you…
-
1
votes3
answers1234
viewsA: My String is giving error "unicodeescape"
The problem may be in the U of "C: Users". Perhaps, you should mention that the path is a rawstring. Try some of the options below: Example 1: arq =…
pythonanswered Matheus Suffi 611 -
0
votes1
answer294
viewsA: select unique name in mysql table
You have 2 options, you can use Group by and Distinct Example with group by: select id, nome from tabela where .... group by nome Example with the distinct: select DISTINCT nome, id from tabela…
-
2
votes1
answer849
viewsA: Error executing query in Postgresql
This error is telling you that functions like the SUM cannot be placed within the GROUP BY. Try running the code like this: SELECT p.name as nomerecebe, r.created_at as datarecebimento,…
-
0
votes2
answers31
viewsA: How to create a help Function
From what I understand, when you click 2 times in the text box it should show a help text... To do this, seven an id to your textbox and make the field with the query come hidden and through jquery…
-
1
votes4
answers1339
viewsA: Send PHP command via Ajax?
this 'date' option of ajax serves for you to pass parameters or values that will be encapsulated in the body of the request and can be used in the url that you are calling. For example, imagine an…
-
1
votes1
answer76
viewsA: How can I fetch an html file from my server and embed it into a client page?
I went through a very similar problem. At the time I did the following. I put this code inside my apache2.conf (Below the line where you declare the . htacess) Header always set…
-
0
votes1
answer161
viewsQ: Custom mask
I have an Edittext that has a mask #######.# I need this Edittext to be filled in the same way as a unit value field, for example: Ao digitar 1, o EditText deve ficar: "0000000.1" Ao digitar 2, o…
-
1
votes2
answers438
viewsA: Display a div for a given time Jquery
You can use setTimeout and then give the Hide in div. setTimeout(function(){ //Esconde a div $('#alerta').hide(); }, seu_tempo_em_millisegundos);
-
0
votes1
answer250
viewsQ: Change Hint Gravity - Edittext
In the xml of my edittext I put the property Gravity to always leave the cursor at the end, however I needed to leave the text hint at the beginning. It is possible to set a Gravity property for the…
-
0
votes2
answers104
viewsQ: using any in python
I have 2 lists with several fixed/mobile numbers. Example: Lista 1: ['0169924233316','01687665544','01978553322']<br> Lista 2:: ['0169924233316', '01788226541']<br> Within a go, I…
-
1
votes2
answers471
viewsA: Open BLOB in php
I solved the problem. The error was not only in php. I needed to convert the string to Base64 before sending it to mysql That way my php code got the following way echo '<img…
-
1
votes2
answers471
viewsQ: Open BLOB in php
I have a field of type BLOB to save images in my mysql, the image comes from an android APP via POST, the way the string BLOB arrives I saved in the bank. When I try to show the contents of this…
-
1
votes1
answer605
viewsQ: Maximum body size of a POST request
I have an APP that sends data via POST to a WEBSERVICE. The problem is that I have a BLOB field (the data inside it is giant) and I send about 30 records per request. My question is, there is a…
-
1
votes1
answer61
viewsQ: Edittext with Mask
I needed a mask for a tractor horimetro with 5 fields a comma and a capo later. Example: "#####,#" I even found a cool Maskedit, follow the link: https://github.com/toshikurauchi/MaskedEditText The…
-
1
votes1
answer100
viewsQ: Control the session on android
I’m using Sharedpreferences to generate a session on android. I wanted to make a check that after a while (5 minutes for example), it give a timeout, reset this session and redirect to Login. You…
-
0
votes1
answer239
viewsQ: Change the Drawableleft property of a Textview
I have a Simpleadapter that I use in a listview to show data coming from the database. Follows the code Map<String, String> map; for(int i = 0;i < buscaCombustivel.getCount();i++) { map =…
-
0
votes1
answer255
viewsQ: After changing Navigation Drawer icon it no longer opens
I customize that icon from the side menu and put an icon of mine. Follow the image: Problem: When I click on the Icon, it no longer opens that menu on the side. Follow the code I used to change the…
-
2
votes2
answers255
viewsQ: Mask in Textedit
I have a form fuel intake and I needed a liter mask that had 3 fields after the comma. Example: 002.555 liters I needed the field to be filled with "000.000" and that, were filled back to front as…