text:
package com.android.internal.telephony;

import static com.android.internal.telephony.RILConstants.*;

import android.content.Context;
import android.os.AsyncResult;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.os.Parcel;
import android.os.Registrant;
import android.text.TextUtils;
import android.telephony.Rlog;

import android.telephony.PhoneNumberUtils;

import java.util.ArrayList;

public class SamsungExynos4RIL extends RIL implements CommandsInterface {

    //SAMSUNG STATES
    static final int RIL_REQUEST_GET_CELL_BROADCAST_CONFIG = 10002;

    static final int RIL_REQUEST_SEND_ENCODED_USSD = 10005;
    static final int RIL_REQUEST_SET_PDA_MEMORY_STATUS = 10006;
    static final int RIL_REQUEST_GET_PHONEBOOK_STORAGE_INFO = 10007;
    static final int RIL_REQUEST_GET_PHONEBOOK_ENTRY = 10008;
    static final int RIL_REQUEST_ACCESS_PHONEBOOK_ENTRY = 10009;
    static final int RIL_REQUEST_DIAL_VIDEO_CALL = 10010;
    static final int RIL_REQUEST_CALL_DEFLECTION = 10011;
    static final int RIL_REQUEST_READ_SMS_FROM_SIM = 10012;
    static final int RIL_REQUEST_USIM_PB_CAPA = 10013;
    static final int RIL_REQUEST_LOCK_INFO = 10014;

    static final int RIL_REQUEST_DIAL_EMERGENCY = 10016;
    static final int RIL_REQUEST_GET_STOREAD_MSG_COUNT = 10017;
    static final int RIL_REQUEST_STK_SIM_INIT_EVENT = 10018;
    static final int RIL_REQUEST_GET_LINE_ID = 10019;
    static final int RIL_REQUEST_SET_LINE_ID = 10020;
    static final int RIL_REQUEST_GET_SERIAL_NUMBER = 10021;
    static final int RIL_REQUEST_GET_MANUFACTURE_DATE_NUMBER = 10022;
    static final int RIL_REQUEST_GET_BARCODE_NUMBER = 10023;
    static final int RIL_REQUEST_UICC_GBA_AUTHENTICATE_BOOTSTRAP = 10024;
    static final int RIL_REQUEST_UICC_GBA_AUTHENTICATE_NAF = 10025;
    static final int RIL_REQUEST_SIM_TRANSMIT_BASIC = 10026;
    static final int RIL_REQUEST_SIM_OPEN_CHANNEL = 10027;
    static final int RIL_REQUEST_SIM_CLOSE_CHANNEL = 10028;
    static final int RIL_REQUEST_SIM_TRANSMIT_CHANNEL = 10029;
    static final int RIL_REQUEST_SIM_AUTH = 10030;
    static final int RIL_REQUEST_PS_ATTACH = 10031;
    static final int RIL_REQUEST_PS_DETACH = 10032;
    static final int RIL_REQUEST_ACTIVATE_DATA_CALL = 10033;
    static final int RIL_REQUEST_CHANGE_SIM_PERSO = 10034;
    static final int RIL_REQUEST_ENTER_SIM_PERSO = 10035;
    static final int RIL_REQUEST_GET_TIME_INFO = 10036;
    static final int RIL_REQUEST_OMADM_SETUP_SESSION = 10037;
    static final int RIL_REQUEST_OMADM_SERVER_START_SESSION = 10038;
    static final int RIL_REQUEST_OMADM_CLIENT_START_SESSION = 10039;
    static final int RIL_REQUEST_OMADM_SEND_DATA = 10040;
    static final int RIL_REQUEST_CDMA_GET_DATAPROFILE = 10041;
    static final int RIL_REQUEST_CDMA_SET_DATAPROFILE = 10042;
    static final int RIL_REQUEST_CDMA_GET_SYSTEMPROPERTIES = 10043;
    static final int RIL_REQUEST_CDMA_SET_SYSTEMPROPERTIES = 10044;
    static final int RIL_REQUEST_SEND_SMS_COUNT = 10045;
    static final int RIL_REQUEST_SEND_SMS_MSG = 10046;
    static final int RIL_REQUEST_SEND_SMS_MSG_READ_STATUS = 10047;
    static final int RIL_REQUEST_MODEM_HANGUP = 10048;
    static final int RIL_REQUEST_SET_SIM_POWER = 10049;
    static final int RIL_REQUEST_SET_PREFERRED_NETWORK_LIST = 10050;
    static final int RIL_REQUEST_GET_PREFERRED_NETWORK_LIST = 10051;
    static final int RIL_REQUEST_HANGUP_VT = 10052;

    static final int RIL_UNSOL_RELEASE_COMPLETE_MESSAGE = 11001;
    static final int RIL_UNSOL_STK_SEND_SMS_RESULT = 11002;
    static final int RIL_UNSOL_STK_CALL_CONTROL_RESULT = 11003;
    static final int RIL_UNSOL_DUN_CALL_STATUS = 11004;

    static final int RIL_UNSOL_O2_HOME_ZONE_INFO = 11007;
    static final int RIL_UNSOL_DEVICE_READY_NOTI = 11008;
    static final int RIL_UNSOL_GPS_NOTI = 11009;
    static final int RIL_UNSOL_AM = 11010;
    static final int RIL_UNSOL_DUN_PIN_CONTROL_SIGNAL = 11011;
    static final int RIL_UNSOL_DATA_SUSPEND_RESUME = 11012;
    static final int RIL_UNSOL_SAP = 11013;

    static final int RIL_UNSOL_SIM_SMS_STORAGE_AVAILALE = 11015;
    static final int RIL_UNSOL_HSDPA_STATE_CHANGED = 11016;
    static final int RIL_UNSOL_WB_AMR_STATE = 11017;
    static final int RIL_UNSOL_TWO_MIC_STATE = 11018;
    static final int RIL_UNSOL_DHA_STATE = 11019;
    static final int RIL_UNSOL_UART = 11020;
    static final int RIL_UNSOL_RESPONSE_HANDOVER = 11021;
    static final int RIL_UNSOL_IPV6_ADDR = 11022;
    static final int RIL_UNSOL_NWK_INIT_DISC_REQUEST = 11023;
    static final int RIL_UNSOL_RTS_INDICATION = 11024;
    static final int RIL_UNSOL_OMADM_SEND_DATA = 11025;
    static final int RIL_UNSOL_DUN = 11026;
    static final int RIL_UNSOL_SYSTEM_REBOOT = 11027;
    static final int RIL_UNSOL_VOICE_PRIVACY_CHANGED = 11028;
    static final int RIL_UNSOL_UTS_GETSMSCOUNT = 11029;
    static final int RIL_UNSOL_UTS_GETSMSMSG = 11030;
    static final int RIL_UNSOL_UTS_GET_UNREAD_SMS_STATUS = 11031;
    static final int RIL_UNSOL_MIP_CONNECT_STATUS = 11032;

    private Object mCatProCmdBuffer;

    public SamsungExynos4RIL(Context context, int networkMode, int cdmaSubscription) {
        super(context, networkMode, cdmaSubscription);
    }

    public SamsungExynos4RIL(Context context, int networkMode, int cdmaSubscription, Integer instanceID) {
         super(context, networkMode, cdmaSubscription, instanceID);
    }

    static String
    requestToString(int request) {
        switch (request) {
            case RIL_REQUEST_DIAL_EMERGENCY: return "DIAL_EMERGENCY";
            default: return RIL.requestToString(request);
        }
    }

