text:
<?php

namespace app\models;

use Yii;
use yii\web\UploadedFile;
use app\models\general\Upload;
use app\models\general\GeneralMessage;
use common\models\general\GeneralFunction;
use app\models\general\GeneralLabel;

/**
 * This is the model class for table "tbl_informasi_permohonan".
 *
 * @property integer $bantuan_elaun_muatnaik_id
 * @property string $butiran_permohonan
 * @property string $amaun
 * @property string $muatnaik_dokumen
 */
class BantuanElaunMuatnaik extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tbl_bantuan_elaun_muatnaik';
    }

    public function behaviors()
    {
        return [
            'bedezign\yii2\audit\AuditTrailBehavior',
            [
                'class' => \yii\behaviors\BlameableBehavior::className(),
                'createdByAttribute' => 'created_by',
                'updatedByAttribute' => 'updated_by',
            ],
            [
                'class' => \yii\behaviors\TimestampBehavior::className(),
                'createdAtAttribute' => 'created',
                'updatedAtAttribute' => 'updated',
                'value' => new \yii\db\Expression('NOW()'),
            ],
        ];
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['butiran_permohonan', 'amaun'], 'required', 'skipOnEmpty' => true, 'message' => GeneralMessage::yii_validation_required],
            [['amaun'], 'number', 'message' => GeneralMessage::yii_validation_number],
            [['butiran_permohonan'], 'string', 'max' => 80, 'tooLong' => GeneralMessage::yii_validation_string_max],
            [['muatnaik_dokumen'], 'string', 'max' => 100, 'tooLong' => GeneralMessage::yii_validation_string_max],
            [['muatnaik_dokumen'], 'validateFileUpload', 'skipOnEmpty' => false],
            [['butiran_permohonan'], function ($attribute, $params) {
                if (!\common\models\general\GeneralFunction::validateXSS($this->$attribute)) {
                    $this->addError($attribute, GeneralMessage::yii_validation_xss);
                }
            }],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'bantuan_elaun_muatnaik_id' => 'ID',
            'butiran_permohonan' => GeneralLabel::butiran_permohonan,
            'amaun' => GeneralLabel::amaun,
            'muatnaik_dokumen' => GeneralLabel::muatnaik_dokumen,

        ];
    }

    /**
     * Validate upload file cannot be empty
     */
    public function validateFileUpload($attribute, $params){
        $file = UploadedFile::getInstance($this, $attribute);

        if($file && $file->getHasError()){
            $this->addError($attribute, 'File error :' . Upload::getUploadErrorDesc($file->error));
        }

        if($file){
            if(!GeneralFunction::checkFileExtension($file->getExtension())){
                $this->addError($attribute, GeneralMessage::uploadFileTypeError);
            }
        }

        if(!$file && $this->$attribute==""){
            $this->addError($attribute, GeneralMessage::uploadEmptyError);
        }
    }
}


text:
Basic data container for NE systems, keeping logs / backups away from their service containers.

```shell
docker build -t netengine/data .
docker run --name DATA netengine/data
```

Transfer ownership of the shared volume to the netenegine user.

```shell
docker run --rm -volumes-from DATA netengine/base /sbin/my_init -- chown netengine:netengine /var/data
```

redpajama_set_name: RedPajamaGithub


text:
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"

if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
    >&2 echo 'ERROR: Invalid installer checksum'
    rm composer-setup.php
    exit 1
fi

php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar /usr/local/bin/composer
exit $RESULT


text:
package envoy

import (
	"strings"
	"testing"

	"istio.io/istio/pkg/spiffe"
)

const (
	expMixerSAN string = "spiffe://cluster.local/ns/istio-system/sa/istio-mixer-service-account"
	expPilotSAN string = "spiffe://cluster.local/ns/istio-system/sa/istio-pilot-service-account"
)

func TestGetMixerSAN(t *testing.T) {
	spiffe.SetTrustDomain("cluster.local")
	mixerSANs := GetSAN("istio-system", MixerSvcAccName)
	if strings.Compare(mixerSANs, expMixerSAN) != 0 {
		t.Errorf("GetMixerSAN() => expected %#v but got %#v", expMixerSAN, mixerSANs[0])
	}
}

func TestGetPilotSAN(t *testing.T) {
	spiffe.SetTrustDomain("cluster.local")
	pilotSANs := GetSAN("istio-system", PilotSvcAccName)
	if strings.Compare(pilotSANs, expPilotSAN) != 0 {
		t.Errorf("GetPilotSAN() => expected %#v but got %#v", expPilotSAN, pilotSANs[0])
	}
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Persoonia saundersiana Kippist ex Meisn.

### Remarks
null


text:
using System;
using SchoolSystem.Framework.Core.Contracts;

namespace SchoolSystem.Framework.Core.Providers
{
    public class ConsoleReaderProvider : IReader
    {
        public string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}


text:
import("funhtml.*");

import("etherpad.utils.*");
import("etherpad.globals.*");

function onRequest() {
  var p = request.path.split('/')[3];
  if (!p) {
    p = "main";
  }
  if (_getTitle(p)) {
    _renderManualPage(p);
    return true;
  } else {
    return false;
  }
}

function _getTitle(t) {
  var titles = {
    'main': " ",
    'installation-guide': "Installation Guide",
    'upgrade-guide': "Upgrade Guide",
    'configuration-guide': "Configuration Guide",
    'troubleshooting': "Troubleshooting",
    'faq': "FAQ",
    'changelog': "ChangeLog"
  };
  return titles[t];
}

function _renderTopnav(p) {
  var d = DIV({className: "pne-manual-topnav"});
  if (p != "main") {
    d.push(A({href: '/ep/pne-manual/'}, "PNE Manual"),
           "  >  ",
           _getTitle(p));
  }
  return d;
}

function _renderManualPage(p, data) {
  data = (data || {});
  data.pneVersion = PNE_RELEASE_VERSION;

  function getContent() {
    return renderTemplateAsString('pne-manual/'+p+'.ejs', data);
  }
  renderFramed('pne-manual/manual-template.ejs', {
    getContent: getContent,
    renderTopnav: function() { return _renderTopnav(p); },
    title: _getTitle(p),
    id: p,
  });
  return true;
}


text:
<?php

namespace Landing\Controller;

use Application\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class ContactUsController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel([

        ]);
    }
}


text:
#region File Description
// Solution : EpicInstaBook
// Projetct : EpicInstaBook.Common.Portable
// FileName : StringValueAttribute.cs
// Created : 2015-12-14_9:59 PM
#endregion

#region Using References
using System;

#endregion

namespace EpicInstaBook.Common.Helpers
{
    public class StringValueAttribute : Attribute
    {
        public string StringValue { get; }

        public StringValueAttribute(string value)
        {
            StringValue = value;
        }
    }
}


text:
'use strict';

/**
 * Module dependencies.
 */
var _ = require('lodash'),
	errorHandler = require('../errors.server.controller.js'),
	mongoose = require('mongoose'),
	passport = require('passport'),
	User = mongoose.model('User');
	var mailer = require('../users/users.sendemail.controller.js');
	var path = require('path');
	var fs = require('fs');
	var logger = require('morgan');

/**
 * Update user details
 */
exports.update = function(req, res) {

	// Init Variables
	var user = req.user;
	var message = null;

	// For security measurement we remove the roles from the req.body object
	delete req.body.roles;

	if (user) {
		// Merge existing user
		user = _.extend(user, req.body);
		user.updated = Date.now();
		user.displayName = user.firstName + ' ' + user.lastName;

		user.save(function(err) {
			if (err) {
				return res.status(400).send({
					message: errorHandler.getErrorMessage(err)
				});
			} else {
				req.login(user, function(err) {
					if (err) {
						res.status(400).send(err);
					} else {
						res.json(user);
					}
				});
			}
		});
	} else {
		res.status(400).send({
			message: 'User is not signed in'
		});
	}
};

exports.list = function(req, res, next) {

		User.find({roles: 'user'})
		.exec(function(err, user) {
			if (err) {
				return res.status(400).send({
					message: errorHandler.getErrorMessage(err)
				});
			} else {
				res.json(user);
			}
		});

};

exports.uploadAvatar = function(req, res){
	console.log(req.body);
	console.log(req.files);
var dataURL = req.body.dataURL;
var date = new Date().toDateString();
var base64 = dataURL.replace(/^data:image\/png;base64,/, '');

var filename = req.body.firstname+'_'+req.body.lastname+'_'+date;
console.log(filename);
var dirname = path.resolve('.');
 fs.writeFile(dirname +'/public/img/profile_pics/'+filename, base64, 'base64', function(err) {
            if(err) res.sendStatus(404);
            console.log(err);
             res.json(200, {
                path: dirname +'/public/img/profile_pics/'+filename,
                msg: 'Pic Updated Successfully',
                dataURL: dataURL
            });
	});
/*
	/*console.log(req);*/
/*var image =  req.files.file;
var tmp_path = req.files.file.path;

var target_path = dirname + '/public/img/profile_pics/'+image.originalname;
 fs.rename(tmp_path, target_path, function(err) {
        if (err) throw err;
        // delete the temporary file, so that the explicitly set temporary upload dir does not get filled with unwanted files
        fs.unlink(tmp_path, function() {
            if (err) throw err;
            res.send(200, {
            	path: target_path,
            	size: req.files.file.size,
            	msg: 'Your Profile Picture was updated succeeded'
            });
        });
    });
*/
/*res.json({msg: 'OK'});
*///getting the variables we need
/*var */
/*var filename = req.files.image.name;
var lastname = filename.replace(' ','_');
var name = lastname.split('.');

var date = new Date();
var time = date.getTime();
var imageDest = name[0]+time+'.'+name[name.length-1];*/
/*console.log(imageDest);
*//*
//creates the final file name on our system
*/
/*
console.log(dirname);
  //creates an new image file on our own server
    fs.writeFile(dirname +'/public/img/profile_pics/'+image.name, base64, 'base64', function(err) {
            if(err) res.sendStatus(404);
            console.log(err);
             res.json(200, {
                src: dirname +'/public/img/profile_pics/'+image.name,
                msg: 'Pic Updated Successfully'
            });
	});
*/

  /*  var newImageLocation = path.join(__dirname, 'public/images', image.name);

    fs.readFile(image.path, function(err, data) {
        fs.writeFile(newImageLocation, data, function(err) {
            res.json(200, {
                src: '/public/modules/core/img/public_profiles/' + image.name,
                size: image.size
            });
        });
    });*/

};

