-
Install the React Developer Tools Chrome Extension.
-
Go to the egghead website, i.e. Getting Started with Redux
-
Click
View -> Developer -> Javascript Console
, then theReact
tab, then the<NextUpLessonList ...>
tag. -
Click back to the
Console
tab, then run:
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
def is_iso(word): | |
if not type(word) is str: | |
raise TypeError("Argument should be a string") | |
if len(word) == 0: | |
return word, False | |
word = word.lower() | |
for char in word: | |
if word.count(char) > 1: | |
return tuple(word), False | |
return tuple(word), True |
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
class ShoppingCart: | |
def __init__(self): | |
self.total = 0 | |
self.items = {} | |
def add_item(self, item_name, quantity, price): | |
self.total += price * quantity | |
self.items.update({item_name: quantity}) | |
def remove_item(self, item_name, quantity, price): |
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.pacentltd.smartalumni.layoutspec; | |
import com.facebook.drawee.backends.pipeline.Fresco; | |
import com.facebook.drawee.drawable.ScalingUtils; | |
import com.facebook.drawee.generic.RoundingParams; | |
import com.facebook.drawee.interfaces.DraweeController; | |
import com.facebook.imagepipeline.common.ResizeOptions; | |
import com.facebook.imagepipeline.request.ImageRequest; | |
import com.facebook.imagepipeline.request.ImageRequestBuilder; | |
import com.facebook.litho.Column; |
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
// Copyright 2017 Google LLC. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
# If your project uses WebView with JS, uncomment the following | |
# and specify the fully qualified class name to the JavaScript interface | |
# class: | |
-keepclassmembers class fqcn.of.javascript.interface.for.webview { | |
public *; | |
} | |
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9) | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; |
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
/** | |
* Data class that is necessary for a UI to show a listing and interact w/ the rest of the system | |
*/ | |
data class Listing<T>( | |
// the LiveData of paged lists for the UI to observe | |
val pagedList: LiveData<PagedList<T>>, | |
// represents the network request status to show to the user | |
val networkState: LiveData<NetworkState>, | |
// represents the refresh status to show to the user. Separate from networkState, this | |
// value is importantly only when refresh is requested. |
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 velasolutions.velabank.services | |
import android.accessibilityservice.AccessibilityService | |
import android.accessibilityservice.AccessibilityServiceInfo | |
import android.content.Context | |
import android.graphics.PixelFormat | |
import android.os.Build | |
import android.util.Log | |
import android.view.Gravity | |
import android.view.LayoutInflater |
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
fun getTimes(times: Array<Int>, directions: Array<Int>): Array<Int> { | |
val result: Array<Int> = Array(times.size) { 0 } | |
val endTime: Int = times.max() ?: 0 | |
if (endTime == 0) return result | |
val inQueue: Queue<Int> = LinkedList() | |
val outQueue: Queue<Int> = LinkedList() | |
var currentIndex = 0 | |
var turnstile = 0 |
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
#!/bin/bash | |
#title : tts.sh | |
#description : This script will convert text to speech using Google translate API | |
# and then to Asterisk formats (wav, sln, gsm) | |
# | |
#author : Andrius Kairiukstis <k@andrius.mobi> | |
#date : 26 July 2013 | |
#version : 0.1 | |
#usage : bash tts.sh FILENAME VOICE PHRASE |