Posts by rubStackOverflow • 7,372 points
226 posts
-
7
votes2
answers1594
viewsA: XML serialization - NFC-e ide element
nota.NFe.infNFe.det expecting a array of nfeProcNFeInfNFeDet a solution would be: var det = new TNFeInfNFeDet { nItem = "1", prod = new TNFeInfNFeDetProd() { xProd = "Nome produto", cProd = "123" },…
c#answered rubStackOverflow 7,372 -
5
votes1
answer297
viewsA: XSD For Class C# Enum
I solved the problem as follows. When the schema in the VS there are some reference problems: Somehow this problem of FileioPermission affects the generation of the class by xsd (xsd…
-
1
votes1
answer616
viewsQ: Migrations Hasmaxlength x Hascolumntype
I am creating a simple test table with EF Core e SQlite Follow the first test in which the modelbuilder creates a migration (shown just below) protected override void OnModelCreating(ModelBuilder…
-
15
votes2
answers1101
viewsQ: Entity Framework Core x Entity Framework 7
What are the main differences between Entity Framework Core and Entity Framework 7? There are scenarios where one is more suitable than the other. It’s so much version and so much name change that…
-
1
votes1
answer32
viewsA: Class Library (Portable) UWP + WPF
The problem was Microsoft.NETCore.UniversalWindowsPlatform outdated in the project WUP, was just looking for update via Nuget and the problem was solved. Nothing like visiting the Nuget from time to…
-
1
votes1
answer32
viewsQ: Class Library (Portable) UWP + WPF
I created a simple project Portable Class Library that is being used in two projects WPF e UWP. The two projects work normally, however, the project UWP when compiling displays the following error…
-
4
votes1
answer196
viewsA: Cortana app creation in English is not working
At first I don’t know where you registered the xml with the command settings for recognition, but if OnActivated although the name is not executed when the application is 'enabled' The procedure to…
-
1
votes1
answer185
viewsQ: Standardize code formatting Visual Studio
I have an automatically generated code as shown below: I wanted to format automatically so that it was in format: public int Id {get; set;} Note: This code was automatically generated by Visual…
-
0
votes1
answer513
viewsA: Send PHP POST request via Xamarin
The method PostAsync is asynchronous, so the void test() method should be async void testar() then call the asynchronous method as follows: await myHttpClient.PostAsync(URL, formContent) See how it…
-
1
votes2
answers184
viewsQ: Doubt about having control TFS version
I am learning versioning, my doubt is with respect to the terms shown in the figure below Epic and Issue, looking for their translation for me did not make sense how to use these options to create a…
-
1
votes2
answers560
viewsA: Xamarin.Forms Relative Layout Xaml
The image is overwriting the button, just add the button after the image. <RelativeLayout > <Image Source="Rectangle2.png" /> <Image Source="linkedin.png" /> <Button Text="Log…
-
1
votes1
answer101
viewsA: Xamarin.Forms configuration
When creating a type project Xamarin Forms 3 projects are automatically created for three platforms iOS, Android, WP. If your intention is to create only one application WP it is not advantageous to…
-
2
votes1
answer2079
viewsA: Generate C# class from XSD
Do the following: Save the file xsd (http://www.cnj.jus.br/images/dti/Comite_Gestao_TIC/Modelo_Nacional_Interoperabilidade/versao_07_07_2014/intercomunicacao-2.2.2.xsd) on your computer. Edit the…
-
4
votes1
answer79
viewsQ: Is using "Touint64()" to format string correct?
Looking for a practical way to format string I came across the following: Convert.ToUInt64(string).ToString(@"00000\-000"). It is a good pathic to use this method to format strings? There is a…
-
0
votes1
answer52
viewsA: VS 2015 Solution Explorer does not identify changed file (TFVC version control)
To recreate the files responsible for versioning (VS-2015): File > Source Control > Advanced > Change Source Control The screen below will be shown: Select the Solution/Project and click on…
-
0
votes1
answer52
viewsQ: VS 2015 Solution Explorer does not identify changed file (TFVC version control)
I’m learning about versioning with TFVC and Git. Versioned projects with Git modified files are marked with a symbol indicating that you hear change (commit pending) Already projects managed with…
-
1
votes1
answer25
viewsQ: Remove UI Debugging Tools from Window
I would like to know how to remove the option UI Debugging Tools for XAML appears at the top of the window WPF (as shown below)…
-
5
votes1
answer70
viewsQ: Property access modifier C#
I noticed that it is possible to sign a property access mode as private: public string Codigo { get; private set; } Or just ignore it: public string Codigo { get; } Is there any difference or…
-
0
votes4
answers156
viewsA: How to avoid repetition in LINQ queries?
Another way would be: private static Produto CamposProduto(Produto p) { return new Produto { ProdutoId = p.ProdutoId, Descricao = p.Descricao, Preco = p.Preco, Estoque = p.Estoque }; } To take the…
-
0
votes1
answer127
viewsA: Format Combobox value pulled from SQL database (LINQ) in C# Project (WPF)
I didn’t understand if I wanted the guy to look like Double, but it follows a transforming response to string: var query_Fardo = from f in oDB.tabProdutos where f.Codigo ==…
-
4
votes1
answer185
viewsA: Can Sql Server Management Studio handle any database?
First the Sql Server Management Studio is not a SGBD and yes, according to Microsoft: Integrated environment to access, configure, manage, manage and develop all components of SQL Server As each…
-
2
votes1
answer70
viewsA: How to put 0x0D 0x0A at the end of a txt file
According to This table What you need is to add at the end of your file the following string: \r\n…
-
7
votes3
answers1072
viewsQ: What is and what is the function of . (dot) in POO?
A long time ago a teacher defined and explained the function of . in POO (Java class). With time I ended up forgetting, but I found it quite interesting, often we think is just a "point", however,…
-
-1
votes1
answer129
viewsQ: Convert Autohotkey script to C# or VB6
I would like to convert the following script done with AutoHokey: DllCall("shdocvw\SetShellOfflineState", "int", False) With that script I can "take" the Internet Explorer in the way offline without…
-
0
votes1
answer482
viewsA: Nfe Data XML Format
According to the Nfe manual, the date format is: AAAA-MM-DDThh:mm:ssTZD (UTC Universal Coordinated Time)
-
5
votes3
answers968
viewsA: C# Display time in textbox control
A possible way: 12h format textBox1.Text = DateTime.Now.ToString("hh:mm:ss"); 24-hour format textBox1.Text = DateTime.Now.ToString("HH:mm:ss");…
c#answered rubStackOverflow 7,372 -
0
votes5
answers7513
viewsA: Reduce Log File Size
Test the following: Make a copy of your bank; Execute dump tran SEUBANCO with no_log dbcc shrinkdatabase (SEUBANCO,0) Another option would be to untie the bank and try to Tach only with the file MDF…
-
1
votes3
answers4966
viewsA: What is the function of the operator "!" (exclamation)?
! It is a negation, that is, it is denying (or reversing the result) of the method aplicaDescontoDe
-
4
votes4
answers156
viewsQ: How to avoid repetition in LINQ queries?
I have the following query LINQ which is in a method that returns all products: var query = from p in Produtos select new Produto { ProdutoId = p.ProdutoId, Descricao = p.Descricao, Preco = p.Preco,…
-
1
votes1
answer116
viewsA: SQL Value Rounding in the PRINT command
If you want the print shows decimal places, must define how decimal some variables would look like this: declare @divida decimal(12,4) = 10000 declare @aplicacao decimal(12,4) = 1500 declare…
stored-proceduresanswered rubStackOverflow 7,372 -
1
votes1
answer53
viewsA: Doubt with Date Formatting in sql server 2008
Try it this way: select cast(getdate() as date) data or select CONVERT(date, getdate()) data date ---------- 2016-01-10 (1 Row(s) affected) date ---------- 2016-01-10 (1 Row(s) affected)…
-
2
votes1
answer1506
viewsA: How to make an hour comparison in sql
Although you have not specified the server version, go a solution to 2008 version or higher. Declare @HORA_FECHAMENTO char (5) Declare @HORA_ATUAL datetime Set @HORA_FECHAMENTO='04:59' Set…
sql-serveranswered rubStackOverflow 7,372 -
0
votes2
answers211
viewsA: Where’s the folder code for Gento 2?
Have you seen this site: Magento 1 modules will not work in Magento 2, since the folder structure itself has been substantially changed. The /app/etc/modules folder has been discontinued. The module…
magentoanswered rubStackOverflow 7,372 -
9
votes2
answers8871
viewsA: How and when to use Interface?
When using an interface and in what situations its use is viable? Follows some recommendations for use: When there is a need to provide common functionalities for unrelated classes. When there is a…
-
6
votes1
answer356
viewsQ: Develop for x86 and x64 platforms
More and more operating systems are prioritizing the "version" 64bits, with this, developing applications for this architecture becomes increasingly attractive. Based on this scenario, I ask what…
-
19
votes1
answer1697
viewsQ: What is Fluent Interface?
I quickly read some articles about Fluent Interface but I could not clearly understand this pattern. Definition Wikipedia: It is an implementation of an API oriented to object that aims to provide…
-
0
votes3
answers131
viewsA: LINQ Anonymized Type as parameter
Another way he found was by using IEnumerable<dynamic> (however, the ability to Intellisense for the attributes is lost). { MinhaLista (produtos.Select(p => new {p.Id, p.Estoque}) } public…
-
2
votes3
answers131
viewsQ: LINQ Anonymized Type as parameter
I am trying to create a method that receives an anonymous type (LINQ query) (Please correct me if the term tipo anônimo (anonymous types) is incorrect) MinhaLista (produtos.Select(p => new {p.Id,…
-
3
votes1
answer77
viewsQ: Use Defaultifempty in a LINQ query with Join
The goal is to join these two list, being that if in the list pr have an item that does not match the list un, the default value will be returned. I know there are other ways, but I would like…
-
5
votes2
answers351
viewsQ: Update data using LINQ
I read that LINQ should be used for queries, but in the context below, the best way I found to update was by using the let. var produtos = from o in orcItens join p in Produtos on o.Id equals p.Id…
-
6
votes2
answers1387
viewsQ: Simplify LINQ query with Contains
I have two questions regarding the LINQ consultations below: { //lista de itens do orçamento var ids = itensOrcamento.Select(p => p.Id); //Produtos - todos produtos cadastrados var produtos =…
-
1
votes3
answers1504
viewsA: Copy file with progress
Adds reference to library: Microsoft.VisualBasic.dll (A DLL can be found in the folder C: Windows Microsoft.NET Framework.net.xxx) Choose version . NET according to your project In the code: using…
-
0
votes1
answer377
viewsA: Copy files showing progressbar
You can do it like this: FileSystem.CopyFile(ArquivoOrigem, ArquivoDestino, UIOption.AllDialogs);
-
5
votes1
answer118
viewsQ: Android Protection Reverse Engineering Client-Server
I see that it is very common applications Android (games for example) are modified through engenharia reversa. Even using obfuscação and other anti reverse engineering techniques, it is difficult to…
-
1
votes1
answer395
viewsA: I can update the Mono.Android library in Xamarin
New functionality is obtained by updating libraries, by default are automatic and you are notified. If you want to manually check: Tools->Options Also update packages on: Tools->Nuget Package…
-
9
votes2
answers1919
viewsQ: When should I use GC.Suppressfinalize()?
In . NET, under what circumstances GC.SuppressFinalize()? What are the advantages of using this method? Obs: I found answer in the SO-en: When should I use GC.Suppressfinalize()? As it had nothing…
-
2
votes1
answer138
viewsQ: What does "Inconsistent modifiers style" mean in Resharper?
Resharper is suggesting the following change in code: Obs: To classe Pagamento has public methods. Why the suggestion internaland not public?…
-
6
votes2
answers1494
viewsQ: Delete record with duplicate (Id) leaving only one occurrence
This is an old bank, dbase who was transferred to MSSQL. How to leave only one occurrence in the case of id duplicated in a table? | Id| Nome | |-----------| | 1 | JOSE | | 1 | JOSE | | 2 | MARIA |…
-
3
votes2
answers242
viewsQ: Differentiate Datetime.Now and Datetime.Now.Date
I have a test and would like to know when an attribute received DateTime.Now or DateTime.Now.Date, has how to differentiate when an attribute has received these values? Note: Can be varied values,…
c#asked rubStackOverflow 7,372 -
3
votes2
answers253
viewsQ: How to work with a Datetime instance without the time information
My tests had been passing successfully, when "by magic" one of them started to fail: var data1 = DateTime.Now.AddDays(1); ...processos ...processos var data1 = DateTime.Now.AddDays(1);…