text:
<?xml version="1.0" encoding="UTF-8"?>

MEDROX- methyl salicylate, menthol and capsaicin ointment
Lake Erie Medical DBA Quality Care Products LLC

Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.

Medrox (Medroxin)

DRUG FACTS:

ACTIVE INGREDIENTS

Methyl Salicylate        20.00%

Menthol                            5.00%

Capsaicin                        0.0375%

PURPOSE

Analgesic/Counterirritant

Analgesic/Counterirritant

External Analgesic

USES

Use for the temporary relief of minor aches and muscle pains associated with arthritis, simple backache, strains, muscle soreness and stiffness.

WARNINGS

For external use only. Use only as directed. Avoid contact with eyes and mucous membranes.

Do not cover with bandage.

Do not use on wounds or damaged skin.

KEEP OUT OF REACH OF CHILDREN

Consult physician for children under 12.

DIRECTIONS

Apply product directly to affected area. Product may be used as necessary, but should not be used more than four times per day.

OTHER INGREDIENTS

Deionized Water, Cetyl Alcohol, PEG-150 Distearate, Isopropyl Myristate, Glycerin, Sodium Lauryl Sulfate, Polysorbate-20, Triethanolamine, Acrylates Copolymer, Propylene Glycol, Methyl Paraben, Propyl Paraben, Diazolidinyl Urea, FD and C Blue 1, D and C Yellow 5

Image of Label

MEDROX

methyl salicylate, menthol, capsaicin  ointment

Product Information

Product Type
HUMAN OTC DRUG LABEL
Item Code (Source)
NDC:35356-831(NDC:45861-001)

Route of Administration
TOPICAL
DEA Schedule

Active Ingredient/Active Moiety

Ingredient Name
Basis of Strength
Strength

METHYL SALICYLATE (SALICYLIC ACID)
METHYL SALICYLATE
20 g  in 100 g

MENTHOL (MENTHOL)
MENTHOL
5 g  in 100 g

CAPSAICIN (CAPSAICIN)
CAPSAICIN
0.0375 g  in 100 g

Inactive Ingredients

Ingredient Name
Strength

WATER

CETYL ALCOHOL

PEG-150 DISTEARATE

ISOPROPYL MYRISTATE

GLYCERIN

SODIUM LAURYL SULFATE

POLYSORBATE 20

TROLAMINE

PROPYLENE GLYCOL

METHYLPARABEN

PROPYLPARABEN

DIAZOLIDINYL UREA

FD&C BLUE NO. 1

FD&C YELLOW NO. 5

Packaging

#
Item Code
Package Description
Marketing Start Date
Marketing End Date

1
NDC:35356-831-01
120 g in 1 BOTTLE

Marketing Information

Marketing Category
Application Number or Monograph Citation
Marketing Start Date
Marketing End Date

OTC monograph not final
part348
02/09/2011

Labeler - Lake Erie Medical DBA Quality Care Products LLC
							(831276758)

Establishment

Name
Address
ID/FEI
Business Operations

Lake Erie Medical DBA Quality Care Products LLC

831276758
relabel(35356-831)

Revised: 6/2013

Document Id: 5398edf9-dfb9-4af4-8196-2ea5cab3e9a7

Set id: cfaf5295-e559-4e27-887d-d590670b4e89

Version: 1

Effective Time: 20130610

Lake Erie Medical DBA Quality Care Products LLC


text:
import env from './env'

const defaultConfig = require('../config.default')
let userConfig
try {
  userConfig = require('../config')
} catch (ex) { }

/**
 * Helper used for merging config objects
 */
function recursiveObjectTreeApply(objDefault, objOverride) {
  for (const prop in objOverride) {
    const val = objOverride[prop]
    if (typeof val === 'object' && val) {
      if (val instanceof Array) {
        // TODO: Array merging?
        objDefault[prop] = val
      } else {
        let valDefault = objDefault[prop]
        // Default to empty obj when undefined
        if (valDefault === undefined) {
          objDefault[prop] = valDefault = {}
        }
        recursiveObjectTreeApply(valDefault, val)
      }
    } else {
      objDefault[prop] = val
    }
  }
}

// Layer the config
let config = {}
recursiveObjectTreeApply(config, defaultConfig)
recursiveObjectTreeApply(config, userConfig)
if (env.isTest) {
  // Load test config overrides
  recursiveObjectTreeApply(config, require('../config.test'))
}

export default config

redpajama_set_name: RedPajamaGithub


text:
package printer

import (
	"context"
	"testing"

	"github.com/golang/mock/gomock"

	"github.com/stretchr/testify/require"
	rbacv1 "k8s.io/api/rbac/v1"

	"github.com/vmware-tanzu/octant/internal/testutil"
	"github.com/vmware-tanzu/octant/pkg/view/component"
)