    @Override
    protected RILRequest processSolicited (Parcel p) {
        int serial, error;
        boolean found = false;

        serial = p.readInt();
        error = p.readInt();

        RILRequest rr;

        rr = findAndRemoveRequestFromList(serial);

        if (rr == null) {
            Rlog.w(RILJ_LOG_TAG, "Unexpected solicited response! sn: "
                            + serial + " error: " + error);
            return null;
        }

        Object ret = null;

        if (error == 0 || p.dataAvail() > 0) {
            // either command succeeds or command fails but with data payload
            try {switch (rr.mRequest) {
            /*
 cat libs/telephony/ril_commands.h \
 | egrep "^ *{RIL_" \
 | sed -re 's/\{([^,]+),[^,]+,([^}]+).+/case \1: ret = \2(p); break;/'
             */
            case RIL_REQUEST_GET_SIM_STATUS: ret =  responseIccCardStatus(p); break;
            case RIL_REQUEST_ENTER_SIM_PIN: ret =  responseInts(p); break;
            case RIL_REQUEST_ENTER_SIM_PUK: ret =  responseInts(p); break;
            case RIL_REQUEST_ENTER_SIM_PIN2: ret =  responseInts(p); break;
            case RIL_REQUEST_ENTER_SIM_PUK2: ret =  responseInts(p); break;
            case RIL_REQUEST_CHANGE_SIM_PIN: ret =  responseInts(p); break;
            case RIL_REQUEST_CHANGE_SIM_PIN2: ret =  responseInts(p); break;
            case RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE: ret =  responseInts(p); break;
            case RIL_REQUEST_GET_CURRENT_CALLS: ret =  responseCallList(p); break;
            case RIL_REQUEST_DIAL: ret =  responseVoid(p); break;
            case RIL_REQUEST_DIAL_EMERGENCY: ret =  responseVoid(p); break;
            case RIL_REQUEST_GET_IMSI: ret =  responseString(p); break;
            case RIL_REQUEST_HANGUP: ret =  responseVoid(p); break;
            case RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND: ret =  responseVoid(p); break;
            case RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND: {
                if (mTestingEmergencyCall.getAndSet(false)) {
                    if (mEmergencyCallbackModeRegistrant != null) {
                        riljLog("testing emergency call, notify ECM Registrants");
                        mEmergencyCallbackModeRegistrant.notifyRegistrant();
                    }
                }
                ret =  responseVoid(p);
                break;
            }
            case RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE: ret =  responseVoid(p); break;
            case RIL_REQUEST_CONFERENCE: ret =  responseVoid(p); break;
            case RIL_REQUEST_UDUB: ret =  responseVoid(p); break;
            case RIL_REQUEST_LAST_CALL_FAIL_CAUSE: ret =  responseInts(p); break;
            case RIL_REQUEST_SIGNAL_STRENGTH: ret =  responseSignalStrength(p); break;
            case RIL_REQUEST_VOICE_REGISTRATION_STATE: ret =  responseStrings(p); break;
            case RIL_REQUEST_DATA_REGISTRATION_STATE: ret =  responseStrings(p); break;
            case RIL_REQUEST_OPERATOR: ret =  responseStrings(p); break;
            case RIL_REQUEST_RADIO_POWER: ret =  responseVoid(p); break;
            case RIL_REQUEST_DTMF: ret =  responseVoid(p); break;
            case RIL_REQUEST_SEND_SMS: ret =  responseSMS(p); break;
            case RIL_REQUEST_SEND_SMS_EXPECT_MORE: ret =  responseSMS(p); break;
            case RIL_REQUEST_SETUP_DATA_CALL: ret =  responseSetupDataCall(p); break;
            case RIL_REQUEST_SIM_IO: ret =  responseICC_IO(p); break;
            case RIL_REQUEST_SEND_USSD: ret =  responseVoid(p); break;
            case RIL_REQUEST_CANCEL_USSD: ret =  responseVoid(p); break;
            case RIL_REQUEST_GET_CLIR: ret =  responseInts(p); break;
            case RIL_REQUEST_SET_CLIR: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_CALL_FORWARD_STATUS: ret =  responseCallForward(p); break;
            case RIL_REQUEST_SET_CALL_FORWARD: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_CALL_WAITING: ret =  responseInts(p); break;
            case RIL_REQUEST_SET_CALL_WAITING: ret =  responseVoid(p); break;
            case RIL_REQUEST_SMS_ACKNOWLEDGE: ret =  responseVoid(p); break;
            case RIL_REQUEST_GET_IMEI: ret =  responseString(p); break;
            case RIL_REQUEST_GET_IMEISV: ret =  responseString(p); break;
            case RIL_REQUEST_ANSWER: ret =  responseVoid(p); break;
            case RIL_REQUEST_DEACTIVATE_DATA_CALL: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_FACILITY_LOCK: ret =  responseInts(p); break;
            case RIL_REQUEST_SET_FACILITY_LOCK: ret =  responseInts(p); break;
            case RIL_REQUEST_CHANGE_BARRING_PASSWORD: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE: ret =  responseInts(p); break;
            case RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC: ret =  responseVoid(p); break;
            case RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_AVAILABLE_NETWORKS : ret =  responseOperatorInfos(p); break;
            case RIL_REQUEST_DTMF_START: ret =  responseVoid(p); break;
            case RIL_REQUEST_DTMF_STOP: ret =  responseVoid(p); break;
            case RIL_REQUEST_BASEBAND_VERSION: ret =  responseString(p); break;
            case RIL_REQUEST_SEPARATE_CONNECTION: ret =  responseVoid(p); break;
            case RIL_REQUEST_SET_MUTE: ret =  responseVoid(p); break;
            case RIL_REQUEST_GET_MUTE: ret =  responseInts(p); break;
            case RIL_REQUEST_QUERY_CLIP: ret =  responseInts(p); break;
            case RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE: ret =  responseInts(p); break;
            case RIL_REQUEST_DATA_CALL_LIST: ret =  responseDataCallList(p); break;
            case RIL_REQUEST_RESET_RADIO: ret =  responseVoid(p); break;
            case RIL_REQUEST_OEM_HOOK_RAW: ret =  responseRaw(p); break;
            case RIL_REQUEST_OEM_HOOK_STRINGS: ret =  responseStrings(p); break;
            case RIL_REQUEST_SCREEN_STATE: ret =  responseVoid(p); break;
            case RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION: ret =  responseVoid(p); break;
            case RIL_REQUEST_WRITE_SMS_TO_SIM: ret =  responseInts(p); break;
            case RIL_REQUEST_DELETE_SMS_ON_SIM: ret =  responseVoid(p); break;
            case RIL_REQUEST_SET_BAND_MODE: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE: ret =  responseInts(p); break;
            case RIL_REQUEST_STK_GET_PROFILE: ret =  responseString(p); break;
            case RIL_REQUEST_STK_SET_PROFILE: ret =  responseVoid(p); break;
            case RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: ret =  responseString(p); break;
            case RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE: ret =  responseVoid(p); break;
            case RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM: ret =  responseInts(p); break;
            case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: ret =  responseVoid(p); break;
            case RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE: ret =  responseVoid(p); break;
            case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret =  responseGetPreferredNetworkType(p); break;
            case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: ret = responseCellList(p); break;
            case RIL_REQUEST_SET_LOCATION_UPDATES: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE: ret =  responseInts(p); break;
            case RIL_REQUEST_SET_TTY_MODE: ret =  responseVoid(p); break;
            case RIL_REQUEST_QUERY_TTY_MODE: ret =  responseInts(p); break;
            case RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE: ret =  responseInts(p); break;
            case RIL_REQUEST_CDMA_FLASH: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_BURST_DTMF: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_SEND_SMS: ret =  responseSMS(p); break;
            case RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE: ret =  responseVoid(p); break;
            case RIL_REQUEST_GSM_GET_BROADCAST_CONFIG: ret =  responseGmsBroadcastConfig(p); break;
            case RIL_REQUEST_GSM_SET_BROADCAST_CONFIG: ret =  responseVoid(p); break;
            case RIL_REQUEST_GSM_BROADCAST_ACTIVATION: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG: ret =  responseCdmaBroadcastConfig(p); break;
            case RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_BROADCAST_ACTIVATION: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY: ret =  responseVoid(p); break;
            case RIL_REQUEST_CDMA_SUBSCRIPTION: ret =  responseStrings(p); break;
            case RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM: ret =  responseInts(p); break;
            case RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM: ret =  responseVoid(p); break;
            case RIL_REQUEST_DEVICE_IDENTITY: ret =  responseStrings(p); break;
            case RIL_REQUEST_GET_SMSC_ADDRESS: ret = responseString(p); break;
            case RIL_REQUEST_SET_SMSC_ADDRESS: ret = responseVoid(p); break;
            case RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE: ret = responseVoid(p); break;
            case RIL_REQUEST_REPORT_SMS_MEMORY_STATUS: ret = responseVoid(p); break;
            case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING: ret = responseVoid(p); break;
            case RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE: ret =  responseInts(p); break;
            case RIL_REQUEST_ISIM_AUTHENTICATION: ret =  responseString(p); break;
            case RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU: ret = responseVoid(p); break;
            case RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS: ret = responseICC_IO(p); break;
            case RIL_REQUEST_VOICE_RADIO_TECH: ret = responseInts(p); break;
            default:
                throw new RuntimeException("Unrecognized solicited response: " + rr.mRequest);
            //break;
            }} catch (Throwable tr) {
                // Exceptions here usually mean invalid RIL responses

                Rlog.w(RILJ_LOG_TAG, rr.serialString() + "< "
                        + requestToString(rr.mRequest)
                        + " exception, possible invalid RIL response", tr);

                if (rr.mResult != null) {
                    AsyncResult.forMessage(rr.mResult, null, tr);
                    rr.mResult.sendToTarget();
                }
                return rr;
            }
        }

        // Here and below fake RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, see b/7255789.
        // This is needed otherwise we don't automatically transition to the main lock
        // screen when the pin or puk is entered incorrectly.
        switch (rr.mRequest) {
            case RIL_REQUEST_ENTER_SIM_PUK:
            case RIL_REQUEST_ENTER_SIM_PUK2:
                if (mIccStatusChangedRegistrants != null) {
                    if (RILJ_LOGD) {
                        riljLog("ON enter sim puk fakeSimStatusChanged: reg count="
                                + mIccStatusChangedRegistrants.size());
                    }
                    mIccStatusChangedRegistrants.notifyRegistrants();
                }
                break;
        }

        if (error != 0) {
            switch (rr.mRequest) {
                case RIL_REQUEST_ENTER_SIM_PIN:
                case RIL_REQUEST_ENTER_SIM_PIN2:
                case RIL_REQUEST_CHANGE_SIM_PIN:
                case RIL_REQUEST_CHANGE_SIM_PIN2:
                case RIL_REQUEST_SET_FACILITY_LOCK:
                    if (mIccStatusChangedRegistrants != null) {
                        if (RILJ_LOGD) {
                            riljLog("ON some errors fakeSimStatusChanged: reg count="
                                    + mIccStatusChangedRegistrants.size());
                        }
                        mIccStatusChangedRegistrants.notifyRegistrants();
                    }
                    break;
            }

            rr.onError(error, ret);
            return rr;
        }

        if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest)
            + " " + retToString(rr.mRequest, ret));

        if (rr.mResult != null) {
            AsyncResult.forMessage(rr.mResult, ret, null);
            rr.mResult.sendToTarget();
        }

        return rr;
    }

    @Override
    public void
    dial(String address, int clirMode, UUSInfo uusInfo, Message result) {
        RILRequest rr;
        if (PhoneNumberUtils.isEmergencyNumber(address)) {
            dialEmergencyCall(address, clirMode, result);
            return;
        }

        rr = RILRequest.obtain(RIL_REQUEST_DIAL, result);
        rr.mParcel.writeString(address);
        rr.mParcel.writeInt(clirMode);

        if (uusInfo == null) {
            rr.mParcel.writeInt(0); // UUS information is absent
        } else {
            rr.mParcel.writeInt(1); // UUS information is present
            rr.mParcel.writeInt(uusInfo.getType());
            rr.mParcel.writeInt(uusInfo.getDcs());
            rr.mParcel.writeByteArray(uusInfo.getUserData());
        }

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        send(rr);
    }

    public void
    dialEmergencyCall(String address, int clirMode, Message result) {
        RILRequest rr;
        Rlog.v(RILJ_LOG_TAG, "Emergency dial: " + address);

        rr = RILRequest.obtain(RIL_REQUEST_DIAL_EMERGENCY, result);
        rr.mParcel.writeString(address + "/");
        rr.mParcel.writeInt(clirMode);
        rr.mParcel.writeInt(0);  // UUS information is absent

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        send(rr);
    }

    @Override
    protected void
    processUnsolicited (Parcel p) {
        int dataPosition = p.dataPosition();
        int response = p.readInt();

        switch(response) {
            case RIL_UNSOL_STK_PROACTIVE_COMMAND:
                Object ret = responseString(p);
                if (RILJ_LOGD) unsljLogRet(response, ret);

                if (mCatProCmdRegistrant != null) {
                    mCatProCmdRegistrant.notifyRegistrant(
                            new AsyncResult (null, ret, null));
                } else {
                    // The RIL will send a CAT proactive command before the
                    // registrant is registered. Buffer it to make sure it
                    // does not get ignored (and breaks CatService).
                    mCatProCmdBuffer = ret;
                }
                break;

            default:
                // Rewind the Parcel
                p.setDataPosition(dataPosition);

                // Forward responses that we are not overriding to the super class
                super.processUnsolicited(p);
                return;
        }

    }

    @Override
    public void setOnCatProactiveCmd(Handler h, int what, Object obj) {
        mCatProCmdRegistrant = new Registrant (h, what, obj);
        if (mCatProCmdBuffer != null) {
            mCatProCmdRegistrant.notifyRegistrant(
                                new AsyncResult (null, mCatProCmdBuffer, null));
            mCatProCmdBuffer = null;
        }
    }

}


text:
package com.github.commons.security;

import junit.framework.Assert;

import org.junit.Test;

import com.github.commons.security.constants.EncryptType;
import com.github.commons.security.constants.SecPolicy;

/**
 * SignToolsTest.java
 *
 * @author zhouxiaofeng 3/19/15
 */
public class SignToolsTest {

    private final String plaintext = "this is a test.";

    private final String signCode  = "WQEPN0nIty/2b9PB+uy3kAovCNVJ83XAkC9oh3R46R4iqQjpJhcePe5vngWDcs7WrqaXoTfthv7ctA1J\n"
                                     + "OA3mM+QiFVGgSRLmlzgCgq6bBGR48R5vIsel3NP/kbbRHeBTzt04/vV8bW8lIns9TT7lkqh26+oM\n"
                                     + "G5S6F83/UCN2fB7NkdM=";

    private final String xsignCode = "WQEPR4rMx}36f=TF/y}7oEszGRZN<7\\EoG=sl7V8:V8muUntNlgiTi9zrk[Hgw;[vue\\sXjxlz;gxE5N\u000ESE7qQ/UmJZKkWVPqp~kGku:fFKV8<V9zMwip7RT3offVLiFX~x483zZ<f[<pMrw=XX;poul6:/sQ\u000EK9W:J<73YGR6jF;RohQA";

