text:
package com.appnexus.opensdk;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.MutableContextWrapper;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.os.Handler;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.webkit.CookieManager;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.Toast;

import com.appnexus.opensdk.ut.UTAdRequester;
import com.appnexus.opensdk.ut.UTConstants;
import com.appnexus.opensdk.ut.adresponse.BaseAdResponse;
import com.appnexus.opensdk.ut.adresponse.RTBNativeAdResponse;
import com.appnexus.opensdk.utils.Clog;
import com.appnexus.opensdk.utils.HTTPGet;
import com.appnexus.opensdk.utils.HTTPResponse;
import com.appnexus.opensdk.utils.Settings;
import com.appnexus.opensdk.utils.Settings.ImpressionType;
import com.appnexus.opensdk.utils.StringUtil;
import com.appnexus.opensdk.utils.ViewUtil;
import com.appnexus.opensdk.utils.WebviewUtil;
import com.appnexus.opensdk.viewability.ANOmidAdSession;

import org.json.JSONObject;

import java.io.IOException;
import java.util.Date;
import java.util.HashMap;

import static com.appnexus.opensdk.utils.WebviewUtil.isValidUrl;

@SuppressLint("ViewConstructor")
class AdWebView extends WebView implements Displayable,
        ViewTreeObserver.OnGlobalLayoutListener,
        ViewTreeObserver.OnScrollChangedListener {
    private boolean failed = false;
    AdView adView;
    private VideoImplementation videoImplementation = null;
    private UTAdRequester caller_requester;
    private boolean isVideoAd = false;

    // MRAID variables
    private boolean isMRAIDEnabled;
    private MRAIDImplementation implementation;
    protected ANOmidAdSession omidAdSession;
    private int default_width;
    private int default_height;
    boolean isFullScreen = false;
    private boolean firstPageFinished;
    private int creativeWidth;
    private int creativeHeight;
    // for viewable event
    private boolean isOnscreen = false;
    private boolean isVideoOnScreen = false;
    private boolean isVisible = false;
    private Handler handler = new Handler();
    private boolean viewableCheckPaused = false;
    private int orientation;
    private ProgressDialog progressDialog;
    protected String initialMraidStateString;
    private boolean MRAIDUseCustomClose = false;
    protected BaseAdResponse adResponseData;
    private boolean isNativeAd = false;

    // touch detection
    private boolean userInteracted = false;

    private int checkPositionTimeInterval = 1000;
    private int MIN_MS_BETWEEN_CHECKPOSITION = 200;
    private Date timeOfLastCheckPosition = new Date();
    private VideoEnabledWebChromeClient mWebChromeClient;
    private boolean nativeRenderingFailed = false;

    private final String RENDERER_FILE = "apn_renderNativeAssets.html";
    String RENDERER_URL = "AN_NATIVE_ASSEMBLY_RENDERER_URL";
    String RENDERER_JSON = "AN_NATIVE_RESPONSE_OBJECT";
    private boolean isDestroyTriggered;

    public AdWebView(AdView adView, UTAdRequester requester) {
        super(new MutableContextWrapper(adView.getContext()));
        this.adView = adView;
        this.adView.setCurrentDisplayable(this);
        this.caller_requester = requester;
        this.initialMraidStateString = MRAIDImplementation.MRAID_INIT_STATE_STRINGS[
                MRAIDImplementation.MRAID_INIT_STATE.STARTING_DEFAULT.ordinal()];
        setupSettings();
        setup();
    }

    @SuppressWarnings("deprecation")
    @SuppressLint("SetJavaScriptEnabled")
    protected void setupSettings() {
        Settings.getSettings().ua = this.getSettings().getUserAgentString();
        this.getSettings().setJavaScriptEnabled(true);
        this.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        this.getSettings().setBuiltInZoomControls(false);
        this.getSettings().setLightTouchEnabled(false);
        this.getSettings().setLoadsImagesAutomatically(true);
        this.getSettings().setSupportZoom(false);
        this.getSettings().setUseWideViewPort(false);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            this.getSettings().setMediaPlaybackRequiresUserGesture(true);
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            this.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
        }
        this.getSettings().setAllowFileAccess(false);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            this.getSettings().setAllowContentAccess(false);
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            this.getSettings().setAllowFileAccessFromFileURLs(false);
            this.getSettings().setAllowUniversalAccessFromFileURLs(false);
        }

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            CookieManager cm = CookieManager.getInstance();
            if (cm != null) {
                cm.setAcceptThirdPartyCookies(this, true);
            } else {
                Clog.d(Clog.baseLogTag, "Failed to set Webview to accept 3rd party cookie");
            }
        }

        setHorizontalScrollbarOverlay(false);
        setHorizontalScrollBarEnabled(false);
        setVerticalScrollbarOverlay(false);
        setVerticalScrollBarEnabled(false);

        setBackgroundColor(Color.TRANSPARENT);
        setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
    }

    @SuppressWarnings("deprecation")
    @SuppressLint("SetJavaScriptEnabled")
    protected void setup() {
        implementation = new MRAIDImplementation(this);
        omidAdSession = new ANOmidAdSession();
        setWebChromeClient(mWebChromeClient = new VideoEnabledWebChromeClient(this));
        setWebViewClient(new AdWebViewClient());
    }

    public void loadAd(BaseAdResponse ad) {
        try {
            if (ad == null) {
                fail();
                return;
            }
            String html = "";

            isVideoAd = (UTConstants.AD_TYPE_VIDEO.equalsIgnoreCase(ad.getAdType()));
            isNativeAd = (UTConstants.AD_TYPE_NATIVE.equalsIgnoreCase(ad.getAdType()));

            if (isNativeAd) {
                isMRAIDEnabled = false;
                html = getNativeRendererContent(ad);
            } else {
                html = ad.getAdContent();
            }
            // set creative size
            setCreativeHeight(isNativeAd ? getAdHeight() : ad.getHeight());
            setCreativeWidth(isNativeAd ? getAdWidth() : ad.getWidth());
            // Safety Check: content is verified in AdResponse, so this should never be empty
            if (StringUtil.isEmpty(html)) {
                fail();
                return;
            }

            Clog.i(Clog.baseLogTag, Clog.getString(R.string.webview_loading, html));

            parseAdResponseExtras(ad.getExtras());
            adResponseData = ad;

            final float scale = adView.getContext().getResources()
                    .getDisplayMetrics().density;
            //do not modify this logic as it affects the rendering of 1x1 interstitial
            int rheight, rwidth;
            if (isNativeAd) {
                rheight = (int) (getAdHeight() * scale + 0.5f);
                rwidth = (int) (getAdWidth() * scale + 0.5f);
            } else if (ad.getHeight() == 1 && ad.getWidth() == 1) {
                rwidth = ViewGroup.LayoutParams.MATCH_PARENT;
                rheight = ViewGroup.LayoutParams.MATCH_PARENT;
            } else {
                rheight = (int) (ad.getHeight() * scale + 0.5f);
                rwidth = (int) (ad.getWidth() * scale + 0.5f);
            }

            AdView.LayoutParams resize = new AdView.LayoutParams(rwidth, rheight,
                    Gravity.CENTER);
            this.setLayoutParams(resize);

            if (isVideoAd) {
                videoImplementation = new VideoImplementation(this);
                videoImplementation.setVASTXML(html);
                this.loadUrl(Settings.getVideoHtmlPage());
            } else {
                if (!isNativeAd) {
                    html = preLoadContent(html);
                    html = prependRawResources(html);
                    html = prependViewPort(html);
                    html = omidAdSession.prependOMIDJSToHTML(html);
                }
                this.loadDataWithBaseURL(Settings.getWebViewBaseUrl(), html, "text/html", "UTF-8", null);
            }
        } catch (OutOfMemoryError exception) {
            // System is running low in memory and cannot process loadAd just return a failure.
            // This prevents app crash because of ads.
            Clog.e(Clog.baseLogTag, "AdWebView.loadAd -- Caught OutOfMemoryError", exception);
            fail();
        }
    }

    private int getAdHeight() {
        return adView != null ? adView.getRequestParameters().getPrimarySize().height(): -1;
    }

    private int getAdWidth() {
        return adView != null ? adView.getRequestParameters().getPrimarySize().width(): -1;
    }

    // The webview about to load the ad, and the html ad content
    private String preLoadContent(String html) {
        if (!StringUtil.isEmpty(html)) {
            // trim leading and trailing spaces
            html = html.trim();
            // check to see if content is wrapped with  tag
            if (!html.startsWith("")) {
                StringBuilder bodyBuilder = new StringBuilder();
                html = bodyBuilder.append("").append(html).append("").toString();
            }
        }
        return html;
    }

    private String prependRawResources(String html) {
        if (!StringUtil.isEmpty(html)) {
            Resources res = getResources();
            StringBuilder htmlSB = new StringBuilder("");
            html = html.replaceFirst("", htmlSB.toString());
        }
        return html;
    }

    private String prependViewPort(String html) {
        if (!StringUtil.isEmpty(html)) {
            html = html.replaceFirst("", "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,user-scalable=no\"/>");
        }
        return html;
    }

    private void parseAdResponseExtras(HashMap extras) {
        if (extras.isEmpty()) {
            return;
        }

        if (extras.containsKey(UTConstants.EXTRAS_KEY_MRAID)) {
            isMRAIDEnabled = (Boolean) extras.get(UTConstants.EXTRAS_KEY_MRAID);
        }

        if (extras.containsKey(UTConstants.EXTRAS_KEY_ORIENTATION)
                && extras.get(UTConstants.EXTRAS_KEY_ORIENTATION) != null && extras.get(UTConstants.EXTRAS_KEY_ORIENTATION).equals("h")) {
            this.orientation = Configuration.ORIENTATION_LANDSCAPE;
        } else {
            this.orientation = Configuration.ORIENTATION_PORTRAIT;
        }
    }

    protected void loadUrlWithMRAID(final String url) {
        HTTPGet load = new HTTPGet() {
            @Override
            protected void onPostExecute(HTTPResponse response) {
                if (response.getSucceeded()) {
                    String html = preLoadContent(response.getResponseBody());
                    html = prependRawResources(html);
                    html = prependViewPort(html);

                    loadDataWithBaseURL(Settings.getWebViewBaseUrl(), html, "text/html", "UTF-8", null);
                    fireMRAIDEnabled();
                }
            }

            @Override
            protected String getUrl() {
                return url;
            }
        };
        load.execute();
    }

    protected MRAIDImplementation getMRAIDImplementation() {
        return implementation;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        userInteracted = true;
        return super.onTouchEvent(event);
    }

    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        checkPosition();
    }

    boolean getUserInteraction() {
        return userInteracted;
    }

    /**
     * AdWebViewClient for the webview
     */
    private class AdWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {

            if (isDestroyTriggered) {
                return false;
            }

            Clog.v(Clog.baseLogTag, "Loading URL: " + url);

            if (adView == null) {
                return false;
            }

            if (url.startsWith("javascript:")) {
                return false;
            }

            if (url.startsWith("mraid://")) {
                Clog.v(Clog.mraidLogTag, url);
                if (isMRAIDEnabled) {
                    implementation.dispatch_mraid_call(url, userInteracted);
                } else {
                    String host = Uri.parse(url).getHost();
                    if ((host != null) && host.equals("enable")) {
                        fireMRAIDEnabled();
                    } else if ((host != null) && host.equals("open")) {
                        implementation.dispatch_mraid_call(url, userInteracted);
                    }
                }
                return true;
            } else if (url.startsWith("anjam://")) {
                ANJAMImplementation.handleUrl(AdWebView.this, url);
                return true;
            } else if (url.startsWith("appnexuspb://")) {
                PBImplementation.handleUrl(AdWebView.this, url);
                return true;
            } else if (url.startsWith("video://") && isVideoAd && videoImplementation != null) {
                videoImplementation.dispatchNativeCallback(url);
                return true;
            } else if (url.startsWith("nativerenderer://") && adResponseData.getAdType().equalsIgnoreCase(UTConstants.AD_TYPE_NATIVE)) {
                nativeRenderingFailed = !url.contains("success");
                return true;
            }

            handleClickUrl(url);

            return true;
        }

        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);

            String javascript = "javascript:window.mraid.util.pageFinished()";

            if (!firstPageFinished) {
                injectJavaScript(javascript);
                if (isMRAIDEnabled) {
                    implementation.webViewFinishedLoading(AdWebView.this, initialMraidStateString);
                    startCheckViewable();
                }

                // Send Back onAdLoaded. For Video Ads it will be sent after we have adReady from player
                if (isVideoAd && videoImplementation != null) {
                    videoImplementation.webViewFinishedLoading();
                } else if (!implementation.isMRAIDTwoPartExpanded) {
                    if (!isNativeAd) {
                        Clog.i(Clog.baseLogTag, "AdWebView.onPageFinished -- !isMRAIDTwoPartExpanded seding back success");
                        AdWebView.this.success();
                    } else {
                        if (nativeRenderingFailed) {
                            if (caller_requester != null) {
                                caller_requester.nativeRenderingFailed();
                            }
                        } else {
                            success();
                        }
                    }
                }

                if (!isVideoAd && !isNativeAd) {
                    omidAdSession.initAdSession(AdWebView.this, isVideoAd);
                }

                firstPageFinished = true;
            }
        }

        @SuppressWarnings("deprecation")
        @Override
        public void onLoadResource(WebView view, String url) {
            if (url.startsWith("http")) {
                HitTestResult hitTestResult;
                try {
                    hitTestResult = getHitTestResult();
                    if (hitTestResult == null) {
                        return;
                    }
                    // check that the hitTestResult matches the url
                    if (hitTestResult.getExtra() == null
                            || !hitTestResult.getExtra().equals(url)) {
                        return;
                    }
                } catch (NullPointerException e) {
                    return;
                }

                switch (hitTestResult.getType()) {
                    default:
                        break;
                    case HitTestResult.ANCHOR_TYPE:
                    case HitTestResult.IMAGE_ANCHOR_TYPE:
                    case HitTestResult.SRC_ANCHOR_TYPE:
                    case HitTestResult.SRC_IMAGE_ANCHOR_TYPE:

                        if (loadURLInCorrectBrowser(url)) {
                            fireAdClicked();
                        }
                        view.stopLoading();
                        break;
                }
            }
        }

        @Override
        public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
            try {
                // This intercepts resource loading requests from a webview stop loading the mraid.js from server.
                if (url.contains("mraid.js") && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
                    return null;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
            return super.shouldInterceptRequest(view, url);
        }

        @Override
        public void onReceivedError(WebView view, int errorCode,
                                    String description, String failingURL) {
            Clog.w(Clog.httpRespLogTag, Clog.getString(
                    R.string.webview_received_error, errorCode, description, failingURL));
        }

        @Override
        public void onReceivedSslError(WebView view,
                                       SslErrorHandler handler, SslError error) {
            handler.cancel();
            AdWebView.this.fail();
            try {
                Clog.w(Clog.httpRespLogTag,
                        Clog.getString(R.string.webclient_error,
                                error.getPrimaryError(), error.toString()));
            } catch (NullPointerException e) { }
        }
    }

    void fireAdClicked() {
        if (adView != null) {
            adView.getAdDispatcher().onAdClicked();
            adView.interacted();
        }
    }

    void fireAdClickedWithReturnUrl(String clickUrl) {
        if (adView != null) {
            adView.getAdDispatcher().onAdClicked(clickUrl);
            adView.interacted();
        }
    }

    void handleClickUrl(String url) {
        if (adView.getClickThroughAction() == ANClickThroughAction.RETURN_URL) {
            fireAdClickedWithReturnUrl(url);
        } else {
            if (loadURLInCorrectBrowser(url)) {
                fireAdClicked();
            }
        }
    }

    // returns success or failure
    private boolean openNativeIntent(String url) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        try {
            adView.getContext().startActivity(intent);
            return true;
        } catch (ActivityNotFoundException e) {
            Clog.w(Clog.baseLogTag,
                    Clog.getString(R.string.opening_url_failed, url));
            if (isMRAIDEnabled) {
                Toast.makeText(adView.getContext(),
                        R.string.action_cant_be_completed,
                        Toast.LENGTH_SHORT).show();
            }
            return false;
        }
    }

    // returns success or failure
    private boolean checkForApp(String url) {
        if (url.contains("://play.google.com") || (!url.startsWith("http") && !url.startsWith("about:blank"))) {
            Clog.i(Clog.baseLogTag, Clog.getString(R.string.opening_app_store));
            return openNativeIntent(url);
        }

        return false;
    }

    private void openInAppBrowser(WebView fwdWebView) {
        Class<?> activity_clz = AdActivity.getActivityClass();

        Intent intent = new Intent(adView.getContext(), activity_clz);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.putExtra(AdActivity.INTENT_KEY_ACTIVITY_TYPE, AdActivity.ACTIVITY_TYPE_BROWSER);

        BrowserAdActivity.BROWSER_QUEUE.add(fwdWebView);

        try {
            adView.getContext().startActivity(intent);
            triggerBrowserLaunchEvent();
        } catch (ActivityNotFoundException e) {
            Clog.w(Clog.baseLogTag, Clog.getString(R.string.adactivity_missing, activity_clz.getName()));
            BrowserAdActivity.BROWSER_QUEUE.remove();
        }
    }

    // handles browser logic for shouldOverrideUrl
    boolean loadURLInCorrectBrowser(String url) {
        if (adView.getClickThroughAction() == ANClickThroughAction.OPEN_SDK_BROWSER) {

            Clog.d(Clog.baseLogTag, Clog.getString(R.string.opening_inapp));

            //If it's a direct URL to the play store, just open it.
            if (checkForApp(url)) {
                return true;
            }

            //If it's an invalid http url return without loading it.
            if (!isValidUrl(url)) {
                return false;
            }

            try {

                final WebView out;
                // Unless disabled by the user, handle redirects in background

                if (adView.getLoadsInBackground()) {
                    // Otherwise, create an invisible 1x1 webview to load the landing
                    // page and detect if we're redirecting to a market url
                    out = new RedirectWebView(this.getContext());
                    out.loadUrl(url);
                    out.setVisibility(View.GONE);
                    adView.addView(out);

                    if (this.adView.getShowLoadingIndicator()) {
                        //Show a dialog box
                        progressDialog = new ProgressDialog(this.getContextFromMutableContext());
                        progressDialog.setCancelable(true);
                        progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
                            @Override
                            public void onCancel(DialogInterface dialogInterface) {
                                out.stopLoading();
                            }
                        });
                        progressDialog.setMessage(getContext().getResources().getString(R.string.loading));
                        progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
                        progressDialog.show();
                    }
                } else {
                    // Stick the URL directly into the new activity.
                    out = new WebView(new MutableContextWrapper(getContext()));
                    WebviewUtil.setWebViewSettings(out);
                    out.loadUrl(url);
                    openInAppBrowser(out);
                }
            } catch (Exception e) {
                // Catches PackageManager$NameNotFoundException for webview
                Clog.e(Clog.baseLogTag, "Exception initializing the redirect webview: " + e.getMessage());
                return false;
            }
        } else if (adView.getClickThroughAction() == ANClickThroughAction.OPEN_DEVICE_BROWSER) {
            Clog.d(Clog.baseLogTag,
                    Clog.getString(R.string.opening_native));
            openNativeIntent(url);
            triggerBrowserLaunchEvent();
        }
        return true;
    }

    protected void fail() {
        failed = true;
        if (caller_requester != null) {
            //Don't send fail back here, continueWaterfall will internally call fail.
            //is we send fail here then SSM waterfall case will not be handled.
            caller_requester.continueWaterfall(ResultCode.getNewInstance(ResultCode.INTERNAL_ERROR));
        }
    }

    // Called from VideoImplementation on Video Ad Success
    protected void success() {
        // Delay creation of AdSession till JS loads completely for WebView Video
        if (isVideoAd) {
            omidAdSession.initAdSession(AdWebView.this, isVideoAd);
        }
        if (caller_requester != null) {
            caller_requester.onReceiveAd(getAdResponse());
        }
    }

    private AdResponse getAdResponse() {
        return new AdResponse() {
            @Override
            public MediaType getMediaType() {
                return adView.getMediaType();
            }

            @Override
            public boolean isMediated() {
                // Only SSM / RTBHTML and BannerVideo use AdWebView for rendering
                return (UTConstants.SSM.equalsIgnoreCase(adResponseData.getContentSource())) ? true : false;
            }

            @Override
            public Displayable getDisplayable() {
                return AdWebView.this;
            }

            @Override
            public NativeAdResponse getNativeAdResponse() {
                if (isNativeAd)
                    return ((RTBNativeAdResponse) adResponseData).getNativeAdResponse();
                return null;
            }

            @Override
            public BaseAdResponse getResponseData() {
                return AdWebView.this.adResponseData;
            }

            @Override
            public void destroy() {
                AdWebView.this.destroy();
            }
        };
    }

    // For interstitial ads

    int getOrientation() {
        return orientation;
    }

    // Displayable methods

    @Override
    public View getView() {
        return this;
    }

    @Override
    public boolean failed() {
        return failed;
    }

    @Override
    public void destroy() {

        isDestroyTriggered = true;

        // in case `this` was not removed when destroy was called
        ViewUtil.removeChildFromParent(this);

        MutableContextWrapper wrapper = (MutableContextWrapper) getContext();
        wrapper.setBaseContext(wrapper.getApplicationContext());

        setWebViewClient(new WebViewClient());

        if (mWebChromeClient != null) {
            mWebChromeClient.onHideCustomView();
            mWebChromeClient = null;
            setWebChromeClient(null);
        }

        if (isNativeAd) {
            NativeAdSDK.unRegisterTracking(this);
        } else {
            omidAdSession.stopAdSession();
            implementation.destroy();
        }
        if (isNativeAd) {
            AdWebView.super.destroy();
        } else {
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    try {
                        AdWebView.super.destroy();
                    }
                    // Fatal exception in android v4.x in TextToSpeech
                    catch (IllegalArgumentException e) {
                        Clog.e(Clog.baseLogTag, Clog.getString(R.string.apn_webview_failed_to_destroy), e);
                    }
                }
            }, 300);
        }
