Skip to content

Instantly share code, notes, and snippets.

View haisi's full-sized avatar
🇨🇭

Hasan Kara haisi

🇨🇭
View GitHub Profile
@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.

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
 }
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
*
*
*
*
*
*
*
@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;
@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
@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;
@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