Skip to content

Instantly share code, notes, and snippets.

View enrichman's full-sized avatar
🇮🇹

Enrico Candino enrichman

🇮🇹
View GitHub Profile
@enrichman
enrichman / NewsActivity.java
Last active January 16, 2016 13:33
Simple RSS example with PkRSS
public class NewsActivity extends AppCompatActivity {
private SwipeRefreshLayout mSwipeRefreshLayout;
private NewsRecyclerView mListView;
private NewsCallback newsCallback = new NewsCallback();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public enum Feature {
A("nameA", "urlA.com"),
B("nameB", "urlB.com");
private String name;
private String url;
Feature(String name, String url) {
this.name = name;
@enrichman
enrichman / main.c
Last active June 12, 2016 12:29
Esercizio Rapporto
/****************************************************************************
* $Id:: tmrtest.c 6098 2011-01-08 02:26:20Z nxp12832 $
* Project: NXP LPC17xx Timer example
*
* Description:
* This file contains Timer test modules, main entry, to test Timer APIs.
*
****************************************************************************
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
import weka.core.*;
public class CrossCorrelationDistance extends NormalizableDistance {
@Override
public double distance(Instance first, Instance second) {
double mx = 0;
double my = 0;
@enrichman
enrichman / main.go
Created December 15, 2016 23:41
get width
// ref: https://github.com/buger/goterm
package main
import (
"fmt"
"os"
"runtime"
"syscall"
"time"
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="it.enricocandino.loginviewexample.MainActivity">
<LinearLayout
android:layout_width="200dp"
package it.enricocandino.loginviewexample;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
0xea95E3dA97597b365a75dEe064D9F10235c7411b
@enrichman
enrichman / nth_prime.rs
Created April 26, 2020 08:42
Find the nth prime
const MAX_SIZE: usize = 110_000;
pub fn nth(n: u32) -> u32 {
let primes = get_primes();
match primes.get(n as usize) {
None => {
println!("{}nth prime not found", n);
1
},

$2a$11$QFX6iNdVp.6VyRLdi55hveXhAo0Smw1wjArEHJctEY.HsrcE4G5zS