Skip to content

Instantly share code, notes, and snippets.

@yogidevendra
yogidevendra / WeightedBiasRandomElementGenerator.java
Last active February 22, 2022 17:41
Program to generate pick elements from array random following given weighted distribution
package com.blogspot.yogidevendra.codesnippets;
import java.util.Arrays;
import java.util.Random;
/**
* To generate Random numbers based on weighted bias.
*/
public class WeightedBiasRandomElementGenerator<T>
@yogidevendra
yogidevendra / SplitterBenchmarkTest.java
Last active January 23, 2016 17:33
Java performance comparison for libraries for string splitting
package com.blogspot.yogidevendra.codesnippets;
import java.io.ByteArrayOutputStream;
import java.util.Iterator;
import org.junit.Test;
import org.junit.rules.TestWatcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@yogidevendra
yogidevendra / stacktrace.txt
Created August 26, 2019 08:17
Stacktrace for ITR5
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774)
at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
@yogidevendra
yogidevendra / system_details.txt
Created August 26, 2019 08:18
Macos version, java version details.
Macos Version:
➜ ~ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.13.6 (17G7024)
Kernel Version: Darwin 17.7.0
Boot Volume: Macintosh HD