text:
package Views.Home.Menu;

import android.content.Context;
import android.graphics.Canvas;
import android.util.Log;

import com.linedeer.api.call;
import com.linedeer.player.Ui;
import com.shape.Library.Icon.albumIcon;
import com.shape.Library.Icon.artistIcon;
import com.shape.Library.Icon.folderIcon;
import com.shape.Library.Icon.genreIcon;
import com.shape.Library.Icon.playAllIcon;
import com.shape.Library.Icon.settingIcon;
import com.shape.Library.Icon.songsIcon;
import com.shape.Library.allsong.songIcon;
import com.shape.home.menu.backgroundImg;
import com.shape.home.menu.btmBack;

import Views.ContentHome;
import Views.api.FMView;
import Views.api.FMlyt;
import Views.api.shapeImg;
import Views.radiusSqure;
import Views.textImg;

public class Home extends FMlyt {

    radiusSqure rs;
    radiusSqure btm;
    public Home(Context context, int width, int height) {
        super(context, width, height);
        setBackgroundColor(0x00000000);

        init();

        rs = new radiusSqure(width,this.height - Ui.cd.getHt(70),0,0, Ui.cd.getHt(13), Ui.cd.getHt(13),0,0);
        rs.setColor(backgroundImg.Color0);
        addShape(rs);

        btm = new radiusSqure(width, Ui.cd.getHt(70),0,this.height - Ui.cd.getHt(70),0,0, Ui.cd.getHt(13), Ui.cd.getHt(13));
        btm.setColor(btmBack.Color0);
        addShape(btm);

        settingBtn setting = new settingBtn(getContext(), Ui.cd.getHt(100), Ui.cd.getHt(50));
        setting.setX(rs.width - setting.width - Ui.cd.getHt(10));
        setting.setY(rs.height + Ui.cd.getHt(10));
        setting.onClick(new call(){
            @Override
            public void onCall(boolean bl) {
                Ui.bk.back();
                ContentHome.This.opneNotice();
            }
        });
        addView(setting);
    }

    class settingBtn extends  FMView{
        radiusSqure rs;
        public settingBtn(Context context, int width, int height) {
            super(context, width, height);

            textImg text = new textImg(0,0,0,0, Ui.cd.getHt(14));
            text.setText("SETTING");
            text.InCenter(width,height);
            text.setX(Ui.cd.getHt(10));
            addShape(text);

            shapeImg img = settingIcon.getShape();
            img.setSize(height,height);
            addShape(img);

            setSize((int) (text.width + Ui.cd.getHt(10) + img.width),height);

            img.setX((int) (this.width - img.width ));

              rs = new radiusSqure(this.width,this.height,0,0, Ui.cd.getHt(13));
            //addShape(rs);

            setRipple(true,0.3f);
        }

        @Override
        protected void onDraw(Canvas canvas) {
            super.postDraw(canvas);
            super.drawShape(canvas);
            super.afterDraw(canvas,rs.S0);
        }
    }

