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 React from 'react'; | |
import throttle from 'lodash/throttle'; | |
class WidthListener extends React.PureComponent { | |
width = 0; | |
constructor(props) { | |
super(props); | |
this.onWidthChangeThrottled = throttle(this.onWidthChange, 200); | |
} |
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.xinghui.notificationlistenerservicedemo; | |
import android.app.ActivityManager; | |
import android.app.Service; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.os.IBinder; | |
import android.os.Process; |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# We use preexec and precmd hook functions for Bash | |
# If you have anything that's using the Debug Trap or PROMPT_COMMAND | |
# change it to use preexec or precmd | |
# See also https://github.com/rcaloras/bash-preexec | |
# If not running interactively, don't do anything | |
case $- in |