Posts by DanOver • 1,334 points
32 posts
-
2
votes1
answer38
viewsQ: Why in a generic-type method extension do I not need to spell out a type when calling it?
In the link below is a code snippet consisting of nothing more than a Shuffle method that is used as a Extension Method of Array. Although the method is generic type, I don’t need to pass a guy when…
-
1
votes1
answer54
viewsQ: Can I run ASP.NET on Nginx without Kestrel?
Is it possible to host my ASP.NET site directly on Nginx, just like PHP would? No need to use Kestrel and Nginx just as one proxy reverse.
-
5
votes1
answer247
viewsQ: Async/await generates a new thread?
When reading about async/await methods, it is said that using these keywords alone will not cause your method to run in a new thread. However, I get the output below by running my code. A thread was…
-
5
votes1
answer107
viewsQ: If everything in C# inherits from Object, why aren’t all types by reference?
If, for example, a struct type inherits from the class System.ValueType (who inherits from System.Object), why it, and the other types by value, are not allocated in the heap? By making a Boxing, we…
-
2
votes1
answer178
viewsQ: If in C# "Enum"s only accept whole types, why accept a "char"?
When we’re learning about enums in C# is said to accept only integer numeric types. Therefore, we soon think of sbyte, byte, short, ushort, int, uint, long or ulong. But the code below also works,…
-
1
votes1
answer48
viewsQ: If an object manipulated by a pointer is allocated in the heap, can it be collected by the Garbage Collector?
I am studying C# and I am in the pointers section. I understand that a pointer stores a memory address of an "object" (types by value and Array). The data stored by the pointer (the address) is in…
-
1
votes1
answer74
views -
2
votes6
answers4346
viewsA: What is the difference between attribute and field in the classes?
The impression I have is that in the diffusion of object-oriented programming several terms have been introduced in the literature and in the daily life of those who work in the area of programming,…
-
28
votes6
answers4346
viewsQ: What is the difference between attribute and field in the classes?
When I am studying object-oriented programming, at times I hear about fields and attributes of a class, but the two seem to be different definitions to refer to the same thing. What’s the…
-
0
votes1
answer213
viewsQ: How to clean Output Window from Visual Studio?
I’m writing an application that makes use of the debug class to write to the VS Output screen. Only that I would like to clean the contents of this screen through my code, because after a while it…
-
2
votes1
answer81
viewsQ: Perform tracking and debugging on . NET
During the development of an application, there are times when I get lost and want to understand how my code is running. For example, in which iteration of a particular loop of repetition it is,…
-
5
votes1
answer100
viewsQ: How to use expanded property in C#
I have a problem, I created a class containing the following property: public class MinhaClasse { public int Idade {get; set;} } But when I do it: public class MinhaClasse { public int Idade { get{…
-
1
votes2
answers81
viewsQ: How to restrict a set of a property?
I have the following property in my class: public char Naipe { get; set; } This property can only receive one of the following values: (char)9824 (Espada) (char)9827 (Paus) (char)9829 (Copas)…
-
1
votes3
answers178
viewsQ: How to store a single character?
My class has an attribute that is a single character. I can store as string, but I think the right thing would be char. Only this attribute can receive one int (between 0 and 9) another method. How…
-
2
votes1
answer211
viewsQ: How many threads should I split a task into?
I am developing an application in C#, one of my functions can be run with multiple threads. However, how many should I use? If the processor has 4 cores, there is advantage in using more than 4…
-
1
votes0
answers224
viewsQ: How can I train a neural network with previous matches?
Suppose I wanted to teach a neural network to play chess. I realized the method of learning by reinforcement. I have seen cases where these networks learn from examples of matches, but how can this…
artificial-intelligenceasked DanOver 1,334 -
7
votes3
answers12885
viewsQ: How do you know what language a program was written in?
I downloaded a program on Windows, and in it I can not get information about which language was programmed. There is how to know?
-
1
votes1
answer304
viewsQ: Use Text User Interfaces in C#?
I would like to give a basic interface to an application developed in Console Application. I want to make use of features like TUI (Text-Based User Interfaces), common on other platforms like…
-
1
votes1
answer1505
viewsQ: Data normalization in a neural network
I am studying about the use of neural networks and learned that input data must be normalized so that activation functions do not operate at saturation intervals, it is common for the normalization…
asked DanOver 1,334 -
2
votes1
answer52
viewsQ: How is the encryption of a Securestring made and stored?
The class SecureString is used to represent a text that must be kept confidential in memory (passwords, card numbers, balances, etc.), and carries out its correct deletion from memory when said text…
-
5
votes1
answer446
views -
5
votes1
answer612
viewsQ: What tools to optimize a C#code?
Code optimizer tools aim at, for example: - Removal of dead code: removes any dead class, attribute, or method code that is not referenced and used in the project. - Rewrite and reduce functions:…
-
-1
votes1
answer258
viewsQ: Obfuscating a string in the source code
I need to hide a string in the source code of my program. Searching I found a programmer who hid the phrase "Hello World!" through a chain of if and loops tying everything to a array numerical. The…
-
1
votes0
answers28
viewsQ: Construction of a string in real time
In the construction of an app I was suggested not to incorporate the public key to any code as a literal string. Although it is not secret, it may be replaced by another in a possible fraud attempt.…
-
3
votes1
answer41
viewsQ: Protect memory address
I’m developing a simple game. I want to protect the memory address where the player’s score is located so that only a specific process can access it, thus preventing the user from altering or…
-
1
votes1
answer112
viewsQ: How to save a private key locally in security?
I am developing an application for Android/iOS mobile devices, in this application the communication with the server is done in encrypted form. The user application, when first started, generates a…
-
3
votes2
answers2197
viewsQ: Is encrypting the database an efficient measure? How to protect data against leaks?
With the recent problems of password leaks and personal information from the most diverse sites, there is evidence of a lack of zeal regarding the storage of such information by certain companies,…
-
15
votes2
answers6108
viewsQ: Random draw, but with different odds
I am implementing a system where the user clicks on a button and a draw with balls of different colors occurs, but for each color there is a probability: He has a 30% chance of catching a blue ball…
-
1
votes0
answers521
viewsQ: Automate website browsing for software testing activities
I’m on a web systems development project, accessed by the browser. We are constantly making modifications in the operation of the processes and at each specific period we perform a test on the…
-
9
votes2
answers185
viewsQ: How to store a website settings?
I intend to develop a site that has some configuration options, for example: Maintain standard or custom logo Allow registration of new users Authorize anonymous comments in posts How should these…
-
2
votes2
answers245
viewsQ: Check if user changed POST request
I have a javascript application that runs on the client side, in this application the user can trigger events that communicate with the server of my site through a POST request. However, I need to…
-
1
votes1
answer1665
viewsQ: Create truth table in C#
I have a test function that should receive different input combinations, to define these patterns I will use a truth table. However, I’m having difficulty generating the truth table, I made an…