A curated list of awesome Java frameworks, libraries and software.
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 test; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Properties; | |
import java.util.ResourceBundle; | |
public class TestClass { |
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
/** | |
* E.g. | |
* cartesianProduct(listOf(1, 2, 3), listOf(true, false)) returns | |
* [(1, true), (1, false), (2, true), (2, false), (3, true), (3, false)] | |
*/ | |
fun <T, U> cartesianProduct(c1: Collection<T>, c2: Collection<U>): List<Pair<T, U>> { | |
return c1.flatMap { lhsElem -> c2.map { rhsElem -> lhsElem to rhsElem } } | |
} |
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
;;; Paper: https://arxiv.org/pdf/2001.02491.pdf | |
;;; Code: https://github.com/cvlab-epfl/n-queens-benchmark | |
;;; Lisp Code: https://github.com/cvlab-epfl/n-queens-benchmark/blob/master/code/queens.lisp | |
;;; Changes/extensions to the original Common Lisp code: Rainer Joswig, joswig@lisp.de, 2020 | |
;; * using bitvectors is faster than 'boolean' arrays (which typically aren't supported in CL) | |
;;; In Common Lisp | |
;;; * use Quicklisp | |
;;; * compile and load this file |
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
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation | |
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration | |
@SpringBootApplication | |
public class FooApplication { | |
public static void main(String[] args) { | |
// Bootstrap the application | |
SpringApplication.run(FooApplication.class, args); | |
} | |
} |
I had fun building my own LISP (Slow Loris). The project was extremely easy to get off the ground, because there a ton of resources to do just this. I thought it might be handy to have a little links round-up, based on my research.
There are already several good projects out there on writing your own LISP in Python.
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
#!/usr/bin/env python | |
"""A simple utility to restore file creation and modification | |
dates back to their original values from EXIF. | |
This script requires exif module to be installed or the exif | |
command line utility to be in the path. | |
To function correctly under windows this script needs win32file and | |
win32con modules. Otherwise it will not be able to restore the creation |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
document.onmousedown=disableclick; | |
var status="Right Click Disabled"; | |
function disableclick(event) | |
{ | |
if(event.button==2) | |
{ |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
elem.clientLeft
,elem.clientTop
,elem.clientWidth
,elem.clientHeight
elem.getClientRects()
,elem.getBoundingClientRect()
NewerOlder