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
COMPILATION_UNIT -> COMPILATION_UNIT [6:0] | |
|--BLOCK_COMMENT_BEGIN -> /* [1:0] | |
| |--COMMENT_CONTENT -> \ncom.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheckTest$JavadocCatchCheck\n\n [1:2] | |
| `--BLOCK_COMMENT_END -> */ [4:0] | |
|--PACKAGE_DEF -> package [6:0] | |
| |--ANNOTATIONS -> ANNOTATIONS [6:54] | |
| |--DOT -> . [6:54] | |
| | |--DOT -> . [6:46] | |
| | | |--DOT -> . [6:39] | |
| | | | |--DOT -> . [6:28] |
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
COMPILATION_UNIT -> COMPILATION_UNIT [6:0] | |
|--BLOCK_COMMENT_BEGIN -> /* [1:0] | |
| |--COMMENT_CONTENT -> \ncom.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheckTest$JavadocCatchCheck\n\n [1:2] | |
| `--BLOCK_COMMENT_END -> */ [4:0] | |
|--PACKAGE_DEF -> package [6:0] | |
| |--ANNOTATIONS -> ANNOTATIONS [6:54] | |
| |--DOT -> . [6:54] | |
| | |--DOT -> . [6:46] | |
| | | |--DOT -> . [6:39] | |
| | | | |--DOT -> . [6:28] |
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
# Core JPA configuration | |
http://www.baeldung.com/the-persistence-layer-with-spring-and-jpa | |
# Implement the DAO with Spring and JPA | |
http://www.baeldung.com/spring-dao-jpa | |
# Difference between <context:annotation-config> vs <context:component-scan> | |
https://stackoverflow.com/questions/7414794/difference-between-contextannotation-config-vs-contextcomponent-scan |
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
public static ObjectAnimator scrollDownSmoothlyIndefinitely(@NonNull WeakReference<NestedScrollView> scrollViewRef, int scrollingDuration) { | |
NestedScrollView scrollView = scrollViewRef.get(); | |
if (scrollView != null) { | |
final ObjectAnimator animScrollDown = ObjectAnimator.ofInt(scrollView, "scrollY", | |
scrollView.getChildAt(0).getHeight()); | |
animScrollDown.setInterpolator(new LinearInterpolator()); | |
animScrollDown.setDuration(scrollingDuration); |
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
/** | |
* Approximates the minutes given a time in seconds that was mistakenly multiplied by 24.<BR/> | |
* Here is the wrong formula used in the first place. It was used to supposedly calculate a time [hh:mm] in seconds:<BR/> | |
* <pre>hourOfDay * 24 * 3600 + minute * 60</pre> | |
* Here's the formula we've come up with to approximate the minutes:<BR/> | |
* <pre>m ~= (x/60) - (1440*E(x/86400))</pre> | |
* Where x is the time in seconds and E(h) is the hours rounded to floor. | |
* | |
* @param seconds time [hh::mm] in seconds that was multiplied by 24. | |
* @return int |
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
######## Security ######## | |
## Silents ServerSignature response | |
ServerSignature Off | |
ServerTokens Prod | |
<IfModule mod_headers.c> | |
## Forces httpOnly and Secure Cookies - Mitigate XSS Attacks | |
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure |
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
ErrorDocument 404 "Not found" Or http://yourdomain.com ## Redirects 404 Error to home page | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(.*)/(.*)$ - [R=404,L] ## Returns Error 404 when trying to access a subfolder | |
## Returns 404 when trying to access the current .htaccess file | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.(htpasswd|htaccess|aahtpasswd).*\ HTTP/ [NC] | |
RewriteRule .? - [R=404,NS,L] |
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
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.boot.builder.SpringApplicationBuilder; | |
import org.springframework.core.annotation.Order; | |
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | |
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; |
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
# Add project specific ProGuard rules here. | |
# By default, the flags in this file are appended to flags specified | |
# in /home/chris/Android/Sdk/tools/proguard/proguard-android.txt | |
# You can edit the include path and order by changing the proguardFiles | |
# directive in build.gradle. | |
# | |
# For more details, see | |
# http://developer.android.com/guide/developing/tools/proguard.html | |
# Add any project specific keep options here: |
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
import java.util.Properties; | |
import javax.mail.Authenticator; | |
import javax.mail.Folder; | |
import javax.mail.MessagingException; | |
import javax.mail.Session; | |
import javax.mail.Store; | |
import android.support.annotation.Nullable; | |
import android.support.annotation.WorkerThread; |
NewerOlder