    void init(){
        int len = 4;
        int line = 2;
        int spaceWidth = Ui.cd.getHt(15);
        int paddingWidth = Ui.cd.getHt(15);
        int itemWidth = (int)(((float)width - Ui.cd.getHt(15 * (len + 1))) / len);
        int itemHeight = (int)(itemWidth * 1.5f);
        int iconSize = (int)(itemWidth * 0.7f);

        for(int i = 0;i < len;i++){
            for(int j = 0;j < line;j++){
                if((j*len) + i < 6){
                    Item item = new Item(getContext(),itemWidth,itemHeight);

                    //item.setBackgroundColor(0xFFCCCCCC);
                    item.setX((i * itemWidth) + (i * spaceWidth) + spaceWidth);
                    item.setY((j * itemHeight) + (spaceWidth * (j + 1)));
                    addView(item);
                    Log.i("My","(i*len) + j = " + ((i*len) + j));
                    switch ((j*len) + i){
                        case 0:
                            item.setData("All SONG", new songsIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(1);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        case 1:
                            item.setData("ALBUMS",new albumIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(2);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        case 2:
                            item.setData("ARTISTS",new artistIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(3);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        case 3:
                            item.setData("GENERS",new genreIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(4);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        case 4:
                            item.setData("FOLDERS",new folderIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(5);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        case 5:
                            item.setData("PLAYLISTS",new playAllIcon(iconSize,iconSize,0,0));
                            item.onClick(new call(){
                                @Override
                                public void onCall(boolean bl) {
                                    ContentHome.This.closelibMenu();
                                    ContentHome.This.MenuHome.openPage(0);
                                    ContentHome.This.openMusucLibrery();
                                }
                            });
                            break;
                        default:
                            item.setData("NONE", songIcon.getShape());
                    }
                }

            }
        }

        setSize(width,(line * itemHeight) + ((line+2) * spaceWidth) + Ui.cd.getHt(60));
    }
}


text:
/***************************************************************************
 * config.c:
 *
 * Routines to assist with the configuration of a SeedLink connection
 * description.
 *
 * Written by Chad Trabant, ORFEUS/EC-Project MEREDIAN
 *
 * modified: 2013.305
 ***************************************************************************/

#include <errno.h>
#include <stdio.h>
#include <string.h>

#include "libslink.h"

/***************************************************************************
 * sl_read_streamlist:
 *
 * Read a list of streams and selectors from a file and add them to the
 * stream chain for configuring a multi-station connection.
 *
 * If 'defselect' is not NULL or 0 it will be used as the default selectors
 * for entries will no specific selectors indicated.
 *
 * The file is expected to be repeating lines of the form:
 *   <NET> <STA> [selectors]
 * For example:
 * --------
 * # Comment lines begin with a '#' or '*'
 * GE ISP  BH?.D
 * NL HGN
 * MN AQU  BH?  HH?
 * --------
 *
 * Returns the number of streams configured or -1 on error.
 ***************************************************************************/
int
sl_read_streamlist (SLCD *slconn, const char *streamfile,
                    const char *defselect)
{
  char net[3];
  char sta[6];
  char selectors[100];
  char line[100];
  int streamfd;
  int fields;
  int count;
  int stacount;

  net[0]       = '\0';
  sta[0]       = '\0';
  selectors[0] = '\0';

  /* Open the stream list file */
  if ((streamfd = slp_openfile (streamfile, 'r')) < 0)
  {
    if (errno == ENOENT)
    {
      sl_log_r (slconn, 2, 0, "could not find stream list file: %s\n", streamfile);
      return -1;
    }
    else
    {
      sl_log_r (slconn, 2, 0, "opening stream list file, %s\n", strerror (errno));
      return -1;
    }
  }

  sl_log_r (slconn, 1, 1, "Reading stream list from %s\n", streamfile);

  count    = 1;
  stacount = 0;

  while ((sl_readline (streamfd, line, sizeof (line))) >= 0)
  {
    fields = sscanf (line, "%2s %5s %99[a-zA-Z0-9!?. ]\n",
                     net, sta, selectors);

    /* Ignore blank or comment lines */
    if (fields < 0 || net[0] == '#' || net[0] == '*')
      continue;

    if (fields < 2)
    {
      sl_log_r (slconn, 2, 0, "cannot parse line %d of stream list\n", count);
    }

    /* Add this stream to the stream chain */
    if (fields == 3)
    {
      sl_addstream (slconn, net, sta, selectors, -1, NULL);
      stacount++;
    }
    else
    {
      sl_addstream (slconn, net, sta, defselect, -1, NULL);
      stacount++;
    }

    count++;
  }

  if (stacount == 0)
  {
    sl_log_r (slconn, 2, 0, "no streams defined in %s\n", streamfile);
  }
  else if (stacount > 0)
  {
    sl_log_r (slconn, 1, 2, "Read %d streams from %s\n", stacount, streamfile);
  }

  if (close (streamfd))
  {
    sl_log_r (slconn, 2, 0, "closing stream list file, %s\n", strerror (errno));
    return -1;
  }

  return count;
} /* End of sl_read_streamlist() */

/***************************************************************************
 * sl_parse_streamlist:
 *
 * Parse a string of streams and selectors and add them to the stream
 * chain for configuring a multi-station connection.
 *
 * The string should be of the following form:
 * "stream1[:selectors1],stream2[:selectors2],..."
 *
 * For example:
 * "IU_KONO:BHE BHN,GE_WLF,MN_AQU:HH?.D"
 *
 * Returns the number of streams configured or -1 on error.
 ***************************************************************************/
int
sl_parse_streamlist (SLCD *slconn, const char *streamlist,
                     const char *defselect)
{
  int count = 0;
  int fields;

  const char *staselect;
  char *net;
  char *sta;

  SLstrlist *ringlist   = NULL; /* split streamlist on ',' */
  SLstrlist *reqlist    = NULL; /* split ringlist on ':' */
  SLstrlist *netstalist = NULL; /* split reqlist[0] on "_" */

  SLstrlist *ringptr   = NULL;
  SLstrlist *reqptr    = NULL;
  SLstrlist *netstaptr = NULL;

  /* Parse the streams and selectors */
  sl_strparse (streamlist, ",", &ringlist);
  ringptr = ringlist;

  while (ringptr != 0)
  {
    net       = NULL;
    sta       = NULL;
    staselect = NULL;

    fields = sl_strparse (ringptr->element, ":", &reqlist);
    reqptr = reqlist;

    /* Fill in the NET and STA fields */
    if (sl_strparse (reqptr->element, "_", &netstalist) != 2)
    {
      sl_log_r (slconn, 2, 0, "not in NET_STA format: %s\n", reqptr->element);
      count = -1;
    }
    else
    {
      /* Point to the first element, should be a network code */
      netstaptr = netstalist;
      if (strlen (netstaptr->element) == 0)
      {
        sl_log_r (slconn, 2, 0, "not in NET_STA format: %s\n",
                  reqptr->element);
        count = -1;
      }
      net = netstaptr->element;

      /* Point to the second element, should be a station code */
      netstaptr = netstaptr->next;
      if (strlen (netstaptr->element) == 0)
      {
        sl_log_r (slconn, 2, 0, "not in NET_STA format: %s\n",
                  reqptr->element);
        count = -1;
      }
      sta = netstaptr->element;
    }

    if (fields > 1)
    { /* Selectors were included */
      /* Point to the second element of reqptr, should be selectors */
      reqptr = reqptr->next;
      if (strlen (reqptr->element) == 0)
      {
        sl_log_r (slconn, 2, 0, "empty selector: %s\n", reqptr->element);
        count = -1;
      }
      staselect = reqptr->element;
    }
    else /* If no specific selectors, use the default */
    {
      staselect = defselect;
    }

    /* Add this to the stream chain */
    if (count != -1)
    {
      sl_addstream (slconn, net, sta, staselect, -1, 0);
      count++;
    }

    /* Free the netstalist (the 'NET_STA' part) */
    sl_strparse (NULL, NULL, &netstalist);

    /* Free the reqlist (the 'NET_STA:selector' part) */
    sl_strparse (NULL, NULL, &reqlist);

    ringptr = ringptr->next;
  }

  if (netstalist != NULL)
  {
    sl_strparse (NULL, NULL, &netstalist);
  }
  if (reqlist != NULL)
  {
    sl_strparse (NULL, NULL, &reqlist);
  }

  if (count == 0)
  {
    sl_log_r (slconn, 2, 0, "no streams defined in stream list\n");
  }
  else if (count > 0)
  {
    sl_log_r (slconn, 1, 2, "Parsed %d streams from stream list\n", count);
  }

  /* Free the ring list */
  sl_strparse (NULL, NULL, &ringlist);

  return count;
} /* End of sl_parse_streamlist() */

redpajama_set_name: RedPajamaGithub


text:
namespace FIX50SP2
{

  class TradingSessionListUpdateReport : public Message
  {
  public:
    TradingSessionListUpdateReport() : Message(MsgType()) {}
    TradingSessionListUpdateReport(const FIX::Message& m) : Message(m) {}
    TradingSessionListUpdateReport(const Message& m) : Message(m) {}
    TradingSessionListUpdateReport(const TradingSessionListUpdateReport& m) : Message(m) {}
    static FIX::MsgType MsgType() { return FIX::MsgType("BS"); }

    FIELD_SET(*this, FIX::ApplID);
    FIELD_SET(*this, FIX::ApplSeqNum);
    FIELD_SET(*this, FIX::ApplLastSeqNum);
    FIELD_SET(*this, FIX::ApplResendFlag);
    FIELD_SET(*this, FIX::TradSesReqID);
    FIELD_SET(*this, FIX::NoTradingSessions);
    class NoTradingSessions: public FIX::Group
    {
    public:
    NoTradingSessions() : FIX::Group(386,336,FIX::message_order(336,625,207,1301,1300,1326,338,339,325,340,567,341,342,343,344,345,387,58,354,355,60,1327,0)) {}
      FIELD_SET(*this, FIX::TradingSessionID);
      FIELD_SET(*this, FIX::TradingSessionSubID);
      FIELD_SET(*this, FIX::SecurityExchange);
      FIELD_SET(*this, FIX::MarketID);
      FIELD_SET(*this, FIX::MarketSegmentID);
      FIELD_SET(*this, FIX::TradingSessionDesc);
      FIELD_SET(*this, FIX::TradSesMethod);
      FIELD_SET(*this, FIX::TradSesMode);
      FIELD_SET(*this, FIX::UnsolicitedIndicator);
      FIELD_SET(*this, FIX::TradSesStatus);
      FIELD_SET(*this, FIX::TradSesStatusRejReason);
      FIELD_SET(*this, FIX::TradSesStartTime);
      FIELD_SET(*this, FIX::TradSesOpenTime);
      FIELD_SET(*this, FIX::TradSesPreCloseTime);
      FIELD_SET(*this, FIX::TradSesCloseTime);
      FIELD_SET(*this, FIX::TradSesEndTime);
      FIELD_SET(*this, FIX::TotalVolumeTraded);
      FIELD_SET(*this, FIX::Text);
      FIELD_SET(*this, FIX::EncodedTextLen);
      FIELD_SET(*this, FIX::EncodedText);
      FIELD_SET(*this, FIX::TransactTime);
      FIELD_SET(*this, FIX::TradSesUpdateAction);
    };
  };

}

#endif


text:
<configuration>
    <!--
See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
Esri Inc. 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.
-->

    <!--
  If on webserver and you may have search results with services, or search urls
  that do not have a crossdomain.xml then it can be used.

  @proxyUrl is optional.  If empty, the default jsp or php or asp file will be
    used. If you are using ESRI Situational Awareness then it recommmended you use
    this attribute.
   -->
    <useProxy proxyUrl="">true</useProxy>

    <!--
  /gptEndPoint - Elements pointing to gpt end points
  @name will be listed in the drop down
  @url Can be relative or aboulute.  url to the rest
     endpoint(e.g. ./rest/find/document?f=georss) or to the rest repositories list
     (e.g. /rest/repositories?f=xml).  Must be to xml endpoint only
  @linkParserId is linked to element linkParser. if left out, "default" assumed
  @useNameAsPrefix if url points to repositories list then the attribute
     specifies whether the @name should be used as the prefix
  -->
    <gptEndpoint url="rest/find/document"
      name="Default Site"/>
    <gptEndpoint url="rest/find/document?rid=ArcGIS.com"
      name="ArcGIS.com"/>
    <gptEndpoint url="rest/repositories?f=xml"
      name="Default Site: " useNameAsPrefix="true"/>

    <!-- GP Service needs to be set up for this to work. Feature coming next
  release after GPT version 10 -->
    <gpShapefile
       url="http://{host}/ArcGIS/rest/services/toJson/GPServer/convertShp/"/>
    <gpKmlfile
       url="http://{host}/ArcGIS/rest/services/toJson/GPServer/convertKML"/>

    <!-- Other Configurations -->
    <searchTimeout>90</searchTimeout>
    <!-- Seconds -->
    <addLayerTimeout>90</addLayerTimeout>
    <!-- Seconds -->
    <numOfResultsPerPage>10</numOfResultsPerPage>
    <iconSearch>assets/images/i_searchtext.png</iconSearch>
    <iconResult>assets/images/i_table.png</iconResult>
    <iconHelp>assets/images/i_help.png</iconHelp>

    <zoomFactor>1</zoomFactor>
    <urlHelp>http://help.arcgis.com/en/geoportal_extension/10.0/help/index.html#//00t00000002v000000.htm</urlHelp>

    <!-- regWebContext =  Used to match the webcontext so as to automate getting the
  endpoint for relative URLS -->
    <regWebContext>.*\/{2}[^\/]*\/[^\/]*</regWebContext>

    <linkParser id="default">
        <!--
    Detects if the gptEndpoint is a url to an xml document with a list of xml documents
     -->
        <regDetectEndpointListUrl>.*rest\/repositories.*</regDetectEndpointListUrl>
        <!-- regExtractExtSearchPrfx - The url specified in gptEndpoint will be processed to determine then remote/external search
    site id in the same site as the gpt endpoint
    - The regExtract* elements can take a @replaceDelimeter and an @delimeter.  if you have
      (reg[replaceDelimeter]string[delimeter])* the reg will be used with to look for section
      to replaces with the string
     -->
        <regExtractExtSearchPrfx replaceDelimeter="|" delimeter="~">repositories.*|find/document?rid={id}</regExtractExtSearchPrfx>
        <!-- Watch out for escaped url special chracters.
      Most likely they will be escaped
      The regexs below work by using string.replace(reg, "").  -->
        <regDetectMapLinkProvider><![CDATA[.*command.addToMap.*|.*resources=map%3(A|a).*%40.*|.*livedata.*preview.page.*]]></regDetectMapLinkProvider>
        <regExtractMapservice delimeter="~"><![CDATA[.*resources=map%3(A|a).*%40~.*livedata.*preview.page.*url=~.*command=addToMap.*server=~&info=.*~&serviceType=.*~&resourceType=.*]]></regExtractMapservice>
        <regExtractMapLinkType delimeter="~"><![CDATA[.*resources=map%3A~%40.*~.*serviceType=~.*resourceType=~&info=.*]]></regExtractMapLinkType>
        <regExcludeLinks><![CDATA[.*resource=.*%3(A|a).*|.*resources=map%3(A|a).*%40.*|.*preview.page.*|.*command.addToMap.*|.*iewer\/index.*]]></regExcludeLinks>
        <!-- Once RegExtractMapService is used, the below will be applied to each type (its unescaped after the extract)
     -->
        <regLinkTypes>
            <!-- Extracted map link type will be matched agains first then the url
      -->
            <wms>
                <regDetect><![CDATA[WMS|wms|.*service=wms.*|.*wmsserver.*|.*com.esri.wms.esrimap.*]]></regDetect>
            </wms>
            <wfs>
                <regDetect><![CDATA[WFS|wfs|.*service=wfs.*|.*wfsserver.*|.*com.esri.wfs.esrimap.*]]></regDetect>
            </wfs>
            <agsRest>
                <regDetect><![CDATA[.*rest\/services.*ap.erver.*]]></regDetect>
            </agsRest>

            <agsRestMapServer>
                <regDetect><![CDATA[.*rest\/services.*ap.erver.*]]></regDetect>
            </agsRestMapServer>

            <agsRestFeatureServer>
                <regDetect><![CDATA[.*rest\/services.*eature.erver.*]]></regDetect>
            </agsRestFeatureServer>

            <agsRestImageServer>
                <regDetect><![CDATA[.*rest\/services.*mage.erver.*]]></regDetect>
            </agsRestImageServer>

            <kml>
                <regDetect><![CDATA[kmz|kml|.*kmz|.*kml]]></regDetect>
            </kml>
            <agsWebmap>
                <regDetect><![CDATA[kmz|kml|.*kmz|.*kml]]></regDetect>
            </agsWebmap>

            <geoRss>
                <regDetect>georss</regDetect>
            </geoRss>
            <arcIms>
                <regDetect><![CDATA[aims|arcims|image|.*servlet.*com.esri.esrimap.Esrimap.*]]></regDetect>
                <regExtractHost delimeter="~"><![CDATA[\/[a-zA-Z|_|-]*$~\/servlet.*com.esri.esrimap.Esrimap.*~.*server=~&service=.*]]></regExtractHost>
                <regExtractServiceName delimeter="~"><![CDATA[.*\/~.*serviceName=~.*ServiceName=~.*service=~&serviceType=.*]]></regExtractServiceName>
            </arcIms>
        </regLinkTypes>
    </linkParser>

    <!-- Color for the bounding boxes -->
    <color id="mainBboxesPlain"
      fillColor="0xFF0000"
      fillAlpha="0.001"
      fillStyle="null"
      outlineColor="0xFF0000"
      outlineWidth="2"
      outlineAlpha="1"
      outlineStyle="solid"/>

    <!-- Color for the bounding boxes if highlighted -->
    <color id="mainBboxesHighlight"
      fillColor="0xFF0000"
      fillStyle="null"
      fillAlpha="0.001"
      outlineColor="0xFF0000"
      outlineWidth="5"
      outlineAlpha="1"
      outlineStyle="solid"/>

</configuration>


text:
'use strict';

angular.module('core').controller('HomeController', ['$scope', 'Authentication', 'Users',
	function($scope, Authentication, Users) {
		// This provides Authentication context.
		$scope.authentication = Authentication;

        $scope.showSignUp = function() {
            if ($scope.authentication.user != "") {
                return false;
            } else {
                return true;
            }
        }

        // Find a list of Users
		$scope.findUsers = function() {
			$scope.users = Users.query();
		};

        // Find a list of Users
        $scope.userExists = function() {
        	return false;
        }
	}
]);


text:
namespace {

extern "C" {
void __sanitizer_weak_hook_compare_bytes(void *caller_pc, const void *s1,
                                         const void *s2, std::size_t n1,
                                         std::size_t n2, int result);
void __sanitizer_weak_hook_memmem(void *called_pc, const void *s1, size_t len1,
                                  const void *s2, size_t len2, void *result);
}

inline __attribute__((always_inline)) void *idToPc(jint id) {
  return reinterpret_cast<void *>(static_cast<uintptr_t>(id));
}
}  // namespace

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceStrstr0(
    JNIEnv *env, jclass cls, jbyteArray needle, jint id) {
  jint needle_length = env->GetArrayLength(needle);
  auto *needle_native =
      static_cast<jbyte *>(env->GetPrimitiveArrayCritical(needle, nullptr));
  __sanitizer_weak_hook_memmem(idToPc(id), nullptr, 0, needle_native,
                               needle_length, nullptr);
  env->ReleasePrimitiveArrayCritical(needle, needle_native, JNI_ABORT);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceStrstr0(
    jint needle_length, jbyte *needle_native, jint id) {
  __sanitizer_weak_hook_memmem(idToPc(id), nullptr, 0, needle_native,
                               needle_length, nullptr);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceMemcmp(
    JNIEnv *env, jclass cls, jbyteArray b1, jbyteArray b2, jint result,
    jint id) {
  jint b1_length = env->GetArrayLength(b1);
  jint b2_length = env->GetArrayLength(b2);
  auto *b1_native =
      static_cast<jbyte *>(env->GetPrimitiveArrayCritical(b1, nullptr));
  auto *b2_native =
      static_cast<jbyte *>(env->GetPrimitiveArrayCritical(b2, nullptr));
  __sanitizer_weak_hook_compare_bytes(idToPc(id), b1_native, b2_native,
                                      b1_length, b2_length, result);
  env->ReleasePrimitiveArrayCritical(b1, b1_native, JNI_ABORT);
  env->ReleasePrimitiveArrayCritical(b2, b2_native, JNI_ABORT);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceMemcmp(
    jint b1_length, jbyte *b1, jint b2_length, jbyte *b2, jint result,
    jint id) {
  __sanitizer_weak_hook_compare_bytes(idToPc(id), b1, b2, b1_length, b2_length,
                                      result);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceCmpLong(
    JNIEnv *env, jclass cls, jlong value1, jlong value2, jint id) {
  __sanitizer_cov_trace_cmp8_with_pc(idToPc(id), value1, value2);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceCmpLong(
    jlong value1, jlong value2, jint id) {
  __sanitizer_cov_trace_cmp8_with_pc(idToPc(id), value1, value2);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceCmpInt(
    JNIEnv *env, jclass cls, jint value1, jint value2, jint id) {
  __sanitizer_cov_trace_cmp4_with_pc(idToPc(id), value1, value2);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceCmpInt(
    jint value1, jint value2, jint id) {
  __sanitizer_cov_trace_cmp4_with_pc(idToPc(id), value1, value2);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceConstCmpInt(
    JNIEnv *env, jclass cls, jint value1, jint value2, jint id) {
  __sanitizer_cov_trace_cmp4_with_pc(idToPc(id), value1, value2);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceConstCmpInt(
    jint value1, jint value2, jint id) {
  __sanitizer_cov_trace_cmp4_with_pc(idToPc(id), value1, value2);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceSwitch(
    JNIEnv *env, jclass cls, jlong switch_value,
    jlongArray libfuzzer_case_values, jint id) {
  auto *case_values = static_cast<jlong *>(
      env->GetPrimitiveArrayCritical(libfuzzer_case_values, nullptr));
  __sanitizer_cov_trace_switch_with_pc(
      idToPc(id), switch_value, reinterpret_cast<uint64_t *>(case_values));
  env->ReleasePrimitiveArrayCritical(libfuzzer_case_values, case_values,
                                     JNI_ABORT);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceSwitch(
    jlong switch_value, jint libfuzzer_case_values_length, jlong *case_values,
    jint id) {
  __sanitizer_cov_trace_switch_with_pc(
      idToPc(id), switch_value, reinterpret_cast<uint64_t *>(case_values));
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceDivLong(
    JNIEnv *env, jclass cls, jlong value, jint id) {
  __sanitizer_cov_trace_div8_with_pc(idToPc(id), value);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceDivLong(
    jlong value, jint id) {
  __sanitizer_cov_trace_div8_with_pc(idToPc(id), value);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceDivInt(
    JNIEnv *env, jclass cls, jint value, jint id) {
  __sanitizer_cov_trace_div4_with_pc(idToPc(id), value);
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceDivInt(
    jint value, jint id) {
  __sanitizer_cov_trace_div4_with_pc(idToPc(id), value);
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceGep(
    JNIEnv *env, jclass cls, jlong idx, jint id) {
  __sanitizer_cov_trace_gep_with_pc(idToPc(id), static_cast<uintptr_t>(idx));
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_traceGep(
    jlong idx, jint id) {
  __sanitizer_cov_trace_gep_with_pc(idToPc(id), static_cast<uintptr_t>(idx));
}

[[maybe_unused]] void
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_tracePcIndir(
    JNIEnv *env, jclass cls, jint caller_id, jint callee_id) {
  __sanitizer_cov_trace_pc_indir_with_pc(idToPc(caller_id),
                                         static_cast<uintptr_t>(callee_id));
}

extern "C" [[maybe_unused]] JNIEXPORT void JNICALL
JavaCritical_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_tracePcIndir(
    jint caller_id, jint callee_id) {
  __sanitizer_cov_trace_pc_indir_with_pc(idToPc(caller_id),
                                         static_cast<uintptr_t>(callee_id));
}


text:
package metricsx

import (
	"testing"
	"time"

	"github.com/apache/beam/sdks/v2/go/pkg/beam/core/metrics"
	pipepb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1"
	"github.com/google/go-cmp/cmp"
)

func TestFromMonitoringInfos_Counters(t *testing.T) {
	var value int64 = 15
	want := metrics.CounterResult{
		Attempted: 15,
		Committed: 0,
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customCounter",
			Namespace: "customDoFn",
		}}

	payload, err := Int64Counter(value)
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customCounter",
	}

	mInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(UrnUserSumInt64),
		Type:    UrnToType(UrnUserSumInt64),
		Labels:  labels,
		Payload: payload,
	}

	attempted := []*pipepb.MonitoringInfo{mInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().Counters()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, 1)
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid counter: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}

func TestFromMonitoringInfos_Msec(t *testing.T) {
	want := metrics.MsecResult{
		Attempted: metrics.MsecValue{
			Start:   15 * time.Millisecond,
			Process: 20 * time.Millisecond,
			Finish:  40 * time.Millisecond,
			Total:   25 * time.Millisecond,
		},
		Committed: metrics.MsecValue{
			Start:   0 * time.Millisecond,
			Process: 0 * time.Millisecond,
			Finish:  0 * time.Millisecond,
			Total:   0 * time.Millisecond,
		},
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customCounter",
			Namespace: "customDoFn",
		},
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customCounter",
	}

	startValue, err := Int64Counter(int64(15))
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}
	processValue, err := Int64Counter(int64(20))
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}
	finishValue, err := Int64Counter(int64(40))
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}
	totalValue, err := Int64Counter(int64(25))
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}
	mStartBundleInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(ExecutionMsecUrn(0)),
		Type:    UrnToType(ExecutionMsecUrn(0)),
		Labels:  labels,
		Payload: startValue,
	}
	mProcessBundleInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(ExecutionMsecUrn(1)),
		Type:    UrnToType(ExecutionMsecUrn(1)),
		Labels:  labels,
		Payload: processValue,
	}
	mFinishBundleInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(ExecutionMsecUrn(2)),
		Type:    UrnToType(ExecutionMsecUrn(2)),
		Labels:  labels,
		Payload: finishValue,
	}
	mTotalTimeInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(ExecutionMsecUrn(3)),
		Type:    UrnToType(ExecutionMsecUrn(3)),
		Labels:  labels,
		Payload: totalValue,
	}

	attempted := []*pipepb.MonitoringInfo{mStartBundleInfo, mProcessBundleInfo, mFinishBundleInfo, mTotalTimeInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().Msecs()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, 1)
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid MsecResult: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}

func TestFromMonitoringInfos_PColCounters(t *testing.T) {
	var value int64 = 15
	want := metrics.PColResult{
		Attempted: metrics.PColValue{
			ElementCount: 15,
		},
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customCounter",
			Namespace: "customDoFn",
		}}

	payload, err := Int64Counter(value)
	if err != nil {
		t.Fatalf("Failed to encode Int64Counter: %v", err)
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customCounter",
	}

	mInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(UrnElementCount),
		Type:    UrnToType(UrnElementCount),
		Labels:  labels,
		Payload: payload,
	}

	attempted := []*pipepb.MonitoringInfo{mInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().PCols()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, 1)
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid counter: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}

func TestFromMonitoringInfos_SampledByteSize(t *testing.T) {
	want := metrics.PColResult{
		Attempted: metrics.PColValue{
			SampledByteSize: metrics.DistributionValue{
				Count: 100,
				Sum:   5,
				Min:   -12,
				Max:   30,
			},
		},
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customCounter",
			Namespace: "customDoFn",
		}}

	var count, sum, min, max int64 = 100, 5, -12, 30
	payload, err := Int64Distribution(count, sum, min, max)
	if err != nil {
		t.Fatalf("Failed to encode Int64Distribution: %v", err)
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customCounter",
	}

	mInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(UrnSampledByteSize),
		Type:    UrnToType(UrnSampledByteSize),
		Labels:  labels,
		Payload: payload,
	}

	attempted := []*pipepb.MonitoringInfo{mInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().PCols()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, FromMonitoringInfos(p, attempted, committed).AllMetrics())
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid counter: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}

func TestFromMonitoringInfos_Distributions(t *testing.T) {
	var count, sum, min, max int64 = 100, 5, -12, 30

	want := metrics.DistributionResult{
		Attempted: metrics.DistributionValue{
			Count: 100,
			Sum:   5,
			Min:   -12,
			Max:   30,
		},
		Committed: metrics.DistributionValue{},
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customDist",
			Namespace: "customDoFn",
		}}

	payload, err := Int64Distribution(count, sum, min, max)
	if err != nil {
		t.Fatalf("Failed to encode Int64Distribution: %v", err)
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customDist",
	}

	mInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(UrnUserDistInt64),
		Type:    UrnToType(UrnUserDistInt64),
		Labels:  labels,
		Payload: payload,
	}

	attempted := []*pipepb.MonitoringInfo{mInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().Distributions()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, 1)
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid distribution: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}

func TestFromMonitoringInfos_Gauges(t *testing.T) {
	var value int64 = 100
	loc, _ := time.LoadLocation("Local")
	tm := time.Date(2020, 11, 9, 17, 52, 28, 462*int(time.Millisecond), loc)

	want := metrics.GaugeResult{
		Attempted: metrics.GaugeValue{
			Value:     100,
			Timestamp: tm,
		},
		Committed: metrics.GaugeValue{},
		Key: metrics.StepKey{
			Step:      "main.customDoFn",
			Name:      "customGauge",
			Namespace: "customDoFn",
		}}

	payload, err := Int64Latest(tm, value)
	if err != nil {
		t.Fatalf("Failed to encode Int64Latest: %v", err)
	}

	labels := map[string]string{
		"PTRANSFORM": "main.customDoFn",
		"NAMESPACE":  "customDoFn",
		"NAME":       "customGauge",
	}

	mInfo := &pipepb.MonitoringInfo{
		Urn:     UrnToString(UrnUserLatestMsInt64),
		Type:    UrnToType(UrnUserLatestMsInt64),
		Labels:  labels,
		Payload: payload,
	}

	attempted := []*pipepb.MonitoringInfo{mInfo}
	committed := []*pipepb.MonitoringInfo{}
	p := &pipepb.Pipeline{}

	got := FromMonitoringInfos(p, attempted, committed).AllMetrics().Gauges()
	size := len(got)
	if size != 1 {
		t.Fatalf("Invalid array's size: got: %v, want: %v", size, 1)
	}
	if d := cmp.Diff(want, got[0]); d != "" {
		t.Fatalf("Invalid gauge: got: %v, want: %v, diff(-want,+got):\n %v",
			got[0], want, d)
	}
}


text:
/*	Benjamin DELPY `gentilkiwi`
	http://blog.gentilkiwi.com
	benjamin@gentilkiwi.com
	Licence : http://creativecommons.org/licenses/by/3.0/fr/
*/
#pragma once
#include "globdefs.h"
#include "mod_inject.h"
#include "mod_system.h"
#include "mod_process.h"
#include "mod_service.h"
#include "mod_pipe.h"
#include <iostream>

class mod_mimikatz_inject
{
private:
	static bool injectInPid(DWORD & pid, wstring & libPath, bool isComm = true);
	static void startComm();

public:
	static mod_pipe * monCommunicator;
	static bool closeThisCommunicator();

	static vector<KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND> getMimiKatzCommands();

	static bool pid(vector<wstring> * arguments);
	static bool process(vector<wstring> * arguments);
	static bool service(vector<wstring> * arguments);

	static bool injectlegacy(vector<wstring> * arguments);

};


text:
package command

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net"
	"os"
	"os/exec"
	"os/user"
	"strings"

	"github.com/hashicorp/vault/builtin/logical/ssh"
	"github.com/hashicorp/vault/meta"
	"github.com/mitchellh/mapstructure"
)

// SSHCommand is a Command that establishes a SSH connection
// with target by generating a dynamic key
type SSHCommand struct {
	meta.Meta
}

// Structure to hold the fields returned when asked for a credential from SSHh backend.
type SSHCredentialResp struct {
	KeyType  string `mapstructure:"key_type"`
	Key      string `mapstructure:"key"`
	Username string `mapstructure:"username"`
	IP       string `mapstructure:"ip"`
	Port     string `mapstructure:"port"`
}

func (c *SSHCommand) Run(args []string) int {
	var role, mountPoint, format, userKnownHostsFile, strictHostKeyChecking string
	var noExec bool
	var sshCmdArgs []string
	flags := c.Meta.FlagSet("ssh", meta.FlagSetDefault)
	flags.StringVar(&strictHostKeyChecking, "strict-host-key-checking", "", "")
	flags.StringVar(&userKnownHostsFile, "user-known-hosts-file", "", "")
	flags.StringVar(&format, "format", "table", "")
	flags.StringVar(&role, "role", "", "")
	flags.StringVar(&mountPoint, "mount-point", "ssh", "")
	flags.BoolVar(&noExec, "no-exec", false, "")

	flags.Usage = func() { c.Ui.Error(c.Help()) }
	if err := flags.Parse(args); err != nil {
		return 1
	}

	// If the flag is already set then it takes the precedence. If the flag is not
	// set, try setting it from env var.
	if os.Getenv("VAULT_SSH_STRICT_HOST_KEY_CHECKING") != "" && strictHostKeyChecking == "" {
		strictHostKeyChecking = os.Getenv("VAULT_SSH_STRICT_HOST_KEY_CHECKING")
	}
	// Assign default value if both flag and env var are not set
	if strictHostKeyChecking == "" {
		strictHostKeyChecking = "ask"
	}

	// If the flag is already set then it takes the precedence. If the flag is not
	// set, try setting it from env var.
	if os.Getenv("VAULT_SSH_USER_KNOWN_HOSTS_FILE") != "" && userKnownHostsFile == "" {
		userKnownHostsFile = os.Getenv("VAULT_SSH_USER_KNOWN_HOSTS_FILE")
	}
	// Assign default value if both flag and env var are not set
	if userKnownHostsFile == "" {
		userKnownHostsFile = "~/.ssh/known_hosts"
	}

	args = flags.Args()
	if len(args) < 1 {
		c.Ui.Error("ssh expects at least one argument")
		return 1
	}

	client, err := c.Client()
	if err != nil {
		c.Ui.Error(fmt.Sprintf("Error initializing client: %v", err))
		return 1
	}

	// split the parameter username@ip
	input := strings.Split(args[0], "@")
	var username string
	var ipAddr string

	// If only IP is mentioned and username is skipped, assume username to
	// be the current username. Vault SSH role's default username could have
	// been used, but in order to retain the consistency with SSH command,
	// current username is employed.
	if len(input) == 1 {
		u, err := user.Current()
		if err != nil {
			c.Ui.Error(fmt.Sprintf("Error fetching username: %v", err))
			return 1
		}
		username = u.Username
		ipAddr = input[0]
	} else if len(input) == 2 {
		username = input[0]
		ipAddr = input[1]
	} else {
		c.Ui.Error(fmt.Sprintf("Invalid parameter: %q", args[0]))
		return 1
	}

	// Resolving domain names to IP address on the client side.
	// Vault only deals with IP addresses.
	ip, err := net.ResolveIPAddr("ip", ipAddr)
	if err != nil {
		c.Ui.Error(fmt.Sprintf("Error resolving IP Address: %v", err))
		return 1
	}

	// Credentials are generated only against a registered role. If user
	// does not specify a role with the SSH command, then lookup API is used
	// to fetch all the roles with which this IP is associated. If there is
	// only one role associated with it, use it to establish the connection.
	if role == "" {
		role, err = c.defaultRole(mountPoint, ip.String())
		if err != nil {
			c.Ui.Error(fmt.Sprintf("Error choosing role: %v", err))
			return 1
		}
		// Print the default role chosen so that user knows the role name
		// if something doesn't work. If the role chosen is not allowed to
		// be used by the user (ACL enforcement), then user should see an
		// error message accordingly.
		c.Ui.Output(fmt.Sprintf("Vault SSH: Role: %q", role))
	}

	data := map[string]interface{}{
		"username": username,
		"ip":       ip.String(),
	}

	keySecret, err := client.SSHWithMountPoint(mountPoint).Credential(role, data)
	if err != nil {
		c.Ui.Error(fmt.Sprintf("Error getting key for SSH session: %v", err))
		return 1
	}

	// if no-exec was chosen, just print out the secret and return.
	if noExec {
		return OutputSecret(c.Ui, format, keySecret)
	}

	// Port comes back as a json.Number which mapstructure doesn't like, so convert it
	if keySecret.Data["port"] != nil {
		keySecret.Data["port"] = keySecret.Data["port"].(json.Number).String()
	}
	var resp SSHCredentialResp
	if err := mapstructure.Decode(keySecret.Data, &resp); err != nil {
		c.Ui.Error(fmt.Sprintf("Error parsing the credential response: %v", err))
		return 1
	}

	if resp.KeyType == ssh.KeyTypeDynamic {
		if len(resp.Key) == 0 {
			c.Ui.Error(fmt.Sprintf("Invalid key"))
			return 1
		}
		sshDynamicKeyFile, err := ioutil.TempFile("", fmt.Sprintf("vault_ssh_%s_%s_", username, ip.String()))
		if err != nil {
			c.Ui.Error(fmt.Sprintf("Error creating temporary file: %v", err))
			return 1
		}

		// Ensure that we delete the temporary file
		defer os.Remove(sshDynamicKeyFile.Name())

		if err = ioutil.WriteFile(sshDynamicKeyFile.Name(),
			[]byte(resp.Key), 0600); err != nil {
			c.Ui.Error(fmt.Sprintf("Error storing the dynamic key into the temporary file: %v", err))
			return 1
		}
		sshCmdArgs = append(sshCmdArgs, []string{"-i", sshDynamicKeyFile.Name()}...)

	} else if resp.KeyType == ssh.KeyTypeOTP {
		// Check if the application 'sshpass' is installed in the client machine.
		// If it is then, use it to automate typing in OTP to the prompt. Unfortunately,
		// it was not possible to automate it without a third-party application, with
		// only the Go libraries.
		// Feel free to try and remove this dependency.
		sshpassPath, err := exec.LookPath("sshpass")
		if err == nil {
			sshCmdArgs = append(sshCmdArgs, []string{
				"-e", // Read password for SSHPASS environment variable
				"ssh",
				"-o UserKnownHostsFile=" + userKnownHostsFile,
				"-o StrictHostKeyChecking=" + strictHostKeyChecking,
				"-p", resp.Port,
				username + "@" + ip.String(),
			}...)
			if len(args) > 1 {
				sshCmdArgs = append(sshCmdArgs, args[1:]...)
			}
			env := os.Environ()
			env = append(env, fmt.Sprintf("SSHPASS=%s", string(resp.Key)))
			sshCmd := exec.Command(sshpassPath, sshCmdArgs...)
			sshCmd.Env = env
			sshCmd.Stdin = os.Stdin
			sshCmd.Stdout = os.Stdout
			err = sshCmd.Run()
			if err != nil {
				c.Ui.Error(fmt.Sprintf("Failed to establish SSH connection: %q", err))
			}
			return 0
		}
		c.Ui.Output("OTP for the session is " + resp.Key)
		c.Ui.Output("[Note: Install 'sshpass' to automate typing in OTP]")
	}
	sshCmdArgs = append(sshCmdArgs, []string{"-o UserKnownHostsFile=" + userKnownHostsFile, "-o StrictHostKeyChecking=" + strictHostKeyChecking, "-p", resp.Port, username + "@" + ip.String()}...)
	if len(args) > 1 {
		sshCmdArgs = append(sshCmdArgs, args[1:]...)
	}

	sshCmd := exec.Command("ssh", sshCmdArgs...)
	sshCmd.Stdin = os.Stdin
	sshCmd.Stdout = os.Stdout

	// Running the command as a separate command. The reason for using exec.Command instead
	// of using crypto/ssh package is that, this way, user can have the same feeling of
	// connecting to remote hosts with the ssh command. Package crypto/ssh did not have a way
	// to establish an independent session like this.
	err = sshCmd.Run()
	if err != nil {
		c.Ui.Error(fmt.Sprintf("Error while running ssh command: %q", err))
	}

	// If the session established was longer than the lease expiry, the secret
	// might have been revoked already. If not, then revoke it. Since the key
	// file is deleted and since user doesn't know the credential anymore, there
	// is not point in Vault maintaining this secret anymore. Every time the command
	// is run, a fresh credential is generated anyways.
	err = client.Sys().Revoke(keySecret.LeaseID)
	if err != nil {
		c.Ui.Error(fmt.Sprintf("Error revoking the key: %q", err))
	}

	return 0
}

// If user did not provide the role with which SSH connection has
// to be established and if there is only one role associated with
// the IP, it is used by default.
func (c *SSHCommand) defaultRole(mountPoint, ip string) (string, error) {
	data := map[string]interface{}{
		"ip": ip,
	}
	client, err := c.Client()
	if err != nil {
		return "", err
	}
	secret, err := client.Logical().Write(mountPoint+"/lookup", data)
	if err != nil {
		return "", fmt.Errorf("Error finding roles for IP %q: %q", ip, err)

	}
	if secret == nil {
		return "", fmt.Errorf("Error finding roles for IP %q: %q", ip, err)
	}

	if secret.Data["roles"] == nil {
		return "", fmt.Errorf("No matching roles found for IP %q", ip)
	}

	if len(secret.Data["roles"].([]interface{})) == 1 {
		return secret.Data["roles"].([]interface{})[0].(string), nil
	} else {
		var roleNames string
		for _, item := range secret.Data["roles"].([]interface{}) {
			roleNames += item.(string) + ", "
		}
		roleNames = strings.TrimRight(roleNames, ", ")
		return "", fmt.Errorf("Roles:%q. "+`
		Multiple roles are registered for this IP.
		Select a role using '-role' option.
		Note that all roles may not be permitted, based on ACLs.`, roleNames)
	}
}

func (c *SSHCommand) Synopsis() string {
	return "Initiate an SSH session"
}

func (c *SSHCommand) Help() string {
	helpText := `
Usage: vault ssh [options] username@ip

  Establishes an SSH connection with the target machine.

  This command generates a key and uses it to establish an SSH
  connection with the target machine. This operation requires
  that the SSH backend is mounted and at least one 'role' is
  registered with Vault beforehand.

  For setting up SSH backends with one-time-passwords, installation
  of vault-ssh-helper or a compatible agent on target machines
  is required. See [https://github.com/hashicorp/vault-ssh-agent].

General Options:
` + meta.GeneralOptionsUsage() + `
SSH Options:

  -role            Role to be used to create the key. Each IP is associated with
                   a role. To see the associated roles with IP, use "lookup"
                   endpoint. If you are certain that there is only one role
                   associated with the IP, you can skip mentioning the role. It
                   will be chosen by default. If there are no roles associated
                   with the IP, register the CIDR block of that IP using the
                   "roles/" endpoint.

  -no-exec         Shows the credentials but does not establish connection.

  -mount-point     Mount point of SSH backend. If the backend is mounted at
                   "ssh" (default), this parameter can be skipped.

  -format          If the "no-exec" option is enabled, the credentials will be
                   printed out and SSH connection will not be established. The
                   format of the output can be "json" or "table" (default).

  -strict-host-key-checking   This option corresponds to "StrictHostKeyChecking"
                   of SSH configuration. If "sshpass" is employed to enable
                   automated login, then if host key is not "known" to the
                   client, "vault ssh" command will fail. Set this option to
                   "no" to bypass the host key checking. Defaults to "ask".
                   Can also be specified with the
                   "VAULT_SSH_STRICT_HOST_KEY_CHECKING" environment variable.

  -user-known-hosts-file   This option corresponds to "UserKnownHostsFile" of
                   SSH configuration. Assigns the file to use for storing the
                   host keys. If this option is set to "/dev/null" along with
                   "-strict-host-key-checking=no", both warnings and host key
                   checking can be avoided while establishing the connection.
                   Defaults to "~/.ssh/known_hosts". Can also be specified with
                   "VAULT_SSH_USER_KNOWN_HOSTS_FILE" environment variable.
`
	return strings.TrimSpace(helpText)
}


text:
<?php
/**
 * Contain the ObjectFileCache class
 * @file
 * @ingroup Cache
 */
class ObjectFileCache extends FileCacheBase {
	/**
	 * Construct an ObjectFileCache from a key and a type
	 * @param $key string
	 * @param $type string
	 * @return ObjectFileCache
	 */
	public static function newFromKey( $key, $type ) {
		$cache = new self();

		$cache->mKey = (string)$key;
		$cache->mType = (string)$type;

		return $cache;
	}

	/**
	 * Get the base file cache directory
	 * @return string
	 */
	protected function cacheDirectory() {
		return $this->baseCacheDirectory() . '/object';
	}
}


text:
'use strict';

var path = require('path');

module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-compass');
  grunt.registerMultiTask('meanCompass', 'Compile mean sass-compass files.', function() {
    var options = this.options;

    // Iterate over all specified file groups.
    this.files.forEach(function(f) {
      var filesMap = {};

      // Concat specified files.
      var src = f.src.filter(function(filepath) {
        // Warn on and remove invalid source files (if nonull was set).
        if (!grunt.file.exists(filepath)) {
          grunt.log.warn('Source file "' + filepath + '" not found.');
          return false;
        } else if(path.basename(filepath)[0] === '_') { //do not include no-compile;
          return false;
        } else {
          return true;
        }
      }).map(function(filepath) {
        // Read file source.
        var cssDir = path.dirname(path.dirname(filepath))+'/css/';
        if(filesMap[cssDir] === undefined) {
          filesMap[cssDir] = [];
        }
        filesMap[cssDir].push(filepath);

        return filepath;
      });

      var compassGrunt = {};
      var i = 0;
      for(var cssDir in filesMap) {
        var sassDir = path.dirname(filesMap[cssDir][0]);
        var imagesDir = path.dirname(cssDir)+'/img/';
        var fontsDir = path.dirname(cssDir)+'/fonts/';
        var dirOptions = options({
          sassDir: sassDir,
          specify: filesMap[cssDir],
          imagesDir: imagesDir,
          fontsDir: fontsDir,
          relativeAssets: true,
          cssDir: cssDir
        });
        compassGrunt['meanCompass_'+i] = {
          options: dirOptions
        };
        i+=1;
      }
      grunt.log.ok('Originated compass tasks.');
      grunt.log.subhead('Start compass mean tasks tasks..');

      grunt.config('compass', compassGrunt);
      grunt.task.run('compass');
    });
  });

};


text:
<form action="#" method="get">
	<fieldset>

				Pick Up Date
				<input type="date" name="pu-tstar618-ppr" id="pu-tstar618-ppr" required="required"/>

				Return Date
				<input type="date" name="rd-tstar618-ppr" id="rd-tstar618-ppr"  required="required"/>

				Pick Up Location
				<select name="tstar618-ppr-location" id="tstar618-ppr-location">
					<option selected="selected">please choose</option>
					<option value="bkf">Bakersfield</option>
					<option value="ch">Chico</option>
					<option value="fsn">Fresno</option>
					<option value="hyw">Hayward</option>
					<option value="mtc">Manteca</option>
					<option value="oak">Oakley</option>
					<option value="rwc">Redwood City</option>
					<option value="sac">Sacramento</option>
					<option value="sal">Salinas</option>
					<option value="sj">San Jose</option>
					<option value="sjf">San Jose Fusion</option>
					<option value="sr">Santa Rosa</option>
				</select>

	</fieldset>

			<button class="primary button js-add-product">Add to Cart</button>

</form>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.Data.Tables
{
    [CodeGenModel("RetentionPolicy")]
    public partial class TableRetentionPolicy
    { }
}


text:
We're sure you can handle creating a new empty Git repository. But once you have your initial
commit with a `README.md`, `.gitignore`, etc., you'll want to pull in the common KillrVideo
dependencies that live in other Git repositories. The repositories you'll want to pull in
are:

- [killrvideo-service-protos][service-protos]: This is where the [gRPC][grpc] service
definitions that you'll be implementing are kept, defined in `.proto` files. You'll be using
the Protobufs from here to generate code.

## Using Git Subtrees for Dependencies

In other microservice implementations, we've decided to use `git subtree` to pull in these
dependencies rather than submodules. Here's a [pretty good overview][subtree] of subtrees if
you're not familiar. Here's an example of the commands to add those subtrees to your
repository under the `/lib` folder:

```bash
# Add killrvideo-service-protos under lib/killrvideo-service-protos
git subtree add --prefix lib/killrvideo-service-protos git@github.com:KillrVideo/killrvideo-service-protos.git master --squash
```

Later if you need to update those dependencies you can just use the same commands as above,
only doing a `git subtree pull` instead of `git subtree add`.

     Subtree Tip

    Add a shell script to your repo for doing a git subtree pull on those
    dependencies to make it easy to pull down the latest changes.

[service-protos]: https://github.com/KillrVideo/killrvideo-service-protos
[grpc]: http://www.grpc.io/
[subtree]: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/


text:
package org.lilyproject.repository.impl;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

import org.lilyproject.repository.api.IdGenerator;
import org.lilyproject.repository.api.Repository;
import org.lilyproject.repository.api.TypeManager;

public class TracingRepository {

    private TracingRepository() {
    }

    public static Repository wrap(Repository repository) {
        TypeManager typeManager = (TypeManager) Proxy.newProxyInstance(TypeManager.class.getClassLoader(),
                new Class[]{TypeManager.class}, new TracingTypeManagerIH(repository.getTypeManager()));

        IdGenerator idGenerator = (IdGenerator) Proxy.newProxyInstance(IdGenerator.class.getClassLoader(),
                new Class[]{IdGenerator.class}, new TracingIdGeneratorIH(repository.getIdGenerator()));

        return (Repository) Proxy.newProxyInstance(Repository.class.getClassLoader(),
                new Class[]{Repository.class}, new TracingRepositoryIH(repository, typeManager, idGenerator));
    }

    private static final class TracingRepositoryIH implements InvocationHandler {
        private final Repository delegate;
        private final TypeManager typeManager;
        private final IdGenerator idGenerator;

        private TracingRepositoryIH(Repository delegate, TypeManager typeManager, IdGenerator idGenerator) {
            this.delegate = delegate;
            this.typeManager = typeManager;
            this.idGenerator = idGenerator;
        }

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            if (method.getName().equals("getTypeManager")) {
                return typeManager;
            } else if (method.getName().equals("getIdGenerator")) {
                return idGenerator;
            }

            logMethodCall(method, args);

            try {
                return method.invoke(delegate, args);
            } catch (InvocationTargetException e) {
                throw e.getTargetException();
            }
        }
    }

    private static void logMethodCall(Method method, Object[] args) {
        StringBuilder builder = new StringBuilder();
        builder.append(method.getDeclaringClass().getSimpleName()).append(".").append(method.getName());
        if (args != null) {
            for (int i = 0; i < args.length; i++) {
                builder.append(i > 0 ? ", " : " ");
                builder.append("arg").append(i).append(" = ");
                if (args[i] != null && args[i].getClass().isArray()) {
                    Object[] values = (Object[]) args[i];
                    builder.append("[");
                    for (int j = 0; j < values.length; j++) {
                        if (j > 0) {
                            builder.append(", ");
                        }
                        builder.append(values[i]);
                    }
                    builder.append("]");
                } else {
                    builder.append(args[i]);
                }
            }
        }
        System.out.println("===== " + builder.toString());
    }

    private static final class TracingTypeManagerIH implements InvocationHandler {
        private final TypeManager delegate;

        private TracingTypeManagerIH(TypeManager delegate) {
            this.delegate = delegate;
        }

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            try {
                return method.invoke(delegate, args);
            } catch (InvocationTargetException e) {
                throw e.getTargetException();
            }
        }
    }

