Posts by Rafael Lincoln • 187 points
12 posts
-
1
votes1
answer148
viewsQ: Encryption of a C#class
I have the following code in PHP: $params = json_decode(trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $api_secret, base64_decode($enc_request), MCRYPT_MODE_ECB))); Where the result is an array and not a…
-
-1
votes2
answers57
viewsA: How to Add an Error Message before Deleting an item from a Listbox in Windows Phone 8.1
Solution for Silverlight You should use Messagebox for this in the following way: MessageBoxResult result = MessageBox.Show("Deseja continuar?", "Opção", MessageBoxButton.OKCancel); if (result ==…
windows-phone-8-1answered Rafael Lincoln 187 -
0
votes4
answers668
viewsA: Retrieve dynamic input and insert into the bank with Procedure
Not the need to create a precedent to make this Insert, and in this case you are also losing performace, as it is opening several transactions in the database. The best way to do and making a INSERT…
-
0
votes2
answers878
viewsA: Select with null Postgresql field
In Hibernate there is no COALESCE function, instead you should use the nullif(column, 'Value if null')
postgresqlanswered Rafael Lincoln 187 -
1
votes1
answer420
viewsA: Doubt about relationship between tables in mysql
Your modeling is not very good. There is no connection between client and user, as you will know which client is only by user id. If each client can have more than one user, then create a Mxn table…
mysqlianswered Rafael Lincoln 187 -
5
votes2
answers249
viewsA: Comparison with Postgresql database using C#
You can add a variable in the code if you don’t want to add a column in the database to check how many times the login has been tried. int tentativas = 0; { NpgsqlConnection conn = new…
-
1
votes2
answers439
viewsA: Write data to the database (Value Member and Display Member)
At a conversion error when creating the requested instance, one of your fields is null. Create a variable for each field and debug to find which field is null.
-
2
votes1
answer187
viewsA: Download FTP using c#
Add the Addrange Method to take only part of the file. request.AddRange(0, 999); Code node above vc will get the first 1000 bytes of the file.
-
2
votes1
answer222
viewsA: Ulitization IS DISTINCT FROM - Postgres
The IS DISTINCT FROM comparison returns true when the data is different, the difference is that it treats null as a known value. It can be used whenever you want to compare values and ignore null…
-
0
votes1
answer248
viewsA: "create temp table" in Rigger in Postgresql
I don’t quite understand what you want to do, but you can create time tables in your Rigger. Ex: CREATE OR REPLACE FUNCTION f_table1_tbi() RETURNS TRIGGER AS $$ BEGIN CREATE TEMPORARY TABLE table2…
-
3
votes3
answers2045
viewsA: Inserting record and recovering ID generated by SQL Server 2012
You did not say which database you are using, but if you are using Postgresql change your query to: cmd.CommandText = "INSERT INTO Venda(ID_Pessoa, ID_Caixa, ID_PDV, ID_Deposito, Data, Itens, Valor,…
-
0
votes3
answers155
viewsA: How to test Filters that verify Claims data?
You can foreach your saved Claims as follows: IEnumerable<System.Security.Claims.Claim> Claims = HttpContext.GetOwinContext().Authentication.User.Claims; foreach (var t in Claims) {…