Posts by Luiz Augusto • 2,482 points
62 posts
-
5
votes1
answer1014
viewsQ: Difference between 'Regular language' for 'irregular language'
Reading a question about basic programming concepts, I come across the following statement: Let A and B be two languages over the binary alphabet, that is, over the alphabet composed only of 0’s and…
-
1
votes2
answers61
viewsQ: Basic doubt about function diff Assoc - PHP
Practicing and remembering the functions in PHP, found a little doubt in the function array_diff_assoc. Example of the site: Example #2 Example of the function array_diff_assoc() Two key pair values…
phpasked Luiz Augusto 2,482 -
5
votes1
answer122
viewsQ: Inheritance at compilation time?
I was reviewing some codes and some concepts when I find the following assertive: The legacy mechanism in Java occurs at compile time, i.e., every reuse of code accomplished by inheritance is…
-
5
votes1
answer78
viewsQ: Type Object in PHP
I’m practicing some code in PHP when I come across this: <?php $a = (object) ["a" => "b"]; $b = (object) ["a" => "c"]; $y = $a <=> $b; echo $y; $v=[1,2,3] <=> [1,2,3]; echo $v;…
-
2
votes1
answer255
viewsQ: Operator overload in C#
I have some questions about overloading operators in C#. What good is? His concept is the same as Overload in Java methods? Is there any practical example of doing such a procedure on a day-to-day…
-
0
votes1
answer869
viewsA: Line Break At Visualg’s Run Prompt:
Good afternoon this 'error' is by the version of the program you are using, upgrade it to the new version 3.0.7 that you will be able to resize the console screen simulating MS-DOS
-
0
votes1
answer1763
viewsA: Error in Visualg Program "incorrect syntax"
Good morning! Do this... Declare a new variable called payNew, as the real type; and Then do: salarioNovo <-(salario * 50 ) aumento <- salarioNovo / 100 ESCREVAl ("O valor do aumento é: ",…
-
0
votes2
answers412
viewsA: How to keep audio from one scene to another in Unity
First, create a script, in my example Soundcontroller. Inside the created script put the code public class soundController : MonoBehaviour { void Awake() { DontDestroyOnLoad(this.gameObject); }…
-
2
votes2
answers111
viewsQ: Pointers and matrices catching something unexpected
#include <stdio.h> int main() { int vetor[][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; int valor= *(vetor[1] + 1) + **(vetor + 3); printf("%d", valor); } The code above was taken from…
-
10
votes3
answers341
viewsQ: Why am I calling the subclass method?
public class A { public String imprimir() { return "A"; } } public class B extends A { public String imprimir() { return "B"; } } public class C extends B { public String imprimir() { return "C"; }…
-
8
votes2
answers214
viewsQ: Why isn’t this "for" loop infinite?
public class Loop { public static void main(String[] a) { int cont=0; for (int i=0; i>=0; i+=2, cont++); System.out.println("cont:"+cont); }} Caught my attention the condition of the loop is…
-
1
votes2
answers131
viewsQ: Loop logic with for
Consider the Javascript code below. var r = [2, 5, 6, 18, 20, 10, 23, 12, 19, 10]; var s = [1, 5, 7, 13, 18, 21, 10, 25, 32, 17, 3]; var x = [0]; var i; for (i = 0; i <= 9; i++) { x[i] = r[i]; }…