//////////////////////////////////////////////////////////////////// non-ocap mode
436137
function(command, k) {
            _cmd(Rserve.Rsrv.CMD_login, _encode_string(command), k, command);
        }
1233458
@VisibleForTesting
    protected void setSttyMode(STTYMode mode) throws IOException {
        String[] cmd;
        if (mode == STTYMode.COOKED) {
            cmd = new String[]{"/bin/sh", "-c", "stty -raw echo </dev/tty"};
        } else {
            cmd = new String[]{"/bin/sh", "-c", "stty raw -echo </dev/tty"};
        }

        Process p = runtime.exec(cmd);

        try {
            p.waitFor();
        } catch (InterruptedException ie) {
            throw new IOException(ie.getMessage(), ie);
        }

        try (InputStreamReader in = new InputStreamReader(p.getErrorStream(), UTF_8);
             BufferedReader reader = new BufferedReader(in)) {
            String err = reader.readLine();
            if (err != null) {
                throw new IOException(err);
            }
        }
    }
303615
function addCap (coord, v, normal, type, isBeginning, context) {
    var neg_normal = Vector.neg(normal);
    var has_texcoord = (context.texcoord_index != null);

    switch (type){
    case CAP_TYPE.square:
        var tangent;
        // first vertex on the lineString
        if (isBeginning){
            tangent = [normal[1], -normal[0]];

            addVertex(coord, Vector.add(normal, tangent), normal, 1, v, context, 1);
            addVertex(coord, Vector.add(neg_normal, tangent), normal, 0, v, context, 1);

            if (has_texcoord) {
                // Add length of square cap to texture coordinate
                v += 0.5 * context.texcoord_width * context.v_scale;
            }

            addVertex(coord, normal, normal, 1, v, context, 1);
            addVertex(coord, neg_normal, normal, 0, v, context, 1);

        }
        // last vertex on the lineString
        else {
            tangent = [-normal[1], normal[0]];

            addVertex(coord, normal, normal, 1, v, context, 1);
            addVertex(coord, neg_normal, normal, 0, v, context, 1);

            if (has_texcoord) {
                // Add length of square cap to texture coordinate
                v += 0.5 * context.texcoord_width * context.v_scale;
            }

            addVertex(coord, Vector.add(normal, tangent), normal, 1, v, context, 1);
            addVertex(coord, Vector.add(neg_normal, tangent), normal, 0, v, context, 1);
        }

        indexPairs(1, context);
        break;
    case CAP_TYPE.round:
        // default for end cap, beginning cap will overwrite below (this way we're always passing a non-null value,
        // even if texture coords are disabled)
        var uvA = zero_v, uvB = one_v, uvC = mid_v;
        var nA, nB;

        // first vertex on the lineString
        if (isBeginning) {
            nA = normal;
            nB = neg_normal;

            if (has_texcoord){
                v += 0.5 * context.texcoord_width * context.v_scale;
                uvA = one_v, uvB = zero_v, uvC = mid_v; // update cap UV order
            }
        }
        // last vertex on the lineString - flip the direction of the cap
        else {
            nA = neg_normal;
            nB = normal;
        }

        if (has_texcoord) {
            zero_v[1] = v, one_v[1] = v, mid_v[1] = v; // update cap UV values
        }

        addFan(coord,
            nA, zero_vec2, nB,  // extrusion normal
            normal,             // line normal, for offsets
            uvA, uvC, uvB,      // texture coords (ignored if disabled)
            true, false, context
        );

        break;
    case CAP_TYPE.butt:
        return;
    }
}
1151367
function(oContext, oBindingInfo, bSuppressInvalidate) {

			var oControl = this._oControl,
				oBinding = oBindingInfo.binding,
				oItem = this.createListItem(oContext, oBindingInfo);

			if (oBinding.isGrouped()) {
				// creates group header if need
				var aItems = oControl.getItems(true),
					oLastItem = aItems[aItems.length - 1],
					sModelName = oBindingInfo.model,
					oGroupInfo = oBinding.getGroup(oItem.getBindingContext(sModelName));

				if (oLastItem && oLastItem.isGroupHeader()) {
					oControl.removeAggregation("items", oLastItem, true);
					this._fnAppendGroupItem = this.appendGroupItem.bind(this, oGroupInfo, oLastItem, bSuppressInvalidate);
					oLastItem = aItems[aItems.length - 1];
				}

				if (!oLastItem || oGroupInfo.key !== oBinding.getGroup(oLastItem.getBindingContext(sModelName)).key) {
					var oGroupHeader = (oBindingInfo.groupHeaderFactory) ? oBindingInfo.groupHeaderFactory(oGroupInfo) : null;
					if (oControl.getGrowingDirection() == ListGrowingDirection.Upwards) {
						this.applyPendingGroupItem();
						this._fnAppendGroupItem = this.appendGroupItem.bind(this, oGroupInfo, oGroupHeader, bSuppressInvalidate);
					} else {
						this.appendGroupItem(oGroupInfo, oGroupHeader, bSuppressInvalidate);
					}
				}
			}

			oControl.addAggregation("items", oItem, bSuppressInvalidate);
			if (bSuppressInvalidate) {
				this._aChunk.push(oItem);
			}
		}
