(For testing) Insert images to the ViSearch App with custom parameters.

@param imageList    the list of Images to insert.
@param customParams custom parameters
@return an insert transaction
1467
@Override
    public InsertTrans insert(List<Image> imageList, Map<String, String> customParams) {
        return dataOperations.insert(imageList, customParams);
    }
822776
public CreateIssueParams singleListCustomFieldMap(Map<Long, Long> customFieldMap) {
        Set<Long> keySet = customFieldMap.keySet();
        for (Long key : keySet) {
            parameters.add(new NameValuePair("customField_" + key.toString(), customFieldMap.get(key).toString()));
        }
        return this;
    }
597115
public static boolean matchesConfiguredImages(String imageList, ImageConfiguration imageConfig) {
        if (imageList == null) {
            return true;
        }
        Set<String> imagesAllowed = new HashSet<>(Arrays.asList(imageList.split("\\s*,\\s*")));
        return imagesAllowed.contains(imageConfig.getName()) || imagesAllowed.contains(imageConfig.getAlias());
    }
851769
private void addExampleUsingArrayList() {
		add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect created using an array list of options"));
		List<CarOption> options = new ArrayList<>();
		options.add(new CarOption("1", "Ferrari", "F-360"));
		options.add(new CarOption("2", "Mercedez Benz", "amg"));
		options.add(new CarOption("3", "Nissan", "Skyline"));
		options.add(new CarOption("5", "Toyota", "Prius"));

		final WCheckBoxSelect select = new WCheckBoxSelect(options);
		select.setToolTip("Cars");
		final WTextField text = new WTextField();
		text.setReadOnly(true);
		text.setText(NO_SELECTION);

		WButton update = new WButton("Select Cars");
		update.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				String output = select.getSelected().isEmpty() ? NO_SELECTION : "The selected cars are: "
						+ select.getSelected();
				text.setText(output);
			}
		});
		select.setDefaultSubmitButton(update);

		add(select);
		add(update);
		add(text);
		add(new WAjaxControl(update, text));
	}
1106938
@Transactional
  @PostMapping(value = "/{entityTypeId}", headers = "Content-Type=multipart/form-data")
  public void createFromFormPostMultiPart(
      @PathVariable("entityTypeId") String entityTypeId,
      MultipartHttpServletRequest request,
      HttpServletResponse response) {
    Map<String, Object> paramMap = new HashMap<>();
    for (String param : request.getParameterMap().keySet()) {
      String[] values = request.getParameterValues(param);
      String value = values != null ? StringUtils.join(values, ',') : null;
      if (StringUtils.isNotBlank(value)) {
        paramMap.put(param, value);
      }
    }

    // add files to param map
    for (Entry<String, List<MultipartFile>> entry : request.getMultiFileMap().entrySet()) {
      String param = entry.getKey();
      List<MultipartFile> files = entry.getValue();
      if (files != null && files.size() > 1) {
        throw new IllegalArgumentException("Multiple file input not supported");
      }
      paramMap.put(param, files != null && !files.isEmpty() ? files.get(0) : null);
    }
    createInternal(entityTypeId, paramMap, response);
  }
1254775
public CreateIssueParams multipleListCustomField(CustomFiledItems customFiledItems) {
        for (Object id : customFiledItems.getCustomFieldItemIds()) {
            parameters.add(new NameValuePair("customField_" + customFiledItems.getCustomFieldId(),
                    id.toString()));
        }
        return this;
    }
1185102
def list_custom_images(call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The list_vlans function must be called with -f or --function.'
        )

    ret = {}
    conn = get_conn('SoftLayer_Account')
    response = conn.getBlockDeviceTemplateGroups()
    for image in response:
        if 'globalIdentifier' not in image:
            continue
        ret[image['name']] = {
            'id': image['id'],
            'name': image['name'],
            'globalIdentifier': image['globalIdentifier'],
        }
        if 'note' in image:
            ret[image['name']]['note'] = image['note']
    return ret
861320
public CreateIssueParams singleListCustomFields(List<CustomFiledItem> customFiledItemList) {
        for (CustomFiledItem customFiledItem : customFiledItemList) {
            singleListCustomField(customFiledItem);
        }
        return this;
    }
279935
public void submitImageVectorizationTask(String imageFolder, String imageName) {
		Callable<ImageVectorizationResult> call = new ImageVectorization(imageFolder, imageName,
				targetVectorLength, maxImageSizeInPixels);
		pool.submit(call);
		numPendingTasks++;
	}
827487
private PagedSearchResult postImageSearch(UploadSearchParams uploadSearchParams, String endpointMethod) {
        ViSearchHttpResponse response = getPostImageSearchHttpResponse(uploadSearchParams, endpointMethod);
        return getPagedResult(response);
    }
408156
public static void appendImage(XWPFRun run, String imagePath, int pictureType, int width, int height) throws
            IOException, InvalidFormatException {
        InputStream input = new FileInputStream(imagePath);
        run.addPicture(input, pictureType, imagePath, Units.toEMU(width), Units.toEMU(height));
    }