//        AdWebView.super.destroy();
        this.removeAllViews();
        stopCheckViewable();

        if (adView != null) {
            adView = null;
        }
    }

    private void setCreativeWidth(int w) {
        this.creativeWidth = w;
    }

    @Override
    public int getCreativeWidth() {
        return this.creativeWidth;
    }

    private void setCreativeHeight(int h) {
        this.creativeHeight = h;
    }

    @Override
    public int getCreativeHeight() {
        return this.creativeHeight;
    }

    @Override
    public void onDestroy() {
        destroy();
    }

    @Override
    public void onAdImpression() {
        if (!isVideoAd && !isNativeAd) {
            omidAdSession.fireImpression();
        }
    }

    @Override
    public void addFriendlyObstruction(View friendlyObstructionView) {
        if (omidAdSession != null) {
            omidAdSession.addFriendlyObstruction(friendlyObstructionView);
        }
    }

    @Override
    public void removeFriendlyObstruction(View friendlyObstructionView) {
        if (omidAdSession != null) {
            omidAdSession.removeFriendlyObstruction(friendlyObstructionView);
        }
    }

    @Override
    public void removeAllFriendlyObstructions() {
        if (omidAdSession != null) {
            omidAdSession.removeAllFriendlyObstructions();
        }
    }

    @Override
    public boolean exitFullscreenVideo() {
        if (mWebChromeClient != null) {
            return mWebChromeClient.exitFullscreenVideo();
        }
        return false;
    }

    public boolean isMRAIDUseCustomClose() {
        return MRAIDUseCustomClose;
    }

    public void setMRAIDUseCustomClose(boolean MRAIDUseCustomClose) {
        this.MRAIDUseCustomClose = MRAIDUseCustomClose;
    }

    // MRAID code

    private void handleVisibilityChangedEvent(int windowVisibility, int visibility) {
        if ((windowVisibility == VISIBLE) && (visibility == VISIBLE)) {
            WebviewUtil.onResume(this);
            isVisible = true;
            // only start checking if MRAID is enabled
            if (isMRAIDEnabled && firstPageFinished) {
                startCheckViewable();
            }
        } else {
            WebviewUtil.onPause(this);
            isVisible = false;
            stopCheckViewable();
        }
        implementation.fireViewableChangeEvent();
    }

    @Override
    protected void onWindowVisibilityChanged(int visibility) {
        super.onWindowVisibilityChanged(visibility);
        handleVisibilityChangedEvent(visibility, getVisibility());
    }

    @Override
    public void onVisibilityChanged(View view, int visibility) {
        super.onVisibilityChanged(view, visibility);
        handleVisibilityChangedEvent(getWindowVisibility(), visibility);
    }

    @Override
    public void scrollTo(int x, int y) {
        if (Settings.getSettings().preventWebViewScrolling) {
            super.scrollTo(0, 0);
        } else {
            super.scrollTo(x, y);
        }
    }

    public void fireMRAIDEnabled() {
        if (isMRAIDEnabled) return;

        isMRAIDEnabled = true;
        if (this.firstPageFinished) {
            implementation.webViewFinishedLoading(this, initialMraidStateString);
            startCheckViewable();
        }
    }

    // w,h in dips. this function converts to pixels
    void expand(int w, int h, boolean cust_close, final MRAIDImplementation caller,
                final boolean allowOrientationChange, final AdActivity.OrientationEnum forceOrientation) {
        DisplayMetrics metrics = new DisplayMetrics();
        ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))
                .getDefaultDisplay().getMetrics(metrics);

        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
                this.getLayoutParams());
        if (!implementation.resized) {
            default_width = lp.width;
            default_height = lp.height;
        }

        if ((h == -1) && (w == -1)) {
            if (adView != null) {
                isFullScreen = true;
            }
        }
        if (h != -1) {
            h = (int) (h * metrics.density + 0.5);
        }
        if (w != -1) {
            w = (int) (w * metrics.density + 0.5);
        }

        lp.height = h;
        lp.width = w;
        lp.gravity = Gravity.CENTER;

        MRAIDFullscreenListener mraidFullscreenListener = null;
        // only lock orientation if we're in fullscreen mode
        if (isFullScreen) {
            // if fullscreen, create a listener to lock the activity when it is created
            mraidFullscreenListener = new MRAIDFullscreenListener() {
                @Override
                public void onCreateCompleted() {
                    // lock orientation if necessary
                    if ((caller != null) && (caller.getFullscreenActivity() != null)) {
                        lockOrientationFromExpand(caller.getFullscreenActivity(),
                                allowOrientationChange, forceOrientation);
                        AdView.mraidFullscreenListener = null; // only listen once
                    }
                }
            };
        }

        if (adView != null) {
            adView.expand(w, h, cust_close, caller, mraidFullscreenListener);
            adView.interacted();
        }

        this.setLayoutParams(lp);
    }

    protected void lockOrientationFromExpand(Activity containerActivity,
                                             boolean allowOrientationChange,
                                             AdActivity.OrientationEnum forceOrientation) {
        if (forceOrientation != AdActivity.OrientationEnum.none) {
            AdActivity.lockToMRAIDOrientation(containerActivity, forceOrientation);
        }

        if (allowOrientationChange) {
            AdActivity.unlockOrientation(containerActivity);
        } else if (forceOrientation == AdActivity.OrientationEnum.none) {
            // if forceOrientation was not none, it would have locked the orientation already
            AdActivity.lockToCurrentOrientation(containerActivity);
        }
    }

    void hide() {
        if (adView != null) {
            adView.hide();
        }
    }

    void close() {
        if (adView != null) {
            adView.close(default_width, default_height, implementation);
        }
    }

    protected void checkPosition() {
        if (!isMRAIDEnabled) {
            return;
        }
        if (tooManyCheckPositionRequests()) {
            return;
        }
        if (!(this.getContextFromMutableContext() instanceof Activity)) return;

        // check whether newly drawn view is onscreen or not,
        // fires a viewableChangeEvent with the result
        int viewLocation[] = new int[2];
        this.getLocationOnScreen(viewLocation);

        // holds the visible area of a AdWebView in global (root) coordinates
        Rect globalClippedArea = new Rect();
        boolean visible = this.getGlobalVisibleRect(globalClippedArea);

        int left = viewLocation[0];
        int right = viewLocation[0] + this.getWidth();
        int top = viewLocation[1];
        int bottom = viewLocation[1] + this.getHeight();

        final double visibleViewArea = globalClippedArea.height() * globalClippedArea.width();
        final double totalArea = this.getHeight() * this.getWidth();
        final double exposedPercentage = (visibleViewArea / totalArea) * 100;

        int[] screenSize = ViewUtil.getScreenSizeAsPixels((Activity) this.getContextFromMutableContext());

        this.isOnscreen = (right > 0) && (left < screenSize[0])
                && (bottom > 0) && (top < screenSize[1]);

        // update current position
        if (implementation != null) {
            implementation.fireViewableChangeEvent();
            implementation.setCurrentPosition(left, top, this.getWidth(), this.getHeight());
            int orientation = this.getContext().getResources().getConfiguration().orientation;
            implementation.onOrientationChanged(orientation);

            // exposureChange event logic
            if (visible) {
                // If at-least part of view is visible, then send exposure percentage and getLocalVisibleRect
                Rect localClippedArea = new Rect();
                this.getLocalVisibleRect(localClippedArea);
                implementation.fireExposureChangeEvent(exposedPercentage, localClippedArea);
            } else {
                // No part of the view is visible then we need to send exposed percentage as 0.0 and visible rectangle as null
                implementation.fireExposureChangeEvent(0.0, null);
            }
        }

        if (isVideoAd && videoImplementation != null) {
            if (visible) {
                this.isVideoOnScreen = exposedPercentage >= Settings.VIDEO_AUTOPLAY_PERCENTAGE;
            } else {
                this.isVideoOnScreen = false;
            }
            videoImplementation.fireViewableChangeEvent();
        }
        timeOfLastCheckPosition = new Date();
    }

    private boolean tooManyCheckPositionRequests() {
        Date now = new Date();
        long deltaT = now.getTime() - timeOfLastCheckPosition.getTime();
        if (deltaT >= MIN_MS_BETWEEN_CHECKPOSITION) {
            //we have reached a min wait now its ok to execute checkPosition
            return false;
        } else {
            return true;
        }
    }

    boolean isViewable() {
        return isOnscreen && isVisible;
    }

    boolean isVideoViewable() {
        return isVideoOnScreen && isVisible;
    }

    public void resize(int w, int h, int offset_x, int offset_y, MRAIDImplementation.CUSTOM_CLOSE_POSITION custom_close_position, boolean allow_offscreen) {
        DisplayMetrics metrics = new DisplayMetrics();
        ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))
                .getDefaultDisplay().getMetrics(metrics);
        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
                this.getLayoutParams());
        if (!implementation.resized) {
            default_width = lp.width;
            default_height = lp.height;
        }

        h = (int) (h * metrics.density + 0.5);
        w = (int) (w * metrics.density + 0.5);

        lp.height = h;
        lp.width = w;
        lp.gravity = Gravity.CENTER;

        if (adView != null) {
            adView.resize(w, h, offset_x, offset_y, custom_close_position, allow_offscreen, implementation);
        }

        if (adView != null) {
            adView.interacted();
        }

        this.setLayoutParams(lp);
    }

    interface MRAIDFullscreenListener {
        void onCreateCompleted();
    }

    // Viewable timer code

    private final Runnable checkViewableRunnable = new Runnable() {
        @Override
        public void run() {
            if (viewableCheckPaused) return;
            checkPosition();
            handler.postDelayed(this, checkPositionTimeInterval);
        }
    };

    private void startCheckViewable() {
        // only start if webview is visible
        if (!isVisible) return;
        viewableCheckPaused = false;
        handler.removeCallbacks(checkViewableRunnable);
        handler.post(checkViewableRunnable);
    }

    private void stopCheckViewable() {
        viewableCheckPaused = true;
        handler.removeCallbacks(checkViewableRunnable);
    }

    private class RedirectWebView extends WebView {

        @SuppressLint("SetJavaScriptEnabled")
        public RedirectWebView(Context context) {
            super(new MutableContextWrapper(context));

            WebviewUtil.setWebViewSettings(this);
            this.setWebViewClient(new WebViewClient() {
                private boolean isOpeningAppStore = false;

                @Override
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                    Clog.v(Clog.browserLogTag, "Redirecting to URL: " + url);
                    isOpeningAppStore = checkForApp(url);

                    if (isOpeningAppStore) {
                        if (progressDialog != null && progressDialog.isShowing()) {
                            progressDialog.dismiss();
                        }
                    }

                    return isOpeningAppStore;
                }

                @Override
                public void onPageFinished(WebView view, String url) {
                    Clog.v(Clog.browserLogTag, "Opening URL: " + url);
                    ViewUtil.removeChildFromParent(RedirectWebView.this);

                    if (progressDialog != null && progressDialog.isShowing()) {
                        progressDialog.dismiss();
                    }

                    if (isOpeningAppStore) {
                        isOpeningAppStore = false;
                        RedirectWebView.this.destroy();
                        triggerBrowserLaunchEvent();
                        return;
                    }

                    RedirectWebView.this.setVisibility(View.VISIBLE);
                    openInAppBrowser(RedirectWebView.this);
                }
            });
        }
    }

    private void triggerBrowserLaunchEvent() {
        if (adView != null && adView instanceof InterstitialAdView) {
            ((InterstitialAdView) adView).browserLaunched();
        }
    }

    @Override
    protected void onDetachedFromWindow() {
        removeViewTreeObserverListeners();
        super.onDetachedFromWindow();
        if (progressDialog != null && progressDialog.isShowing()) {
            progressDialog.dismiss();
        }
    }

    private void removeViewTreeObserverListeners() {
        ViewTreeObserver treeObserver = getViewTreeObserver();
        if (treeObserver.isAlive()) {
            treeObserver.removeOnScrollChangedListener(this);
            treeObserver.removeGlobalOnLayoutListener(this);
        }
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        setupViewTreeObserver();
    }

    private void setupViewTreeObserver() {
        ViewTreeObserver treeObserver = getViewTreeObserver();
        if (treeObserver.isAlive()) {
            treeObserver.removeOnScrollChangedListener(this);
            treeObserver.removeGlobalOnLayoutListener(this);

            treeObserver.addOnScrollChangedListener(this);
            treeObserver.addOnGlobalLayoutListener(this);
        }
    }

    /**
     * ViewTreeObserver GlobalLayout Listener
     */
    @Override
    public void onGlobalLayout() {
        checkPosition();
    }

    /**
     * ViewTreeObserver Scroll Listener
     */
    @Override
    public void onScrollChanged() {
        checkPosition();
    }

    // Helper method for getting Context if it is of type MutableContextWrapper.
    protected Context getContextFromMutableContext() {
        if (this.getContext() instanceof MutableContextWrapper) {
            return ((MutableContextWrapper) this.getContext()).getBaseContext();
        }
        return this.getContext();
    }

    protected void injectJavaScript(String url) {
        try {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                evaluateJavascript(url, null);
            } else {
                loadUrl(url);
            }
        } catch (Exception exception) {
            // We can't do anything much here if there is an exception ignoring.
            // This is to avoid crash of users app gracefully.
            Clog.e(Clog.baseLogTag, "AdWebView.injectJavaScript -- Caught EXCEPTION...", exception);
        }
    }

    public void setCheckPositionTimeInterval(int interval) {
        checkPositionTimeInterval = interval;
        MIN_MS_BETWEEN_CHECKPOSITION = interval;
        stopCheckViewable();
        startCheckViewable();
    }

    private String getNativeRendererContent(BaseAdResponse response) {
        final ANNativeAdResponse nativeAdResponse = ((RTBNativeAdResponse) response).getNativeAdResponse();
        JSONObject nativeJson = nativeAdResponse.getNativeRendererObject();
        adResponseData = response;
        try {
            String htmlContentInStringFormat = StringUtil.getStringFromAsset(RENDERER_FILE, getContextFromMutableContext());
            htmlContentInStringFormat = htmlContentInStringFormat.replace(RENDERER_URL, nativeAdResponse.getRendererUrl());
            htmlContentInStringFormat = htmlContentInStringFormat.replace(RENDERER_JSON, nativeJson.toString());
            Clog.d(Clog.baseLogTag + "-NATIVE_JSON", nativeJson.toString());
            Clog.d(Clog.baseLogTag + "-RENDERER_URL", nativeAdResponse.getRendererUrl());
            Clog.d(Clog.baseLogTag + "-HTML", htmlContentInStringFormat);
            return htmlContentInStringFormat;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "";
    }

}