/*//function that processes image upload.
exports.uploadAvatar = function (req, res) {
	console.log(req);
	*/
	/*console.log(req.body);
	console.log(req.files);
	res.send(200);*/
/*	console.log(req);
*/ /*   var form = new formidable.IncomingForm();
    form.parse(req, function (err, fields, files) {
        var file = files.file;
        var username = fields.email;
        var tempPath = file.path;
        var targetPath = path.resolve('./public/photos/' + username + '/' + file.name);
        fs.rename(tempPath, targetPath, function (err) {
            if (err) {
                throw err;
            }
            logger.debug(file.name + ' upload complete for user: ' + username);
            return res.json({path: 'photos/' + username + '/' + file.name});
        });
    });
 };
*/

exports.get_staff = function (req, res, next){

if (req.query && req.query.roles === undefined){
	var query = req.query.s;
	console.log(query);
User.find({displayName:  new RegExp(query, 'i'),
roles: 'staff'}).select('-password -salt -stripeCustomer -email -address')
.exec(function (err, user){
		if (err) {
			console.log(err);
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		}
		if (user.length === 0){
		res.json({staff: false});
		} else {
			console.log(user);
			res.json(user);
		}
	});

} else {
		User.find({roles: req.query.roles})
		.select('-salt -password')
		.exec(function (err, user){
				if (err) {
					return res.status(400).send({
						message: errorHandler.getErrorMessage(err)
					});
				}
				if (user.length === 0){
				res.json({staff: false});
				} else {
					res.json(user);
				}
		});
	}
};

exports.new_staff_application = function(req, res){

console.log(req.body.address);
req.body.roles = 'staff';
req.body.staff_data = {};
req.body.staff_data.application_date = new Date();
req.body.provider = 'local';
req.body.displayName = req.body.firstName + ' '+ req.body.lastName;
req.body.password = 12312412412;
var user = new User(req.body);
console.log(user.address);

// /*Then save the user
	user.save(function(err) {
		if (err) {
			console.log(err);
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			mailer.sendAdminEmail(user, function(result){
				if (result.response ==='250 Great success'){
					res.status(200).json({
						msg: 'OK'
					});
				}

			});
		}
	});
};
exports.getOne = function(req, res, next) {
console.log('THis is the GEt one User &&&&&&&&&'+req);
	User.findOne({_id: req.params.id}).exec(function(err, user) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.json(user);
		}
	});
};

exports.check_username = function (req, res, next){
/*	console.log(req.body);
*/	User.find({email: req.body.email}).exec(function (err, user){
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		}

		if (user.length === 0){
		res.json({
			isUser: false
		});
		} else {
			res.json({
				isUser: true
				});
		}
	});
};

exports.removeUser = function (req, res, next){
var id = req.params.id;

	User.remove({_id: id}, 1).exec(function (err, user){
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		}

		if (user.length === 0){
		res.status(404).send({
			message: 'No user'
		});
		} else {
			res.status(200).send({message: 'User Removed'});

		}
	});
};

exports.removeAdmin = function (req, res, next){
var email = req.body.email;
console.log(email);
	User.remove({email: email}, 1).exec(function (err, user){
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		}

		if (user.length === 0){
		res.status(404).send({
			message: 'No user'
		});
		} else {
			res.status(200).send({message: 'User Removed'});

		}
	});
};

/**
 * Send User
 */
exports.me = function(req, res) {
	res.json(req.user || null);
};


text:
(function() {
  var ABORT, CHANNEL_URL_PREFIX, Channel, CookieJar, MAX_RETRIES, NetworkError, ORIGIN_URL, PushDataParser, Q, UA, authhead, crypto, find, fmterr, isUnknownSID, log, op, ref, req, request, sapisidof, wait,
    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

  require('fnuc').expose(global);

  CookieJar = require('tough-cookie').CookieJar;

  request = require('request');

  crypto = require('crypto');

  log = require('bog');

  Q = require('q');

  ref = require('./util'), req = ref.req, find = ref.find, wait = ref.wait, NetworkError = ref.NetworkError, fmterr = ref.fmterr;

  PushDataParser = require('./pushdataparser');

  ORIGIN_URL = 'https://talkgadget.google.com';

  CHANNEL_URL_PREFIX = 'https://0.client-channel.google.com/client-channel';

  UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36';

  op = function(o) {
    return CHANNEL_URL_PREFIX + "/" + o;
  };

  isUnknownSID = function(res) {
    return res.statusCode === 400 && res.statusMessage === 'Unknown SID';
  };

  ABORT = {};

  authhead = function(sapisid, msec, origin) {
    var auth_hash, auth_string;
    auth_string = msec + " " + sapisid + " " + origin;
    auth_hash = crypto.createHash('sha1').update(auth_string).digest('hex');
    return {
      authorization: "SAPISIDHASH " + msec + "_" + auth_hash,
      'x-origin': origin,
      'x-goog-authuser': '0'
    };
  };

  sapisidof = function(jarstore) {
    var cookie, cookies, jar;
    jar = new CookieJar(jarstore);
    cookies = jar.getCookiesSync(ORIGIN_URL);
    cookie = find(cookies, function(cookie) {
      return cookie.key === 'SAPISID';
    });
    return cookie != null ? cookie.value : void 0;
  };

  MAX_RETRIES = 5;

  module.exports = Channel = (function() {
    function Channel(jarstore1, proxy) {
      this.jarstore = jarstore1;
      this.proxy = proxy;
      this.subscribe = bind(this.subscribe, this);
      this.reqpoll = bind(this.reqpoll, this);
      this.poll = bind(this.poll, this);
      this.stop = bind(this.stop, this);
      this.start = bind(this.start, this);
      this.getLines = bind(this.getLines, this);
      this.fetchSid = bind(this.fetchSid, this);
      this.fetchPvt = bind(this.fetchPvt, this);
      this.pushParser = new PushDataParser();
    }

    Channel.prototype.fetchPvt = function() {
      var opts;
      log.debug('fetching pvt');
      opts = {
        method: 'GET',
        uri: ORIGIN_URL + "/talkgadget/_/extension-start",
        jar: request.jar(this.jarstore)
      };
      return req(opts).then((function(_this) {
        return function(res) {
          var data;
          data = JSON.parse(res.body);
          log.debug('found pvt token', data[1]);
          return data[1];
        };
      })(this)).fail(function(err) {
        log.info('fetchPvt failed', fmterr(err));
        return Q.reject(err);
      });
    };

    Channel.prototype.authHeaders = function() {
      var sapisid;
      sapisid = sapisidof(this.jarstore);
      if (!sapisid) {
        log.warn('no SAPISID cookie');
        return null;
      }
      return authhead(sapisid, Date.now(), ORIGIN_URL);
    };

    Channel.prototype.fetchSid = function() {
      var auth;
      auth = this.authHeaders();
      if (!auth) {
        return Q.reject(new Error("No auth headers"));
      }
      return Q().then((function(_this) {
        return function() {
          var opts;
          opts = {
            method: 'POST',
            uri: op('channel/bind'),
            jar: request.jar(_this.jarstore),
            qs: {
              VER: 8,
              RID: 81187,
              ctype: 'hangouts'
            },
            form: {
              count: 0
            },
            headers: auth,
            encoding: null
          };
          return req(opts).then(function(res) {
            var _, gsid, line, p, ref1, ref2, ref3, ref4, ref5, sid;
            if (res.statusCode === 200) {
              p = new PushDataParser(res.body);
              line = p.pop();
              ref1 = line[0], _ = ref1[0], (ref2 = ref1[1], _ = ref2[0], sid = ref2[1]);
              ref3 = line[1], _ = ref3[0], (ref4 = ref3[1], (ref5 = ref4[0], gsid = ref5.gsid));
              log.debug('found sid/gsid', sid, gsid);
              return {
                sid: sid,
                gsid: gsid
              };
            } else {
              return log.warn('failed to get sid', res.statusCode, res.body);
            }
          });
        };
      })(this)).fail(function(err) {
        log.info('fetchSid failed', fmterr(err));
        return Q.reject(err);
      });
    };

    Channel.prototype.getLines = function() {
      if (!this.running) {
        this.start();
      }
      return this.pushParser.allLines();
    };

    Channel.prototype.start = function() {
      var retries, run;
      retries = MAX_RETRIES;
      this.running = true;
      this.sid = null;
      this.gsid = null;
      this.subscribed = false;
      run = (function(_this) {
        return function() {
          if (!_this.running) {
            return;
          }
          return _this.poll(retries).then(function() {
            retries = MAX_RETRIES;
            return run();
          }).fail(function(err) {
            if (err === ABORT) {
              return;
            }
            retries--;
            log.debug('poll error', err);
            if (retries > 0) {
              return run();
            } else {
              _this.running = false;
              return _this.pushParser.reset(err);
            }
          });
        };
      })(this);
      run();
      return null;
    };

    Channel.prototype.stop = function() {
      var ref1, ref2;
      log.debug('channel stop');
      this.running = false;
      if ((ref1 = this.pushParser) != null) {
        if (typeof ref1.reset === "function") {
          ref1.reset();
        }
      }
      return (ref2 = this.currentReq) != null ? typeof ref2.abort === "function" ? ref2.abort() : void 0 : void 0;
    };

    Channel.prototype.poll = function(retries) {
      return Q().then(function() {
        var backoffTime;
        backoffTime = 2 * (MAX_RETRIES - retries) * 1000;
        if (backoffTime) {
          log.debug('backing off for', backoffTime, 'ms');
        }
        return wait(backoffTime);
      }).then((function(_this) {
        return function() {
          if (!_this.running) {
            return Q.reject(ABORT);
          }
        };
      })(this)).then((function(_this) {
        return function() {
          if (!_this.sid) {
            return _this.fetchSid().then(function(o) {
              merge(_this, o);
              return _this.pushParser.reset();
            });
          }
        };
      })(this)).then((function(_this) {
        return function() {
          return _this.reqpoll();
        };
      })(this));
    };

    Channel.prototype.reqpoll = function() {
      return Q.Promise((function(_this) {
        return function(rs, rj) {
          var ok, opts;
          log.debug('long poll req');
          opts = {
            method: 'GET',
            uri: op('channel/bind'),
            jar: request.jar(_this.jarstore),
            qs: {
              VER: 8,
              gsessionid: _this.gsid,
              RID: 'rpc',
              t: 1,
              SID: _this.sid,
              CI: 0,
              ctype: 'hangouts',
              TYPE: 'xmlhttp'
            },
            headers: _this.authHeaders(),
            encoding: null,
            timeout: 30000
          };
          ok = false;
          return _this.currentReq = request(opts).on('response', function(res) {
            log.debug('long poll response', res.statusCode, res.statusMessage);
            if (res.statusCode === 200) {
              return ok = true;
            } else if (isUnknownSID(res)) {
              ok = false;
              log.debug('sid became invalid');
              _this.sid = null;
              _this.gsid = null;
              _this.subscribed = false;
            }
            return rj(NetworkError.forRes(res));
          }).on('data', function(chunk) {
            if (ok) {
              _this.pushParser.parse(chunk);
            }
            if (!_this.subscribed) {
              return _this.subscribe();
            }
          }).on('error', function(err) {
            log.debug('long poll error', err);
            return rj(err);
          }).on('end', function() {
            log.debug('long poll end');
            return rs();
          });
        };
      })(this));
    };

    Channel.prototype.subscribe = function() {
      if (this.subscribed) {
        return;
      }
      this.subscribed = true;
      return Q().then(function() {
        return wait(1000);
      }).then((function(_this) {
        return function() {
          var opts, timestamp;
          timestamp = Date.now() * 1000;
          opts = {
            method: 'POST',
            uri: op('channel/bind'),
            jar: request.jar(_this.jarstore),
            proxy: _this.proxy,
            qs: {
              VER: 8,
              RID: 81188,
              ctype: 'hangouts',
              gsessionid: _this.gsid,
              SID: _this.sid
            },
            headers: _this.authHeaders(),
            timeout: 30000,
            form: {
              count: 3,
              ofs: 0,
              req0_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":0,"5":"c1"},"2":{}}',
              req1_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":' + timestamp + ',"5":"c3"},"3":{"1":{"1":"babel"}}}',
              req2_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":' + timestamp + ',"5":"c4"},"3":{"1":{"1":"hangout_invite"}}}'
            }
          };
          return req(opts);
        };
      })(this)).then(function(res) {
        var ok;
        if (res.statusCode === 200) {
          return log.debug('subscribed channel');
        } else if (isUnknownSID(res)) {
          ok = false;
          log.debug('sid became invalid');
          this.sid = null;
          this.gsid = null;
          this.subscribed = false;
        }
        return Q.reject(NetworkError.forRes(res));
      }).fail((function(_this) {
        return function(err) {
          log.info('subscribe failed', fmterr(err));
          _this.subscribed = false;
          return Q.reject(err);
        };
      })(this));
    };

    return Channel;

  })();

}).call(this);


