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
// ==UserScript== | |
// @name ESCImageToIMG | |
// @description A brief description of your script | |
// @author Roland.K | |
// @include http://*api.sports-cube.com/* | |
// @version 1.0 | |
function decorate(){ | |
var images = $('span.type-string').filter(function( index ) { | |
return $($(this).siblings("span.property")[0]).text() == "self" && /\/images\/?/i.test($(this).text()) |
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 this to the UIWebView's delegate | |
- (BOOL)webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType { | |
//Check the navigation type to determine it is user click on a link | |
if (inType == UIWebViewNavigationTypeLinkClicked) { | |
//Open the URL with the system's browser (Safari) | |
[[UIApplication sharedApplication] openURL:[inRequest URL]]; | |
//Prevent webview to load the target of the link | |
return NO; | |
} | |
//In all the other cases load the resources |
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
// | |
// Created by Roland Kakonyi on 2018. 01. 29. | |
// Based on https://github.com/edekhayser/Tweeting-in-Swift | |
// | |
import Foundation | |
/**Arithmetic Mean | |
:param: array The array that the arithmetic mean will be found for. |
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
- (void)resizeFontForLabel:(UILabel*)aLabel maxSize:(int)maxSize minSize:(int)minSize lblWidth: (float)lblWidth lblHeight: (float)lblHeight { | |
// use font from provided label so we don't lose color, style, etc | |
UIFont *font = aLabel.font; | |
// start with maxSize and keep reducing until it doesn't clip | |
for(int i = maxSize; i >= minSize; i--) { | |
font = [font fontWithSize:i]; | |
CGSize constraintSize = CGSizeMake(lblWidth, MAXFLOAT); | |
// NSString* string = [aLabel.text stringByAppendingString:@"..."]; |
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 | |
# -*- coding: utf-8 -*- | |
import os, json, argparse | |
print os.getcwd() | |
parser = argparse.ArgumentParser(description='Convert color assets from storyboards and xibs') | |
parser.add_argument('--colorSpace', dest="color_space", | |
type=str, |
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 Foundation | |
extension CALayer { | |
public func animate() -> CALayerAnimate { | |
return CALayerAnimate(layer: self) | |
} | |
} | |
public class CALayerAnimate { |
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 Foundation | |
protocol DefaultRawValueDecodable: RawRepresentable, Decodable { | |
static var defaultValue: Self { get } | |
} | |
extension DefaultRawValueDecodable where RawValue: Decodable { | |
init(from decoder: Decoder) throws { |
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
// | |
// PSPDFGenerics.h | |
// PSPDFFoundation | |
// | |
// PSPDFKit is the leading cross-platform solution for integrating PDFs into your apps: https://pspdfkit.com. | |
// Try it today using our free PDF Viewer app: https://pdfviewer.io/ | |
// | |
// This file is MIT licensed. | |
/** |
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
// | |
// PSPDFFastEnumeration.h | |
// PSPDFFoundation | |
// | |
// PSPDFKit is the leading cross-platform solution for integrating PDFs into your apps: https://pspdfkit.com. | |
// Try it today using our free PDF Viewer app: https://pdfviewer.io/ | |
// | |
// This file is MIT licensed. | |
@protocol PSPDFFastEnumeration <NSFastEnumeration> |
OlderNewer