Posts by Murilo Fechio • 836 points
36 posts
-
1
votes2
answers375
viewsQ: Typescript override
I want to add a property user for the Express request. For this I created a file called express.d.ts with the following content: declare namespace Express { export interface Request { user: { id:…
-
2
votes1
answer98
viewsQ: Find missing table number
Have a table with the following structure: ------------------------ Codigo | Num_doc | Serie ------------------------ 1 | 1 | 1 2 | 1 | 2 3 | 3 | 2 4 | 2 | 1 5 | 3 | 1 6 | 5 | 1 7 | 7 | 1 8 | 5 | 2…
sql-serverasked Murilo Fechio 836 -
0
votes1
answer29
viewsQ: Parallel execution
I have a process running in my application for control. This process runs within a timer. private void timer1_Tick(object sender, EventArgs e) { // bloco de instruções 1 // bloco de instruções 2 }…
-
2
votes1
answer218
viewsQ: How to get the device serial number?
I am using the following code to get the device serial number: String serial = Build.class.getField("SERIAL").get(null); But the result is not the same when I check the serial number on the device.…
androidasked Murilo Fechio 836 -
1
votes1
answer547
viewsA: Processing decimal places Edittext
All it took was an adjustment InputFilter and the class was as shown below: public class NumeroFormatado implements InputFilter{ private int mDigitsBeforeZero; private int mDigitsAfterZero; private…
-
0
votes1
answer547
viewsQ: Processing decimal places Edittext
I need to set a number of decimals for a EditText on Android. For this I used a InputFilter as shown below: public NumeroFormatado(int digitsBeforeZero,int digitsAfterZero) {…
-
0
votes1
answer139
viewsQ: Identify two pressed modifier keys
How to identify which two keys are pressed inside a button click event? Example: Button btn = new Button(); btn.Click += Btn_Click; private void Btn_Click(object sender, EventArgs e) { // Assim…
-
0
votes1
answer178
viewsQ: How to verify integrity or violations in SQL Server database?
I created an application to run in the background to back up my SQL Server database using the class Backup of Microsoft.SqlServer.Management.Smo. I would like to add to this backup tool something…
-
1
votes2
answers763
viewsA: What is the best way to read a sql server error return?
Create a parameter to receive the return of your SQL and add to the parameters of cmd, something like: SqlParameter p = new SqlParameter("@Nome", DbType.String); p.Direction =…
-
1
votes1
answer70
viewsA: Mysql query with column created by select in other tables
I believe you can use something like: SELECT R.*, RU.IDUsuario AS ExisteUsuario FROM tabela_restaurante R LEFT JOIN tabela_restaurante_usuario_seguindo RU ON RU.IDRestaurante = R.IDRestaurante WHERE…
mysqlanswered Murilo Fechio 836 -
-1
votes2
answers400
viewsA: Creation of Trigger Sql Server
Between the Begin and the End of his trigger use the following code: SET NOCOUNT ON; DECLARE @NOSSONRO AS VARCHAR(15); /*Código abaixo obtém o novo E1_NUMBCO, ou seja o valor atualizado. Se você…
-
3
votes3
answers2456
viewsA: Phone and CPF fields in SQL?
In C# there is a component called MaskedTextBox. In it it is possible to specify a mask for the field. For example in your phone field can be the mask: (##) #####-#### on the property Mask. He will…
-
4
votes3
answers4312
viewsA: How the end of file loop is done
What happens is that since C does not have the boolean type, it interprets the integer variables to evaluate an expression, being that zero is for false and other than zero is for true, just as we…
-
0
votes0
answers745
viewsQ: How to add row and columns dynamically in a Tablelayoutpring C#?
I have a TableLayoutPanel displayed in grid form on the screen that already has an X amount of rows and columns, and also contains components in its cells. I allow, through a screen, the user to…
-
3
votes2
answers858
viewsQ: Keydown + Enter event. Clear keyboard buffer
I created an example Winform C# . net containing textbox1, textbox2 and button1 to simulate the following situation: When starting the application, the textbox1 gets the focus and when we press…
-
0
votes1
answer1996
viewsA: Error while trying to consume Webservice: Server did not recognize the header value
The Web Service Namespace and the SOAP header fields must be the same. In this case: Namespace = "http://tempuri.org/", so the URN must have the same value as the Namespace, as well as your request…
-
1
votes1
answer673
viewsA: access matrix data while in another class?
You must instantiate an object of the type Logica in your class Jogo, then you can access your matrix. Example: Classe Logica: public class Logica{ //declara a matriz private String [][]matriz = new…
javaanswered Murilo Fechio 836 -
2
votes2
answers3987
viewsA: Double formatting in Java
I decided by setting characters to separate decimal places and groups: double d = 11356982.10000; DecimalFormat df = new DecimalFormat("###,###.00"); DecimalFormatSymbols dfs = new…
-
5
votes2
answers3987
viewsQ: Double formatting in Java
I have the following value 1234.0000. I would like to format to the following output: 1.234,00. There may be cases I’ll use as well 1.234,0, but I believe that making for the first case the others…
-
3
votes3
answers1329
viewsA: Fetch part of a string within a vector
You can try with the following code: public boolean encontrarPalavra(String[] vetor, String palavra) { for(String p : vetor) { if(p.contains(palavra)) return true; } return false; }…
javaanswered Murilo Fechio 836 -
7
votes2
answers4415
viewsA: What is "granularity level" and how to identify it?
The granularity level would be basically to define a criterion that we will adopt to separate our classes, thinking about the concept of object orientation. For example: If we have to register an…
-
0
votes3
answers468
viewsQ: How to pass arguments for running an android app?
I would like to know how to pass arguments for running an android app, or even create a configuration file to be consulted when launching the app.
-
5
votes1
answer6204
viewsQ: How to increase the font size of an Edittext according to the screen size?
I would like the font size to be proportional to the screen size of the device running the application.
-
6
votes3
answers1383
viewsQ: Legacy of screens - Android
Wanted to create a screen(Activity) base for the android app I’m developing, so that all other screens inherited from this base. Thus, the screen would have an area reserved for the top of the page,…
-
2
votes1
answer1272
viewsQ: How to change the name of the target database when performing the restore? (Restore C# .net class)
I am backing up and re-storing an SQL Server database using the C# NET Backup and Restore classes with Smo. The problem is that after backing up the database with the name, for example "Test", I…
-
1
votes1
answer186
viewsA: Error in SQL 2008 Express installation (Silent Mode)
Also enter that you accept the terms of use: /IAcceptSQLServerLicenseTerms.
-
0
votes2
answers770
viewsA: How to calculate average time?
You can try casting dates for a team and try to subtract.
-
2
votes4
answers632
viewsA: How to execute two querys in a statement?
You can do it this way too: select a.id, b.id from (SELECT COUNT(*) as id from TABELA) a, (SELECT COUNT(*) as id from TABELA WHERE valor > 1) b
-
1
votes1
answer875
viewsQ: How to send an object to an Asp.NET C#webservice?
I need to send an object from a class that I created to a webservice, but when I call the method passing the object it to the types are incompatible. I tried to receive the object as Object, but it…
-
0
votes1
answer955
viewsQ: Synchronize databases via Webservice C# Asp
I have databases on the server and on the client and would like the changes made in one to be sent to the other via a Webservice. For example, a new row is added to a table on the server, then this…
-
1
votes1
answer1524
viewsQ: How to install SQL Server together with the C# application created?
I have a C# project and I need that when I create your installer I also install SQL Server 2008 on the client’s machine. It would be possible to do this?
-
0
votes1
answer112
viewsA: How to save selected fields in a C#Checklistbox?
Thanks for the suggestions. I solved the problem by creating a flag in my column class so that when I mark a column of chkLstBoxColunas it arrow the flag to true. When I load chkLstBoxColunas I…
-
0
votes1
answer112
viewsQ: How to save selected fields in a C#Checklistbox?
My program contains two CheckListBox: the chkLstBoxTabela contains the tables of my comic book and the chkLstBoxColunas contains the columns of the table selected in chkLstBoxTabela, so that when we…
-
0
votes1
answer526
viewsQ: How to set a default value created by the user in the creation of a table (SQL Server)?
I created a default value for my database: CREATE DEFAULT [dbo].[zero] as 0 But I cannot create a table using this default value created. How do I set this value when creating a table? For example:…
-
2
votes1
answer211
viewsQ: Is there a command to change a user-created type in Sql Server?
I created a type in my Sql Server database: CREATE TYPE [dtNumero] FROM [numeric](18, 5) NOT NULL Is there a command for you to change this type, for example the accuracy?…
-
2
votes1
answer84
viewsQ: How to get the Foreign Keys creation script from the entire database? SQL Server 2008
I wonder if there is a command that returns the script of creating the Foreign Keys in SQL server, as well as the command sp_helptext returns the script of creating views and stored procedures for…