Posts by Reginaldo Rigo • 3,638 points
193 posts
-
0
votes1
answer670
viewsQ: JDBC connection on AZURE server with SSL encryption
I’m having trouble connecting via JDBC in the AZURE Sqlserver database using encryption. My connection string is as follows: jdbc:sqlserver://servidor.database.windows.net:1433;…
-
3
votes1
answer214
viewsA: Sum occurrences in a Memo
Traverse the entire memo by comparing the lines to us procedure TForm1.Button1Click(Sender: TObject); Var n, i : Integer; begin i := 0; for n := 0 to Memo1.Lines.Count - 1 do begin if (…
-
0
votes2
answers146
viewsA: Treating Query Many-to-Many
You have to group it. Do something like this: select jobs.*, f1.file_name, f2.file_name from jobs j left JOIN photos_per_job p ON p.job_id = j.id left JOIN fotos f1 on p.photo_id = f1.id inner join…
-
0
votes1
answer111
viewsA: What was the error in the last UPDATE use line in Mysql?
You need to finish the UPDATE command. UPDATE clientes SET nome = 'um nome qualquer', end = 'endereco', num = 581, bairro = 'bairro', cidade = 'cidade', cpf = '12.235.145-40', tel = '123.456', nasc…
-
0
votes2
answers236
viewsA: Function SE, SUM or what?
I believe as an example the table: Put the formula : =SE(D3="";"";PROCV(D3;A3:B10;2;FALSO)) on cell E3 and copy it to cell E10 and put the formula: =SOMA(E3:E10) in cell E11 Add your kits in the A3…
-
0
votes1
answer150
viewsA: Select Banco Oracle - Constraint
In a single query it is not possible, but in two or more it would be like this: select COLUMN_NAME, DATA_TYPE from all_tab_columns where table_name = 'TABELA' SELECT constraint_name, constraint_type…
oracleanswered Reginaldo Rigo 3,638 -
1
votes1
answer742
viewsA: Upload Files to Rest Web Service via Android
Solved. Replaces the line: conn.setRequestProperty("upload_file", fileName); for that: conn.setRequestProperty("file", uploadFileName); The parameter file here you have to match the Webservice…
androidanswered Reginaldo Rigo 3,638 -
1
votes3
answers1607
viewsA: How can I view data using JOIN?
I recreated the tables and created the fields Alturamaxima and Alturaminima to solve the issue of tracks and changed the field height type to Integer for the comparison between the heights become…
-
1
votes1
answer1696
viewsA: java.io.Filenotfoundexception: /Storage/Emulated/0/mesa.csv: open failed: EISDIR (Is a directory)
Replace the line: FileOutputStream desFileStream = new FileOutputStream(arqDestino); For these two: File csvdestino = new File(arqdestino); FileOutputStream desFileStream = new…
-
1
votes1
answer742
viewsQ: Upload Files to Rest Web Service via Android
I have a Webservice Rest using the Jersey libraries that are working properly. It turns out I need to add the functionality of uploading photos of the items the user photographs in the field. I…
androidasked Reginaldo Rigo 3,638 -
0
votes1
answer59
viewsA: Imageview appears in only a quarter of the screen
You need to add adequate width and height for the layout to stay inside your screen. RelativeLayout layout = new RelativeLayout(getActivity()); RelativeLayout.LayoutParams rlp = new…
-
1
votes1
answer4008
viewsA: Integrating Barcode Reader on Android
I’ve solved the issues. I’ve removed the lines: intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); and intent.putExtra("SCAN_MODE", "PRODUCT_MODE"); Adding these lines restricts the type of code the…
androidanswered Reginaldo Rigo 3,638 -
1
votes1
answer4008
viewsQ: Integrating Barcode Reader on Android
I’m trying to add barcode reading functionality to my app through com.google.zxing.client.android.SCAN. I added the calls to the application via Intent according to the code below: static final…
androidasked Reginaldo Rigo 3,638 -
2
votes2
answers5251
viewsA: EXCEL FUNCTIONS FOR COMPARING VALUES
Assuming that the spreadsheet in which the cell J2 is called PLAN1. The formula in column J10 would be as follows: =SE(Plan1!J2 > 4; "APROVADO"; SE(E(Plan1!J2 <= 4; Plan1!J2 >0);…
excelanswered Reginaldo Rigo 3,638 -
8
votes1
answer6395
viewsA: Group by with SQL Server error
All select fields must be grouped or contained in the GROUP BY clause or grouped by SUM, MIN, MAX select categoria, nome_categoria from tabela_teste.dbo.teste where vigencia = '2016-04' group by…
-
1
votes3
answers1544
viewsA: How to go to the next field( an Edittext) without having to press Next on android?
Let’s say the user is editing the letra1 field and you want to, after editing, position the cursor on the letra2, you can do it like this: letra2.requestFocus();
androidanswered Reginaldo Rigo 3,638 -
2
votes2
answers4282
viewsA: Procedure Insert mysql
Missing the ; at the end of the Insert. DELIMITER $$ CREATE PROCEDURE SP_INSERT_TB_ASS_TUR_AL (IN sp_id_disciplina INT, IN sp_id_aluno_prof INT, IN sp_id_turma INT, IN sp_id_aluno INT) BEGIN INSERT…
mysqlanswered Reginaldo Rigo 3,638 -
1
votes2
answers4855
viewsA: How Select SUM(',''',''''')
Let’s say I want to count how many branches in my branch chart have the larger 20 code. I could write: select sum( if ( cod_filial > 21, 1, 0 )) from tabelafilais or wanted to count how many…
-
-1
votes2
answers1746
viewsA: Calling an Activity within a Fragment - Android Studio
Try it like this: Intent intent = new Intent(getActivity(), ActMapa.class); getActivity().startActivity(intent);
-
8
votes4
answers835
viewsQ: Assembling updates at runtime
When riding SELECTS at runtime we always have the problem of knowing what may or may not be coming depending on the choices made by the user. When mounting the clause WHERE we come across the…
-
1
votes3
answers1184
viewsA: Read an Array or Bulk Collect as a table in an Oracle PLSQL
Look at this: DECLARE howmany NUMBER; some_first employees.first_name%TYPE; some_last employees.last_name%TYPE; some_employee employees%ROWTYPE; TYPE first_typ IS TABLE OF employees.first_name%TYPE…
-
1
votes1
answer1689
viewsA: I can’t send email using android studio
Recently I was also running around with this problem. I tried several ways and all on account of security did not work. I noticed that I would have a lot of work if I followed that line and there…
androidanswered Reginaldo Rigo 3,638 -
1
votes3
answers607
viewsA: check query in 2 tables at the same time with mysql
To bring all records from the REGISTER table less the Ids that are in the employee table you should write like this: SELECT * FROM cadastros where id not in ( select id from funcionario ) ORDER BY…
-
1
votes2
answers1837
viewsA: #REF! when deleting cells in another spreadsheet
$(dollar) serves to fix the position. If you write =Plan1! A5 and copy this formula to the following columns, it will be replaced by =Plan1! B5, =Plan1! C5.. and if copy to the following lines, then…
-
2
votes2
answers1080
viewsA: Doubts in the web service
1 - The web service is the part of the Android application or any other application that uses this service. 2 - You can create by Eclipse, PHP, Python or whatever is easy or convenient for you. 3 -…
-
2
votes1
answer36
viewsA: Query with two tables
Supposing your tables are like this: CLIENT int id, client name VARCHAR WORK id int id_client int descr_work VARCHAR You could do it like this: SELECT a.id, a.descr_trabalho, b.nome_cliente from…
-
2
votes2
answers1228
viewsA: Replace NULL with string
select COALESCE( CAST( DATA AS VARCHAR), '-') AS DATA from tabela or select ISNULL( CAST( DATA AS VARCHAR ), '-') AS DATA from tabela
sql-serveranswered Reginaldo Rigo 3,638 -
1
votes1
answer225
viewsA: Run an Insert in the temporary table in SQL Server
Try it like this: declare @ac varchar(max) declare @myList table (ac varchar(max)) begin set @ac = '(' + replace('2398,2399,2405,2407,2523,3509,3510,3518,3523,3524,3601,'+…
sql-serveranswered Reginaldo Rigo 3,638 -
-1
votes2
answers1365
viewsA: Array permutation
How about? function sampling($chars, $size, $combinations = array()) { # if it's the first iteration, the first set # of combinations is the same as the set of characters if (empty($combinations)) {…
-
2
votes1
answer1045
viewsA: Insert large amount of data into sql server
I created the MUNICIPIOS table: CREATE TABLE MUNICIPIOS ( id int, dscidade varchar(35), estado varchar(2)) I prepared the import file: 1,Abadia de Goiás,GO; 2,Abadia dos Dourados,MG; 3,Abadiânia,GO;…
-
1
votes2
answers706
viewsA: Inform a date, and catch the interval of the week of the month of that date (from Sunday to Saturday)
A possible solution would be this: In this example the date of entry is 19/05/2016 SELECT date('2016-05-19', '-6 day', 'weekday 0') as anterior, date('2016-05-19', 'weekday 6') as posterior; select…
-
0
votes1
answer37
viewsA: Passing information between Framents on Android
Possible solution. Class that will receive the requested values. import android.os.Bundle; import java.util.ArrayList; import java.util.List; public class GlobalProperties { private static…
android-fragmentanswered Reginaldo Rigo 3,638 -
0
votes1
answer672
viewsA: Divide a . txt into other . txt through the idenficator at the beginning of the line
A suggestion would be: boolean arquivo1_aberto, arquivo2_aberto, arquivo3_aberto ... = false; abre_o_arquivo_principal while ( tem linhas ) linha = linha_lida; if ( linha comeca com 01 ) { if (…
-
0
votes1
answer632
viewsQ: Floating Panel
The main screen of the registration of our system is quite extensive, therefore the user needs several Scrolls to reach the last line of registration. I put at the end of the layout the save, cancel…
androidasked Reginaldo Rigo 3,638 -
1
votes1
answer92
viewsA: What Structure/Role of a Web Service?
I don’t know exactly what those requisitions would be, but I think a Webservice would suit your purpose. As the name says a Webservice is a service that runs on the Web in order to provide…
-
0
votes2
answers331
viewsA: My Imageview does not appear on my phone
Remove the line : this.Finish();
-
0
votes3
answers672
viewsA: Condition in Where SQL Server
I would put the common part in a standard string at design time and add or not the variable part at runtime. sqldefault = SELECT * FROM TabelaTotal TT LEFT JOIN Client Cli ON Cli.FKTT = TT.Id LEFT…
-
3
votes1
answer4399
viewsA: SQL Server query SQL with COUNT and INNER JOIN
You have to group through that field too. SELECT Vendedor.IdCanal, Count(Vendedor.IdCanal) total, CanalVenda.Nome FROM Vendedor INNER JOIN CanalVenda On Vendedor.IdCanal=CanalVenda.Id GROUP BY…
-
0
votes1
answer42
viewsA: Records with close values
I wrote a function that I use on Oracle. Comparing DORFLEX with CORFLEX the function tells me that they are 86% similar. You can adapt it to your system. create or replace function grausimilar(str1…
-
0
votes2
answers1443
viewsA: ORA-22922: nonexistent LOB value in SELECT
Some of the values like nr_di, nr_da, bez_1, laenge, nr_zoll, time_out, time_end_unload may be returning null and the NVL function is replacing this null value with empty_clob() Since empty_clob is…
-
3
votes1
answer154
viewsQ: ASP.NET MVC Query Portal 4
Work in a service provider company. In the company we have hundreds of databases Oracle and SQL-Server of all customers. These banks contain information on the existing assets in that company as…
asp.net-mvc-4asked Reginaldo Rigo 3,638 -
-1
votes3
answers3385
viewsA: 2 COUNT within a SELECT with LEFT JOIN
COUNT returns the number of rows, so returns the same value. How do you want to know how many times you sent and how many times you received so you should use the sum, as below: select a.id, a.nome,…
-
1
votes2
answers456
viewsQ: col-Md-6 is not working on MVC
I created a form using bootstrap.css on w3schools.com/bootstrap/tryit.Asp with the following code: <div class="container"> <form role="form"> <fieldset> <div class="row">…