    @Test
    public void testSign() throws ClassNotFoundException, IllegalAccessException, InstantiationException {

        SignToolsFacade tools = new SignToolsFacade("test-code", SecPolicy.LOCAL, 1);

        String sign = tools.sign(plaintext, EncryptType.RSA);

        System.out.println(sign);

        Assert.assertEquals(sign, signCode);

        Assert.assertTrue(tools.validateSign(plaintext, sign, EncryptType.RSA));

    }

    @Test
    public void testXSign() throws ClassNotFoundException, IllegalAccessException, InstantiationException {

        SignToolsFacade tools = new SignToolsFacade("test-code", SecPolicy.LOCAL, 1);

        String sign = tools.sign(plaintext, EncryptType.XRSA);

        System.out.println(sign);

        System.out.println(xsignCode);

        Assert.assertEquals(sign, xsignCode);

        Assert.assertTrue(tools.validateSign(plaintext, sign, EncryptType.XRSA));

    }
}

redpajama_set_name: RedPajamaGithub


text:
using RabbitMQ.Client;
using Serilog;
using Thinktecture.Relay.Server.Config;

namespace Thinktecture.Relay.Server.Communication.RabbitMq
{
	internal class RabbitMqAcknowledgeChannel : RabbitMqChannelBase<IAcknowledgeRequest, AcknowledgeRequest>
	{
		public RabbitMqAcknowledgeChannel(ILogger logger, IConnection connection, IConfiguration configuration, string exchange, string channelId, string queuePrefix)
			: base(logger, connection, configuration, exchange, channelId, queuePrefix)
		{
		}
	}
}


text:
__version__ = '0.1'

import PgDumpLoader

