Skip to content

Instantly share code, notes, and snippets.

View appersiano's full-sized avatar
💡
Idea!

Alessandro Persiano appersiano

💡
Idea!
View GitHub Profile
#!/bin/bash
# Tool per la generazione dei QRCodes sequenziali utilizzando il servizio di Google
# Esempio A0001, A0002, A0003 etc etc
if [ "$#" -ne 1 ]; then
echo "Devi inserire un numero maggiore di zero, balordo"
else
echo Ok man! Let\'s generate "$1" QR Codes....woooooah! :D
public class ScaglioniExample {
public static void main(String[] args){
System.out.println("Esempio Calcolo IRPEF");
ScaglioniHelper test = new ScaglioniHelper(78000);
ScaglioniHelper.Scaglione uno = new ScaglioniHelper.Scaglione(15000,23);
ScaglioniHelper.Scaglione due = new ScaglioniHelper.Scaglione(28000,27);
<!-- http://stackoverflow.com/questions/28738089/change-datepicker-dialog-color-for-android-5-0 -->
<style name="AppBaseTheme" parent="android:Theme.Material.Light">
<item name="android:datePickerDialogTheme">@style/MyDatePickerDialogTheme</item>
</style>
<style name="MyDatePickerDialogTheme" parent="android:Theme.Material.Light.Dialog">
<!-- If you want you can override only colorAccent -->
<item name="android:colorAccent">@color/date_picker_accent</item>
<!-- Or you can change very item color -->
private boolean CheckNetwork() {
ConnectivityManager cm = (ConnectivityManager) caller
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
boolean isConnected = activeNetwork != null
&& activeNetwork.isConnectedOrConnecting();
return isConnected;
}
@appersiano
appersiano / MyLinkedMap.java
Created November 10, 2015 11:04
Get Key and Value of a Map by Index
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
public class MyLinkedMap<K, V> extends LinkedHashMap<K, V>
{
/**
* Ottieni la chiave in base all'indice
* @param i indice
@appersiano
appersiano / baseConverter.js
Last active August 29, 2015 14:06 — forked from gpedro/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript + Normalize binary option
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){