Update a specific picture from worksheet.

@param integer $pictureIndex Index of the picture.
@param array $picture_data Picture data.

@return object
@throws Exception
510541
public function updatePicture($pictureIndex, $picture_data)
    {
        //Build URI
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/pictures/' . $pictureIndex;
        //Sign URI
        $signedURI = Utils::sign($strURI);
        //Send request and receive response stream
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $picture_data);
        $json = json_decode($responseStream);
        return $json;

    }
739867
public function apply(Picture $picture)
    {
        $resource = $picture->getResource();

        if($picture->isGd())
        {
            imagefilter($resource, IMG_FILTER_CONTRAST, -15);
            imagefilter($resource, IMG_FILTER_BRIGHTNESS, 8);

            $picture->setResource($resource);
        }
        else
        {
            $resource->modulateImage(108, 170, 100);
        }
    }
262622
public function update($ImageID, $label = null, $description = null)
    {
        return $this->call('image.update', [
            'ImageID'     => $ImageID,
            'label'       => $label,
            'description' => $description,
        ]);
    }
117318
public function replaceChildAtBy($index, AbstractClassContent $contentSet)
    {
        $index = (isset($index) && is_int($index)) ? $index : false;
        if (is_bool($index)) {
            throw new BBException(__METHOD__.' index  parameter must be an integer');
        }
        $newContentsetArr = array();

        foreach ($this->getData() as $key => $content) {
            $contentToAdd = ($key == $index) ? $contentSet : $content;
            $newContentsetArr[] = $contentToAdd;
        }

        $this->clear();
        foreach ($newContentsetArr as $key => $content) {
            if ($content instanceof AbstractClassContent) {
                $this->push($content);
            }
        }

        return true;
    }
1254789
public function update($index, $data)
    {
        $db = $this->load();
        $db[$index] = array_merge($db[$index], $data);
        return $this->rewrite($db);
    }
308918
public function addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = NULL)
    {
        if ($this->sheetNameExists($pSheet->getTitle())) {
            throw new PHPExcel_Exception(
            	"Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first."
            );
        }

        if($iSheetIndex === NULL) {
            if ($this->_activeSheetIndex < 0) {
                $this->_activeSheetIndex = 0;
            }
            $this->_workSheetCollection[] = $pSheet;
        } else {
            // Insert the sheet at the requested index
            array_splice(
                $this->_workSheetCollection,
                $iSheetIndex,
                0,
                array($pSheet)
                );

            // Adjust active sheet index if necessary
            if ($this->_activeSheetIndex >= $iSheetIndex) {
                ++$this->_activeSheetIndex;
            }
        }

        if ($pSheet->getParent() === null) {
            $pSheet->rebindParent($this);
        }

        return $pSheet;
    }
971851
public function updateIndexOne(array $data)
    {
        if (!is_array($data)) {
            throw new \Exception('你的索引参数不是一个数组');
        }

        if (count($data) == count($data, 1)) {
            // 一维数组
            $this->getIndex()->update(new \XSDocument($data));
        }

        //索引是否立即生效
        if ($this->flush_index) {
            $this->getIndex()->flushIndex();
        }

        return $this->getIndex();
    }
759642
public function apply(Picture $picture)
    {
        $resource = $picture->getResource();

        if($picture->isGd())
        {
            imagefilter($resource, IMG_FILTER_BRIGHTNESS, ceil($this->brightness * 2.55));

            $picture->setResource($resource);
        }
        else
        {
            $resource->modulateImage(100 + $this->brightness, 100, 100);
        }
    }
512012
public function setChartTitle($chartIndex, $strXML)
    {
        //check whether workshett name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        
        if (!isset($chartIndex))
            throw new Exception('Chart Index not specified');
        
        if ($strXML == '')
            throw new Exception('XML data not specified');
        
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/charts/' . $chartIndex . '/title';
        
        $signedURI = Utils::sign($strURI);
        
        $response = Utils::processCommand($signedURI, 'PUT', 'xml', $strXML);
        
        $xml = simplexml_load_string($response);
        
        if ($xml->Status == 'OK')
            return true;
        else
            return false;
    }
483894
public function updatePictures($pictures)
    {
        foreach ($pictures as $picture) {
            $image = $this->pictures()->where('id', $picture['id']);

            if ($image->exists()){
               $image->update(['path' => $picture['path']]);
            } else {
               $this->pictures()->create(['path' => $picture['path']]);
            }
        }
    }
1294023
@Override
	public void updateArray(final int columnIndex, final Array x) throws SQLException {
		wrapped.updateArray(columnIndex, x);
	}
1111743
protected function doUpdatePictures(Skill $model, $data) {
		// remove all relationships before
		PictureQuery::create()->filterBySkill($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Picture';
			} else {
				$related = PictureQuery::create()->findOneById($entry['id']);
				$model->addPicture($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
710370
private void updateIndexFile(int stepNumber, File file, String methodName,
			String[] values) throws IOException {
		File indexFile = initializeIndexIfNeeded();

		BufferedWriter w = new BufferedWriter(new FileWriter(indexFile, stepNumber > INITIAL_STEP_NUMBER));
		try {
			String title = "| " + methodName + " | " + (values.length > 0 ? values[0] : "") + " | " + (values.length > 1 ? values[1] : "") + " |";
			w.write("<h2>" + stepNumber + ". " + title + "</h2>\n");
			w.write("<img src='" + file.getName() +"' alt='" + title + "'/>\n");
		} finally {
			try {
				w.close();
			} catch (IOException e) {
				LOG.error("Unable to close screenshot file " + file.getPath(), e);
			}
		}
	}
342717
public void indexDocument(HashMap<String,Object>indexMap) throws Exception {
		SolrInputDocument solrDoc=this.buildSolrDocument(indexMap);
		String docXML=this.convertSolrDocInXML(solrDoc);
		String xml = "<add>" + docXML + "</add>";
		DirectXmlRequest xmlreq = new DirectXmlRequest("/update", xml);
		server.request(xmlreq);
	}
461988
public function update(array $data)
    {
        $cardId = empty($data['id']) ? 0: (int) $data['id'];
        if ($cardId <= 0) {
            throw new Exception('Required field id');
        }
        $data['cardId'] = $data['id'];
        unset($data['id']);

        if (empty($data['columnId'])) {
            throw new Exception('Required field columnId');
        }

        if (empty($data['oldColumnId'])) {
            throw new Exception('Required field oldColumnId');
        }

        return $this->rest->put("$this->action/$cardId/move", $data);
    }
248645
public function updateOleObject($objectIndex, $object_data)
    {
        //Build URI
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/oleobjects/' . $objectIndex;
        //Sign URI
        $signedURI = Utils::sign($strURI);
        //Send request and receive response stream
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $object_data);
        $json = json_decode($responseStream);
        return $json;

    }
922553
public function update($index, $data) {
        if (!$data instanceof Record) {
            $data = new Record(Utils::toArray($data));
        }
        $this->getFormat()->update($index, $data);
        // update buffer to reflect current changes
        if (isset($this->buffer[$index])) {
            $this->buffer[$index] = $data;
        }
    }