#Installing TeamCity for building Android projects
##Requirements
- MySQL
- JDK 1.7
- 32-bit libstdc++ zlib.i686
##Install JDK
package com.electricobjects.client.onboarding; | |
import android.app.Dialog; | |
import android.os.Bundle; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.v4.content.ContextCompat; | |
import android.view.Gravity; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
#Installing TeamCity for building Android projects
##Requirements
##Install JDK
/* | |
* Copyright (C) 2014 Antonio Leiva Gordillo. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
security: | |
oauth2: | |
client: | |
# clientId in keycloak | |
clientId: demo | |
# clientSecret in keycloak | |
clientSecret: xxxx | |
# From Authorization Server's metadata | |
# Keycloak realm is spring-security-sso | |
accessTokenUri: http://localhost:8081/auth/realms/spring-security-sso/protocol/openid-connect/token |
package com.company.project.components; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.MessageSource; | |
import org.springframework.context.support.MessageSourceAccessor; | |
import org.springframework.stereotype.Component; | |
import javax.annotation.PostConstruct; | |
import java.util.Locale; |
/* | |
Notice the @Transient annotation on the MultipartFile field. | |
This means that the field value will NOT be persisted to the database. | |
*/ | |
package com.teamtreehouse.giflib.model; | |
import org.springframework.web.multipart.MultipartFile; | |
import javax.persistence.*; |
public interface StoreRepository extends PagingAndSortingRepository<Store, String>, | |
QueryDslPredicateExecutor<Store>, QuerydslBinderCustomizer<QStore> { | |
@RestResource(rel = "by-location") | |
Page<Store> findByAddressLocationNear(Point location, Distance distance, Pageable pageable); | |
default void customize(QuerydslBindings bindings, QStore store) { | |
bindings.bind(store.address.city).single((path, value) -> path.startsWith(value)); | |
bindings.bind(String.class).single((StringPath path, String value) -> path.contains(value)); | |
} |
#!/bin/bash | |
set -e | |
JAVA_HOME=${1-text} | |
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; } | |
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der | |
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der |
#!/bin/bash | |
CL_NULL='\e[0m' | |
CL_FAIL='\e[0;31m' | |
CL_NICE='\e[0;32m' | |
CL_WARN='\e[0;33m' | |
CL_BLUE='\e[0;34m' | |
CL_PURP='\e[0;35m' | |
CL_CYAN='\e[0;36m' |
package demo; | |
import java.io.Serializable; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.LinkedHashMap; | |
import java.util.List; |