text:
package com.microsoft.azure.management.recoveryservices.siterecovery.v2018_01_10;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Properties of site details provided during the time of site creation.
 */
public class FabricCreationInputProperties {
    /**
     * Fabric provider specific creation input.
     */
    @JsonProperty(value = "customDetails")
    private FabricSpecificCreationInput customDetails;

    /**
     * Get fabric provider specific creation input.
     *
     * @return the customDetails value
     */
    public FabricSpecificCreationInput customDetails() {
        return this.customDetails;
    }

    /**
     * Set fabric provider specific creation input.
     *
     * @param customDetails the customDetails value to set
     * @return the FabricCreationInputProperties object itself.
     */
    public FabricCreationInputProperties withCustomDetails(FabricSpecificCreationInput customDetails) {
        this.customDetails = customDetails;
        return this;
    }

}


text:
package com.amazonaws.services.forecast.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Provides information about the method that featurizes (transforms) a dataset field. The method is part of the
 * FeaturizationPipeline of the Featurization object.
 *

 *

 * The following is an example of how you specify a FeaturizationMethod object.
 *

 *

 * {
 *

 *

 * "FeaturizationMethodName": "filling",
 *

 *

 * "FeaturizationMethodParameters": {"aggregation": "sum", "middlefill": "zero", "backfill": "zero"}
 *

 *

 * }
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FeaturizationMethod implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The name of the method. The "filling" method is the only supported method.
     *

     */
    private String featurizationMethodName;
    /**
     *

     * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to
     * override the default values. Related Time Series attributes do not accept aggregation parameters.
     *

     *

     * The following list shows the parameters and their valid values for the "filling" featurization method for a
     * Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     * aggregation: sum, avg, first, min, max
     *

     *

     *

     *

     * frontfill: none
     *

     *

     *

     *

     * middlefill: zero, nan (not a number), value, median,
     * mean, min, max
     *

     *

     *

     *

     * backfill: zero, nan, value, median, mean,
     * min, max
     *

     *

     *

     *

     * The following list shows the parameters and their valid values for a Related Time Series featurization
     * method (there are no defaults):
     *

     *

     *

     *

     * middlefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * backfill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * futurefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * To set a filling method to a specific value, set the fill parameter to value and define the value in
     * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the
     * following: "backfill": "value" and "backfill_value":"2".
     *

     */
    private java.util.Map<String, String> featurizationMethodParameters;

    /**
     *

     * The name of the method. The "filling" method is the only supported method.
     *

     *
     * @param featurizationMethodName
     *        The name of the method. The "filling" method is the only supported method.
     * @see FeaturizationMethodName
     */

    public void setFeaturizationMethodName(String featurizationMethodName) {
        this.featurizationMethodName = featurizationMethodName;
    }

    /**
     *

     * The name of the method. The "filling" method is the only supported method.
     *

     *
     * @return The name of the method. The "filling" method is the only supported method.
     * @see FeaturizationMethodName
     */

    public String getFeaturizationMethodName() {
        return this.featurizationMethodName;
    }

    /**
     *

     * The name of the method. The "filling" method is the only supported method.
     *

     *
     * @param featurizationMethodName
     *        The name of the method. The "filling" method is the only supported method.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see FeaturizationMethodName
     */

    public FeaturizationMethod withFeaturizationMethodName(String featurizationMethodName) {
        setFeaturizationMethodName(featurizationMethodName);
        return this;
    }

    /**
     *

     * The name of the method. The "filling" method is the only supported method.
     *

     *
     * @param featurizationMethodName
     *        The name of the method. The "filling" method is the only supported method.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see FeaturizationMethodName
     */

    public FeaturizationMethod withFeaturizationMethodName(FeaturizationMethodName featurizationMethodName) {
        this.featurizationMethodName = featurizationMethodName.toString();
        return this;
    }

    /**
     *

     * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to
     * override the default values. Related Time Series attributes do not accept aggregation parameters.
     *

     *

     * The following list shows the parameters and their valid values for the "filling" featurization method for a
     * Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     * aggregation: sum, avg, first, min, max
     *

     *

     *

     *

     * frontfill: none
     *

     *

     *

     *

     * middlefill: zero, nan (not a number), value, median,
     * mean, min, max
     *

     *

     *

     *

     * backfill: zero, nan, value, median, mean,
     * min, max
     *

     *

     *

     *

     * The following list shows the parameters and their valid values for a Related Time Series featurization
     * method (there are no defaults):
     *

     *

     *

     *

     * middlefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * backfill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * futurefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * To set a filling method to a specific value, set the fill parameter to value and define the value in
     * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the
     * following: "backfill": "value" and "backfill_value":"2".
     *

     *
     * @return The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters
     *         to override the default values. Related Time Series attributes do not accept aggregation parameters.

     *

     *         The following list shows the parameters and their valid values for the "filling" featurization method for
     *         a Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     *         aggregation: sum, avg, first, min,
     *         max
     *

     *

     *

     *

     *         frontfill: none
     *

     *

     *

     *

     *         middlefill: zero, nan (not a number), value,
     *         median, mean, min, max
     *

     *

     *

     *

     *         backfill: zero, nan, value, median,
     *         mean, min, max
     *

     *

     *

     *

     *         The following list shows the parameters and their valid values for a Related Time Series
     *         featurization method (there are no defaults):
     *

     *

     *

     *

     *         middlefill: zero, value, median, mean,
     *         min, max
     *

     *

     *

     *

     *         backfill: zero, value, median, mean,
     *         min, max
     *

     *

     *

     *

     *         futurefill: zero, value, median, mean,
     *         min, max
     *

     *

     *

     *

     *         To set a filling method to a specific value, set the fill parameter to value and define the
     *         value in a corresponding _value parameter. For example, to set backfilling to a value of 2,
     *         include the following: "backfill": "value" and "backfill_value":"2".
     */

    public java.util.Map<String, String> getFeaturizationMethodParameters() {
        return featurizationMethodParameters;
    }

    /**
     *

     * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to
     * override the default values. Related Time Series attributes do not accept aggregation parameters.
     *

     *

     * The following list shows the parameters and their valid values for the "filling" featurization method for a
     * Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     * aggregation: sum, avg, first, min, max
     *

     *

     *

     *

     * frontfill: none
     *

     *

     *

     *

     * middlefill: zero, nan (not a number), value, median,
     * mean, min, max
     *

     *

     *

     *

     * backfill: zero, nan, value, median, mean,
     * min, max
     *

     *

     *

     *

     * The following list shows the parameters and their valid values for a Related Time Series featurization
     * method (there are no defaults):
     *

     *

     *

     *

     * middlefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * backfill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * futurefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * To set a filling method to a specific value, set the fill parameter to value and define the value in
     * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the
     * following: "backfill": "value" and "backfill_value":"2".
     *

     *
     * @param featurizationMethodParameters
     *        The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters
     *        to override the default values. Related Time Series attributes do not accept aggregation parameters.

     *

     *        The following list shows the parameters and their valid values for the "filling" featurization method for
     *        a Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     *        aggregation: sum, avg, first, min,
     *        max
     *

     *

     *

     *

     *        frontfill: none
     *

     *

     *

     *

     *        middlefill: zero, nan (not a number), value,
     *        median, mean, min, max
     *

     *

     *

     *

     *        backfill: zero, nan, value, median,
     *        mean, min, max
     *

     *

     *

     *

     *        The following list shows the parameters and their valid values for a Related Time Series
     *        featurization method (there are no defaults):
     *

     *

     *

     *

     *        middlefill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        backfill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        futurefill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        To set a filling method to a specific value, set the fill parameter to value and define the
     *        value in a corresponding _value parameter. For example, to set backfilling to a value of 2,
     *        include the following: "backfill": "value" and "backfill_value":"2".
     */

    public void setFeaturizationMethodParameters(java.util.Map<String, String> featurizationMethodParameters) {
        this.featurizationMethodParameters = featurizationMethodParameters;
    }

    /**
     *

     * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to
     * override the default values. Related Time Series attributes do not accept aggregation parameters.
     *

     *

     * The following list shows the parameters and their valid values for the "filling" featurization method for a
     * Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     * aggregation: sum, avg, first, min, max
     *

     *

     *

     *

     * frontfill: none
     *

     *

     *

     *

     * middlefill: zero, nan (not a number), value, median,
     * mean, min, max
     *

     *

     *

     *

     * backfill: zero, nan, value, median, mean,
     * min, max
     *

     *

     *

     *

     * The following list shows the parameters and their valid values for a Related Time Series featurization
     * method (there are no defaults):
     *

     *

     *

     *

     * middlefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * backfill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * futurefill: zero, value, median, mean,
     * min, max
     *

     *

     *

     *

     * To set a filling method to a specific value, set the fill parameter to value and define the value in
     * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the
     * following: "backfill": "value" and "backfill_value":"2".
     *

     *
     * @param featurizationMethodParameters
     *        The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters
     *        to override the default values. Related Time Series attributes do not accept aggregation parameters.

     *

     *        The following list shows the parameters and their valid values for the "filling" featurization method for
     *        a Target Time Series dataset. Bold signifies the default value.
     *

     *

     *

     *

     *        aggregation: sum, avg, first, min,
     *        max
     *

     *

     *

     *

     *        frontfill: none
     *

     *

     *

     *

     *        middlefill: zero, nan (not a number), value,
     *        median, mean, min, max
     *

     *

     *

     *

     *        backfill: zero, nan, value, median,
     *        mean, min, max
     *

     *

     *

     *

     *        The following list shows the parameters and their valid values for a Related Time Series
     *        featurization method (there are no defaults):
     *

     *

     *

     *

     *        middlefill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        backfill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        futurefill: zero, value, median, mean,
     *        min, max
     *

     *

     *

     *

     *        To set a filling method to a specific value, set the fill parameter to value and define the
     *        value in a corresponding _value parameter. For example, to set backfilling to a value of 2,
     *        include the following: "backfill": "value" and "backfill_value":"2".
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FeaturizationMethod withFeaturizationMethodParameters(java.util.Map<String, String> featurizationMethodParameters) {
        setFeaturizationMethodParameters(featurizationMethodParameters);
        return this;
    }

    /**
     * Add a single FeaturizationMethodParameters entry
     *
     * @see FeaturizationMethod#withFeaturizationMethodParameters
     * @returns a reference to this object so that method calls can be chained together.
     */

    public FeaturizationMethod addFeaturizationMethodParametersEntry(String key, String value) {
        if (null == this.featurizationMethodParameters) {
            this.featurizationMethodParameters = new java.util.HashMap<String, String>();
        }
        if (this.featurizationMethodParameters.containsKey(key))
            throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
        this.featurizationMethodParameters.put(key, value);
        return this;
    }

    /**
     * Removes all the entries added into FeaturizationMethodParameters.
     *
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FeaturizationMethod clearFeaturizationMethodParametersEntries() {
        this.featurizationMethodParameters = null;
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getFeaturizationMethodName() != null)
            sb.append("FeaturizationMethodName: ").append(getFeaturizationMethodName()).append(",");
        if (getFeaturizationMethodParameters() != null)
            sb.append("FeaturizationMethodParameters: ").append(getFeaturizationMethodParameters());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof FeaturizationMethod == false)
            return false;
        FeaturizationMethod other = (FeaturizationMethod) obj;
        if (other.getFeaturizationMethodName() == null ^ this.getFeaturizationMethodName() == null)
            return false;
        if (other.getFeaturizationMethodName() != null && other.getFeaturizationMethodName().equals(this.getFeaturizationMethodName()) == false)
            return false;
        if (other.getFeaturizationMethodParameters() == null ^ this.getFeaturizationMethodParameters() == null)
            return false;
        if (other.getFeaturizationMethodParameters() != null
                && other.getFeaturizationMethodParameters().equals(this.getFeaturizationMethodParameters()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getFeaturizationMethodName() == null) ? 0 : getFeaturizationMethodName().hashCode());
        hashCode = prime * hashCode + ((getFeaturizationMethodParameters() == null) ? 0 : getFeaturizationMethodParameters().hashCode());
        return hashCode;
    }

    @Override
    public FeaturizationMethod clone() {
        try {
            return (FeaturizationMethod) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.forecast.model.transform.FeaturizationMethodMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
import { Component, OnInit, HostBinding } from '@angular/core';

@Component({
    selector: 'sidebar',
    templateUrl: '/app/sidebar/sidebar.component.html',

})

export class SidebarComponent implements OnInit {
    list: any[];
    constructor() { }

    ngOnInit() {
        this.list = [
            {name: 'List View', url:  ['/dashboard', 'ticket-list']},
            {name: 'Kanban View', url:  ['/dashboard', 'ticket-kanban']}
        ]
    }
}


text:
//=================================================================================================

//=================================================================================================

//*************************************************************************************************
// Includes
//*************************************************************************************************

#include <cstdlib>
#include <iostream>
#include <blaze/math/CompressedMatrix.h>
#include <blaze/math/DiagonalMatrix.h>
#include <blaze/math/DynamicMatrix.h>
#include <blaze/math/HermitianMatrix.h>
#include <blazetest/mathtest/Creator.h>
#include <blazetest/mathtest/smatdmatmult/OperationTest.h>
#include <blazetest/system/MathTest.h>

//=================================================================================================
//
//  MAIN FUNCTION
//
//=================================================================================================

//*************************************************************************************************
int main()
{
   std::cout << "   Running 'HCaDDb'..." << std::endl;

   using blazetest::mathtest::NumericA;
   using blazetest::mathtest::NumericB;

   try
   {
      // Matrix type definitions
      typedef blaze::HermitianMatrix< blaze::CompressedMatrix<NumericA> >  HCa;
      typedef blaze::DiagonalMatrix< blaze::DynamicMatrix<NumericB> >      DDb;

      // Creator type definitions
      typedef blazetest::Creator<HCa>  CHCa;
      typedef blazetest::Creator<DDb>  CDDb;

      // Running tests with small matrices
      for( size_t i=0UL; i<=6UL; ++i ) {
         for( size_t j=0UL; j<=i*i; ++j ) {
            RUN_SMATDMATMULT_OPERATION_TEST( CHCa( i, j ), CDDb( i ) );
         }
      }

      // Running tests with large matrices
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa(  31UL,  7UL ), CDDb(  31UL ) );
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa(  67UL,  7UL ), CDDb(  67UL ) );
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa( 127UL, 13UL ), CDDb( 127UL ) );
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa(  32UL,  8UL ), CDDb(  32UL ) );
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa(  64UL,  8UL ), CDDb(  64UL ) );
      RUN_SMATDMATMULT_OPERATION_TEST( CHCa( 128UL, 16UL ), CDDb( 128UL ) );
   }
   catch( std::exception& ex ) {
      std::cerr << "\n\n ERROR DETECTED during sparse matrix/dense matrix multiplication:\n"
                << ex.what() << "\n";
      return EXIT_FAILURE;
   }

   return EXIT_SUCCESS;
}
//*************************************************************************************************


text:
package fi.pelam.csv.stream

import java.nio.charset.StandardCharsets

import com.google.common.io.{CharStreams, Resources}
import fi.pelam.csv.cell.{CellKey, StringCell}
import org.junit.Assert._
import org.junit.Test

class CsvWriterTest {

  val stringBuilder = new java.lang.StringBuilder()

  val charWriter = CharStreams.asWriter(stringBuilder)

  val csvWriter = new CsvWriter(charWriter)

  @Test(expected = classOf[RuntimeException])
  def testWriteSameKeyError: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 0), "bar")))
  }

  @Test(expected = classOf[RuntimeException])
  def testWriteOldKeyError: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 1), "bar"), StringCell(CellKey(0, 0), "bar")))
  }

  @Test
  def testSingleRow: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 1), "bar")))
    assertEquals("foo,bar", stringBuilder.toString())
  }

  @Test
  def testFinalNewLine: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 1), "bar")))
    csvWriter.goToNextRow()
    assertEquals("foo,bar\n", stringBuilder.toString())
  }

  @Test
  def testTwoLines: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 1), "bar")))
    csvWriter.write(List(StringCell(CellKey(1, 0), "x"), StringCell(CellKey(1, 1), "y")))
    assertEquals("foo,bar\nx,y", stringBuilder.toString())
  }

  @Test
  def testTwoLinesWithGoToNextLine: Unit = {
    csvWriter.write(List(StringCell(CellKey(0, 0), "foo"), StringCell(CellKey(0, 1), "bar")))
    csvWriter.goToNextRow()
    csvWriter.write(List(StringCell(CellKey(1, 0), "x"), StringCell(CellKey(1, 1), "y")))
    csvWriter.goToNextRow()
    assertEquals("foo,bar\nx,y\n", stringBuilder.toString())
  }

  @Test
  def testSkips: Unit = {
    csvWriter.write(StringCell(CellKey(0, 0), "foo"))
    csvWriter.write(StringCell(CellKey(1, 1), "bar"))
    assertEquals("foo\n,bar", stringBuilder.toString())
  }

  @Test
  def testQuotes: Unit = {
    assertEquals("foo", CsvWriter.serialize(StringCell(CellKey(0, 0), "foo"), ','))
    assertEquals("\"f,oo\"", CsvWriter.serialize(StringCell(CellKey(0, 0), "f,oo"), ','))
    assertEquals("\"f,,oo\"", CsvWriter.serialize(StringCell(CellKey(0, 0), "f,,oo"), ','))
    assertEquals("\"f\"\"oo\"", CsvWriter.serialize(StringCell(CellKey(0, 0), "f\"oo"), ','))
  }

  @Test
  def loopbackTest: Unit = {
    val file = Resources.asByteSource(Resources.getResource("csv–file-for-loading"))
    val csvStringOrig = file.asCharSource(StandardCharsets.UTF_8).read()

    val readOrigCells = new CsvReader(csvStringOrig).throwOnError.toIndexedSeq

    assertEquals("Initial data cell count sanity check", 180, readOrigCells.size)

    csvWriter.write(readOrigCells)

    assertEquals(csvStringOrig, stringBuilder.toString())
  }

}


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Components/LightComponent.h"
#include "Light.generated.h"

UCLASS(Abstract, ClassGroup=Lights, hideCategories=(Input,Collision,Replication), showCategories=("Input|MouseInput", "Input|TouchInput"), ComponentWrapperClass, ConversionRoot, meta=(ChildCanTick))
class ENGINE_API ALight : public AActor
{
	GENERATED_UCLASS_BODY()

private_subobject:
	/** @todo document */
	DEPRECATED_FORGAME(4.6, "LightComponent should not be accessed directly, please use GetLightComponent() function instead. LightComponent will soon be private and your code will not compile.")
	UPROPERTY(Category = Light, VisibleAnywhere, BlueprintReadOnly, meta = (ExposeFunctionCategories = "Light,Rendering,Rendering|Components|Light", AllowPrivateAccess = "true"))
	class ULightComponent* LightComponent;
