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
var redirector = new Object(); | |
redirector.openLink = function(url, playStoreId, appStoreId) { | |
var isAndroid = navigator.userAgent.match(/Android/), | |
isIos = navigator.userAgent.match(/iPhone|iPad|iPod/), | |
isFirefox = navigator.userAgent.match(/Firefox/), | |
isOpera = navigator.userAgent.match(/OPR/); | |
if (isAndroid) { | |
if (isFirefox) { | |
setTimeout('market://details?id=' + playStoreId); | |
window.location.replace(url); |
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
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" /> | |
<style type="text/css"> | |
/* css for timepicker */ | |
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; } | |
.ui-timepicker-div dl{ text-align: left; } | |
.ui-timepicker-div dl dt{ height: 25px; } | |
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; } | |
.ui-timepicker-div td { font-size: 90%; } |
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 matrix; | |
import java.util.Arrays; | |
public class ArrayMatrix<T> implements Matrix<T> { | |
private Object[][] array; | |
public ArrayMatrix(int height, int width) { | |
array = new Object[height][width]; | |
} |
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 java.lang.reflect.Field; | |
import java.util.Random; | |
/** | |
* Unicorns may be betray'd with trees. | |
*/ | |
public class Unicorn { | |
private static boolean patted = false; | |
static { |
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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
class RatingBar extends StatelessWidget { | |
RatingBar({this.numStars = 5, this.rating = 0.0, this.onChanged}); | |
final int numStars; | |
final double rating; | |
final ValueChanged<double> onChanged; |
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 android.content.res.Resources | |
import android.util.TypedValue | |
object OneDp { | |
fun init(resources: Resources) { | |
oneDp = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1f, resources.displayMetrics) | |
} | |
} | |
private var oneDp = 0f |
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 android.content.DialogInterface | |
import androidx.appcompat.app.AlertDialog | |
import com.jakewharton.rxbinding2.view.clicks | |
import io.reactivex.Maybe | |
import io.reactivex.Single | |
/** | |
* Sets the dialog non-cancelable. Emits either {@link DialogInterface#BUTTON_POSITIVE}, | |
* {@link DialogInterface#BUTTON_NEGATIVE} or {@link DialogInterface#BUTTON_NEUTRAL} and dismisses | |
* the dialog. |
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 io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.disposables.Disposables | |
import io.socket.client.IO | |
import io.socket.client.Socket | |
import io.socket.emitter.Emitter | |
class RxIO(uri: String) { | |
private val socket = IO.socket(uri) |
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 android.content.Context | |
import com.google.android.gms.maps.GoogleMap | |
import com.google.android.gms.maps.SupportMapFragment | |
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.disposables.Disposables | |
@androidx.annotation.CheckResult | |
fun SupportMapFragment.map(): Single<GoogleMap> = | |
Single.create { emitter -> |
OlderNewer