Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Quitting Vim

Acciaro Gennaro Daniele MagicDog707

💻
Quitting Vim
View GitHub Profile
@MagicDog707
MagicDog707 / Nodo.java
Last active Feb 16, 2019
Traccia del 22/10/2018
View Nodo.java
public class Nodo {
public int k;
public Nodo sx;
public Nodo dx;
public Nodo(int k, Nodo sx, Nodo dx) {
this.k = k;
this.sx = sx;
this.dx = dx;
}
@MagicDog707
MagicDog707 / Nodo.java
Last active Feb 14, 2019
Traccia del 24/01/2019. NB. Ho considerato la funzione best(a,b,k) come una funzione che restituisce il minimo tra i tre valori in input.
View Nodo.java
public class Nodo {
public int k;
public Nodo sx;
public Nodo dx;
public Nodo(int k, Nodo sx, Nodo dx) {
this.k = k;
this.sx = sx;
this.dx = dx;
}
@MagicDog707
MagicDog707 / Nodo.java
Created Feb 13, 2019
Traccia del 24/01/2019.
View Nodo.java
public class Nodo {
public int k;
public Nodo sx;
public Nodo dx;
public Nodo(int k, Nodo sx, Nodo dx) {
this.k = k;
this.sx = sx;
this.dx = dx;
@MagicDog707
MagicDog707 / Nodo.java
Created Feb 13, 2019
Traccia del 24/01/2019.
View Nodo.java
public class Nodo {
public int k;
public Nodo sx;
public Nodo dx;
public Nodo(int k, Nodo sx, Nodo dx) {
this.k = k;
this.sx = sx;
this.dx = dx;
@MagicDog707
MagicDog707 / Nodo.java
Created Feb 13, 2019
Traccia del 24/01/2019.
View Nodo.java
public class Nodo {
public int k;
public Nodo sx;
public Nodo dx;
public Nodo(int k, Nodo sx, Nodo dx) {
this.k = k;
this.sx = sx;
this.dx = dx;
@MagicDog707
MagicDog707 / Main.java
Created Jan 24, 2019
ASD esercizio 2 del 16 10 2017
View Main.java
public class Main {
public static void main(String[] args) {
Nodo foglia1 = new Nodo(-10,null,null);
Nodo foglia2 = new Nodo(-2,null,null);
Nodo foglia3 = new Nodo(4,null,null );
Nodo foglia4 = new Nodo(10,null,null);
Nodo livello1 = new Nodo(-5, foglia1,foglia2);
Nodo livello2 = new Nodo(5,foglia3,foglia4);
@MagicDog707
MagicDog707 / LoadingDialog.java
Created May 22, 2018
Dialog with custom background color
View LoadingDialog.java
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import me.pushapp.sosmedico.R;
/**
* Created by Denny on 21/11/2017 with pizza
*/
@MagicDog707
MagicDog707 / get Local IP
Created Jan 6, 2018
get local ip in a Wifi
View get Local IP
private String getIpAccess() {
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
int ipAddress = wifiManager.getConnectionInfo().getIpAddress();
final String formatedIpAddress = String.format("%d.%d.%d.%d", (ipAddress & 0xff), (ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff));
return "http://" + formatedIpAddress + ":";
}