public:

	/** replicated copy of LightComponent's bEnabled property */
	UPROPERTY(replicatedUsing=OnRep_bEnabled)
	uint32 bEnabled:1;

	/** Replication Notification Callbacks */
	UFUNCTION()
	virtual void OnRep_bEnabled();

	/** Function to change mobility type of light */
	void SetMobility(EComponentMobility::Type InMobility);

	// BEGIN DEPRECATED (use component functions now in level script)
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetEnabled(bool bSetEnabled);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	bool IsEnabled() const;
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void ToggleEnabled();
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetBrightness(float NewBrightness);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	float GetBrightness() const;
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetLightColor(FLinearColor NewLightColor);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	FLinearColor GetLightColor() const;
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetLightFunctionMaterial(UMaterialInterface* NewLightFunctionMaterial);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetLightFunctionScale(FVector NewLightFunctionScale);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetLightFunctionFadeDistance(float NewLightFunctionFadeDistance);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetCastShadows(bool bNewValue);
	UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
	void SetAffectTranslucentLighting(bool bNewValue);
	// END DEPRECATED

public:
#if WITH_EDITOR
	// Begin AActor interface.
	virtual void CheckForErrors() override;
	// End AActor interface.
#endif

	/**
	 * Return whether the light supports being toggled off and on on-the-fly.
	 */
	bool IsToggleable() const;

	// Begin AActor interface.
	void Destroyed() override;
	virtual bool IsLevelBoundsRelevant() const override { return false; }
	// End AActor interface.

	/** Returns LightComponent subobject **/
	class ULightComponent* GetLightComponent() const;
};


