Posts by Maniero • 444,682 points
6,921 posts
-
1
votes1
answer113
viewsA: Language used by a VMIX application title designer
This language is the XAML. But only part of the application is written on it. You’ll need to find out everything else. Possibly C# is used for the programming itself. XAML is a markup language, is…
-
1
votes2
answers53
viewsA: Automate sequential file opening?
This? ArrayList<File> arquivo = new ArrayList<File>(); ArrayList<FileInputStream> fis = new ArrayList<FileInputStream>(); ArrayList<DataInputStream> dis = new…
-
1
votes1
answer1783
views -
6
votes3
answers141
viewsA: Which HTML attribute cannot be modified?
It does not exist, in fact it is not only HTML, it is in anything, whenever you depend on a client you will be vulnerable, so you should never trust anything that comes from the client, everything…
-
11
votes1
answer857
viewsA: Any CPU or x64?
No. NET Framework makes no difference in terms of executable size because the generated code is a CIL and not a native code, what goes is a bytecode that on execution will generate a native code…
-
3
votes2
answers1520
views -
5
votes1
answer1613
views -
4
votes1
answer92
viewsA: What is the best practice for consulting in large tables?
"Best practice" is to create a development environment that simulates the situation you will find and create solutions to see what is most suitable. The simplest solution is a LIKE, try it and see…
-
5
votes1
answer349
viewsA: Is unit testing a generic term? What types are there? And what ways to apply?
Most of what you want to know has already been answered in Tests, TDD, Unit Test, QA and similar. What is the difference between concepts on tests?. Unit testing is about code quality, serves to…
-
5
votes3
answers957
viewsA: Random numbers are always the same
You need to initialize the seed of random numbers. This is usually done by the computer clock, which meets simple situations. If you need a better distribution it is better to use the random…
-
3
votes3
answers73
viewsA: How to debug code with Object Initializer format
Object initialization is a facilitator, if you want to debug this code you have to use the traditional style. It is true that Visual Studio could create a form for this, but today it does not have,…
-
8
votes4
answers1741
viewsA: How to identify and when to use Value Object?
In my opinion DDD tends to complicate what is simple. This discipline calls value Object what is usually called the types by value, and of entities what is usually called the types by reference.…
-
19
votes2
answers4166
viewsA: What is the difference between array and matrix?
There’s some controversy about this, but I’ll tell you what’s more acceptable. Array is the English name for what we call vector. A vector is a single-dimensional matrix, meaning it has only one row…
-
5
votes1
answer2087
viewsA: What is the difference between "string" and "Character" in Python?
Pyhton doesn’t have the type char or something like that, it’s just strings, if you want to have a character just use a string that has only one character. If you want a number value that is…
-
14
votes3
answers590
viewsA: Never use inline styles is never really?
If something exists and is not declared as a total legacy and there are problems, you can always use anything in the right context, if you know what you are doing. What is being said is a variation…
-
12
votes2
answers1582
viewsA: Variable of the foreach loop
The item is by value, so it is not even allowed to change its value. There’s only one detail, if the item is an object by reference that value I’m talking about is pointer and not the object itself,…
-
6
votes2
answers132
viewsA: Should I encrypt the password in the application or on the server?
All classified information should always be trafficked in an encrypted form, from where it was typed to the server. You can use the mechanisms available in the operating system and accessible by the…
-
17
votes1
answer259
viewsA: How to remove the last number from an integer?
Pure mathematics: 123456789 / 10 How the value is integer is an automatic decimal rounding. If I was a guy with decimal places I’d have to do a little more math. Behold working idenone. And in the…
-
8
votes1
answer296
viewsA: What are the main differences between Ruby and Crystal?
Which is the fastest and lightest in processing? Languages do not usually have this characteristic in a striking way. It depends on the algorithm, the code done, etc. But by the way each one works…
-
7
votes1
answer634
viewsA: How do I let the string size be set by scanf()?
Actually the question starts from the wrong premise. The code that creates the string There’s nothing limitless there. This code will reserve 6 bytes in the code to allocate the 5 characters plus…
-
1
votes1
answer194
viewsA: How to access hosting files from Windows Explorer
Essentially it cannot in a normal way. This would be possible in a hosting that has some form of communication between the servers, something like the SMB, for example, but you could only get on a…
-
4
votes1
answer174
viewsA: Generate number using Identity
In general, it may not, at least not IDENTITY normal. You can use some techniques to help with this. One of them is to generate the insertion to get the number and then update with the actual data.…
-
2
votes1
answer121
viewsA: Performance difference from for simple and for iterator
Depends a little on what it is ListAll, can be various types of structure, each with a different complexity commitment. It has collection that the calculus of size() can be huge and an iteration can…
-
6
votes2
answers593
viewsA: How to model the products table for an e-commerce?
I’m going to start that is still far from having an ideal model, for example use double to store price is wrong. Creating an exercise software is easy, creating a real one is much harder, you will…
-
8
votes2
answers103
viewsA: Code always falls on the same if
The problem is the constructor line that is assigning the class attribute to the constructor variable when it should be the opposite. The this in this case nothing has any use since there is no…
-
12
votes3
answers40567
viewsA: What is the correct way to concatenate strings in Javascript?
There’s nothing ugly or wrong in making a simple str1+" "+str2. It can be used without problems. It is simple and efficient. It has no technical reasons to choose a shape, it is just style. Although…
-
2
votes2
answers597
viewsA: How to put more than one parameter in Python?
Python doesn’t have the forFree traditional C. Need to generate a range of data according to your need: n = 1 numero = 5 for fatorial in range(numero, 1, -1): n = n * fatorial print(n) Behold…
-
5
votes1
answer61
viewsA: Is it possible to use the DOUBLE data type on 32-bit systems?
It is possible, they are completely different things. That 32 bits indicates memory addressing capacity, that is, it reaches up to 4GB. We can say that is the size of the pointer or of word…
-
1
votes1
answer138
viewsA: Sharpdevelop X Visual Studio: are they equivalent at all?
No, it wouldn’t even have to be, they’re completely different products. Basically both wish to meet the same need, but each goes their own way, apart from what is standard language, they are…
-
2
votes2
answers48
viewsA: Can a static method have the same name as a property?
Yes, it can, there is no confusion between static members and instance members. class Teste { static teste() { return 1; } constructor() { this.teste = 2; } } var x = new Teste();…
-
11
votes2
answers457
viewsA: Why doesn’t my while work?
In this case you should use a and and not a or. In the present form the condition will always be true because at least one of the two sub-expressions will be true, it is impossible for something to…
-
5
votes4
answers10900
viewsA: Is it possible to use the ternary operator under several conditions at the same time?
Don’t do this, it’s barely readable, but if you insist: echo ($ativa == 0) ? "Médico(a) Desativado(a)" : ($ativa == 1) ? "Médico(a) Ativo(a)" : "Informação Indisponível"; I put in the Github for…
-
11
votes1
answer262
viewsA: How do I change the language of Git to English on Linux?
Change the ~/.bashrc: alias git='LANG=en_US git'
-
3
votes1
answer116
viewsA: Is it possible to use MVC with VB and ASP?
In ASP probably not. If it is the ASP.NET MVC is no problem, after all it was made for this. I imagine you will start a new project, right? If it doesn’t make sense, after all if you will continue…
-
10
votes3
answers370
viewsA: Private set of property in an interface
Interfaces should define public procurement, so it makes no sense to have a private member in it. At least so far. There are proposals probably for C# 8 interfaces to allow implementations and then…
-
5
votes3
answers556
viewsA: An image with display:None is loaded? Consume data?
As you can already verify is loaded and everything that is loaded consumes data, it has no miracle. Surely there are techniques to avoid the load of both. The load can be selective in what will…
-
5
votes1
answer246
viewsA: Compatibility between . NET Core 2.0 and . NET Framework 4.7
I think the best way for you is to develop to .NET Standard (I think I need to give an updated answer there) 2.0. It is a specification that doesn’t let you use unique features for an CLI…
-
1
votes3
answers170
viewsA: Columns do not hit insertion
You have 3 columns and are trying to insert 4 of them, so the error. In fact that column codliv it’s weird. If it’s a book code it shouldn’t be repeated, right? I think what you want is this code to…
-
3
votes1
answer734
viewsA: How to represent the Real type in C#?
It depends on the content. It depends on whether you want accuracy of values. Most of the time I go decimal which gives accuracy, it is useful for monetary or other typical values that exact unity…
-
1
votes2
answers1267
viewsA: How to create a vector by joining together 2
This code doesn’t even compile. Solving these problems went all right, I just stylized better. Missing variable declaration and missing to return or pass a coverage vector, which I preferred to do…
-
4
votes1
answer125
viewsA: Is it correct to use PHP code in the view layer along with HTML?
This is always a bit controversial, it’s part of that area of computing which is an art. Of course it is almost impossible to make a page that does not have any code, unless in some trivial case.…
-
2
votes2
answers1699
viewsA: Find out if it is even or odd in array
In an optimized and modern code, since you are learning, I find it interesting to know how it really is done, I could make it simpler, but you will not learn common techniques in everyday life. An…
-
4
votes1
answer171
viewsA: How to do mathematical operations with a struct?
This is done with methods operators. using static System.Console; public class Program { public static void Main() { var vetor = new Vetor(3, 4); var vetor2 = vetor * 2f; WriteLine($"X = {vetor2.X},…
-
3
votes2
answers313
viewsA: .NET Core auto executable
Does not change almost anything. Normally you should set using as target a version of itself . NET Core. What changes is specify where it will run. For Windows just give this command: dotnet publish…
-
3
votes2
answers44
viewsA: Which way to change variables is more optimized?
First, it’s PHP, right? So it doesn’t matter, the language wasn’t created to perform operations that need extreme optimization. The comparison is even unfair since the second code is making 3 simple…
-
2
votes2
answers1306
viewsA: How to use exponent in Pascal?
an = a1 * power(q, n – 1) I put in the Github for future reference. Documentation.…
-
5
votes1
answer3131
views -
6
votes3
answers8606
viewsA: Switch case Kotlin
val monthString = when (month) { 1 -> "January" 2 -> "February" 3 -> "March" 4 -> "April" 5 -> "May" 6 -> "June" 7 -> "July" 8 -> "August" 9 -> "September" 10 ->…
-
5
votes1
answer234
viewsA: What is the difference between pull-based and push-based Development?
This doesn’t seem to have anything to do with Git, at least not directly. It’s used in general projects. In the push a task is created and assigned to someone suitable (in a broad sense) to…
-
1
votes2
answers34
viewsA: Can I set ids and classes in Tyles, scripts, etc?
You can. Whenever you have doubt you can consult the MDN which is considered the official documentation. It contains all the attributes that each tag allows. In the case of both tags allow these…