Convert ---------------------------------------------------------------------
540647
function convert(opts) {
	var input = opts.convert || opts.edit;
	if(typeof input !== "string") {
		throw new Error("no input file");
	}
	
	var bundle = new Bundle(input);
	
	do_compile(bundle, opts);
}
1100472
private Object[] convert(FieldConversion[] fcs, Object[] values)
    {
        Object[] convertedValues = new Object[values.length];
        
        for (int i= 0; i < values.length; i++)
        {
            convertedValues[i] = fcs[i].sqlToJava(values[i]);
        }

        return convertedValues;
    }
452834
function (value) {
  if (typeof value === 'object' && value !== null) {
    if (_.size(value) <= 2
        && _.all(value, function (v, k) {
          return typeof k === 'string' && k.substr(0, 1) === '$';
        })) {
      for (var i = 0; i < builtinConverters.length; i++) {
        var converter = builtinConverters[i];
        if (converter.matchJSONValue(value)) {
          return converter.fromJSONValue(value);
        }
      }
    }
  }
  return value;
}
1282566
function convertData(objectBody, objectChange) {
    const keysChange = Object.keys(objectChange);
    let objectReturn = {};
    keysChange.map(keyChange => {
        let changeOption = objectChange[keyChange];
        let valueKeyReturn = getValueChangeOption(objectBody, keyChange, changeOption, objectReturn);
        if(valueKeyReturn !== undefined && valueKeyReturn !== null){
            objectReturn[keyChange] = valueKeyReturn;
        }
        return keyChange;
    });
    return objectReturn;
}
965884
protected function convertation()
    {
        if ($this->executionTime instanceof DateTime) {
            $this->executionTime = $this->executionTime->toString();
        } elseif ($this->executionTime === null) {
            $time = new DateTime();
            $this->executionTime = $time->toString();
        }

        foreach (['periodically', 'active'] as $property) {
            if ($this->$property === true) {
                $this->$property = 'Y';
            } else {
                $this->$property = 'N';
            }
        }
    }
1219984
async function convert(filename, options) {
    let file;
    if (filename) {
        file = fs.readFileSync(filename).toString();
    } else {
        file = await read_stdin();
    }
    try {
        file = JSON.parse(file);
    } catch {}
    let tbl = table(file);
    let view = tbl.view();
    let out;
    options.format = options.format || "arrow";
    if (options.format === "csv") {
        out = await view.to_csv();
    } else if (options.format === "columns") {
        out = JSON.stringify(await view.to_columns());
    } else if (options.format === "json") {
        out = JSON.stringify(await view.to_json());
    } else {
        out = await view.to_arrow();
    }
    if (options.format === "arrow") {
        if (options.output) {
            fs.writeFileSync(options.output, new Buffer(out), "binary");
        } else {
            console.log(new Buffer(out).toString());
        }
    } else {
        if (options.output) {
            fs.writeFileSync(options.output, out);
        } else {
            console.log(out);
        }
    }
    view.delete();
    tbl.delete();
}
1048142
@Override
	public Object convert(String value, Class type) {
		if (isNullOrEmpty(value)) {
			return null;
		}

		if (Character.isDigit(value.charAt(0))) {
			return resolveByOrdinal(value, type);
		} else {
			return resolveByName(value, type);
		}
	}
1245702
public function convert() {

        $resource = $file = \tao_helpers_Http::getUploadedFile('content');

        $base64Converter = new Base64ConverterModel($resource);

        $this -> returnJson($base64Converter->convertToBase64());
    }