def load_database_schema(dump_file_name, ignore_slony_triggers=False):
    PgDumpLoader.load_database_schema(dump_file_name, ignore_slony_triggers)


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
ServiceAuthorizationManager (Facebook's realtime distributed database, powered by Apache Hadoop based on 0.20-append branch 0.20.1-dev API)
</TITLE>

<META NAME="date" CONTENT="2011-03-30">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.hadoop.security.authorize

Class ServiceAuthorizationManager

java.lang.Object
  org.apache.hadoop.security.authorize.ServiceAuthorizationManager

public class ServiceAuthorizationManager
extends java.lang.Object

An authorization manager which handles service-level authorization
 for incoming service requests.

Field Summary

static java.lang.String
SERVICE_AUTHORIZATION_CONFIG

          Configuration key for controlling service-level authorization for Hadoop.

Constructor Summary

ServiceAuthorizationManager()

Method Summary

static void
authorize(javax.security.auth.Subject user,
          java.lang.Class<?> protocol)

          Authorize the user to access the protocol being used.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SERVICE_AUTHORIZATION_CONFIG

public static final java.lang.String SERVICE_AUTHORIZATION_CONFIG

Configuration key for controlling service-level authorization for Hadoop.

See Also:
Constant Field Values

Constructor Detail

ServiceAuthorizationManager

public ServiceAuthorizationManager()

Method Detail

authorize

public static void authorize(javax.security.auth.Subject user,
                             java.lang.Class<?> protocol)
                      throws AuthorizationException

Authorize the user to access the protocol being used.

Parameters:
user - user accessing the service
protocol - service being accessed

Throws:

AuthorizationException - on authorization failure

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

This release is based on the Facebook's version of Hadoop.
Copyright © 2009 The Apache Software Foundation.


text:
<?php
/**
 * [RO] Preia statusul abonarii la newsletter-ul pentru API (https://github.com/celdotro/marketplace/wiki/Status-abonare-newsletter-API)
 * [EN] Retrieves the subscription status to API newsletter (https://github.com/celdotro/marketplace/wiki/Subscription-status-to-API-newsletter)
 */
include __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'api_include.php';

use celmarket\Admin\AdminInformation;

#FUNCTION#
function getApiNewsletterSubscriptionStatus(){
    $object = new AdminInformation();

    try{
        $response = $object->getApiNewsletterSubscriptionStatus();
        print_r($response);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}

#EXAMPLE#
getApiNewsletterSubscriptionStatus();


text:
<?php

namespace frontend\modules\region\controllers;

use frontend\modules\region\models\Country;
use frontend\modules\region\models\access\CountryAccess;
use frontend\modules\region\models\form\CountryForm;
use frontend\modules\region\models\search\CountrySearch;
use common\base\Controller;
use yii\web\HttpException;
use yii\helpers\Url;
use yii\filters\AccessControl;
use dmstr\bootstrap\Tabs;
use cornernote\returnurl\ReturnUrl;

/**
 * CountryController implements the CRUD actions for Country model.
 */
class CountryController extends Controller
{

	/**
	 * @var boolean whether to enable CSRF validation for the actions in this controller.
	 * CSRF validation is enabled only when both this property and [[Request::enableCsrfValidation]] are true.
	 */
	public $enableCsrfValidation = false;

	/**
	 * Lists all Country models.
	 * @return mixed
	 */
	public function actionIndex()
	{
		if (CountryAccess::allowIndex() == FALSE)
		{
			throw CountryAccess::exception('index');
		}

		$searchModel = new CountrySearch;
		$dataProvider = $searchModel->searchIndex($_GET);

		Tabs::clearLocalStorage();

		Url::remember();
		\Yii::$app->session['__crudReturnUrl'] = null;

		return $this->render('index', [
				'dataProvider'	 => $dataProvider,
				'searchModel'	 => $searchModel,
		]);

	}

	/**
	 * Lists all deleted Country models.
	 * @return mixed
	 */
	public function actionDeleted()
	{
		if (CountryAccess::allowDeleted() == FALSE)
		{
			throw CountryAccess::exception('deleted');
		}

		$searchModel = new CountrySearch;
		$dataProvider = $searchModel->searchDeleted($_GET);

		Tabs::clearLocalStorage();

		Url::remember();
		\Yii::$app->session['__crudReturnUrl'] = null;

		return $this->render('deleted', [
				'dataProvider'	 => $dataProvider,
				'searchModel'	 => $searchModel,
		]);

	}

	/**
	 * Displays a single Country model.
	 * @param integer $id
	 *
	 * @return mixed
	 */
	public function actionView($id)
	{
		$model = $this->findModel($id);

		if ($model->operation->allowView == FALSE)
		{
			throw $model->operation->exception('view');
		}

		\Yii::$app->session['__crudReturnUrl'] = ReturnUrl::getUrl(Url::previous());
		Url::remember();
		Tabs::rememberActiveState();

		return $this->render('view', [
				'model' => $model,
		]);

	}

	/**
	 * Creates a new Country model.
	 * If creation is successful, the browser will be redirected to the 'view' page.
	 * @return mixed
	 */
	public function actionCreate()
	{
		if (CountryAccess::allowCreate() == FALSE)
		{
			throw CountryAccess::exception('create');
		}

		$model = new CountryForm();

		try
		{
			if ($model->load($_POST) && $model->save())
			{
				return $this->redirect(ReturnUrl::getUrl(Url::previous()));
			}
			elseif (!\Yii::$app->request->isPost)
			{
				$model->load($_GET);
			}
		}
		catch (\Exception $e)
		{
			$msg = (isset($e->errorInfo[2])) ? $e->errorInfo[2] : $e->getMessage();
			$model->addError('_exception', $msg);
		}
		return $this->render('create', ['model' => $model]);

	}

	/**
	 * Updates an existing Country model.
	 * If update is successful, the browser will be redirected to the 'view' page.
	 * @param integer $id
	 * @return mixed
	 */
	public function actionUpdate($id)
	{
		$model = $this->findForm($id);

		if ($model->operation->allowUpdate == FALSE)
		{
			throw $model->operation->exception('update');
		}

		if ($model->load($_POST) && $model->save())
		{
			return $this->redirect(ReturnUrl::getUrl(Url::previous()));
		}
		else
		{
			return $this->render('update', [
					'model' => $model,
			]);
		}

	}

	/**
	 * Deletes an existing Country model.
	 * If deletion is successful, the browser will be redirected to the 'index' page.
	 * @param integer $id
	 * @return mixed
	 */
	public function actionDelete($id)
	{
		try
		{
			$model = $this->findModel($id);

			if ($model->operation->allowDelete == FALSE)
			{
				throw $model->operation->exception('delete');
			}

			$model->delete();
		}
		catch (\Exception $e)
		{
			$msg = (isset($e->errorInfo[2])) ? $e->errorInfo[2] : $e->getMessage();

			\Yii::$app->getSession()->setFlash('error', $msg);

			return $this->redirect(ReturnUrl::getUrl(Url::previous()));
		}

		// TODO: improve detection
		$isPivot = strstr('$id', ',');
		if ($isPivot == true)
		{
			return $this->redirect(ReturnUrl::getUrl(Url::previous()));
		}
		elseif (isset(\Yii::$app->session['__crudReturnUrl']) && \Yii::$app->session['__crudReturnUrl'] != '/')
		{
			Url::remember(null);

			$url = \Yii::$app->session['__crudReturnUrl'];
			$url = ReturnUrl::getUrl($url);

			\Yii::$app->session['__crudReturnUrl'] = null;

			return $this->redirect($url);
		}
		else
		{
			return $this->redirect(['index']);
		}

	}

	/**
	 * Finds the Country model based on its primary key value.
	 * If the model is not found, a 404 HTTP exception will be thrown.
	 * @param integer $id
	 * @return Country the loaded model
	 * @throws HttpException if the model cannot be found
	 */
	protected function findModel($id)
	{
		if (($model = Country::findOne($id)) !== null)
		{
			return $model;
		}
		else
		{
			throw new HttpException(404, 'The requested page does not exist.');
		}

	}

	/**
	 * Finds the Country model based on its primary key value for modification.
	 * If the model is not found, a 404 HTTP exception will be thrown.
	 * @param integer $id
	 * @return Country the loaded model
	 * @throws HttpException if the model cannot be found
	 */
	protected function findForm($id)
	{
		if (($model = CountryForm::findOne($id)) !== null)
		{
			return $model;
		}
		else
		{
			throw new HttpException(404, 'The requested page does not exist.');
		}

	}

}


text:
package com.esri

import java.io.ByteArrayOutputStream

import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.io.{Input, Output}
import org.geotools.geometry.jts.WKTReader2
import org.scalatest._

import scala.io.Source

/**
  */
class FeaturePolygonTest extends FlatSpec with Matchers {

  it should "read zero area geometry" in {
    val kryo = new Kryo()
    kryo.register(classOf[FeaturePolygon])

    val reader = new WKTReader2()
    Source
      .fromFile("/tmp/world.tsv")
      .getLines()
      .foreach(line => {
        val tokens = line.split("\t")
        val geom = reader.read(tokens(14))
        FeaturePolygon(geom, Array.empty[String])
          .toRowCols(4.0)
          .foreach {
            case (rowcol, feature) => {
              feature.geom.getGeometryType should endWith("Polygon")

              val baos = new ByteArrayOutputStream(4096)
              val output = new Output(baos)
              kryo.writeObject(output, feature)
              output.flush()

              val obj = kryo.readObject[FeaturePolygon](new Input(baos.toByteArray), classOf[FeaturePolygon])
              obj.geom.equalsExact(feature.geom, 0.000001)
            }
          }
      })
  }
}


text:
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import { ServerConnection } from '@jupyterlab/services';
import { TranslationBundle } from '@jupyterlab/translation';
import {
  jsonIcon,
  LabIcon,
  markdownIcon,
  spreadsheetIcon,
  VDomModel,
  VDomRenderer
} from '@jupyterlab/ui-components';
import { PromiseDelegate, ReadonlyJSONObject } from '@lumino/coreutils';
import { ISignal, Signal } from '@lumino/signaling';
import { h, VirtualElement } from '@lumino/virtualdom';
import { Panel, SplitPanel, TabBar, Widget } from '@lumino/widgets';
import * as React from 'react';

/**
 * A license viewer
 */
export class Licenses extends SplitPanel {
  readonly model: Licenses.Model;

  constructor(options: Licenses.IOptions) {
    super();
    this.addClass('jp-Licenses');
    this.model = options.model;
    this.initLeftPanel();
    this.initFilters();
    this.initBundles();
    this.initGrid();
    this.initLicenseText();
    this.setRelativeSizes([1, 2, 3]);
    void this.model.initLicenses().then(() => this._updateBundles());
    this.model.trackerDataChanged.connect(() => {
      this.title.label = this.model.title;
    });
  }

  /**
   * Handle disposing of the widget
   */
  dispose(): void {
    if (this.isDisposed) {
      return;
    }
    this._bundles.currentChanged.disconnect(this.onBundleSelected, this);
    this.model.dispose();
    super.dispose();
  }

  /**
   * Initialize the left area for filters and bundles
   */
  protected initLeftPanel(): void {
    this._leftPanel = new Panel();
    this._leftPanel.addClass('jp-Licenses-FormArea');
    this.addWidget(this._leftPanel);
    SplitPanel.setStretch(this._leftPanel, 1);
  }

  /**
   * Initialize the filters
   */
  protected initFilters(): void {
    this._filters = new Licenses.Filters(this.model);
    SplitPanel.setStretch(this._filters, 1);
    this._leftPanel.addWidget(this._filters);
  }

  /**
   * Initialize the listing of available bundles
   */
  protected initBundles(): void {
    this._bundles = new TabBar({
      orientation: 'vertical',
      renderer: new Licenses.BundleTabRenderer(this.model)
    });
    this._bundles.addClass('jp-Licenses-Bundles');
    SplitPanel.setStretch(this._bundles, 1);
    this._leftPanel.addWidget(this._bundles);
    this._bundles.currentChanged.connect(this.onBundleSelected, this);
    this.model.stateChanged.connect(() => this._bundles.update());
  }

  /**
   * Initialize the listing of packages within the current bundle
   */
  protected initGrid(): void {
    this._grid = new Licenses.Grid(this.model);
    SplitPanel.setStretch(this._grid, 1);
    this.addWidget(this._grid);
  }

  /**
   * Initialize the full text of the current package
   */
  protected initLicenseText(): void {
    this._licenseText = new Licenses.FullText(this.model);
    SplitPanel.setStretch(this._grid, 1);
    this.addWidget(this._licenseText);
  }

  /**
   * Event handler for updating the model with the current bundle
   */
  protected onBundleSelected(): void {
    if (this._bundles.currentTitle?.label) {
      this.model.currentBundleName = this._bundles.currentTitle.label;
    }
  }

  /**
   * Update the bundle tabs.
   */
  protected _updateBundles(): void {
    this._bundles.clearTabs();
    let i = 0;
    const { currentBundleName } = this.model;
    let currentIndex = 0;
    for (const bundle of this.model.bundleNames) {
      const tab = new Widget();
      tab.title.label = bundle;
      if (bundle === currentBundleName) {
        currentIndex = i;
      }
      this._bundles.insertTab(++i, tab.title);
    }
    this._bundles.currentIndex = currentIndex;
  }

  /**
   * An area for selecting licenses by bundle and filters
   */
  protected _leftPanel: Panel;

  /**
   * Filters on visible licenses
   */
  protected _filters: Licenses.Filters;

  /**
   * Tabs reflecting available bundles
   */
  protected _bundles: TabBar<Widget>;

  /**
   * A grid of the current bundle's packages' license metadata
   */
  protected _grid: Licenses.Grid;

  /**
   * The currently-selected package's full license text
   */
  protected _licenseText: Licenses.FullText;
}

/** A namespace for license components */
export namespace Licenses {
  /** The information about a license report format  */
  export interface IReportFormat {
    title: string;
    icon: LabIcon;
    id: string;
  }

  /**
   * License report formats understood by the server (once lower-cased)
   */
  export const REPORT_FORMATS: Record<string, IReportFormat> = {
    markdown: {
      id: 'markdown',
      title: 'Markdown',
      icon: markdownIcon
    },
    csv: {
      id: 'csv',
      title: 'CSV',
      icon: spreadsheetIcon
    },
    json: {
      id: 'csv',
      title: 'JSON',
      icon: jsonIcon
    }
  };

  /**
   * The default format (most human-readable)
   */
  export const DEFAULT_FORMAT = 'markdown';

  /**
   * Options for instantiating a license viewer
   */
  export interface IOptions {
    model: Model;
  }
  /**
   * Options for instantiating a license model
   */
  export interface IModelOptions extends ICreateArgs {
    licensesUrl: string;
    serverSettings?: ServerConnection.ISettings;
    trans: TranslationBundle;
  }

  /**
   * The JSON response from the API
   */
  export interface ILicenseResponse {
    bundles: {
      [key: string]: ILicenseBundle;
    };
  }

  /**
   * A top-level report of the licenses for all code included in a bundle
   *
   * ### Note
   *
   * This is roughly informed by the terms defined in the SPDX spec, though is not
   * an SPDX Document, since there seem to be several (incompatible) specs
   * in that repo.
   *
   * @see https://github.com/spdx/spdx-spec/blob/development/v2.2.1/schemas/spdx-schema.json
   **/
  export interface ILicenseBundle extends ReadonlyJSONObject {
    packages: IPackageLicenseInfo[];
  }

  /**
   * A best-effort single bundled package's information.
   *
   * ### Note
   *
   * This is roughly informed by SPDX `packages` and `hasExtractedLicenseInfos`,
   * as making it conformant would vastly complicate the structure.
   *
   * @see https://github.com/spdx/spdx-spec/blob/development/v2.2.1/schemas/spdx-schema.json
   **/
  export interface IPackageLicenseInfo extends ReadonlyJSONObject {
    /**
     * the name of the package as it appears in package.json
     */
    name: string;
    /**
     * the version of the package, or an empty string if unknown
     */
    versionInfo: string;
    /**
     * an SPDX license identifier or LicenseRef, or an empty string if unknown
     */
    licenseId: string;
    /**
     * the verbatim extracted text of the license, or an empty string if unknown
     */
    extractedText: string;
  }

  /**
   * The format information for a download
   */
  export interface IDownloadOptions {
    format: string;
  }

  /**
   * The fields which can be filtered
   */
  export type TFilterKey = 'name' | 'versionInfo' | 'licenseId';

  export interface ICreateArgs {
    currentBundleName?: string | null;
    packageFilter?: Partial<IPackageLicenseInfo> | null;
    currentPackageIndex?: number | null;
  }

  /**
   * A model for license data
   */
  export class Model extends VDomModel implements ICreateArgs {
    constructor(options: IModelOptions) {
      super();
      this._trans = options.trans;
      this._licensesUrl = options.licensesUrl;
      this._serverSettings =
        options.serverSettings || ServerConnection.makeSettings();
      if (options.currentBundleName) {
        this._currentBundleName = options.currentBundleName;
      }
      if (options.packageFilter) {
        this._packageFilter = options.packageFilter;
      }
      if (options.currentPackageIndex) {
        this._currentPackageIndex = options.currentPackageIndex;
      }
    }

    /**
     * Handle the initial request for the licenses from the server.
     */
    async initLicenses(): Promise<void> {
      try {
        const response = await ServerConnection.makeRequest(
          this._licensesUrl,
          {},
          this._serverSettings
        );
        this._serverResponse = await response.json();
        this._licensesReady.resolve();
        this.stateChanged.emit(void 0);
      } catch (err) {
        this._licensesReady.reject(err);
      }
    }

    /**
     * Create a temporary download link, and emulate clicking it to trigger a named
     * file download.
     */
    async download(options: IDownloadOptions): Promise<void> {
      const url = `${this._licensesUrl}?format=${options.format}&download=1`;
      const element = document.createElement('a');
      element.href = url;
      element.download = '';
      document.body.appendChild(element);
      element.click();
      document.body.removeChild(element);
      return void 0;
    }

    /**
     * A promise that resolves when the licenses from the server change
     */
    get selectedPackageChanged(): ISignal<Model, void> {
      return this._selectedPackageChanged;
    }

    /**
     * A promise that resolves when the trackable data changes
     */
    get trackerDataChanged(): ISignal<Model, void> {
      return this._trackerDataChanged;
    }

    /**
     * The names of the license bundles available
     */
    get bundleNames(): string[] {
      return Object.keys(this._serverResponse?.bundles || {});
    }

    /**
     * The current license bundle
     */
    get currentBundleName(): string | null {
      if (this._currentBundleName) {
        return this._currentBundleName;
      }
      if (this.bundleNames.length) {
        return this.bundleNames[0];
      }
      return null;
    }

    /**
     * Set the current license bundle, and reset the selected index
     */
    set currentBundleName(currentBundleName: string | null) {
      if (this._currentBundleName !== currentBundleName) {
        this._currentBundleName = currentBundleName;
        this.stateChanged.emit(void 0);
        this._trackerDataChanged.emit(void 0);
      }
    }

    /**
     * A promise that resolves when the licenses are available from the server
     */
    get licensesReady(): Promise<void> {
      return this._licensesReady.promise;
    }

    /**
     * All the license bundles, keyed by the distributing packages
     */
    get bundles(): null | { [key: string]: ILicenseBundle } {
      return this._serverResponse?.bundles || {};
    }

    /**
     * The index of the currently-selected package within its license bundle
     */
    get currentPackageIndex(): number | null {
      return this._currentPackageIndex;
    }

    /**
     * Update the currently-selected package within its license bundle
     */
    set currentPackageIndex(currentPackageIndex: number | null) {
      if (this._currentPackageIndex === currentPackageIndex) {
        return;
      }
      this._currentPackageIndex = currentPackageIndex;
      this._selectedPackageChanged.emit(void 0);
      this.stateChanged.emit(void 0);
      this._trackerDataChanged.emit(void 0);
    }

    /**
     * The license data for the currently-selected package
     */
    get currentPackage(): IPackageLicenseInfo | null {
      if (
        this.currentBundleName &&
        this.bundles &&
        this._currentPackageIndex != null
      ) {
        return this.getFilteredPackages(
          this.bundles[this.currentBundleName]?.packages || []
        )[this._currentPackageIndex];
      }

      return null;
    }

    /**
     * A translation bundle
     */
    get trans(): TranslationBundle {
      return this._trans;
    }

    get title(): string {
      return `${this._currentBundleName || ''} ${this._trans.__(
        'Licenses'
      )}`.trim();
    }

    /**
     * The current package filter
     */
    get packageFilter(): Partial<IPackageLicenseInfo> {
      return this._packageFilter;
    }

    set packageFilter(packageFilter: Partial<IPackageLicenseInfo>) {
      this._packageFilter = packageFilter;
      this.stateChanged.emit(void 0);
      this._trackerDataChanged.emit(void 0);
    }

    /**
     * Get filtered packages from current bundle where at least one token of each
     * key is present.
     */
    getFilteredPackages(allRows: IPackageLicenseInfo[]): IPackageLicenseInfo[] {
      let rows: IPackageLicenseInfo[] = [];
      let filters: [string, string[]][] = Object.entries(this._packageFilter)
        .filter(([k, v]) => v && `${v}`.trim().length)
        .map(([k, v]) => [k, `${v}`.toLowerCase().trim().split(' ')]);
      for (const row of allRows) {
        let keyHits = 0;
        for (const [key, bits] of filters) {
          let bitHits = 0;
          let rowKeyValue = `${row[key]}`.toLowerCase();
          for (const bit of bits) {
            if (rowKeyValue.includes(bit)) {
              bitHits += 1;
            }
          }
          if (bitHits) {
            keyHits += 1;
          }
        }
        if (keyHits === filters.length) {
          rows.push(row);
        }
      }
      return Object.values(rows);
    }

    private _selectedPackageChanged: Signal<Model, void> = new Signal(this);
    private _trackerDataChanged: Signal<Model, void> = new Signal(this);
    private _serverResponse: ILicenseResponse | null;
    private _licensesUrl: string;
    private _serverSettings: ServerConnection.ISettings;
    private _currentBundleName: string | null;
    private _trans: TranslationBundle;
    private _currentPackageIndex: number | null = 0;
    private _licensesReady = new PromiseDelegate<void>();
    private _packageFilter: Partial<IPackageLicenseInfo> = {};
  }

  /**
   * A filter form for limiting the packages displayed
   */
  export class Filters extends VDomRenderer<Model> {
    constructor(model: Model) {
      super(model);
      this.addClass('jp-Licenses-Filters');
      this.addClass('jp-RenderedHTMLCommon');
    }

    protected render(): JSX.Element {
      const { trans } = this.model;
      return (

            {trans.__('Filter Licenses By')}

              {trans.__('Package')}
              {this.renderFilter('name')}

              {trans.__('Version')}
              {this.renderFilter('versionInfo')}

              {trans.__('License')}
              {this.renderFilter('licenseId')}

            {trans.__('Distributions')}

      );
    }

    /**
     * Render a filter input
     */
    protected renderFilter = (key: TFilterKey): JSX.Element => {
      const value = this.model.packageFilter[key] || '';
      return (
        <input
          type="text"
          name={key}
          defaultValue={value}
          className="jp-mod-styled"
          onInput={this.onFilterInput}
        />
      );
    };

    /**
     * Handle a filter input changing
     */
    protected onFilterInput = (
      evt: React.ChangeEvent<HTMLInputElement>
    ): void => {
      const input = evt.currentTarget;
      const { name, value } = input;
      this.model.packageFilter = { ...this.model.packageFilter, [name]: value };
    };
  }

  /**
   * A fancy bundle renderer with the package count
   */
  export class BundleTabRenderer extends TabBar.Renderer {
    /**
     * A model of the state of license viewing as well as the underlying data
     */
    model: Model;

    readonly closeIconSelector = '.lm-TabBar-tabCloseIcon';

    constructor(model: Model) {
      super();
      this.model = model;
    }

    /**
     * Render a full bundle
     */
    renderTab(data: TabBar.IRenderData<Widget>): VirtualElement {
      let title = data.title.caption;
      let key = this.createTabKey(data);
      let style = this.createTabStyle(data);
      let className = this.createTabClass(data);
      let dataset = this.createTabDataset(data);
      return h.li(
        { key, className, title, style, dataset },
        this.renderIcon(data),
        this.renderLabel(data),
        this.renderCountBadge(data)
      );
    }

    /**
     * Render the package count
     */
    renderCountBadge(data: TabBar.IRenderData<Widget>): VirtualElement {
      const bundle = data.title.label;
      const { bundles } = this.model;
      const packages = this.model.getFilteredPackages(
        (bundles && bundle ? bundles[bundle].packages : []) || []
      );
      return h.label({}, `${packages.length}`);
    }
  }

  /**
   * A grid of licenses
   */
  export class Grid extends VDomRenderer<Licenses.Model> {
    constructor(model: Licenses.Model) {
      super(model);
      this.addClass('jp-Licenses-Grid');
      this.addClass('jp-RenderedHTMLCommon');
    }

    /**
     * Render a grid of package license information
     */
    protected render(): JSX.Element {
      const { bundles, currentBundleName, trans } = this.model;
      const filteredPackages = this.model.getFilteredPackages(
        bundles && currentBundleName
          ? bundles[currentBundleName]?.packages || []
          : []
      );
      if (!filteredPackages.length) {
        return (

            {trans.__('No Packages found')}

        );
      }
      return (
        <form>

                {trans.__('Package')}
                {trans.__('Version')}
                {trans.__('License')}

{filteredPackages.map(this.renderRow)}

        </form>
      );
    }

    /**
     * Render a single package's license information
     */
    protected renderRow = (
      row: Licenses.IPackageLicenseInfo,
      index: number
    ): JSX.Element => {
      const selected = index === this.model.currentPackageIndex;
      const onCheck = () => (this.model.currentPackageIndex = index);
      return (

            <input
              type="radio"
              name="show-package-license"
              value={index}
              onChange={onCheck}
              checked={selected}
            />

          {row.name}

            {row.versionInfo}

            {row.licenseId}

      );
    };
  }

  /**
   * A package's full license text
   */
  export class FullText extends VDomRenderer<Model> {
    constructor(model: Model) {
      super(model);
      this.addClass('jp-Licenses-Text');
      this.addClass('jp-RenderedHTMLCommon');
      this.addClass('jp-RenderedMarkdown');
    }

    /**
     * Render the license text, or a null state if no package is selected
     */
    protected render(): JSX.Element[] {
      const { currentPackage, trans } = this.model;
      let head = '';
      let quote = trans.__('No Package selected');
      let code = '';
      if (currentPackage) {
        const { name, versionInfo, licenseId, extractedText } = currentPackage;
        head = `${name} v${versionInfo}`;
        quote = `${trans.__('License')}: ${
          licenseId || trans.__('No License ID found')
        }`;
        code = extractedText || trans.__('No License Text found');
      }
      return [

{head}
,

          {quote}

,
        {code}
      ];
    }
  }
}


text:
<?php namespace Cms\Classes;

use Cms\Classes\ComponentBase;

/**
 * The view bag stores custom template properties.
 * This is a hidden component ignored by the back-end UI.
 *
 * @package october\cms
 * @author Alexey Bobkov, Samuel Georges
 */
class ViewBag extends ComponentBase
{
    public $isHidden = true;

    public function componentDetails()
    {
        return [
            'name'        => 'viewBag',
            'description' => 'Stores custom template properties.'
        ];
    }

    public function validateProperties(array $properties)
    {
        return $properties;
    }

    public function __call($method, $parameters)
    {
        if (array_key_exists($method, $this->properties) && !method_exists($this, $method)) {
            return $this->properties[$method];
        }

        return parent::__call($method, $parameters);
    }

    public function defineProperties()
    {
        $result = [];

        foreach ($this->properties as $name => $value) {
            $result[$name] = [
                'title' => $name,
                'type' => 'string'
            ];
        }

        return $result;
    }
}


text:
import React, { Component } from 'react';
import './scss/App.css';
import Navigation from './components/Navigation.js'
import Header from './components/Header.js'
import About from './components/About.js'
import Resume from './components/Resume.js'
import Portfolio from './components/Portfolio.js'
import Footer from './components/Footer.js'

class App extends Component {
  constructor(props) {
    super(props)
  }

  render() {
    return (
      <div className="App">
        <Navigation />
        <Header />
        <About />
        <Resume />
        <Portfolio />
        <Footer />
      </div>
    );
  }
};

export default App;


text:
import util from './util';

export default class BaseAnimator {

  /**
   * @param {Object} options
   * @param {String} options.timing
   * @param {Number} options.duration
   * @param {Number} options.delay
   */
  constructor(options = {}) {
    this.timing = options.timing || 'linear';
    this.duration = options.duration || 0;
    this.delay = options.delay || 0;
  }

  static extend(properties = {}) {
    const extendedAnimator = this;
    const newAnimator = function() {
      extendedAnimator.apply(this, arguments);
      util.extend(this, properties);
    };

    newAnimator.prototype = this.prototype;
    return newAnimator;
  }
}


text:
<?php

declare(strict_types=1);

namespace Valkyrja\Mail;

use Valkyrja\Support\Manager\Message as Contract;

/**
 * Interface Message.
 *
 * @author Melech Mizrachi
 */
interface Message extends Contract
{
    /**
     * Get the from email.
     *
     * @return string
     */
    public function getFromEmail(): string;

    /**
     * Get the from name.
     *
     * @return string
     */
    public function getFromName(): string;

    /**
     * Set the mail's sender information.
     *
     * @param string $email The email
     * @param string $name  [optional] The name
     *
     * @return static
     */
    public function setFrom(string $email, string $name = ''): self;

    /**
     * Get the recipients.
     *
     * @return array
     */
    public function getRecipients(): array;

    /**
     * Add a recipient.
     *
     * @param string $email The email
     * @param string $name  [optional] The name
     *
     * @return static
     */
    public function addRecipient(string $email, string $name = ''): self;

    /**
     * Get the reply to recipients.
     *
     * @return array
     */
    public function getReplyToRecipients(): array;

    /**
     * Add a Reply-To recipient.
     *
     * @param string $email The email
     * @param string $name  [optional] The name
     *
     * @return static
     */
    public function addReplyTo(string $email, string $name = ''): self;

    /**
     * Get the copy recipients.
     *
     * @return array
     */
    public function getCopyRecipients(): array;

    /**
     * Add a copy (CC) recipient.
     *
     * @param string $email The email
     * @param string $name  [optional] The name
     *
     * @return static
     */
    public function addCopyRecipient(string $email, string $name = ''): self;

    /**
     * Get the blind copy recipients.
     *
     * @return array
     */
    public function getBlindCopyRecipients(): array;

    /**
     * Add a blind copy (BCC) recipient.
     *
     * @param string $email The email
     * @param string $name  [optional] The name
     *
     * @return static
     */
    public function addBlindCopyRecipient(string $email, string $name = ''): self;

    /**
     * Get the attachments.
     *
     * @return array
     */
    public function getAttachments(): array;

    /**
     * Add an attachment from the filesystem.
     *
     * @param string $path The path
     * @param string $name [optional] The name
     *
     * @return static
     */
    public function addAttachment(string $path, string $name = ''): self;

    /**
     * Get the subject.
     *
     * @return string
     */
    public function getSubject(): string;

    /**
     * Set the subject.
     *
     * @param string $subject The subject
     *
     * @return static
     */
    public function setSubject(string $subject): self;

    /**
     * Get the body.
     *
     * @return string
     */
    public function getBody(): string;

    /**
     * Set the body of the mail.
     *
     * @param string $body The body
     *
     * @return static
     */
    public function setBody(string $body): self;

    /**
     * Get whether the message body is html.
     *
     * @return bool
     */
    public function isHtml(): bool;

    /**
     * Set whether the message body is html.
     *
     * @param bool $isHtml [optional] Whether the message body is html
     *
     * @return static
     */
    public function setIsHtml(bool $isHtml = true): self;

    /**
     * Get the plain body.
     *
     * @return string|null
     */
    public function getPlainBody(): ?string;

    /**
     * If sending html, add an alternative plain message body for clients without html support.
     *
     * @param string|null $plainBody The plain body
     *
     * @return static
     */
    public function setPlainBody(string $plainBody = null): self;
}


text:
/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/**
 * @author Nikolay A. Kuznetsov
 */
package org.teavm.classlib.java.util.regex;

/**
 * Default quantifier over groups, in fact this type of quantifier is generally
 * used for constructions we cant identify number of characters they consume.
 *
 * @author Nikolay A. Kuznetsov
 */
class TGroupQuantifierSet extends TQuantifierSet {

    public TGroupQuantifierSet(TAbstractSet innerSet, TAbstractSet next, int type) {
        super(innerSet, next, type);
    }

    @Override
    public int matches(int stringIndex, CharSequence testString, TMatchResultImpl matchResult) {

        if (!innerSet.hasConsumed(matchResult)) {
            return next.matches(stringIndex, testString, matchResult);
        }

        int nextIndex = innerSet.matches(stringIndex, testString, matchResult);

        if (nextIndex < 0) {
            return next.matches(stringIndex, testString, matchResult);
        } else {
            return nextIndex;
        }
    }

    @Override
    protected String getName() {
        return "<GroupQuant>";
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true"
    android:scrollbars="none"
    android:layout_gravity="center_horizontal|center_vertical">

    <LinearLayout
        android:layout_width="300dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal|center_vertical"
        android:gravity="center_horizontal|center_vertical"
        android:padding="0dp">

        <RelativeLayout
            android:id="@+id/layout_root"
            android:layout_width="300dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|center_vertical"
            android:background="@color/to_confirm_paper_color"
            android:padding="10dp">

            <TextView
                android:id="@+id/text"
                style="@style/WibmoFontLabel"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:gravity="center"
                android:text="msg" />

            <ImageView
                android:id="@+id/image"
                style="@style/WibmoConfirmTitle"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_below="@id/text"
                android:layout_centerHorizontal="true"
                android:layout_gravity="center"
                android:layout_marginTop="30dp"
                android:adjustViewBounds="true"
                android:gravity="center"
                android:src="@drawable/wibmo_logo_only"
                android:visibility="invisible" />

            <TextView
                android:id="@+id/txn_pl_wait"
                style="@style/WibmoIAPWait"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/text"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="60dp"
                android:gravity="center_horizontal"
                android:text="@string/lable_please_wait" />

            <fr.castorflex.android.smoothprogressbar.SmoothProgressBar
                android:id="@+id/smoothprogressbar"
                android:layout_width="250dp"
                android:layout_height="wrap_content"
                android:layout_below="@id/image"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="-5dp"
                android:indeterminate="true"
                android:padding="0dp"
                app:spb_colors="@array/spb_colors"

                app:spb_generate_background_with_colors="false"
                app:spb_interpolator="spb_interpolator_acceleratedecelerate"
                app:spb_mirror_mode="true"
                app:spb_progressiveStart_activated="true"
                app:spb_progressiveStart_speed="2"
                app:spb_progressiveStop_speed="3.4"
                app:spb_reversed="true"
                app:spb_sections_count="2"
                app:spb_speed="1.7"
                app:spb_stroke_separator_length="8dp" />

            <!--
            style="@style/WibmoProgressBar"
            -->

            <Button
                android:id="@+id/abort_button"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/smoothprogressbar"
                android:layout_marginTop="12dp"
                android:gravity="center"
                android:text="@string/label_cancel" />
        </RelativeLayout>

    </LinearLayout>
</ScrollView>


text:
soft link to Assets/tolua/ToLua/Lua

## main
gameplay logic


text:
<%= boiler_plate %>
customer = Balanced::Customer.fetch('<%= request["uri"] %>')


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <recordedVotes />
    <billType>S</billType>
    <version>1.0.0</version>
    <relatedBills>
      <item>
        <number>835</number>
        <latestTitle>To update the map of, and modify the maximum acreage available for inclusion in, the Florissant Fossil Beds National Monument.</latestTitle>
        <relationshipDetails>
          <item>
            <identifiedBy>CRS</identifiedBy>
            <type>Identical bill</type>
          </item>
        </relationshipDetails>
        <congress>115</congress>
        <latestAction>
          <actionDate>2017-02-16</actionDate>
          <text>Referred to the Subcommittee on Federal Lands.</text>
        </latestAction>
        <type>HR</type>
      </item>
    </relatedBills>
    <notes />
    <summaries>
      <billSummaries>
        <item>
          <updateDate>2017-02-02T05:00:00Z</updateDate>
          <actionDesc>Introduced in Senate</actionDesc>
          <name>Introduced in Senate</name>
          <actionDate>2017-02-02</actionDate>
          <versionCode>00</versionCode>
          <text><![CDATA[
 This bill revises the title, number, and date of the map depicting the Florissant Fossil Beds National Monument in Colorado and increases from 6,000 to 6,300 the maximum number of acres that may be made available for inclusion in the monument.
]]></text>
          <lastSummaryUpdateDate>2017-02-27T20:18:27Z</lastSummaryUpdateDate>
        </item>
        <item>
          <updateDate>2017-05-03T14:41:06Z</updateDate>
          <actionDesc>Reported to Senate without amendment</actionDesc>
          <name>Reported to Senate without amendment</name>
          <actionDate>2017-05-03</actionDate>
          <versionCode>80</versionCode>
          <text><![CDATA[
(This measure has not been amended since it was introduced. The summary has been expanded because action occurred on the measure.)

 (Sec. 1) This bill revises the title, number, and date of the map depicting the Florissant Fossil Beds National Monument in Colorado and increases from 6,000 to 6,300 the maximum number of acres that may be made available for inclusion in the monument.
]]></text>
          <lastSummaryUpdateDate>2017-06-01T20:00:03Z</lastSummaryUpdateDate>
        </item>
      </billSummaries>
    </summaries>
    <laws />
    <congress>115</congress>
    <sponsors>
      <item>
        <bioguideId>G000562</bioguideId>
        <state>CO</state>
        <fullName>Sen. Gardner, Cory [R-CO]</fullName>
        <party>R</party>
        <byRequestType />
        <middleName />
        <firstName>Cory</firstName>
        <lastName>Gardner</lastName>
        <identifiers>
          <lisID>1998</lisID>
          <bioguideId>G000562</bioguideId>
          <gpoId>7862</gpoId>
        </identifiers>
      </item>
    </sponsors>
    <policyArea>
      <name>Public Lands and Natural Resources</name>
    </policyArea>
    <committeeReports>
      <committeeReport>
        <citation>S. Rept. 115-38</citation>
      </committeeReport>
    </committeeReports>
    <cosponsors>
      <item>
        <sponsorshipWithdrawnDate />
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <fullName>Sen. Bennet, Michael F. [D-CO]</fullName>
        <middleName>F.</middleName>
        <identifiers>
          <bioguideId>B001267</bioguideId>
          <lisID>1965</lisID>
          <gpoId>8302</gpoId>
        </identifiers>
        <firstName>Michael</firstName>
        <lastName>Bennet</lastName>
        <bioguideId>B001267</bioguideId>
        <party>D</party>
        <state>CO</state>
        <sponsorshipDate>2017-02-02</sponsorshipDate>
      </item>
    </cosponsors>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Public Lands and Natural Resources</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Colorado</name>
          </item>
          <item>
            <name>Earth sciences</name>
          </item>
          <item>
            <name>Land transfers</name>
          </item>
          <item>
            <name>Monuments and memorials</name>
          </item>
          <item>
            <name>Parks, recreation areas, trails</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <actions>
      <item>
        <actionDate>2017-05-03</actionDate>
        <committee />
        <links />
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Placed on Senate Legislative Calendar under General Orders. Calendar No. 52.</text>
        <type>Calendars</type>
      </item>
      <item>
        <actionDate>2017-05-03</actionDate>
        <committee>
          <systemCode>sseg00</systemCode>
          <name>Energy and Natural Resources Committee</name>
        </committee>
        <links>
          <link>
            <name>report No. 115-38</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/senate-report/38</url>
          </link>
        </links>
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Committee on Energy and Natural Resources. Reported by Senator Murkowski without amendment. With written report No. 115-38.</text>
        <type>Committee</type>
      </item>
      <item>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <type>Committee</type>
        <text>Committee on Energy and Natural Resources. Reported by Senator Murkowski without amendment. With written report No. 115-38.</text>
        <links>
          <link>
            <name>report No. 115-38</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/senate-report/38</url>
          </link>
        </links>
        <committee>
          <systemCode>sseg00</systemCode>
          <name>Energy and Natural Resources Committee</name>
        </committee>
        <actionDate>2017-05-03</actionDate>
        <actionCode>14000</actionCode>
      </item>
      <item>
        <actionDate>2017-03-30</actionDate>
        <committee>
          <systemCode>sseg00</systemCode>
          <name>Energy and Natural Resources Committee</name>
        </committee>
        <links />
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Committee on Energy and Natural Resources. Ordered to be reported without amendment favorably.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-02-02</actionDate>
        <committee>
          <systemCode>sseg00</systemCode>
          <name>Energy and Natural Resources Committee</name>
        </committee>
        <links />
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Read twice and referred to the Committee on Energy and Natural Resources.</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <type>IntroReferral</type>
        <text>Introduced in Senate</text>
        <links />
        <committee />
        <actionDate>2017-02-02</actionDate>
        <actionCode>10000</actionCode>
      </item>
      <actionByCounts>
        <senate>6</senate>
      </actionByCounts>
      <actionTypeCounts>
        <orderedReported>1</orderedReported>
        <placedOnCalendarGeneralOrders>1</placedOnCalendarGeneralOrders>
        <introducedInSenate>1</introducedInSenate>
        <referredToCommittee>1</referredToCommittee>
        <reportedToSenate>2</reportedToSenate>
      </actionTypeCounts>
    </actions>
    <introducedDate>2017-02-02</introducedDate>
    <committees>
      <billCommittees>
        <item>
          <name>Energy and Natural Resources Committee</name>
          <systemCode>sseg00</systemCode>
          <type>Standing</type>
          <chamber>Senate</chamber>
          <subcommittees />
          <activities>
            <item>
              <name>Reported by</name>
              <date>2017-05-03T22:44:56Z</date>
            </item>
            <item>
              <name>Markup by</name>
              <date>2017-03-30T13:30:00Z</date>
            </item>
            <item>
              <name>Referred to</name>
              <date>2017-02-02T19:46:54Z</date>
            </item>
          </activities>
        </item>
      </billCommittees>
    </committees>
    <titles>
      <item>
        <chamberCode />
        <title>A bill to update the map of, and modify the maximum acreage available for inclusion in, the Florissant Fossil Beds National Monument.</title>
        <parentTitleType />
        <titleType>Official Title as Introduced</titleType>
        <chamberName />
      </item>
      <item>
        <chamberCode />
        <title>A bill to update the map of, and modify the maximum acreage available for inclusion in, the Florissant Fossil Beds National Monument.</title>
        <parentTitleType />
        <titleType>Display Title</titleType>
        <chamberName />
      </item>
    </titles>
    <latestAction>
      <links />
      <text>Placed on Senate Legislative Calendar under General Orders. Calendar No. 52.</text>
      <actionDate>2017-05-03</actionDate>
    </latestAction>
    <billNumber>287</billNumber>
    <amendments />
    <cboCostEstimates>
      <item>
        <title>S. 287, a bill to update the map of, and modify the maximum acreage available for inclusion in, the Florissant Fossil Beds National Monument</title>
        <pubDate>2017-04-10T20:46:49Z</pubDate>
        <url>https://www.cbo.gov/publication/52609</url>
      </item>
    </cboCostEstimates>
    <originChamber>Senate</originChamber>
    <calendarNumbers>
      <item>
        <calendar>Senate Calendar of Business</calendar>
        <number>0052</number>
      </item>
    </calendarNumbers>
    <updateDate>2017-08-10T13:24:02Z</updateDate>
    <createDate>2017-02-03T05:17:31Z</createDate>
    <title>A bill to update the map of, and modify the maximum acreage available for inclusion in, the Florissant Fossil Beds National Monument.</title>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
void dispatch_optional_queue_async(dispatch_queue_t optionalQueue, dispatch_block_t block)
{
    if (optionalQueue) {
        dispatch_async(optionalQueue, block);
    } else {
        block();
    }
}

@interface JMCache() <NSCacheDelegate>
@property (strong, nonatomic) NSMutableArray *allKeys;
@property (strong, nonatomic) JMCacheMemory *cacheInMemory;
@end

@implementation JMCache

+ (instancetype)sharedCache
{
    static JMCache *cache;
    static dispatch_once_t predicate;

    dispatch_once(&predicate, ^{
        cache = [[self alloc] init];
    });

    return cache;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        writingQueue = dispatch_queue_create("com.jmcache.writingQueue", NULL);
        readingQueue = dispatch_queue_create("com.jmcache.readingQueue", NULL);
        propertySafeQueue = dispatch_queue_create("com.jmcache.propertySafeQueue", NULL);
        _cachePathType = JMCachePathPrivate;
        _cacheType = JMCacheTypeInMemoryThenOnDisk;
        [self cacheAllKeysInitialize];
    }
    return self;
}

-(void)setValueTransformer:(JMCacheValueTransformer *)valueTransformer
{
    _valueTransformer = valueTransformer;
    [self cacheAllKeysInitialize];
}

- (JMCacheMemory *)cacheInMemory
{
    if (_cacheInMemory == nil) {
        _cacheInMemory = [JMCacheMemory sharedCache];
    }
    return _cacheInMemory;
}

- (void)cacheAllKeysInitialize
{
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

    [self loadKeysWithCompletionBlock:^(BOOL resul) {
        dispatch_semaphore_signal(semaphore);
    }];
    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
}

#pragma mark - Async Get Cached data

- (void)objectForKey:(NSString *)key withCompletionBlock:(JMCacheCompletionBlockObjectError)block
{
    dispatch_async(propertySafeQueue, ^{
        if(self.cacheType & JMCacheTypeInMemory){
            [self.cacheInMemory cachedObjectInMemoryForKey:key withCompletionBlock:^(id obj, NSError *error) {
                if (obj){
                    dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                        JM_BLOCK_SAFE_RUN(block,obj,nil);
                    });
                    return;
                }
            }];
        } else {
            if(self.cacheType & JMCacheTypeOnDisk){
                [self cachedObjectOnDiskForKey:key withCompletionBlock:block];
            } else {
                dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                    JM_BLOCK_SAFE_RUN(block,nil,[NSError jmCacheErrorWithType:JMCacheErrorTypeNoObjectFoundOnMemoryAndDiskDisable]);
                });
            }
        }
    });
}