888593
function (e, obj) {

            var nTop = -1 * (this.resizeMonitor.offsetHeight + Module.RESIZE_MONITOR_BUFFER);

            this.resizeMonitor.style.top = nTop + "px";
            this.resizeMonitor.style.left = "0";
        }
863578
def p_notplus_assignment(self, t):
    ''''''
    self.accu.add(Term('obs_vlabel', [self.name,"gen(\""+t[1]+"\")","notPlus"]))
1116594
@NotNull
    public Mode without(@NotNull Key<?> key) {
        return new Mode(Map(this.defs, key, null));
    }
850010
public void enableClipRegion() {
        if (mClippingEnabled) {
            Log.w(TAG, "Clipping has been enabled already for %s!", getName());
            return;
        }
        Log.d(Log.SUBSYSTEM.WIDGET, TAG, "enableClipping for %s [%f, %f, %f]",
                getName(), getViewPortWidth(), getViewPortHeight(), getViewPortDepth());

        mClippingEnabled = true;

        GVRTexture texture = WidgetLib.getTextureHelper().getSolidColorTexture(Color.YELLOW);

        GVRSceneObject clippingObj = new GVRSceneObject(mContext, getViewPortWidth(), getViewPortHeight(), texture);
        clippingObj.setName("clippingObj");
        clippingObj.getRenderData()
                .setRenderingOrder(GVRRenderData.GVRRenderingOrder.STENCIL)
                .setStencilTest(true)
                .setStencilFunc(GLES30.GL_ALWAYS, 1, 0xFF)
                .setStencilOp(GLES30.GL_KEEP, GLES30.GL_KEEP, GLES30.GL_REPLACE)
                .setStencilMask(0xFF);

        mSceneObject.addChildObject(clippingObj);

        for (Widget child : getChildren()) {
            setObjectClipped(child);
        }
    }
75534
public static String initCaps(String in) {
        return in.length() < 2 ? in.toUpperCase() : in.substring(0, 1).toUpperCase() + in.substring(1);
    }
766493
@Override
	public void removeByC_NotST(long CPDefinitionId, int status) {
		for (CPInstance cpInstance : findByC_NotST(CPDefinitionId, status,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpInstance);
		}
	}
812427
func PinMode(pin Pin, mode Mode) {

	// Pin fsel register, 0 or 1 depending on bank
	fselReg := uint8(pin) / 10
	shift := (uint8(pin) % 10) * 3
	f := uint32(0)

	const in = 0   // 000
	const out = 1  // 001
	const alt0 = 4 // 100
	const alt4 = 3 // 011
	const alt5 = 2 // 010

	switch mode {
	case Input:
		f = in
	case Output:
		f = out
	case Clock:
		switch pin {
		case 4, 5, 6, 32, 34, 42, 43, 44:
			f = alt0
		case 20, 21:
			f = alt5
		default:
			return
		}
	case Pwm:
		switch pin {
		case 12, 13, 40, 41, 45:
			f = alt0
		case 18, 19:
			f = alt5
		default:
			return
		}
	case Spi:
		switch pin {
		case 7, 8, 9, 10, 11: // SPI0
			f = alt0
		case 35, 36, 37, 38, 39: // SPI0
			f = alt0
		case 16, 17, 18, 19, 20, 21: // SPI1
			f = alt4
		case 40, 41, 42, 43, 44, 45: // SPI2
			f = alt4
		default:
			return
		}
	}

	memlock.Lock()
	defer memlock.Unlock()

	const pinMask = 7 // 111 - pinmode is 3 bits

	gpioMem[fselReg] = (gpioMem[fselReg] &^ (pinMask << shift)) | (f << shift)
}
1011030
function (mode, context) {
            context = context || this.getContext();
            this.currentBlendMode = mode;
            switch (mode) {
                case "multiply" :
                    context.globalCompositeOperation = "multiply";
                    break;

                default : // normal
                    context.globalCompositeOperation = "source-over";
                    this.currentBlendMode = "normal";
                    break;
            }

            // transparent setting will override the given blendmode for this.context
            if (this.settings.doubleBuffering && this.settings.transparent) {
                // Clears the front buffer for each frame blit
                this.context.globalCompositeOperation = "copy";
            }
        }