    private static final class TracingIdGeneratorIH implements InvocationHandler {
        private final IdGenerator delegate;

        private TracingIdGeneratorIH(IdGenerator delegate) {
            this.delegate = delegate;
        }

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            try {
                return method.invoke(delegate, args);
            } catch (InvocationTargetException e) {
                throw e.getTargetException();
            }
        }
    }
}


text:
package org.dswarm.converter.flow;

import java.io.Reader;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.name.Named;
import org.culturegraph.mf.framework.DefaultObjectPipe;
import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.stream.converter.xml.XmlDecoder;
import org.culturegraph.mf.stream.source.StringReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rx.Observable;
import rx.Subscriber;

import org.dswarm.converter.DMPConverterException;
import org.dswarm.converter.mf.stream.GDMModelReceiver;
import org.dswarm.converter.mf.stream.source.BOMResourceOpener;
import org.dswarm.converter.mf.stream.source.XMLGDMEncoder;
import org.dswarm.converter.pipe.timing.ObjectTimer;
import org.dswarm.converter.pipe.timing.TimerBasedFactory;
import org.dswarm.converter.pipe.timing.XmlTimer;
import org.dswarm.persistence.model.internal.gdm.GDMModel;
import org.dswarm.persistence.model.resource.Configuration;
import org.dswarm.persistence.model.resource.DataModel;
import org.dswarm.persistence.model.resource.utils.ConfigurationStatics;

