Posts by Maniero • 444,682 points
6,921 posts
-
6
votes1
answer143
viewsA: Can I create a Win32 app in C#?
Being independent of . NET Framework is different from being independent of anything. It is possible to create a native executable using C# or other standard language. NET with .NET Native. It is a…
-
13
votes1
answer265
viewsA: What does "Run on the JVM" mean?
What does that mean? It means that these languages generate a JVM-compatible "binary," which it is able to understand, which follows all protocols specified by that platform. It’s like saying an…
-
3
votes3
answers1519
viewsA: What is 'final' in PHP?
It’s a way of saying this class can’t be inherited, which is usually a good idea. Developing classes prepared to be inherited is much more difficult, the next maintenance becomes a burden. I even…
-
3
votes1
answer741
viewsA: What is tracking pixel?
The Beacon is an umbrella for tracking techniques, among them the pixel tracking, which is a controversial mechanism because it attempts to inform about access to a message or other individual form…
-
5
votes1
answer115
viewsA: Relationship between Hotspot and JVM, JDK/Openjdk?
It is one of the implementations of the JVM, among the many existing. It is not the original implementation of the JVM, but soon became the official one. Created by Sun today owned by Oracle, but…
-
11
votes1
answer920
viewsA: What’s the point of double exclamation before the method call on Kotlin?
Kotlin hates null reference error, one of the biggest criticisms of Java. So by default it is not possible to create code that tries to access a null. But it may be that you want this, probably to…
-
8
votes3
answers189
viewsA: What happens in the expression "$a+++(+$a)"?
If we separate the syntax in each expression it is easy to understand: $a = 0; $b = $a++; $c = ++$a; var_dump($a, $b, $c, $b + $c); See working on ideone. And in the repl it.. Also put on the Github…
-
13
votes3
answers2118
viewsA: Memorystream vs Stream
What would be the main difference between the two? The Stream is an abstract class basis for all streams (fuller definition) that may exist, so you can encode algorithms that need to stream without…
-
4
votes2
answers4695
viewsA: How to change the value of a variable by function in Python?
I don’t think you understand the mechanism of the variable. Every variable has scope, It only exists where it was declared. Even if you have the same nom and declared in different places, they are…
-
5
votes1
answer251
viewsA: Does it make sense to store the salt of a password with the hash itself?
No problem at all. The function of "salt" exists to avoid collisions of equal passwords or hashes the same result. Its function is not to establish a secret, it is only to avoid discovering a…
-
11
votes2
answers412
viewsA: Is Markdown not working on README on Github?
The file must have extension .md to the engine Github to know that you should process Markdown. You don’t have to do anything else but use the Markdown special markdown markup. In fact the # turns…
-
4
votes2
answers707
viewsA: Is there any way to insert pre-defined code snippets in Visual Studio?
Yes, it’s possible. This is called Code Snippet and it has extensive documentation. If it’s not enough exist plugins in the Marketplace of the VS.…
visual-studioanswered Maniero 444,682 -
3
votes2
answers134
viewsA: How to know which variables are defined?
Yeah, I don’t know if I’d like that: dir() list the variables of the specific scope globals() returns global variables (which should be avoided) locals() returns the function variables…
-
2
votes1
answer71
viewsA: How to get a correct value using the point?
Treating this correctly can take a little work, but a basic solution to a simple example like this would be to remove the point if there is one, something like that: preco_casa_raw = input("Qual o…
-
1
votes2
answers742
viewsA: I can’t get a variable from another namespace
Using Console.Business.Caminho works. I created a project without setting anything up and it worked. I just made some changes to simplify the compilation, but if your code is the one posted in the…
-
5
votes1
answer780
viewsA: Where can I use GUI with . NET Core?
Leaving aside Xamarin that is not . NET Core and serves mobile for Android and iOS (UWP wheel on the late Windows Phone), but that I think these products will approach, it is possible to develop GUI…
-
5
votes2
answers111
views -
2
votes2
answers1619
viewsA: About headers in C++
Below are still the specific questions, but now understand that the questions actually is about the error generated by inline. Whenever you use the inline the code of implementation the function…
-
3
votes1
answer248
viewsA: What is the reason why a vector with no set size does not work?
When we declare a variable we are reserving a memory space for it, nothing else. And the line int vetor []; is just the statement, nothing more. By obvious the syntax of the declaration of a array…
-
1
votes1
answer60
viewsA: Generic method for locating a specific value in several types of similar structures
That’s probably what you want: public class Exemplo<T> { private List<T> listinhaGlobal; private T instanciaDeExemplo; private T GetInformation() { foreach(var item in listinhaGlobal) {…
-
30
votes1
answer916
viewsA: Why was . NET Core created?
In fact the . NET Framework is an interesting platform that has its merit, but does not serve for everything. I believe that the advent of containers, microservices, Iot, internet Always on and the…
-
3
votes3
answers58
viewsA: Nullreferenceexception error in Join
I’m finding this code strange, but you’re not doing what you think you’re doing. You’re not analyzing whether the p2 is null is analyzing if a field of it (pd2.codigoDetalhe) is null, which is too…
-
12
votes1
answer886
viewsA: Is Perl used nowadays?
Yes, it is quite used. But not as much as it was in the past. Part because the language is somewhat illegible, as it has become legendary, part because the language did not evolve well, even taking…
-
7
votes2
answers1398
viewsA: Java to Kotlin conversion
The programmer creates clean code. In all languages most programmers do atrocities with code because most refuse to learn real programming. Kotlin helps to have more concise code compared to Java,…
-
10
votes1
answer1028
viewsA: What is the maximum number of items I can put inside a List<T> in C#?
Since the type of the access index to the object of List is a int (.NET Core) the theoretical limit is 2 raised to 31 or 2,147,483,648. But this is more complicated than it looks. In general each…
-
6
votes1
answer294
viewsA: Implementing the concept of inheritance in a database
I was just going to comment, but it got long and I think that deep down the error is conceptual. Where is it written that it should be auto-incremented? What is the criterion for generating an…
-
2
votes1
answer82
viewsA: Is there equivalent to VB.NET Call in C#?
The equivalent in C# would be: (new Form() { Text = "Olá, mundo!" }).ShowDialog(); I put in the Github for future reference. You may be wondering where is the 3rd. line. It should exist in the…
-
2
votes2
answers186
viewsA: Why do you accept values beyond the size of the vector?
And why wouldn’t I? In a certain way in C arrays are pointers, not exactly, but almost. Then it can access all available memory. It is the programmer’s problem not to let this happen. I spoke in C…
-
5
votes2
answers194
viewsA: Different errors in C code on different compilers
What’s the mistake? Has a ; in the #define, and should not have, this is wrong syntax. If the class taught like this, run away from it. In any compiler this does not do what you want. Why different…
-
4
votes1
answer111
viewsA: Error when performing LINQ query with equals in Where enclosure
If you want to test the equality of some object you should use the equality operator which is the == that operates on that type. The method Equals() tests the equality of the object according to the…
-
55
votes3
answers2697
viewsQ: What is reactive programming for?
I have read What is Reactive Programming (Reactive Programming)?. The answer sounds good, but it’s theoretical. I understand what it is, but with that I don’t know what to do. Where it should be…
-
3
votes1
answer117
viewsA: How do I compile this project in C#?
You have to say what you want to use library. csc /r:Mono.dll /t:onde_estao_as_bibliotecas *.cs Surely other errors will appear. I have my doubts whether you can use Mono in csc. It is, but it’s…
-
7
votes4
answers7713
viewsA: How to detect if a variable is null?
It’s working right. You need to decide if you want to know if the variable is null or empty, they’re completely different concepts. The title asks for one thing, the comment asks for another. A null…
-
4
votes1
answer276
viewsA: Return array of integers except 0. How do I do?
No need to create a array that fits all the generated elements, can make one with the amount of final elements. But you don’t need to filter anything, you can use math to know beforehand which are…
-
10
votes1
answer112
viewsA: Does creating local variables all the time generate extra cost for the software?
In this example it is the same, has example that there is an important semantic change and the code will give different results. But speaking of cost, it makes no difference. First, the variable…
-
11
votes1
answer215
viewsA: How many "cases" are possible in a "switch"?
How many years do you think it will take to write nearly 300 million cases? Do you realize the impracticality of this? Even if it’s only a few thousand, it fits in the source code file that the…
-
8
votes2
answers101
viewsA: I need an explanation for the error in this C++ script
C++ is not a language of script. This code does not make sense, I think you do not want to use an enumeration. If you want, everything else is wrong. Actually I think you want to create a builder so…
-
2
votes1
answer43
viewsA: How do I make a function only run on IE 10 and 11?
I wouldn’t do that, read this, but if you really want to (it won’t work on Edge either): if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { funcao() } I put in the Github for future reference.…
-
3
votes2
answers1884
viewsA: What are model and model variables for in a View?
@model is a directive of Razor, the mechanism of templates that forms the page on view. It is used to "type" the model. The variable Model is linked to this statement, is what will use to access the…
-
2
votes2
answers79
viewsA: Construct/start object via string parameter in a function
Actually the way the code is and use iniciaClasse(sayHello) no mistake, if given is doing something else. To do what you want you need to take the function identifier in the window dictionary to be…
-
1
votes1
answer616
viewsA: How to call a method within the class?
This code doesn’t even compile for other reasons either. Probably it would be like this: byte *CryrazCore::ComputeByteArray(byte inputData[], bool decryptMode) { int cs = this->PushChecksum();…
-
1
votes1
answer44
viewsA: Is it possible to prevent notifications to other apps on your device?
Under normal conditions this is not possible, it would be a tremendous security breach. If the user use some technique that subverts the operating system to let your application do this, then…
-
7
votes1
answer231
viewsA: What are they for and when to use the Preprocessor directives?
They serve a lot of things, each one serves for something different. They serve to change the behavior of the compiler in a given stretch. You should use whenever you need to change the build. It…
-
5
votes2
answers114
viewsA: How to receive information in a View?
For your case probably a simple viewBag should fit: [HttpPost] public ActionResult Login(string pUsuario, string pSenha) { usuario oUsuario = modelOff.usuarios.Where(p => p.usuario1 == pUsuario…
-
4
votes1
answer105
viewsA: How does the use of other numerical bases in C#work?
It’s just a syntax, just so the programmer feels more comfortable typing the number in the way the domain he’s treating usually works. Most of the time it’s the same decimal. There are some typical…
-
5
votes1
answer99
viewsA: How to create an asynchronous method that is cancellable?
Need to create a token method cancellation. You can only cancel what you are prepared to cancel. Generally speaking, the asynchronous . NET API accepts. CancellationTokenSource cts; private async…
-
5
votes1
answer97
viewsA: Expression nickname with SUM is not working
To give a name to the sum it must be out of parentheses, must be the last thing in the expression: SELECT SUM((qtd - qtd_devolucao) * valor) AS total FROM produtos WHERE id_pedido = '47' See working…
-
1
votes1
answer36
viewsA: What class is similar to Aescryptoserviceprovider in . NET Core?
See if it helps download this Nuget. Has on . NET Core starting from 2.0. You need to see if your project is referencing the package, something like that: <PackageReference Include="…
-
2
votes2
answers782
viewsA: Return of a Javascript function
Missing calling the function main(). main is a variable that is a function that returns another function, without running it it will do nothing: var a = 0; main = function(_this){ console.log('Está…
-
6
votes2
answers2000
viewsA: What is the difference between async Task and void?
The second example is a normal call synchronous, that is to say, DoFoo() is running, at a given time transfers the execution flow to Foo(), internally is practically a goto, when this one finishes…