This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
//The computer assigns to A the address of the memory cell 0x00 | |
//and stores in its data area the value 5 | |
int A = 5; | |
//With the operator & I get the address of A then the instruction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int* B = &A; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cout << &A; // print on screen 0x00 (in a real computer the address will be different) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int A = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Constructor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.math.BigDecimal; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class GenericsAndResultSet { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################### | |
# KEYBOARD VERSION # | |
#################### | |
$shell = New-Object -ComObject WScript.Shell | |
while(1) { | |
$shell.sendkeys("{NUMLOCK}{NUMLOCK}") | |
$time = Get-Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
/* | |
Il calcolatore assegna ad A l’indirizzo della cella di memoria 0x00 | |
e memorizza il valore 5 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w, h = 8, 5; | |
# le prime due quadre interne creano un array di W posti riempito di zeri (asse x), questo stesso array è poi usato come valore per riempire H posti (asse y) formando una matrice bidimensionale. | |
MatrixTest1 = [[0 for x in range(w)] for y in range(h)] | |
MatrixTest2 = [[0 for x in range(w)] for y in range(h)] | |
MatrixTest3 = [[0 for x in range(w)] for y in range(h)] | |
MatrixTest1[0][0] = 2 | |
MatrixTest1[0][1] = 2 | |
MatrixTest1[4][6] = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.lang3.time.DurationFormatUtils; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.springframework.stereotype.Component; | |
import lombok.extern.slf4j.Slf4j; | |
//Replate <> with your package | |
@Component | |
@Aspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@Aspect | |
@Slf4j | |
public class LoggingExecutionTimeQueryAspect { | |
//replace <> with your own repository class info for tracing execution time of queries of that Repository | |
private Temporal startTime; | |
@Before("execution(* <PACKAGE>.<RESPOSITORY_CLASS_NAME>.*(..))") | |
public void logBeforeQueryInvocation(JoinPoint joinPoint){ | |
startTime = Instant.now(); |
NewerOlder