func Test_RoleBindingListHandler(t *testing.T) {
	controller := gomock.NewController(t)
	defer controller.Finish()

	tpo := newTestPrinterOptions(controller)
	printOptions := tpo.ToOptions()

	now := testutil.Time()

	subject := testutil.CreateRoleBindingSubject("User", "test@test.com", "namespace")
	roleBinding := testutil.CreateRoleBinding("read-pods", "pod-reader", []rbacv1.Subject{*subject})
	roleBinding.CreationTimestamp = *testutil.CreateTimestamp()
	roleBindingList := &rbacv1.RoleBindingList{
		Items: []rbacv1.RoleBinding{
			*roleBinding,
		},
	}

	tpo.PathForObject(roleBinding, roleBinding.Name, "/role-binding")
	tpo.PathForGVK(roleBinding.Namespace, rbacAPIVersion, "Role", "pod-reader", "pod-reader", "/role")

	ctx := context.Background()
	tpo.pluginManager.EXPECT().ObjectStatus(ctx, roleBinding)
	observed, err := RoleBindingListHandler(ctx, roleBindingList, printOptions)
	require.NoError(t, err)

	cols := component.NewTableCols("Name", "Age", "Role kind", "Role name")
	expected := component.NewTable("Role Bindings", "We couldn't find any role bindings!", cols)
	expected.Add(component.TableRow{
		"Name": component.NewLink("", roleBinding.Name, "/role-binding",
			genObjectStatus(component.TextStatusOK, []string{
				"rbac.authorization.k8s.io/v1 RoleBinding is OK",
			})),
		"Age":       component.NewTimestamp(now),
		"Role kind": component.NewText("Role"),
		"Role name": component.NewLink("", "pod-reader", "/role"),
		component.GridActionKey: gridActionsFactory([]component.GridAction{
			buildObjectDeleteAction(t, roleBinding),
		}),
	})

	component.AssertEqual(t, expected, observed)
}

func Test_RoleBindingConfiguration(t *testing.T) {
	subject := testutil.CreateRoleBindingSubject("User", "test@test.com", "namespace")
	roleBinding := testutil.CreateRoleBinding("read-pods", "pod-reader", []rbacv1.Subject{*subject})

	cases := []struct {
		name        string
		roleBinding *rbacv1.RoleBinding
		isErr       bool
		expected    *component.Summary
	}{
		{
			name:        "general",
			roleBinding: roleBinding,
			expected: component.NewSummary("Configuration", []component.SummarySection{
				{
					Header:  "Role kind",
					Content: component.NewText("Role"),
				},
				{
					Header:  "Role name",
					Content: component.NewLink("", "pod-reader", "/role"),
				},
			}...),
		},
		{
			name:        "rolebinding is nil",
			roleBinding: nil,
			isErr:       true,
		},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			controller := gomock.NewController(t)
			defer controller.Finish()

			tpo := newTestPrinterOptions(controller)
			printOptions := tpo.ToOptions()

			tpo.PathForGVK("namespace", rbacAPIVersion, "Role", "pod-reader", "pod-reader", "/role")

			ctx := context.Background()

			rc := NewRoleBindingConfiguration(tc.roleBinding)

			summary, err := rc.Create(ctx, printOptions)
			if tc.isErr {
				require.Error(t, err)
				return
			}
			require.NoError(t, err)
			component.AssertEqual(t, tc.expected, summary)
		})
	}
}

func Test_createRoleBindingSubjectsView(t *testing.T) {
	cases := []struct {
		name     string
		subject  *rbacv1.Subject
		expected component.TableRow
	}{
		{
			name:    "User",
			subject: testutil.CreateRoleBindingSubject("User", "test@test.com", "namespace"),
			expected: component.TableRow{
				"Kind":      component.NewText("User"),
				"Name":      component.NewText("test@test.com"),
				"Namespace": component.NewText("namespace"),
			},
		},
		{
			name:    "Service Account",
			subject: testutil.CreateRoleBindingSubject("ServiceAccount", "svc-auto", "namespace"),
			expected: component.TableRow{
				"Kind":      component.NewText("ServiceAccount"),
				"Name":      component.NewLink("", "serviceAccount", "/service-account"),
				"Namespace": component.NewText("namespace"),
			},
		},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			controller := gomock.NewController(t)
			defer controller.Finish()

			tpo := newTestPrinterOptions(controller)
			printOptions := tpo.ToOptions()

			roleBinding := testutil.CreateRoleBinding("read-pods", "pod-reader", []rbacv1.Subject{*tc.subject})

			if tc.subject != nil {
				serviceAccountLink := component.NewLink("", "serviceAccount", "/service-account")
				tpo.link.EXPECT().
					ForGVK(gomock.Any(), "v1", "ServiceAccount", gomock.Any(), gomock.Any()).
					Return(serviceAccountLink, nil).
					AnyTimes()
			}

			ctx := context.Background()
			observed, err := createRoleBindingSubjectsView(ctx, roleBinding, printOptions)
			require.NoError(t, err)

			expected := component.NewTableWithRows("Subjects", "There are no subjects!",
				component.NewTableCols("Kind", "Name", "Namespace"),
				[]component.TableRow{tc.expected})

			component.AssertEqual(t, expected, observed)
		})
	}
}


text:
'use strict';