text:
require 'spec_helper'

RSpec.describe Item, type: :model do
  describe 'Attributes' do
    it { is_expected.to respond_to :name }
    it { is_expected.to respond_to :complete }
    it { is_expected.to respond_to :list_id }
  end

  describe 'Database' do
    it { is_expected.to have_db_column :name }
    it { is_expected.to have_db_column(:complete).of_type(:boolean) }
    it { is_expected.to have_db_column(:list_id).of_type(:integer) }
  end

  describe 'Associations' do
    it { is_expected.to belong_to :list }
  end

  describe 'Methods' do
    let(:list) { List.create(name: 'foo') }
    let(:item) { list.items.create(name: 'bar') }

    describe '#channels' do
      it 'is an array of channels' do
        expect(item.channels).to be_an Array
      end

      it "includes the collection's channel" do
        expect(item.channels).to include '/items'
      end

      it "includes the item's direct channel" do
        expect(item.channels).to include "/items/#{item.to_param}"
      end

      it "includes the collection's nested channel" do
        expect(item.channels).to include "/lists/#{list.to_param}/items"
      end

      it "includes the item's nested channel" do
        expect(item.channels).to include "/lists/#{list.to_param}/items/#{item.to_param}"
      end
    end
  end

  describe 'Validations' do
    it { is_expected.to validate_presence_of :list }
  end
end


text:
package itti.com.pl.ontology.common.dto;

import itti.com.pl.ontology.common.dto.MetadataObject;

public class Service extends MetadataObject{

	private static final String SERVICE_ID = "Service_ID";
	private static final String SERVICE__SUBSCRIBER__CONSUMER = "Service_Subscriber_Consumer";
	private static final String SERVICE_ADDRESS = "Service_address";
	private static final String SERVICE_BUSINESS_PROCESS_CLASSIFICATION = "Service_business_process_classification";
	private static final String SERVICE_COMPLEXITY = "Service_complexity";
	private static final String SERVICE_DEGRADED_LEVELS = "Service_degraded_levels";
	private static final String SERVICE_HAS_CLASSIFICATION = "Service_has_classification";
	private static final String SERVICE_HAS_OPERATIONS = "Service_has_operations";
	private static final String SERVICE_LONG_DESCRIPTION = "Service_long_description";
	private static final String SERVICE_NAME = "Service_name";
	private static final String SERVICE_PLATFORM_SERVICES_CLASSIFICATION = "Service_platform_services_classification";
	private static final String SERVICE_PRIORITY_USER = "Service_priority_user";
	private static final String SERVICE_SHORT_DESCRIPTION = "Service_short_description";
	private static final String SERVICE_USER = "Service_user";
	private static final String SERVICE_USES__STANDARDS = "Service_uses_Standards";
	private static final String SERVICE_USES_CORE_SERVICE = "Service_uses_core_service";
	private static final String SERVICE_USES_FUNCTIONAL_SERVICE = "Service_uses_functional_service";
	private static final String SERVICE_WORKS_ON_DEVICE = "Service_works_on_device";
	private static final String TYPE_OF_NODE = "Type_of_node";
	private static final String TYPE_OF_SERVICE = "Type_of_service";
	private static final String HAS_CONTACT_INFORMATION = "hasContactInformation";

	public void setService_ID(String Service_ID){
		setProperty(SERVICE_ID, Service_ID);
	}
	public String getService_ID(){
		return getProperty(SERVICE_ID);
	}

	public void setService_Subscriber_Consumer(String Service_Subscriber_Consumer){
		setProperty(SERVICE__SUBSCRIBER__CONSUMER, Service_Subscriber_Consumer);
	}
	public String getService_Subscriber_Consumer(){
		return getProperty(SERVICE__SUBSCRIBER__CONSUMER);
	}

	public void setService_address(String Service_address){
		setProperty(SERVICE_ADDRESS, Service_address);
	}
	public String getService_address(){
		return getProperty(SERVICE_ADDRESS);
	}

	public void setService_business_process_classification(String Service_business_process_classification){
		setProperty(SERVICE_BUSINESS_PROCESS_CLASSIFICATION, Service_business_process_classification);
	}
	public String getService_business_process_classification(){
		return getProperty(SERVICE_BUSINESS_PROCESS_CLASSIFICATION);
	}

	public void setService_complexity(String Service_complexity){
		setProperty(SERVICE_COMPLEXITY, Service_complexity);
	}
	public String getService_complexity(){
		return getProperty(SERVICE_COMPLEXITY);
	}

	public void setService_degraded_levels(String Service_degraded_levels){
		setProperty(SERVICE_DEGRADED_LEVELS, Service_degraded_levels);
	}
	public String getService_degraded_levels(){
		return getProperty(SERVICE_DEGRADED_LEVELS);
	}

	public void setService_has_classification(String Service_has_classification){
		setProperty(SERVICE_HAS_CLASSIFICATION, Service_has_classification);
	}
	public String getService_has_classification(){
		return getProperty(SERVICE_HAS_CLASSIFICATION);
	}

	public void setService_has_operations(String Service_has_operations){
		setProperty(SERVICE_HAS_OPERATIONS, Service_has_operations);
	}
	public String getService_has_operations(){
		return getProperty(SERVICE_HAS_OPERATIONS);
	}

	public void setService_long_description(String Service_long_description){
		setProperty(SERVICE_LONG_DESCRIPTION, Service_long_description);
	}
	public String getService_long_description(){
		return getProperty(SERVICE_LONG_DESCRIPTION);
	}

	public void setService_name(String Service_name){
		setProperty(SERVICE_NAME, Service_name);
	}
	public String getService_name(){
		return getProperty(SERVICE_NAME);
	}

	public void setService_platform_services_classification(String Service_platform_services_classification){
		setProperty(SERVICE_PLATFORM_SERVICES_CLASSIFICATION, Service_platform_services_classification);
	}
	public String getService_platform_services_classification(){
		return getProperty(SERVICE_PLATFORM_SERVICES_CLASSIFICATION);
	}

	public void setService_priority_user(String Service_priority_user){
		setProperty(SERVICE_PRIORITY_USER, Service_priority_user);
	}
	public String getService_priority_user(){
		return getProperty(SERVICE_PRIORITY_USER);
	}

	public void setService_short_description(String Service_short_description){
		setProperty(SERVICE_SHORT_DESCRIPTION, Service_short_description);
	}
	public String getService_short_description(){
		return getProperty(SERVICE_SHORT_DESCRIPTION);
	}

	public void setService_user(String Service_user){
		setProperty(SERVICE_USER, Service_user);
	}
	public String getService_user(){
		return getProperty(SERVICE_USER);
	}

	public void setService_uses_Standards(String Service_uses_Standards){
		setProperty(SERVICE_USES__STANDARDS, Service_uses_Standards);
	}
	public String getService_uses_Standards(){
		return getProperty(SERVICE_USES__STANDARDS);
	}

	public void setService_uses_core_service(String Service_uses_core_service){
		setProperty(SERVICE_USES_CORE_SERVICE, Service_uses_core_service);
	}
	public String getService_uses_core_service(){
		return getProperty(SERVICE_USES_CORE_SERVICE);
	}

	public void setService_uses_functional_service(String Service_uses_functional_service){
		setProperty(SERVICE_USES_FUNCTIONAL_SERVICE, Service_uses_functional_service);
	}
	public String getService_uses_functional_service(){
		return getProperty(SERVICE_USES_FUNCTIONAL_SERVICE);
	}

	public void setService_works_on_device(String Service_works_on_device){
		setProperty(SERVICE_WORKS_ON_DEVICE, Service_works_on_device);
	}
	public String getService_works_on_device(){
		return getProperty(SERVICE_WORKS_ON_DEVICE);
	}

	public void setType_of_node(String Type_of_node){
		setProperty(TYPE_OF_NODE, Type_of_node);
	}
	public String getType_of_node(){
		return getProperty(TYPE_OF_NODE);
	}

	public void setType_of_service(String Type_of_service){
		setProperty(TYPE_OF_SERVICE, Type_of_service);
	}
	public String getType_of_service(){
		return getProperty(TYPE_OF_SERVICE);
	}

	public void setHasContactInformation(String hasContactInformation){
		setProperty(HAS_CONTACT_INFORMATION, hasContactInformation);
	}
	public String getHasContactInformation(){
		return getProperty(HAS_CONTACT_INFORMATION);
	}

}


text:
package org.apache.felix.dm.annotation.api;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Inject classes in a component instance field.
 * The following injections are currently performed, depending on the type of the
 * field this annotation is applied on:
 *

 *
