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
package com.laioffer.twitch.external; | |
import com.laioffer.twitch.external.model.Clip; | |
import com.laioffer.twitch.external.model.Stream; | |
import com.laioffer.twitch.external.model.Game; | |
import com.laioffer.twitch.external.model.TwitchToken; | |
import com.laioffer.twitch.external.model.Video; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Service; | |
import org.springframework.web.reactive.function.client.WebClientResponseException; |
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; |
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
CGPoint p1, p2, p3, q1, q2, q3; | |
// TODO: initialize points | |
double A[36]; | |
A[ 0] = p1.x; A[ 1] = p1.y; A[ 2] = 0; A[ 3] = 0; A[ 4] = 1; A[ 5] = 0; | |
A[ 6] = 0; A[ 7] = 0; A[ 8] = p1.x; A[ 9] = p1.y; A[10] = 0; A[11] = 1; | |
A[12] = p2.x; A[13] = p2.y; A[14] = 0; A[15] = 0; A[16] = 1; A[17] = 0; | |
A[18] = 0; A[19] = 0; A[20] = p2.x; A[21] = p2.y; A[22] = 0; A[23] = 1; |
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
// | |
// CIFaceFeature+UIImageOrientation.h | |
// | |
// | |
// Created by Xiaochao Yang on 6/9/13. | |
// Copyright (c) 2013 Xiaochao Yang. All rights reserved. | |
// | |
#import <CoreImage/CoreImage.h> |