Skip to content

Instantly share code, notes, and snippets.

View DengYiping's full-sized avatar
:octocat:
Available for hiring

Yiping Deng DengYiping

:octocat:
Available for hiring
  • Jacobs University Bremen
  • Dublin, Ireland
  • 21:54 (UTC -12:00)
  • LinkedIn in/yipingdeng
View GitHub Profile
@DengYiping
DengYiping / application.properties
Last active July 25, 2024 16:16
Spring Application Properties for MariaDB
#Database Configuration
spring.datasource.url=jdbc:mariadb://localhost:3306/billboard
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#Hibernate Configuration
# Show or not log for each sql query
spring.jpa.show-sql=true
@DengYiping
DengYiping / build.gradle
Last active November 26, 2018 13:15
Gradle file for Spring Application
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
package com.billboard.demo.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
@DengYiping
DengYiping / configureStore.js
Created December 3, 2018 09:00
Configure Redux Store and Redux Observable
import rootReducer from '../reducer/rootReducer';
import { createStore, applyMiddleware } from 'redux';
import { createEpicMiddleware } from 'redux-observable';
import rootEpic from '../epic/rootEpic';
function configureStore(default_state = {}){
const epicMiddleware = createEpicMiddleware();
const store = createStore(
rootReducer,
default_state,
use std::cmp::Ordering;
use advent_of_code_2024_day5::reading;
fn main() {
let input = reading::read();
let mut result = 0;
for case in input.cases {
let mut sorted = case.clone();
sorted.sort_by(|a, b| {
use std::collections::HashSet;
use advent_of_code_day6::reading;
#[derive(Clone, Copy, Hash, PartialEq, Eq, Debug)]
enum HeadDirection {
Up,
Down,
Left,
Right,