text:
<?php

/** */
namespace YawikXingVendorApi\Entity;

/**
 * ${CARET}
 *
 * @author Mathias Gelhausen <gelhausen@cross-solution.de>
 * @todo write test
 */
class XingData
{

    const JOB_TYPE_PART_TIME = 'PART_TIME';
    const JOB_TYPE_FULL_TIME = 'FULL_TIME';
    const JOB_TYPE_CONTRACTOR = 'CONTRACTOR';
    const JOB_TYPE_INTERN = 'INTERN';
    const JOB_TYPE_SEASONAL = 'SEASONAL';
    const JOB_TYPE_TEMPORARY = 'TEMPORARY';
    const JOB_TYPE_VOLUNTARY = 'VOLUNTARY';

    const POINT_OF_CONTACT_TYPE_USER = 'user';
    const POINT_OF_CONTACT_TYPE_COMPANY = 'company';
    const POINT_OF_CONTACT_TYPE_NONE = 'none';

    const REPLY_SETTINGS_EMAIL = 'email';
    const REPLY_SETTINGS_URL = 'url';
    const REPLY_SETTINGS_PRIVATE_MESSAGE = 'private_message';

    const USER_ROLE_EXTERNAL_RECRUITER = 'EXTERNAL_RECRUITER';
    const USER_ROLE_HR_DEPARTMENT = 'HR_DEPARTMENT';
    const USER_ROLE_MANAGER = 'MANAGER';
    const USER_ROLE_EMPLOYEE = 'EMPLOYEE';
    const USER_ROLE_HR_CONSULTANT = 'HR_CONSULTANT';

    const JOB_LEVEL_STUDENT_INTERNSHIP = 'JOBLEVEL_1';
    const JOB_LEVEL_ENTRY_LEVEL = 'JOBLEVEL_2';
    const JOB_LEVEL_PROFESSIONAL_EXPERIENCED = 'JOBLEVEL_3';
    const JOB_LEVEL_MANAGER_SUPERVISOR = 'JOBLEVEL_4';
    const JOB_LEVEL_EXECUTIVE = 'JOBLEVEL_5_VP_SVP';
    const JOB_LEVEL_CEO_CFO_PRESIDENT = 'JOBLEVEL_6';

    const SALARY_INTERVAL_YEARLY = 'yearly';
    const SALARY_INTERVAL_MONTHLY = 'monthly';
    const SALARY_INTERVAL_WEEKLY = 'weekly';
    const SALARY_INTERVAL_HOURLY = 'hourly';

    /**
     * @var string
     */
    protected $city;
    protected $companyName;
    protected $companyProfileUrl;
    protected $country;
    protected $description;
    protected $disciplineId;
    protected $function;
    protected $industryId;
    protected $jobType;
    protected $language;
    protected $level;
    protected $orderId;
    protected $replySetting;
    protected $organizationId;
    protected $pointOfContactType;
    protected $tags;
    protected $userRole;
    protected $ba;
    protected $createStoryOnActivation;
    protected $currency;
    protected $jobCode;
    protected $posterUrl;
    protected $postingLogoContent;
    protected $postingPdfContent;
    protected $postingUrl;
    protected $publishToCompany;
    protected $region;
    protected $replyEmail;
    protected $replyUrl;
    protected $salary;
    protected $salaryInterval;
    protected $salaryRangeStart;
    protected $salaryRangeEnd;
    protected $skills;
    protected $street;
    protected $studentClassification;
    protected $tellMeMore;
    protected $videoLink;
    protected $zipcode;
    protected $keywords;

