Posts by leofontes • 2,261 points
70 posts
-
2
votes1
answer1142
viewsQ: How to reference in LATEX text without parentheses
I am working on my TCC using Sharelatex and a template from my university. I have already set up the file .bib and I can perform citations using the \cite{}. But in this way it always generates for…
-
0
votes1
answer63
viewsA: Graphql error with Sequelize
After asking in the OS in English, I realized that the error was in Promises and not in Graphql. createUserVoucher: async (parent, args, { user, models }) => { args['userId'] = user.id; const c =…
-
3
votes1
answer63
viewsQ: Graphql error with Sequelize
I have an error in the return of a Mutation. Apparently he can’t read the id field, but the object I send to Graphql has this field, and as I’m new to Graphql I don’t understand what the error…
-
2
votes5
answers964
viewsA: How to progress steps using thread chart?
When I needed to use a counter so I used the Circliful. It is a jQuery plugin very easy to use and customize, has about 20 attributes to change if you want and it works very well. The only…
-
1
votes1
answer1511
viewsA: Development app with voice interaction in android studio
You can use features provided by Android itself. Take a look at the documentation: Adding Voice Features: https://developer.android.com/training/wearables/apps/voice.html And in the class…
-
1
votes1
answer189
viewsA: Programmatically change specific Tab background
As no one had any different idea, even talking to people who work with me on Android, I had to implement my solution using CustomView XML <?xml version="1.0" encoding="utf-8"?> <FrameLayout…
-
0
votes1
answer189
viewsQ: Programmatically change specific Tab background
I own a TabLayout in which I programmatically create tabs in this method: mTabLayout.removeAllTabs(); for(int i = 0; i < list(); i++) {…
-
0
votes3
answers108
viewsA: Value of type 'String? ' has no Member 'Int'
There is no such function that you are trying to access. If Voce wants to convert a String to Int, Voce needs to use: let happiness:Int? = Int(happinessField.text)…
-
0
votes4
answers130
viewsA: How to apply a rule to a specific element?
You need to add a class to the image you want to apply the filter to <img src="algumacoisa.png" class="imagemBlur"> And in your css <style> .imagemBlur { -webkit-filter: grayscale(100%);…
-
2
votes1
answer138
viewsA: Sum in Textview
Of the two: 1) You use in the text a value like 12,9 or 10,0with comma, as we use in Brazil. But Double uses . as it is used in the US, so he can not interpret that 12,9 is 12.9 and explode. 2) You…
-
2
votes2
answers138
viewsA: How to put several elementByID within one variable?
Just use a Javascript object dados = { email : document.getElementById("email").value, nome : document.getElementById("nome").value, senha : document.getElementById("senha").value, rep_senha :…
javascriptanswered leofontes 2,261 -
1
votes0
answers100
viewsQ: How to run npm script on Heroku in production?
I need to use Migrations from Sequelize in a Nodejs application that is already in production in Heroku, but I don’t know how to add the scripts in package.json so that the database migrations are…
-
0
votes1
answer56
viewsA: Problem with imagebuttom in listview
Are 2 doubts then I will separate: Bug at end of scroll I don’t have a way to debug the code for Voce, but looking over it looks like your problem might be in this code here:…
-
0
votes1
answer39
viewsA: How can I create my own style sheet?
You would need to create not only your own stylesheet, but a browser of your own and/or integrations for current browsers to interpret your stylesheet, which doesn’t seem like a good idea. However,…
-
0
votes1
answer468
viewsA: Function call in external file in Nodejs
const query = require('get-query')(url); let callback = require('callback')(err, data, res); MeuModel.find(query, (err, data) => callback; When Voce wants to call another file Voce uses the…
-
0
votes2
answers1198
viewsA: Summon Fragment within Fragment
An example of how to solve this situation, taking into account that as Ramaral said in the comment, the activity is responsible for exchanging the fragment inside: //Instancia o fragmentManager que…
-
0
votes0
answers54
viewsQ: Sqlite Leak without having any class using Sqlite
Good evening, everyone, I’m building an Android app and the last thing I need is to build the local bank. I built it but I realized that errors of memory appeared Eak, I thought I had fixed but the…
-
7
votes2
answers1453
viewsA: Leave app only in portrait mode
Just add it to your Androidmanifest.XML android:screenOrientation="portrait": <activity android:name=".SomeActivity" android:label="@string/app_name" android:screenOrientation="portrait" />…
-
1
votes2
answers604
viewsA: Recyclerview, problem inserting an item
Recyclerview does not persist (save) the data that Voce sends to it, when Voce opens another Activity, they get lost. You need to use a database (Sqlite is the easiest on Android) to save the data…
-
3
votes2
answers6502
viewsA: Extensions . pyc . pyd . Pyo in Python
.py is usually the code written by yourself. .pyc is the compiled binary code. If you import a module, Python will generate a *.pyc file that contains the binary to make it easier (and faster) to…
-
2
votes3
answers2965
viewsA: How to delete data from database in android studio?
To delete in your database Oce follows +- the same idea that Oce is already using: db.delete(TABELA, CHAVE + "=" + chave, null) Where TABELA is the table you want to perform Delete, CHAVE is the…
-
3
votes1
answer370
views -
2
votes2
answers208
viewsA: Swift 3 - How to resize Uitableview automatically
You need to take the height of the cell, ask for the array Voce uses as datasource count and then set the size in the frame, follows an idea: var tamanhoCell = tableView.rowHeight var count =…
-
9
votes1
answer692
viewsA: What is the difference between Activity and View on Android?
According to the documentation: An Activity is a specific, singular action that a user can do. Almost all Activities interact with the user, so the Activity class takes care of creating the window…
-
0
votes2
answers278
viewsA: Move a div to left or right with the Bootstrap library
You can use the classes pull-left and pull-right bootstrap, or use the float: left and float:right in CSS itself. More hints here: https://getbootstrap.com/css/#helper-classes-floats…
-
5
votes1
answer41
viewsA: Detect when there is rotation of Windows tablet screen
According to the documentation (unfortunately only in English) here: using System.Windows.Forms; //. . . //Set event handler private void Form1_Load(object sender, System.EventArgs e) { int…
-
5
votes4
answers3293
viewsA: Separate String Number Letters
In the library of Character has a method isDigit that checks if the character is a number of 0-9 char c = string.charAt(0); if (Character.isDigit(c)) { //É numero } else { //É letra } In this…
-
0
votes1
answer1743
viewsA: Voice recording with Mediarecorder Android Studio
Good Charlie has more than one doubt so I’ll try to help you in steps: Save audio to a specific folder: According to this reply of the Gringo SO: File f = new…
-
0
votes3
answers793
viewsA: Check in Javascript if String has string x numbers
According to this reply of the Gringo SO: 1) index - to see if the string has the other string, it will return -1 if it does not have 2) (ES6) includes - use if using ES6 var string = "foo",…
-
3
votes1
answer683
viewsA: Run project in netbeans
According to this question from ONLY gringo: Just disable the "Compile and Save" option and restart Netbeans. But this another answer explains better what is really happening: This happens when your…
-
1
votes1
answer2104
viewsA: SQL Recovery Mode Database
According to this DBA Stack Exchange response: Is rotating the Crash Recovery, possible causes: SQL Server restarted manually due to a server crash or start/stop A serious error happened in the…
sql-serveranswered leofontes 2,261 -
-1
votes2
answers987
viewsA: How to put a Popup that asks permission to use GPS?
In your manifest is where are saved the permission requests of everything your app can use, so just add the lines: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />…
-
1
votes2
answers1670
viewsA: How to update recyclerView after updating data via dialog
Its structure is confused, it would be interesting to have the Recyclerview Adapter to complement the answer, but the idea is more or less like this: In your Recyclerview Adapter you pass a list of…
-
3
votes1
answer5726
viewsA: Change the project API
In your file build.gradle inside the app module (there are 2 but only one has these lines below) you need to change the lines minSdkVersion from 9 to 16, I usually keep the targetSdkVersion for…
android-studioanswered leofontes 2,261 -
0
votes2
answers2295
viewsA: How to do when clicking a button appear a form with js?
CSS #form { display: none; } HTML <button id="button">Clique aqui</button> <form id="form"> <!--Seu form aqui --> </form> JS…
-
27
votes3
answers66206
viewsA: Is there a shortcut to indenting the code in Sublime 3?
Just add this line to your "Key Bindings - User" file (located in Preferences > Keybindings - User ) {"keys": ["alt+shift+f"], "command": "reindent", "args": {"single_line": false}} Source:…
-
6
votes2
answers225
viewsA: Problems with sizeof
sizeof returns the size of the memory allocated by the pointer, not the number of elements. To go through this for Voce you need to know the number of array elements and use this value as a stop…
-
1
votes2
answers1296
viewsA: What applications for binary trees implemented in vectors?
Are some advantages: 1) The search in width becomes a simple interaction over the Array 2) You have O(1) access to any node in your tree instead of having to go through its height to get there. 3)…
-
0
votes5
answers11043
viewsA: Recursive Fibonacci printing
If only the printing is missing, each time you calculate the value of the number is enough printf("Fibonacci é: %d", fibonacci); Where %d is just a "Holder" for your number, which is passed in the…
-
2
votes1
answer108
viewsA: How do I send a message telling the user the start date is longer than the end date?
In your code in no time are you comparing the hours that the user has placed, but rather comparing each one with the current time. From what you described in the question, this is not what you want…
-
2
votes1
answer556
viewsA: How to add content to a textview without having to copy what’s already in it?
TextView tv; tv.setText( tv.getText().toString() + "seu novo texto" ); I don’t understand if this is exactly what you need, but this way you will concatenate the String that is already inside…
-
2
votes1
answer115
viewsA: How do I check if it’s a Facebook robot?
According to this reply of the Gringo SO: if ( strpos($_SERVER["HTTP_USER_AGENT"], "facebookexternalhit/") !== false || strpos($_SERVER["HTTP_USER_AGENT"], "Facebot") !== false ) { // é…
-
2
votes1
answer41
viewsA: How to Save Data on Mobile
There are several ways, as you receive only one text and a double value, I recommend you use Sharedpreferences, which you can implement quickly and is much simpler than a database for few data…
-
3
votes3
answers85
viewsA: Third IF ELSE
You’re doing an assignment instead of a comparison. c_char == 11 If you allow a hint (it looks like you’re a beginner), Oce repeats the expression many times document.getElementById("txtCpf").value…
-
3
votes2
answers130
viewsA: Error with AUTO_INCREMENT ID
There are two ways to do INSERT, the way you do it, and tell what columns you want to insert INSERT INTO TABLE_NAME (column1, column2, column3,...columnN) VALUES (value1, value2, value3,...valueN);…
-
2
votes1
answer54
viewsA: Where can I download the Hump library?
https://github.com/vrld/hump In moral, just a Google search for Hump moon library.
-
2
votes3
answers150
viewsA: Value loses content as soon as it exits ajax
An AJAX request is an asynchronous process. What this means is that it doesn’t necessarily occur in the same synchronous sequence of execution of your code, which is going from top to bottom going…
-
3
votes1
answer1335
viewsA: Size of a Mysql table with 200 million records
According to this reply of the OS in English: Physical size of BD does not matter. Number of lines does not matter. In my experience, the biggest problem Voce will have is not the size, but the…
-
10
votes1
answer361
viewsQ: Passport Session authentication on Android
I have a web app running with Nodejs, Express and Passport-JS authentication, and everything works perfectly. Now I’m developing an Android app and need to authenticate my users using the same API.…
-
4
votes3
answers216
viewsA: Why is there an asterisk left?
With each while "loop", you first print the * and then check if you reached the limit (Row == n). Simply place the print below the end checks of the loop that your problem solves.…