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.jdbi.v3.core.kotlin.KotlinMapper | |
import org.jdbi.v3.core.mapper.RowMapperFactory | |
import org.junit.jupiter.api.Test | |
import tj.alif.core.app.db.RepositoryTest | |
import org.jdbi.v3.core.result.RowView | |
data class Contact ( | |
val id: Int, | |
val name: String, |
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
#!/usr/bin/env python | |
try: | |
# For Python 3.0 and later | |
from urllib.request import urlopen | |
except ImportError: | |
# Fall back to Python 2's urllib2 | |
from urllib2 import urlopen | |
import json |
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
CIFilter *resizeFilter = [CIFilter filterWithName:@"CILanczosScaleTransform"]; | |
[resizeFilter setValue:ciImage forKey:@"inputImage"]; | |
[resizeFilter setValue:[NSNumber numberWithFloat:1.0f] forKey:@"inputAspectRatio"]; | |
[resizeFilter setValue:[NSNumber numberWithFloat:xRatio] forKey:@"inputScale"]; | |
CIFilter *cropFilter = [CIFilter filterWithName:@"CICrop"]; | |
CIVector *cropRect = [CIVector vectorWithX:rect.origin.x Y:rect.origin.y Z:rect.size.width W:rect.size.height]; | |
[cropFilter setValue:resizeFilter.outputImage forKey:@"inputImage"]; | |
[cropFilter setValue:cropRect forKey:@"inputRectangle"]; | |
CIImage *croppedImage = cropFilter.outputImage; |