BundleContext: the bundle context of the bundle
 *
DependencyManager: the dependency manager instance
 *
Component: the component instance of the dependency manager
 *

 *
 *

 *
Usage Examples

 *

 *
 *

 * @Component
 * class X implements Z {
 *     @Inject
 *     BundleContext bundleContext;
 *
 *     @Inject
 *     Component component;
 *
 *     @Inject
 *     DependencyManager manager;
 *
 *     OtherService otherService;
 *
 *     @Init
 *     void init() {
 *         System.out.println("Bundle Context: " + bundleContext);
 *         System.out.println("Manager: " + manager);
 *
 *         // Use DM API for defining an extra service dependency
 *         componnent.add(manager.createServiceDependency()
 *                               .setService(OtherService.class)
 *                               .setRequired(true)
 *                               .setInstanceBound(true));
 *     }
 *
 *     @Start
 *     void start() {
 *         System.out.println("OtherService: " + otherService);
 *     }
 * }
 *

 *

 *
 * @author Felix Project Team
 */
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.FIELD)
public @interface Inject
{
}


text:
package trust

import (
	"context"
	"encoding/json"
	"io"
	"net"
	"net/http"
	"net/url"
	"os"
	"path"
	"path/filepath"
	"time"

	"github.com/docker/cli/cli/config"
	"github.com/docker/distribution/reference"
	"github.com/docker/distribution/registry/client/auth"
	"github.com/docker/distribution/registry/client/auth/challenge"
	"github.com/docker/distribution/registry/client/transport"
	"github.com/docker/docker/api/types"
	registrytypes "github.com/docker/docker/api/types/registry"
	"github.com/docker/docker/registry"
	"github.com/docker/go-connections/tlsconfig"
	"github.com/opencontainers/go-digest"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/theupdateframework/notary"
	"github.com/theupdateframework/notary/client"
	"github.com/theupdateframework/notary/passphrase"
	"github.com/theupdateframework/notary/storage"
	"github.com/theupdateframework/notary/trustmanager"
	"github.com/theupdateframework/notary/trustpinning"
	"github.com/theupdateframework/notary/tuf/data"
	"github.com/theupdateframework/notary/tuf/signed"
)

var (
	// ReleasesRole is the role named "releases"
	ReleasesRole = data.RoleName(path.Join(data.CanonicalTargetsRole.String(), "releases"))
	// ActionsPullOnly defines the actions for read-only interactions with a Notary Repository
	ActionsPullOnly = []string{"pull"}
	// ActionsPushAndPull defines the actions for read-write interactions with a Notary Repository
	ActionsPushAndPull = []string{"pull", "push"}
	// NotaryServer is the endpoint serving the Notary trust server
	NotaryServer = "https://notary.docker.io"
)

// GetTrustDirectory returns the base trust directory name
func GetTrustDirectory() string {
	return filepath.Join(config.Dir(), "trust")
}

// certificateDirectory returns the directory containing
// TLS certificates for the given server. An error is
// returned if there was an error parsing the server string.
func certificateDirectory(server string) (string, error) {
	u, err := url.Parse(server)
	if err != nil {
		return "", err
	}

	return filepath.Join(config.Dir(), "tls", u.Host), nil
}

// Server returns the base URL for the trust server.
func Server(index *registrytypes.IndexInfo) (string, error) {
	if s := os.Getenv("DOCKER_CONTENT_TRUST_SERVER"); s != "" {
		urlObj, err := url.Parse(s)
		if err != nil || urlObj.Scheme != "https" {
			return "", errors.Errorf("valid https URL required for trust server, got %s", s)
		}

		return s, nil
	}
	if index.Official {
		return NotaryServer, nil
	}
	return "https://" + index.Name, nil
}

type simpleCredentialStore struct {
	auth types.AuthConfig
}

func (scs simpleCredentialStore) Basic(u *url.URL) (string, string) {
	return scs.auth.Username, scs.auth.Password
}

func (scs simpleCredentialStore) RefreshToken(u *url.URL, service string) string {
	return scs.auth.IdentityToken
}

func (scs simpleCredentialStore) SetRefreshToken(*url.URL, string, string) {
}

// GetNotaryRepository returns a NotaryRepository which stores all the
// information needed to operate on a notary repository.
// It creates an HTTP transport providing authentication support.
func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo *registry.RepositoryInfo, authConfig *types.AuthConfig, actions ...string) (client.Repository, error) {
	server, err := Server(repoInfo.Index)
	if err != nil {
		return nil, err
	}

	cfg := tlsconfig.ClientDefault()
	cfg.InsecureSkipVerify = !repoInfo.Index.Secure

	// Get certificate base directory
	certDir, err := certificateDirectory(server)
	if err != nil {
		return nil, err
	}
	logrus.Debugf("reading certificate directory: %s", certDir)

	if err := registry.ReadCertsDirectory(cfg, certDir); err != nil {
		return nil, err
	}

	base := &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		Dial: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
			DualStack: true,
		}).Dial,
		TLSHandshakeTimeout: 10 * time.Second,
		TLSClientConfig:     cfg,
		DisableKeepAlives:   true,
	}

	// Skip configuration headers since request is not going to Docker daemon
	modifiers := registry.Headers(userAgent, http.Header{})
	authTransport := transport.NewTransport(base, modifiers...)
	pingClient := &http.Client{
		Transport: authTransport,
		Timeout:   5 * time.Second,
	}
	endpointStr := server + "/v2/"
	req, err := http.NewRequest(http.MethodGet, endpointStr, nil)
	if err != nil {
		return nil, err
	}

	challengeManager := challenge.NewSimpleManager()

	resp, err := pingClient.Do(req)
	if err != nil {
		// Ignore error on ping to operate in offline mode
		logrus.Debugf("Error pinging notary server %q: %s", endpointStr, err)
	} else {
		defer resp.Body.Close()

		// Add response to the challenge manager to parse out
		// authentication header and register authentication method
		if err := challengeManager.AddResponse(resp); err != nil {
			return nil, err
		}
	}

	scope := auth.RepositoryScope{
		Repository: repoInfo.Name.Name(),
		Actions:    actions,
		Class:      repoInfo.Class,
	}
	creds := simpleCredentialStore{auth: *authConfig}
	tokenHandlerOptions := auth.TokenHandlerOptions{
		Transport:   authTransport,
		Credentials: creds,
		Scopes:      []auth.Scope{scope},
		ClientID:    registry.AuthClientID,
	}
	tokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions)
	basicHandler := auth.NewBasicHandler(creds)
	modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler))
	tr := transport.NewTransport(base, modifiers...)

	return client.NewFileCachedRepository(
		GetTrustDirectory(),
		data.GUN(repoInfo.Name.Name()),
		server,
		tr,
		GetPassphraseRetriever(in, out),
		trustpinning.TrustPinConfig{})
}

// GetPassphraseRetriever returns a passphrase retriever that utilizes Content Trust env vars
func GetPassphraseRetriever(in io.Reader, out io.Writer) notary.PassRetriever {
	aliasMap := map[string]string{
		"root":     "root",
		"snapshot": "repository",
		"targets":  "repository",
		"default":  "repository",
	}
	baseRetriever := passphrase.PromptRetrieverWithInOut(in, out, aliasMap)
	env := map[string]string{
		"root":     os.Getenv("DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE"),
		"snapshot": os.Getenv("DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE"),
		"targets":  os.Getenv("DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE"),
		"default":  os.Getenv("DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE"),
	}

	return func(keyName string, alias string, createNew bool, numAttempts int) (string, bool, error) {
		if v := env[alias]; v != "" {
			return v, numAttempts > 1, nil
		}
		// For non-root roles, we can also try the "default" alias if it is specified
		if v := env["default"]; v != "" && alias != data.CanonicalRootRole.String() {
			return v, numAttempts > 1, nil
		}
		return baseRetriever(keyName, alias, createNew, numAttempts)
	}
}

// NotaryError formats an error message received from the notary service
func NotaryError(repoName string, err error) error {
	switch err.(type) {
	case *json.SyntaxError:
		logrus.Debugf("Notary syntax error: %s", err)
		return errors.Errorf("Error: no trust data available for remote repository %s. Try running notary server and setting DOCKER_CONTENT_TRUST_SERVER to its HTTPS address?", repoName)
	case signed.ErrExpired:
		return errors.Errorf("Error: remote repository %s out-of-date: %v", repoName, err)
	case trustmanager.ErrKeyNotFound:
		return errors.Errorf("Error: signing keys for remote repository %s not found: %v", repoName, err)
	case storage.NetworkError:
		return errors.Errorf("Error: error contacting notary server: %v", err)
	case storage.ErrMetaNotFound:
		return errors.Errorf("Error: trust data missing for remote repository %s or remote repository not found: %v", repoName, err)
	case trustpinning.ErrRootRotationFail, trustpinning.ErrValidationFail, signed.ErrInvalidKeyType:
		return errors.Errorf("Warning: potential malicious behavior - trust data mismatch for remote repository %s: %v", repoName, err)
	case signed.ErrNoKeys:
		return errors.Errorf("Error: could not find signing keys for remote repository %s, or could not decrypt signing key: %v", repoName, err)
	case signed.ErrLowVersion:
		return errors.Errorf("Warning: potential malicious behavior - trust data version is lower than expected for remote repository %s: %v", repoName, err)
	case signed.ErrRoleThreshold:
		return errors.Errorf("Warning: potential malicious behavior - trust data has insufficient signatures for remote repository %s: %v", repoName, err)
	case client.ErrRepositoryNotExist:
		return errors.Errorf("Error: remote trust data does not exist for %s: %v", repoName, err)
	case signed.ErrInsufficientSignatures:
		return errors.Errorf("Error: could not produce valid signature for %s.  If Yubikey was used, was touch input provided?: %v", repoName, err)
	}

	return err
}