/**
 * Flow that transforms a given XML source into GDM statements.
 *
 * @author tgaengler
 */
public class XMLSourceResourceGDMStmtsFlow {

	private static final Logger			LOG	= LoggerFactory.getLogger(XMLSourceResourceGDMStmtsFlow.class);

	private final Optional<String>		recordTagName;
	private final Optional<DataModel>	dataModel;
	private final TimerBasedFactory timerBasedFactory;
	private final Timer morphTimer;

	@Inject
	private XMLSourceResourceGDMStmtsFlow(
			@Named("Monitoring") final MetricRegistry registry,
			final TimerBasedFactory timerBasedFactory,
			@Assisted final DataModel dataModel) throws DMPConverterException {
		if (dataModel == null) {

			throw new DMPConverterException("the data model shouldn't be null");
		}

		if (dataModel.getConfiguration() == null) {

			throw new DMPConverterException("the data model configuration shouldn't be null");
		}

		if (dataModel.getConfiguration().getParameters() == null) {

			throw new DMPConverterException("the data model configuration parameters shouldn't be null");
		}

		if (dataModel.getUuid() != null) {

			this.dataModel = Optional.of(dataModel);
		} else {

			this.dataModel = Optional.empty();
		}

		recordTagName = getStringParameter(dataModel.getConfiguration(), ConfigurationStatics.RECORD_TAG);

		this.timerBasedFactory = timerBasedFactory;

		morphTimer = registry.timer(MonitoringFlowStatics.METAMORPH);
	}