class MRAIDTwoPartExpandWebView extends AdWebView {
    MRAIDImplementation firstPartImplementation;

    //The mraidimplementation parameter is NOT here to be reused by this webview.
    //this webview will make its own mraidimplementation
    //and only access the first one when it closes, below
    MRAIDTwoPartExpandWebView(AdView adView, MRAIDImplementation firstPartImplementation) {
        super(adView, null);
        this.initialMraidStateString = MRAIDImplementation.MRAID_INIT_STATE_STRINGS[
                MRAIDImplementation.MRAID_INIT_STATE.STARTING_EXPANDED.ordinal()];
        this.firstPartImplementation = firstPartImplementation;
    }

    @Override
    void close() {
        super.close();
        firstPartImplementation.close();
    }
}


In these few verses we learn that Jesus engaged in three important practices. The first is prayer. Notice the detail of the first verse describing where and when he prayed—morning, still dark, he got up and went out, a deserted place. End of detail. Mark concludes with the simple words, 'he prayed.' Nothing is told about how Jesus prayed or what words, if any, he used. This is an important omission highlighting the relational nature of prayer. In its broadest understanding prayer is a relationship with the Living God and therefore, different for every person. For some, words are important, both the words they speak and the ones they hear from God. For others, silence is more meaningful. The point is to find a 'deserted place,' a quiet hour (for Jesus that was early morning; it may not be the best for you) where you can be alone, with few distractions. In the solitude and silence God meets the pray-er and the relationship deepens.
The second practice is 'proclaiming the message.' It is mentioned twice in these few verses. Jesus responded to the disciples, who wanted him to return to Capernaum and continue performing miracles on the sick, saying that he came to 'proclaim the message.' We know the message he proclaimed was 'the good news of the kingdom of God' (1:15). It would have been far easier to go back into the town to satisfy and amaze a crowd wanting miracles, but Jesus wouldn't do it. The message was more important than the miracles. Indeed, the miracles proclaim the message. If we but pay careful attention, we'll get it.
The third practice is only mentioned briefly in the last words: 'and casting out demons.' The frequency with which the demonic is mentioned in Mark's Gospel suggests that the devil continued his attack on Jesus begun the wilderness temptation. Jesus was in constant conflict, not merely with earthly powers and people, but with all the spiritual forces of evil. Casting out demons is also about confronting evil in the world in Jesus' name, a discipline we can exercise today.
These three practices are identical to the three tasks that Jesus gave to the ones he called to be apostles (3:14-15). In varying ways, they are still the tasks that we, who call ourselves followers of Jesus, are called to practice today.
In what ways could you practice these three disciplines—prayerful solitude with Jesus, proclaiming his message and confronting evil—in your world today?
Lord, you practiced three tasks that aren't easy. I know that I too must spend time in prayer, proclaim your message and confront evil, but I find all kinds of excuses to avoid one or all of them. Help me today to start trying, once again. Amen.
Go and live obediently in the world, praying, proclaiming the good news and confronting evil.