// GetSignableRoles returns a list of roles for which we have valid signing
// keys, given a notary repository and a target
func GetSignableRoles(repo client.Repository, target *client.Target) ([]data.RoleName, error) {
	var signableRoles []data.RoleName

	// translate the full key names, which includes the GUN, into just the key IDs
	allCanonicalKeyIDs := make(map[string]struct{})
	for fullKeyID := range repo.GetCryptoService().ListAllKeys() {
		allCanonicalKeyIDs[path.Base(fullKeyID)] = struct{}{}
	}

	allDelegationRoles, err := repo.GetDelegationRoles()
	if err != nil {
		return signableRoles, err
	}

	// if there are no delegation roles, then just try to sign it into the targets role
	if len(allDelegationRoles) == 0 {
		signableRoles = append(signableRoles, data.CanonicalTargetsRole)
		return signableRoles, nil
	}

	// there are delegation roles, find every delegation role we have a key for, and
	// attempt to sign into into all those roles.
	for _, delegationRole := range allDelegationRoles {
		// We do not support signing any delegation role that isn't a direct child of the targets role.
		// Also don't bother checking the keys if we can't add the target
		// to this role due to path restrictions
		if path.Dir(delegationRole.Name.String()) != data.CanonicalTargetsRole.String() || !delegationRole.CheckPaths(target.Name) {
			continue
		}

		for _, canonicalKeyID := range delegationRole.KeyIDs {
			if _, ok := allCanonicalKeyIDs[canonicalKeyID]; ok {
				signableRoles = append(signableRoles, delegationRole.Name)
				break
			}
		}
	}

	if len(signableRoles) == 0 {
		return signableRoles, errors.Errorf("no valid signing keys for delegation roles")
	}

	return signableRoles, nil
}

// ImageRefAndAuth contains all reference information and the auth config for an image request
type ImageRefAndAuth struct {
	original   string
	authConfig *types.AuthConfig
	reference  reference.Named
	repoInfo   *registry.RepositoryInfo
	tag        string
	digest     digest.Digest
}

// GetImageReferencesAndAuth retrieves the necessary reference and auth information for an image name
// as an ImageRefAndAuth struct
func GetImageReferencesAndAuth(ctx context.Context, rs registry.Service,
	authResolver func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig,
	imgName string,
) (ImageRefAndAuth, error) {
	ref, err := reference.ParseNormalizedNamed(imgName)
	if err != nil {
		return ImageRefAndAuth{}, err
	}

	// Resolve the Repository name from fqn to RepositoryInfo
	var repoInfo *registry.RepositoryInfo
	if rs != nil {
		repoInfo, err = rs.ResolveRepository(ref)
	} else {
		repoInfo, err = registry.ParseRepositoryInfo(ref)
	}

	if err != nil {
		return ImageRefAndAuth{}, err
	}

	authConfig := authResolver(ctx, repoInfo.Index)
	return ImageRefAndAuth{
		original:   imgName,
		authConfig: &authConfig,
		reference:  ref,
		repoInfo:   repoInfo,
		tag:        getTag(ref),
		digest:     getDigest(ref),
	}, nil
}

func getTag(ref reference.Named) string {
	switch x := ref.(type) {
	case reference.Canonical, reference.Digested:
		return ""
	case reference.NamedTagged:
		return x.Tag()
	default:
		return ""
	}
}

func getDigest(ref reference.Named) digest.Digest {
	switch x := ref.(type) {
	case reference.Canonical:
		return x.Digest()
	case reference.Digested:
		return x.Digest()
	default:
		return digest.Digest("")
	}
}

// AuthConfig returns the auth information (username, etc) for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) AuthConfig() *types.AuthConfig {
	return imgRefAuth.authConfig
}

// Reference returns the Image reference for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Reference() reference.Named {
	return imgRefAuth.reference
}

// RepoInfo returns the repository information for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) RepoInfo() *registry.RepositoryInfo {
	return imgRefAuth.repoInfo
}

// Tag returns the Image tag for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Tag() string {
	return imgRefAuth.tag
}

// Digest returns the Image digest for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Digest() digest.Digest {
	return imgRefAuth.digest
}

// Name returns the image name used to initialize the ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Name() string {
	return imgRefAuth.original
}


text:
"""
Functions which are not listed in the maya documentation, such as commands created by plugins,
as well as the name parsing classes `DependNodeName`, `DagNodeName`, and `AttributeName`.
"""

import re
import inspect

import pymel.internal.pmcmds as cmds
import pymel.internal.factories as _factories
_factories.createFunctions(__name__)

#--------------------------
# Object Wrapper Classes
#--------------------------

class NameParser(unicode):
    PARENT_SEP = '|'

    def __new__(cls, strObj):
        """Casts a string to a pymel class. Use this function if you are unsure which class is the right one to use
        for your object."""
        strObj = unicode(strObj)
        # the if statement was failing for some types (ex: pymel.node.Vertex),
        # so forcing into unicode string:
        if cls is not NameParser:
            newcls = cls
        else:
            newcls = _getParserClass(strObj)
        self = super(NameParser, cls).__new__(newcls, strObj)
        return self

    def __repr__(self):
        return u"%s(%s)" % (self.__class__.__name__, super(NameParser, self).__repr__())

    # def __unicode__(self):
    #    return u"%s" % self

    def __getattr__(self, attr):
        """
            >>> NameParser('foo:bar').spangle
            AttributeName(u'foo:bar.spangle')

        """
        if attr.startswith('__') and attr.endswith('__'):
            return super(NameParser, self).__getattr__(attr)

        return AttributeName('%s.%s' % (self, attr))

        #raise AttributeNameError, 'AttributeName does not exist %s' % attr

    def stripNamespace(self, levels=0):
        """
        Returns a new instance of the object with its namespace removed.  The calling instance is unaffected.
        The optional levels keyword specifies how many levels of cascading namespaces to strip, starting with the topmost (leftmost).
        The default is 0 which will remove all namespaces.

            >>> NameParser('foo:bar.spangle').stripNamespace()
            AttributeName(u'bar.spangle')

        """

        nodes = []
        for dagElem in self.split('|'):
            attrSplit = dagElem.split('.')
            spaceSplit = attrSplit[0].split(':')
            if levels:
                attrSplit[0] = ':'.join(spaceSplit[min(len(spaceSplit) - 1, levels):])
            else:
                attrSplit[0] = spaceSplit[-1]
            nodes.append('.'.join(attrSplit))
        return self.__class__('|'.join(nodes))

    def stripGivenNamespace(self, namespace, partial=True):
        """
        Returns a new instance of the object with any occurrences of the given namespace removed.  The calling instance is unaffected.
        The given namespace may end with a ':', or not.
        If partial is True (the default), and the given namespace has parent namespaces (ie, 'one:two:three'),
        then any occurrences of any parent namespaces are also stripped - ie, 'one' and 'one:two' would
        also be stripped.  If it is false, only namespaces

            >>> NameParser('foo:bar:top|foo:middle|foo:bar:extra:guy.spangle').stripGivenNamespace('foo:bar')
            AttributeName(u'top|middle|extra:guy.spangle')

            >>> NameParser('foo:bar:top|foo:middle|foo:bar:extra:guy.spangle').stripGivenNamespace('foo:bar', partial=False)
            AttributeName(u'top|foo:middle|extra:guy.spangle')
        """
        prefixSplit = namespace.rstrip(':').split(':')

        nodes = []
        for dagElem in self.split('|'):
            attrSplit = dagElem.split('.')
            spaceSplit = attrSplit[0].split(':')
            if partial:
                for toStrip in prefixSplit:
                    if spaceSplit[0] == toStrip:
                        spaceSplit.pop(0)
                    else:
                        break
            else:
                if spaceSplit[:len(prefixSplit)] == prefixSplit:
                    spaceSplit = spaceSplit[len(prefixSplit):]
                attrSplit[0] = spaceSplit[-1]
            attrSplit[0] = ':'.join(spaceSplit)
            nodes.append('.'.join(attrSplit))
        return self.__class__('|'.join(nodes))

    def swapNamespace(self, prefix):
        """Returns a new instance of the object with its current namespace replaced with the provided one.
        The calling instance is unaffected."""
        if not prefix.endswith(':'):
            prefix += ':'
        return self.__class__.addPrefix(self.stripNamespace(), prefix)

    def namespaceList(self):
        """Useful for cascading references.  Returns all of the namespaces of the calling object as a list"""
        return self.lstrip('|').rstrip('|').split('|')[-1].split(':')[:-1]

    def namespace(self):
        """Returns the namespace of the object with trailing colon included"""
        nsList = self.namespaceList()
        if nsList:
            return ':'.join(nsList) + ':'
        return ''

    def addPrefix(self, prefix):
        'addPrefixToName'
        name = self
        leadingSlash = False
        if name.startswith('|'):
            name = name[1:]
            leadingSlash = True
        name = self.__class__('|'.join(map(lambda x: prefix + x, name.split('|'))))
        if leadingSlash:
            name = '|' + name
        return self.__class__(name)

    def attr(self, attr):
        """access to AttributeName of a node. returns an instance of the AttributeName class for the
        given AttributeName.

            >>> NameParser('foo:bar').attr('spangle')
            AttributeName(u'foo:bar.spangle')

        """
        return AttributeName('%s.%s' % (self, attr))