	public Observable<GDMModel> applyRecord(final String record) {

		final StringReader opener = new StringReader();

		return apply(record, opener);
	}

	public Observable<GDMModel> applyResource(final String resourcePath) {

		final BOMResourceOpener opener = new BOMResourceOpener();

		return apply(resourcePath, opener);
	}

	Observable<GDMModel> apply(final String object, final DefaultObjectPipe<String, ObjectReceiver<Reader>> opener) {

		final XmlDecoder decoder = new XmlDecoder();

		final XMLGDMEncoder encoder;

		if (recordTagName.isPresent()) {

			encoder = new XMLGDMEncoder(recordTagName.get(), dataModel);
		} else {

			encoder = new XMLGDMEncoder(dataModel);
		}
		final GDMModelReceiver writer = new GDMModelReceiver();

		final ObjectTimer<Reader> inputTimer = timerBasedFactory.forObject(MonitoringFlowStatics.INPUT_RESOURCE_FILES);
		final XmlTimer<GDMModel> xmlTimer = timerBasedFactory.forXml(MonitoringFlowStatics.XML_EVENTS);
		final ObjectTimer<GDMModel> gdmModelsTimer = timerBasedFactory.forObject(MonitoringFlowStatics.PARSED_XML_RECORDS);

		final Timer.Context morphContext = morphTimer.time();

		opener
				.setReceiver(inputTimer)
				.setReceiver(decoder)
				.setReceiver(xmlTimer)
				.setReceiver(encoder)
				.setReceiver(gdmModelsTimer)
				.setReceiver(writer);

		return Observable.create(new Observable.OnSubscribe<GDMModel>() {

			@Override public void call(final Subscriber<? super GDMModel> subscriber) {

				writer.getObservable().subscribe(subscriber);

				opener.process(object);
				opener.closeStream();

				morphContext.stop();
			}
		});
	}

