Adds a forward transformation step to the transformation description. The value of the source field is copied to
the target field unchanged. Both fields need to have the same object type.
171082
public void forwardField(String sourceField, String targetField) {
        TransformationStep step = new TransformationStep();
        step.setTargetField(targetField);
        step.setSourceFields(sourceField);
        step.setOperationName("forward");
        steps.add(step);
    }
1161784
private void updateTargetDescription() {
		if( targetPt != null ) {
			TupleDesc feature = describe.createDescription();
			describe.process(targetPt.x,targetPt.y,targetOrientation,targetRadius,feature);
			tuplePanel.setDescription(feature);
		} else {
			tuplePanel.setDescription(null);
		}
		tuplePanel.repaint();
	}
1143012
function copyDeep(source) {
    for (var
      key, descriptor, value,
      target = create(gPO(source)),
      names = oK(source),
      i = 0; i < names.length; i++
    ) {
      key = names[i];
      descriptor = gOPD(source, key);
      if (hOP.call(descriptor, VALUE)) {
        copyValueIfObject(descriptor, copyDeep);
      }
      defineProperty(target, key, descriptor);
    }
    return target;
  }
51877
def Add(self, artifact=None, target=None, callback=None):
    
    # Cases where a target field is undefined or empty need special handling.
    # Repeated field helper in target yields results, so expand this out into a
    # list. If the attribute doesn't exist, default to an empty list.
    # Then, in either case, replace the empty list with one containing a single
    # None value.
    if target is None:
      target = Target()
    os_name = target.Get("os") or [None]
    cpe = target.Get("cpe") or [None]
    label = target.Get("label") or [None]
    attributes = itertools.product(os_name, cpe, label)
    new_conditions = [Condition(artifact, *attr) for attr in attributes]
    self.conditions.update(new_conditions)
    self._Register(new_conditions, callback)
783930
function copyMerged(source, target) {
    for (var
      key, descriptor, value, tvalue,
      names = oK(source),
      i = 0; i < names.length; i++
    ) {
      key = names[i];
      descriptor = gOPD(source, key);
      // target already has this property
      if (hOP.call(target, key)) {
        // verify the descriptor can  be merged
        if (hOP.call(descriptor, VALUE)) {
          value = descriptor[VALUE];
          // which means, verify it's an object
          if (isObject(value)) {
            // in such case, verify the target can be modified
            descriptor = gOPD(target, key);
            // meaning verify it's a data descriptor
            if (hOP.call(descriptor, VALUE)) {
              tvalue = descriptor[VALUE];
              // and it's actually an object
              if (isObject(tvalue)) {
                copyMerged(value, tvalue);
              }
            }
          }
        }
      } else {
        // target has no property at all
        if (hOP.call(descriptor, VALUE)) {
          // copy deep if it's an object
          copyValueIfObject(descriptor, copyDeep);
        }
        defineProperty(target, key, descriptor);
      }
    }
  }
704323
def moveBy(self, value):
        
        value = normalizers.normalizeTransformationOffset(value)
        self._moveBy(value)
830368
public final void copyPrimitiveField(Object source, Object copy, Field field) {
		copyPrimitiveAtOffset(source, copy, field.getType(), getObjectFieldOffset(field));
	}
598105
protected void addModelReference(XAttributable object, SXTag target)
			throws IOException {
		XAttributeLiteral modelRefAttr = (XAttributeLiteral) object
				.getAttributes().get(XSemanticExtension.KEY_MODELREFERENCE);
		if (modelRefAttr != null) {
			target.addAttribute("modelReference", modelRefAttr.getValue());
		}
	}
424203
private void updateField(PropertyEditor editor, Object updateValue,
	                         BioPAXElement existing, Model target)
	{
		if (updateValue instanceof BioPAXElement)
		{
			BioPAXElement bpe = (BioPAXElement) updateValue;
			//Now there are two possibilities


			BioPAXElement ibpe = target.getByID(bpe.getUri());
			//1. has an identical in the target
			if (ibpe != null)
			{
				updateValue = ibpe;
			}
			//2. it has no identical in the target
			//I do not have to do anything as it will eventually
			//be moved.

		}
		editor.setValueToBean(updateValue, existing);
	}
16131
public void transformAndSetForwardedHeader() {
        if (xForwardedForHeader != null && xForwardedByHeader != null) {
            //Transition is not done, as it's not possible to know in which order the existing fields were added.
            LOG.info("Header transition is not done as both X-Forwarded-For and X-Forwarded-By headers are present.");
            return;
        }
        StringBuilder headerValue = new StringBuilder();
        if (xForwardedForHeader != null) {
            String[] parts = xForwardedForHeader.split(COMMA);
            for (String part : parts) {
                headerValue.append(FOR).append(resolveIP(part.trim())).append(COMMA).append(" ");
            }
            headerValue.replace(headerValue.length() - 2, headerValue.length(), SEMI_COLON + " ");
            httpOutboundRequest.removeHeader(Constants.X_FORWARDED_FOR);
        }
        if (xForwardedByHeader != null) {
            headerValue.append(FOR).append(resolveIP(xForwardedByHeader.trim())).append(SEMI_COLON).append(" ");
            httpOutboundRequest.removeHeader(Constants.X_FORWARDED_BY);
        }
        headerValue.append(BY).append(resolveIP(localAddress));
        if (xForwardedHostHeader != null) {
            headerValue.append(SEMI_COLON + " " + HOST).append(xForwardedHostHeader);
            httpOutboundRequest.removeHeader(Constants.X_FORWARDED_HOST);
        }
        if (xForwardedProtoHeader != null) {
            headerValue.append(SEMI_COLON + " " + PROTO).append(xForwardedProtoHeader);
            httpOutboundRequest.removeHeader(Constants.X_FORWARDED_PROTO);
        }
        httpOutboundRequest.setHeader(Constants.FORWARDED, headerValue.toString());
    }