module.exports = function(context) {
	var depth = 0;
	var limit = context.options[0] && context.options[0].limit;
	if ( !isFinite( limit ) ) {
		limit = 2;
	}
	return {
		"FunctionDeclaration": function(node) {
			depth++;
        },
		"FunctionDeclaration:exit": function(node) {
			if ( depth > limit ) {
				context.report(node, 'closure depth exceeded limit of ' + limit);
			}
			depth--;
		}
    };
};

module.exports.schema = [
	{
		"type": "object",
		"properties": {
			"limit": {
				"type": "number"
			}
		},
		"additionalProperties": false
	}
];


text:
class Casting < ActiveRecord::Base
  belongs_to :castable, polymorphic: true
  belongs_to :person
end


text:
namespace UGC {

class UGTopoFile;

class TOPOLOGY_API UGTopoBuild
{

public:
	UGTopoBuild();
	UGTopoBuild(UGDatasetVector *pDataset);
	virtual ~UGTopoBuild();

public:

	void SetInterval(UGdouble dInterval);
	UGdouble GetInterval();
	UGbool LineDTIntersect(UGDatasetVector *pDatasetArc, UGint nApartIndex);
	UGbool LineDTClearRepeateLine(UGDatasetVector *pDatasetArc, UGint nApartIndex);
	UGbool TopoBuildPolygon(UGDatasetVector *pDatasetArc, UGArray<UGGeoRegion*> &arrRegions);

	//! \brief»¡¶ÎÇó½»
	UGbool TopoEditIntersectAllLine(UGDatasetVector *pDatasetArc,
		UGbool IsAbandonMinLine = false,UGdouble dMinLineLength = 0);

	//! \brief³¤ÐüÏßÑÓÉì
	UGbool TopoEditLongDangleLineExtend(UGDatasetVector *pDatasetArc);

	//! \briefºÏ²¢¼Ù½Úµã
	UGbool TopoEditMergePseudoNode(UGDatasetVector *pDatasetArc);

	//! \briefÁÙ½ü½ÚµãºÏ²¢
	UGbool TopoEditMergeCloseNode(UGDatasetVector *pDatasetArc);

	//! \briefÈ¥³ýÐüÏß
	UGbool TopoEditClearSmallDangleLine(UGDatasetVector *pDatasetArc);

	//! \briefÈ¥³ýÖظ´Ïß
	UGbool TopoEditClearRepeatedLine(UGDatasetVector *pDatasetArc);

	//! \brief	È¥³ýÈßÓàµã
	UGbool TopoEditClearRedundanceVertex(UGDatasetVector *pDatasetArc);

	//! \brief	ÍØÆ˹¹Ãæ
	//! \param	pDatasetArc			ÏßÊý¾Ý¼¯
	//! \param	pDatasetPoly		±»´´½¨µÄÃæÊý¾Ý¼¯
	//! \param	pDatasetPolyTmp		±»´´½¨µÄÁÙʱÃæÊý¾Ý¼¯
	//! \param	IsAddBoundPolygon	ÊÇ·ñÌí¼Ó±ß½ç¶à±ßÐÎ
	//! \remark	pDatasetPolyTmpÓÉÓû§ÁÙʱ´´½¨,ÓÃÍêºó,ÓÉÓû§¸ºÔðɾ³ý!
	UGbool TopoBuildPolygon(UGDatasetVector *pDatasetArc,
		UGDatasetVector *pDatasetPoly,
		UGDatasetVector *pDatasetPolyTmp,
		UGbool IsAddBoundPolygon = false);

	//! brief	ÍØÆ˹¹Ãæ
	//! \param	pDatasetArc			ÏßÊý¾Ý¼¯
	//! \param	pDatasetPoly		±»´´½¨µÄÃæÊý¾Ý¼¯
	//! \param	pDatasetPolyTmp		±»´´½¨µÄÁÙʱÃæÊý¾Ý¼¯
	//! \param	IsAddBoundPolygon
	//! \remark	pDatasetPolyTmpÓÉÓû§ÁÙʱ´´½¨,ÓÃÍêºó,ÓÉÓû§¸ºÔðɾ³ý!
	UGbool TopoBuildHatchPolygon(UGRecordset *pArcRecordset,const UGPoint2D& pntHit,
								UGGeoRegion& HitRegion);

	//! \brief	Éú³ÉÍØÆË´íÎóÐÅÏ¢
	UGbool TopoEditCreateTopoErrorInfo(UGDatasetVector *pDatasetArc);

	//! brief	´´½¨ÍøÂçÊý¾Ý¼¯
	//! \param pDatasetArc			ÏßÊý¾Ý¼¯
	//! \param	pDatasetNode		½ÚµãÊý¾Ý¼¯
	//! \param	pDatasetNet			±»´´½¨µÄÍøÂçÊý¾Ý¼¯
	UGbool TopoBuildNetwork(UGDatasetVector *pDatasetArc,UGDatasetVector *pDatasetNode,
		UGDatasetVector *pDatasetNet);