	private static Optional<String> getStringParameter(final Configuration configuration, final String key) throws DMPConverterException {
		final JsonNode jsonNode = getParameterValue(configuration, key);
		if (jsonNode == null) {
			return Optional.empty();
		}

		return Optional.of(jsonNode.asText());
	}

	private static JsonNode getParameterValue(final Configuration configuration, final String key) throws DMPConverterException {

		if (key == null) {

			throw new DMPConverterException("the parameter key shouldn't be null");
		}

		final JsonNode valueNode = configuration.getParameter(key);

		if (valueNode == null) {

			XMLSourceResourceGDMStmtsFlow.LOG.debug(
					"couldn't find value for parameter '{}'; try to utilise default value for this parameter", key);
		}

		return valueNode;
	}
}


text:
package org.redisson.api;

/**
 *
 * @author Nikita Koksharov
 *
 */
public enum RateType {

    /**
     * Total rate for all RateLimiter instances
     */
    OVERALL,

    /**
     * Total rate for all RateLimiter instances working with the same Redisson instance
     */
    PER_CLIENT

}


text:
set -e
export DEBIAN_FRONTEND=noninteractive

# install C compiler
sudo apt-get -q -y update
sudo apt-get -q -y upgrade
sudo apt-get -q -y install build-essential

# installing webp
cd
sudo apt-get -q -y install libjpeg-dev libpng-dev libtiff-dev libgif-dev
wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.2.tar.gz
tar xvzf libwebp-0.4.2.tar.gz
cd libwebp-0.4.2
./configure
make
sudo make install

# install latest version of imagemagick
cd
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-*
./configure
make
sudo make install
sudo ldconfig /usr/local/lib

# install latest go version
cd
wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
tar xvzf go1.3.3.linux-amd64.tar.gz
sudo mv go /usr/local/go
export PATH=$PATH:/usr/local/go/bin
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

# obtain code and build
gsutil -m cp -R gs://abelana-code/imagemagick .
cd imagemagick
GOPATH=$PWD/Godeps/_workspace go build
touch ~/logs

# start running
./imagemagick >> ~/logs 2>&1 &


text:
namespace content {
class BrowserContext;
}  // namespace content

namespace arc {

// This struct describes the UI presentation of a single link handler.
struct LinkHandlerInfo {
  base::string16 name;
  gfx::Image icon;
  // An opaque identifier for this handler (which happens to correlate to the
  // index in |handlers_|.
  uint32_t id;
};

class LinkHandlerModel {
 public:
  class Observer {
   public:
    virtual void ModelChanged(const std::vector<LinkHandlerInfo>& handlers) = 0;
  };

  // Creates and inits a model. Will return null if Init() fails.
  static std::unique_ptr<LinkHandlerModel> Create(
      content::BrowserContext* context,
      const GURL& link_url);

  ~LinkHandlerModel();

  void AddObserver(Observer* observer);

  void OpenLinkWithHandler(uint32_t handler_id);

  static GURL RewriteUrlFromQueryIfAvailableForTesting(const GURL& url);

 private:
  LinkHandlerModel();

  // Starts retrieving handler information for the |url| and returns true.
  // Returns false when the information cannot be retrieved. In that case,
  // the caller should delete |this| object.
  bool Init(content::BrowserContext* context, const GURL& url);

  void OnUrlHandlerList(std::vector<mojom::IntentHandlerInfoPtr> handlers);
  void NotifyObserver(
      std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons);

  // Checks if the |url| matches the following pattern:
  //   "http(s)://<valid_google_hostname>/url?...&url=<valid_url>&..."
  // If it does, creates a new GURL object from the <valid_url> and returns it.
  // Otherwise, returns the original |url| as-us.
  static GURL RewriteUrlFromQueryIfAvailable(const GURL& url);

  content::BrowserContext* context_ = nullptr;

  GURL url_;

  base::ObserverList<Observer>::Unchecked observer_list_;

  // Url handler info passed from ARC.
  std::vector<mojom::IntentHandlerInfoPtr> handlers_;
  // Activity icon info passed from ARC.
  ArcIntentHelperBridge::ActivityToIconsMap icons_;

  base::WeakPtrFactory<LinkHandlerModel> weak_ptr_factory_{this};

  DISALLOW_COPY_AND_ASSIGN(LinkHandlerModel);
};

}  // namespace arc

#endif  // COMPONENTS_ARC_INTENT_HELPER_LINK_HANDLER_MODEL_H_


text:
package xyz.hyperreal

package object sprolog
{
	val DOT = Symbol( "." )
	val NIL = Symbol( "[]" )

	type Predicate = WAMInterface => Boolean

	case class Indicator( functor: Symbol, arity: Int ) extends Ordered[Indicator]
	{
		def compare( that: Indicator ) =
			if (functor.name < that.functor.name)
				-1
			else if (functor.name > that.functor.name)
				1
			else
				arity - that.arity

		override def toString = functor.name + "/" + arity
	}

	def indicator( t: AST ) =
		t match
		{
			case s: StructureAST => Indicator( s.f, s.arity )
			case AtomAST( a ) => Indicator( a, 0 )
		}

	def atom( t: AST ) = t.isInstanceOf[AtomAST]

	def asAtom( t: AST ) = t.asInstanceOf[AtomAST]

	def atomic( t: AST ) =
		t match
		{
			case _: NumberAST | _: AtomAST | _: StringAST | _: ConstantAST => true
			case _ => false
		}

	def constant( t: AST ): Any =
		t match
		{
			case NumberAST( n ) => n
			case AtomAST( a ) => a
			case StringAST( s ) => s
			case ConstantAST( c ) => c
			case _ => sys.error( t + " not a non-compound constant" )
		}

	def compound( t: AST ) = t.isInstanceOf[StructureAST]

	def variable( t: AST ) = t.isInstanceOf[Addr]

	def isList( a: AST ): Boolean =
		a match
		{
			case AtomAST( NIL ) => true
			case StructureAST( DOT, Seq(head, tail) ) if isList( tail ) => true
			case _ => false
		}

	def toList( l: AST ): List[AST] =
		l match
		{
			case AtomAST( NIL ) => Nil
			case StructureAST( DOT, Seq(head, tail) ) => head :: toList( tail )
		}

	def isVarList( a: AST ): Boolean =
		a match
		{
			case _: Addr => true
			case StructureAST( DOT, Seq(head, tail) ) if isVarList( tail ) => true
			case _ => false
		}

	def toVarList( l: AST ): List[AST] =
		l match
		{
			case a: Addr => List( a )
			case StructureAST( DOT, Seq(head, tail) ) => head :: toVarList( tail )
		}

	def fromList( l: List[AST] ): AST =
		l match
		{
			case Nil => AtomAST( NIL )
			case head :: tail =>
				StructureAST( DOT, IndexedSeq(head, fromList(tail)) )
		}
}