- (void)setObject:(NSObject *)obj forKey:(NSString *)key withCompletionBlock:(JMCacheCompletionBlockBoolError)block
{
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{

        //Test if encode/decode is possible
        if ([obj.class canBeCoded]==NO || [obj.class canBeDecoded]==NO) {
            dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                JM_BLOCK_SAFE_RUN(block,NO, [NSError jmCacheErrorWithType:JMCacheErrorTypeEncodeDecodeProtocolMissing]);
            });
            return;
        }

        NSString *path = [self filePathForKey:key];
        JMCacheCompletionBlockBool block2 = ^(BOOL res){
            if(res) {
                JMCacheKey *cacheKey = [JMCacheKey cacheKeyWithKey:key andClass:obj.class];
                __weak JMCache *weakSelf = self;
                [self addCacheKey:cacheKey withCompletionBlock:^(BOOL resul) {
                    __strong JMCache *strongSelf = weakSelf;
                    if (strongSelf.cachePathType & JMCacheTypeInMemory) {
                        [strongSelf.cacheInMemory cacheObject:obj forKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                            dispatch_optional_queue_async(strongSelf.preferredCompletionQueue,^{
                                JM_BLOCK_SAFE_RUN(block,res, nil);
                            });
                        }];
                    } else {
                        dispatch_optional_queue_async(strongSelf.preferredCompletionQueue,^{
                            JM_BLOCK_SAFE_RUN(block,res, nil);
                        });
                    }
                }];
            }
        };

        if (self.cacheType & JMCacheTypeOnDisk) {
            [self encodeObject:obj inFilePath:path withCompletionBlock:block2];
        } else {
            block2(YES);
        }
    });
}