text:
From the Vine ~ Possess His Heart
Home•Articles, From the Vine•From the Vine ~ Possess His Heart
By Lynne Keating
All photos courtesy of Lynne Keating. All rights reserved.
"I come to my garden, my sister, my bride … drink deeply, O lovers!" —Songs 5:1
Over the summer, I visited Longwood Gardens nestled in the historic hills of northern Delaware. These gardens were built during an era when gardens were designed to be romantic. I've included some of the photos I took so that you can see just how beautiful and romantic they are.
The awareness of romantic love is powerful and, at times, intimidating. And there is no circumventing the Scriptures, which speak of the love of God for His people as a romantic love. Jesus calls Himself bridegroom. What more romantic image can there be? The great mystics and doctors of the Church like Saint Catherine of Siena, Saint Bernard of Clairvaux, Saint John of the Cross and Saint Theresa of Avila, spoke of such a love and were chased out of churches and religious communities—too scandalous a thought! Yet, man or woman, this is who we are—the most desired lover of the King of kings.
A wise old mother superior once told me, "If you don't know for certain who you are, the devil will try to tell you." Since one element of our baptismal identity is that of "king," how do we embrace the idea of a royal identity and the authority implied by the concept of "king"? And what's love got to do with it?
Sometimes when I try to avoid a topic, the confrontation comes in a dream (where, I am told, our defenses are lowered). In just such a dream, I once saw myself as an awkward teenager with disheveled hair and mismatched clothes. In this dream, there was a boy who bought me an ice cream cone and sat next to me on a park bench. I asked him why he did this but he did not answer; he only smiled at me with kindness in his eyes. Toward the end of my dream, older and not so awkward, I was fixing my hair and putting on a lovely dress. I was no longer clumsy and unaware of my appearance. There was a knock on the door. There was this young man, older now, but with those same kind and smiling eyes. He held a bouquet of roses. My heart skipped a beat. When he saw me, he was so overcome with happiness, that he seemed almost weakened with love. There, the dream ended.
I knew this dream was special, because it would not leave my conscientiousness for several days. It took me a while to understand its meaning, though I asked the Lord to help me understand it. In time, I came to realize that when we accept the love of God and, because of it, strive to make ourselves beautiful in His sight, He becomes "bridegroom." He is, to use human terms, overcome by our love, for we are in possession of His heart. Think about that.
When a woman marries a man, she takes his name. She is given rights and authority over his dealings, his finances, his household, and his decisions. Love and authority are, in fact, deeply and intimately connected.
In time, I came to understand that this dream showed me not only the persistent and patient love of God, but also the power which our love, when given in return, wields over His Sacred Heart. Just as a wife takes the name of her husband and becomes influential over his decisions, when we give our love to God, we take His name, share His royal identity, have recourse to His riches, and sway over His actions. Because of His great love for us, He allows Himself to be moved by our prayers, by what makes us happy! In short, His heart is overcome by His love for us. Think about that! Better yet, do what Mary did: ponder it deeply in your heart.
In the final analysis, only humility will allow us to stand before the greatest convergence of all times (poor and weak as we are). It is in humble submission, meekness, and poverty of spirit that we receive the power, the authority and the royal identity bestowed upon us by Love.
We must know for certain who we are. We are beloved. We are beautiful. We are bride!
Spend some time meditating on today's Gospel in which we hear of Jesus as a young boy, spending three days and nights in the Temple of Jerusalem. Over and over again during His stay there, He witnessed the sacrificing of the spotless lambs, offered by the Jewish people for expiation for their sins. In that Temple, He came face to face with His identity, His mission: to be the spotless offering for our sins. Then, in humble submission to His Heavenly Father, and because of His great love for Him, Jesus submitted Himself to the authority of His loving parents, and returned home with them and was obedient to them.
Lord Jesus, today I reach out for your hand. I want to be with you. I want to love you for yourself alone. Help me to know you as you know yourself. Help me to come to know your will for me. Help me to embrace who I am in your eyes. Amen.
Lynne Keating, author and blogger, also lectors and teaches the Bible to CCD students at Saint John the Beloved Parish in Wilmington, Delaware. Convinced that this is one of the most exciting and important times in salvation history, her writing encourages all people to recognize and rejoice God's self-offering love, revealed more and more through the actions of His people. Fellowship of the Lamb is Lynne's blog.
By sharon wilson|2015-12-27T03:00:36-06:00December 27th, 2015|Articles, From the Vine|0 Comments
About the Author: sharon wilson
The Blessing of the Saints Among Us
Rise Up in Splendor!
Forgiveness: Feel the Love
Christmas Anticipation
Never Afraid of the Dark
Facing a Crossroad
The Feast of the Epiphany
A Hidden Life
Jeannie on Facing a Crossroad
Katie Hoffman on Facing a Crossroad
Elizabeth Pottier on Facing a Crossroad