	//! \brief ·Ö½â¸´ºÏ¶ÔÏó
	UGbool TopoSeparateComplex(UGDatasetVector *pDatasetArc);

	UGbool SetFilterElement(UGDatasetVector *pDatasetFilter,const UGString& strEdgeFilter,const UGdouble& dNodeInterval);

	void CancelNodeFilter();
	//UGbool MarkUpCommonLine(UGRect2D& rcBounds, UGRecordset* pRecordset, UGbyte* pWeight, UGArray<UGint>& arrIDs);
	UGbool MarkUpCommonLine(UGRect2D& rcBounds, UGRecordset* pRecordset, UGTopoGrid* pWeight, UGArray<UGint>& arrIDs);

	UGbool TopoEditExtendDangleLine(UGbool IsShowProgress, UGDatasetVector *pDatasetArc, UGdouble ExtendedLength,
									UGbool IsOutToLogFile);

	UGbool TopoBuildPolygonEx(UGDatasetVector *pDatasetArc, UGArray<UGGeoRegion*> &arrRegion);

	// ºÏ²¢¡¢¹â»¬µÈÖµÏß
	UGbool TopoSmoothAfterMerge(UGDatasetVector *pDatasetArc, UGString& strElev, UGint nSmoothDegree);

protected:

	UGbool GetIntersectPnt(UGRect2D &rectBounds,UGRecordset* &partRecordset,
							UGArray<UGTopoGridUnitNodesEx>&pArcIntersetPntNo,
							UGint &RealArcCount,UGArray<UGint> &fieldIndexs,
							UGArray<UGPoint2D>&pIntersetPoints,UGArray<UGint> &ArcIDs);

	UGint GetArcIDIndex(UGint nArcId,UGArray<UGint> &ArcIds);

	UGbool TopoBuildPolygonFile(UGDatasetVector *pDatasetArc,
		UGDatasetVector * &pDatasetPoly,
		UGDatasetVector * &pDatasetPolyTmp,
		UGbool IsAddBoundPolygon);

	UGbool TopoBuildPolygonArray(UGDatasetVector *pDatasetArc,
		UGDatasetVector * &pDatasetPoly,
		UGDatasetVector * &pDatasetPolyTmp,
		UGbool IsAddBoundPolygon,
		UGint ArcsCount);

	UGbool ComposeRegion(UGGeoRegion &geoRegion, UGRecordset *pRecordsetArc,
		UGint *pPolyArcs,UGint nArcCount);
	UGbool ComposeRegion(UGGeoRegion*& pgeoRegion, UGRecordset *pRecordsetArc,
		UGint *pPolyArcs, UGint nArcCount,UGArray<UGint> &arrIDs);

	UGbool TopoEditNodesIdentify(UGDatasetVector *pDatasetArc,
		UGTopoFile **pFileNodeIndex,
		UGTopoFile **pFileNodeArcs,
		UGint& IndexNodesCount,
		UGTopoFile **pFileNodeFrom = NULL,
		UGTopoFile **pFileNodeTo = NULL,
		UGTopoFile **pFileNodeFromNext = NULL,
		UGTopoFile **pFileNodeToPrev = NULL,
		UGTopoFile **pFileArcNodeIDFrom = NULL,
		UGTopoFile **pFileArcNodeIDTo = NULL,
		UGbool bIsReturnNodePoints = false);

	UGbool TopoEditNodeID(UGDatasetVector *pDatasets,
		UGArray<TNodeIndexPN> &pNodeIndex,
		UGint **pNodeArcs,
		UGint  &IndexNodesCount,
		UGint **pArcNodeIDFrom,
		UGint **pArcNodeIDTo);

	UGbool TopoEditNodesIdentifyEx(UGDatasetVector *pDatasetArc,
		UGTopoFile **pFileNodeIndex,
		UGTopoFile **pFileNodeArcs,
		UGint& IndexNodesCount,
		UGTopoFile **pFileArcNodeIDFrom,
		UGTopoFile **pFileArcNodeIDTo	);

	void RemoveErrorArc(UGTopoFile **pFileNodeIndex,
		UGTopoFile **pFileNodeArcs,
		UGTopoFile **pFileArcNodeIDFrom,
		UGTopoFile **pFileArcNodeIDTo,
		UGint **pArcsLCode,
		UGint **pArcsRCode,
		UGint ArcNo);

	void RemoveErrorArcEx(UGArray<TNodeIndexPN> &pNodeIndex,
		UGint **pArcIndex,
		UGint **pArcNodeFromID,
		UGint **pArcNodeToID,
		UGint **pArcsLCode,
		UGint **pArcsRCode,
		UGint ArcNo);

	UGint IntersectLineSect(UGPoint2D &pntStart1, UGPoint2D &pntEnd1,
		UGPoint2D &pntStart2, UGPoint2D &pntEnd2,
		UGPoint2D &pntResult1, UGPoint2D &pntResult2);

	void InitTopoFile(UGTopoFile **pTopoFile, UGint ArcsCount, UGuint nRecordSize,
		UGuint nRecordsCount);

	void ReleaseTopoFile(UGTopoFile **pTopoFile);

public:

	UGdouble dMinDangleLength;
	UGdouble dMinVertexInterval;
	UGdouble dMinNodeInterval;
	UGdouble dMinArea;
	UGdouble dExtendedLength;
	UGdouble dMinRatioOfAreaToPerimeter;

private:
	UGint FindInsetPos(UGint nID,UGint* arrIDs,UGint nCount);
	UGbool TopoBuildHatchPolygon(UGDatasetVector *pDatasetArc, const UGPoint2D& pntLabel,
								UGGeoRegion &geoRegion);
	UGbool GetHatchNodeID(UGDatasetVector *pDatasetArc,UGTopoGridUnitNodes *&pGridUnitNodes,
						UGTopoFile *&pFileNode,UGPoint2D* &pFPoints,UGPoint2D* &pTPoints);

	UGbool GetHatchHead(UGDatasetVector *pDatasetArc,UGPoint2D pntLabel,
						UGArray<THatchHead&> &arrHatchHead);

	UGint TopoBuildHatchPolygon(UGDatasetVector *pDatasetArc, UGPoint2D pntLabel);

	void TopoPreprocess(UGDatasetVector *pDatasetArc);

	UGbool IsTopoLineValid(UGGeoLine*& pSingleLine);

	UGbool bIsPreProcess;

	UGbool GetNodeXYFromDT();
	UGbool IsFilterNode(const UGPoint2D &pntIntersect);

	UGbool GetApartIntersectPnt(UGRect2D &rectBounds, UGint nApartIndex,
								UGRecordset * &partRecordset,
								UGArray<UGTopoGridUnitNodesEx> &pArcIntersetPntNo,
								UGArray<UGPoint2D> &pIntersetPoints,
								UGArray<UGint>& arrIDs);

	UGDatasetVector* m_pDatasetFilter;
	UGString m_strEdgeFilter;
	UGdouble m_dNodeInterval;
	UGbool m_bNodeFilter;
	UGPoint2Ds m_NodeXY;
	UGdouble m_dInterval;
};

}

#endif


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrueCraft.API;

namespace TrueCraft.Core.TerrainGen.Noise
{
    public class CellNoise : NoiseGen
    {
        public int Seed { get; set; }
        public DistanceType DistanceFunction { get; set; }
        public CombinationFunctions CombinationFunction { get; set; }

        public CellNoise() : this(new Random().Next())
        {
        }

        public CellNoise(int seed)
        {
            Seed = seed;
            DistanceFunction = DistanceType.EUCLIDEAN3D;
            CombinationFunction = CombinationFunctions.D2MINUSD1;
        }

        public override double Value2D(double X, double Y)
        {
            double[] Distances = new double[3];
            //Declare some values for later use
            uint lastRandom, numberFeaturePoints;
            Vector3 randomDiff, featurePoint;
            int cubeX, cubeY;
            //Initialize values in distance array to large values
            for (int i = 0; i < Distances.Length; i++)
                Distances[i] = 6666;
            //1. Determine which cube the evaluation point is in
            int evalCubeX = Floor(X);
            int evalCubeY = Floor(Y);
            for (int i = -1; i < 2; ++i)
            {
                for (int j = -1; j < 2; ++j)
                {
                    cubeX = evalCubeX + i;
                    cubeY = evalCubeY + j;
                    //2. Generate a reproducible random number generator for the cube
                    lastRandom = lcgRandom(hash2d((uint)(cubeX + Seed), (uint)(cubeY)));
                    //3. Determine how many feature points are in the cube
                    numberFeaturePoints = probLookup(lastRandom);
                    //4. Randomly place the feature points in the cube
                    for (uint l = 0; l < numberFeaturePoints; ++l)
                    {
                        lastRandom = lcgRandom(lastRandom);
                        randomDiff.X = lastRandom / 0x100000000;
                        lastRandom = lcgRandom(lastRandom);
                        randomDiff.Y = lastRandom / 0x100000000;
                        lastRandom = lcgRandom(lastRandom);
                        randomDiff.Z = lastRandom / 0x100000000;
                        featurePoint = new Vector3(randomDiff.X + cubeX, randomDiff.Y + cubeY, 0);
                        //5. Find the feature point closest to the evaluation point.
                        //This is done by inserting the distances to the feature points into a sorted list
                        insert(Distances, Distance(new Vector3(X, Y, 0), featurePoint));
                    }
                }
            }
            return Combine(Distances);
        }

        /// <summary>
        /// Generates 3D Cell Noise
        /// </summary>
        /// <returns>The color worley noise returns at the input position</returns>
        public override double Value3D(double X, double Y, double Z)
        {
            double[] Distances = new double[3];
            //Declare some values for later use
            uint lastRandom, numberFeaturePoints;
            Vector3 randomDiff, featurePoint;
            int cubeX, cubeY, cubeZ;
            //Initialize values in distance array to large values
            for (int i = 0; i < Distances.Length; i++)
                Distances[i] = 6666;
            //1. Determine which cube the evaluation point is in
            int evalCubeX = Floor(X);
            int evalCubeY = Floor(Y);
            int evalCubeZ = Floor(Z);
            for (int i = -1; i < 2; ++i)
            {
                for (int j = -1; j < 2; ++j)
                {
                    for (int k = -1; k < 2; ++k)
                    {
                        cubeX = evalCubeX + i;
                        cubeY = evalCubeY + j;
                        cubeZ = evalCubeZ + k;
                        //2. Generate a reproducible random number generator for the cube
                        lastRandom = lcgRandom(hash((uint)(cubeX + Seed), (uint)(cubeY), (uint)(cubeZ)));
                        //3. Determine how many feature points are in the cube
                        numberFeaturePoints = probLookup(lastRandom);
                        //4. Randomly place the feature points in the cube
                        for (uint l = 0; l < numberFeaturePoints; ++l)
                        {
                            lastRandom = lcgRandom(lastRandom);
                            randomDiff.X = lastRandom / 0x100000000;
                            lastRandom = lcgRandom(lastRandom);
                            randomDiff.Y = lastRandom / 0x100000000;
                            lastRandom = lcgRandom(lastRandom);
                            randomDiff.Z = lastRandom / 0x100000000;
                            featurePoint = new Vector3(randomDiff.X + cubeX, randomDiff.Y + cubeY, randomDiff.Z + cubeZ);
                            //5. Find the feature point closest to the evaluation point.
                            //This is done by inserting the distances to the feature points into a sorted list
                            insert(Distances, Distance(new Vector3(X, Y, Z), featurePoint));
                        }
                        //6. Check the neighboring cubes to ensure their are no closer evaluation points.
                        // This is done by repeating steps 1 through 5 above for each neighboring cube
                    }
                }
            }
            return Combine(Distances);
        }

        private double Combine(double[] Array)
        {
            switch (CombinationFunction)
            {
                case CombinationFunctions.D1:
                    return Array[0];
                case CombinationFunctions.D2MINUSD1:
                    return Array[1] - Array[0];
                case CombinationFunctions.D3MINUSD1:
                    return Array[2] - Array[0];
                default:
                    return Array[0];
            }
        }

        private float Distance(Vector3 p1, Vector3 p2)
        {
            switch (DistanceFunction)
            {
                case DistanceType.EUCLIDEAN2D:
                    return (float)EuclidianDistance2D(p1, p2);
                case DistanceType.EUCLIDEAN3D:
                    return (float)EuclidianDistance3D(p1, p2);
                case DistanceType.CHEBYSHEV2D:
                    return (float)ChebyshevDistance2D(p1, p2);
                case DistanceType.CHEBYSHEV3D:
                    return (float)ChebyshevDistance3D(p1, p2);
                case DistanceType.MANHATTAN2D:
                    return (float)ManhattanDistance2D(p1, p2);
                case DistanceType.MANHATTAN3D:
                    return (float)ManhattanDistance3D(p1, p2);
                default:
                    return (float)EuclidianDistance3D(p1, p2);
            }
        }

        private double EuclidianDistance2D(Vector3 p1, Vector3 p2)
        {
            return (p1.X - p2.X) * (p1.X - p2.X) + (p1.Y - p2.Y) * (p1.Y - p2.Y);
        }

        private double EuclidianDistance3D(Vector3 p1, Vector3 p2)
        {
            return (p1.X - p2.X) * (p1.X - p2.X) + (p1.Y - p2.Y) * (p1.Y - p2.Y) + (p1.Z - p2.Z) * (p1.Z - p2.Z);
        }

        private double ManhattanDistance2D(Vector3 p1, Vector3 p2)
        {
            return Math.Abs(p1.X - p2.X) + Math.Abs(p1.Y - p2.Y);
        }

        private double ManhattanDistance3D(Vector3 p1, Vector3 p2)
        {
            return Math.Abs(p1.X - p2.X) + Math.Abs(p1.Y - p2.Y) + Math.Abs(p1.Z - p2.Z);
        }

        private double ChebyshevDistance2D(Vector3 p1, Vector3 p2)
        {
            Vector3 diff = p1 - p2;
            return Math.Max(Math.Abs(diff.X), Math.Abs(diff.Y));
        }

        private double ChebyshevDistance3D(Vector3 p1, Vector3 p2)
        {
            Vector3 diff = p1 - p2;
            return Math.Max(Math.Max(Math.Abs(diff.X), Math.Abs(diff.Y)), Math.Abs(diff.Z));
        }
        /// <summary>
        /// Given a uniformly distributed random number this function returns the number of feature points in a given cube.
        /// </summary>
        /// <param name="value">a uniformly distributed random number</param>
        /// <returns>The number of feature points in a cube.</returns>
        // Generated using mathmatica with "AccountingForm[N[Table[CDF[PoissonDistribution[4], i], {i, 1, 9}], 20]*2^32]"
        private static uint probLookup(uint value)
        {
            if (value < 393325350)
                return 1;
            if (value < 1022645910)
                return 2;
            if (value < 1861739990)
                return 3;
            if (value < 2700834071)
                return 4;
            if (value < 3372109335)
                return 5;
            if (value < 3819626178)
                return 6;
            if (value < 4075350088)
                return 7;
            if (value < 4203212043)
                return 8;
            return 9;
        }
        /// <summary>
        /// Inserts value into array using insertion sort. If the value is greater than the largest value in the array
        /// it will not be added to the array.
        /// </summary>
        /// <param name="arr">The array to insert the value into.</param>
        /// <param name="value">The value to insert into the array.</param>
        private static void insert(double[] arr, double value)
        {
            double temp;
            for (int i = arr.Length - 1; i >= 0; i--)
            {
                if (value > arr[i])
                    break;
                temp = arr[i];
                arr[i] = value;
                if (i + 1 < arr.Length)
                    arr[i + 1] = temp;
            }
        }
        /// <summary>
        /// LCG Random Number Generator.
        /// LCG: http://en.wikipedia.org/wiki/Linear_congruential_generator
        /// </summary>
        /// <param name="lastValue">The last value calculated by the lcg or a seed</param>
        /// <returns>A new random number</returns>
        private static uint lcgRandom(uint lastValue)
        {
            return (uint)((1103515245u * lastValue + 12345u) % 0x100000000u);
        }
        /// <summary>
        /// Constant used in FNV hash function.
        /// FNV hash: http://isthe.com/chongo/tech/comp/fnv/#FNV-source
        /// </summary>
        private const uint OFFSET_BASIS = 2166136261;
        /// <summary>
        /// Constant used in FNV hash function
        /// FNV hash: http://isthe.com/chongo/tech/comp/fnv/#FNV-source
        /// </summary>
        private const uint FNV_PRIME = 16777619;
        /// <summary>
        /// Hashes three integers into a single integer using FNV hash.
        /// FNV hash: http://isthe.com/chongo/tech/comp/fnv/#FNV-source
        /// </summary>
        /// <returns>hash value</returns>
        private static uint hash(uint i, uint j, uint k)
        {
            return (uint)((((((OFFSET_BASIS ^ (uint)i) * FNV_PRIME) ^ (uint)j) * FNV_PRIME) ^ (uint)k) * FNV_PRIME);
        }
        /// <summary>
        /// Hashes three integers into a single integer using FNV hash.
        /// FNV hash: http://isthe.com/chongo/tech/comp/fnv/#FNV-source
        /// </summary>
        /// <returns>hash value</returns>
        private static uint hash2d(uint i, uint j)
        {
            return (uint)((((OFFSET_BASIS ^ (uint)i) * FNV_PRIME) ^ (uint)j) * FNV_PRIME);
        }
    }

    public enum CombinationFunctions
    {
        D1,
        D2MINUSD1,
        D3MINUSD1
    }

    public enum DistanceType
    {
        EUCLIDEAN3D,
        EUCLIDEAN2D,
        MANHATTAN3D,
        MANHATTAN2D,
        CHEBYSHEV3D,
        CHEBYSHEV2D
    }
}


text:
layout: default
id: 01-01-2011-Guzzetta-Giorgio
name: Giorgio
surname: Guzzetta
university: University of Trento
advisor: Furlanello Cesare
year: 2011
title: A new computational approach to the integrated modeling of infectious diseases
---


text:
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.

[travis]: http://travis-ci.org/sferik/rails_admin
[gemnasium]: https://gemnasium.com/sferik/rails_admin
[pledgie]: http://www.pledgie.com/campaigns/15917

It started as a port of [MerbAdmin][merb-admin] to Rails 3 and was implemented
as a [Ruby Summer of Code project][rubysoc] by [Bogdan Gaza][hurrycane] with
mentors [Erik Michaels-Ober][sferik], [Yehuda Katz][wycats], [Luke van der
Hoeven][plukevdh], and [Rein Henrichs][reinh].

[merb-admin]: https://github.com/sferik/merb-admin
[rubysoc]: http://www.rubysoc.org/projects
[hurrycane]: https://github.com/hurrycane
[sferik]: https://github.com/sferik
[wycats]: https://github.com/wycats
[plukevdh]: https://github.com/plukevdh
[reinh]: https://github.com/reinh

## Features