215424
function initNoGoZoneSpecialAttractors() {
  if(!config.nogoParam) {return};

  var noGoTopLeft = {};
  var noGoBottomRight = {};
  noGoTopLeft.x = Infinity;
  noGoTopLeft.y = Infinity;
  noGoBottomRight.x = -Infinity;
  noGoBottomRight.y = -Infinity;


  // define no go zone via a few points
  var noGoZoneBox = [];
  noGoZoneBox.push({
    x: config.nogoParam.x * pixelRatio,
    y: config.nogoParam.y * pixelRatio,
    x1:0, y1:0, x2:0, y2:0});

  noGoZoneBox.push({
    x: (config.nogoParam.x + config.nogoParam.width) * pixelRatio,
    y: config.nogoParam.y * pixelRatio,
    x1:0, y1:0, x2:0, y2:0});

  noGoZoneBox.push({
    x: (config.nogoParam.x + config.nogoParam.width) * pixelRatio,
    y: (config.nogoParam.y + config.nogoParam.height) * pixelRatio,
    x1:0, y1:0, x2:0, y2:0});

  noGoZoneBox.push({
    x: config.nogoParam.x * pixelRatio,
    y: (config.nogoParam.y + config.nogoParam.height) * pixelRatio,
    x1:0, y1:0, x2:0, y2:0});

  var n = noGoZoneBox.length;

  // compute the Bezier handle
  for(var i=0; i<n; i++) {
    var P1 = noGoZoneBox[(i-1+n)%n];
    var P0 = noGoZoneBox[i];
    var P2 = noGoZoneBox[(i+1)%n];
    var L  = Math.sqrt(Math.pow(P2.x - P1.x, 2) + Math.pow(P2.y - P1.y, 2));
    var l1 = Math.sqrt(Math.pow(P0.x - P1.x, 2) + Math.pow(P0.y - P1.y, 2));
    var l2 = Math.sqrt(Math.pow(P2.x - P0.x, 2) + Math.pow(P2.y - P0.y, 2));
    P0.x1 = P0.x + (l1/3) * (P1.x - P2.x) / L;
    P0.x2 = P0.x + (l2/3) * (P2.x - P1.x) / L;
    P0.y1 = P0.y + (l1/3) * (P1.y - P2.y) / L;
    P0.y2 = P0.y + (l2/3) * (P2.y - P1.y) / L;
    noGoZoneBox[i] = P0;
  }

  // subdivise Bezier curve to create segments
  for(var i=0; i<n; i++) {
    var PS = noGoZoneBox[i];
    var PE = noGoZoneBox[(i+1)%n];
    var L = Math.sqrt(Math.pow(PE.x - PS.x, 2) + Math.pow(PE.y - PS.y, 2));
    var T = [];
    var nT = Math.ceil(L/SUBDIVISE_NOGO);
    for(var k=0; k<nT; k++) {
      T.push(k/(nT-1));
    }
    var Bx = bezier(T, [PS.x, PS.x2, PE.x1, PE.x]);
    var By = bezier(T, [PS.y, PS.y2, PE.y1, PE.y]);
    for(var j=0; j<(nT-1); j++) {
      var specialAttractor = {};
      specialAttractor.x1 = Bx[j];
      specialAttractor.y1 = By[j];
      specialAttractor.x2 = Bx[j+1];
      specialAttractor.y2 = By[j+1];
      specialAttractor.impactDistance = config.noGoImpactDistance * pixelRatio;
      specialAttractor.type = config.nogoZoneType;
      specialAttractors.push(specialAttractor);

      if (specialAttractor.x1 > noGoBottomRight.x) {noGoBottomRight.x = specialAttractor.x1};
      if (specialAttractor.y1 > noGoBottomRight.y) {noGoBottomRight.y = specialAttractor.y1};
      if (specialAttractor.x1 < noGoTopLeft.x) {noGoTopLeft.x = specialAttractor.x1};
      if (specialAttractor.y1 < noGoTopLeft.y) {noGoTopLeft.y = specialAttractor.y1};

      specialAttractorsBoundingBoxes.push({
        topLeft: noGoTopLeft,
        bottomRight: noGoBottomRight
      });
      noGoBBoxes.push({
        topLeft: noGoTopLeft,
        bottomRight: noGoBottomRight
      });

      if(DEBUG_FLAG) {
        drawHelperCircle(specialAttractor.x1, specialAttractor.y1, 1);
      }
    }
  }

}
1228909
func (ctx *context) nonblockOpen(flags WindowFlags, body rect.Rect, header rect.Rect, updateFn UpdateFn) *Window {
	popup := createWindow(ctx, "")
	popup.idx = len(ctx.Windows)
	popup.updateFn = updateFn
	ctx.Windows = append(ctx.Windows, popup)

	popup.Bounds = body
	popup.layout = &panel{}
	popup.flags = flags
	popup.flags |= WindowBorder | windowPopup
	popup.flags |= WindowDynamic | windowSub
	popup.flags |= windowNonblock

	popup.header = header

	if updateFn == nil {
		popup.specialPanelBegin()
	}
	return popup
}
375379
function _fnBuildHead( oSettings )
		{
			var i, nTh, iLen, j, jLen;
			var iThs = oSettings.nTHead.getElementsByTagName('th').length;
			var iCorrector = 0;
			var jqChildren;
			
			/* If there is a header in place - then use it - otherwise it's going to get nuked... */
			if ( iThs !== 0 )
			{
				/* We've got a thead from the DOM, so remove hidden columns and apply width to vis cols */
				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
				{
					nTh = oSettings.aoColumns[i].nTh;
					nTh.setAttribute('role', 'columnheader');
					if ( oSettings.aoColumns[i].bSortable )
					{
						nTh.setAttribute('tabindex', oSettings.iTabIndex);
						nTh.setAttribute('aria-controls', oSettings.sTableId);
					}
		
					if ( oSettings.aoColumns[i].sClass !== null )
					{
						$(nTh).addClass( oSettings.aoColumns[i].sClass );
					}
					
					/* Set the title of the column if it is user defined (not what was auto detected) */
					if ( oSettings.aoColumns[i].sTitle != nTh.innerHTML )
					{
						nTh.innerHTML = oSettings.aoColumns[i].sTitle;
					}
				}
			}
			else
			{
				/* We don't have a header in the DOM - so we are going to have to create one */
				var nTr = document.createElement( "tr" );
				
				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
				{
					nTh = oSettings.aoColumns[i].nTh;
					nTh.innerHTML = oSettings.aoColumns[i].sTitle;
					nTh.setAttribute('tabindex', '0');
					
					if ( oSettings.aoColumns[i].sClass !== null )
					{
						$(nTh).addClass( oSettings.aoColumns[i].sClass );
					}
					
					nTr.appendChild( nTh );
				}
				$(oSettings.nTHead).html( '' )[0].appendChild( nTr );
				_fnDetectHeader( oSettings.aoHeader, oSettings.nTHead );
			}
			
			/* ARIA role for the rows */	
			$(oSettings.nTHead).children('tr').attr('role', 'row');
			
			/* Add the extra markup needed by jQuery UI's themes */
			if ( oSettings.bJUI )
			{
				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
				{
					nTh = oSettings.aoColumns[i].nTh;
					
					var nDiv = document.createElement('div');
					nDiv.className = oSettings.oClasses.sSortJUIWrapper;
					$(nTh).contents().appendTo(nDiv);
					
					var nSpan = document.createElement('span');
					nSpan.className = oSettings.oClasses.sSortIcon;
					nDiv.appendChild( nSpan );
					nTh.appendChild( nDiv );
				}
			}
			
			if ( oSettings.oFeatures.bSort )
			{
				for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
				{
					if ( oSettings.aoColumns[i].bSortable !== false )
					{
						_fnSortAttachListener( oSettings, oSettings.aoColumns[i].nTh, i );
					}
					else
					{
						$(oSettings.aoColumns[i].nTh).addClass( oSettings.oClasses.sSortableNone );
					}
				}
			}
			
			/* Deal with the footer - add classes if required */
			if ( oSettings.oClasses.sFooterTH !== "" )
			{
				$(oSettings.nTFoot).children('tr').children('th').addClass( oSettings.oClasses.sFooterTH );
			}
			
			/* Cache the footer elements */
			if ( oSettings.nTFoot !== null )
			{
				var anCells = _fnGetUniqueThs( oSettings, null, oSettings.aoFooter );
				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
				{
					if ( anCells[i] )
					{
						oSettings.aoColumns[i].nTf = anCells[i];
						if ( oSettings.aoColumns[i].sClass )
						{
							$(anCells[i]).addClass( oSettings.aoColumns[i].sClass );
						}
					}
				}
			}
		}
76046
function _fnGetWidestNode( oSettings, iCol )
		{
			var iMaxIndex = _fnGetMaxLenString( oSettings, iCol );
			if ( iMaxIndex < 0 )
			{
				return null;
			}
		
			if ( oSettings.aoData[iMaxIndex].nTr === null )
			{
				var n = document.createElement('td');
				n.innerHTML = _fnGetCellData( oSettings, iMaxIndex, iCol, '' );
				return n;
			}
			return _fnGetTdNodes(oSettings, iMaxIndex)[iCol];
		}
834812
function noformat(app, file, locals, argv) {
  return app.isTrue('noformat') || app.isFalse('format')
    || file.noformat === true || file.format === false
    || locals.noformat === true || locals.format === false
    || argv.noformat === true || argv.format === false;
}