text:
<?php

namespace frontend\controllers;

use common\models\EmployeeFile;
use MongoRegex;
use Yii;
use yii\filters\AccessControl;
use yii\helpers\ArrayHelper;
use yii\web\Controller;
use yii\web\NotFoundHttpException;

class EmployeeFilesController extends Controller {

    public function behaviors() {
        return [
            'access' => [
                'class' => AccessControl::className(),
                'rules' => [
                    [
                        'actions' => ['get'],
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                    [
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                ],
            ],
        ];
    }

    /**
     * Gets a file connected with an employee. This method should be available only for managers allowed to download CV and onepager.
     * @param type $fileId
     * @throws NotFoundHttpException
     */
    public function actionGet($fileId) {
        $file = ArrayHelper::getValue(EmployeeFile::findAll(['_id' => $fileId]), (int) 0, NULL);
        if ($file == NULL) {
            throw new NotFoundHttpException(Yii::t('skills', 'File not found.'));
        } else {
            Yii::$app->response->setDownloadHeaders($file->filename, $file->contentType, false, $file->length)->send();
            echo $file->file->getBytes();
        }
    }

    /**
     * Gets business photo of an employee. Available to any logged-in user.
     * @param type $fileId
     * @throws NotFoundHttpException
     */
    public function actionGetImage($fileId) {
        $imageContentType = new MongoRegex('/^image/');
        $file = ArrayHelper::getValue(EmployeeFile::find()->where(['contentType' => $imageContentType])->andWhere(['_id' => $fileId])->all(), (int) 0, NULL);
        if ($file == NULL) {
            throw new NotFoundHttpException(Yii::t('skills', 'Photo not found.'));
        } else {
            Yii::$app->response->setDownloadHeaders($file->filename, $file->contentType, false, $file->length)->send();
            echo $file->file->getBytes();
        }
    }

}


text:
package org.winterblade.minecraft.harmony.mobs.drops.matchers;

import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import org.winterblade.minecraft.harmony.api.Component;
import org.winterblade.minecraft.harmony.api.PrioritizedObject;
import org.winterblade.minecraft.harmony.api.Priority;
import org.winterblade.minecraft.harmony.api.BaseMatchResult;
import org.winterblade.minecraft.harmony.api.mobs.drops.IMobDropMatcher;
import org.winterblade.minecraft.harmony.common.matchers.BaseTimeOfDayMatcher;

/**
 * Created by Matt on 5/14/2016.
 */
@Component(properties = "minTimeOfDay")
@PrioritizedObject(priority = Priority.HIGH)
public class MinTimeOfDayMatcher extends BaseTimeOfDayMatcher implements IMobDropMatcher {
    public MinTimeOfDayMatcher(long minTime) {super(minTime, Long.MAX_VALUE);}

    @Override
    public BaseMatchResult isMatch(LivingDropsEvent evt, ItemStack drop) {
        return matches(evt.getEntity().getEntityWorld());
    }
}

redpajama_set_name: RedPajamaGithub


text:
\begin{lstlisting}[breaklines]
function BuildIntegerList (list_of_list: BaseNIntegerListOfList): BaseNIntegerList
Begin
|    output: BaseNIntegerList
|    val: array<characters>
|    inserted_elem: ListElem*
|
|    output <- CreateIntegerList(base(list_of_list)
|
|    for i from 0 to (base(list_of_list) - 1) do
|    |
|    |    inserted_elem <- head(list_of_list[i])
|    |
|    |    while (inserted_elem != undefined) do
|    |    |
|    |    |    value <- copy(value(inserted_elem))
|    |    |    output <- InsertTail(output, value)
|    |    |    inserted_elem <- next(inserted_elem)
|    |    done
|    done
|
|    BuildIntegerList <- output
Done
\end{lstlisting}


text:
struct structA{
	int member;
};

#endif // _INCLUDE_A


text:
// Copyright (c) 2015, helo2804. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above copyright
//   notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
//   notice, this list of conditions and the following disclaimer in
//   the documentation and/or other materials provided with the
//   distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// This project is hosted at https://github.com/helo2804/css_study

#include "Format.h"
#include "Logging.h"
#include "Os.h"
#include "Sg.h"

#include <cassert>
#include <cstring> // memset
#include <iomanip> // std::setfill,std::setw
#include <limits> // std::numeric_limits
#include <scsi/scsi.h> // GOOD,CHECK_CONDITION,...
#include <sstream>

int Sg::version(int fd)
{
  int version ;
  Os::ioctl(fd,SG_GET_VERSION_NUM,&version) ;
  return version ;
}

Sg::Status Sg::sgctl(int fd,Range<uint8_t const> cmd_,unsigned int timeout,int direction,Range<uint8_t> xfer)
{
  struct sg_io_hdr io ;
  memset(&io,0,sizeof(io)) ;
  io.interface_id = 'S' ;
  // command, note that SG requires a non-const command buffer
  std::vector<uint8_t> cmd(cmd_.begin(),cmd_.end()) ;
  io.cmdp = &cmd[0] ;
  io.cmd_len = cmd.size() ;
  // sense buffer
  uint8_t sense[32] ;
  io.sbp = &sense[0] ;
  io.mx_sb_len = sizeof(sense) ;
  // send data/receive data/no data
  io.dxfer_direction = direction ;
  io.dxferp = &xfer[0] ;
  if (xfer.size() > std::numeric_limits<unsigned int>::max())
    throw Error("xfer size too large") ;
  io.dxfer_len = xfer.size() ;
  // timeout in milli seconds
  io.timeout = timeout ;
  if (Logging::level() >= 3)
    Logging::out(__FILE__,__LINE__,std::string("command:") + Format::hex(cmd)) ;
  if (Logging::level() >= 4)
    if (direction == SG_DXFER_TO_DEV)
      Logging::out(__FILE__,__LINE__,std::string("argument:") + Format::hex(xfer)) ;
  // invoke
  Os::ioctl(fd,SG_IO,&io) ;
  if (io.sb_len_wr > sizeof(sense))
    throw Error("ioctl() returned mismatched sense length") ;
  // results
  Status s(io,Range<uint8_t const>(sense).sub(0,io.sb_len_wr)) ;
  if (Logging::level() >= 3)
    Logging::out(__FILE__,__LINE__,s.toString()) ;
  if (Logging::level() >= 4)
    if (direction == SG_DXFER_FROM_DEV)
      Logging::out(__FILE__,__LINE__,std::string("result:") + Format::hex(xfer)) ;
  return s ;
}

Sg::Status Sg::invoke(int fd,Range<uint8_t const> cmd,unsigned int timeout)
{
  std::vector<uint8_t> null ;
  return sgctl(fd,cmd,timeout,SG_DXFER_NONE,&null) ;
}

Sg::Status Sg::invokeRecv(int fd,Range<uint8_t const> cmd,unsigned int timeout,Range<uint8_t> xfer)
{
  return sgctl(fd,cmd,timeout,SG_DXFER_FROM_DEV,xfer) ;
}

Sg::Status Sg::invokeSend(int fd,Range<uint8_t const> cmd,unsigned int timeout,Range<uint8_t const> xfer_)
{
  // SG requires a non-const transfer buffer
  std::vector<uint8_t> xfer(xfer_.begin(),xfer_.end()) ;
  return sgctl(fd,cmd,timeout,SG_DXFER_TO_DEV,&xfer) ;
}

bool Sg::Status::success() const
{
  return (this->io.info & SG_INFO_OK_MASK) == SG_INFO_OK ;
}

uint8_t Sg::Status::senseKey() const
{
  if (this->sense.size() > 0)
    if ((this->sense[0] == 0x70) || (this->sense[0] == 0x71))
      if (this->sense.size() >= 3)
	return sense[2] & 0x0f ;
  return 0 ;
}

uint16_t Sg::Status::senseCode() const
{
  if (this->sense.size() > 0)
    if ((this->sense[0] == 0x70) || (this->sense[0] == 0x71) || (this->sense[0] >= 0x80))
      if (this->sense.size() >= 14)
	return (sense[12]<<8) + sense[13] ;
  return 0 ;
}

static std::string scsiText(uint8_t v)
{
  // INQUIRY: scsi status
  switch (v) {
  case GOOD                 : /* 0x00 */ return "good" ;
  case CHECK_CONDITION      : /* 0x01 */ return "check condition" ;
  case CONDITION_GOOD       : /* 0x02 */ return "condition good" ;
  case BUSY                 : /* 0x04 */ return "busy" ;
  case INTERMEDIATE_GOOD    : /* 0x08 */ return "intermediate good" ;
  case INTERMEDIATE_C_GOOD  : /* 0x0a */ return "intermediate c good" ;
  case RESERVATION_CONFLICT : /* 0x0c */ return "reservation conflict" ;
  case COMMAND_TERMINATED   : /* 0x11 */ return "command terminated" ;
  case QUEUE_FULL           : /* 0x14 */ return "queue full" ;
  }
  return "{no description}" ;
}

static std::string hostText(uint8_t v)
{
  // INQUIRY: host status
  switch (v) {
  case /* SG_ERR_DID_OK          */ 0x00: return "No error" ;
  case /* SG_ERR_DID_NO_CONNECT  */ 0x01: return "Couldn't connect before timeout period" ;
  case /* SG_ERR_DID_BUS_BUSY    */ 0x02: return "BUS stayed busy through time out period" ;
  case /* SG_ERR_DID_TIME_OUT    */ 0x03: return "TIMED OUT for other reason" ;
  case /* SG_ERR_DID_BAD_TARGET  */ 0x04: return "BAD target, device not responding?" ;
  case /* SG_ERR_DID_ABORT       */ 0x05: return "Told to abort for some other reason" ;
  case /* SG_ERR_DID_PARITY      */ 0x06: return "Parity error" ;
  case /* SG_ERR_DID_ERROR       */ 0x07: return "Internal error [DMA underrun on aic7xxx]" ;
  case /* SG_ERR_DID_RESET       */ 0x08: return "Reset by somebody" ;
  case /* SG_ERR_DID_BAD_INTR    */ 0x09: return "Got an interrupt we weren't expecting" ;
  case /* SG_ERR_DID_PASSTHROUGH */ 0x0a: return "Force command past mid-layer" ;
  case /* SG_ERR_DID_SOFT_ERROR  */ 0x0b: return "The low level driver wants a retry" ;
  }
  return "{no description}" ;
}

static std::string driverText(uint8_t v)
{
  std::string m ;
  // INQUIRY: driver_status
  switch (v & 0x0f) {
  case /* SG_ERR_DRIVER_OK      */ 0x00: m = "ok"      ; break ;
  case /* SG_ERR_DRIVER_BUSY    */ 0x01: m = "busy"    ; break ;
  case /* SG_ERR_DRIVER_SOFT    */ 0x02: m = "soft"    ; break ;
  case /* SG_ERR_DRIVER_MEDIA   */ 0x03: m = "media"   ; break ;
  case /* SG_ERR_DRIVER_ERROR   */ 0x04: m = "error"   ; break ;
  case /* SG_ERR_DRIVER_INVALID */ 0x05: m = "invalid" ; break ;
  case /* SG_ERR_DRIVER_TIMEOUT */ 0x06: m = "timeout" ; break ;
  case /* SG_ERR_DRIVER_HARD    */ 0x07: m = "hard"    ; break ;
  case /* SG_ERR_DRIVER_SENSE   */ 0x08: m = "sense"   ; break ; // implies sense output
  default                              : m = "{no description}" ;
  }
  switch (v & 0xf0) {
  case /* SG_ERR_SUGGEST_RETRY */ 0x10: m += ":retry"  ; break ;
  case /* SG_ERR_SUGGEST_ABORT */ 0x20: m += ":abort"  ; break ;
  case /* SG_ERR_SUGGEST_REMAP */ 0x30: m += ":remap"  ; break ;
  case /* SG_ERR_SUGGEST_DIE   */ 0x40: m += ":die"    ; break ;
  case /* SG_ERR_SUGGEST_SENSE */ 0x80: m += ":sense"  ; break ;
  default                             : m += ":{no action}" ;
  }
  return m ;
}

static std::string senseKeyText(uint8_t v)
{
  static char const* p[] = {
    "no sense"       , "recovered error",
    "not ready"      , "medium error",
    "hardware error" , "illegal request",
    "unit attention" , "data protect",
    "blank check"    , "vendor specific",
    "copy aborted"   , "aborted command",
    "{obsolete}"     , "volume overflow",
    "miscompare"     , "{reserved}" } ;
  return p[v & 0xf] ;
}

struct ScsiError
{
  uint16_t senseCode ; // additional sense code + qualifier
  char const* text ; // error description text
} ;

static ScsiError const error[] = {

  { 0x0006, "i/o process terminated" },
  { 0x0011, "audio play operation in progress" },
  { 0x0012, "audio play operation paused" },
  { 0x0013, "audio play operation successfully completed" },
  { 0x0014, "audio play operation stopped due to error" },
  { 0x0015, "no current audio status to return" },
  { 0x0017, "cleaning requested" },
  { 0x0200, "no seek complete" },
  { 0x0400, "logical unit not ready, cause not reportable" },
  { 0x0401, "logical unit is in process of becoming ready" },
  { 0x0402, "logical unit not ready, initializing cmd. required" },
  { 0x0403, "logical unit not ready, manual intervention required" },
  { 0x0404, "logical unit not ready, format in progress" },
  { 0x0407, "logical unit not ready, operation in progress" },
  { 0x0408, "logical unit not ready, long write in progress" },
  { 0x0409, "write error recovery needed" },
  { 0x0500, "logical unit does not respond to selection" },
  { 0x0600, "no reference position found" },
  { 0x0700, "multiple peripheral devices selected" },
  { 0x0800, "logical unit communication failure" },
  { 0x0801, "logical unit communication timeout" },
  { 0x0802, "logical unit communication parity error" },
  { 0x0803, "logical unit communication crc error (ultra-dma/32)" },
  { 0x0900, "track following error" },
  { 0x0901, "tracking servo failure" },
  { 0x0902, "focus servo failure" },
  { 0x0903, "spindle servo failure" },
  { 0x0904, "head select fault" },
  { 0x0a00, "error log overflow" },
  { 0x0b00, "warning" },
  { 0x0b02, "warning – enclosure degraded" },
  { 0x0c00, "write error" },
  { 0x0c07, "write error – recovery needed" },
  { 0x0c08, "write error – recovery failed" },
  { 0x0c09, "write error – loss of streaming" },
  { 0x0c0a, "write error – padding blocks added" },
  { 0x1100, "unrecovered read error" },
  { 0x1101, "read retries exhausted" },
  { 0x1102, "error too long to correct" },
  { 0x1105, "l-ec uncorrectable error" },
  { 0x1106, "circ unrecovered error" },
  { 0x110f, "error reading upc/ean number" },
  { 0x1110, "error reading isrc number" },
  { 0x1111, "read error – loss of streaming" },
  { 0x1500, "random positioning error" },
  { 0x1501, "mechanical positioning error" },
  { 0x1502, "positioning error detected by read of medium" },
  { 0x1700, "recovered data with no error correction applied" },
  { 0x1701, "recovered data with retries" },
  { 0x1702, "recovered data with positive head offset" },
  { 0x1703, "recovered data with negative head offset" },
  { 0x1704, "recovered data with retries and/or circ applied" },
  { 0x1705, "recovered data using previous sector id" },
  { 0x1707, "recovered data without ecc - recommend reassignment" },
  { 0x1708, "recovered data without ecc - recommend rewrite" },
  { 0x1709, "recovered data without ecc - data rewritten" },
  { 0x1800, "recovered data with error correction applied" },
  { 0x1801, "recovered data with error corr. & retries applied" },
  { 0x1802, "recovered data - data auto-reallocated" },
  { 0x1803, "recovered data with circ" },
  { 0x1804, "recovered data with l-ec" },
  { 0x1805, "recovered data - recommend reassignment" },
  { 0x1806, "recovered data - recommend rewrite" },
  { 0x1808, "recovered data with linking" },
  { 0x1a00, "parameter list length error" },
  { 0x1b00, "synchronous data transfer error" },
  { 0x1d00, "miscompare during verify operation" },
  { 0x2000, "invalid command operation code" },
  { 0x2100, "logical block address out of range" },
  { 0x2101, "invalid element address" },
  { 0x2102, "invalid address for write" },
  { 0x2400, "invalid field in cdb" },
  { 0x2500, "logical unit not supported" },
  { 0x2600, "invalid field in parameter list" },
  { 0x2601, "parameter not supported" },
  { 0x2602, "parameter value invalid" },
  { 0x2603, "threshold parameters not supported" },
  { 0x2604, "invalid release of active persistent reservation" },
  { 0x2700, "write protected" },
  { 0x2701, "hardware write protected" },
  { 0x2702, "logical unit software write protected" },
  { 0x2703, "associated write protect" },
  { 0x2704, "persistent write protect" },
  { 0x2705, "permanent write protect" },
  { 0x2706, "conditional write protect" },
  { 0x2800, "not ready to ready change, medium may have changed" },
  { 0x2801, "import or export element accessed" },
  { 0x2900, "power on, reset, or bus device reset occurred" },
  { 0x2901, "power on occurred" },
  { 0x2902, "scsi bus reset occurred" },
  { 0x2903, "bus device reset function occurred" },
  { 0x2904, "device internal reset" },
  { 0x2a00, "parameters changed" },
  { 0x2a01, "mode parameters changed" },
  { 0x2a02, "log parameters changed" },
  { 0x2a03, "reservations preempted" },
  { 0x2b00, "copy cannot execute since initiator cannot disconnect" },
  { 0x2c00, "command sequence error" },
  { 0x2c03, "current program area is not empty" },
  { 0x2c04, "current program area is empty" },
  { 0x2e00, "insufficient time for operation" },
  { 0x2f00, "commands cleared by another initiator" },
  { 0x3000, "incompatible medium installed" },
  { 0x3001, "cannot read medium - unknown format" },
  { 0x3002, "cannot read medium - incompatible format" },
  { 0x3003, "cleaning cartridge installed" },
  { 0x3004, "cannot write medium - unknown format" },
  { 0x3005, "cannot write medium - incompatible format" },
  { 0x3006, "cannot format medium - incompatible medium" },
  { 0x3007, "cleaning failure" },
  { 0x3008, "cannot write - application code mismatch" },
  { 0x3009, "current session not fixated for append" },
  { 0x3010, "medium not formatted" },
  { 0x3011, "cannot write medium - unsupported medium version" },
  { 0x3100, "medium format corrupted" },
  { 0x3101, "format command failed" },
  { 0x3102, "zoned formatting failed due to spare linking" },
  { 0x3400, "enclosure failure" },
  { 0x3500, "enclosure services failure" },
  { 0x3501, "unsupported enclosure function" },
  { 0x3502, "enclosure services unavailable" },
  { 0x3503, "enclosure services transfer failure" },
  { 0x3504, "enclosure services transfer refused" },
  { 0x3700, "rounded parameter" },
  { 0x3900, "saving parameters not supported" },
  { 0x3a00, "medium not present" },
  { 0x3a01, "medium not present - tray closed" },
  { 0x3a02, "medium not present - tray open" },
  { 0x3b0d, "medium destination element full" },
  { 0x3b0e, "medium source element empty" },
  { 0x3b0f, "end of medium reached" },
  { 0x3b11, "medium magazine not accessible" },
  { 0x3b12, "medium magazine removed" },
  { 0x3b13, "medium magazine inserted" },
  { 0x3b14, "medium magazine locked" },
  { 0x3b15, "medium magazine unlocked" },
  { 0x3b16, "mechanical positioning or changer error" },
  { 0x3d00, "invalid bits in identify message" },
  { 0x3e00, "logical unit has not self-configured yet" },
  { 0x3e01, "logical unit failure" },
  { 0x3e02, "timeout on logical unit" },
  { 0x3f00, "target operating conditions have changed" },
  { 0x3f01, "microcode has been changed" },
  { 0x3f02, "changed operating definition" },
  { 0x3f03, "inquiry data has changed" },
//{ 0x40nn, "diagnostic failure on component nn (80h-ffh)" },
  { 0x4300, "message error" },
  { 0x4400, "internal target failure" },
  { 0x4500, "select or reselect failure" },
  { 0x4600, "unsuccessful soft reset" },
  { 0x4700, "scsi parity error" },
  { 0x4800, "initiator detected error message received" },
  { 0x4900, "invalid message error" },
  { 0x4a00, "command phase error" },
  { 0x4b00, "data phase error" },
  { 0x4c00, "logical unit failed self-configuration" },
//{ 0x4dnn, "tagged overlapped commands (nn = queue tag)" },
  { 0x4e00, "overlapped commands attempted" },
  { 0x5100, "erase failure" },
  { 0x5101, "erase failure - incomplete erase operation detected" },
  { 0x5300, "media load or eject failed" },
  { 0x5302, "medium removal prevented" },
  { 0x5500, "system resource failure" },
  { 0x5700, "unable to recover table-of-contents" },
  { 0x5a00, "operator request or state change input" },
  { 0x5a01, "operator medium removal request" },
  { 0x5a02, "operator selected write protect" },
  { 0x5a03, "operator selected write permit" },
  { 0x5b00, "log exception" },
  { 0x5b01, "threshold condition met" },
  { 0x5b02, "log counter at maximum" },
  { 0x5b03, "log list codes exhausted" },
  { 0x5d01, "failure prediction threshold exceeded - predicted media failure" },
  { 0x5d02, "logical unit failure prediction threshold exceeded" },
  { 0x5d03, "failure prediction threshold exceeded - predicted spare area exhaustion" },
  { 0x5dff, "failure prediction threshold exceeded (false)" },
  { 0x5e00, "low power condition on" },
  { 0x5e01, "idle condition activated by timer" },
  { 0x5e02, "standby condition activated by timer" },
  { 0x5e03, "idle condition activated by command" },
  { 0x5e04, "standby condition activated by command" },
  { 0x6300, "end of user area encountered on this track" },
  { 0x6301, "packet does not fit in available space" },
  { 0x6400, "illegal mode for this track" },
  { 0x6401, "invalid packet size" },
  { 0x6500, "voltage fault" },
  { 0x6f00, "copy protection key exchange failure - authentication failure" },
  { 0x6f01, "copy protection key exchange failure - key not present" },
  { 0x6f02, "copy protection key exchange failure -key not established" },
  { 0x6f03, "read of scrambled sector without authentication" },
  { 0x6f04, "media region code is mismatched to logical unit region" },
  { 0x6f05, "logical unit region must be permanent/region reset count error" },
  { 0x7200, "session fixation error" },
  { 0x7201, "session fixation error writing lead-in" },
  { 0x7202, "session fixation error writing lead-out" },
  { 0x7203, "session fixation error - incomplete track in session" },
  { 0x7204, "empty or partially written reserved track" },
  { 0x7205, "no more track reservations allowed" },
  { 0x7300, "cd control error" },
  { 0x7301, "power calibration area almost full" },
  { 0x7302, "power calibration area is full" },
  { 0x7303, "power calibration area error" },
  { 0x7304, "program memory area update failure" },
  { 0x7305, "program memory area is full" },
  { 0x7306, "rma/pma is almost full" }

} ;

// complete table as e.g. http://lxr.free-electrons.com/source/drivers/scsi/constants.c?v=3.2
// see also: http://www.t10.org/lists/1spc-lst.htm

static std::string senseCodeText(uint8_t asc,uint8_t ascq)
{
  if (asc == 0x40) {
    return Format::sprintf("diagnostic failure on component %02x",ascq) ;
  }
  if (asc == 0x4d) {
    return Format::sprintf("tagged overlapped commands (%02x = queue tag)",ascq) ;
  }
  uint16_t senseCode = asc ; senseCode <<= 8 ; senseCode += ascq ;
  for (size_t i=0 ; i<sizeof(error)/sizeof(error[0]) ; ++i) {
    if (error[i].senseCode == senseCode) {
      return error[i].text ;
    }
  }
  return "{no description}" ;
}

std::string Sg::Status::toString() const
{
  std::ostringstream os ;
  if (this->success()) {
    os << "status(success" ;
  }
  else {
    os << "status(failure" ;
    os << ",scsi:(" << scsiText(this->io.masked_status) << ",0x" << Format::hex(this->io.masked_status) << ")" ;
    os << ",host:(" << hostText(this->io.host_status) << ",0x" << Format::hex(this->io.host_status) << ")" ;
    os << ",driver:(" << driverText(this->io.driver_status) << ",0x" << Format::hex(this->io.driver_status) << ")" ;
    os << ",sense:" << Format::hex(this->sense) ;
    if (this->sense.size() > 0) {
      if ((this->sense[0] == 0x70) || (this->sense[0] == 0x71) || (this->sense[0] >= 0x80)) {
	if (this->sense.size() >= 3) {
	  uint8_t sk = sense[2] & 0x0f ;
	  os << ",key:" << senseKeyText(sk) << "(0x" << Format::hex(sk) << ")" ;
	  if (this->sense.size() >= 14) {
	    uint8_t asc = sense[12] ;
	    uint8_t ascq = sense[13] ;
	    os << ",code:(" << senseCodeText(asc,ascq)
	       << ",0x" << Format::hex(asc) << ",0x" << Format::hex(ascq) << ")" ;
	  }
	}
      }
    }
    os << ")" ; // end of sense
  }
  os << ",duration:" << std::dec << io.duration/1000 << "." << std::setfill('0') << std::setw(3) << io.duration%100 ;
  os << ")"  ; // end of status
  return os.str() ;
}


text:
<?php

namespace Linkstreet\LaravelSms\Tests\Adapters;

use Linkstreet\LaravelSms\Adapters\Twilio\TwilioAdapter;
use Linkstreet\LaravelSms\Exceptions\AdapterException;
use Linkstreet\LaravelSms\Model\Device;
use Linkstreet\LaravelSms\Tests\Adapters\HttpClient as MockClient;
use Linkstreet\LaravelSms\Tests\TestCase;
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;

class TwilioAdapterTest extends TestCase
{
    use MockClient;

    private $config;

    /**
     * {@inheritdoc}
     */
    protected function setUp(): void
    {
        parent::setUp();

        $this->config = [
           'sid' => bin2hex(random_bytes(40)),
           'token' => bin2hex(random_bytes(40)),
           'from' => '+141040013440',
        ];
    }

    /** @test */
    public function invalidCredentials()
    {
        $config = $this->config;

        $config['sid'] = null;

        $adapter = (new TwilioAdapter($config))->setClient($this->mockClient(400));

        $this->expectException(AdapterException::class);

        $adapter->send(new Device('+910123456789', 'IN'), 'Test message');
    }

    /** @test */
    public function invalidDevice()
    {
        $stub = [
            'code' => 21604,
            'message' => "A 'To' phone number is required.",
            'more_info' => 'https://www.twilio.com/docs/errors/21604',
            'status' => 400
        ];

        $adapter = (new TwilioAdapter($this->config))->setClient($this->mockClient(400, $stub));

        $response = $adapter->send(new Device('+910123456789', 'IN'), 'Test message');

        $this->assertSame(400, $response->getStatusCode());
        $this->assertInstanceOf(PsrResponseInterface::class, $response->getRaw());
        $this->assertFalse($response->isSuccess());
        $this->assertTrue($response->isFailure());
        $this->assertEquals($stub['code'], $response->getErrorCode());
        $this->assertEquals($stub['message'], $response->getErrorMessage());
        $this->assertSame('Bad Request', $response->getReasonPhrase());
    }

    /** @test */
    public function successResponse()
    {
        $stub = [
            'sid' => 'SM05849065be86450c9c81b9ff101db634',
            'date_created' => 'Sat, 06 Jan 2018 08:26:00 +0000',
            'date_updated' => 'Sat, 06 Jan 2018 08:26:00 +0000',
            'date_sent' => null,
            'account_sid' => $this->config['sid'],
            'to' => '+910123456789',
            'from' => $this->config['from'],
            'messaging_service_sid' => null,
            'body' => 'Test message',
            'status' => 'queued',
            'num_segments' => '1',
            'num_media' => '0',
            'direction' => 'outbound-api',
            'api_version' => '2010-04-01',
            'price' => null,
            'price_unit' => 'USD',
            'error_code' => null,
            'error_message' => null,
            'uri' => '/2010-04-01/Accounts/AC1ab5d33d2932cad2635a3acb33c821e9/Messages/SM05849065be86450c9c81b9ff101db634.json',
        ];

        $adapter = (new TwilioAdapter($this->config))->setClient($this->mockClient(200, $stub));

        $response = $adapter->send(new Device('+910123456789', 'IN'), 'Test message');

        $this->assertSame(200, $response->getStatusCode());
        $this->assertInstanceOf(PsrResponseInterface::class, $response->getRaw());
        $this->assertTrue($response->isSuccess());
        $this->assertFalse($response->isFailure());
        $this->assertEquals($stub['error_code'], $response->getErrorCode());
        $this->assertEquals($stub['error_message'], $response->getErrorMessage());
        $this->assertSame('OK', $response->getReasonPhrase());
    }
}


text:
package couchdb

import (
	"bytes"
	"context"
	"encoding/json"
	"net/http"

	"github.com/go-kivik/couchdb/v3/chttp"
	"github.com/go-kivik/kivik/v3/driver"
)

type dbStats struct {
	driver.DBStats
	Sizes struct {
		File     int64 `json:"file"`
		External int64 `json:"external"`
		Active   int64 `json:"active"`
	} `json:"sizes"`
	UpdateSeq json.RawMessage `json:"update_seq"` // nolint: govet
	rawBody   json.RawMessage
}

func (s *dbStats) UnmarshalJSON(p []byte) error {
	type dbStatsClone dbStats
	c := dbStatsClone(*s)
	if err := json.Unmarshal(p, &c); err != nil {
		return err
	}
	*s = dbStats(c)
	s.rawBody = p
	return nil
}

func (s *dbStats) driverStats() *driver.DBStats {
	stats := &s.DBStats
	if s.Sizes.File > 0 {
		stats.DiskSize = s.Sizes.File
	}
	if s.Sizes.External > 0 {
		stats.ExternalSize = s.Sizes.External
	}
	if s.Sizes.Active > 0 {
		stats.ActiveSize = s.Sizes.Active
	}
	stats.UpdateSeq = string(bytes.Trim(s.UpdateSeq, `"`))
	stats.RawResponse = s.rawBody
	return stats
}

func (d *db) Stats(ctx context.Context) (*driver.DBStats, error) {
	result := dbStats{}
	if _, err := d.Client.DoJSON(ctx, http.MethodGet, d.dbName, nil, &result); err != nil {
		return nil, err
	}
	return result.driverStats(), nil
}

type dbsInfoRequest struct {
	Keys []string `json:"keys"`
}

type dbsInfoResponse struct {
	Key    string  `json:"key"`
	DBInfo dbStats `json:"info"`
	Error  string  `json:"error"`
}

func (c *client) DBsStats(ctx context.Context, dbnames []string) ([]*driver.DBStats, error) {
	opts := &chttp.Options{
		GetBody: chttp.BodyEncoder(dbsInfoRequest{Keys: dbnames}),
		Header: http.Header{
			chttp.HeaderIdempotencyKey: []string{},
		},
	}
	result := []dbsInfoResponse{}
	_, err := c.DoJSON(context.Background(), http.MethodPost, "/_dbs_info", opts, &result)
	if err != nil {
		return nil, err
	}
	stats := make([]*driver.DBStats, len(result))
	for i := range result {
		if result[i].Error == "" {
			stats[i] = result[i].DBInfo.driverStats()
		}
	}
	return stats, nil
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>

<title>GLM_GTC_type_precision: Vector and matrix types with defined precisions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

Main Page

Related Pages

Modules

Classes

Files

Typedefs

GLM_GTC_type_precision: Vector and matrix types with defined precisions

GTC Extensions (Stable)

Typedefs

typedef float16 	f16

typedef detail::tmat2x2< f16 > 	f16mat2

typedef detail::tmat2x2< f16 > 	f16mat2x2

typedef detail::tmat2x3< f16 > 	f16mat2x3

typedef detail::tmat2x4< f16 > 	f16mat2x4

typedef detail::tmat3x3< f16 > 	f16mat3

typedef detail::tmat3x2< f16 > 	f16mat3x2

typedef detail::tmat3x3< f16 > 	f16mat3x3

typedef detail::tmat3x4< f16 > 	f16mat3x4

typedef detail::tmat4x4< f16 > 	f16mat4

typedef detail::tmat4x2< f16 > 	f16mat4x2

typedef detail::tmat4x3< f16 > 	f16mat4x3

typedef detail::tmat4x4< f16 > 	f16mat4x4

typedef detail::tquat< f16 > 	f16quat

typedef detail::tvec1< f16 > 	f16vec1

typedef detail::tvec2< f16 > 	f16vec2

typedef detail::tvec3< f16 > 	f16vec3

typedef detail::tvec4< f16 > 	f16vec4

typedef float32 	f32

typedef detail::tmat2x2< f32 > 	f32mat2

typedef detail::tmat2x2< f32 > 	f32mat2x2

typedef detail::tmat2x3< f32 > 	f32mat2x3

typedef detail::tmat2x4< f32 > 	f32mat2x4

typedef detail::tmat3x3< f32 > 	f32mat3

typedef detail::tmat3x2< f32 > 	f32mat3x2

typedef detail::tmat3x3< f32 > 	f32mat3x3

typedef detail::tmat3x4< f32 > 	f32mat3x4

typedef detail::tmat4x4< f32 > 	f32mat4

typedef detail::tmat4x2< f32 > 	f32mat4x2

typedef detail::tmat4x3< f32 > 	f32mat4x3

typedef detail::tmat4x4< f32 > 	f32mat4x4

typedef detail::tquat< f32 > 	f32quat

typedef detail::tvec1< f32 > 	f32vec1

typedef detail::tvec2< f32 > 	f32vec2

typedef detail::tvec3< f32 > 	f32vec3

typedef detail::tvec4< f32 > 	f32vec4

typedef float64 	f64

typedef detail::tmat2x2< f64 > 	f64mat2

typedef detail::tmat2x2< f64 > 	f64mat2x2

typedef detail::tmat2x3< f64 > 	f64mat2x3

typedef detail::tmat2x4< f64 > 	f64mat2x4

typedef detail::tmat3x3< f64 > 	f64mat3

typedef detail::tmat3x2< f64 > 	f64mat3x2

typedef detail::tmat3x3< f64 > 	f64mat3x3

typedef detail::tmat3x4< f64 > 	f64mat3x4

typedef detail::tmat4x4< f64 > 	f64mat4

typedef detail::tmat4x2< f64 > 	f64mat4x2

typedef detail::tmat4x3< f64 > 	f64mat4x3

typedef detail::tmat4x4< f64 > 	f64mat4x4

typedef detail::tquat< f64 > 	f64quat

typedef detail::tvec1< f64 > 	f64vec1

typedef detail::tvec2< f64 > 	f64vec2

typedef detail::tvec3< f64 > 	f64vec3

typedef detail::tvec4< f64 > 	f64vec4

typedef detail::float16 	float16

typedef detail::float16 	float16_t

typedef detail::float32 	float32

typedef detail::float32 	float32_t

typedef detail::float64 	float64

typedef detail::float64 	float64_t

typedef detail::tmat2x2< f32 > 	fmat2

typedef detail::tmat2x2< f32 > 	fmat2x2

typedef detail::tmat2x3< f32 > 	fmat2x3

typedef detail::tmat2x4< f32 > 	fmat2x4

typedef detail::tmat3x3< f32 > 	fmat3

typedef detail::tmat3x2< f32 > 	fmat3x2

typedef detail::tmat3x3< f32 > 	fmat3x3

typedef detail::tmat3x4< f32 > 	fmat3x4

typedef detail::tmat4x4< f32 > 	fmat4

typedef detail::tmat4x2< f32 > 	fmat4x2

typedef detail::tmat4x3< f32 > 	fmat4x3

typedef detail::tmat4x4< f32 > 	fmat4x4

typedef detail::tvec1< float > 	fvec1

typedef detail::tvec2< float > 	fvec2

typedef detail::tvec3< float > 	fvec3

typedef detail::tvec4< float > 	fvec4

typedef detail::int16 	i16

typedef detail::tvec1< i16 > 	i16vec1

typedef detail::tvec2< i16 > 	i16vec2

typedef detail::tvec3< i16 > 	i16vec3

typedef detail::tvec4< i16 > 	i16vec4

typedef detail::int32 	i32

typedef detail::tvec1< i32 > 	i32vec1

typedef detail::tvec2< i32 > 	i32vec2

typedef detail::tvec3< i32 > 	i32vec3

typedef detail::tvec4< i32 > 	i32vec4

typedef detail::int64 	i64

typedef detail::tvec1< i64 > 	i64vec1

typedef detail::tvec2< i64 > 	i64vec2

typedef detail::tvec3< i64 > 	i64vec3

typedef detail::tvec4< i64 > 	i64vec4

typedef detail::int8 	i8

typedef detail::tvec1< i8 > 	i8vec1

typedef detail::tvec2< i8 > 	i8vec2

typedef detail::tvec3< i8 > 	i8vec3

typedef detail::tvec4< i8 > 	i8vec4

typedef detail::int16 	int16

typedef detail::int16 	int16_t

typedef detail::int32 	int32

typedef detail::int32 	int32_t

typedef detail::int64 	int64

typedef detail::int64 	int64_t

typedef detail::int8 	int8

typedef detail::int8 	int8_t

typedef detail::uint16 	u16

typedef detail::tvec1< u16 > 	u16vec1

typedef detail::tvec2< u16 > 	u16vec2

typedef detail::tvec3< u16 > 	u16vec3

typedef detail::tvec4< u16 > 	u16vec4

typedef detail::uint32 	u32

typedef detail::tvec1< u32 > 	u32vec1

typedef detail::tvec2< u32 > 	u32vec2

typedef detail::tvec3< u32 > 	u32vec3

typedef detail::tvec4< u32 > 	u32vec4

typedef detail::uint64 	u64

typedef detail::tvec1< u64 > 	u64vec1

typedef detail::tvec2< u64 > 	u64vec2

typedef detail::tvec3< u64 > 	u64vec3

typedef detail::tvec4< u64 > 	u64vec4

typedef detail::uint8 	u8

typedef detail::tvec1< u8 > 	u8vec1

typedef detail::tvec2< u8 > 	u8vec2

typedef detail::tvec3< u8 > 	u8vec3

typedef detail::tvec4< u8 > 	u8vec4

typedef detail::uint16 	uint16

typedef detail::uint16 	uint16_t

typedef detail::uint32 	uint32

typedef detail::uint32 	uint32_t

typedef detail::uint64 	uint64

typedef detail::uint64 	uint64_t

typedef detail::uint8 	uint8

typedef detail::uint8 	uint8_t

Detailed Description

Defines specific C++-based precision types.

Precision types defines types based on GLSL's precision qualifiers. This extension defines types based on explicitly-sized C++ data types.

<glm/gtc/type_precision.hpp> need to be included to use these functionalities.

Typedef Documentation

          typedef float16 f16

16 bit half-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 335 of file type_precision.hpp.

          typedef detail::tmat2x2<f16> f16mat2

Half-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Half-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 481 of file type_precision.hpp.

          typedef detail::tmat2x2<f16> f16mat2x2

Half-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Half-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 498 of file type_precision.hpp.

          typedef detail::tmat2x3<f16> f16mat2x3

Half-precision floating-point 2x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 502 of file type_precision.hpp.

          typedef detail::tmat2x4<f16> f16mat2x4

Half-precision floating-point 2x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 506 of file type_precision.hpp.

          typedef detail::tmat3x3<f16> f16mat3

Half-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 485 of file type_precision.hpp.

          typedef detail::tmat3x2<f16> f16mat3x2

Half-precision floating-point 3x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 510 of file type_precision.hpp.

          typedef detail::tmat3x3<f16> f16mat3x3

Half-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 514 of file type_precision.hpp.

          typedef detail::tmat3x4<f16> f16mat3x4

Half-precision floating-point 3x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 518 of file type_precision.hpp.

          typedef detail::tmat4x4<f16> f16mat4

Half-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 489 of file type_precision.hpp.

          typedef detail::tmat4x2<f16> f16mat4x2

Half-precision floating-point 4x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 522 of file type_precision.hpp.

          typedef detail::tmat4x3<f16> f16mat4x3

Half-precision floating-point 4x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 526 of file type_precision.hpp.

          typedef detail::tmat4x4<f16> f16mat4x4

Half-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 530 of file type_precision.hpp.

          typedef detail::tquat<f16> f16quat

Half-precision floating-point quaternion.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 654 of file type_precision.hpp.

          typedef detail::tvec1<f16> f16vec1

Half-precision floating-point vector of 1 component.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 365 of file type_precision.hpp.

          typedef detail::tvec2<f16> f16vec2

Half-precision floating-point vector of 2 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 369 of file type_precision.hpp.

          typedef detail::tvec3<f16> f16vec3

Half-precision floating-point vector of 3 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 373 of file type_precision.hpp.

          typedef detail::tvec4<f16> f16vec4

Half-precision floating-point vector of 4 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 377 of file type_precision.hpp.

          typedef float32 f32

32 bit single-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 339 of file type_precision.hpp.

          typedef detail::tmat2x2<f32> f32mat2

Single-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Single-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 539 of file type_precision.hpp.

          typedef detail::tmat2x2<f32> f32mat2x2

Single-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Single-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 556 of file type_precision.hpp.

          typedef detail::tmat2x3<f32> f32mat2x3

Single-precision floating-point 2x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 560 of file type_precision.hpp.

          typedef detail::tmat2x4<f32> f32mat2x4

Single-precision floating-point 2x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 564 of file type_precision.hpp.

          typedef detail::tmat3x3<f32> f32mat3

Single-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 543 of file type_precision.hpp.

          typedef detail::tmat3x2<f32> f32mat3x2

Single-precision floating-point 3x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 568 of file type_precision.hpp.

          typedef detail::tmat3x3<f32> f32mat3x3

Single-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 572 of file type_precision.hpp.

          typedef detail::tmat3x4<f32> f32mat3x4

Single-precision floating-point 3x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 576 of file type_precision.hpp.

          typedef detail::tmat4x4<f32> f32mat4

Single-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 547 of file type_precision.hpp.

          typedef detail::tmat4x2<f32> f32mat4x2

Single-precision floating-point 4x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 580 of file type_precision.hpp.

          typedef detail::tmat4x3<f32> f32mat4x3

Single-precision floating-point 4x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 584 of file type_precision.hpp.

          typedef detail::tmat4x4<f32> f32mat4x4

Single-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 588 of file type_precision.hpp.

          typedef detail::tquat<f32> f32quat

Single-precision floating-point quaternion.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 658 of file type_precision.hpp.

          typedef detail::tvec1<f32> f32vec1

Single-precision floating-point vector of 1 component.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 382 of file type_precision.hpp.

          typedef detail::tvec2<f32> f32vec2

Single-precision floating-point vector of 2 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 386 of file type_precision.hpp.

          typedef detail::tvec3<f32> f32vec3

Single-precision floating-point vector of 3 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 390 of file type_precision.hpp.

          typedef detail::tvec4<f32> f32vec4

Single-precision floating-point vector of 4 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 394 of file type_precision.hpp.

          typedef float64 f64

64 bit double-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 343 of file type_precision.hpp.

          typedef detail::tmat2x2<f64> f64mat2

Double-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Double-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 597 of file type_precision.hpp.

          typedef detail::tmat2x2<f64> f64mat2x2

Double-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Double-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 614 of file type_precision.hpp.

          typedef detail::tmat2x3<f64> f64mat2x3

Double-precision floating-point 2x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 618 of file type_precision.hpp.

          typedef detail::tmat2x4<f64> f64mat2x4

Double-precision floating-point 2x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 622 of file type_precision.hpp.

          typedef detail::tmat3x3<f64> f64mat3

Double-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 601 of file type_precision.hpp.

          typedef detail::tmat3x2<f64> f64mat3x2

Double-precision floating-point 3x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 626 of file type_precision.hpp.

          typedef detail::tmat3x3<f64> f64mat3x3

Double-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 630 of file type_precision.hpp.

          typedef detail::tmat3x4<f64> f64mat3x4

Double-precision floating-point 3x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 634 of file type_precision.hpp.

          typedef detail::tmat4x4<f64> f64mat4

Double-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 605 of file type_precision.hpp.

          typedef detail::tmat4x2<f64> f64mat4x2

Double-precision floating-point 4x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 638 of file type_precision.hpp.

          typedef detail::tmat4x3<f64> f64mat4x3

Double-precision floating-point 4x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 642 of file type_precision.hpp.

          typedef detail::tmat4x4<f64> f64mat4x4

Double-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 646 of file type_precision.hpp.

          typedef detail::tquat<f64> f64quat

Double-precision floating-point quaternion.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 662 of file type_precision.hpp.

          typedef detail::tvec1<f64> f64vec1

Double-precision floating-point vector of 1 component.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 399 of file type_precision.hpp.

          typedef detail::tvec2<f64> f64vec2

Double-precision floating-point vector of 2 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 403 of file type_precision.hpp.

          typedef detail::tvec3<f64> f64vec3

Double-precision floating-point vector of 3 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 407 of file type_precision.hpp.

          typedef detail::tvec4<f64> f64vec4

Double-precision floating-point vector of 4 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 411 of file type_precision.hpp.

          typedef detail::float16 float16

16 bit half-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 309 of file type_precision.hpp.

          typedef detail::float16 float16_t

16 bit half-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 322 of file type_precision.hpp.

          typedef detail::float32 float32

32 bit single-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 313 of file type_precision.hpp.

          typedef detail::float32 float32_t

32 bit single-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 326 of file type_precision.hpp.

          typedef detail::float64 float64

64 bit double-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 317 of file type_precision.hpp.

          typedef detail::float64 float64_t

64 bit double-precision floating-point scalar.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 330 of file type_precision.hpp.

          typedef detail::tmat2x2<f32> fmat2

Single-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Single-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 423 of file type_precision.hpp.

          typedef detail::tmat2x2<f32> fmat2x2

Single-precision floating-point 1x1 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions Single-precision floating-point 2x2 matrix.

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 440 of file type_precision.hpp.

          typedef detail::tmat2x3<f32> fmat2x3

Single-precision floating-point 2x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 444 of file type_precision.hpp.

          typedef detail::tmat2x4<f32> fmat2x4

Single-precision floating-point 2x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 448 of file type_precision.hpp.

          typedef detail::tmat3x3<f32> fmat3

Single-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 427 of file type_precision.hpp.

          typedef detail::tmat3x2<f32> fmat3x2

Single-precision floating-point 3x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 452 of file type_precision.hpp.

          typedef detail::tmat3x3<f32> fmat3x3

Single-precision floating-point 3x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 456 of file type_precision.hpp.

          typedef detail::tmat3x4<f32> fmat3x4

Single-precision floating-point 3x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 460 of file type_precision.hpp.

          typedef detail::tmat4x4<f32> fmat4

Single-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 431 of file type_precision.hpp.

          typedef detail::tmat4x2<f32> fmat4x2

Single-precision floating-point 4x2 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 464 of file type_precision.hpp.

          typedef detail::tmat4x3<f32> fmat4x3

Single-precision floating-point 4x3 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 468 of file type_precision.hpp.

          typedef detail::tmat4x4<f32> fmat4x4

Single-precision floating-point 4x4 matrix.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 472 of file type_precision.hpp.

          typedef detail::tvec1<float> fvec1

Single-precision floating-point vector of 1 component.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 348 of file type_precision.hpp.

          typedef detail::tvec2<float> fvec2

Single-precision floating-point vector of 2 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 352 of file type_precision.hpp.

          typedef detail::tvec3<float> fvec3

Single-precision floating-point vector of 3 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 356 of file type_precision.hpp.

          typedef detail::tvec4<float> fvec4

Single-precision floating-point vector of 4 components.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 360 of file type_precision.hpp.

          typedef detail::int16 i16

16 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 103 of file type_precision.hpp.

          typedef detail::tvec1<i16> i16vec1

16 bit signed integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 133 of file type_precision.hpp.

          typedef detail::tvec2<i16> i16vec2

16 bit signed integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 137 of file type_precision.hpp.

          typedef detail::tvec3<i16> i16vec3

16 bit signed integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 141 of file type_precision.hpp.

          typedef detail::tvec4<i16> i16vec4

16 bit signed integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 145 of file type_precision.hpp.

          typedef detail::int32 i32

32 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 107 of file type_precision.hpp.

          typedef detail::tvec1<i32> i32vec1

32 bit signed integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 150 of file type_precision.hpp.

          typedef detail::tvec2<i32> i32vec2

32 bit signed integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 154 of file type_precision.hpp.

          typedef detail::tvec3<i32> i32vec3

32 bit signed integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 158 of file type_precision.hpp.

          typedef detail::tvec4<i32> i32vec4

32 bit signed integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 162 of file type_precision.hpp.

          typedef detail::int64 i64

64 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 111 of file type_precision.hpp.

          typedef detail::tvec1<i64> i64vec1

64 bit signed integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 167 of file type_precision.hpp.

          typedef detail::tvec2<i64> i64vec2

64 bit signed integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 171 of file type_precision.hpp.

          typedef detail::tvec3<i64> i64vec3

64 bit signed integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 175 of file type_precision.hpp.

          typedef detail::tvec4<i64> i64vec4

64 bit signed integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 179 of file type_precision.hpp.

          typedef detail::int8 i8

8 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 99 of file type_precision.hpp.

          typedef detail::tvec1<i8> i8vec1

8 bit signed integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 116 of file type_precision.hpp.

          typedef detail::tvec2<i8> i8vec2

8 bit signed integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 120 of file type_precision.hpp.

          typedef detail::tvec3<i8> i8vec3

8 bit signed integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 124 of file type_precision.hpp.

          typedef detail::tvec4<i8> i8vec4

8 bit signed integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 128 of file type_precision.hpp.

          typedef detail::int16 int16

16 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 69 of file type_precision.hpp.

          typedef detail::int16 int16_t

16 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 86 of file type_precision.hpp.

          typedef detail::int32 int32

32 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 73 of file type_precision.hpp.

          typedef detail::int32 int32_t

32 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 90 of file type_precision.hpp.

          typedef detail::int64 int64

64 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 77 of file type_precision.hpp.

          typedef detail::int64 int64_t

64 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 94 of file type_precision.hpp.

          typedef detail::int8 int8

8 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 65 of file type_precision.hpp.

          typedef detail::int8 int8_t

8 bit signed integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 82 of file type_precision.hpp.

          typedef detail::uint16 u16

16 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 225 of file type_precision.hpp.

          typedef detail::tvec1<u16> u16vec1

16 bit unsigned integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 255 of file type_precision.hpp.

          typedef detail::tvec2<u16> u16vec2

16 bit unsigned integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 259 of file type_precision.hpp.

          typedef detail::tvec3<u16> u16vec3

16 bit unsigned integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 263 of file type_precision.hpp.

          typedef detail::tvec4<u16> u16vec4

16 bit unsigned integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 267 of file type_precision.hpp.

          typedef detail::uint32 u32

32 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 229 of file type_precision.hpp.

          typedef detail::tvec1<u32> u32vec1

32 bit unsigned integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 272 of file type_precision.hpp.

          typedef detail::tvec2<u32> u32vec2

32 bit unsigned integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 276 of file type_precision.hpp.

          typedef detail::tvec3<u32> u32vec3

32 bit unsigned integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 280 of file type_precision.hpp.

          typedef detail::tvec4<u32> u32vec4

32 bit unsigned integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 284 of file type_precision.hpp.

          typedef detail::uint64 u64

64 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 233 of file type_precision.hpp.

          typedef detail::tvec1<u64> u64vec1

64 bit unsigned integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 289 of file type_precision.hpp.

          typedef detail::tvec2<u64> u64vec2

64 bit unsigned integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 293 of file type_precision.hpp.

          typedef detail::tvec3<u64> u64vec3

64 bit unsigned integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 297 of file type_precision.hpp.

          typedef detail::tvec4<u64> u64vec4

64 bit unsigned integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 301 of file type_precision.hpp.

          typedef detail::uint8 u8

8 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 221 of file type_precision.hpp.

          typedef detail::tvec1<u8> u8vec1

8 bit unsigned integer scalar type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 238 of file type_precision.hpp.

          typedef detail::tvec2<u8> u8vec2

8 bit unsigned integer vector of 2 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 242 of file type_precision.hpp.

          typedef detail::tvec3<u8> u8vec3

8 bit unsigned integer vector of 3 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 246 of file type_precision.hpp.

          typedef detail::tvec4<u8> u8vec4

8 bit unsigned integer vector of 4 components type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 250 of file type_precision.hpp.

          typedef detail::uint16 uint16

16 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 191 of file type_precision.hpp.

          typedef detail::uint16 uint16_t

16 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 208 of file type_precision.hpp.

          typedef detail::uint32 uint32

32 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 195 of file type_precision.hpp.

          typedef detail::uint32 uint32_t

32 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 212 of file type_precision.hpp.

          typedef detail::uint64 uint64

64 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 199 of file type_precision.hpp.

          typedef detail::uint64 uint64_t

64 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 216 of file type_precision.hpp.

          typedef detail::uint8 uint8

8 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 187 of file type_precision.hpp.

          typedef detail::uint8 uint8_t

8 bit unsigned integer type.

See also:

GLM_GTC_type_precision: Vector and matrix types with defined precisions

Definition at line 204 of file type_precision.hpp.

<address class="footer">
Generated by

 1.8.0
</address>


text:
package org.sakaiproject.api.app.messageforums;

import java.util.Date;
import java.util.List;
import java.util.Set;

public interface Topic extends MutableEntity {

    public List getAttachments();

    public void setAttachments(List attachments);

    public String getExtendedDescription();

    public void setExtendedDescription(String extendedDescription);

    public Boolean getMutable();

    public void setMutable(Boolean mutable);

    public String getShortDescription();

    public void setShortDescription(String shortDescription);

    public Integer getSortIndex();

    public void setSortIndex(Integer sortIndex);

    public String getTitle();

    public void setTitle(String title);

    public String getTypeUuid();

    public void setTypeUuid(String typeUuid);

    public BaseForum getBaseForum();

    public void setBaseForum(BaseForum forum);

    public List getMessages();

    public void setMessages(List messages);

    public void addAttachment(Attachment attachment);

    public void removeAttachment(Attachment attachment);

    public void addMessage(Message message);

    public void removeMessage(Message message);

    public OpenForum getOpenForum();

    public void setOpenForum(OpenForum openForum);

    public PrivateForum getPrivateForum();

    public void setPrivateForum(PrivateForum privateForum);

    public Set getMembershipItemSet();

		public void setMembershipItemSet(Set membershipItemSet);

    public void addMembershipItem(DBMembershipItem item);

    public void removeMembershipItem(DBMembershipItem item);

    public String getDefaultAssignName();

    public void setDefaultAssignName(String defaultAssignName);

    public Boolean getModerated();

    public void setModerated(Boolean moderated);

    public Boolean getAutoMarkThreadsRead();

    public void setAutoMarkThreadsRead(Boolean autoMarkThreadsRead);

    public Boolean getAvailabilityRestricted();

    public void setAvailabilityRestricted(Boolean restricted);

    public Date getOpenDate();

	public void setOpenDate(Date openDate);

    public Date getCloseDate();

	public void setCloseDate(Date closeDate);

	public Boolean getAvailability();

    public void setAvailability(Boolean restricted);

    public Boolean getPostFirst();

    public void setPostFirst(Boolean postFirst);
}


text:
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<title>Mathematics Department - Indian Institute of Science (IISc)</title>
<LINK REL=stylesheet HREF="scripts/mathdept.css" TYPE="text/css">

<link rel="shortcut icon" href="iisclogo.jpg">

<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" tracingsrc="images/index.gif" tracingopacity="30" onLoad="MM_preloadImages('images/lnk-intro1.gif','images/lnk-people1.gif','images/lnk-research1.gif','images/lnk-degree1.gif','images/lnk-courses1.gif','images/lnk-seminar1.gif','images/lnk-resproj1.gif','images/lnk-career1.gif','images/lnk-imi1.gif','images/lnk-nonlin1.gif','images/lnk-matholym1.gif','images/lnk-nbhm1.gif','images/lnk-pastevents1.gif','images/lnk-rellinks1.gif','images/lnk-conus1.gif')">

            Home
            People
            Research
            Degree Programs
            Funding Agencies

                List of Events

Upcoming
              Events

Past
              Events

            Indian
              Institute of Science
            Contact
              the Administrator
            Disclaimer


text:
TEST(NodeTest, GetDistanceFrom)
{

}


text:
/************** AUTO GENERATED ***************/
    'use strict';
    const AppBase = require(global.upath.joinSafe(global.upath.resolve(__dirname, '..'), 'AppBase'))

    const _utils   = global.app.utils
    const _url   = 'https://www.bitbucket.com/search?q='
    // make a regex out of the name for searching strings
    const _queryRegex = /^BitBucket (.*)/i

    const defaultWrapper = {
      name: 'Open search on BitBucket',
      text: 'Search whatever on BitBucket',
      exec: 'bitbucketSearch',
      icon: 'bitbucket.png',
      url: _url,
      type: '_web_app_'
    }

    class bitbucketSearch extends AppBase {
      constructor(options) {
        super(defaultWrapper, options)
        this.regex = [_queryRegex]
        super.setup()
      }

      exec( ex, query ) {
        let search = null
        if( this.regex ){
          search = _utils.cleanQuery(this.regex.filter(r => r !== null), query)
          if( search ){
            query = search
          }
        }
        // url can have various values
        _url.split('|')
            .map(str => str + (query.split(' ')).join('+'))
            .forEach(q => _utils.spawn('xdg-open', [q]))
      }
    }

    module.exports = bitbucketSearch


text:
package practicaltest01var07.eim.systems.cs.pub.ro.practicaltest01var07;

import android.content.Intent;
import android.provider.SyncStateContract;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import android.util.Log;

public class PracticalTest01Var07MainActivity extends AppCompatActivity {

    private EditText nextTermText = null, allTermsText = null;
    private Button addButton = null, computeButton = null;
    private String expression = "";

    private final static int SECONDARY_ACTIVITY_REQUEST_CODE = 1;

    private ButtonClickListener buttonClickListener = new ButtonClickListener();
    private class ButtonClickListener implements View.OnClickListener {
        @Override
        public void onClick(View view) {
            switch(view.getId()) {
                //Pentru caseta de text, golesc textul
                case R.id.editText:
                    nextTermText.setText("");
                    break;
                //Pentru butonul de Add, preiau next term
                case R.id.button:
                    String nextTerm = nextTermText.getText().toString();
                    if (!nextTerm.isEmpty()) {
                        if (expression.isEmpty())
                            expression = nextTerm;
                        else
                            expression = expression + "+" + nextTerm;
                    }
                    allTermsText.setText (expression);
                    break;
                //Pentru butonul de compute, calculez expresia prin intentie
                case R.id.button2:
                    Intent intent = new Intent(getApplicationContext(), PracticalTest01Var07SecondaryActivity.class);
                    expression = allTermsText.getText().toString();
                    intent.putExtra("expression", expression);
                    startActivityForResult(intent, SECONDARY_ACTIVITY_REQUEST_CODE);
                    break;
            }
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_practical_test01_var07_main);

        nextTermText = (EditText) findViewById(R.id.editText);
        allTermsText = (EditText) findViewById(R.id.editText2);

        addButton = (Button) findViewById(R.id.button);
        computeButton = (Button) findViewById(R.id.button2);

        addButton.setOnClickListener(buttonClickListener);
        computeButton.setOnClickListener(buttonClickListener);
        nextTermText.setOnClickListener(buttonClickListener);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
        if (requestCode == SECONDARY_ACTIVITY_REQUEST_CODE) {
            Toast.makeText(this, "The activity returned with result " + resultCode, Toast.LENGTH_LONG).show();
        }
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        if (savedInstanceState.containsKey("expression")) {
            String savedExpression = savedInstanceState.getString("expression");
            if (expression.compareTo(savedExpression) == 0) {
                Log.d("Restore", "Saved value is " + expression);
            }
        }
    }
}


text:
package com.baidu.cloud.push.client;

import java.util.concurrent.Future;

import com.baidu.cloud.push.exception.PushClientException;
import com.baidu.cloud.push.exception.PushServerException;
import com.baidu.cloud.push.model.PushMsgToSingleDeviceRequest;
import com.baidu.cloud.push.model.PushMsgToSingleDeviceResponse;

public interface BaiduPushAsync {

	Future<PushMsgToSingleDeviceResponse> pushMsgToSingleDeviceAsync(
			PushMsgToSingleDeviceRequest request)
			throws PushClientException, PushServerException;

}


text:
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;

namespace Nowin
{
    public class IpIsLocalChecker : IIpIsLocalChecker
    {
        readonly Dictionary<IPAddress, bool> _dict;

        public IpIsLocalChecker()
        {
            var host = Dns.GetHostEntry(Dns.GetHostName());
            _dict = host.AddressList.Where(
                a => a.AddressFamily == AddressFamily.InterNetwork || a.AddressFamily == AddressFamily.InterNetworkV6).
                ToDictionary(p => p, p => true);
            _dict[IPAddress.Loopback] = true;
            _dict[IPAddress.IPv6Loopback] = true;
        }

        public bool IsLocal(IPAddress address)
        {
            return _dict.ContainsKey(address);
        }
    }
}


text:
<?php

declare(strict_types=1);

namespace CQRS\EventHandling\Publisher;

use CQRS\Domain\Model\AggregateRootInterface;

interface IdentityMapInterface
{
    /**
     * @return AggregateRootInterface[]
     */
    public function getAll(): array;

    public function add(AggregateRootInterface $aggregateRoot): void;

    public function remove(AggregateRootInterface $aggregateRoot): void;

    public function clear(): void;
}


text:
<?php
namespace Arhitect\Contract;

/**
 * Interface Session
 *
 * @package Arhitect\Contract
 */
interface Session
{

    /**
     * @param $key
     *
     * @return boolean
     */
    public function has($key);

    /**
     * @param $key
     *
     * @return mixed
     */
    public function get($key);

    /**
     * @param $key
     *
     * @return null
     */
    public function remove($key);

    /**
     * @param $key
     * @param $value
     *
     * @return null
     */
    public function set($key, $value);

    /**
     * @return mixed
     */
    public function getFlashBag();

    /**
     * @return mixed
     */
    public function getErrorsBag();

    /**
     * @return null
     */
    public function start();

    /**
     * @return boolean
     */
    public function isStarted();

    /**
     * @return null
     */
    public function regenerate();
}


text:
namespace blink {

class SelectorFilterParentScopeTest : public testing::Test {
 protected:
  void SetUp() override {
    dummy_page_holder_ = std::make_unique<DummyPageHolder>(gfx::Size(800, 600));
    GetDocument().SetCompatibilityMode(Document::kNoQuirksMode);
  }

  Document& GetDocument() { return dummy_page_holder_->GetDocument(); }

  static constexpr size_t max_identifier_hashes = 4;

 private:
  std::unique_ptr<DummyPageHolder> dummy_page_holder_;
};

TEST_F(SelectorFilterParentScopeTest, ParentScope) {
  GetDocument().body()->setAttribute(html_names::kClassAttr, "match");
  GetDocument().documentElement()->SetIdAttribute("myId");
  auto* div = GetDocument().CreateRawElement(html_names::kDivTag);
  GetDocument().body()->appendChild(div);
  SelectorFilter& filter = GetDocument().GetStyleResolver().GetSelectorFilter();
  GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInStyleRecalc);

  SelectorFilterRootScope root_scope(nullptr);
  SelectorFilterParentScope html_scope(*GetDocument().documentElement());
  {
    SelectorFilterParentScope body_scope(*GetDocument().body());
    SelectorFilterParentScope::EnsureParentStackIsPushed();
    {
      SelectorFilterParentScope div_scope(*div);
      SelectorFilterParentScope::EnsureParentStackIsPushed();

      CSSSelectorList selectors = CSSParser::ParseSelector(
          MakeGarbageCollected<CSSParserContext>(
              kHTMLStandardMode, SecureContextMode::kInsecureContext),
          nullptr, "html *, body *, .match *, #myId *");

      for (const CSSSelector* selector = selectors.First(); selector;
           selector = CSSSelectorList::Next(*selector)) {
        unsigned selector_hashes[max_identifier_hashes];
        filter.CollectIdentifierHashes(*selector, selector_hashes,
                                       max_identifier_hashes);
        EXPECT_NE(selector_hashes[0], 0u);
        EXPECT_FALSE(
            filter.FastRejectSelector<max_identifier_hashes>(selector_hashes));
      }
    }
  }
}

TEST_F(SelectorFilterParentScopeTest, RootScope) {
  GetDocument().body()->setInnerHTML(R"HTML(

  )HTML");
  SelectorFilter& filter = GetDocument().GetStyleResolver().GetSelectorFilter();
  GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInStyleRecalc);

  SelectorFilterRootScope span_scope(GetDocument().getElementById("y"));
  SelectorFilterParentScope::EnsureParentStackIsPushed();

  CSSSelectorList selectors = CSSParser::ParseSelector(
      MakeGarbageCollected<CSSParserContext>(
          kHTMLStandardMode, SecureContextMode::kInsecureContext),
      nullptr, "html *, body *, div *, span *, .x *, #y *");

  for (const CSSSelector* selector = selectors.First(); selector;
       selector = CSSSelectorList::Next(*selector)) {
    unsigned selector_hashes[max_identifier_hashes];
    filter.CollectIdentifierHashes(*selector, selector_hashes,
                                   max_identifier_hashes);
    EXPECT_NE(selector_hashes[0], 0u);
    EXPECT_FALSE(
        filter.FastRejectSelector<max_identifier_hashes>(selector_hashes));
  }
}

TEST_F(SelectorFilterParentScopeTest, ReentrantSVGImageLoading) {
  GetDocument().body()->setInnerHTML(R"HTML(

  )HTML");

  // The SVG image is loaded synchronously from style recalc re-entering style
  // recalc for the SVG image Document. Without supporting re-entrancy for
  // SelectorFilterParentScope with a SelectorFilterRootScope, this update may
  // cause DCHECKs to fail.
  GetDocument().UpdateStyleAndLayoutTree();
}

TEST_F(SelectorFilterParentScopeTest, AttributeFilter) {
  GetDocument().body()->setInnerHTML(
      R"HTML(
<svg VIewBox></svg>
)HTML");
  auto* outer = To<Element>(GetDocument().body()->firstChild());
  auto* svg = To<Element>(outer->firstChild());
  auto* inner = GetDocument().CreateRawElement(html_names::kDivTag);
  svg->appendChild(inner);

  ASSERT_TRUE(outer->hasAttributes());
  EXPECT_EQ("attr", outer->Attributes()[0].GetName().LocalName());

  ASSERT_TRUE(svg->hasAttributes());
  EXPECT_EQ("viewBox", svg->Attributes()[0].GetName().LocalName());

  SelectorFilter& filter = GetDocument().GetStyleResolver().GetSelectorFilter();
  GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInStyleRecalc);

  SelectorFilterRootScope span_scope(inner);
  SelectorFilterParentScope::EnsureParentStackIsPushed();

  CSSSelectorList selectors = CSSParser::ParseSelector(
      MakeGarbageCollected<CSSParserContext>(
          kHTMLStandardMode, SecureContextMode::kInsecureContext),
      nullptr, "[Attr] *, [attr] *, [viewbox] *, [VIEWBOX] *");

  for (const CSSSelector* selector = selectors.First(); selector;
       selector = CSSSelectorList::Next(*selector)) {
    unsigned selector_hashes[max_identifier_hashes];
    filter.CollectIdentifierHashes(*selector, selector_hashes,
                                   max_identifier_hashes);
    EXPECT_NE(selector_hashes[0], 0u);
    EXPECT_FALSE(
        filter.FastRejectSelector<max_identifier_hashes>(selector_hashes));
  }
}

}  // namespace blink