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
// Esercizio 1: Conversione di temperatura | |
// ---------------------------------------- | |
// Descrizione: | |
// Crea un programma che converte la temperatura da Celsius a Fahrenheit e viceversa. Utilizza variabili per memorizzare la temperatura in ingresso e la temperatura convertita. Scrivi una funzione per ciascuna conversione e usa cicli per consentire all'utente di continuare a convertire fino a quando decide di uscire. | |
fun main() { | |
// Il tuo codice qui | |
} | |
fun celsiusToFahrenheit(celsius: Double): Double { |
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
function mergeIntoMainSheet() { | |
let spreadSheet = SpreadsheetApp.getActiveSpreadsheet() | |
/** | |
* Inserisci il nome della tabella dove vuoi importare tutti i dati | |
*/ | |
let mainSheet = spreadSheet.getSheetByName('Tabella Totale') | |
/** | |
* Inserisci tutti i nomi dei clienti da cui vuoi copiare i dati e inserirli nella tabella principale definita sopra |
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
// 1 | |
sealed class ResultOf<out T> { | |
data class Success<out R>(val value: R): ResultOf<R>() | |
data class Failure( | |
val message: String? = null, | |
val throwable: Throwable? = null | |
): ResultOf<Nothing>() | |
} | |
inline fun <reified T> ResultOf<T>.doIfFailureWithResult(callback: (error: String?, throwable: Throwable?) -> Unit) : Boolean? { |
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
//Esercizio 1 | |
// Crea una funzione che fa il reverse di una stringa | |
// Esempio: input: "cool" output: "looc" | |
// Usa il tipo di ciclo che preferisci (ti consiglio il for) | |
//Esercizio 2 | |
// Crea una funzione che converte ogni frase nel suo acronimo | |
// Esempio 1: TLA è acronimo di Three Letter Acronyms | |
// Esempio 2: MR è acronimo di Marco Rossi |
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
package starting | |
fun main() { | |
checkNegativeNumber(12.4f) | |
checkSumNumber() | |
val marco = Person("Marco", "Rossi", 23) | |
marco.age = 12 | |
println(marco.getFormattedFullName()) |
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
package com.example.bettingsignals.Fragment; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import androidx.annotation.NonNull; | |
import androidx.annotation.Nullable; |
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
package com.studio.mattiaferigutti.itiproject; | |
import android.view.LayoutInflater; | |
import android.view.ViewGroup; | |
import androidx.annotation.NonNull; | |
import androidx.recyclerview.widget.DiffUtil; | |
import androidx.recyclerview.widget.ListAdapter; | |
import androidx.recyclerview.widget.RecyclerView; | |
import com.studio.mattiaferigutti.itiproject.databinding.RowLayoutBinding; |
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
package com.studio.mattiaferigutti.randomwords; | |
import androidx.annotation.NonNull; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import java.util.ArrayList; | |
import java.util.Arrays; |
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
package com.studio.mattiaferigutti.hilt_usage_sample | |
interface ApiService { | |
suspend fun getText() : Reply | |
} |
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
/** | |
* call this method to undo the payment and restore the free version | |
*/ | |
private fun resetPayment() { | |
billingProcessor?.consumePurchase(PRODUCT_ID) | |
} |
NewerOlder