redpajama_set_name: RedPajamaCommonCrawl


The Cornhuskers (31-4) will play either defending champion Stanford or Florida at 9 p.m. in Saturday's finals, after fighting off one Penn State match point in the fourth set and wrapping up the match on a Kelly Hunter kill, winning a joust on a near-overpass by the Huskers.
Nebraska will be seeking its fifth national crown. The Lions (33-2) and Cardinal share the NCAA record with seven apiece.
Nebraska continued its recent supremacy over Penn State, having won the last seven meetings.
Simone Lee carried a huge load on offense with 18 kills and 15 digs, while Haleigh Washington bounced back from a slow start for 13 kills and six blocks. Ali Frantti and Heidi Thelen added nine kills apiece, with seven blocks for Thelen. Bryanna Weiskircher and Abby Detering delivered 24 and 25 assists, respectively, and Weiskircher also had 18 digs. Kendall White posted 16 digs.
Nebraska saw four players in double figures in kills, led by Mikaela Foecke's 19 to go with 19 digs. She was followed by Briana Holman's 13 kills, Jazz Sweet's 12 kills and Annika Albrecht's 13 kills and 13 digs. Lauren Stivrins posted nine blocks, Hunter had 47 assists and 23 digs, and Kenzie Maloney had 21 digs. Nebraska had a huge performance from the back line, with a 90-76 advantage in digs.
The Nittany Lions suffered through unforced errors to give Nebraska 24 free points, including 14 miscues from the service line.
The Huskers also had some troubles, but made up for it by serving 10 aces, including four from Maloney.
The Nittany Lions' lone match point may have been the turning point of the night. Penn State had already turned back three Nebraska set points in the fourth set, then Thelen and Tori Gorrell teamed up to block Albrecht to go up 26-25. Holman then fired a spike that the Lions dug up, but Detering got tangled with Thelen while running to the net to retrieve the pass, and could not get the ball set to a teammate. Two Husker kills later the match was headed to a fifth frame.
Penn State had leads of at least three points in each of the first four sets, and had five-point margins in the third and fourth. The Lions also built a 6-4 lead in the fifth, but just like all of the other frames saw Nebraska put together a big run, this time an 8-2 burst to go ahead 12-8. The teams traded points until Hunter's kill ended the match.
The Nittany Lions had set major goals for the season and met most of them. They shared the Big Ten title with Nebraska — something the six graduating seniors had not earned in any of their previous three seasons. They also wanted to get the program back to its 13th final four and capture the eighth title. The last box on that list will be empty.
"Certain programs get judged by winning national championships, not just their day-to-day effort," said Rose, who has more Division I match wins and national titles than any other coach.


I want to be in moovies! No srsly, I want to see MY NAME IN LIGHTS!
I could get a moose-stache!
I wanna be a Leading ManCat!
And be all d'bone-air like.
Black Kitteh, we think you already are a star, just don't let Jasper know about it!
All you need is a good agent and you'll be walking on the red carpet soon!
Well, we think you gots the looks, Black Kitteh! We can't wait to see you on the silver screen!
Leading mancat or not, you ARE d'bone-air!!
You could play a heartthrob, an international spy.
My name is Kitteh Black Kitteh. Already hear gasps!
Oh, I see my black kitteh has fans!
And my Pretinha is there too!


