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 android.content.Context; | |
import android.graphics.Canvas; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
import android.widget.SeekBar; | |
public class VerticalSeekBar extends SeekBar { | |
private OnSeekBarChangeListener myListener; |
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
boolean isDebuggable = ( 0 != ( getApplcationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) ); |
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
+(UIImage*)imageWithImage: (UIImage*) sourceImage scaledToWidth: (float) i_width | |
{ | |
float oldWidth = sourceImage.size.width; | |
float scaleFactor = i_width / oldWidth; | |
float newHeight = sourceImage.size.height * scaleFactor; | |
float newWidth = oldWidth * scaleFactor; | |
UIGraphicsBeginImageContext(CGSizeMake(newWidth, newHeight)); | |
[sourceImage drawInRect:CGRectMake(0, 0, newWidth, newHeight)]; |
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
extension NSMutableAttributedString { | |
func highlightStrings(stringToHighlight:String, usingRegex:Bool = false) { | |
var useRegex:NSRegularExpressionOptions? | |
if !usingRegex { | |
useRegex = NSRegularExpressionOptions.IgnoreMetacharacters | |
} |
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
// | |
// IAPHelper.swift | |
// Bandwagon | |
// | |
// Created by Andy on 2017/9/27. | |
// Copyright © 2017年 Doraemon. All rights reserved. | |
// | |
import Foundation | |
import SwiftyStoreKit |
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
var startValue = '0.038000001', // Don't lower the decimal point more than 4x of current balance | |
stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08 | |
maxWait = 500, // In milliseconds | |
stopped = false, | |
stopBefore = 3; // In minutes | |
var $loButton = $('#double_your_doge_bet_lo_button'), | |
$hiButton = $('#double_your_doge_bet_hi_button'); |
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
var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance | |
stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08 | |
maxWait = 500, // In milliseconds | |
stopped = false, | |
stopBefore = 1; // In minutes for timer before stopping redirect on webpage | |
var $loButton = $('#double_your_btc_bet_lo_button'), | |
$hiButton = $('#double_your_btc_bet_hi_button'); |