421551
public static URI addParams(
            final URI uri, final Multimap<String, String> params, final Set<String> overrideParams) {
        if (params == null || params.isEmpty()) {
            return uri;
        }
        final String origTxt = uri.toString();
        int queryStart = origTxt.indexOf('?');
        final StringBuilder result = new StringBuilder();
        if (queryStart < 0) {
            int fragmentStart = origTxt.indexOf('#');
            if (fragmentStart < 0) {
                result.append(origTxt);
            } else {
                result.append(origTxt, 0, fragmentStart);
            }
        } else {
            result.append(origTxt, 0, queryStart);
        }

        Map<String, Collection<String>> origParams = getParameters(uri).asMap();
        boolean first = true;
        for (Map.Entry<String, Collection<String>> param: params.asMap().entrySet()) {
            final String key = param.getKey();
            Collection<String> origList = origParams.remove(key);
            if (origList != null && (overrideParams == null || !overrideParams.contains(key))) {
                first = addParams(result, first, key, origList);
            }
            Collection<String> list = param.getValue();
            first = addParams(result, first, key, list);
        }

        for (Map.Entry<String, Collection<String>> param: origParams.entrySet()) {
            final String key = param.getKey();
            Collection<String> list = param.getValue();
            first = addParams(result, first, key, list);
        }

        if (uri.getFragment() != null) {
            result.append('#').append(uri.getRawFragment());
        }

        try {
            return new URI(result.toString());
        } catch (URISyntaxException e) {
            throw ExceptionUtils.getRuntimeException(e);
        }
    }
1237213
@Transactional
  @PostMapping(
      value = "/{entityTypeId}/{id}",
      params = "_method=PUT",
      headers = "Content-Type=multipart/form-data")
  @ResponseStatus(NO_CONTENT)
  public void updateFromFormPostMultiPart(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("id") String untypedId,
      MultipartHttpServletRequest request) {
    Map<String, Object> paramMap = new HashMap<>();
    for (String param : request.getParameterMap().keySet()) {
      String[] values = request.getParameterValues(param);
      String value = values != null ? StringUtils.join(values, ',') : null;
      paramMap.put(param, value);
    }

    // add files to param map
    for (Entry<String, List<MultipartFile>> entry : request.getMultiFileMap().entrySet()) {
      String param = entry.getKey();
      List<MultipartFile> files = entry.getValue();
      if (files != null && files.size() > 1) {
        throw new IllegalArgumentException("Multiple file input not supported");
      }
      paramMap.put(param, files != null && !files.isEmpty() ? files.get(0) : null);
    }
    updateInternal(entityTypeId, untypedId, paramMap);
  }
1221530
public void run(List<Variant> variantList) {
        for (int i = 0; i < variantList.size(); i++) {
            Map<String, AdditionalAttribute> customAnnotation = getCustomAnnotation(variantList.get(i));
            // Update only if there are annotations for this variant. customAnnotation may be empty if the variant
            // exists in the vcf but the info field does not contain any of the required attributes
            if (customAnnotation != null && customAnnotation.get(fileId).getAttribute().size() > 0) {
                VariantAnnotation variantAnnotation = variantList.get(i).getAnnotation();
                if (variantAnnotation != null) {
                    Map<String, AdditionalAttribute> additionalAttributes = variantAnnotation.getAdditionalAttributes();
                    if (additionalAttributes == null) {
                        // variantList and variantAnnotationList must contain variants in the SAME order: variantAnnotation
                        // at position i must correspond to variant i
                        variantAnnotation.setAdditionalAttributes(customAnnotation);
                    } else {
                        additionalAttributes.putAll(customAnnotation);
                        // variantList and variantAnnotationList must contain variants in the SAME order: variantAnnotation
                        // at position i must correspond to variant i
//                        variantAnnotation.setAdditionalAttributes(additionalAttributes);
                    }
                }
            }
        }
    }
301271
public static void applyOrderBy(MultivaluedMap<String, String> queryParams, Query query) {
        List<String> orders = queryParams.get(SORT_PARAM_NAME);
        if (orders != null && orders.size() > 0) {
            OrderBy orderBy = query.orderBy();
            for (String order : orders) {
                EbeanUtils.appendOrder(orderBy, order);
            }
        }
    }
990833
private void setCustomVariable(String parameter, CustomVariable customVariable, Integer index){
        CustomVariableList cvl = (CustomVariableList)parameters.get(parameter);
        if (cvl == null){
            cvl = new CustomVariableList();
            parameters.put(parameter, cvl);
        }
        
        if (customVariable == null){
            cvl.remove(index);
            if (cvl.isEmpty()){
                parameters.remove(parameter);
            }
        }
        else if (index == null){
            cvl.add(customVariable);
        }
        else {
            cvl.add(customVariable, index);
        }
    }
1304716
@UiThread
  public List<T> create(List<S> optionsList) {
    List<T> annotationList = new ArrayList<>();
    for (S options : optionsList) {
      T annotation = options.build(currentId, this);
      annotationList.add(annotation);
      annotations.put(annotation.getId(), annotation);
      currentId++;
    }
    updateSource();
    return annotationList;
  }