Posts by Fabricio • 782 points
29 posts
-
1
votes3
answers115
views -
0
votes0
answers33
viewsQ: Error creating GIN type index
When trying to create an index of type GIN in a table I came across the following error: CREATE INDEX idx_descricao on produtos USING gin (descricao gin_trgm_ops); ERRO: classe de operadores…
-
0
votes1
answer43
viewsQ: What is the lowest weight direct consultation or using views for a double relationship?
Given the following schema hypothetical: create table cidade( cidade_id integer primary key not null, nome varchar(40) ); create table envios( id integer primary key not null, cidade_origem_id…
-
1
votes2
answers33
viewsQ: How to email each new record?
I’m using Postgres 9.6 in a project and one of the requirements is that the system send an email to each new client. 1 - Trigger is a good way to do? 2 - When it comes to performance. What would be…
postgresqlasked Fabricio 782 -
1
votes1
answer103
viewsQ: How to audit records by saving changes in JSON
I’m using a function to audit records at Insert, update, delete events for a Postgres 9.6. I got the script on Git - Audit-Trigger The script has been implemented and is working perfectly, but one…
-
2
votes1
answer157
viewsA: Postgre - Field Id (Integer) of a table can go from 1 to how much?
According to the Table Numeric Types of documentation of Postgres 9.1, integer is 4 bytes that goes from -2147483648 à +2147483647…
-
4
votes3
answers465
viewsA: Test sum function
You have defined two functions one testa_soma and the summing up, but you didn’t call any of them, it should be like this: def soma (x, y): return (x + y) def testa_soma(): if (soma(10, 20) == 30):…
-
3
votes2
answers1126
viewsA: How to put events on multiple buttons at once?
One way to do it is by capturing the class of the button and assigning the event through a loop in the collection of objects returned by getElementsByClassName. In the HTML I created four buttons…
javascriptanswered Fabricio 782 -
2
votes2
answers19092
viewsA: How to make INNER JOIN mysql
You can do the Inner Join bringing all the table records as well as can bring only what you need, let’s see: Bringing all records from both tables SELECT * FROM Veiculo INNER JOIN Marca ON…
-
1
votes3
answers33840
viewsA: C - how to calculate the factorial of a number?
Another alternative is to use a call recursive, this is the example: #include <stdio.h> double fatorial(int n); int main(void){ int num = 3; printf("Fatorial de %d = %.0lf",num,fatorial(num));…
-
2
votes3
answers1235
viewsA: Replace value null
According to the online help of SQL-Server, you can use the function ISNULL. Syntax of the command ISNULL ( check_expression , replacement_value ) So your select would look like this: SELECT ISNULL(…
-
0
votes2
answers39
viewsQ: How to correctly display data from a commemorative date table
Sections of the table The intention is to bring the records of the commemorative dates in an interval of month and day. Example: I want to bring the commemorative dates that are between 15 January…
-
2
votes1
answer448
viewsA: How to extract values from a json to insert into a table in Postgresql
According to the documentation of Postgres 9.5 you can use the function json_populate_recordset Expands the outermost array of Objects in from_json to a set of Rows Whose Columns match the record…
postgresqlanswered Fabricio 782 -
0
votes1
answer137
viewsQ: How to get a unique device identifier from IOS
In the development to Android it is possible to define whether a smartphone is unique through your IMEI or MAC, and perhaps not the best way to identify only a mobile device, but works very well. On…
-
0
votes1
answer902
views -
2
votes4
answers173
viewsA: How to delete only 1 form field?
One way to do it is by calling the function you want, in case: window.history.back(); into a function when loading the page and then using Java Script, zero the contents of the field. Note that in…
-
3
votes1
answer4887
viewsA: Send POST requests via browser or other program
Sending requests with CURL is nothing to worry about. See an example: 1 - Sending request with CURL with a JSON The example below makes a POST request on a host by passing a JSON and doing a basic…
-
0
votes2
answers457
viewsA: How to join texts in a file?
One way to do it is: Open another blank file and read the lines in sequence of each file and concatenate line 1 of file 1 with line 1 of file 2 and give one add in file 3 and so on with the other…
python-3.xanswered Fabricio 782 -
10
votes2
answers3622
viewsA: Column 'XXX' in field list is ambiguous
This happens when we have the same column name in both tables, hence the error "ambiguous", for the error to disappear you must indicate in your select to which table the column belongs. Behold:…
-
0
votes1
answer64
viewsQ: Query execution problem in Elasticsearch
When trying to do a search on elasticsearch using the elasticsearch.js I used the following code below: var cliente = new $.es.Client({ host: 'http://localhost:9200', log: 'trace' }); var cliente =…
-
0
votes2
answers1720
viewsQ: PHP Fatal error: Uncaught Error: Class 'Sqlite3' not found in /var/www/html/
I have the code below supposedly simple. The intuition is to create a table include values and soon after showing the information, but in the log apache is showing the following: [:error] [pid…
-
2
votes1
answer1072
viewsA: Responsive menu with dropdown submenu
Hello Matthew, maybe if you manipulate a little your CSS you can do something like: ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; } li { float: left; }…
-
-1
votes1
answer645
viewsQ: Prevent user from copying android application
I downloaded a program called apk share in the playstore, this application copies the apk of any program that is installed on the android device. The question is how not to allow this application to…
-
3
votes1
answer686
viewsA: How to train two objects with different sizes for recognition in Opencv
Of all the research I did on this subject were not satisfactory, but according to responses on the Open CV website we came to a conclusion that we should train the two types of separate board, In…
-
1
votes1
answer211
viewsA: Control java application on the outside
a solution for your case may be the use of the Serversocket class. In your background application you can leave as a server listening to a specific port. And in another application you can send…
-
1
votes1
answer125
viewsA: How to implement the 'auto complete' feature in a Jformattedtextfield?
Hello, use Swingx this has a class called Autocompletedecorator JComboBox comboBox = [...]; AutoCompleteDecorator.decorate(comboBox); List items = [...]; JTextField textField = [...];…
-
1
votes2
answers3382
viewsA: Receiving error: "Your login SYSDBA is same as one of the SQL role name" while trying to access base with Ibexpert
Try using the isql.exe in the Firebird installation directory. SQL> CONNECT "C:\CAMINHO\NOMEDOBANCO.FDB" SQL> user 'SYSDBA' password 'masterkey'; Or you can create a new user and give admin…
-
6
votes1
answer686
viewsQ: How to train two objects with different sizes for recognition in Opencv
Hello, I am using Opencv version 2.4.11 to train license plate recognition for a parking software. The problem is when training to identify the car plate, truck, truck where the plates used by them…
-
0
votes2
answers295
viewsA: Opencv haartraining - Out of memory
When the haarcascade is used we must specify the same parameters used in createsamples, as -w and -h.