    /**
     * @param mixed $ba
     *
     * @return self
     */
    public function setBa($ba)
    {
        $this->ba = (bool) $ba;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getBa()
    {
        return $this->ba;
    }

    /**
     * @param string $city
     *
     * @return self
     */
    public function setCity($city)
    {
        $this->city = $city;

        return $this;
    }

    /**
     * @return string
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * @param mixed $companyName
     *
     * @return self
     */
    public function setCompanyName($companyName)
    {
        $this->companyName = $companyName;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getCompanyName()
    {
        return $this->companyName;
    }

    /**
     * @param mixed $companyProfileUrl
     *
     * @return self
     */
    public function setCompanyProfileUrl($companyProfileUrl)
    {
        $this->companyProfileUrl = $companyProfileUrl;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getCompanyProfileUrl()
    {
        return $this->companyProfileUrl;
    }

    /**
     * @param mixed $country
     *
     * @return self
     */
    public function setCountry($country)
    {
        $this->country = $country;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getCountry()
    {
        return $this->country;
    }

    /**
     * @param mixed $createStoryOnActivation
     *
     * @return self
     */
    public function setCreateStoryOnActivation($createStoryOnActivation)
    {
        $this->createStoryOnActivation = (bool) $createStoryOnActivation;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getCreateStoryOnActivation()
    {
        return $this->createStoryOnActivation;
    }

    /**
     * @param mixed $currency
     *
     * @return self
     */
    public function setCurrency($currency)
    {
        $this->currency = $currency;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getCurrency()
    {
        return $this->currency;
    }

    /**
     * @param mixed $description
     *
     * @return self
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * @param mixed $disciplineId
     *
     * @return self
     */
    public function setDisciplineId($disciplineId)
    {
        $this->disciplineId = $disciplineId;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getDisciplineId()
    {
        return $this->disciplineId;
    }

    /**
     * @param mixed $function
     *
     * @return self
     */
    public function setFunction($function)
    {
        $this->function = $function;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getFunction()
    {
        return $this->function;
    }

    /**
     * @param mixed $industryId
     *
     * @return self
     */
    public function setIndustryId($industryId)
    {
        $this->industryId = $industryId;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getIndustryId()
    {
        return $this->industryId;
    }

    /**
     * @param mixed $jobCode
     *
     * @return self
     */
    public function setJobCode($jobCode)
    {
        $this->jobCode = $jobCode;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getJobCode()
    {
        return $this->jobCode;
    }

    /**
     * @param mixed $jobType
     *
     * @return self
     */
    public function setJobType($jobType)
    {
        $this->jobType = $jobType;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getJobType()
    {
        return $this->jobType;
    }

    /**
     * @param mixed $keywords
     *
     * @return self
     */
    public function setKeywords($keywords)
    {
        $this->keywords = $keywords;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * @param mixed $language
     *
     * @return self
     */
    public function setLanguage($language)
    {
        $this->language = $language;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * @param mixed $level
     *
     * @return self
     */
    public function setLevel($level)
    {
        $this->level = $level;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getLevel()
    {
        return $this->level;
    }

    /**
     * @param mixed $orderId
     *
     * @return self
     */
    public function setOrderId($orderId)
    {
        $this->orderId = $orderId;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getOrderId()
    {
        return $this->orderId;
    }

    /**
     * @param mixed $organizationId
     *
     * @return self
     */
    public function setOrganizationId($organizationId)
    {
        $this->organizationId = $organizationId;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getOrganizationId()
    {
        return $this->organizationId;
    }

    /**
     * @param mixed $pointOfContactType
     *
     * @return self
     */
    public function setPointOfContactType($pointOfContactType)
    {
        $this->pointOfContactType = $pointOfContactType;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPointOfContactType()
    {
        return $this->pointOfContactType;
    }

    /**
     * @param mixed $posterUrl
     *
     * @return self
     */
    public function setPosterUrl($posterUrl)
    {
        $this->posterUrl = $posterUrl;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPosterUrl()
    {
        return $this->posterUrl;
    }

    /**
     * @param mixed $postingLogoContent
     *
     * @return self
     */
    public function setPostingLogoContent($postingLogoContent)
    {
        $this->postingLogoContent = $postingLogoContent;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPostingLogoContent()
    {
        return $this->postingLogoContent;
    }

    /**
     * @param mixed $postingPdfContent
     *
     * @return self
     */
    public function setPostingPdfContent($postingPdfContent)
    {
        $this->postingPdfContent = $postingPdfContent;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPostingPdfContent()
    {
        return $this->postingPdfContent;
    }

    /**
     * @param mixed $postingUrl
     *
     * @return self
     */
    public function setPostingUrl($postingUrl)
    {
        $this->postingUrl = $postingUrl;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPostingUrl()
    {
        return $this->postingUrl;
    }

    /**
     * @param mixed $publishToCompany
     *
     * @return self
     */
    public function setPublishToCompany($publishToCompany)
    {
        $this->publishToCompany = (bool) $publishToCompany;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPublishToCompany()
    {
        return $this->publishToCompany;
    }

    /**
     * @param mixed $region
     *
     * @return self
     */
    public function setRegion($region)
    {
        $this->region = $region;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * @param mixed $replyEmail
     *
     * @return self
     */
    public function setReplyEmail($replyEmail)
    {
        $this->replyEmail = $replyEmail;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getReplyEmail()
    {
        return $this->replyEmail;
    }

    /**
     * @param mixed $replySetting
     *
     * @return self
     */
    public function setReplySetting($replySetting)
    {
        $this->replySetting = $replySetting;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getReplySetting()
    {
        return $this->replySetting;
    }

    /**
     * @param mixed $replyUrl
     *
     * @return self
     */
    public function setReplyUrl($replyUrl)
    {
        $this->replyUrl = $replyUrl;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getReplyUrl()
    {
        return $this->replyUrl;
    }

    /**
     * @param mixed $salary
     *
     * @return self
     */
    public function setSalary($salary)
    {
        $this->salary = $this->filterSalary($salary);;

        return $this;
    }

    protected function filterSalary($salary)
    {
        $salary = str_replace(',', '.', $salary);
        $salary = (float) $salary;

        return 0 >= $salary ? null : $salary;
    }

    /**
     * @return mixed
     */
    public function getSalary()
    {
        return $this->salary;
    }

    /**
     * @param mixed $salaryInterval
     *
     * @return self
     */
    public function setSalaryInterval($salaryInterval)
    {
        if (!in_array($salaryInterval, [self::SALARY_INTERVAL_HOURLY, self::SALARY_INTERVAL_MONTHLY, self::SALARY_INTERVAL_WEEKLY, self::SALARY_INTERVAL_YEARLY])
            || self::SALARY_INTERVAL_YEARLY == $salaryInterval
        ) {
            $salaryInterval = null;

        }

        $this->salaryInterval = $salaryInterval;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getSalaryInterval()
    {
        return $this->salaryInterval ?: self::SALARY_INTERVAL_YEARLY;
    }

    /**
     * @param mixed $salaryRangeEnd
     *
     * @return self
     */
    public function setSalaryRangeEnd($salaryRangeEnd)
    {
        $this->salaryRangeEnd = $this->filterSalary($salaryRangeEnd);

        return $this;
    }

    /**
     * @return mixed
     */
    public function getSalaryRangeEnd()
    {
        return $this->salaryRangeEnd;
    }

    /**
     * @param mixed $salaryRangeStart
     *
     * @return self
     */
    public function setSalaryRangeStart($salaryRangeStart)
    {
        $this->salaryRangeStart = $this->filterSalary($salaryRangeStart);

        return $this;
    }

    /**
     * @return mixed
     */
    public function getSalaryRangeStart()
    {
        return $this->salaryRangeStart;
    }

    /**
     * @param mixed $skills
     *
     * @return self
     */
    public function setSkills($skills)
    {
        $this->skills = $skills;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getSkills()
    {
        return $this->skills;
    }

    /**
     * @param mixed $street
     *
     * @return self
     */
    public function setStreet($street)
    {
        $this->street = $street;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getStreet()
    {
        return $this->street;
    }

    /**
     * @param mixed $studentClassification
     *
     * @return self
     */
    public function setStudentClassification($studentClassification)
    {
        $this->studentClassification = $studentClassification;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getStudentClassification()
    {
        return $this->studentClassification;
    }

    /**
     * @param mixed $tags
     *
     * @return self
     */
    public function setTags($tags)
    {
        $this->tags = $tags;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * @param mixed $tellMeMore
     *
     * @return self
     */
    public function setTellMeMore($tellMeMore)
    {
        $this->tellMeMore = (bool) $tellMeMore;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getTellMeMore()
    {
        return $this->tellMeMore;
    }

    /**
     * @param mixed $userRole
     *
     * @return self
     */
    public function setUserRole($userRole)
    {
        $this->userRole = $userRole;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getUserRole()
    {
        return $this->userRole;
    }

    /**
     * @param mixed $videoLink
     *
     * @return self
     */
    public function setVideoLink($videoLink)
    {
        $this->videoLink = $videoLink;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getVideoLink()
    {
        return $this->videoLink;
    }

    /**
     * @param mixed $zipcode
     *
     * @return self
     */
    public function setZipcode($zipcode)
    {
        $this->zipcode = $zipcode;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getZipcode()
    {
        return $this->zipcode;
    }

    public function toArray()
    {
        $return = [];
        $transform = function($match) { return strtolower('_' . $match[0]); };

        foreach (get_object_vars($this) as $name => $value) {
            if (null === $value) { continue; }
            $name = preg_replace_callback('~[A-Z]~', $transform, $name);
            $return[$name] = $value;
        }

        return $return;
    }

    public function toJson()
    {
        $data = $this->toArray();
        $json = \Zend\Json\Json::encode($data);

        return $json;
    }

}


text:
#ifndef _NATIVE_DRM_H_
#define _NATIVE_DRM_H_

#include <xf86drm.h>
#include <xf86drmMode.h>

#include "pipe/p_compiler.h"
#include "util/u_format.h"
#include "pipe/p_state.h"
#include "state_tracker/drm_driver.h"

#include "common/native.h"
#include "common/native_helper.h"

#ifdef HAVE_WAYLAND_BACKEND
#include "common/native_wayland_drm_bufmgr.h"
#endif

#include "gbm_gallium_drmint.h"

struct drm_config;
struct drm_crtc;
struct drm_connector;
struct drm_mode;
struct drm_surface;

struct drm_display {
   struct native_display base;

   const struct native_event_handler *event_handler;

   struct gbm_gallium_drm_device *gbmdrm;
   int own_gbm;
   int fd;
   char *device_name;
   struct drm_config *config;

   /* for modesetting */
   drmModeResPtr resources;
   struct drm_connector *connectors;
   int num_connectors;

   struct drm_surface **shown_surfaces;
   /* save the original settings of the CRTCs */
   struct drm_crtc *saved_crtcs;
};

struct drm_config {
   struct native_config base;
};

struct drm_crtc {
   drmModeCrtcPtr crtc;
   uint32_t connectors[32];
   int num_connectors;
};

struct drm_framebuffer {
   struct pipe_resource *texture;
   boolean is_passive;

   uint32_t buffer_id;
};

struct drm_surface {
   struct native_surface base;
   struct drm_display *drmdpy;

   struct resource_surface *rsurf;
   enum pipe_format color_format;
   int width, height;

   unsigned int sequence_number;
   struct drm_framebuffer front_fb, back_fb;

   boolean is_shown;
   struct drm_crtc current_crtc;

   boolean have_pageflip;
};

struct drm_connector {
   struct native_connector base;

   uint32_t connector_id;
   drmModeConnectorPtr connector;
   struct drm_mode *drm_modes;
   int num_modes;
};

struct drm_mode {
   struct native_mode base;
   drmModeModeInfo mode;
};

static INLINE struct drm_display *
drm_display(const struct native_display *ndpy)
{
   return (struct drm_display *) ndpy;
}

static INLINE struct drm_config *
drm_config(const struct native_config *nconf)
{
   return (struct drm_config *) nconf;
}

static INLINE struct drm_surface *
drm_surface(const struct native_surface *nsurf)
{
   return (struct drm_surface *) nsurf;
}

static INLINE struct drm_connector *
drm_connector(const struct native_connector *nconn)
{
   return (struct drm_connector *) nconn;
}

static INLINE struct drm_mode *
drm_mode(const struct native_mode *nmode)
{
   return (struct drm_mode *) nmode;
}

boolean
drm_display_init_modeset(struct native_display *ndpy);

void
drm_display_fini_modeset(struct native_display *ndpy);

struct native_surface *
drm_display_create_surface_from_resource(struct native_display *ndpy,
                                         struct pipe_resource *resource);

#endif /* _NATIVE_DRM_H_ */

redpajama_set_name: RedPajamaGithub


text:
;(function ( $, window, document, undefined ) {

  window.___gcfg = {lang: 'ja'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();

})(jQuery, window, document);


text:
using UnrealBuildTool;

public class BOS_NewOrder : ModuleRules
{
	public BOS_NewOrder(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore"
            , "Networking", "AIModule", "GameplayAbilities", "GameplayTags" });

		PrivateDependencyModuleNames.AddRange(new string[] {  });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");

		// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
	}
}


text:
declare const logError: (message: string, error?: Error | undefined) => void;
export default logError;


text:
using FinesSE.Contracts.Infrastructure;
using FinesSE.Contracts.Invokable;

namespace FinesSE.Outil.Actions
{
    public class GetCurrentUrl : IStringAction
    {
        public IExecutionContext Context { get; set; }

        [EntryPoint]
        public string Invoke()
            => Context.Driver.Url;
    }
}


text:
title: Paul Register
date: '2016-08-30 13:09:00'
category: Members
layout: post
---

# Experience

* NASA Ames Research Center

  * Asteroid fragmentation modeling with emphasis on risk assessment

  * Publication in Icarus

# Interests

* Comprehensive simulation of rocket flight in MATLAB

* Report oversight (overall editing/proofreading of reports)

* Would be interested in learning CFD or getting more involved in the mechanical aspects

# Skills

* MATLAB

* Technical writing


text:
class btReducedDeformableBody : public btSoftBody
{
 public:
  //
  //  Typedefs
  //
  typedef btAlignedObjectArray<btVector3> TVStack;
  // typedef btAlignedObjectArray<btMatrix3x3> tBlockDiagMatrix;
  typedef btAlignedObjectArray<btScalar> tDenseArray;
  typedef btAlignedObjectArray<btAlignedObjectArray<btScalar> > tDenseMatrix;

 private:
  // flag to turn off the reduced modes
  bool m_rigidOnly;

  // Flags for transform. Once transform is applied, users cannot scale the mesh or change its total mass.
  bool m_transform_lock;

  // scaling factors
  btScalar m_rhoScale;         // mass density scale
  btScalar m_ksScale;          // stiffness scale

  // projection matrix
  tDenseMatrix m_projPA;        // Eqn. 4.11 from Rahul Sheth's thesis
  tDenseMatrix m_projCq;
  tDenseArray m_STP;
  tDenseArray m_MrInvSTP;

  TVStack m_localMomentArm; // Sq + x0

  btVector3 m_internalDeltaLinearVelocity;
  btVector3 m_internalDeltaAngularVelocity;
  tDenseArray m_internalDeltaReducedVelocity;

  btVector3 m_linearVelocityFromReduced;  // contribution to the linear velocity from reduced velocity
  btVector3 m_angularVelocityFromReduced; // contribution to the angular velocity from reduced velocity
  btVector3 m_internalDeltaAngularVelocityFromReduced;

 protected:
  // rigid frame
  btScalar m_mass;          // total mass of the rigid frame
  btScalar m_inverseMass;   // inverse of the total mass of the rigid frame
  btVector3 m_linearVelocity;
  btVector3 m_angularVelocity;
  btScalar m_linearDamping;    // linear damping coefficient
  btScalar m_angularDamping;    // angular damping coefficient
  btVector3 m_linearFactor;
  btVector3 m_angularFactor;
  // btVector3 m_invInertiaLocal;
  btMatrix3x3 m_invInertiaLocal;
  btTransform m_rigidTransformWorld;
  btMatrix3x3 m_invInertiaTensorWorldInitial;
  btMatrix3x3 m_invInertiaTensorWorld;
  btMatrix3x3 m_interpolateInvInertiaTensorWorld;
  btVector3 m_initialCoM;  // initial center of mass (original of the m_rigidTransformWorld)

  // damping
  btScalar m_dampingAlpha;
  btScalar m_dampingBeta;

 public:
  //
  //  Fields
  //

  // reduced space
  int m_nReduced;
  int m_nFull;
  tDenseMatrix m_modes;														// modes of the reduced deformable model. Each inner array is a mode, outer array size = n_modes
  tDenseArray m_reducedDofs;				   // Reduced degree of freedom
  tDenseArray m_reducedDofsBuffer;     // Reduced degree of freedom at t^n
  tDenseArray m_reducedVelocity;		   // Reduced velocity array
  tDenseArray m_reducedVelocityBuffer; // Reduced velocity array at t^n
  tDenseArray m_reducedForceExternal;          // reduced external force
  tDenseArray m_reducedForceElastic;           // reduced internal elastic force
  tDenseArray m_reducedForceDamping;           // reduced internal damping force
  tDenseArray m_eigenvalues;		// eigenvalues of the reduce deformable model
  tDenseArray m_Kr;	// reduced stiffness matrix

  // full space
  TVStack m_x0;					     				 // Rest position
  tDenseArray m_nodalMass;           // Mass on each node
  btAlignedObjectArray<int> m_fixedNodes; // index of the fixed nodes
  int m_nodeIndexOffset;             // offset of the node index needed for contact solver when there are multiple reduced deformable body in the world.

  // contacts
  btAlignedObjectArray<int> m_contactNodesList;

  //
  // Api
  //
  btReducedDeformableBody(btSoftBodyWorldInfo* worldInfo, int node_count, const btVector3* x, const btScalar* m);

  ~btReducedDeformableBody() {}

  //
  // initializing helpers
  //
  void internalInitialization();

  void setReducedModes(int num_modes, int full_size);

  void setMassProps(const tDenseArray& mass_array);

  void setInertiaProps();

  void setRigidVelocity(const btVector3& v);

  void setRigidAngularVelocity(const btVector3& omega);

  void setStiffnessScale(const btScalar ks);

  void setMassScale(const btScalar rho);

  void setFixedNodes(const int n_node);

  void setDamping(const btScalar alpha, const btScalar beta);

  void disableReducedModes(const bool rigid_only);

  virtual void setTotalMass(btScalar mass, bool fromfaces = false);

  //
  // various internal updates
  //
  virtual void transformTo(const btTransform& trs);
  virtual void transform(const btTransform& trs);
  // caution:
  // need to use scale before using transform, because the scale is performed in the local frame
  // (i.e., may have some rotation already, but the m_rigidTransformWorld doesn't have this info)
  virtual void scale(const btVector3& scl);

 private:
  void updateRestNodalPositions();

  void updateInitialInertiaTensor(const btMatrix3x3& rotation);

  void updateLocalInertiaTensorFromNodes();

  void updateInertiaTensor();

  void updateModesByRotation(const btMatrix3x3& rotation);

 public:
  void updateLocalMomentArm();

  void predictIntegratedTransform(btScalar dt, btTransform& predictedTransform);

  // update the external force projection matrix
  void updateExternalForceProjectMatrix(bool initialized);

  void endOfTimeStepZeroing();

  void applyInternalVelocityChanges();

  //
  // position and velocity update related
  //

  // compute reduced degree of freedoms
  void updateReducedDofs(btScalar solverdt);

  // compute reduced velocity update (for explicit time stepping)
  void updateReducedVelocity(btScalar solverdt);

  // map to full degree of freedoms
  void mapToFullPosition(const btTransform& ref_trans);

  // compute full space velocity from the reduced velocity
  void mapToFullVelocity(const btTransform& ref_trans);

  // compute total angular momentum
  const btVector3 computeTotalAngularMomentum() const;

  // get a single node's full space velocity from the reduced velocity
  const btVector3 computeNodeFullVelocity(const btTransform& ref_trans, int n_node) const;

  // get a single node's all delta velocity
  const btVector3 internalComputeNodeDeltaVelocity(const btTransform& ref_trans, int n_node) const;

  //
  // rigid motion related
  //
  void applyDamping(btScalar timeStep);

  void applyCentralImpulse(const btVector3& impulse);

  void applyTorqueImpulse(const btVector3& torque);

  void proceedToTransform(btScalar dt, bool end_of_time_step);

  //
  // force related
  //

  // apply impulse to the rigid frame
  void internalApplyRigidImpulse(const btVector3& impulse, const btVector3& rel_pos);

  // apply impulse to nodes in the full space
  void internalApplyFullSpaceImpulse(const btVector3& impulse, const btVector3& rel_pos, int n_node, btScalar dt);

  // apply nodal external force in the full space
  void applyFullSpaceNodalForce(const btVector3& f_ext, int n_node);

  // apply gravity to the rigid frame
  void applyRigidGravity(const btVector3& gravity, btScalar dt);

  // apply reduced elastic force
  void applyReducedElasticForce(const tDenseArray& reduce_dofs);

  // apply reduced damping force
  void applyReducedDampingForce(const tDenseArray& reduce_vel);

  // calculate the impulse factor
  virtual btMatrix3x3 getImpulseFactor(int n_node);

  // get relative position from a node to the CoM of the rigid frame
  btVector3 getRelativePos(int n_node);

  //
  // accessors
  //
  bool isReducedModesOFF() const;
  btScalar getTotalMass() const;
  btTransform& getRigidTransform();
  const btVector3& getLinearVelocity() const;
	const btVector3& getAngularVelocity() const;

  #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
  void clampVelocity(btVector3& v) const {
      v.setX(
          fmax(-BT_CLAMP_VELOCITY_TO,
                fmin(BT_CLAMP_VELOCITY_TO, v.getX()))
      );
      v.setY(
          fmax(-BT_CLAMP_VELOCITY_TO,
                fmin(BT_CLAMP_VELOCITY_TO, v.getY()))
      );
      v.setZ(
          fmax(-BT_CLAMP_VELOCITY_TO,
                fmin(BT_CLAMP_VELOCITY_TO, v.getZ()))
      );
  }
  #endif
};

#endif // BT_REDUCED_SOFT_BODY_H


text:
import * as React from 'react';
// import of a small, pure module in a private demo
// bundle size and module duplication is negligible
/* eslint-disable-next-line no-restricted-imports */
import { convertLength } from '@material-ui/core/styles/cssUtils';
import {
  makeStyles,
  createMuiTheme,
  responsiveFontSizes,
} from '@material-ui/core/styles';
import {
  Legend,
  Tooltip,
  LineChart,
  Line,
  XAxis,
  YAxis,
  Label,
  ResponsiveContainer,
} from 'recharts';

let theme = createMuiTheme();
theme = responsiveFontSizes(theme);

const colors = [
  '#443dc2',
  '#2060df',
  '#277e91',
  '#378153',
  '#4d811d',
  '#63780d',
  '#996600',
];
const variants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1'];

const useStyles = makeStyles({
  root: {
    height: 380,
    width: '100%',
    color: 'black',
  },
});

export default function ResponsiveFontSizes() {
  const classes = useStyles();
  const convert = convertLength(theme.typography.htmlFontSize);
  const toPx = (rem) => parseFloat(convert(rem, 'px'));

  const series = variants.map((variantName) => {
    const variant = theme.typography[variantName];
    const data = [];

    data.push({
      viewport: 0,
      fontSize: toPx(variant.fontSize),
    });

    theme.breakpoints.keys.forEach((key) => {
      const viewport = theme.breakpoints.values[key];
      const value = theme.breakpoints.up(key);

      if (variant[value]) {
        data.push({
          viewport: viewport - 1,
          fontSize: data[data.length - 1].fontSize,
        });
        data.push({
          viewport,
          fontSize: toPx(variant[value].fontSize),
        });
      } else if (key === 'xl') {
        data.push({
          viewport,
          fontSize: data[data.length - 1].fontSize,
        });
      }
    });

    return {
      name: variantName,
      data,
    };
  });

  return (
    <div className={classes.root}>
      <ResponsiveContainer>
        <LineChart
          margin={{
            top: 50,
            right: 140,
            bottom: 0,
            left: 30,
          }}
        >
          <XAxis dataKey="viewport" type="number">
            <Label position="right" offset={30}>
              viewport (px)
            </Label>
          </XAxis>
          <YAxis dataKey="fontSize" type="number">
            <Label position="top" offset={20}>
              font-size (rem)
            </Label>
          </YAxis>
          <Tooltip />
          <Legend />
          {series.map((serie, index) => (
            <Line
              dataKey="fontSize"
              stroke={colors[index % colors.length]}
              data={serie.data}
              name={serie.name}
              key={serie.name}
            />
          ))}
        </LineChart>
      </ResponsiveContainer>
    </div>
  );
}


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

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateSlotTypeResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * The unique identifier of the updated slot type.
     *

     */
    private String slotTypeId;
    /**
     *

     * The updated name of the slot type.
     *

     */
    private String slotTypeName;
    /**
     *

     * The updated description of the slot type.
     *

     */
    private String description;
    /**
     *

     * The updated values that the slot type provides.
     *

     */
    private java.util.List<SlotTypeValue> slotTypeValues;
    /**
     *

     * The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     *

     */
    private SlotValueSelectionSetting valueSelectionSetting;
    /**
     *

     * The updated signature of the built-in slot type that is the parent of this slot type.
     *

     */
    private String parentSlotTypeSignature;
    /**
     *

     * The identifier of the bot that contains the slot type.
     *

     */
    private String botId;
    /**
     *

     * The version of the bot that contains the slot type. This is always DRAFT.
     *

     */
    private String botVersion;
    /**
     *

     * The language and locale of the updated slot type.
     *

     */
    private String localeId;
    /**
     *

     * The timestamp of the date and time that the slot type was created.
     *

     */
    private java.util.Date creationDateTime;
    /**
     *

     * A timestamp of the date and time that the slot type was last updated.
     *

     */
    private java.util.Date lastUpdatedDateTime;

    private ExternalSourceSetting externalSourceSetting;
    /**
     *

     * Specifications for a composite slot type.
     *

     */
    private CompositeSlotTypeSetting compositeSlotTypeSetting;

    /**
     *

     * The unique identifier of the updated slot type.
     *

     *
     * @param slotTypeId
     *        The unique identifier of the updated slot type.
     */

    public void setSlotTypeId(String slotTypeId) {
        this.slotTypeId = slotTypeId;
    }

    /**
     *

     * The unique identifier of the updated slot type.
     *

     *
     * @return The unique identifier of the updated slot type.
     */

    public String getSlotTypeId() {
        return this.slotTypeId;
    }

    /**
     *

     * The unique identifier of the updated slot type.
     *

     *
     * @param slotTypeId
     *        The unique identifier of the updated slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withSlotTypeId(String slotTypeId) {
        setSlotTypeId(slotTypeId);
        return this;
    }

    /**
     *

     * The updated name of the slot type.
     *

     *
     * @param slotTypeName
     *        The updated name of the slot type.
     */

    public void setSlotTypeName(String slotTypeName) {
        this.slotTypeName = slotTypeName;
    }

    /**
     *

     * The updated name of the slot type.
     *

     *
     * @return The updated name of the slot type.
     */

    public String getSlotTypeName() {
        return this.slotTypeName;
    }

    /**
     *

     * The updated name of the slot type.
     *

     *
     * @param slotTypeName
     *        The updated name of the slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withSlotTypeName(String slotTypeName) {
        setSlotTypeName(slotTypeName);
        return this;
    }

    /**
     *

     * The updated description of the slot type.
     *

     *
     * @param description
     *        The updated description of the slot type.
     */

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     *

     * The updated description of the slot type.
     *

     *
     * @return The updated description of the slot type.
     */

    public String getDescription() {
        return this.description;
    }

    /**
     *

     * The updated description of the slot type.
     *

     *
     * @param description
     *        The updated description of the slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withDescription(String description) {
        setDescription(description);
        return this;
    }

    /**
     *

     * The updated values that the slot type provides.
     *

     *
     * @return The updated values that the slot type provides.
     */

    public java.util.List<SlotTypeValue> getSlotTypeValues() {
        return slotTypeValues;
    }

    /**
     *

     * The updated values that the slot type provides.
     *

     *
     * @param slotTypeValues
     *        The updated values that the slot type provides.
     */

    public void setSlotTypeValues(java.util.Collection<SlotTypeValue> slotTypeValues) {
        if (slotTypeValues == null) {
            this.slotTypeValues = null;
            return;
        }

        this.slotTypeValues = new java.util.ArrayList<SlotTypeValue>(slotTypeValues);
    }

    /**
     *

     * The updated values that the slot type provides.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setSlotTypeValues(java.util.Collection)} or {@link #withSlotTypeValues(java.util.Collection)} if you want
     * to override the existing values.
     *

     *
     * @param slotTypeValues
     *        The updated values that the slot type provides.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withSlotTypeValues(SlotTypeValue... slotTypeValues) {
        if (this.slotTypeValues == null) {
            setSlotTypeValues(new java.util.ArrayList<SlotTypeValue>(slotTypeValues.length));
        }
        for (SlotTypeValue ele : slotTypeValues) {
            this.slotTypeValues.add(ele);
        }
        return this;
    }

    /**
     *

     * The updated values that the slot type provides.
     *

     *
     * @param slotTypeValues
     *        The updated values that the slot type provides.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withSlotTypeValues(java.util.Collection<SlotTypeValue> slotTypeValues) {
        setSlotTypeValues(slotTypeValues);
        return this;
    }

    /**
     *

     * The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     *

     *
     * @param valueSelectionSetting
     *        The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     */

    public void setValueSelectionSetting(SlotValueSelectionSetting valueSelectionSetting) {
        this.valueSelectionSetting = valueSelectionSetting;
    }

    /**
     *

     * The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     *

     *
     * @return The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     */

    public SlotValueSelectionSetting getValueSelectionSetting() {
        return this.valueSelectionSetting;
    }

    /**
     *

     * The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     *

     *
     * @param valueSelectionSetting
     *        The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withValueSelectionSetting(SlotValueSelectionSetting valueSelectionSetting) {
        setValueSelectionSetting(valueSelectionSetting);
        return this;
    }

    /**
     *

     * The updated signature of the built-in slot type that is the parent of this slot type.
     *

     *
     * @param parentSlotTypeSignature
     *        The updated signature of the built-in slot type that is the parent of this slot type.
     */

    public void setParentSlotTypeSignature(String parentSlotTypeSignature) {
        this.parentSlotTypeSignature = parentSlotTypeSignature;
    }

    /**
     *

     * The updated signature of the built-in slot type that is the parent of this slot type.
     *

     *
     * @return The updated signature of the built-in slot type that is the parent of this slot type.
     */

    public String getParentSlotTypeSignature() {
        return this.parentSlotTypeSignature;
    }

    /**
     *

     * The updated signature of the built-in slot type that is the parent of this slot type.
     *

     *
     * @param parentSlotTypeSignature
     *        The updated signature of the built-in slot type that is the parent of this slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withParentSlotTypeSignature(String parentSlotTypeSignature) {
        setParentSlotTypeSignature(parentSlotTypeSignature);
        return this;
    }

    /**
     *

     * The identifier of the bot that contains the slot type.
     *

     *
     * @param botId
     *        The identifier of the bot that contains the slot type.
     */

    public void setBotId(String botId) {
        this.botId = botId;
    }

    /**
     *

     * The identifier of the bot that contains the slot type.
     *

     *
     * @return The identifier of the bot that contains the slot type.
     */

    public String getBotId() {
        return this.botId;
    }

    /**
     *

     * The identifier of the bot that contains the slot type.
     *

     *
     * @param botId
     *        The identifier of the bot that contains the slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withBotId(String botId) {
        setBotId(botId);
        return this;
    }

    /**
     *

     * The version of the bot that contains the slot type. This is always DRAFT.
     *

     *
     * @param botVersion
     *        The version of the bot that contains the slot type. This is always DRAFT.
     */

    public void setBotVersion(String botVersion) {
        this.botVersion = botVersion;
    }

    /**
     *

     * The version of the bot that contains the slot type. This is always DRAFT.
     *

     *
     * @return The version of the bot that contains the slot type. This is always DRAFT.
     */

    public String getBotVersion() {
        return this.botVersion;
    }

    /**
     *

     * The version of the bot that contains the slot type. This is always DRAFT.
     *

     *
     * @param botVersion
     *        The version of the bot that contains the slot type. This is always DRAFT.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withBotVersion(String botVersion) {
        setBotVersion(botVersion);
        return this;
    }

    /**
     *

     * The language and locale of the updated slot type.
     *

     *
     * @param localeId
     *        The language and locale of the updated slot type.
     */

    public void setLocaleId(String localeId) {
        this.localeId = localeId;
    }

    /**
     *

     * The language and locale of the updated slot type.
     *

     *
     * @return The language and locale of the updated slot type.
     */

    public String getLocaleId() {
        return this.localeId;
    }

    /**
     *

     * The language and locale of the updated slot type.
     *

     *
     * @param localeId
     *        The language and locale of the updated slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withLocaleId(String localeId) {
        setLocaleId(localeId);
        return this;
    }

    /**
     *

     * The timestamp of the date and time that the slot type was created.
     *

     *
     * @param creationDateTime
     *        The timestamp of the date and time that the slot type was created.
     */

    public void setCreationDateTime(java.util.Date creationDateTime) {
        this.creationDateTime = creationDateTime;
    }

    /**
     *

     * The timestamp of the date and time that the slot type was created.
     *

     *
     * @return The timestamp of the date and time that the slot type was created.
     */

    public java.util.Date getCreationDateTime() {
        return this.creationDateTime;
    }

    /**
     *

     * The timestamp of the date and time that the slot type was created.
     *

     *
     * @param creationDateTime
     *        The timestamp of the date and time that the slot type was created.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withCreationDateTime(java.util.Date creationDateTime) {
        setCreationDateTime(creationDateTime);
        return this;
    }

    /**
     *

     * A timestamp of the date and time that the slot type was last updated.
     *

     *
     * @param lastUpdatedDateTime
     *        A timestamp of the date and time that the slot type was last updated.
     */

    public void setLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) {
        this.lastUpdatedDateTime = lastUpdatedDateTime;
    }

    /**
     *

     * A timestamp of the date and time that the slot type was last updated.
     *

     *
     * @return A timestamp of the date and time that the slot type was last updated.
     */

    public java.util.Date getLastUpdatedDateTime() {
        return this.lastUpdatedDateTime;
    }

    /**
     *

     * A timestamp of the date and time that the slot type was last updated.
     *

     *
     * @param lastUpdatedDateTime
     *        A timestamp of the date and time that the slot type was last updated.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) {
        setLastUpdatedDateTime(lastUpdatedDateTime);
        return this;
    }

    /**
     * @param externalSourceSetting
     */

    public void setExternalSourceSetting(ExternalSourceSetting externalSourceSetting) {
        this.externalSourceSetting = externalSourceSetting;
    }

    /**
     * @return
     */

    public ExternalSourceSetting getExternalSourceSetting() {
        return this.externalSourceSetting;
    }

    /**
     * @param externalSourceSetting
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withExternalSourceSetting(ExternalSourceSetting externalSourceSetting) {
        setExternalSourceSetting(externalSourceSetting);
        return this;
    }

    /**
     *

     * Specifications for a composite slot type.
     *

     *
     * @param compositeSlotTypeSetting
     *        Specifications for a composite slot type.
     */

    public void setCompositeSlotTypeSetting(CompositeSlotTypeSetting compositeSlotTypeSetting) {
        this.compositeSlotTypeSetting = compositeSlotTypeSetting;
    }

    /**
     *

     * Specifications for a composite slot type.
     *

     *
     * @return Specifications for a composite slot type.
     */

    public CompositeSlotTypeSetting getCompositeSlotTypeSetting() {
        return this.compositeSlotTypeSetting;
    }

    /**
     *

     * Specifications for a composite slot type.
     *

     *
     * @param compositeSlotTypeSetting
     *        Specifications for a composite slot type.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateSlotTypeResult withCompositeSlotTypeSetting(CompositeSlotTypeSetting compositeSlotTypeSetting) {
        setCompositeSlotTypeSetting(compositeSlotTypeSetting);
        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 (getSlotTypeId() != null)
            sb.append("SlotTypeId: ").append(getSlotTypeId()).append(",");
        if (getSlotTypeName() != null)
            sb.append("SlotTypeName: ").append(getSlotTypeName()).append(",");
        if (getDescription() != null)
            sb.append("Description: ").append(getDescription()).append(",");
        if (getSlotTypeValues() != null)
            sb.append("SlotTypeValues: ").append(getSlotTypeValues()).append(",");
        if (getValueSelectionSetting() != null)
            sb.append("ValueSelectionSetting: ").append(getValueSelectionSetting()).append(",");
        if (getParentSlotTypeSignature() != null)
            sb.append("ParentSlotTypeSignature: ").append(getParentSlotTypeSignature()).append(",");
        if (getBotId() != null)
            sb.append("BotId: ").append(getBotId()).append(",");
        if (getBotVersion() != null)
            sb.append("BotVersion: ").append(getBotVersion()).append(",");
        if (getLocaleId() != null)
            sb.append("LocaleId: ").append(getLocaleId()).append(",");
        if (getCreationDateTime() != null)
            sb.append("CreationDateTime: ").append(getCreationDateTime()).append(",");
        if (getLastUpdatedDateTime() != null)
            sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(",");
        if (getExternalSourceSetting() != null)
            sb.append("ExternalSourceSetting: ").append(getExternalSourceSetting()).append(",");
        if (getCompositeSlotTypeSetting() != null)
            sb.append("CompositeSlotTypeSetting: ").append(getCompositeSlotTypeSetting());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof UpdateSlotTypeResult == false)
            return false;
        UpdateSlotTypeResult other = (UpdateSlotTypeResult) obj;
        if (other.getSlotTypeId() == null ^ this.getSlotTypeId() == null)
            return false;
        if (other.getSlotTypeId() != null && other.getSlotTypeId().equals(this.getSlotTypeId()) == false)
            return false;
        if (other.getSlotTypeName() == null ^ this.getSlotTypeName() == null)
            return false;
        if (other.getSlotTypeName() != null && other.getSlotTypeName().equals(this.getSlotTypeName()) == false)
            return false;
        if (other.getDescription() == null ^ this.getDescription() == null)
            return false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
            return false;
        if (other.getSlotTypeValues() == null ^ this.getSlotTypeValues() == null)
            return false;
        if (other.getSlotTypeValues() != null && other.getSlotTypeValues().equals(this.getSlotTypeValues()) == false)
            return false;
        if (other.getValueSelectionSetting() == null ^ this.getValueSelectionSetting() == null)
            return false;
        if (other.getValueSelectionSetting() != null && other.getValueSelectionSetting().equals(this.getValueSelectionSetting()) == false)
            return false;
        if (other.getParentSlotTypeSignature() == null ^ this.getParentSlotTypeSignature() == null)
            return false;
        if (other.getParentSlotTypeSignature() != null && other.getParentSlotTypeSignature().equals(this.getParentSlotTypeSignature()) == false)
            return false;
        if (other.getBotId() == null ^ this.getBotId() == null)
            return false;
        if (other.getBotId() != null && other.getBotId().equals(this.getBotId()) == false)
            return false;
        if (other.getBotVersion() == null ^ this.getBotVersion() == null)
            return false;
        if (other.getBotVersion() != null && other.getBotVersion().equals(this.getBotVersion()) == false)
            return false;
        if (other.getLocaleId() == null ^ this.getLocaleId() == null)
            return false;
        if (other.getLocaleId() != null && other.getLocaleId().equals(this.getLocaleId()) == false)
            return false;
        if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null)
            return false;
        if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false)
            return false;
        if (other.getLastUpdatedDateTime() == null ^ this.getLastUpdatedDateTime() == null)
            return false;
        if (other.getLastUpdatedDateTime() != null && other.getLastUpdatedDateTime().equals(this.getLastUpdatedDateTime()) == false)
            return false;
        if (other.getExternalSourceSetting() == null ^ this.getExternalSourceSetting() == null)
            return false;
        if (other.getExternalSourceSetting() != null && other.getExternalSourceSetting().equals(this.getExternalSourceSetting()) == false)
            return false;
        if (other.getCompositeSlotTypeSetting() == null ^ this.getCompositeSlotTypeSetting() == null)
            return false;
        if (other.getCompositeSlotTypeSetting() != null && other.getCompositeSlotTypeSetting().equals(this.getCompositeSlotTypeSetting()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getSlotTypeId() == null) ? 0 : getSlotTypeId().hashCode());
        hashCode = prime * hashCode + ((getSlotTypeName() == null) ? 0 : getSlotTypeName().hashCode());
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
        hashCode = prime * hashCode + ((getSlotTypeValues() == null) ? 0 : getSlotTypeValues().hashCode());
        hashCode = prime * hashCode + ((getValueSelectionSetting() == null) ? 0 : getValueSelectionSetting().hashCode());
        hashCode = prime * hashCode + ((getParentSlotTypeSignature() == null) ? 0 : getParentSlotTypeSignature().hashCode());
        hashCode = prime * hashCode + ((getBotId() == null) ? 0 : getBotId().hashCode());
        hashCode = prime * hashCode + ((getBotVersion() == null) ? 0 : getBotVersion().hashCode());
        hashCode = prime * hashCode + ((getLocaleId() == null) ? 0 : getLocaleId().hashCode());
        hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode());
        hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode());
        hashCode = prime * hashCode + ((getExternalSourceSetting() == null) ? 0 : getExternalSourceSetting().hashCode());
        hashCode = prime * hashCode + ((getCompositeSlotTypeSetting() == null) ? 0 : getCompositeSlotTypeSetting().hashCode());
        return hashCode;
    }

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

}


text:
class Class
  def register *args, &block
    ::MICON.register(*args, &block)
  end
end

def register *args, &block
  ::MICON.register(*args, &block)
end

def lookup name
  ::MICON[name]
end

def registered? name
  ::MICON.include? name
end


text:
package org.apache.commons.functor.example.map;

import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Map;
import java.util.Set;

import org.apache.commons.functor.BinaryFunction;
import org.apache.commons.functor.BinaryProcedure;
import org.apache.commons.functor.NullaryProcedure;
import org.apache.commons.functor.Predicate;
import org.apache.commons.functor.Procedure;

/**
 * @version $Revision$ $Date$
 */
@SuppressWarnings("unchecked")
public class FunctoredMap<K, V> implements Map<K, V> {
    public FunctoredMap(Map<? super K, ? super V> map) {
        this.map = (Map<K, V>)map;
    }

    @Override
    public int hashCode() {
        return map.hashCode();
    }

    @Override
    public String toString() {
        return map.toString();
    }

    public Collection<V> values() {
        return map.values();
    }

    public Set<K> keySet() {
        return map.keySet();
    }

    public V get(Object key) {
        return onget.evaluate(map, (K)key);
    }

    public void clear() {
        onclear.run(map);
    }

    public int size() {
        return map.size();
    }

    public Object put(Object key, Object value) {
        return onput.evaluate(map, new Object[] { key, value });
    }

    public void putAll(Map<? extends K, ? extends V> src) {
        onputall.run(map, (Map<K, V>)src);
    }

    public Set<Map.Entry<K, V>> entrySet() {
        return map.entrySet();
    }

    public boolean containsKey(Object key) {
        return map.containsKey(key);
    }

    public boolean isEmpty() {
        return map.isEmpty();
    }

    public V remove(Object key) {
        return onremove.evaluate(map, (K)key);
    }

    @Override
    public boolean equals(Object obj) {
        return map.equals(obj);
    }

    public boolean containsValue(Object value) {
        return map.containsValue(value);
    }

    // protected

    protected void setOnClear(Procedure<Map<K, V>> procedure) {
        onclear = procedure;
    }

    protected void setOnPut(BinaryFunction<Map<K, V>, Object[], V> function) {
        onput = function;
    }

    protected void setOnGet(BinaryFunction<Map<K, V>, K, V> function) {
        onget = function;
    }

    protected void setOnPutAll(BinaryProcedure<Map<K, V>, Map<K, V>> procedure) {
        onputall = procedure;
    }

    protected void setOnRemove(BinaryFunction<Map<K, V>, K, V> function) {
        onremove = function;
    }

    // attributes

    protected BinaryFunction<Map<K, V>, Object[], V> DEFAULT_ON_PUT = new BinaryFunction<Map<K, V>, Object[], V>() {
        public V evaluate(Map<K, V> a, Object[] b) {
            Map<K, V> map = a;
            K key = (K)Array.get(b,0);
            V value = (V)Array.get(b,1);
            return map.put(key,value);
        }
    };

    private BinaryFunction<Map<K, V>, Object[], V> onput = DEFAULT_ON_PUT;

    protected BinaryFunction<Map<K, V>, K, V> DEFAULT_ON_GET = new BinaryFunction<Map<K, V>, K, V>() {
        public V evaluate(Map<K, V> map, K key) {
            return map.get(key);
        }
    };

    private BinaryFunction<Map<K, V>, K, V> onget = DEFAULT_ON_GET;

    protected BinaryProcedure<Map<K, V>, Map<K, V>> DEFAULT_ON_PUT_ALL = new BinaryProcedure<Map<K, V>, Map<K, V>>() {
        public void run(Map<K, V> a, Map<K, V> b) {
            Map<K, V> dest = a;
            Map<K, V> src = b;
            dest.putAll(src);
        }
    };

    private BinaryProcedure<Map<K, V>, Map<K, V>> onputall = DEFAULT_ON_PUT_ALL;

    protected BinaryFunction<Map<K, V>, K, V> DEFAULT_ON_REMOVE = new BinaryFunction<Map<K, V>, K, V>() {
        public V evaluate(Map<K, V> a, K key) {
            Map<K, V> map = a;
            return map.remove(key);
        }
    };

    private BinaryFunction<Map<K, V>, K, V> onremove = DEFAULT_ON_REMOVE;

    protected Procedure<Map<K, V>> DEFAULT_ON_CLEAR = new Procedure<Map<K, V>>() {
        public void run(Map<K, V> map) {
            map.clear();
        }
    };

    private Procedure<Map<K, V>> onclear = DEFAULT_ON_CLEAR;

    private Map<K, V> map = null;

    // inner classes

    protected static class ContainsKey implements Predicate<Object> {
        ContainsKey(Map<?, ?> map) {
            this.map = map;
        }

        public boolean test(Object obj) {
            return map.containsKey(obj);
        }

        private Map<?, ?> map = null;
    }

    protected static class Throw<K, V> implements NullaryProcedure, Procedure<Map<K, V>>, BinaryProcedure<K, V> {
        Throw(RuntimeException e) {
            this.klass = e.getClass();
        }

        public void run() {
            try {
                throw (RuntimeException)(klass.newInstance());
            } catch(IllegalAccessException e) {
                throw new RuntimeException();
            } catch (InstantiationException e) {
                throw new RuntimeException();
            }
        }

        public void run(Map<K, V> obj) {
            run();
        }

        public void run(K a, V b) {
            run();
        }

        private Class<?> klass = null;
    }
}


text:
package server

import (
	"io"
	"testing"
	"time"

	"gate.computer/gate/server/api"
)

func TestErrorTypes(t *testing.T) {
	if err := Unauthenticated("test"); api.AsUnauthenticated(err) == nil {
		t.Error(err)
	}

	if err := PermissionDenied("test"); api.AsPermissionDenied(err) == nil {
		t.Error(err)
	}

	if err := Unavailable(io.ErrUnexpectedEOF); api.AsUnavailable(err) == nil {
		t.Error(err)
	}

	if err := RetryAfter(time.Now().Add(time.Minute)); api.AsTooManyRequests(err) == nil {
		t.Error(err)
	}
}


text:
package org.elasticsearch.xpack.core.ml.dataframe.stats.regression;

import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.xpack.core.ml.dataframe.stats.common.FoldValues;
import org.elasticsearch.xpack.core.ml.utils.ToXContentParams;

import java.io.IOException;
import java.util.List;
import java.util.Objects;

public class ValidationLoss implements ToXContentObject, Writeable {

    public static final ParseField LOSS_TYPE = new ParseField("loss_type");
    public static final ParseField FOLD_VALUES = new ParseField("fold_values");

    public static ValidationLoss fromXContent(XContentParser parser, boolean ignoreUnknownFields) {
        return createParser(ignoreUnknownFields).apply(parser, null);
    }

    @SuppressWarnings("unchecked")
    private static ConstructingObjectParser<ValidationLoss, Void> createParser(boolean ignoreUnknownFields) {
        ConstructingObjectParser<ValidationLoss, Void> parser = new ConstructingObjectParser<>("regression_validation_loss",
                ignoreUnknownFields,
            a -> new ValidationLoss((String) a[0], (List<FoldValues>) a[1]));

        parser.declareString(ConstructingObjectParser.constructorArg(), LOSS_TYPE);
        parser.declareObjectArray(ConstructingObjectParser.constructorArg(),
            (p, c) -> FoldValues.fromXContent(p, ignoreUnknownFields), FOLD_VALUES);
        return parser;
    }

    private final String lossType;
    private final List<FoldValues> foldValues;

    public ValidationLoss(String lossType, List<FoldValues> values) {
        this.lossType = Objects.requireNonNull(lossType);
        this.foldValues = Objects.requireNonNull(values);
    }

    public ValidationLoss(StreamInput in) throws IOException {
        lossType = in.readString();
        foldValues = in.readList(FoldValues::new);
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeString(lossType);
        out.writeList(foldValues);
    }

    @Override
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        builder.field(LOSS_TYPE.getPreferredName(), lossType);
        if (params.paramAsBoolean(ToXContentParams.FOR_INTERNAL_STORAGE, false)) {
            builder.field(FOLD_VALUES.getPreferredName(), foldValues);
        }
        builder.endObject();
        return builder;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ValidationLoss that = (ValidationLoss) o;
        return Objects.equals(lossType, that.lossType) && Objects.equals(foldValues, that.foldValues);
    }

    @Override
    public int hashCode() {
        return Objects.hash(lossType, foldValues);
    }
}


text:
package costmanagement

import (
	"context"

	original "github.com/Azure/azure-sdk-for-go/services/preview/costmanagement/mgmt/2019-03-01/costmanagement"
)

const (
	DefaultBaseURI = original.DefaultBaseURI
)

type ConnectorBillingModel = original.ConnectorBillingModel

const (
	AutoUpgrade ConnectorBillingModel = original.AutoUpgrade
	Expired     ConnectorBillingModel = original.Expired
	Premium     ConnectorBillingModel = original.Premium
	Trial       ConnectorBillingModel = original.Trial
)

type ConnectorStatus = original.ConnectorStatus

const (
	ConnectorStatusActive  ConnectorStatus = original.ConnectorStatusActive
	ConnectorStatusError   ConnectorStatus = original.ConnectorStatusError
	ConnectorStatusExpired ConnectorStatus = original.ConnectorStatusExpired
	ConnectorStatusWarning ConnectorStatus = original.ConnectorStatusWarning
)

type CostAllocationPolicy = original.CostAllocationPolicy

const (
	Evenly       CostAllocationPolicy = original.Evenly
	Fixed        CostAllocationPolicy = original.Fixed
	Proportional CostAllocationPolicy = original.Proportional
)

type Direction = original.Direction

const (
	Ascending  Direction = original.Ascending
	Descending Direction = original.Descending
)

type FunctionType = original.FunctionType

const (
	AHUB         FunctionType = original.AHUB
	All          FunctionType = original.All
	None         FunctionType = original.None
	Reservations FunctionType = original.Reservations
)

type GranularityType = original.GranularityType

const (
	Daily   GranularityType = original.Daily
	Monthly GranularityType = original.Monthly
)

type OperatorType = original.OperatorType

const (
	Contains OperatorType = original.Contains
	In       OperatorType = original.In
)

type ReportConfigColumnType = original.ReportConfigColumnType

const (
	ReportConfigColumnTypeDimension ReportConfigColumnType = original.ReportConfigColumnTypeDimension
	ReportConfigColumnTypeTag       ReportConfigColumnType = original.ReportConfigColumnTypeTag
)

type RuleType = original.RuleType

const (
	RuleTypeCostAllocation         RuleType = original.RuleTypeCostAllocation
	RuleTypeCustomPrice            RuleType = original.RuleTypeCustomPrice
	RuleTypeShowbackRuleProperties RuleType = original.RuleTypeShowbackRuleProperties
)

type ShowbackRuleStatus = original.ShowbackRuleStatus

const (
	Active    ShowbackRuleStatus = original.Active
	NotActive ShowbackRuleStatus = original.NotActive
)

type TimeframeType = original.TimeframeType

const (
	Custom      TimeframeType = original.Custom
	MonthToDate TimeframeType = original.MonthToDate
	WeekToDate  TimeframeType = original.WeekToDate
	YearToDate  TimeframeType = original.YearToDate
)

type BaseClient = original.BaseClient
type BasicShowbackRuleProperties = original.BasicShowbackRuleProperties
type CloudConnectorClient = original.CloudConnectorClient
type ConnectorCollectionErrorInfo = original.ConnectorCollectionErrorInfo
type ConnectorCollectionInfo = original.ConnectorCollectionInfo
type ConnectorDefinition = original.ConnectorDefinition
type ConnectorDefinitionListResult = original.ConnectorDefinitionListResult
type ConnectorProperties = original.ConnectorProperties
type CostAllocationDetails = original.CostAllocationDetails
type CostAllocationDetailsKind = original.CostAllocationDetailsKind
type CustomPriceDetails = original.CustomPriceDetails
type CustomPriceDetailsKind = original.CustomPriceDetailsKind
type Dimension = original.Dimension
type DimensionProperties = original.DimensionProperties
type DimensionsClient = original.DimensionsClient
type DimensionsListResult = original.DimensionsListResult
type ErrorBase = original.ErrorBase
type ErrorDetails = original.ErrorDetails
type ErrorResponse = original.ErrorResponse
type ExternalBillingAccountClient = original.ExternalBillingAccountClient
type ExternalBillingAccountDefinition = original.ExternalBillingAccountDefinition
type ExternalBillingAccountDefinitionListResult = original.ExternalBillingAccountDefinitionListResult
type ExternalBillingAccountProperties = original.ExternalBillingAccountProperties
type ExternalSubscriptionClient = original.ExternalSubscriptionClient
type ExternalSubscriptionDefinition = original.ExternalSubscriptionDefinition
type ExternalSubscriptionDefinitionListResult = original.ExternalSubscriptionDefinitionListResult
type ExternalSubscriptionIDListRequest = original.ExternalSubscriptionIDListRequest
type ExternalSubscriptionProperties = original.ExternalSubscriptionProperties
type ForecastClient = original.ForecastClient
type Markup = original.Markup
type Operation = original.Operation
type OperationDisplay = original.OperationDisplay
type OperationListResult = original.OperationListResult
type OperationListResultIterator = original.OperationListResultIterator
type OperationListResultPage = original.OperationListResultPage
type OperationsClient = original.OperationsClient
type Query = original.Query
type QueryClient = original.QueryClient
type QueryColumn = original.QueryColumn
type QueryProperties = original.QueryProperties
type QueryResult = original.QueryResult
type ReportConfigAggregation = original.ReportConfigAggregation
type ReportConfigComparisonExpression = original.ReportConfigComparisonExpression
type ReportConfigDataset = original.ReportConfigDataset
type ReportConfigDatasetConfiguration = original.ReportConfigDatasetConfiguration
type ReportConfigDefinition = original.ReportConfigDefinition
type ReportConfigFilter = original.ReportConfigFilter
type ReportConfigGrouping = original.ReportConfigGrouping
type ReportConfigSorting = original.ReportConfigSorting
type ReportConfigTimePeriod = original.ReportConfigTimePeriod
type Resource = original.Resource
type Scope = original.Scope
type ShowbackRule = original.ShowbackRule
type ShowbackRuleClient = original.ShowbackRuleClient
type ShowbackRuleListResult = original.ShowbackRuleListResult
type ShowbackRuleProperties = original.ShowbackRuleProperties
type ShowbackRulesClient = original.ShowbackRulesClient

func New(subscriptionID string) BaseClient {
	return original.New(subscriptionID)
}
func NewCloudConnectorClient(subscriptionID string) CloudConnectorClient {
	return original.NewCloudConnectorClient(subscriptionID)
}
func NewCloudConnectorClientWithBaseURI(baseURI string, subscriptionID string) CloudConnectorClient {
	return original.NewCloudConnectorClientWithBaseURI(baseURI, subscriptionID)
}
func NewDimensionsClient(subscriptionID string) DimensionsClient {
	return original.NewDimensionsClient(subscriptionID)
}
func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient {
	return original.NewDimensionsClientWithBaseURI(baseURI, subscriptionID)
}
func NewExternalBillingAccountClient(subscriptionID string) ExternalBillingAccountClient {
	return original.NewExternalBillingAccountClient(subscriptionID)
}
func NewExternalBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) ExternalBillingAccountClient {
	return original.NewExternalBillingAccountClientWithBaseURI(baseURI, subscriptionID)
}
func NewExternalSubscriptionClient(subscriptionID string) ExternalSubscriptionClient {
	return original.NewExternalSubscriptionClient(subscriptionID)
}
func NewExternalSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) ExternalSubscriptionClient {
	return original.NewExternalSubscriptionClientWithBaseURI(baseURI, subscriptionID)
}
func NewForecastClient(subscriptionID string) ForecastClient {
	return original.NewForecastClient(subscriptionID)
}
func NewForecastClientWithBaseURI(baseURI string, subscriptionID string) ForecastClient {
	return original.NewForecastClientWithBaseURI(baseURI, subscriptionID)
}
func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
	return original.NewOperationListResultIterator(page)
}
func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
	return original.NewOperationListResultPage(getNextPage)
}
func NewOperationsClient(subscriptionID string) OperationsClient {
	return original.NewOperationsClient(subscriptionID)
}
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
	return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
}
func NewQueryClient(subscriptionID string) QueryClient {
	return original.NewQueryClient(subscriptionID)
}
func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient {
	return original.NewQueryClientWithBaseURI(baseURI, subscriptionID)
}
func NewShowbackRuleClient(subscriptionID string) ShowbackRuleClient {
	return original.NewShowbackRuleClient(subscriptionID)
}
func NewShowbackRuleClientWithBaseURI(baseURI string, subscriptionID string) ShowbackRuleClient {
	return original.NewShowbackRuleClientWithBaseURI(baseURI, subscriptionID)
}
func NewShowbackRulesClient(subscriptionID string) ShowbackRulesClient {
	return original.NewShowbackRulesClient(subscriptionID)
}
func NewShowbackRulesClientWithBaseURI(baseURI string, subscriptionID string) ShowbackRulesClient {
	return original.NewShowbackRulesClientWithBaseURI(baseURI, subscriptionID)
}
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
	return original.NewWithBaseURI(baseURI, subscriptionID)
}
func PossibleConnectorBillingModelValues() []ConnectorBillingModel {
	return original.PossibleConnectorBillingModelValues()
}
func PossibleConnectorStatusValues() []ConnectorStatus {
	return original.PossibleConnectorStatusValues()
}
func PossibleCostAllocationPolicyValues() []CostAllocationPolicy {
	return original.PossibleCostAllocationPolicyValues()
}
func PossibleDirectionValues() []Direction {
	return original.PossibleDirectionValues()
}
func PossibleFunctionTypeValues() []FunctionType {
	return original.PossibleFunctionTypeValues()
}
func PossibleGranularityTypeValues() []GranularityType {
	return original.PossibleGranularityTypeValues()
}
func PossibleOperatorTypeValues() []OperatorType {
	return original.PossibleOperatorTypeValues()
}
func PossibleReportConfigColumnTypeValues() []ReportConfigColumnType {
	return original.PossibleReportConfigColumnTypeValues()
}
func PossibleRuleTypeValues() []RuleType {
	return original.PossibleRuleTypeValues()
}
func PossibleShowbackRuleStatusValues() []ShowbackRuleStatus {
	return original.PossibleShowbackRuleStatusValues()
}
func PossibleTimeframeTypeValues() []TimeframeType {
	return original.PossibleTimeframeTypeValues()
}
func UserAgent() string {
	return original.UserAgent() + " profiles/preview"
}
func Version() string {
	return original.Version()
}


text:
package org.projectodd.wunderboss.web.async.websocket;

import javax.websocket.CloseReason;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
import javax.websocket.Session;
import java.io.IOException;

public class DelegatingJavaxEndpoint extends Endpoint {

    @Override
    public void onOpen(Session session, EndpointConfig endpointConfig) {
        Endpoint endpoint = delegate();
        if (endpoint != null) {
            endpoint.onOpen(session, endpointConfig);
        } else {
            close(session);
        }
    }

    @Override
    public void onClose(Session session, CloseReason closeReason) {
        Endpoint endpoint = delegate();
        if (endpoint != null) {
            endpoint.onClose(session, closeReason);
        }
    }

    @Override
    public void onError(Session session, Throwable err) {
        Endpoint endpoint = delegate();
        if (endpoint != null) {
            endpoint.onError(session, err);
        } else {
            close(session);
        }
    }

    public static void setCurrentDelegate(Endpoint endpoint) {
        delegateTL.set(endpoint);
    }

    private void close(Session session) {
        try {
            session.close(POLICY_CLOSE);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    private synchronized Endpoint delegate() {
        if (this.delegate == null) {
            this.delegate = delegateTL.get();
            delegateTL.remove();
        }

        return this.delegate;
    }

    private Endpoint delegate;

    private final static CloseReason POLICY_CLOSE = new CloseReason(new CloseReason.CloseCode() {
        @Override
        public int getCode() {
            return 1003;
        }
    }, null);
    private final static ThreadLocal<Endpoint> delegateTL = new ThreadLocal<>();
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyProject01.Util.DataObject
{
    public interface IDataBlock
    {
        // Block的个数
        int BlockCount { get; }
        int BlockLength { get; }
        double GetRate(int i);
        int Copy(double[] array, int index);
        BasicDataBlock GetNewBlock(int startIndex, int length);
        BasicDataBlock Clone();
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syll. fung. (Abellini) 2: 551 (1883)

#### Original name
Sphaeria cerea Berk. & M.A. Curtis, 1876

### Remarks
null


text:
/* eslint-disable */
function getNomisUserDetails() {
  const nomisUserName = $('#nomisId').val()

  $('#nomisUserName').text('')
  $('#nomisName').text('')

  $.get('/admin/roUsers/verify?nomisUserName=' + nomisUserName, function(userInfo) {
    $('#nomisUserName').text(userInfo.username)
    $('#nomisName').text(userInfo.name)
  }).fail(function(err) {
    $('#nomisUserName').text(err.statusText)
  })
}


text:
CREATE TABLE test_1 (
  id VARCHAR(255) NOT NULL,
  value VARCHAR(255)
);

CREATE TABLE test_2 (
  id VARCHAR(255) NOT NULL,
  dt DATETIME,
  value VARCHAR(255)
);

ALTER TABLE test_2 ADD CONSTRAINT pk_test_2 PRIMARY KEY (id,dt);

CREATE TABLE test_3 (
  id VARCHAR(255) NOT NULL,
  value VARCHAR(255)
);


text:
namespace Microsoft.Azure.Management.PostgreSQL.Models
{
    using Microsoft.Rest;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// The properties to create a new replica.
    /// </summary>
    [Newtonsoft.Json.JsonObject("Replica")]
    public partial class ServerPropertiesForReplica : ServerPropertiesForCreate
    {
        /// <summary>
        /// Initializes a new instance of the ServerPropertiesForReplica class.
        /// </summary>
        public ServerPropertiesForReplica()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the ServerPropertiesForReplica class.
        /// </summary>
        /// <param name="sourceServerId">The master server id to create replica
        /// from.</param>
        /// <param name="version">Server version. Possible values include:
        /// '9.5', '9.6', '10', '10.0', '10.2', '11'</param>
        /// <param name="sslEnforcement">Enable ssl enforcement or not when
        /// connect to server. Possible values include: 'Enabled',
        /// 'Disabled'</param>
        /// <param name="minimalTlsVersion">Enforce a minimal Tls version for
        /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
        /// 'TLSEnforcementDisabled'</param>
        /// <param name="infrastructureEncryption">Status showing whether the
        /// server enabled infrastructure encryption. Possible values include:
        /// 'Enabled', 'Disabled'</param>
        /// <param name="publicNetworkAccess">Whether or not public network
        /// access is allowed for this server. Value is optional but if passed
        /// in, must be 'Enabled' or 'Disabled'. Possible values include:
        /// 'Enabled', 'Disabled'</param>
        /// <param name="storageProfile">Storage profile of a server.</param>
        public ServerPropertiesForReplica(string sourceServerId, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
            : base(version, sslEnforcement, minimalTlsVersion, infrastructureEncryption, publicNetworkAccess, storageProfile)
        {
            SourceServerId = sourceServerId;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets the master server id to create replica from.
        /// </summary>
        [JsonProperty(PropertyName = "sourceServerId")]
        public string SourceServerId { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (SourceServerId == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "SourceServerId");
            }
        }
    }
}


text:
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;

namespace zvs.WPF
{
    /// <summary>
    /// Interaction logic for AboutWindow.xaml
    /// </summary>
    public partial class AboutWindow : Window
    {
        public AboutWindow()
        {
            InitializeComponent();
        }

#if DEBUG
        ~AboutWindow()
        {
            //Cannot write to log here, it has been disposed.
            Debug.WriteLine("AboutWindow Deconstructed.");
        }
#endif

        private void AboutWindow_Loaded_1(object sender, RoutedEventArgs e)
        {
        }

        private void WebsiteLink_MouseDown_1(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process.Start("https://github.com/aarondrabeck/zVirtualScenes");
            }
            catch (Exception ex)
            {
                //BUG FIX: #2055
                MessageBox.Show(ex.Message, "Error launching Google maps");
            }
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}


text:
layout: page
title: "About"
description: "Darkness is coming "
header-img: "img/green.jpg"
---

I used to like coding, but now i more like architecture.


text:
	<?php //$this->load->view('rightsidebar_view'); ?>

				<?php $this->load->view('central_office/central_leftsidebar_view'); ?>

		  <?php $this->load->view('subheader_view'); ?>

			<?php $this->load->view('inc/subnav_view'); ?>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Add User

                <form action="#" method="post" class="form-horizontal" onsubmit="return false;">

                        School Year

                            <input type="text" id="school_year" name="state-normal" class="form-control" tabindex="0" placeholder="2017-2018">

                </form>

								*Save and Add empty SY Records for All Programs in All regions
                                <button type="button" id="saveuser" class="btn btn-effect-ripple btn-primary" onclick="savesy();">Save</button>

                                <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Change password

                <form action="#" method="post" class="form-horizontal" onsubmit="return false;">

					<input type="hidden" id="uid" name="state-normal" class="form-control" >
                        New Password

                            <input type="password" id="newpassword" name="state-normal" class="form-control" tabindex="0" >

                </form>

								<button type="button" id="updateuser" class="btn btn-effect-ripple btn-primary" onclick="updatepassword();">Update</button>
                                <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Change password

                <form action="#" method="post" class="form-horizontal" onsubmit="return false;">

					<input type="hidden" id="linkuid" name="state-normal" class="form-control" >
                        New Password

                           <select id="linkeid" name="example-select2" class="select-select2" style="width: 100%;" data-placeholder="Choose one..">

						<?php
									foreach($employeeslist as $employees):

										echo "<option value='".$employees['eid']."'>".$employees['fname']." ".$employees['lname']."</option>";
									endforeach;

							?>
							</select>

                </form>

								<button type="button" id="updateuser" class="btn btn-effect-ripple btn-primary" onclick="updatelinkeid();">Update</button>
                                <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button>

SY List

			<button type="button" id="adduser" class="pull-right btn btn-effect-ripple btn-primary" href="#addusermodal" data-toggle="modal">Add School Year</button>
			<?php //print_r($heidirectory);?>

                        School Year
                        HEI Collection Access
                        Delete Status

				<?php

				foreach ($sy_list as $schoolyear):
				//$heiname = strtoupper($hei['instname']);
				echo "
";
				echo "".$schoolyear['school_year']."	";
				echo "";
				if($schoolyear['collection_status']==1){

						echo "Active";
				}else{
						echo "Disabled";
				}
				echo "	";

				echo "";
				if($schoolyear['aydeleted']==1){
						echo "Deleted";
				}else{
						echo "Not Deleted";
				}
				echo "	";

				echo "";

				$yearstr = $schoolyear['school_year'];

					echo "<button class='btn btn-primary notification' title='Enable' id='notification' onClick='enablesy(".$schoolyear['syid'].",\"".$yearstr."\")'></button>";
					echo "<button class='btn btn-default notification' title='Disable' id='notification' onClick='disablesy(".$schoolyear['syid'].")'></button>";
					echo "<button class='btn btn-danger notification' title='Delete' id='notification' onClick='deletesy(".$schoolyear['syid'].")'></button>";

				echo "	";
				echo "
";

				endforeach;

				?>


text:
title: "Basic benchmarking"
author: Jens Petersen
date: Aug 29, 2020
tags: [haskell]
description: Using criterion for simple Haskell benchmarking
---

My first blog post using slick and in a long while...

[Bench](https://hackage.haskell.org/package/bench) is a cool tool written
in Haskell using
the [criterion](https://hackage.haskell.org/package/criterion) for
benchmarking commands in the shell.
(_edit:_ In 2022 you might also consider to use the simpler Haskell
[tasty-bench](https://hackage.haskell.org/package/tasty-bench) library
instead.)

A while back hlint got me [interested](https://github.com/juhp/hs-reverse-sort)
in different ways to do reverse (descending) sort in Haskell,
from a [2016 article](https://ro-che.info/articles/2016-04-02-descending-sort-haskell)
by Roman Cheplyaka.

As I am starting to work on adding
[typed-process](https://hackage.haskell.org/package/typed-process) to
the next major version of
[simple-cmd](https://hackage.haskell.org/package/simple-cmd) and I had
noticed a slowdown while experimenting with `typed-process` in
[rpmbuild-order](https://hackage.haskell.org/package/rpmbuild-order),
I thought I would try to
[measure](https://github.com/juhp/hs-processes-bench) the overhead of
using `typed-process` compared to just `process` for simple command
output.

So this is not really a very fair comparison since `typed-process`
uses heavier machinery like `stm` and `async` to correctly buffer and
pipe input and output, but for short lived commands there is
measureable overhead. I need to experiment more (maybe I should try
ghc profiling too) but I may end up using a hybrid approach of
`process` for simple commands and `typed-process` for more
sophisticated I/O stream handling: for example to fix bugs in the
current piping commands in simple-cmd and also add a `tee` function,
etc. I wonder if there could be any lower hanging fruit that could
improve the performance of `typed-process`? but so far that looks hard
to see.

ps _(added 2022)_ For an example of using tasty-bench, see my tiny
[hs-string-bench](https://github.com/juhp/hs-string-bench) project.


text:
/*
 * Minimalist Object Storage, (C) 2015 Minio, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impliedisk.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package disk

import (
	"fmt"
	"os"
	"path/filepath"
	"strconv"
	"strings"
	"sync"
	"syscall"

	"github.com/minio/minio/pkg/iodine"
	"github.com/minio/minio/pkg/utils/atomic"
)

// Disk container for disk parameters
type Disk struct {
	lock   *sync.Mutex
	path   string
	fsInfo map[string]string
}

// New - instantiate new disk
func New(diskPath string) (Disk, error) {
	if diskPath == "" {
		return Disk{}, iodine.New(InvalidArgument{}, nil)
	}
	st, err := os.Stat(diskPath)
	if err != nil {
		return Disk{}, iodine.New(err, nil)
	}
	if !st.IsDir() {
		return Disk{}, iodine.New(syscall.ENOTDIR, nil)
	}
	s := syscall.Statfs_t{}
	err = syscall.Statfs(diskPath, &s)
	if err != nil {
		return Disk{}, iodine.New(err, nil)
	}
	disk := Disk{
		lock:   &sync.Mutex{},
		path:   diskPath,
		fsInfo: make(map[string]string),
	}
	if fsType := getFSType(s.Type); fsType != "UNKNOWN" {
		disk.fsInfo["FSType"] = fsType
		disk.fsInfo["MountPoint"] = disk.path
		return disk, nil
	}
	return Disk{}, iodine.New(UnsupportedFilesystem{Type: strconv.FormatInt(s.Type, 10)},
		map[string]string{"Type": strconv.FormatInt(s.Type, 10)})
}

// GetPath - get root disk path
func (disk Disk) GetPath() string {
	return disk.path
}

// GetFSInfo - get disk filesystem and its usage information
func (disk Disk) GetFSInfo() map[string]string {
	disk.lock.Lock()
	defer disk.lock.Unlock()

	s := syscall.Statfs_t{}
	err := syscall.Statfs(disk.path, &s)
	if err != nil {
		return nil
	}
	disk.fsInfo["Total"] = formatBytes(s.Bsize * int64(s.Blocks))
	disk.fsInfo["Free"] = formatBytes(s.Bsize * int64(s.Bfree))
	disk.fsInfo["TotalB"] = strconv.FormatInt(s.Bsize*int64(s.Blocks), 10)
	disk.fsInfo["FreeB"] = strconv.FormatInt(s.Bsize*int64(s.Bfree), 10)
	return disk.fsInfo
}

// MakeDir - make a directory inside disk root path
func (disk Disk) MakeDir(dirname string) error {
	disk.lock.Lock()
	defer disk.lock.Unlock()
	return os.MkdirAll(filepath.Join(disk.path, dirname), 0700)
}

// ListDir - list a directory inside disk root path, get only directories
func (disk Disk) ListDir(dirname string) ([]os.FileInfo, error) {
	disk.lock.Lock()
	defer disk.lock.Unlock()

	dir, err := os.Open(filepath.Join(disk.path, dirname))
	if err != nil {
		return nil, iodine.New(err, nil)
	}
	defer dir.Close()
	contents, err := dir.Readdir(-1)
	if err != nil {
		return nil, iodine.New(err, nil)
	}
	var directories []os.FileInfo
	for _, content := range contents {
		// Include only directories, ignore everything else
		if content.IsDir() {
			directories = append(directories, content)
		}
	}
	return directories, nil
}

// ListFiles - list a directory inside disk root path, get only files
func (disk Disk) ListFiles(dirname string) ([]os.FileInfo, error) {
	disk.lock.Lock()
	defer disk.lock.Unlock()

	dir, err := os.Open(filepath.Join(disk.path, dirname))
	if err != nil {
		return nil, iodine.New(err, nil)
	}
	defer dir.Close()
	contents, err := dir.Readdir(-1)
	if err != nil {
		return nil, iodine.New(err, nil)
	}
	var files []os.FileInfo
	for _, content := range contents {
		// Include only regular files, ignore everything else
		if content.Mode().IsRegular() {
			files = append(files, content)
		}
	}
	return files, nil
}

// CreateFile - create a file inside disk root path, replies with custome disk.File which provides atomic writes
func (disk Disk) CreateFile(filename string) (*atomic.File, error) {
	disk.lock.Lock()
	defer disk.lock.Unlock()

	if filename == "" {
		return nil, iodine.New(InvalidArgument{}, nil)
	}

	f, err := atomic.FileCreate(filepath.Join(disk.path, filename))
	if err != nil {
		return nil, iodine.New(err, nil)
	}

	return f, nil
}

// OpenFile - read a file inside disk root path
func (disk Disk) OpenFile(filename string) (*os.File, error) {
	disk.lock.Lock()
	defer disk.lock.Unlock()

	if filename == "" {
		return nil, iodine.New(InvalidArgument{}, nil)
	}
	dataFile, err := os.Open(filepath.Join(disk.path, filename))
	if err != nil {
		return nil, iodine.New(err, nil)
	}
	return dataFile, nil
}

// formatBytes - Convert bytes to human readable string. Like a 2 MB, 64.2 KB, 52 B
func formatBytes(i int64) (result string) {
	switch {
	case i > (1024 * 1024 * 1024 * 1024):
		result = fmt.Sprintf("%.02f TB", float64(i)/1024/1024/1024/1024)
	case i > (1024 * 1024 * 1024):
		result = fmt.Sprintf("%.02f GB", float64(i)/1024/1024/1024)
	case i > (1024 * 1024):
		result = fmt.Sprintf("%.02f MB", float64(i)/1024/1024)
	case i > 1024:
		result = fmt.Sprintf("%.02f KB", float64(i)/1024)
	default:
		result = fmt.Sprintf("%d B", i)
	}
	result = strings.Trim(result, " ")
	return
}


text:
require File.expand_path('../../test_helper', __FILE__)

module SynapsePay
  class APIListTest < ::Test::Unit::TestCase

    context '#new / #initialize' do
      setup do
        @fake_resource = {:data => "fake-data"}
        @list = APIList.new(APIResource, [@fake_resource])
      end

      should 'set the klass' do
        assert_equal(APIResource, @list.klass)
      end

      should 'convert the data to klass instances' do
        assert(@list.first.is_a?(APIResource))
        assert_equal(@fake_resource, @list.first.json)
      end
    end

  end
end


text:
const db = require('./config')
const collection = db.get('prompts')

module.exports = {
  index (req, res) {
    collection.find({}).then(function (prompts) {
      console.log(prompts)
      console.log('returning all prompts')
      res.status(200).json(prompts)
    })
  },
  findById (req, res) {
    collection.find({ '_id': req.params.id }).then(function (record) {
      console.log('returning prompt with id:' + req.params.id)
      res.status(200).send(record)
    })
  }
}