//Remove cached data
- (void)removeObjectForKey:(NSString *)key withCompletionBlock:(JMCacheCompletionBlockBoolError)block
{
    dispatch_async(propertySafeQueue, ^{
        JMCacheKey *cacheKey = [self cacheKeyForKey:key];
        if (cacheKey) {
            NSString *path = [self filePathForKey:cacheKey.key];
            NSError *error;
            [[NSFileManager defaultManager] removeItemAtPath:path error:&error];

            __weak JMCache *weakSelf = self;
            [self removeCacheKey:cacheKey withCompletionBlock:^(BOOL resul) {
                __strong JMCache *strongSelf = weakSelf;
                [strongSelf.cacheInMemory removeCachedObjectInMemoryForKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                    dispatch_optional_queue_async(strongSelf.preferredCompletionQueue,^{
                        JM_BLOCK_SAFE_RUN(block,YES, error);
                    });
                }];
            }];
        } else {
            dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                JM_BLOCK_SAFE_RUN(block,NO, [NSError jmCacheErrorWithType:JMCacheErrorTypeKeyNotFoundInCache]);
            });
        }
    });
}

- (void)clearCacheWithCompletionBlock:(JMCacheCompletionBlockBool)block;
{
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
        dispatch_group_t group = dispatch_group_create();

        for(NSString *key in [self.allKeys valueForKey:@"key"]){
            dispatch_group_enter(group);
            [self removeObjectForKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                dispatch_group_leave(group);
            }];
        }

        dispatch_group_wait(group, DISPATCH_TIME_FOREVER);
        dispatch_optional_queue_async(self.preferredCompletionQueue,^{
            JM_BLOCK_SAFE_RUN(block,YES);
        });
    });
}