text:
Q: Не получается использовать библиотеку с Obective-C на Swift Всем привет, нашел библиотеку MailCore2 для Objective-C, сам пишу проект на Swift, на гитхабе была инструкция, как использовать эту библиотеку в Swift, все сделал, выдает такую ошибку: unknown>:0: error: bridging header '/Users/Apple/Desktop/Ф/Programming/Swiftnew/CivilCalculateDemo/Bridging-Header.h' does not exist
Но Bridging-Header.h cуществует по указанному пути. Не могу понять в чем дело.:(

redpajama_set_name: RedPajamaStackExchange


text:
End of the Road: Bears at Vikings Open Thread
Jeff Hughes | January 9th, 2022
Tagged: Minnesota Vikings, Week 18
Final Game Preview of the 2021 Chicago Bears Season
Why Do I Like the Chicago Bears This Week?
I always like the Chicago Bears.
And it's only one week so why not?
What Positives Can We Take Away From the 2021 Season?
This season was not without promising developments, and some of those developments came at key positions. Let's take a moment to accentuate the positives.
Fields Flashes.
All that should have mattered in 2021 was Fields. And we saw plenty that portends a future star in the league. There is still a long way to go for the young quarterback, but that journey could be a fun one for Bears fans.
Young Tackles.
Can Jenkins and Borom bookend this offensive line for years to come? It's possible. And that possibility is incredibly exciting.
David Montgomery/Khalil Herbert/Darnell Mooney/Cole Kmet.
The Bears still need explosive weapons on the offensive side of the ball, but the pieces are falling into place. (And for those super critical of Kmet, ease up. He's a kid. And in a productive offense he's going to be a productive piece.)
Robert Quinn's Dominance.
The Bears enter the 2022 season with one of the sport's best pass rushes, barring a trade. (And the only way the Bears should trade Quinn or Khalil Mack is if they're getting significant return.)
Jaylon Johnson.
Johnson has not only emerged as a top corner but his comments late in the season, questioning the integrity of the folks around him, show he possesses the leadership qualities this secondary desperately needs. But Johnson won't realize his full potential until a second corner emerges on the other side.
Roquan.
This is – simply stated – one of the best defensive players in the league and the kind of talent you build a defensive roster around.
Tagged: David Kaplan, Justin Fields, Minnesota Vikings
Monday Night Football Open Thread
Jeff Hughes | December 20th, 2021
Tagged: Minnesota Vikings, Monday Night Football
Vikings at Bears MNF Game Preview: West Side Story and…Bears Win?!?!?!
And with the Bears depleted, and the Vikings unable to stop anyone from throwing the ball, this game could potentially be a fun watch. Right? Isn't entertainment the ceiling now for the remainder of the 2021 season?
The more I get to know about Justin Fields, it's clear no coach at this point in his career can "ruin him". He's not built that way 🐻⬇
— 💋K 🐻 (@sleepxpert) December 17, 2021
Go See West Side Story
I've hesitated to write fully about West Side Story in an effort to avoid hyperbole. But after two viewings, I'm done with that. This is one of the greatest films ever made. What are my six favorite things about the picture, you ask?
The custodian and the floodlights in Maria, a number that took my breath away on both viewings.
Gee, Officer Krupke is a song I've skipped whenever watching the original film (and sort of tuned out in the theatre). In Spielberg's masterpiece, it's the most ingeniously staged number in movie musical history.
America. If you've seen it, you understand.
Ariana DeBose. Same note.
Rachel Zegler's Maria is a gorgeous creation, but she is never better than in a silent sequence in the film's first act, attempting to present both herself and her bedroom as being slept in.
Mike Faist. He's not going to win the Academy Award, but his Riff absolutely deserves
Game Prediction
Minnesota fields one of the best offenses in the sport and it's unlikely this dilapidated Bears defense will keep them under 27 points. So, the question is, can the Bears offense match that output?
This is Justin Fields' breakout performance as a passer.
Chicago Bears 30, Minnesota Vikings 27
Tagged: Justin Jefferson, Minnesota Vikings, Monday Night Football, West Side Story
FOCO Week 10 Game Preview: Vikings at Bears, Volume I
Jeff Hughes | November 13th, 2020
It's gonna be a rough winter across the country, as we find ourselves once again in the throes of Covid-19. So when FOCO reached out to me about partnering, I wanted to find a way to incorporate their stuff into DBB and try and have some fun with these crazy times.
Above is the gaiter scarf. They sent me one. It's warm as hell and it can serve as a mask. And it ain't that expensive. (Like $15.) Here's the link to the product. Christmas is coming, folks, even if we're not spending the day with our families. (We'll have a giveaway from FOCO in Monday's Volume II post.)
But this is a unique time. I have reached the point with this offense where I no longer believe they're capable of first downs. And when they do manage a few first downs, or make a splash play, I just assume the penalties and sideline mistakes that follow will sabotage the progress and keep the offense from scoring points. There can't be a less fun unit in the NFL, especially considering their talent on the outside.
A Little Look at Minnesota
Minnesota is 25th in points allowed, allowing nearly 30 points per game. But ask yourself, does that matter? Is there any scenario in which you can imagine the Chicago offense scoring 30 points?
Dalvin Cook has been torturing bad defenses for the last five weeks. Outside of Seattle holding him to 65 yards on 17 carries, Cook's rushing totals have been 206, 163, 130 and 181. The Bears did the job against Derrick Henry a week ago. The test doesn't get an easier Monday night.
Vikings don't have a single player on their defense in the top 50 in sacks. This is not a team that threatens the opposing passer. (Neither was Tennessee and one of their DL ended up Defensive Player of the Week in the AFC.)
Stefon Diggs is having a remarkable year in Buffalo but the Vikings have a younger, more-talented version of Diggs in Justin Jefferson. He's averaging 18.4 yards per reception, which is better than DK Metcalf and DJ Moore and probably DL Hughley. (The only player with a higher average is Nelson Agholor in Vegas but he's got half the number of catches.)
Doesn't this Courtney Cronin headline from ESPN tell the story for the Vikings? "Key to Vikings' success: Keep ball out of Kirk Cousins' hands?"
Tagged: Cousin Eddie, FOCO, Kirk Cousins, Minnesota Vikings
Week 17: Bears at Vikings Game Preview (With Nothing at Stake)
I always like the Chicago Bears…
…and we're only guaranteed 16 of these ballgames a year. The next time the Bears will take the field is nine months away. Might as well enjoy seeing the colors out there.
Three Reasons to Sit Through This Game
It won't mean much to disappointed Bears fans but 8-8 will feel much better to this locker room than 7-9. They can endure this miserable campaign and know they were only a play or two away from being in the tournament ANYWAY.
And 4-2 in the NFC North will reaffirm the club's belief that they are only a few moves away from being back atop the division in 2020. (Of course one of those moves needs to be at the most important position in professional sports.)
There are four metrics one can look at to get a good sense of a quarterback's play: FO's DVOA (value per play), DYAR (total value), QB rating and total QBR. None are close to perfect but I believe if you take the average ranking of the four you can get a clearer picture. Here is where Mitch Trubisky ranks in all four:
DVOA: 26th
DYAR: 26th
QB Rating: 28th
Total QBR: 28th
Fan of old school stats? Mitch is 32nd in average yards per completion and 27th in touchdowns. There's not a single, discernible stat one can look to for optimism regarding Trubisky's performance this season.
Verdict: he's been better than rookies and backups this year. Nobody else. So why is this a reason to watch? Maybe it's his last start?
Khalil Mack needs a sack and a half to get to double digits on the season. One has to believe he'll be motivated to get there. And the Vikings offensive line will help. They are bad in protection.
Two teams are tied for playing the easiest schedule of opposing offenses (average DVOA: -4.9%).
The team with the best defense (New England) and the team with the worst defense (Miami).
Hardest schedule of opposing offenses: Chicago.
— Aaron Schatz 🏈 (@FO_ASchatz) December 23, 2019
ATM: North Might Be Tighter, But Bears Are Still Best
Andrew Dannehy | June 4th, 2019
There is little question that at least a couple of other teams in the NFC North are better than they were a year ago, but the Bears were so much better than the field it doesn't seem likely the gap isn't still significant. In addition to having four more wins than any other NFC North team last year, the Bears outscored their divisional opponents 153-109. That's a differential of 44 points, meaning a +7.3 point average in divisional contests.
While the Lions and Packers made significant additions via free agency and, presumably, through the draft, they were so far behind the top two teams. The Lions were outscored by the other three teams 131-118, while the Packers were outscored 162-110. In fact, the Packers needed late field goals to avoid three double-digit losses and were handled by the Lions, twice.
Of course, the 2018 Bears were a great example of going worst-to-first, losing every divisional game in 2017, with most of them not being particularly close. But the Bears spent most of the 2017 season with a rookie quarterback and made more significant roster additions than any of the NFC North teams,
Here's a quick look at the division.
Best Addition: Irv Smith Jr. The Vikings have some really good offensive players, but they reminded me of the 2014 Bears, who were basically playing 10-on-11 offensively without a decent second tight end or third receiver. Smith gives them another weapon, who should allow them to play big and run the ball.
Biggest Loss: Sheldon Richardson. Playing on a one-year deal, Richardson was second on the team with 20.5 combined quarterback hits and sacks last year.
Tagged: Detroit Lions, Green Bay Packers, Minnesota Vikings, NFC North
Bears Beat Vikings, Solidify First Place in NFC North
I will not do a rapid fire this week because it's 5:39 AM in Paris as I post this. But I will have a game preview (with notes on this game) for Wednesday and Andrew will be live soon enough. The Bears are good. Be excited.
Tagged: Minnesota Vikings, NFC North, Paris
Week 11: Vikings at Bears Game Thread
Maybe my favorite live Chicago Bears experience.
Tagged: Chicago Bears, Devin Aromashodu, Minnesota Vikings
Week 11: Vikings at Bears Game Preview, Volume Three
Both teams abandon their run games early. These are two of the three best run defenses in the game and neither team has been successful running it themselves. (Chicago's stats are skewed by Trubisky's gaudy numbers on the ground, mostly accumulated on broken down plays.) This is a game that will be won through the air and these two passing attacks are pretty evenly matched.
Minnesota will do everything possible to keep Kirk Cousins clean and that means the quick passing game. Tackling will be the key for the Bears secondary because if they tackle well it'll force the Vikings to execute long drives to score points. The longer the drive, the greater turnover potential. And this defense is turning folks over like its the mid-aughts.
This game feels like a close one. And close ones often come down to special teams. Right now there's no way Matt Nagy can send Cody Parkey onto the field and expect a positive result. Will that alter how he calls the game? Doubtful. But it should. The Bears may need to be over-aggressive at big moments to protect their awful kicker.
One of these quarterbacks is going to throw a game-deciding interception. And I think it's going to be Cousins.
Minnesota Vikings 23
Tagged: Minnesota Vikings, Sunday Night Football


Standard curb-side kit of the Elgrand Rider Late Model in the VIP styling.. Body molded in black. Interior molded in gray. Chassis and details molded in black. Chrome rims and trim. Includes both standard and "blacked-out" window parts. Wheels turn and steer after assembly. About 90 parts.


text:
Home News Asia Mongolia's Women are Too Smart and Successful, Have Trouble Finding Suitable Husbands
Mongolia's Women are Too Smart and Successful, Have Trouble Finding Suitable Husbands
Mongolia's ever-growing "reverse gender gap" has resulted in many educated women complaining that there is a shortage of eligible men.
Caused by the efforts of local parents to prioritize investing in their daughters' education over their sons, the phenomenon is almost uniquely Mongolian as it is the complete opposite of what is happening in many patriarchal countries.
The trend has been going on over the last few decades due to parents' belief that women will take better care of them in their old age. Meanwhile, boys are kept at home so they can herd livestock.
Photo via Flickr / Bernd Thaller (CC BY 2.0)
Most women who studied in universities typically choose to stay in the Mongolian capital of Ulaanbaatar to work. While these educated Mongolian women have no problems landing a job, finding a partner is a different story as they far outnumber the educated men in the capital, according to The Guardian.
Based on the country's statistics office, the marriage rate in Ulaanbaatar has fallen from 22.9 per 1,000 people in 2007 to just 8.9 per 1,000 people in 2016.
While having 60,000 more women than men in a city with 1.5 million population may not seem significant statistically, the discrepancy is more apparent in schools and in the workplace.
Usually, the men they encounter in such settings are already taken as almost 40% of men over the age of 15 in urban areas are married compared to only 32% of women.
Since Mongolian women are expected to establish a career and get married before hitting the age of 29, a search for a suitable male partner can be a daunting task.
Zola (not her real name) said she has spent years trying to find a long-term partner. Now 39 years old, the former economist said that she has tried everything from joining dating events and consulting a shaman but nothing has worked so far.
Photo via Flickr / f s (CC BY-ND 2.0)
She also decided to keep her standards low.
"Now I'm thinking he should just care and accept me. I'm not looking for money, or for very good education. He doesn't have to be successful … as long as he is kind, listens and takes care of me. That's all," Zola said.
Others, however, may have a more difficult time adjusting their standards since there is also an ingrained social pressure on women to find a partner who is an equal.
"Young girls are taught they should succeed, then you succeed and there's no equal partner for you. The social pressure is for you to get married but finding an equal partner is very hard," said Mongolian journalist Alimaa Altangerel.
Boldbaatar Tumur, head of the Men's Association in Govisümber province, lamented that the reverse gender gap has resulted in women and men having difficulties relating to one another.
"Women have started to look down on Mongolian men because they have fallen far behind," Tumur explained. "No woman wants to live with an undereducated, impolite man. On the other side, men feel women are looking for men who are wealthier and more educated."
Clubs and bars in Ulaanbaatar have recently made efforts to bridge the gap by holding speed-dating events and partner parties where men and women are reportedly assigned random pairs of numbers. However, with attendees still mostly being women, the hunt for an ideal partner remains a challenge.


