Skip to content

Instantly share code, notes, and snippets.

View juanfranciscocis's full-sized avatar

Juan Francisco Cisneros juanfranciscocis

View GitHub Profile
<ion-button expand="block" shape="round">click me</ion-button>
@juanfranciscocis
juanfranciscocis / ARRAYS
Created August 27, 2023 21:56
Java Script Review
# Arrays in JavaScript:
- Arrays are ordered lists of values. Each value in an array is called an element, and elements can be of any data type.
## Creating Arrays:
```
const fruits = ["apple", "banana", "orange"];
const numbers = [1, 2, 3, 4, 5];
const mixed = [true, "hello", 42];
TO LOAD IMAGES FROM OTHER PAGES LIKE FIREBASE STORAGE
flutter build web --release --web-renderer html
## Multitasking
### Multitasking refers to the ability of a computer or program to perform multiple tasks simultaneously. In Java, there are two main types of multitasking: concurrency and parallelism.
#### `Concurrency` refers to the ability of a program to perform multiple tasks in overlapping time periods. This means that different parts of the program can execute simultaneously, but not necessarily at the same time. For example, a program with multiple threads might switch between threads to allow them all to execute at different points in time.
#### `Parallelism`, on the other hand, refers to the ability of a program to perform multiple tasks at the same time using multiple processors or cores. This means that different parts of the program can execute simultaneously and independently, without needing to switch between threads.
** When working with concurrent programs in Java, there are several potential issues that can arise, including: **
- `Memory sharing`: When multiple threads access the same me
# Una base de datos relacional es un conjunto de datos organizados en tablas que se relacionan entre sí mediante claves y relaciones. Las bases de datos relacionales se utilizan para almacenar y gestionar grandes cantidades de información de manera estructurada, lo que permite un fácil acceso y análisis de los datos. Las bases de datos relacionales se pueden consultar mediante lenguajes de consulta como SQL, lo que permite a los usuarios recuperar datos específicos y realizar operaciones en ellos, como insertar, actualizar y eliminar registros.
## JDBC es una API que permite a los desarrolladores de Java acceder y manipular bases de datos relacionales utilizando SQL. A continuación, te presento algunos detalles adicionales sobre JDBC que podrían ayudarte en tu preparación para la prueba:
### Cargar el controlador JDBC: Antes de poder utilizar JDBC para conectarse a una base de datos, es necesario cargar el controlador JDBC correspondiente. Para Derby, esto se logra mediante la siguiente línea de código:
```

LAMBDA

QUE ES UN LAMBDA ?

  • Lambdas son una característica de Java 8 que permite representar expresiones funcionales de manera concisa. Una expresión lambda es un bloque de código que puede ser asignado a una variable o pasado como argumento a una función. Las expresiones lambda se definen con la siguiente sintaxis:

(argumentos) -> expresión

# MACHINE LEARNING
## Machine learning is a subfield of artificial intelligence that focuses on the `design` and `development` of `algorithms` that `can learn from and make predictions on data`. It is based on the idea that systems can learn from data, identify patterns and make decisions with minimal human intervention. Some common applications of machine learning include image recognition, natural language processing, and autonomous systems.
### `"A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E." can you explain" (Tom Mitchell - 1998)`
```
This quote is commonly referred to as the definition of machine learning. It means that a computer program can be considered to be learning from data (experience E) when it performs a task (T) better over time, as measured by a performance metric (P). The goal of machine learning is to have the program improve its performance on the t
//BASICS
sudo Runs as super user
open [file] Opens file
open -a <app name> Opens app
[command] -h Get help
man [command] Manual of the command
clear Clears terminal
killall <app name> Kills application
//MOVING AND FILES
### `If-else statements`: These are used to make decisions in a program. The basic structure is to check if a certain condition is true, and if it is, the program will execute a certain block of code, otherwise it will execute another block of code.
```
if condition:
# code to execute if condition is true
else:
# code to execute if condition is false
```
## `Futures`: A future is an object that represents a computation that will complete in the future. It's used to perform asynchronous operations, such as reading from a file or making an HTTP request. A future is a single-shot event, it completes once and can return a value or an error.
**For example, let's say you want to fetch some data from a remote server:**
```
Future<String> fetchData() async {
var response = await http.get("https://example.com/data");
return response.body;
}