244403
protected void AddLODSceneObject(GVRSceneObject currentSceneObject) {
    if (this.transformLODSceneObject != null) {
      GVRSceneObject levelOfDetailSceneObject = null;
      if ( currentSceneObject.getParent() == this.transformLODSceneObject) {
        levelOfDetailSceneObject = currentSceneObject;
      }
      else {
        GVRSceneObject lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_TRANSLATION_));
        if ( lodSceneObj != null ) {
          if (lodSceneObj.getParent() == this.transformLODSceneObject) {
            levelOfDetailSceneObject = lodSceneObj;
          }
        }
        if (levelOfDetailSceneObject == null) {
          lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_ROTATION_));
          if ( lodSceneObj != null ) {
            if (lodSceneObj.getParent() == this.transformLODSceneObject) {
              levelOfDetailSceneObject = lodSceneObj;
            }
          }
        }
        if (levelOfDetailSceneObject == null) {
          lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_SCALE_));
          if ( lodSceneObj != null ) {
            if (lodSceneObj.getParent() == this.transformLODSceneObject) {
              levelOfDetailSceneObject = lodSceneObj;
            }
          }
        }

      }
      if ( levelOfDetailSceneObject != null) {
        final GVRLODGroup lodGroup = (GVRLODGroup) this.transformLODSceneObject.getComponent(GVRLODGroup.getComponentType());
        lodGroup.addRange(this.getMinRange(), levelOfDetailSceneObject);
        this.increment();
      }
    }
  }
543360
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	protected void doTransform(ITransformable transformable, float comp)
	{
		if (listTransformations.size() == 0)
			return;

		for (Transformation transformation : listTransformations)
			transformation.transform(transformable, elapsedTimeCurrentLoop);
	}
682168
function onNextTransform (transform, next) {
      // check if we should handle this filePath
      function shouldProcess (filePath, done) {
        done(!!multimatch(filePath, transform.pattern, transform.opts).length)
      }

      // transform the path
      function process (filePath, complete) {
        var filename = path.basename(filePath),
            pathParts = path.dirname(filePath).split(path.sep)

        // we'll get an empty arrary if we overslice
        pathParts = pathParts.slice(transform.by)
        pathParts.push(filename)

        var newPath = pathParts.join(path.sep),
            fileData = files[filePath]

        // don't need the old fileData anymore,
        // since we are re-adding with the new path
        delete files[filePath]
        files[newPath] = fileData

        complete()
      }

      // we do this for each option as the last may have modified the collection
      async.filter(Object.keys(files), shouldProcess, function (results) {
        async.each(results, process, next)
      })
    }
60760
public void valueField(String targetField, String value) {
        TransformationStep step = new TransformationStep();
        step.setTargetField(targetField);
        step.setOperationParameter(TransformationConstants.VALUE_PARAM, value);
        step.setOperationName("value");
        steps.add(step);
    }
1285937
private function applyNormalTransformations(array $transformations, DefinitionCall $definitionCall, $index, $value)
    {
        $newValue = $value;
        foreach ($transformations as $transformation) {
            $newValue = $this->transform($definitionCall, $transformation, $index, $newValue);
        }

        return $newValue;
    }
665542
def copy_fields(layer, fields_to_copy):
    
    for field in fields_to_copy:

        index = layer.fields().lookupField(field)
        if index != -1:

            layer.startEditing()

            source_field = layer.fields().at(index)
            new_field = QgsField(source_field)
            new_field.setName(fields_to_copy[field])

            layer.addAttribute(new_field)

            new_index = layer.fields().lookupField(fields_to_copy[field])

            for feature in layer.getFeatures():
                attributes = feature.attributes()
                source_value = attributes[index]
                layer.changeAttributeValue(
                    feature.id(), new_index, source_value)

            layer.commitChanges()
            layer.updateFields()
1121594
def expanded_transform(self):
        

        segments = self._expand_transform(self.transform)

        if segments:

            segments[0]['datatype'] = self.valuetype_class

            for s in segments:
                s['column'] = self

        else:

            segments = [self.make_xform_seg(datatype=self.valuetype_class, column=self)]

        # If we want to add the find datatype cast to a transform.
        #segments.append(self.make_xform_seg(transforms=["cast_"+self.datatype], column=self))

        return segments