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 utils | |
import scala.collection.generic.CanBuildFrom | |
import scala.collection.{SeqLike, mutable} | |
/** | |
* Created by Lior Gonnen on 8/17/14. | |
*/ | |
object CollectionUtils { |
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 utils | |
import play.api.LoggerLike | |
/** | |
* Created by Lior Gonnen on 9/4/14. | |
*/ | |
object LogUtils { | |
/** |
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
/** | |
* Figure the ideal distribution between groups of items given the number of items in each group a | |
* @param weights The ideal weight distribution between the groups | |
* @param groupItems How many items are available in each group | |
* @param maxItems The max number of items to distribute | |
* @return A sequence containing the number of items in each group according to the requested distribution ratios | |
*/ | |
def distribute(weights: Seq[Float], groupItems: Seq[Int], maxItems: Int): Seq[Int] = { | |
require(weights != null, "null weights") | |
require(groupItems != null, "null groupItems") |
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
/**************************************************************************/ | |
/*! | |
@file feather_nrf52840_express.h | |
@author hathach | |
@section LICENSE | |
Software License Agreement (BSD License) | |
Copyright (c) 2018, Adafruit Industries (adafruit.com) |
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
/**************************************************************************/ | |
/*! | |
@file feather_nrf52840_express.h | |
@author hathach | |
@section LICENSE | |
Software License Agreement (BSD License) | |
Copyright (c) 2018, Adafruit Industries (adafruit.com) |
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
/**************************************************************************/ | |
/*! | |
@file feather_nrf52840_express.h | |
@author hathach | |
@section LICENSE | |
Software License Agreement (BSD License) | |
Copyright (c) 2018, Adafruit Industries (adafruit.com) |