i may have made sounds unrecognizable to human hearing. i'm not sure...but can you blame me? look a what came barreling at me while on my walk??!!! penelope, worlds cutest, bestest, puppy. She is an 11 week old mini australian shepherd. she ADORES all humans...and was already trained to follow right beside her mama.
i had a very hard time taking her photo because mostly she just wanted to sit on my feet or be in my lap. not that i was complaining... puppy breath and kisses are my favorite.
penelope you made my month. happy growing up to you... i hope to see you again!!


text:
On Gifts
January 6, 2021 January 6, 2021 smmprincipalEpiphany, gifts, truthLeave a comment
Today is the Feast of the Epiphany, a celebration of religious and cultural significance for Christians around the world. Commemorating the visit of the three kings to the newborn baby Jesus, the traditional gifts of gold, frankincense, and myrrh are symbols of regality worthy of the new king. Historically, we may not know much about these three individuals but we do know the value of making an offering, a gift in recognition of something (or someone) great.
The revelation of something new marks the start of every new year; it signifies a commitment to new behaviors, new motivations, and new realizations. While this tends to take the form of resolutions that are quickly forgotten about by February at best honorable, the true epiphany reminds us about the action of gift giving beyond the material. Consider new ways to give the gift of advice. Forgiveness. Comfort. The spiritual works of mercy are powerful examples of behaviors that are great for any budget: they don't require currency or sacrifice and can be provided without end!
This year, let's make a commitment to give the gift of being authentic and present to our friends and families, but also to the stranger, the neighbor we don't know, and the co-worker we don't agree with. Thinking of "gift" just as a noun does an injustice to the response it demands of us to seek out truth and love wherever it may be. Like the three kings seeking a newborn hidden away in the manger, the journey to live out our values begins with us.
Pieces of Peace
December 16, 2020 January 6, 2021 smmprincipalAdvent, peace, St. FrancisLeave a comment
These days it feels as if there's so much to say, but words continue to fail us. The emotional toll of this year seems to drive everything, or so it feels. We cautiously approach the end of 2020 hoping that by the stroke of midnight on December 31 all will come to a close (or at least we'll wake up from this nightmare). But we should always be vigilant not to let anxiety overwhelm us for God's peace goes beyond our everyday experiences. St. Paul reminds us in Philippians 4:6-7, "Do not worry about anything, but in everything by prayer and supplication with thanksgiving let your requests be made known to God. And the peace of God, which surpasses all understanding, will guard your hearts and your minds in Christ Jesus."
The fourth Sunday of Advent is symbolized by peace, having celebrated hope, love, and joy. Peace itself is often misunderstood as an idyllic tranquility that comes over humanity like a cool breeze; after all, it's the refrain of pacifists and war critics. But that ignores the personal, more inward thrust of what true peace holds for us as individuals. We talk about coming to peace with a loved one or watching a friend pass away peacefully, as if to remind ourselves that it is found in smaller moments of grace in our lives. Peace does not present itself as an overwhelming wave but rather as a droplet in the ocean. The Prayer of St. Francis so many of us are familiar with echoes this sentiment:
"Lord, make me an instrument of your peace
Where there is hatred, let me sow love
Where there is injury, pardon
Where there is doubt, faith
Where there is despair, hope
Where there is darkness, light
And where there is sadness, joy."
When we encounter shadows in our life, we are called to bring light. And this can only happen when we act to better the lives of those around us. Peace reminds us that "and then…" always follows each experience of pain or suffering. Imagine the despair of Mary and Joseph seeking shelter in a hopeless situation, only to bring the Christ child into the world ("and then…"); recall the passion and death of Jesus, only to be outdone by the glory of his resurrection ("and then…"); remember when you yourself suffered and felt there would be no redemption, only to…. ("and then…"). The fragmented nature of our lives means that even peace presents itself in pieces. Fragments still unite to make things whole and complete while allowing the true light of our lives to shine through. Fragmented memories still allow us to reflect on the blessings and grace that continue to envelope us. And as the culminating virtue in life uniting hope, love, and joy in the Advent season, peace is a reminder that it–not injury, doubt, despair, darkness, or sadness–has the final word in our lives.
Triskaidekaphobic Thoughts
November 13, 2020 December 16, 2020 smmprincipalanxiety, COVID-19, fear, hope, numbersLeave a comment
It's a clumsy title, I know. But triskaidekaphobia (fear of the number thirteen) is a bona fide reality for some individuals and communities. Building floors jump from eleven to twelve; city streets avoid a 13th avenue; and even Judas Iscariot, betrayer of Jesus, was believed to be the 13th apostle. But my intention with this post wasn't to discuss fears but to consider how numbers in general can overwhelm, but also empower, our lives.
I've tried to resist writing about the pandemic, but at the same time felt overwhelmed by how it has saturated every aspect of our lives with virtual meetings, socials, and even playgroups. As a somber footnote, today marks eight months since the COVID-19 epidemic impacted our school and the U.S. as a whole (coincidentally enough also on Friday the 13th). It was a time of panic and concern about the unknown with so many asking "what's next?"; in many painfully obvious ways, not much has changed. The number of cases continue to rise as do hospitalizations and deaths from a virus that is indifferent to the destructive path it carves out. At one point 20,000 daily cases felt overwhelming, yet as I write this this we have eclipsed 140,000 daily cases in the U.S. While we know a majority of those who contract the illness will recover there is the lingering mental and economic impact that will likely last for sometime. Simply put, numbers weigh on our shoulders like wet cement, slowly wearing us down while collapsing the very social structures we rely upon.
There is a point where we cognitively disassociate with reality because of this exponential increase; we have no choice. By way of an example, global poverty is expected to rise for the first time in twenty years because of the compounding issues surrounding the pandemic. Still, it is easier to think about the fact that 1 out of 10 people live in extreme poverty (defined as living on less than $2/day) rather than trying to fathom 700 million people. How do you begin to help, or even think about that kind of number? (Spoiler: you can't). We are not wired to process suffering of that magnitude. At its best, we express concern; at its worst, we become numb.
But there is a number that should represent an antidote to these worries: one. One community. One family. One hope. We rightfully recall specific dates like birthdays and anniversaries and recall them with joy and excitement. In the aftermath of a presidential election, we can call to mind the traditional motto, E Pluribus Unum, "one out of many." That even among our struggles, differences, and sometimes competing interests, we are unified in some way. We can help one family member overcome struggle. We can save one person from having a bad day. We can model the Corporal Works of Mercy each day in a way that does not overwhelm us or others. One is a number that we can process, that we can make work. Solidarity embodies the number one. That notion of unifying ourselves together can only improve our outlook on life. It won't magically make pain and suffering dissipate, but it will allow us the mental room to stop and be mindful about the next step in our journey.
Heaven, not Harvard
October 30, 2020 November 13, 2020 smmprincipalexcellence, morals, saints, school, virtueLeave a comment
Students this time of year often begin working on saint reports, studying the likes of Sts. Theresa, Rita, and Michael, among many others. The recent beatification of Bl. Carlo Acutis reminds us that individuals of this title. In the Catholic realm of heroes and heroines, saints are often misunderstood as an untouchable league of perfection of uncompromising virtue and valor; they're not. They serve as imperfect models of perfect grace which should serve as a teaching moment to build habits of excellence. In turn, our goal as educators and parents is to prepare our youth for their ultimate reward: heaven.
At the same time some are working on these saint reports, others are drafting their response to the perennial academic dilemma and proverbial gateway to higher education: the college essay. You are subtly asked to be creative but not verbose; erudite but not simplistic; proud but not boastful; and all the while, be sure to tell the truth. Our societal push for students to get great grades to attend great schools so that they can have a great career feels like it starts earlier and earlier in life. Sure, values and morals are important to teach but high test scores are the real benchmark of one's worthiness, right? Competitiveness may be its own virtue in American society, but the real struggle is within ourselves.
Don't get me wrong. I have nothing against being a high achiever; after all, I am one. And striving for moral and academic excellence are certainly not mutually exclusive goals. But the artificial pressure put on children to be scholars before saints can risk putting the emphasis on the wrong syll-A-ble. Higher rates of anxiety, depression, and social alienation speak to this changing landscape. We need more people to strive for moral excellence but not confuse it with some ethereal plane of perfection.
Encourage children to major in relationships with a minor in friendship; build community with their peers; and be able to model better choices in a world that lacks models of virtue. In doing so, we will witness greater authenticity as a natural outgrowth of taking ownership for one's actions. Getting into Harvard is easy compared to all that.
(Re)imagining Reality
October 23, 2020 October 29, 2020 smmprincipalreality, reimagine, renewalLeave a comment
I recently participated in a virtual EdCamp for school leaders where we were asked to think of a "re" word that described our experience at the start of the school year: reboot, reexamine, rework, renew, etc. And it became abundantly clear to me that we have all been forced to participate in this same exercise of doing things "again" but by thinking and acting differently. I find myself in the act of revisiting everything from health and hygiene, to supporting faculty, to fostering community for students, to creating normalcy in abnormal circumstances. In short, I feel like we are experiencing reality in a uniquely different way. Reimagining.
Two examples, one historical and another personal, illustrate this thinking of mine. In 1515, the Jesuit missionary Matteo Ricci traveled from Italy to China in what would be a watershed moment on a number of levels. As the first westerner welcomed into the Emperor's imperial court, Ricci had to adapt his European customs to meet what was expected of him as a foreigner. He had to meet the East where they were and suspend his way of seeing the world through the eyes of the West. In doing so, he not only helped author numerous Chinese maps and math curricula, he helped bridge what were once considered different cultural worlds. Revisiting.
A few years ago, Santa brought my son Gabriel a Lego Star Wars ship that was over 1,500 pieces with strict instructions not to break it apart (cf., the ending of The LEGO Movie). Of course, ignoring Santa's letter he proceeded to slowly dismantle the ship and it became a joke between us that he'd never get one like it. Fast forward to a few months ago when Gabriel told me he was going to try to reassemble the ship from his collection of (no lie) thousands of Lego pieces rebuilding from scratch. Reconstructing.
We should never accept the notion that redoing something is a sign of defeat or failure. Rather it represents the very fabric of who we are as moral beings. Skills, habits, and customs are not innate operations that we are born with; they are learned through trial and errors. Embrace the opportunity to reimagine your own reality: careers, relationships, feelings. It doesn't have to necessarily lead to changing anything or jettisoning your beliefs or commitments. But it should give you solace to know that we are always able to renew ourselves and it doesn't cost us anything!
The Irreconcilable Paradox
October 2, 2020 October 23, 2020 smmprincipalparadox, psychology, Taoism, yang, yinLeave a comment
Around this time of year I relish the gradual change of seasons to a cool and crisp autumn. It's my favorite season but there's nothing special in saying that; it's entirely subjective. We call weather "bad" when it's rainy or too windy and remark how "nice" it is when the sun finally makes an appearance after a long stretch of storms. We usually desire the opposite of what we're experiencing, e.g., during a harsh winter we like to imagine being in a tropical setting.
Emotional states are not entirely different in that we often yearn for the weekend come or try to convince ourselves that we'll feel better once we get past a difficult patch in our lives. The phrase "once [insert event] is over" is how all too many thoughts begin. And yet it makes sense given the fact our minds have evolved to redirect our feelings to a natural equilibrium of calm and familiarity. Psychologists would see this as our natural bias to rationalize or believe certain things while being unwilling to change or adjust our mindset out of a sense of self-preservation. The current pandemic provides a cultural crucible to meld conflicting beliefs about what we were used to and what we struggle with and how so much suffering comes from this desire to "return to normal."
One aspect of this normalcy is that we are drawn to people like us and ideas like ours; in short, similarity breeds familiarity. But in our minds, hearts, and neighborhoods, we struggle with the conflict that is an irreconcilable paradox, a tension that reflects a more authentic appreciation for differences and one could say life itself. In the Western world we tend to eschew conflicting or clashing beliefs or desires, ignoring dualities of good/bad, light/dark, joy/pain. A common symbol in Asian philosophy, the yin-yang, represents harmony coming from seeing these binaries as one: not avoiding pain in the search for pleasure or desiring warmth in the cold, for example.
So while this wording of irreconcilable paradox may be mouthy or too philosophical or just straight up confusing, it is a call to remember that life does not present us with clear objective realities. This is another reminder to be mindful of joy when we experience joy and pain when we experience pain. Fight against the tendency to avoid one for the other or to hold onto another emotion as if that's possible. Embrace the paradox of life and find the real bliss of life!
New Spirit Animal
September 14, 2020 October 2, 2020 smmprincipaladaptability, perspective, resilience, tardigradesLeave a comment
At some point you may have been asked, "What's your spirit animal?" Many of us have engaged in this game of totemism whereby you associate your personality with the likeness of an animal. An eagle may symbolize wisdom while a penguin could be associated with loyalty, for example. For some time, I've identified with sloths as my animal spirit with their seemingly permanent smile, kind disposition, and blasé demeanor; but I digress. Another "animal" has recently risen to the top for me and in many ways reflects the human characteristics needed to endure struggles, overcome hardship, and evolve continuously: tardigrades.
Also known as "water bears," tardigrades are microscopic and, admittedly, not very cuddly. They belong to a group of organisms known as extremophiles, known for their ability to survive in extreme conditions and have attracted quite a pop cultural following. While this post isn't meant to be a bad microbiology lesson, there are definitive values to be drawn from this fascinating species:
Resilience: As a species, we are uniquely gifted with the ability to anticipate the future and plan accordingly. Yet we often struggle with the emotional toll of negative media, caustic relationships, and mental duress. Being resilient doesn't mean avoiding pain or pressure but calls on us to recognize the strength in our vulnerability and the need to embrace a growth mindset that is open to change. With more workplace gurus citing the need to search for resilience, it's important to make this value a priority in our lives.
Adaptability: While we may have cornered the market on social adaptations in terms of neighborhoods and cities, we still force the square peg into the proverbial round hold by making our environment conform to our needs, as opposed to the reverse (e.g., the advent of heating and air conditioning). The (over?) use of the term "pivot" lately speaks to the need for adaptability and how we must be positioned to react rather than plan. This can be unsettling for some but it helps rewire our brains to embrace change, rather than actively resist it, and actually allows us to be calmer and more focused by realizing change is the universal constant.
Perspective: This requires a bit of cosmic humility. The theologian John Haught has written extensively on Catholic theology and evolution and uses the analogy of book chapters to frame the age of our universe (and our infinitesimal place!): if 13.8 billion years of the universe was a set of 30 volumes of 450 pages each, humanity wouldn't appear until the last page or so of the final chapter! Factor in our tendency to equate size/ magnitude with strength/longevity and you see that we are blind to so many examples in the natural world that do not conform to our expectations. (After all, how could a .01 inch organism survive multiple catastrophic disasters over the course of millions of years?!) This sobering fact should give us all pause about the arc of life in the universe but also serve as another reminder of our interdependency upon one another and how we have been privileged to live at this time and in this place.
These three values are nothing new to us. But our ability to find examples of them sometimes needs to be refreshed. The human species may never be able to go for three decades without food or water, live in a volcano, or withstand the vacuum of space on our own like our friends the tardigrades, but we can still take away invaluable life lessons from this unlikely new spirit animal.
The Good Ol' Days
September 3, 2020 September 17, 2020 smmprincipalchildhood, grace, mindful, present, timeLeave a comment
We all romanticize the past. The way things were and the people we knew were second to none. Children today "don't know what it was like" to live when we were younger. Undoubtedly, older days were simply better days. And yet when we see children today against the backdrop of global turmoil and an epidemic that has led to nothing short of an existential crisis for many adults, we forget to remind ourselves that for them the good ol' days are now. Today. Not eventually or at some point. Now.
The philosopher and mathematician Blaise Pascal wrote a collection of reflections in his work Pensées (French for "thoughts" or "reflections"). Written as a form of Christian apologetics, he explores humanist and theological concepts including our perception of time itself. In one of his more poignant lines he writes:
"We never keep to the present. We recall the past. We anticipate the future as if we found it too slow in coming and were trying to hurry it up, or we recall the past as if to stay its too rapid flight. We are so unwise that we wander about in times that do not belong to us, and do not think of the only one that does…"
I often think of my own parents and childhood at the start of every school year, my own "wander about in times." My father worked for the airline industry and my mother was a homemaker and worked in the food industry when me and my three brothers were all in school. They put the four of us through a combined 52 years of Catholic education. I often joke with parents that they believed in two things growing up: braces and Catholic education. As if a good smile and the sacraments were all you needed; in many respects, they were right.
But during my childhood, I never lacked necessities. We certainly weren't what you would consider upper class or affluent but you'd never know it from our childhood and our "good ol' days." One of the graces of childhood is being immune to the worries and struggles your parents endure: making ends meet, mounting bills, and general parental anxieties. Only now as I raise my own boys can I experience this reality, that my worries and concerns are not theirs nor should they be. Their "good ol' days" are now.
These days, it's all too easy (and yet completely understandable) to recall a better past time when faced with so much uncertainty, confusion, and pain. But in working (dare I say fighting) to be more mindful of the present we retrain our mind to be calmer, focused, and quite frankly, happier. Mental pain stems more from our inability to be mindful than it does from the present itself. The way we allow ourselves to be comforted by a familiar past or in the perception of a joyful unknown future is the source of our anguish. By recognizing the glimmer that shines in even the murkiest of waters we remind ourselves of the overflowing grace that surrounds us at all times.
August 28, 2020 September 3, 2020 smmprincipalCOVID-19, hope, St. Augustine2 Comments
Today marks the feast day of St. Augustine, one of the early Church fathers and a prolific theologian who composed Confessions, often regarded as the first autobiography. In a quote often attributed to him (but in the spirit of academic honesty difficult to verify) he writes, "Hope has two beautiful daughters. Their names are anger and courage; anger at the way things are, and courage to see that they do not remain the way they are."
The past several months have been marked by anguish, struggle, and change. I have felt anger and courage during this time in a seemingly endless cycle, a paradox of sorts. Policies changing daily; protocols varying across institutions; and a dramatic increase in tentatively worded communications. In short, nothing about planning for schools to reopen has been easy yet everything about the end goal of the process has been worth it. In our culture, hope can often be relegated to fantasy or wishing. But in the theological sense it stands as an infused virtue, a grace bestowed upon human beings as a moral compass which leads us toward new life rather than an abyss of anger and confusion.
As we enter this new school year, we are ever mindful of the constant that is change and the need to embrace hope as the eternal guiding light in our lives. We pray for the safety and well-being of everyone in our community and beyond. The COVID-19 epidemic hasn't just disrupted our lives; it was unwoven the very fabric of society. And there is no exaggeration in writing that. But as Catholics who believe in the true incarnation, we recognize that hope will always appear naive to the outsider. To those who know, hope is what has always guided our hearts to be still regardless of whatever raging tempest stirs in our world.
Sacrifice is Love
April 2, 2020 August 29, 2020 smmprincipalEaster, love, sacrifice, TriduumLeave a comment
"I don't know." There may have never been a time when the entire globe felt the same way. We don't know what to make of empty storefronts, masked neighbors, and an uncertain economic future. We want to know when it will end, when normalcy will return. We simply don't know.
But I know what I know. I know that we need family and friends to thrive. I know we don't need much to survive when food, water, shelter, and clothing are available. I know our psychological well-being is essential to remember that this is all we need. Most of us are encountering a radical confrontation with (and consequent shattering of) privilege; namely, the expectation that our wants will always be met on our timeline. The other day at the grocery store, they only had 2% milk available. Privilege. I have a house large enough to shelter my mother-in-law, wife, two boys, and dog. Privilege. I am trying to donate more to my parish. Privilege. I can't physically visit with colleagues, friends, and other family members but instead call, video chat, and otherwise socialize online. Privilege. Being aware of this creates the space in our hearts and minds to allow for greater sacrifices as acts of love.
The sacrifice we are all enduring is an appropriate act given our commemoration of Jesus' entry into Jerusalem, marking the start of Holy Week. Symbolically, this marks the beginning of the (penultimate) end. The sorrow of Good Friday leads to the patience of Holy Saturday only to be transformed by the grace of Easter Sunday. The darkness always passes by just as grace appears to be fleeting. It is the waiting that is most difficult. But in remembering the loving nature of our individual and collective sacrifices, we can all the more appreciate the warmth that Sunday morning will bring to us.