This file contains hidden or 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
{% if page.faqSchema %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org", | |
"@type": "FAQPage", | |
"mainEntity": [ | |
{% for faq in page.faqSchema %} | |
{ | |
"@type": "Question", | |
"name": "{{faq.title}}", |
This file contains hidden or 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
<picture> | |
<source srcset="{{ site.data.sidebar.author_image_webp }}" type="image/webp"> | |
<source srcset="{{ site.data.sidebar.author_image }}" type="image/jpeg"> | |
<img src="{{ site.data.sidebar.author_image }}" alt="author" class="author"> | |
</picture> |
This file contains hidden or 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 com.amazonaws.auth.profile.ProfileCredentialsProvider | |
initscript { | |
dependencies { | |
classpath 'com.amazonaws:aws-java-sdk-core:1.11.5' | |
} | |
} | |
publishing { | |
repositories { | |
maven { |
This file contains hidden or 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
publishing { | |
repositories { | |
maven { | |
name "s3-repo" | |
url "s3://MY_BUCKET_NAME/maven-repo" | |
authentication { | |
awsIm(AwsImAuthentication) | |
} | |
} | |
} |
This file contains hidden or 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
object combineFieldValues extends Poly2 { | |
implicit def caseValidation = at[ValidatedNel[String, Boolean], ValidatedNel[String, Boolean]] ({ | |
case (a,b) => a.combine(b) | |
}) |
This file contains hidden or 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
val complex = ComplexElement( | |
value = List( | |
StringElement(value = "first element"), | |
StringElement(value = "second element") | |
) | |
) | |
import shapeless._ | |
sealed trait DefaultValidation extends Poly1 { |
This file contains hidden or 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
object combine extends Poly2 { | |
implicit def caseValidation = at[Boolean, Boolean] (_ && _) | |
} |
This file contains hidden or 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
sealed trait DefaultValidation extends Poly1 { | |
implicit def default[T] = at[T](x => true) | |
} | |
object validates extends DefaultValidation { | |
implicit def caseValidated[A](implicit v: ValidatorTypeClass[A]) = at[A](x => v.validate(x)) | |
} |
This file contains hidden or 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
everything(validates)(combine)(complex) |
This file contains hidden or 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
could not find implicit value for parameter v: ValidatorTypeClass[Element] | |
override def validate(a: ComplexElement): Boolean = a.value.forall(validateElement) |
NewerOlder