#pragma mark - Sync Get Cached data

- (id)objectForKey:(NSString *)key
{
    if (!key)
        return nil;

    __block id objectForKey = nil;

    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

    [self objectForKey:key withCompletionBlock:^(id obj, NSError *error) {
        objectForKey = obj;

        if (self.cachePathType & JMCacheTypeInMemory) {
            [self.cacheInMemory cacheObject:obj forKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                dispatch_semaphore_signal(semaphore);
            }];
        } else {
            dispatch_semaphore_signal(semaphore);
        }
    }];

    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
    return objectForKey;
}

- (BOOL)setObject:(NSObject *)obj forKey:(NSString *)key
{
    if (!key)
        return NO;

    __block BOOL bresult = NO;

    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
    __weak JMCache *weakSelf = self;
    [self setObject:obj forKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
        __strong JMCache *strongSelf = weakSelf;
        bresult = resul;
        if (strongSelf.cachePathType & JMCacheTypeInMemory) {
            [strongSelf.cacheInMemory removeCachedObjectInMemoryForKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                dispatch_semaphore_signal(semaphore);
            }];
        } else {
            dispatch_semaphore_signal(semaphore);
        }
    }];

    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
    return bresult;
}

- (NSInteger)numberOfCachedObjects
{
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
    __block NSInteger nb = 0;
    [self allKeysWithCompletionBlock:^(id obj) {
        nb = [obj count];
        dispatch_semaphore_signal(semaphore);
    }];

    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
    return nb;
}

#pragma mark - Private methods disk cache

- (void)cachedObjectOnDiskForKey:(NSString *)key withCompletionBlock:(JMCacheCompletionBlockObjectError)block
{
    dispatch_async(propertySafeQueue, ^{
        JMCacheKey *cacheKey = [self cacheKeyForKey:key];
        if (cacheKey) {
            NSString *path = [self filePathForKey:key];

            if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
                dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                    JM_BLOCK_SAFE_RUN(block,nil,[NSError jmCacheErrorWithType:JMCacheErrorTypeFileMissing]);
                });
                return ;
            }

            [self decodeObjectForFilePath:path withCompletionBlock:^(id obj) {
                if (self.cachePathType & JMCacheTypeInMemory) {
                    [self.cacheInMemory cacheObject:obj forKey:key withCompletionBlock:^(BOOL resul, NSError *error) {
                        dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                            JM_BLOCK_SAFE_RUN(block,obj,nil);
                        });
                    }];
                } else {
                    dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                        JM_BLOCK_SAFE_RUN(block,obj,nil);
                    });
                }
            }];
        } else {
            dispatch_optional_queue_async(self.preferredCompletionQueue,^{
                JM_BLOCK_SAFE_RUN(block,nil,[NSError jmCacheErrorWithType:JMCacheErrorTypeKeyNotFoundInCache]);
            });
        }
    });
}

#pragma mark - Private methods Cache keys

- (void)addCacheKey:(JMCacheKey *)cacheKey withCompletionBlock:(JMCacheCompletionBlockBool)block
{
    dispatch_async(propertySafeQueue, ^{
        [self.allKeys addObject:cacheKey];
        if (self.cacheType & JMCacheTypeOnDisk) {
            [self encodeObject:self.allKeys inFilePath:[self filePathForAllKeys] useTransformer:NO withCompletionBlock:block];
        } else {
            block(YES);
        }
    });
}

- (void)removeCacheKey:(JMCacheKey *)cacheKey withCompletionBlock:(JMCacheCompletionBlockBool)block
{
    dispatch_async(propertySafeQueue, ^{
        [self.allKeys removeObject:cacheKey];
        if (self.cacheType & JMCacheTypeOnDisk) {
            [self encodeObject:self.allKeys inFilePath:[self filePathForAllKeys] useTransformer:NO withCompletionBlock:block];
        } else {
            block(YES);
        }
    });
}

- (JMCacheKey *)cacheKeyForKey:(NSString *)key
{
    if (self.allKeys == nil) {
        [self loadKeys];
    }

    NSInteger index = [[self.allKeys valueForKey:@"key"] indexOfObject:key];
    if (index != NSNotFound) {
        return self.allKeys[index];
    }

    return nil;
}

- (void)loadKeys
{
    @try {
        NSString *path = [self filePathForAllKeys];
        _allKeys = [[self decodeObjectForFilePath:path useTransformer:NO] mutableCopy];
        if (nil == _allKeys) {
            _allKeys = [NSMutableArray new];
        }
    }
    @catch (NSException *exception) {
        //Probably decode impossible because of valueTransformer
    }
    @finally {

    }

}

