Posts by vinibrsl • 19,711 points
378 posts
-
1
votes3
answers11849
viewsQ: Restart application in Python
How to restart my program with Python? cpf = input('Digite os nove primeiros dígitos do CPF: ') if len(cpf) != 9: # Aqui deve reniciar a aplicação.
-
15
votes1
answer1419
viewsQ: What is the advantage of semicolons in programming languages?
I know that in programming languages like Java and C#, the semicolon indicates the end of the instruction, as in the example below, in C#: System.Console.WriteLine("Hello, World!"); However, there…
-
1
votes0
answers39
viewsQ: When is it necessary to use GC.Collect()?
I know that in . NET/CLR, the Garbage Collector acts alone, without it being necessary to call him manually. There are cases where the Garbage Collector does not "collect" automatically? When it is…
-
5
votes1
answer1683
viewsQ: How to identify and avoid memory Leak in . NET?
I know CLR has tools like Garbage Collection, responsible for memory management in .NET. One of the functions of the garbage collector, GC, is to avoid unnecessary memory consumption. Even with the…
-
2
votes1
answer924
viewsQ: How to create a runtime class?
How to create a runtime class, or Runtime, dynamically, from a Dictionary<TKey, TValue>, for example, with C#? Dictionary<string, string> dicionario = new Dictionary<string,…
-
2
votes1
answer192
views -
2
votes1
answer237
viewsQ: What is Guidattribute for and why?
I know the GUID is a 'unique' identifier, but I don’t see why your attribute application, as in the example below: [GuidAttribute("C281C7F1-4AA9-3517-961A-463CFED57E75")]…
-
2
votes1
answer72
viewsQ: Run fast things synchronously and time-consuming things asynchronously?
Usually, on . NET, I run things time-consuming asynchronously so as not to stop the thread visual. In a simple example, if I have a loading in the UI, should lengthy things be executed without…
-
15
votes3
answers8566
viewsA: What is CQRS and how to implement?
CQRS Command Query Rsponsibility Segregation, or CQRS, is a standard software development architecture that summarizes separating reading and writing into two models: query and command, one for…
-
5
votes1
answer58
viewsQ: How does a historical debugger work?
A historical debugger, or Historical Debugger, is able to collect key data from a debugging session, such as locals/autos (in the case of Intellitrace), exceptions and events of the session. I…
-
5
votes1
answer135
viewsQ: When and why use the Obsolete attribute?
At least in the projects I’ve worked on, I see no point in using the attribute Obsolete in methods that are no longer used. What I do, and I see people doing is removing or commenting on codes that…
-
3
votes2
answers1041
viewsA: What is the difference between "step over" and "step into" in Debugger mode?
Let’s use the following example: Public Sub PagarContas() Dim Valor = Calcular() EfetivarPagamento() ... End Sub Public Function Calcular() As Decimal Return 108.5 + 87.8 End Function Your case…
-
5
votes1
answer2454
viewsQ: What is cloud computing data redundancy?
What is data redundancy, when it refers to cloud computing and what is its importance for the service?
-
13
votes2
answers6067
viewsQ: What’s the difference in instantiating, initializing, and declaring a variable?
Many articles on the Internet refer to these verbs, regardless of the programming language. But sometimes they are all confused or exchanged, which creates a lot of confusion. Which means…
-
5
votes1
answer150
viewsQ: Log with historical debug (Intellitrace)
I have a WPF application and am looking for the best way to solve untreated exceptions. Today, when an unexpected exception occurs, deal at the event Application.DispatcherUnhandledException. There,…
-
1
votes0
answers568
views -
2
votes1
answer1436
viewsA: What is the formula used to calculate FPS in a game?
The table rate per second (FPS or QPS) may be calculated as follows:: public void start() { lastFPS = getTime(); } public void updateFPS() { if (getTime() - lastFPS > 1000) {…
-
4
votes1
answer66
viewsQ: Why can’t we use Await inside a Catch, Finally and Synclock in VB?
Why can’t we use the operator Await within the statements Catch, Finally and Synclock in VB? The C# 6.0 has support to use the Await within the Catch/Finally.…
-
6
votes1
answer99
viewsQ: How to automatically add namespaces in Visual Basic?
When creating any class in C#, using Visual Studio, it automatically adds the namespace, as can be seen below: namespace Aplicacao.Modelo { class Cliente { } } In Visual Basic, he doesn’t do the…
-
8
votes2
answers1863
viewsQ: How to decrease compilation time?
I have a Solution with 20 projects, and most have a dependency relationship with each other. The build time takes a lot (6-8 minutes - may seem small, but it does a lot of damage when testing), even…
-
2
votes1
answer159
viewsA: Hide form through C#keys
On your screen, you can use the event KeyDown to capture the pressing of a key. In case you are using Windows Forms, do not forget to set the property KeyPreview form for True. private void…
-
2
votes1
answer54
views -
13
votes1
answer832
viewsQ: What are statements and operators?
I usually access the MSDN often and I see a lot of these terms. What are statements and operators? What differentiates them?…
-
0
votes0
answers13
viewsQ: Difference between If instruction and If operator
What are the differences between the if instruction and the if operator in VB.NET? If(Condicao, x(), y()) If Condicao Then x() Else y() End If…
-
7
votes2
answers5722
viewsQ: What is the difference between Wait() and Sleep()?
The meaning of the two words seems very similar. What’s the difference between wait() and sleep()? When to use each?
-
25
votes6
answers17379
viewsQ: How to improve reading performance of a SQL Server database?
I have a database with more than 250 tables, there are tables with more than millions of records and when I need to search or change some of these records, it takes a lot of time, which ends up…
-
2
votes1
answer8387
viewsQ: When to use Dim and when to use Set?
What are the differences between the Dim and the Set? When to use each? Context 1 Dim minhaString as String minhaString = "Olá!" Context 2 Set minhaString = "Olá!"…
-
5
votes2
answers185
viewsQ: How to pass a lambda expression as argument of a parameter in a method?
Is there any way to pass a lambda expression as a parameter argument in a method? For example: Private Sub Metodo(Expressao As ?) Lista = Lista.Where(Expressao) End Sub…
-
2
votes1
answer72
viewsQ: Reset a variable, or recreate it?
In terms of performance, what is more preferable? There are other differences between the two modes than performance? Reset a variable multiple times? Private Sub Metodo() Dim MeuTipo As Tipo For i…
-
19
votes2
answers5046
views -
3
votes1
answer2266
views -
2
votes1
answer47
viewsA: What is the equivalent of the Handler clause in C#?
C# works differently compared to VB.NET. Add the following at the initialization of your class: Skype1.UserAuthorizationRequestReceived += auoAdd; Where auoAdd is the method that when the event is…
-
7
votes2
answers355
viewsQ: How to use Windows Forms components in a WPF application?
Is there any way to use Windows Forms components in WPF? For example, I need to use control Chart or the MaskedTextBox from Windows Forms, which does not exist in WPF applications, as I could use it…
-
2
votes2
answers2034
viewsA: How do I compare two strings in c
You can use the function strcmp, declared in header file (or file header) string.h. Note that the function strcmp compares the content of strings and not your size. Example: strcmp(string1,string2);…
-
2
votes1
answer83
viewsQ: How to use an enumerator like Itemsource from a Combobox?
Assuming I have the following: enum Dias {Segunda, Terça, Quarta, Quinta, Sexta, Sábado, Domingo}; How can I use the enumerator Dias as ItemSource of a ComboBox in a WPF application? For example:…
-
5
votes1
answer3045
viewsQ: Difference between If and Iif
In VB.NET, what is the difference of the use of If and of IIf under these conditions? If Condicao Then x() Else y() End If IIf(Condicao, x(), y())…
-
5
votes1
answer716
viewsQ: What is the difference between the "+" and "&" operators when concatenating strings?
In VB.NET, there are two operators I use in concatenating strings, the & and the + (I know there are more efficient methods for concatenating strings, but in this question, I pay attention only…
-
1
votes0
answers702
viewsQ: What does it mean and what is the purpose of 'Return 0'?
I recently started some studies on C/C++ and in the vast majority of the initial examples I saw, I came across return 0 at the end of the code. #include<iostream> using namespace std; int…
-
10
votes2
answers5514
viewsQ: Is there a correct way to comment on a code snippet?
Is there a correct way to comment on a code snippet? For example: // Esconde a tela this.Hide() or would be: this.Hide() // Esconde a tela or even: this.Hide() // Esconde a tela Is there some kind…
-
3
votes1
answer53
viewsQ: Is there any way to shorten the property declaration?
I know in C# it is possible to do this: public string propriedade { get; set; } Is there any short way to declare properties with the procedures Get and Set in Visual Basic? The only way I know is…
-
12
votes1
answer12831
viewsQ: What are the main differences between VB.NET, VB6 and VBA?
What are the main differences between VB.NET, VB6 and VBA?
-
15
votes2
answers10671
viewsQ: What’s the difference between Union and Union All?
What’s the difference between UNION and UNION ALL? If possible, include examples of use.
-
6
votes2
answers858
viewsQ: What are the differences between require() and library()?
In R, what are the differences between require() and library(), if there? When should I include the require() and when should I include library()?…
-
11
votes2
answers5134
viewsQ: What makes Join() so superior compared to other concatenation techniques?
It is common to read that the method of concatenation join() is a lot superior what other techniques in Python (such as + or +=). Starting from this point, I ask some questions: What does the join()…
-
3
votes1
answer143
viewsA: How to Create Div that appears in the page scroll
Endless scrolling Source: Reproduction/Smashingmagazine Sane scripts created to improve the user experience in scrolling the page. It can also be called by its English terms: Lazy loading Endless…
-
61
votes2
answers4961
viewsA: How to use such semantic tags?
HTML5 has introduced many elements in total, currently there are more than 100, according to W3C. It is natural that so many elements cause a certain mess among developers, since there are similar…
-
7
votes3
answers41730
viewsA: Difference between Visual Studio Community, Enterprise and Code
The differences, quickly, are as follows:: Visual Studio Community: free and full version for students, individual developers or free-source projects. Visual Studio Enterprise: full and paid…
-
4
votes2
answers2300
viewsA: How to make HTML/CSS code clean and optimized?
There are no rules for a clean code. Neither in the markup languages as you are, nor in the programming. Target audience of source code: teamwork is OP! It is necessary to take into account who will…
-
12
votes2
answers190
viewsA: What is Listviewanimations and how to use it?
What is? The ListViewAnimations is a free code library for Android that allows you to add animations on items from ListView easily, as can be seen in the example: Example of library usage You can…
-
5
votes1
answer6021
viewsQ: How to concatenate two strings?
Supposing I have two strings, Olá and mundo!, as I grant them using R?