body {background:white;}
@media (prefers-color-scheme: dark) {
body {background:black; color:white;}
}see: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
body {background:white;}
@media (prefers-color-scheme: dark) {
body {background:black; color:white;}
}see: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
Ratpack works very smoothly with spring-loaded library. It is defined as dependency in build.gradle file. Spring-loaded enables runtime hot class reloading.
dependencies {
springloaded "org.springframework:springloaded:1.2.0.RELEASE"
}
But default configuration reloads only changes in Ratpack.groovy file.
| @GrabConfig(systemClassLoader=true) | |
| @Grab(group='com.h2database', module='h2', version='1.3.176') | |
| import java.sql.* | |
| import groovy.sql.Sql | |
| import org.h2.jdbcx.JdbcConnectionPool | |
| println("More groovy...") | |
| def sql = Sql.newInstance("jdbc:h2:things", "sa", "sa", "org.h2.Driver") // DB files for 'things' in current directory (./hello.h2.db) |
| package com.pascaldimassimo.xyz; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import javax.persistence.EntityManagerFactory; | |
| import javax.sql.DataSource; | |
| import org.hibernate.cfg.ImprovedNamingStrategy; | |
| import org.springframework.beans.factory.annotation.Autowired; |
| from flask import Flask | |
| from flask.ext.sqlalchemy import SQLAlchemy | |
| app = Flask(__name__) | |
| db = SQLAlchemy(app) | |
| class Author(db.Model): | |
| id = db.Column(db.Integer, primary_key=True) | |
| name = db.Column(db.Text) |
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2' | |
| classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6' | |
| classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.11' | |
| classpath 'com.github.ben-manes:gradle-versions-plugin:0.7' |
| import java.io.IOException; | |
| import java.security.SecureRandom; | |
| import java.security.cert.X509Certificate; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.HashSet; | |
| import java.util.List; | |
| import java.util.Set; |
| The MIT License (MIT) | |
| Copyright (c) 2015 Justin Perry | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the "Software"), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
| the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: |