- (void)loadKeysWithCompletionBlock:(JMCacheCompletionBlockBool)block
{
    dispatch_async(propertySafeQueue, ^{
        [self loadKeys];
        block(YES);
    });
}

- (void)allKeysWithCompletionBlock:(JMCacheCompletionBlockObject)block
{
    dispatch_async(propertySafeQueue, ^{
        block([self.allKeys copy]);
    });
}

- (NSString *)description
{
    NSMutableString *desc = [NSMutableString new];
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

    __block NSArray *allCacheKeys;
    [self allKeysWithCompletionBlock:^(id obj) {
        allCacheKeys = obj;
        dispatch_semaphore_signal(semaphore);
    }];

    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);

    for (JMCacheKey *cacheKey in allCacheKeys) {
        [desc appendFormat:@"%@ (class : %@)\n", cacheKey.key,NSStringFromClass(cacheKey.objClass)];
    }

    return desc;
}

@end


text:
package com.necla.simba.protocol;
// Generated by proto2javame, Sun Feb 08 14:12:26 KST 2015.

import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import net.jarlehansen.protobuf.javame.UninitializedMessageException;
import net.jarlehansen.protobuf.javame.input.InputReader;
import net.jarlehansen.protobuf.javame.input.DelimitedInputStream;
import net.jarlehansen.protobuf.javame.input.DelimitedSizeUtil;
import net.jarlehansen.protobuf.javame.ComputeSizeUtil;
import net.jarlehansen.protobuf.javame.output.OutputWriter;
import net.jarlehansen.protobuf.javame.AbstractOutputWriter;
import net.jarlehansen.protobuf.javame.input.taghandler.UnknownTagHandler;
import net.jarlehansen.protobuf.javame.input.taghandler.DefaultUnknownTagHandlerImpl;

public final class ObjectFragment extends AbstractOutputWriter {
	private static UnknownTagHandler unknownTagHandler = DefaultUnknownTagHandlerImpl.newInstance();

	private final int trans_id;
	private static final int fieldNumberTrans_id = 1;

	private final int oid;
	private static final int fieldNumberOid = 2;

	private final int offset;
	private static final int fieldNumberOffset = 3;

	private final net.jarlehansen.protobuf.javame.ByteString data;
	private static final int fieldNumberData = 4;

	private final boolean eof;
	private static final int fieldNumberEof = 5;
	private final boolean hasEof;

	public static Builder newBuilder() {
		return new Builder();
	}

	private ObjectFragment(final Builder builder) {
		if (builder.hasTrans_id && builder.hasOid && builder.hasOffset && builder.hasData ) {
			this.trans_id = builder.trans_id;
			this.oid = builder.oid;
			this.offset = builder.offset;
			this.data = builder.data;
			this.eof = builder.eof;
			this.hasEof = builder.hasEof;
		} else {
			throw new UninitializedMessageException("Not all required fields were included (false = not included in message), " +
				" trans_id:" + builder.hasTrans_id + " oid:" + builder.hasOid + " offset:" + builder.hasOffset + " data:" + builder.hasData + "");
		}
	}

	public static class Builder {
		private int trans_id;
		private boolean hasTrans_id = false;

		private int oid;
		private boolean hasOid = false;

		private int offset;
		private boolean hasOffset = false;

		private net.jarlehansen.protobuf.javame.ByteString data;
		private boolean hasData = false;

		private boolean eof;
		private boolean hasEof = false;

		private Builder() {
		}

		public Builder setTrans_id(final int trans_id) {
			this.trans_id = trans_id;
			this.hasTrans_id = true;
			return this;
		}

		public Builder setOid(final int oid) {
			this.oid = oid;
			this.hasOid = true;
			return this;
		}

		public Builder setOffset(final int offset) {
			this.offset = offset;
			this.hasOffset = true;
			return this;
		}

		public Builder setData(final net.jarlehansen.protobuf.javame.ByteString data) {
			this.data = data;
			this.hasData = true;
			return this;
		}

		public Builder setEof(final boolean eof) {
			this.eof = eof;
			this.hasEof = true;
			return this;
		}

		public ObjectFragment build() {
			return new ObjectFragment(this);
		}
	}

	public int getTrans_id() {
		return trans_id;
	}

	public int getOid() {
		return oid;
	}

	public int getOffset() {
		return offset;
	}

	public net.jarlehansen.protobuf.javame.ByteString getData() {
		return data;
	}

	public boolean getEof() {
		return eof;
	}

	public boolean hasEof() {
		return hasEof;
	}

	public String toString() {
		final String TAB = "   ";
		String retValue = "";
		retValue += this.getClass().getName() + "(";
		retValue += "trans_id = " + this.trans_id + TAB;
		retValue += "oid = " + this.oid + TAB;
		retValue += "offset = " + this.offset + TAB;
		retValue += "data = " + this.data + TAB;
		if(hasEof) retValue += "eof = " + this.eof + TAB;
		retValue += ")";

		return retValue;
	}

	// Override
	public int computeSize() {
		int totalSize = 0;
		totalSize += ComputeSizeUtil.computeIntSize(fieldNumberTrans_id, trans_id);
		totalSize += ComputeSizeUtil.computeIntSize(fieldNumberOid, oid);
		totalSize += ComputeSizeUtil.computeIntSize(fieldNumberOffset, offset);
		totalSize += ComputeSizeUtil.computeByteStringSize(fieldNumberData, data);
		if(hasEof) totalSize += ComputeSizeUtil.computeBooleanSize(fieldNumberEof, eof);
		totalSize += computeNestedMessageSize();

		return totalSize;
	}

	private int computeNestedMessageSize() {
		int messageSize = 0;

		return messageSize;
	}

	// Override
	public void writeFields(final OutputWriter writer) throws IOException {
		writer.writeInt(fieldNumberTrans_id, trans_id);
		writer.writeInt(fieldNumberOid, oid);
		writer.writeInt(fieldNumberOffset, offset);
		writer.writeByteString(fieldNumberData, data);
		if(hasEof) writer.writeBoolean(fieldNumberEof, eof);
	}

	static ObjectFragment parseFields(final InputReader reader) throws IOException {
		int nextFieldNumber = getNextFieldNumber(reader);
		final ObjectFragment.Builder builder = ObjectFragment.newBuilder();

		while (nextFieldNumber > 0) {
			if(!populateBuilderWithField(reader, builder, nextFieldNumber)) {
				reader.getPreviousTagDataTypeAndReadContent();
			}
			nextFieldNumber = getNextFieldNumber(reader);
		}

		return builder.build();
	}

	static int getNextFieldNumber(final InputReader reader) throws IOException {
		return reader.getNextFieldNumber();
	}

	static boolean populateBuilderWithField(final InputReader reader, final Builder builder, final int fieldNumber) throws IOException {
		boolean fieldFound = true;
		switch (fieldNumber) {
			case fieldNumberTrans_id:
				builder.setTrans_id(reader.readInt(fieldNumber));
				break;
			case fieldNumberOid:
				builder.setOid(reader.readInt(fieldNumber));
				break;
			case fieldNumberOffset:
				builder.setOffset(reader.readInt(fieldNumber));
				break;
			case fieldNumberData:
				builder.setData(reader.readByteString(fieldNumber));
				break;
			case fieldNumberEof:
				builder.setEof(reader.readBoolean(fieldNumber));
				break;
		default:
			fieldFound = false;
		}
		return fieldFound;
	}

	public static void setUnknownTagHandler(final UnknownTagHandler unknownTagHandler) {
		ObjectFragment.unknownTagHandler = unknownTagHandler;
	}

	public static ObjectFragment parseFrom(final byte[] data) throws IOException {
		return parseFields(new InputReader(data, unknownTagHandler));
	}

	public static ObjectFragment parseFrom(final InputStream inputStream) throws IOException {
		return parseFields(new InputReader(inputStream, unknownTagHandler));
	}

	public static ObjectFragment parseDelimitedFrom(final InputStream inputStream) throws IOException {
		final int limit = DelimitedSizeUtil.readDelimitedSize(inputStream);
		return parseFields(new InputReader(new DelimitedInputStream(inputStream, limit), unknownTagHandler));
	}
}


text:
/*jshint esversion: 6 */

const express = require('express');
const router = express.Router();

router.get('/', function(req, res) {
  res.render('dashboard/index');
});

module.exports = router;


text:
<?php
namespace Aspose\Tasks\WorkingWithCurrencies;

use com\aspose\tasks\Project as Project;
use com\aspose\tasks\Prj as Prj;
use com\aspose\tasks\SaveFileFormat as SaveFileFormat;
class CurrencyDigits{

    public static function run($dataDir=null){

        # Getting Currency Digits
        CurrencyDigits::get_currency_digits($dataDir);

    	# Getting Currency Digits
    	CurrencyDigits::set_currency_digits($dataDir);
    }

    public static function get_currency_digits($dataDir=null){

        # Instantiate project object
        $project = new Project($dataDir . 'test_tasks.mpp');

        $prj=new Prj();
        print "Currency Digits: " . (string)$project->get($prj->CURRENCY_DIGITS).PHP_EOL;//.to_string
    }

    public static function set_currency_digits($dataDir=null){

        # Instantiate project object
        $project = new Project($dataDir . 'test_tasks.mpp');

        $prj=new Prj();
        $project->set($prj->CURRENCY_DIGITS, 2);

        $saveFileFormat=new SaveFileFormat();
        $project->save($dataDir . "ProjectCurrDigits.mpp", $saveFileFormat->MPP);
        print "Set currency digits.".PHP_EOL;
    }

}
?>


text:
.class Lcom/htc/server/WirelessDisplayService$13;
.super Landroid/content/BroadcastReceiver;
.source "WirelessDisplayService.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/htc/server/WirelessDisplayService;-><init>(Landroid/content/Context;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/htc/server/WirelessDisplayService;

# direct methods
.method constructor <init>(Lcom/htc/server/WirelessDisplayService;)V
    .locals 0

    .prologue
    .line 2895
    iput-object p1, p0, Lcom/htc/server/WirelessDisplayService$13;->this$0:Lcom/htc/server/WirelessDisplayService;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method

# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "intent"    # Landroid/content/Intent;

    .prologue
    .line 2898
    const-string v1, "existing"

    const/4 v2, 0x0

    invoke-virtual {p2, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    .line 2899
    .local v0, "mLiteConnected":Z
    # getter for: Lcom/htc/server/WirelessDisplayService;->DBG:Z
    invoke-static {}, Lcom/htc/server/WirelessDisplayService;->access$4100()Z

    move-result v1

    if-eqz v1, :cond_0

    const-string v1, "WirelessDisplayService"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "com.htc.accessory.action.CONNECTION_EXISTING. mLiteConnected = "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 2900
    :cond_0
    # getter for: Lcom/htc/server/WirelessDisplayService;->isLiteConnected:Ljava/util/concurrent/atomic/AtomicBoolean;
    invoke-static {}, Lcom/htc/server/WirelessDisplayService;->access$9500()Ljava/util/concurrent/atomic/AtomicBoolean;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V

    .line 2901
    return-void
.end method


text:
License: MIT https://github.com/questnet/FSCS-Lensgenerator/blob/master/LICENSE

### bundled binaries ###

FSharp.Core: MIT https://github.com/Microsoft/visualfsharp/blob/master/License.txt
.net: MIT https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT
.net Core: https://github.com/dotnet/corefx/blob/master/LICENSE.TXT

### libraries ###