class AttributeName(NameParser):

    """

    """
    attrItemReg = re.compile('\[(\d+:*\d*)\]$')

    # def __repr__(self):
    #    return "AttributeName('%s')" % self

    def __init__(self, attrName):
        attrName = unicode(attrName)
        if '.' not in attrName:
            raise TypeError, "%s: AttributeNames must include the node and the AttributeName. e.g. 'nodeName.AttributeNameName' " % self
        self.__dict__['_multiattrIndex'] = 0

    def __getitem__(self, item):
        return AttributeName('%s[%s]' % (self, item))

    # Added the __call__ so to generate a more appropriate exception when a class method is not found
    def __call__(self, *args, **kwargs):
        raise TypeError("The object <%s> does not support the '%s' method" % (repr(self.node()), self.plugAttr()))

    def array(self):
        """
        Returns the array (multi) AttributeName of the current element
            >>> n = AttributeName('lambert1.groupNodes[0]')
            >>> n.array()
            AttributeName(u'lambert1.groupNodes')
        """
        try:
            return AttributeName(AttributeName.attrItemReg.split(self)[0])
        except:
            raise TypeError, "%s is not a multi AttributeName" % self

    def plugNode(self):
        """plugNode

        >>> NameParser('foo:bar.spangle.banner').plugNode()
        DependNodeName(u'foo:bar')

        """
        return NameParser(unicode(self).split('.')[0])

    node = plugNode

    def plugAttr(self):
        """plugAttr

        >>> NameParser('foo:bar.spangle.banner').plugAttr()
        u'spangle.banner'

        """
        return '.'.join(unicode(self).split('.')[1:])

    def lastPlugAttr(self):
        """
        >>> NameParser('foo:bar.spangle.banner').lastPlugAttr()
        u'banner'

        """
        return self.split('.')[-1]

    def nodeName(self):
        'basename'
        return self.split('|')[-1]

    def item(self, asSlice=False, asString=False):
        try:
            item = AttributeName.attrItemReg.search(self).group(1)
            if asString:
                return "[%s]" % unicode(item)
            val = item.split(":")
            val = map(int, val)
            if len(val) > 1:
                return asSlice and slice(*val) or val
            return val[0]
        except:
            return None

    def getParent(self, generations=1):
        """
        Returns the parent attribute

        Modifications:
            - added optional generations flag, which gives the number of levels up that you wish to go for the parent;
              ie:
                  >>> AttributeName("Cube1.multiComp[3].child.otherchild").getParent(2)
                  AttributeName(u'Cube1.multiComp[3]')

              Negative values will traverse from the top, not counting the initial node name:

                  >>> AttributeName("Cube1.multiComp[3].child.otherchild").getParent(-2)
                  AttributeName(u'Cube1.multiComp[3].child')

              A value of 0 will return the same node.
              The default value is 1.

              Since the original command returned None if there is no parent, to sync with this behavior, None will
              be returned if generations is out of bounds (no IndexError will be thrown).
        """

        if generations == 0:
            return self

        split = self.split('.')
        if -len(split) < generations < len(split) - 1:
            if generations < 0:
                # Move it one over to account for the initial node name
                splitIndex = 1 - generations
            else:
                splitIndex = -generations
            try:
                return AttributeName('.'.join(split[:splitIndex]))
            except:
                pass

    def addAttr(self, **kwargs):
        kwargs['longName'] = self.plugAttr()
        kwargs.pop('ln', None)
        from pymel.core.general import addAttr
        return addAttr(self.node(), **kwargs)

    def setAttr(self, *args, **kwargs):
        from pymel.core.general import setAttr
        return setAttr(self, *args, **kwargs)

    set = setAttr
    add = addAttr

    def exists(self):
        node = self.plugNode()
        attr = self.plugAttr()
        if not node or not attr:
            return False

        if not cmds.objExists(node):
            return False

        # short name
        if attr in cmds.listAttr(node, shortNames=1) + cmds.listAttr(node):
            return True

        return False

class DependNodeName(NameParser):
    #-------------------------------
    #    Name Info and Manipulation
    #-------------------------------

    def node(self):
        """for compatibility with AttributeName class"""
        return self

    def nodeName(self):
        """for compatibility with DagNodeName class"""
        return self

    def exists(self, **kwargs):
        "objExists"
        return bool(cmds.objExists(self, **kwargs))

    _numPartReg = re.compile('([0-9]+)$')

    def stripNum(self):
        """Return the name of the node with trailing numbers stripped off. If no trailing numbers are found
        the name will be returned unchanged."""
        try:
            return DependNodeName._numPartReg.split(self)[0]
        except IndexError:
            return unicode(self)

    def extractNum(self):
        """Return the trailing numbers of the node name. If no trailing numbers are found
        an error will be raised."""

        try:
            return DependNodeName._numPartReg.split(self)[1]
        except IndexError:
            raise ValueError, "No trailing numbers to extract on object %s" % self

    def nextUniqueName(self):
        """
        Increment the trailing number of the object until a unique name is found

        If there is no trailing number, appends '1' to the name.
        Will always return a different name than the current name, even if the
            current name already does not exist.
        """
        try:
            name = self.nextName()
        except ValueError:
            name = self.__class__(self + '1')
        while name.exists():
            name = name.nextName()
        return name

    def nextName(self):
        """Increment the trailing number of the object by 1"""

        groups = DependNodeName._numPartReg.split(self)
        if len(groups) > 1:
            num = groups[1]
            formatStr = '%s%0' + unicode(len(num)) + 'd'
            return self.__class__(formatStr % (groups[0], (int(num) + 1)))
        else:
            raise ValueError, "could not find trailing numbers to increment on object %s" % self

    def prevName(self):
        """Decrement the trailing number of the object by 1"""
        groups = DependNodeName._numPartReg.split(self)
        if len(groups) > 1:
            num = groups[1]
            formatStr = '%s%0' + unicode(len(num)) + 'd'
            return self.__class__(formatStr % (groups[0], (int(num) - 1)))
        else:
            raise ValueError, "could not find trailing numbers to decrement on object %s" % self

class DagNodeName(DependNodeName):

    #    def __eq__(self, other):
    #        """ensures that we compare longnames when checking for dag node equality"""
    #        try:
    #            return unicode(self.longName()) == unicode(DagNodeName(other).longName())
    #        except (TypeError,IndexError):
    #            return unicode(self) == unicode(other)
    #
    #    def __ne__(self, other):
    #        """ensures that we compare longnames when checking for dag node equality"""
    #        try:
    #            return unicode(self.longName()) != unicode(DagNodeName(other).longName())
    #        except (TypeError,IndexError):
    #            return unicode(self) != unicode(other)

    #--------------------------
    #    DagNodeName Path Info
    #--------------------------
    def root(self):
        'rootOf'
        return DagNodeName('|' + self.longName()[1:].split('|')[0])

    def getRoot(self):
        """unlike the root command which determines the parent via string formatting, this
        command uses the listRelatives command"""

        par = None
        cur = self
        while 1:
            par = cur.getParent()
            if not par:
                break
            cur = par
        return cur

    def firstParent(self):
        'firstParentOf'

        return DagNodeName('|'.join(self.split('|')[:-1]))

    def getParent(self, generations=1):
        """
        Returns the parent node

        Modifications:
            - added optional generations flag, which gives the number of levels up that you wish to go for the parent;
              ie:
                  >>> DagNodeName("NS1:TopLevel|Next|ns2:Third|Fourth").getParent(2)
                  DagNodeName(u'NS1:TopLevel|Next')

              Negative values will traverse from the top, not counting the initial node name:

                  >>> DagNodeName("NS1:TopLevel|Next|ns2:Third|Fourth").getParent(-3)
                  DagNodeName(u'NS1:TopLevel|Next|ns2:Third')

              A value of 0 will return the same node.
              The default value is 1.

              Since the original command returned None if there is no parent, to sync with this behavior, None will
              be returned if generations is out of bounds (no IndexError will be thrown).
        """

        if generations == 0:
            return self

        split = self.split('|')
        if -len(split) <= generations < len(split):
            try:
                return DagNodeName('|'.join(split[:-generations]))
            except:
                pass

#    def shortName( self ):
#        'shortNameOf'
#        try:
#            return self.__class__( cmds.ls( self )[0] )
#        except:
#            return self

    def nodeName(self):
        'basename'
        return self.split('|')[-1]

def _getParserClass(strObj):
    # First, see if strObj is actually a PyNode - in that case, get the class
    # based off the node...
    mro = set([cls.__name__ for cls in inspect.getmro(type(strObj))])
    # doing string comparison so we don't have to import core.general/nodetypes
    if 'PyNode' in mro:
        if 'DagNode' in mro:
            newcls = DagNodeName
        elif 'Attribute' in mro:
            newcls = AttributeName
        else:
            newcls = DependNodeName
    else:
        strObj = unicode(strObj)

        if '.' in strObj:
            newcls = AttributeName
            # Return Component Arrays ======================================================
            #            attr = obj.array().plugAttr()
            #            if attr in ["f","vtx","e","map"]:
            #                comps = getattr(Mesh(obj.node()), attr)
            #                return comps.__getitem__(obj.item(asSlice=1))
            #            else:
            #                return obj
            #===============================================================================

        elif '|' in strObj:
            newcls = DagNodeName
        else:
            newcls = DependNodeName
    return newcls


text:
@implementation BALocalizer

+ (NSString *)localizedNumber:(NSNumber *)number
{
	if(	[[QDAppDelegate userSettings] boolForKey:@"ArabicMode"]) {
		return [[QDAppDelegate arabicNumberFormatter] stringFromNumber:number];
	} else {
		return [[QDAppDelegate localNumberFormatter] stringFromNumber:number];
	}
}

+ (NSString *)localizedInteger:(int)intNumber
{
	return [BALocalizer localizedNumber:[NSNumber numberWithInt:intNumber]];
}

+ (NSString *)localizedString:(NSString *)key
{
	if(	[[QDAppDelegate userSettings] boolForKey:@"ArabicMode"] && [[QDAppDelegate arabicStrings] objectForKey:key] != nil) {
		return [[QDAppDelegate arabicStrings] objectForKey:key];
	} else {
		return NSLocalizedString(key, @"");
	}
}

+ (NSString *)localizedDay:(NSDate *)date
{
	if(	[[QDAppDelegate userSettings] boolForKey:@"ArabicMode"]) {
		return [[QDAppDelegate arabicDateDateFormatter] stringFromDate:date];
	} else {
		return [[QDAppDelegate dateDateFormatter] stringFromDate:date];
	}
}

+ (NSString *)localizedWeekday:(NSDate *)date
{
	if(	[[QDAppDelegate userSettings] boolForKey:@"ArabicMode"]) {
		return [[QDAppDelegate arabicDayDateFormatter] stringFromDate:date];
	} else {
		return [[QDAppDelegate dayDateFormatter] stringFromDate:date];
	}
}

@end


text:
(function($){

  // ===== Scroll Slowly Down ====
  $(".scroll-down").click(function () {
    var buttonRef = $(this).attr("href");
    var scrollTop = $(buttonRef).offset().top;
    if ($(window).scrollTop() >= 50) {
      scrollTop -= $('#top-navbar').height();
    }

    $("html,body").animate({
        scrollTop: scrollTop},
        "slow");
  });

  // ===== Scroll Back to Top ====
  $(window).scroll(function() {
    if ($(this).scrollTop() >= 50) {      // If page is scrolled more than 50px
      $("#return-to-top").fadeIn(200);    // Fade in the arrow
      $('#top-navbar').show();
    } else {
      $("#return-to-top").fadeOut(200);   // Else fade out the arrow
      $('#top-navbar').hide();
    }
  });

  $("#return-to-top").click(function() {    // When arrow is clicked
    $("body,html").animate({
        scrollTop : 0                       // Scroll to top of body
    }, 500);
  });

  $('#hello-string').typeIt({
    strings: ['Hello! I\'m Trixie...',
              'I\'m a Programmer.',
              'Nice to meet you :)',
              'This is Trixie\'s Site of Wonders'],
    cursor: true,
    startDelay: 1000,
    deleteSpeed: 150,
    deleteDelay: 3000,
    breakLines: false,
    autoStart: true,
    lifeLike: true,
  });

})(jQuery); // end of jQuery name space