text:
<?php
/* @var $this HelpController */
/* @var $model Help */

$this->breadcrumbs=array(
	'Helps'=>array('index'),
	$model->TITLE=>array('view','id'=>$model->ID),
	'Update',
);

$this->menu=array(
	array('label'=>'List Help', 'url'=>array('index')),
	array('label'=>'Create Help', 'url'=>array('create')),
	array('label'=>'View Help', 'url'=>array('view', 'id'=>$model->ID)),
	array('label'=>'Manage Help', 'url'=>array('admin')),
);
?>

Update Help <?php echo $model->ID; ?>

<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>


text:
package org.gradoop.common.model.impl.properties.strategies;

import org.apache.flink.core.memory.DataInputView;
import org.gradoop.common.model.impl.properties.bytes.Bytes;
import org.gradoop.common.model.impl.properties.DateTimeSerializer;
import org.gradoop.common.model.impl.properties.PropertyValue;
import org.gradoop.common.model.impl.properties.Type;

import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Arrays;

/**
 * Strategy class for handling {@code PropertyValue} operations with a value of the type
 * {@code LocalDateTime}.
 */
public class DateTimeStrategy extends AbstractFixSizedPropertyValueStrategy<LocalDateTime> {

  @Override
  public LocalDateTime read(DataInputView inputView, byte typeByte) throws IOException {
    int length = DateTimeSerializer.SIZEOF_DATETIME;
    byte[] rawBytes = new byte[length];

    for (int i  = 0; i < rawBytes.length; i++) {
      rawBytes[i] = inputView.readByte();
    }

    return DateTimeSerializer.deserializeDateTime(rawBytes);
  }

  @Override
  public int compare(LocalDateTime value, Object other) {
    if (other instanceof LocalDateTime) {
      return value.compareTo((LocalDateTime) other);
    }
    throw new IllegalArgumentException(String.format(
      "Incompatible types: %s, %s", value.getClass(), other.getClass()));
  }

  @Override
  public boolean is(Object value) {
    return value instanceof LocalDateTime;
  }

  @Override
  public Class<LocalDateTime> getType() {
    return LocalDateTime.class;
  }

  @Override
  public LocalDateTime get(byte[] bytes) {
    return DateTimeSerializer.deserializeDateTime(
      Arrays.copyOfRange(
        bytes, PropertyValue.OFFSET, DateTimeSerializer.SIZEOF_DATETIME + PropertyValue.OFFSET
      ));
  }

  @Override
  public byte getRawType() {
    return Type.DATE_TIME.getTypeByte();
  }

  @Override
  public byte[] getRawBytes(LocalDateTime value) {
    byte[] valueBytes = DateTimeSerializer.serializeDateTime(value);
    byte[] rawBytes = new byte[PropertyValue.OFFSET + DateTimeSerializer.SIZEOF_DATETIME];
    rawBytes[0] = getRawType();
    Bytes.putBytes(rawBytes, PropertyValue.OFFSET, valueBytes, 0, valueBytes.length);
    return rawBytes;
  }
}


text:
var weightConv = {
  button: document.getElementById('addButton'),
  childNameElement: document.getElementById('childName'),
  currentWeight: document.getElementById('weightInKg'),
  lbs: 453.592, // 1lbs to grams
  oz: 28.3495, // 1 oz to grams
  init: function event()
  {
    weightConv.button.addEventListener('click', weightConv.calculateValues);
  },
  getChildName: function getChildName()
  {
    return document.getElementById('childName').value;
  },
  lbsFloor: function lbsFloor()
  {
    return Math.floor(weightConv.lbsTrunc());
  },
  lbsTrunc: function lbsTrunc()
  {
    return Math.trunc(weightConv.kg2grams) / weightConv.lbs;
  },
  ouncesCalc: function ouncesCalc()
  {
    return weightConv.kg2grams - weightConv.lbsFloor() * weightConv.lbs;
  },
  ozFloored: function ozFloored()
  {
    return Math.floor(weightConv.ouncesCalc()) / weightConv.oz;
  },
  ozTrunc: function ozTrunc()
  {
    return Math.trunc(weightConv.ozFloored());
  },
  getTodaysDate: function getTodaysDate()
  {
    return new moment().format("DD-MM-YYYY");
  },
  clearReload: function clearReload()
  {
    location.reload(); // reload the page
    document.getElementById('weightInKg').value = ""; // clear any inputs
  },
  finalWeight: function finalWeight()
  {
    return weightConv.lbsFloor() + "lbs " + weightConv.ozTrunc() + "ozs";
  },
  calculateValues: function calculateValues()
  {
    weightConv.currentWeight = weightConv.currentWeight.value;
    weightConv.kg2grams = weightConv.currentWeight * 1000; // current Weight to grams e.g 3.5kg to 3500g
    // Print out the process to the console
    var printOut = {
      "date": weightConv.getTodaysDate(),
      "child": weightConv.getChildName(),
      "weight": weightConv.finalWeight()
    };
    if(weightConv.currentWeight <= 0 || isNaN(weightConv.currentWeight))
    {
      console.log("Was less than or equal to zero or return NaN");
      document.getElementById("error").innerHTML = "" + "Cannot be blank or zero, please input a value." + "";
      setTimeout(function()
      {
        weightConv.clearReload();
      }, 4000);
      return false;
    }
    else
    {
      var printDate = moment().format("dddd, MMMM Do, YYYY");
      document.getElementById("results").innerHTML = "Todays date is " + printDate + "
 " + printOut.child + " is: " + printOut.weight;
      console.log(printOut);
    }
    // send data to DB
    var db = new PouchDB('http://localhost:5984/weights');
    var weight = {
      "_id": new moment().format("DDMMYYYY") + weightConv.getChildName(),
      "name": weightConv.getChildName(),
      "weight": weightConv.finalWeight(),
      "date": weightConv.getTodaysDate()
    };
    db.put(weight, function callback(err, result)
    {
      if(!err)
      {
        document.getElementById("error").innerHTML = "" + 'Data sent to the DB' + "";
        console.log('Data sent to DB');
        setTimeout(function()
        {
          weightConv.clearReload();
        }, 8000);
      }
      else
      {
        document.getElementById("error").innerHTML = "" + 'Data not sent: ' + errorThrown + " " + jqXHR.responseText + "";
        setTimeout(function()
        {
          weightConv.clearReload();
        }, 12000);
      }
    });
  }
};
weightConv.init();


text:
from copy import copy, deepcopy

from matplotlib import patheffects

from .elements import (element_line, element_rect, element_blank,
                       element_text)
from .theme import theme
from .theme_gray import theme_gray

class theme_xkcd(theme_gray):
    """
    xkcd theme

    Parameters
    ----------
    base_size : int, optional
        Base font size. All text sizes are a scaled versions of
        the base font size. Default is 12.
    scale : float, optional
        The amplitude of the wiggle perpendicular to the line
        (in pixels). Default is 1.
    length : float, optional
        The length of the wiggle along the line (in pixels).
        Default is 100.
    randomness : float, optional
        The factor by which the length is randomly scaled.
        Default is 2.
    stroke_size : float, optional
        Size of the stroke to apply to the lines and text paths.
        Default is 4.
    stroke_color : str or tuple, optional
        Color of the strokes. Default is ``white``.
        For no color, use ``'none'``.
    """

    def __init__(self, base_size=12, scale=1, length=100, randomness=2,
                 stroke_size=4, stroke_color='white'):
        theme_gray.__init__(self, base_size)
        self += theme(
            text=element_text(
                family=['xkcd', 'Humor Sans', 'Comic Sans MS']
            ),
            axis_ticks=element_line(color='black', size=1.5),
            axis_ticks_minor=element_blank(),
            axis_ticks_direction='in',
            axis_ticks_length_major=6,
            legend_background=element_rect(
                color='black',
                fill='None'
            ),
            legend_key=element_rect(fill='None'),
            panel_border=element_rect(color='black', size=1.5),
            panel_grid=element_blank(),
            panel_background=element_rect(fill='white'),
            strip_background=element_rect(color='black', fill='white'),
            strip_background_x=element_rect(width=2/3.),
            strip_background_y=element_rect(height=2/3.),
            strip_margin=-0.5,
        )

        d = {
            'axes.unicode_minus': False,
            'path.sketch': (scale, length, randomness),
            'path.effects': [
                patheffects.withStroke(
                    linewidth=stroke_size,
                    foreground=stroke_color
                )
            ]
        }
        self._rcParams.update(d)

    def __deepcopy__(self, memo):
        """
        Deep copy support for theme_xkcd
        """
        cls = self.__class__
        result = cls.__new__(cls)
        memo[id(self)] = result
        old = self.__dict__
        new = result.__dict__

        for key, item in old.items():
            if key == '_rcParams':
                continue
            new[key] = deepcopy(old[key], memo)

        result._rcParams = {}
        for k, v in self._rcParams.items():
            try:
                result._rcParams[k] = deepcopy(v, memo)
            except NotImplementedError:
                # deepcopy raises an error for objects that are
                # drived from or composed of
                # matplotlib.transform. TransformNode.
                # Not desirable, but probably requires upstream fix.
                # In particular, XKCD uses
                # matplotlib.patheffects.withStrok
                # -gdowding
                result._rcParams[k] = copy(v)

        return result


text:
class User
  attr_reader :key, :max_requests, :ip, :user_agent, :referrer

  def initialize(args)
    args.each do |k, v|
      instance_variable_set("@#{k}", v) unless v.nil?
    end

    @max_requests = { hour: 100, minute: 10 }
  end

  def register!(token)
    return unless valid_token?(token)

    @redis.del("token:#{token}")
    @key ||= generate_key
    result = @redis.set("apikey:#{@key}", 1)
    return if result.nil?

    { error: false, key: @key }
  end

  def authorized?
    @authorized ||= @redis.exists("apikey:#{@key}")
  end

  def throttled?
    return true if @ip.nil?

    hour_reqs, minute_reqs, _, _ = record_request(@ip)
    @max_requests = { hour: 500, minute: 50 } if authorized?
    hour_reqs > @max_requests[:hour] || minute_reqs > @max_requests[:minute]
  end

  private

  def record_request(ip)
    now = Time.now.to_i
    epoch_hour = now / 3600
    epoch_minute = now / 60
    @redis.pipelined do
      @redis.zincrby("traffic:#{epoch_hour}", 1, ip)
      @redis.zincrby("traffic:#{epoch_minute}", 1, ip)
      @redis.expire("traffic:#{epoch_hour}", 3600)
      @redis.expire("traffic:#{epoch_minute}", 60)
    end
  end

  def generate_key(key = '')
    loop do
      key = SecureRandom.hex
      return key unless @redis.exists("apikey:#{key}")
    end
  end

  def valid_token?(token = '')
    @redis.exists("token:#{token}")
  end
