Got a fancy new Discord Activity but found that your Launch button went missing? Here's a patch for that!
Make sure you have Node.js installed and download (or copy) the script below, then run this in your terminal:
Got a fancy new Discord Activity but found that your Launch button went missing? Here's a patch for that!
Make sure you have Node.js installed and download (or copy) the script below, then run this in your terminal:
Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.
So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.
For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback
.
import android.view.animation.DecelerateInterpolator; | |
import android.view.animation.Interpolator; | |
class ReverseInterpolator implements Interpolator { | |
private Interpolator interpolator; | |
public ReverseInterpolator(Interpolator interpolator) { | |
this.interpolator = interpolator; |
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.graphics.Matrix; | |
import android.graphics.Rect; | |
import android.os.Build; | |
import android.transition.Transition; | |
import android.transition.TransitionValues; | |
import android.view.ViewGroup; |
import android.support.design.widget.AppBarLayout; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.Subscription; | |
/** | |
* Helper class for creating Observable of AppBarLayout visibility. | |
* Can be easily modified to return Integer values, if one needs to user verticalOffset param directly. | |
* See for further info: http://stackoverflow.com/questions/30779667/android-collapsingtoolbarlayout-and-swiperefreshlayout-get-stuck |
const path = require("path") | |
const fs = require("fs") | |
// -- Webpack configuration -- | |
const config = {} | |
// Application entry point | |
config.entry = "./src/server/index.js" |
package com.inperson.android.utils.leastview; | |
import android.content.Context; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import android.view.ViewGroup; | |
public class WrappableGridLayoutManager extends GridLayoutManager { |
package org.fpezzato; | |
import android.content.Context; | |
import android.support.design.widget.CollapsingToolbarLayout; | |
import android.util.AttributeSet; | |
import com.google.common.base.Throwables; | |
import java.lang.reflect.Field; |
mContent = (EditText) v.findViewById(R.id.dialog_item_content_EditText); | |
mContent.setText(mContentInit); | |
mContent.setRawInputType(InputType.TYPE_CLASS_TEXT); | |
mContent.setImeActionLabel(getResources().getString(R.string.done), EditorInfo.IME_ACTION_DONE); | |
mContent.setImeOptions(EditorInfo.IME_ACTION_DONE); | |
mContent.setOnEditorActionListener(new TextView.OnEditorActionListener() { | |
@Override | |
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |
if (event == null) { |
/* | |
* Copyright 2015 Laurens Muller. | |
* | |
* 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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |