region Prepare parameters
550571
protected Map<String, String> prepareRequiredParameters(final FunctionTemplate template,
                                                            final BindingTemplate bindingTemplate)
        throws MojoFailureException {
        info("");
        info(PREPARE_PARAMS);

        prepareFunctionName();

        preparePackageName();

        final Map<String, String> params = new HashMap<>();
        params.put("functionName", getFunctionName());
        params.put("className", getClassName());
        params.put("packageName", getFunctionPackageName());

        prepareTemplateParameters(template, bindingTemplate, params);

        displayParameters(params);

        return params;
    }
414772
public function PrepareTheDefaultParametersForGeneration() {
        $this->params = array(
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::NameSpaceKey => null,
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::ClassNameKey => null,
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::DestinationDirKey => null,
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::ClassDescriptionKey => null,
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::CultureKey => null,
            \Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::ClassDerivation => null,
            \Puzzlout\Framework\GeneratorEngine\Core\ConstantsClassGeneratorBase::DoGenerateConstantKeysKey => true,
            \Puzzlout\Framework\GeneratorEngine\Core\ConstantsClassGeneratorBase::DoGenerateGetListMethodKey => true,
        );
    }
1372242
protected void prepareDraw() {
    VertexAttribArrayState previousNio = null;
    int previousElementSize = 0;

    if (useNioBuffer == 0 && enabledArrays == previouslyEnabledArrays) {
      return;
    }

    for(int i = 0; i < VERTEX_ATTRIB_ARRAY_COUNT; i++) {
      int mask = 1 << i;
      int enabled = enabledArrays & mask;
      if (enabled != (previouslyEnabledArrays & mask)) {
        if (enabled != 0) {
          gl.enableVertexAttribArray(i);
        } else {
          gl.disableVertexAttribArray(i);
        }
      }
      if (enabled != 0 && (useNioBuffer & mask) != 0) {
        VertexAttribArrayState data = vertexAttribArrayState[i];
        if (previousNio != null && previousNio.nioBuffer == data.nioBuffer &&
            previousNio.nioBufferLimit >= data.nioBufferLimit) {
          if (boundArrayBuffer != previousNio.webGlBuffer) {
            gl.bindBuffer(ARRAY_BUFFER, previousNio.webGlBuffer);
            boundArrayBuffer = data.webGlBuffer;
          }
          gl.vertexAttribPointer(i, data.size, data.type, data.normalize, data.stride,
                                 data.nioBufferPosition * previousElementSize);
        } else {
          if (boundArrayBuffer != data.webGlBuffer) {
            gl.bindBuffer(ARRAY_BUFFER, data.webGlBuffer);
            boundArrayBuffer = data.webGlBuffer;
          }
          int elementSize = getElementSize(data.nioBuffer);
          int savePosition = data.nioBuffer.position();
          if (data.nioBufferPosition * elementSize < data.stride) {
            data.nioBuffer.position(0);
            gl.bufferData(ARRAY_BUFFER, getTypedArray(data.nioBuffer, data.type, data.nioBufferLimit *
                                                      elementSize), STREAM_DRAW);
            gl.vertexAttribPointer(i, data.size, data.type, data.normalize, data.stride,
                                   data.nioBufferPosition * elementSize);
            previousNio = data;
            previousElementSize = elementSize;
          } else {
            data.nioBuffer.position(data.nioBufferPosition);
            gl.bufferData(ARRAY_BUFFER, getTypedArray(data.nioBuffer, data.type,
                                                      (data.nioBufferLimit - data.nioBufferPosition) *
                                                      elementSize), STREAM_DRAW);
            gl.vertexAttribPointer(i, data.size, data.type, data.normalize, data.stride, 0);
          }
          data.nioBuffer.position(savePosition);
        }
      }
    }
    previouslyEnabledArrays = enabledArrays;
  }
222508
public static GeneralParameterValue[] createGridGeometryGeneralParameter( RegionMap regionMap,
            CoordinateReferenceSystem crs ) {
        GeneralParameterValue[] readParams = new GeneralParameterValue[1];
        Parameter<GridGeometry2D> readGG = new Parameter<GridGeometry2D>(AbstractGridFormat.READ_GRIDGEOMETRY2D);
        GridEnvelope2D gridEnvelope = new GridEnvelope2D(0, 0, regionMap.getCols(), regionMap.getRows());
        Envelope env;
        double north = regionMap.getNorth();
        double south = regionMap.getSouth();
        double east = regionMap.getEast();
        double west = regionMap.getWest();
        if (crs != null) {
            env = new ReferencedEnvelope(west, east, south, north, crs);
        } else {
            DirectPosition2D minDp = new DirectPosition2D(west, south);
            DirectPosition2D maxDp = new DirectPosition2D(east, north);
            env = new Envelope2D(minDp, maxDp);
        }
        readGG.setValue(new GridGeometry2D(gridEnvelope, env));
        readParams[0] = readGG;
        return readParams;
    }
242057
private void prepareFFTTables()
	{
		int n2 = ss2;
		int nu1 = nu-1;
		int k = 0;
		int x = 0;
		for (int l=1; l<=nu; l++)
		{
			while (k < ss)
			{
				for (int i=1; i<=n2; i++)
				{
					double p = (double)bitrev(k >> nu1, nu);
					double arg = (Math.PI * p * 2.0D) / (double) ss;
					fftSin[x] = (long) (Math.sin(arg) * FRAC_FAC);
					fftCos[x] = (long) (Math.cos(arg) * FRAC_FAC);
					k++;
					x++;
				}

				k += n2;
			}
			k = 0;
			nu1--;
			n2 >>= 1;
		}

		for (k=0; k<ss; k++)
			fftBr[k] = bitrev(k, nu);
	}
33023
function prepareDOM() {
        var i, pageNum,
            zoomLevel, maxZoom,
            ptWidth, ptHeight,
            pxWidth, pxHeight,
            pt2px = util.calculatePtSize(),
            dimensions = config.metadata.dimensions,
            skeleton = '';

        // adjust page scale if the pages are too small/big
        // it's adjusted so 100% == DOCUMENT_100_PERCENT_WIDTH px;
        config.pageScale = DOCUMENT_100_PERCENT_WIDTH / (dimensions.width * pt2px);

        // add zoom levels to accomodate the scale
        zoomLevel = config.zoomLevels[config.zoomLevels.length - 1];
        maxZoom = 3 / config.pageScale;
        while (zoomLevel < maxZoom) {
            zoomLevel += zoomLevel / 2;
            config.zoomLevels.push(zoomLevel);
        }

        dimensions.exceptions = dimensions.exceptions || {};

        // create skeleton
        for (i = config.pageStart - 1; i < config.pageEnd; i++) {
            pageNum = i + 1;
            if (pageNum in dimensions.exceptions) {
                ptWidth = dimensions.exceptions[pageNum].width;
                ptHeight = dimensions.exceptions[pageNum].height;
            } else {
                ptWidth = dimensions.width;
                ptHeight = dimensions.height;
            }
            pxWidth = ptWidth * pt2px;
            pxHeight = ptHeight * pt2px;
            pxWidth *= config.pageScale;
            pxHeight *= config.pageScale;
            skeleton += util.template(Crocodoc.pageTemplate, {
                w: pxWidth,
                h: pxHeight
            });
        }

        // insert skeleton and keep a reference to the jq object
        config.$pages = $(skeleton).appendTo(config.$doc);
    }
399831
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        final Point2DArray list = attr.getPoints();

        if ((null != list) && (list.size() == 2))
        {
            if (attr.isDefined(Attribute.DASH_ARRAY))
            {
                if (false == LienzoCore.get().isNativeLineDashSupported())
                {
                    final DashArray dash = attr.getDashArray();

                    if (dash != null)
                    {
                        final double[] data = dash.getNormalizedArray();

                        if (data.length > 0)
                        {
                            if (setStrokeParams(context, attr, alpha, false))
                            {
                                final Point2D p0 = list.get(0);

                                final Point2D p1 = list.get(1);

                                context.beginPath();

                                drawDashedLine(context, p0.getX(), p0.getY(), p1.getX(), p1.getY(), data, attr.getStrokeWidth() / 2);

                                context.restore();
                            }
                            return true;
                        }
                    }
                }
            }
            context.beginPath();

            final Point2D p0 = list.get(0);

            context.moveTo(p0.getX(), p0.getY());

            final Point2D p1 = list.get(1);

            context.lineTo(p1.getX(), p1.getY());

            return true;
        }
        return false;
    }
1072527
function prepareNodes(mindmap) {
    // clone tree since we modify it
    var root = mindmap.getRoot().clone();

    function addProps(node) {
      var lineWidth = mindmaps.CanvasDrawingUtil.getLineWidth(zoomFactor,
          node.getDepth());
      var metrics = mindmaps.TextMetrics.getTextMetrics(node, zoomFactor);

      var props = {
        lineWidth : lineWidth,
        textMetrics : metrics,
        width : function() {
          if (node.isRoot()) {
            return 0;
          }
          return metrics.width;
        },
        innerHeight : function() {
          return metrics.height + padding;
        },

        outerHeight : function() {
          return metrics.height + lineWidth + padding;
        }
      };

      $.extend(node, props);

      node.forEachChild(function(child) {
        addProps(child);
      });
    }

    addProps(root);

    return root;
  }
925344
private function setCommonTemplateParameters()
    {
        $this->setTemplateParameter('application', APPLICATION);
        $this->setTemplateParameter('area', AREA);
        $this->setTemplateParameter('subject', $this->name);
        $this->setTemplateParameter('language', LANGUAGE);
        $this->setTemplateParameter('configuration', $this->configuration);
        $this->setTemplateParameter('route', $this->route);
        $this->setTemplateParameter('translations', $this->translations);
        $this->setTemplateParameter('action', $this->action);
        $this->setTemplateParameter('ancestors', $this->ancestors);
        if($this->hasMessages && !empty($this->storedMessages)) {
            $this->setTemplateParameter('messages', $this->storedMessages);
        }
    }
262816
function () {
		this.regional = []; // Available regional settings, indexed by language code
		this.regional[''] = { // Default regional settings
			currentText: 'Now',
			closeText: 'Done',
			amNames: ['AM', 'A'],
			pmNames: ['PM', 'P'],
			timeFormat: 'HH:mm',
			timeSuffix: '',
			timeOnlyTitle: 'Choose Time',
			timeText: 'Time',
			hourText: 'Hour',
			minuteText: 'Minute',
			secondText: 'Second',
			millisecText: 'Millisecond',
			microsecText: 'Microsecond',
			timezoneText: 'Time Zone',
			isRTL: false
		};
		this._defaults = { // Global defaults for all the datetime picker instances
			showButtonPanel: true,
			timeOnly: false,
			timeOnlyShowDate: false,
			showHour: null,
			showMinute: null,
			showSecond: null,
			showMillisec: null,
			showMicrosec: null,
			showTimezone: null,
			showTime: true,
			stepHour: 1,
			stepMinute: 1,
			stepSecond: 1,
			stepMillisec: 1,
			stepMicrosec: 1,
			hour: 0,
			minute: 0,
			second: 0,
			millisec: 0,
			microsec: 0,
			timezone: null,
			hourMin: 0,
			minuteMin: 0,
			secondMin: 0,
			millisecMin: 0,
			microsecMin: 0,
			hourMax: 23,
			minuteMax: 59,
			secondMax: 59,
			millisecMax: 999,
			microsecMax: 999,
			minDateTime: null,
			maxDateTime: null,
			maxTime: null,
			minTime: null,
			onSelect: null,
			hourGrid: 0,
			minuteGrid: 0,
			secondGrid: 0,
			millisecGrid: 0,
			microsecGrid: 0,
			alwaysSetTime: true,
			separator: ' ',
			altFieldTimeOnly: true,
			altTimeFormat: null,
			altSeparator: null,
			altTimeSuffix: null,
			altRedirectFocus: true,
			pickerTimeFormat: null,
			pickerTimeSuffix: null,
			showTimepicker: true,
			timezoneList: null,
			addSliderAccess: false,
			sliderAccessArgs: null,
			controlType: 'slider',
			oneLine: false,
			defaultValue: null,
			parse: 'strict',
			afterInject: null
		};
		$.extend(this._defaults, this.regional['']);
	}
606436
@Override
    protected void prepareActions() throws QTasteTestFailException {
        mIndex = Integer.parseInt(mData[0].toString());
        if (component instanceof ComboBox) {
            ComboBox<?> combo = (ComboBox<?>) component;
            if (combo.getItems().size() < mIndex) {
                throw new QTasteTestFailException("Specified index is out of bounds");
            }
        } else if (component instanceof ListView) {
            ListView<?> list = (ListView<?>) component;
            if (list.getItems().size() < mIndex) {
                throw new QTasteTestFailException("Specified index is out of bounds");
            }
        } else {
            throw new QTasteTestFailException("Unsupported component");
        }
    }
56333
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        final Point2DArray list = getPolygon();// is null for invalid arrow definition

        if ((null != list) && (list.size() > 2))
        {
            Point2D point = list.get(0);

            context.beginPath();

            context.moveTo(point.getX(), point.getY());

            final int leng = list.size();

            for (int i = 1; i < leng; i++)
            {
                point = list.get(i);

                context.lineTo(point.getX(), point.getY());
            }
            context.closePath();

            return true;
        }
        return false;
    }
557941
public void initialize(double initial[] , int numberOfParameters , double minimumFunctionValue ) {
		super.initialize(initial,numberOfParameters);

		tmp_p.reshape(numberOfParameters,1);

		regionRadius = config.regionInitial;

		fx = cost(x);

		if( verbose != null ) {
			verbose.println("Steps     fx        change      |step|   f-test     g-test    tr-ratio  region ");
			verbose.printf("%-4d  %9.3E  %10.3E  %9.3E  %9.3E  %9.3E  %6.2f   %6.2E\n",
					totalSelectSteps, fx, 0.0,0.0,0.0,0.0, 0.0, regionRadius);
		}

		this.parameterUpdate.initialize(this,numberOfParameters, minimumFunctionValue);

		// a perfect initial guess is a pathological case. easiest to handle it here
		if( fx <= minimumFunctionValue ) {
			if( verbose != null ) {
				verbose.println("Converged minimum value");
			}
			mode = TrustRegionBase_F64.Mode.CONVERGED;
		} else {
			mode = TrustRegionBase_F64.Mode.COMPUTE_DERIVATIVES;
		}
	}
828467
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        final double ord = attr.getOuterRadius();

        final double ird = attr.getInnerRadius();

        if ((ord > 0) && (ird > 0) && (ord > ird))
        {
            context.beginPath();

            context.arc(0, 0, ord, 0, Math.PI * 2, false);

            context.arc(0, 0, ird, 0, Math.PI * 2, true);

            context.closePath();

            return true;
        }
        return false;
    }
1103283
def prepare(self, context):
        
        self.params = {}

        # no params, not even a newline
        if not self.nodelist:
            return

        # just static text, no vars, assume one TextNode
        if not self.nodelist.contains_nontext:
            text = self.nodelist[0].s.strip()

        # vars in params, we have to render
        else:
            context.push()
            context['object'] = self.obj
            text = self.nodelist.render(context)
            context.pop()

        if text:
            self.params = self.resolve_params(text)

        # override the default template from the parameters
        if 'template_name' in self.params:
            self.template_name = self.params['template_name']
598149
function checkExecParamsRegion(region)
{
	var caller = checkExecParamsRegion.caller.name

	if (typeof region != 'object') {
		console.error('Error: region parameter is not an object in: ' + caller);
		return false;
	}

	return true;
}
852417
def setParams(self, minSupport=0.1, maxPatternLength=10, maxLocalProjDBSize=32000000,
                  sequenceCol="sequence"):
        
        kwargs = self._input_kwargs
        return self._set(**kwargs)