578728
function convertStrItems2Obj(obj) {
	var result = {};
	for (var key in obj) {
		var val = obj[key];
		val = extractTypeAndCast(val);
		convertStrItem2Obj(key, val, result);
	}

	return result;
}
332714
function convertObject (schema, self) {
  var keys = Object.keys(schema);
  var ret = {};

  for (var i = 0; i < keys.length; ++i) {
    var key = keys[i];
    ret[key] = convertElement(schema[key], self);
  }

  return ret;
}
1271156
function convert(key, value) {
  key = camel(key);
  if (is.string(value)) return key + '_str';
  if (isInt(value)) return key + '_int';
  if (isFloat(value)) return key + '_real';
  if (is.date(value)) return key + '_date';
  if (is.boolean(value)) return key + '_bool';
}
1259766
public void convertToMultipart() {
        this.method = "POST";
        
        String boundary = UUID.randomUUID().toString().replaceAll("-", "");
        setHeader("Content-Type", "multipart/form-data; boundary=----" + boundary);
        
        //add parameters, if available 
        StringBuilder bodyBuilder = new StringBuilder();

        for (Parameter param : parameters) {
            bodyBuilder.append("------").append(boundary).append(CRLF);
            bodyBuilder.append("Content-Disposition: form-data; name=\"").append(param.getName()).append("\"");
            if (param.getType() == IParameter.PARAM_MULTIPART_ATTR) {
                bodyBuilder.append("; filename=\"").append(param.getFilename()).append("\"").append(CRLF);
                bodyBuilder.append("Content-Type: ").append(param.getContentType());
            }
            bodyBuilder.append(CRLF).append(CRLF);
            
            bodyBuilder.append(param.getValue());
            bodyBuilder.append(CRLF);
        }
        bodyBuilder.append("------").append(boundary).append("--").append(CRLF);

        this.body = bodyBuilder.toString();
        this.parameters = new ArrayList<>();
        this.sortedParams = null;
    }
902487
function convertRawDate(rawColumnValue, column, context)
{
  return new SfTimestamp(
      Number(rawColumnValue) * 86400, // convert to seconds
      0,                              // no nano seconds
      0,                              // no scale required
      'UTC',                          // use utc as the timezone
      context.format).toSfDate();
}
406521
@Override
  public Decimal convert(Decimal value, String sourceUnit, String destUnit) throws UcumException  {
		assert value != null : paramError("convert", "value", "must not be null");
		assert checkStringParam(sourceUnit) : paramError("convert", "sourceUnit", "must not be null or empty");
		assert checkStringParam(destUnit) : paramError("convert", "destUnit", "must not be null or empty");

		if (sourceUnit.equals(destUnit))
			return value;
			
		Canonical src = new Converter(model, handlers).convert(new ExpressionParser(model).parse(sourceUnit));
		Canonical dst = new Converter(model, handlers).convert(new ExpressionParser(model).parse(destUnit));
		String s = new ExpressionComposer().compose(src, false);
		String d = new ExpressionComposer().compose(dst, false);
		if (!s.equals(d))
			throw new UcumException("Unable to convert between units "+sourceUnit+" and "+destUnit+" as they do not have matching canonical forms ("+s+" and "+d+" respectively)");
		Decimal canValue = value.multiply(src.getValue());
//		System.out.println(value.toPlainString()+sourceUnit+" =("+src.getValue().toPlainString()+")= "+
//				canValue.toPlainString()+s+" =("+dst.getValue().toPlainString()+")= "+
//				canValue.divide(dst.getValue())+destUnit);
		return canValue.divide(dst.getValue());
	}
188831
@Override
    public byte[] convertBlock(int[] input, int inPos, byte[] output, int numOfComponents, int startCoordinate,
                               int row, int scanlineStride) {
        int index = 0, inputOffset = 0, bounds = 0;
        int Y, Cb, Cr;
        int len = output.length;

        for (int i = 0; i < DCTSIZE; i++) {
            index = startCoordinate + i * scanlineStride;
            bounds = row * scanlineStride;

            for (int j = 0; j < DCTSIZE; j++) {
                Y = input[inputOffset++] & 0xFF;
                Cb = input[inputOffset++] & 0xFF;
                Cr = input[inputOffset++] & 0xFF;

                if (index >= len) {
                    return output;
                }

                if (index < bounds) {
                    output[index++] = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y + Cr2R[Cr]];
                    output[index++] = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y
                                                                   + ((Cb2G[Cb] + Cr2G[Cr]) >> 16)];
                    output[index++] = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y + Cb2B[Cb]];
                }
            }

            row++;
        }

        return output;
    }
753810
function Convert (proto, a) {
  if (a instanceof Buffer) {
    return Convert.toString(proto, a)
  } else {
    return Convert.toBuffer(proto, a)
  }
}
39318
def column_converter(string):
    
    column = string.strip(',')
    if '-' in column:
        column_range = map(int, column.split('-'))
        # For decreasing ranges, increment the larger value, reverse the
        # passing to range (so it will accept the input), and finally
        # reverse the output ([::-1])
        if column_range[0] > column_range[1]:
            column_range[0] += 1
            return [i for i in range(*column_range[::-1])][::-1]
        # For normal ranges, increment the larger value.
        column_range[1] += 1
        return [i for i in range(*column_range)]
    if ',' in column:
        columns = column.split(',')
        return map(int, columns)
    return [int(column)]