end


text:
HighDefinitionFaceFrameSource.FeedAndCalculateFrameData Method
==============================================================

TBD

Syntax
======

<colgroup>
<col width="100%" />
</colgroup>

C++

public:
void FeedAndCalculateFrameData(
         Body^ body,
         IBuffer^ infraredFrameBuffer,
         IBuffer^ colorFrameBuffer,
         IBuffer^ depthFrameBuffer
)

<colgroup>
<col width="100%" />
</colgroup>

C#

public void FeedAndCalculateFrameData (
         Bodybody,
         IBufferinfraredFrameBuffer,
         IBuffercolorFrameBuffer,
         IBufferdepthFrameBuffer
)

<colgroup>
<col width="100%" />
</colgroup>

JavaScript

highDefinitionFaceFrameSource.feedAndCalculateFrameData(body, body, infraredFrameBuffer, colorFrameBuffer, depthFrameBuffer);

#### Parameters

*body*
Type: [Body](../../../Kinect/Body_Class.md)
The body to use for the calculation.

*infraredFrameBuffer*
Type: [IBuffer](http://msdn.microsoft.com/en-us/library/windows.storage.streams.ibuffer.aspx)
The infrared frame buffer to use for the calculation.

*colorFrameBuffer*
Type: [IBuffer](http://msdn.microsoft.com/en-us/library/windows.storage.streams.ibuffer.aspx)
The color frame buffer to use for the calculation.

*depthFrameBuffer*
Type: [IBuffer](http://msdn.microsoft.com/en-us/library/windows.storage.streams.ibuffer.aspx)
The depth frame buffer to use for the calculation.

Requirements
============

**Namespace:**Microsoft.Kinect.Face
**Assembly:**Microsoft.Kinect.Face (in microsoft.kinect.face.dll)

See also
========

#### Reference

[HighDefinitionFaceFrameSource Class](../../HighDefinitionFaceFrameS.md)
 [Microsoft.Kinect.Face Namespace](../../../Kinect.Face.md)


text:
package com.communote.server.core.vo.query.filter;

import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.testng.Assert;
import org.testng.annotations.Test;

import com.communote.common.util.PageableList;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.note.NoteStoringTO;
import com.communote.server.api.core.property.PropertyManagement;
import com.communote.server.api.core.property.PropertyType;
import com.communote.server.api.core.property.StringPropertyTO;
import com.communote.server.core.filter.listitems.SimpleNoteListItem;
import com.communote.server.core.query.QueryManagement;
import com.communote.server.core.vo.query.config.FilterApiParameterNameProvider;
import com.communote.server.core.vo.query.config.QueryParametersParameterNameProvider;
import com.communote.server.core.vo.query.config.TimelineQueryParametersConfigurator;
import com.communote.server.core.vo.query.post.NoteQuery;
import com.communote.server.core.vo.query.post.NoteQueryParameters;
import com.communote.server.model.blog.Blog;
import com.communote.server.model.user.User;
import com.communote.server.service.NoteService;
import com.communote.server.test.CommunoteIntegrationTest;
import com.communote.server.test.util.TestUtils;

/**
 * @author Communote GmbH - http://www.communote.com/
 */
public class PropertyFilterCommunoteIntegrationTest extends CommunoteIntegrationTest {
    /**
     * Test that filtering for properties is possible
     *
     * @throws Exception
     *             in case the test failed
     */
    @Test
    public void testPropertyFiltering() throws Exception {
        String propertyKeyGroup = random();
        String propertyKey = random();
        String propertyValue = random();
        ServiceLocator.instance().getService(PropertyManagement.class)
        .addObjectPropertyFilter(PropertyType.NoteProperty, propertyKeyGroup, propertyKey);
        User user = TestUtils.createRandomUser(false);
        Blog blog = TestUtils.createRandomBlog(false, false, user);
        NoteStoringTO noteWithProperty = TestUtils.createCommonNote(blog, user.getId());
        noteWithProperty.setProperties(new HashSet<StringPropertyTO>());
        noteWithProperty.getProperties().add(
                new StringPropertyTO(propertyValue, propertyKeyGroup, propertyKey, new Date()));
        Long noteWithPropertyId = ServiceLocator.instance().getService(NoteService.class)
                .createNote(noteWithProperty, null).getNoteId();
        Long noteWithoutPropertyId = TestUtils.createAndStoreCommonNote(blog, user.getId(),
                random());
        QueryParametersParameterNameProvider nameProvider = new FilterApiParameterNameProvider();
        Map<String, String> parameters = new HashMap<String, String>();

        // Filter for the blog
        parameters.put(nameProvider.getNameForBlogIds(), Long.toString(blog.getId()));
        TimelineQueryParametersConfigurator<NoteQueryParameters> configurator = new TimelineQueryParametersConfigurator<NoteQueryParameters>(
                nameProvider);
        NoteQuery query = new NoteQuery();
        NoteQueryParameters queryInstance = query.createInstance();
        configurator.configure(parameters, queryInstance);
        QueryManagement queryManagement = ServiceLocator.instance().getService(
                QueryManagement.class);

        // No property filtering
        PageableList<SimpleNoteListItem> result = queryManagement.query(query, queryInstance);
        Assert.assertEquals(result.size(), 2);

        // [0:Property, 1:Group, 2:Key, 3:Value, 4:MatchMode, 5:Negate (Optional)]
        // Filtering for the property
        String[] propertyFilter = new String[] { "Note", propertyKeyGroup, propertyKey,
                propertyValue, PropertyFilter.MatchMode.EQUALS.name() };
        parameters.put(nameProvider.getNameForPropertyFilter(),
                "[\"" + StringUtils.join(propertyFilter, "\",\"") + "\"]");
        configurator.configure(parameters, queryInstance);
        result = queryManagement.query(query, queryInstance);
        Assert.assertEquals(result.size(), 1);
        Assert.assertEquals(result.get(0).getId(), noteWithPropertyId);

        // Filtering for the property exclusion
        queryInstance.getPropertyFilters().clear();
        propertyFilter = new String[] { "Note", propertyKeyGroup, propertyKey, "",
                PropertyFilter.MatchMode.CONTAINS.name(), "true" };
        parameters.put(nameProvider.getNameForPropertyFilter(),
                "[\"" + StringUtils.join(propertyFilter, "\",\"") + "\"]");
        configurator.configure(parameters, queryInstance);
        result = queryManagement.query(query, queryInstance);
        Assert.assertEquals(result.size(), 1);
        Assert.assertEquals(result.get(0).getId(), noteWithoutPropertyId);
    }
}


text:
    NutScript is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    NutScript is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with NutScript.  If not, see <http://www.gnu.org/licenses/>.
--]]

ITEM.name = "Shotgun Shells"
ITEM.price = 75
ITEM.model = "models/Items/BoxBuckshot.mdl"
ITEM.ammo = "buckshot" // type of the ammo
ITEM.ammoAmount = 15 // amount of the ammo
ITEM.ammoDesc = "A Box of %s Shotgun Shells"
ITEM.category = "Ammunition"
ITEM.flag = "Y"


text:
package io.bootique.jdbc.junit5.tc;

import io.bootique.jdbc.junit5.Table;
import io.bootique.jdbc.junit5.tc.unit.BasePostgresTest;
import io.bootique.junit5.BQTest;
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
import java.sql.*;
import java.time.LocalDateTime;

import static org.junit.jupiter.api.Assertions.assertEquals;

@BQTest
public class Table_PostgresIT extends BasePostgresTest {

    static final Table t1 = db.getTable("t1");
    static final Table t5 = db.getTable("t5");

    @Test
    public void testDateTime_ViaSelect() {
        LocalDateTime ldt = LocalDateTime.of(2018, 1, 10, 4, 0, 1);
        t1.insertColumns("c1", "c2").values(1, ldt).exec();

        t1.matcher().assertOneMatch();
        Object[] data = t1.selectColumns("c2").where("c1", 1).selectOne(null);
        assertEquals(Timestamp.valueOf(ldt), data[0], "Timestamps do not match");
    }

    @Test
    public void testDateTime_ViaMatcher() {
        LocalDateTime ldt = LocalDateTime.of(2018, 1, 10, 4, 0, 1);
        t1.insertColumns("c1", "c2").values(1, ldt).exec();

        t1.matcher().assertOneMatch();
        t1.matcher().eq("c1", 1).eq("c2", ldt).assertOneMatch();
    }

    @Test
    public void testInsertNumericColumns() throws SQLException {
        t5.insertColumns("id", "c1", "c2")
                .values(1, null, null)
                .values(2, Long.MAX_VALUE - 5, new BigDecimal("2.345"))
                .values(3, 0, BigDecimal.ZERO)
                .exec();
        t5.matcher().assertMatches(3);

        try (Connection c = db.getConnection()) {
            try (Statement s = c.createStatement()) {
                try (ResultSet rs = s.executeQuery("select id, c1, c2 from t5 order by id")) {
                    rs.next();
                    assertEquals(1, rs.getInt(1));
                    assertEquals(null, rs.getObject(2));
                    assertEquals(null, rs.getObject(3));

                    rs.next();
                    assertEquals(2, rs.getInt(1));
                    assertEquals(Long.MAX_VALUE - 5, rs.getLong(2));
                    assertEquals(new BigDecimal("2.345"), rs.getBigDecimal(3));

                    rs.next();
                    assertEquals(3, rs.getInt(1));
                    assertEquals(0L, rs.getLong(2));
                    assertEquals(new BigDecimal("0.000"), rs.getBigDecimal(3));
                }
            }
        }
    }
}


text:
#import "UIView.h"

@interface UIView (TSUViewAdditions)
- (void)addBorderWithColor:(id)arg1;
@end


text:
package com.gemstone.gemfire.cache.query.internal.parse;

import antlr.*;
import com.gemstone.gemfire.cache.query.internal.QCompiler;

public class ASTOr extends GemFireAST {
  private static final long serialVersionUID = 5770135811089855867L;
  public ASTOr(Token t) {
    super(t);
  }

  public ASTOr() { }

  @Override
  public void compile(QCompiler compiler) {
    super.compile(compiler);
    compiler.or(getNumberOfChildren());
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->

<merge xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- TODO(dfalcantara): Figure out how to split off the units from the value and
                            then make that part of the string smaller with a Spannable.
    -->
    <TextView
        android:id="@+id/space_used_display"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/drawer_margin_large"
        android:paddingEnd="@dimen/drawer_margin_large"
        android:textColor="@color/light_active_color"
        android:textSize="32sp" />

    <TextView
        android:id="@+id/space_total_display"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/drawer_margin_large"
        android:paddingEnd="@dimen/drawer_margin_large"
        android:textColor="@color/descriptive_text_color" />

    <!-- TODO(dfalcantara): Style this toolbar as Material on JB & KK.
                            These are currently broken in the support library and look Holo.
    -->
    <ProgressBar
        android:id="@+id/space_bar"
        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/drawer_margin_large"
        android:paddingBottom="@dimen/drawer_margin_large"
        android:paddingStart="@dimen/drawer_margin_large"
        android:paddingEnd="@dimen/drawer_margin_large" />

</merge>