Skip to content

Instantly share code, notes, and snippets.

View haisi's full-sized avatar
🇨🇭

Hasan Kara haisi

🇨🇭
View GitHub Profile
@Gautier
Gautier / CountDownTimer.java
Created December 12, 2010 00:58
Drop-in alternative for the Android CountDownTimer class, but which you can cancel from within onTick.
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jewelsea
jewelsea / TaskTest.java
Created May 23, 2012 10:30
JavaFX Task example
import javafx.application.Application;
import javafx.beans.value.*;
import javafx.collections.*;
import javafx.concurrent.*;
import javafx.event.*;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
@billputer
billputer / gist:5093503
Created March 5, 2013 19:41
install virtualbox guest additions on ubuntu/debian
VBOX_VERSION=4.2.8
sudo apt-get install build-essential linux-headers-$(uname -r)
wget http://download.virtualbox.org/virtualbox/${VBOX_VERSION}/VBoxGuestAdditions_${VBOX_VERSION}.iso
sudo mkdir /media/vbox
sudo mount -o loop VBoxGuestAdditions_${VBOX_VERSION}.iso /media/vbox
sudo /media/vbox/VBoxLinuxAdditions.run --nox11
sudo umount /media/vbox
sudo rmdir /media/vbox
@johnmiedema
johnmiedema / extractNounPhrasesOpenNLP
Last active August 15, 2019 20:11
Extract noun phrases from a single sentence using OpenNLP
package demoParseNounPhrases;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Set;
import opennlp.tools.cmdline.parser.ParserTool;
import opennlp.tools.parser.Parse;
@maxd
maxd / modena.css
Last active March 13, 2024 22:47
modena.css from JDK 10.0.1
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

The example of John de Goes' Haskell's Type Classes: We Can Do Better written in Scala.
It is precisely to allow for multiple type class implementations that Scala uses implicits to implement them. So I thought it would be interesting to compare Scala and Haskell here.

Discussion on HN

object MonoidInt{
  implicit val MonoidPlus = new Monoid[Int] {
    def empty = 0
    def append(v1: Int, v2: Int) = v1 + v2
 }
@lopspower
lopspower / README.md
Last active December 24, 2023 13:01
Material Animations

Material Animations

Android Arsenal

[Android Transition Framework][transition-framework] can be used for three main things:

  1. Animate activity layout content when transitioning from one activity to another.
  2. Animate shared elements (Hero views) in transitions between activities.
  3. Animate view changes within same activity.
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links