* Display database tables
* Create new data
* Easily update data
* Safely delete data
* Custom actions
* Automatic form validation
* Search and filtering
* Export data to CSV/JSON/XML
* Authentication (via [Devise](https://github.com/plataformatec/devise))
* Authorization (via [Cancan](https://github.com/ryanb/cancan))
* User action history (internally or via [PaperTrail](https://github.com/airblade/paper_trail))
* Supported ORMs
  * ActiveRecord
  * Mongoid [new]

## Demo

Take RailsAdmin for a [test drive][demo] with sample data. ([Source code.][dummy_app])

[demo]: http://rails-admin-tb.herokuapp.com/
[dummy_app]: https://github.com/bbenezech/dummy_app

## Installation
In your `Gemfile`, add the following dependencies:

    gem 'fastercsv' # Only required on Ruby 1.8 and below
    gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'

Run:

    $ bundle install

And then run:

    $ rails g rails_admin:install

This generator will install RailsAdmin and [Devise](https://github.com/plataformatec/devise) if you
don't already have it installed. [Devise](https://github.com/plataformatec/devise) is strongly
recommended to protect your data from anonymous users.
It will modify your `config/routes.rb`, adding:

```ruby
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin' # Feel free to change '/admin' to any namespace you need.
```

It will also add an intializer that will help you getting started. (head for config/initializers/rails_admin.rb)

Optionally, you may wish to set up [Cancan](https://github.com/ryanb/cancan),
[PaperTrail](https://github.com/airblade/paper_trail), [CKeditor](https://github.com/galetahub/ckeditor)

More on that in the [Wiki](https://github.com/sferik/rails_admin/wiki)

## Usage
Start the server:

    $ rails server

You should now be able to administer your site at
[http://localhost:3000/admin](http://localhost:3000/admin).

## Configuration

All configuration documentation has moved to the wiki: https://github.com/sferik/rails_admin/wiki

## Support
Please see [list of known issues](https://github.com/sferik/rails_admin/wiki/Known-issues) first.

If you have a question, please check this README, the wiki, and the list of known issues.

If you still have a question, you can ask the [official RailsAdmin mailing
list](http://groups.google.com/group/rails_admin) or ping sferik on IRC in
[#railsadmin on
irc.freenode.net](http://webchat.freenode.net/?channels=railsadmin).

If you think you found a bug in RailsAdmin, you can [submit an
issue](https://github.com/sferik/rails_admin#issues).
No feature requests or questions please (the mailing list is
active and is the preferred venue for feature requests and questions).

## Contributing
In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html),
**everyone** is encouraged to help improve this project.

Here are some ways *you* can contribute:

* by using alpha, beta, and prerelease versions
* by reporting bugs
* by suggesting new features
* by [translating to a new language](https://github.com/sferik/rails_admin/wiki/Translations)
* by writing or editing documentation
* by writing specifications
* by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
* by refactoring code
* by resolving [issues](https://github.com/sferik/rails_admin/issues)
* by reviewing patches
* [financially](http://pledgie.com/campaigns/15917)

## Submitting an Issue
We use the [GitHub issue tracker](https://github.com/sferik/rails_admin/issues) to track bugs and
features. Before submitting a bug report or feature request, please check to make sure it hasn't already
been submitted. You can indicate support for an existing issue by voting it up. When submitting a
bug report, please include a [Gist](https://gist.github.com/) that includes a stack trace and any
details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
operating system. Ideally, a bug report should include a pull request with failing specs.

## Submitting a Pull Request
1. Fork the project.
2. Create a topic branch.
3. Implement your feature or bug fix.  *NOTE* - there's a small test app located in the
spec/dummy_app directory that you can use to experiment with rails_admin.
4. Add documentation for your feature or bug fix.
5. Run `bundle exec rake doc:yard`. If your changes are not 100% documented, go back to step 4.
6. Add specs for your feature or bug fix.
7. Run `bundle exec rake spec`. If your changes are not 100% covered, go back to step 6.
8. Commit and push your changes.
9. Submit a pull request. Please do not include changes to the gemspec, version, or history file.
(If you want to create your own version for some reason, please do so in a separate commit.)

## Supported Ruby Versions
This library aims to support and is [tested against][travis] the following Ruby implementations:

* Ruby 1.8.7
* Ruby 1.9.2
* Ruby 1.9.3
* [Rubinius][]
* [Ruby Enterprise Edition][ree]
* [JRuby][jruby]

[rubinius]: http://rubini.us/
[ree]: http://www.rubyenterpriseedition.com/
[jruby]:http://jruby.org/

## Screenshots
![Dashboard view](https://github.com/sferik/rails_admin/raw/master/screenshots/dashboard.png "dashboard view")
![Delete view](https://github.com/sferik/rails_admin/raw/master/screenshots/delete.png "delete view")
![List view](https://github.com/sferik/rails_admin/raw/master/screenshots/list.png "list view")
![Nested view](https://github.com/sferik/rails_admin/raw/master/screenshots/nested.png "nested view")
![Polymophic edit view](https://github.com/sferik/rails_admin/raw/master/screenshots/polymorphic.png "polymorphic view")


text:
#pragma once

namespace libgearman {
namespace protocol {

  gearman_return_t work_exception(gearman_universal_st& universal,
                                  gearman_packet_st& message,
                                  const gearman_string_t &handle,
                                  const gearman_string_t &exception);

} // namespace protocol
} // namespace libgearman


text:
"""
    OVERALL CREDIT TO:
        t0mm0, Eldorado, VOINAGE, BSTRDMKR, tknorris, smokdpi, TheHighway

    urlresolver XBMC Addon
    Copyright (C) 2011 t0mm0

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

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

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
from __generic_resolver__ import GenericResolver

class vidhosResolver(GenericResolver):
    name = "vidhos"
    domains = ['vidhos.com']
    pattern = '(?://|\.)(vidhos.com)/(?:embed-)?([a-zA-Z0-9]+)'