_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
83
13k
language
stringclasses
1 value
meta_information
dict
q600
Grammar.getRulesFor
train
public function getRulesFor(Symbol $subject): array { $rules = []; if (!$subject->isTerminal()) { foreach ($this->rules as $rule) { if (0 === Symbol::compare($rule->getSubject(), $subject)) { $rules[] = $rule; } } } ...
php
{ "resource": "" }
q601
Document.getAttachment
train
public function getAttachment($attachmentName) { if ($attachmentName == '') throw new Exception('Attachment Name not specified'); //build URI $strURI = Product::$baseProductUri . '/email/' . $this->getFileName() . '/attachments/' . $attachmentName; //sign URI $s...
php
{ "resource": "" }
q602
LineChart.addItem
train
public function addItem($item) { if (!is_numeric($item)) { throw new \InvalidArgumentException(sprintf("Value '%s' must be a numeric value", $item)); } $this->items[] = $item; return $this; }
php
{ "resource": "" }
q603
LineChart.setColour
train
public function setColour($colour) { if (!preg_match('/^[a-f0-9]{6}$/i', $colour)) { throw new \InvalidArgumentException(sprintf('Value %s must be a valid hex colour', $colour)); } $this->colour = $colour; return $this; }
php
{ "resource": "" }
q604
LineChart.getColour
train
public function getColour() { if (null === $this->colour) { $this->colour = self::DEFAULT_COLOUR; } return $this->colour; }
php
{ "resource": "" }
q605
LineChart.setAxis
train
public function setAxis($dimension, $labels) { foreach ($labels as $label) { $this->addLabel($dimension, $label); } return $this; }
php
{ "resource": "" }
q606
LineChart.addLabel
train
protected function addLabel($dimension, $label) { if (!in_array($dimension, array(self::DIMENSION_X, self::DIMENSION_Y))) { throw new \InvalidArgumentException(sprintf("Value '%s' is not a valid dimension", $dimension)); } $this->axis[$dimension][] = $label; }
php
{ "resource": "" }
q607
LineChart.getAxis
train
public function getAxis() { if (null === $this->axis) { $this->axis[self::DIMENSION_X] = array(); $this->axis[self::DIMENSION_Y] = array(); } return $this->axis; }
php
{ "resource": "" }
q608
DocumentBuilder.removeWatermark
train
public function removeWatermark($fileName) { //check whether files are set or not if ($fileName == '') throw new Exception('File not specified'); //build URI to insert watermark image $strURI = Product::$baseProductUri . '/words/' . $fileName . '/watermark'; ...
php
{ "resource": "" }
q609
DocumentBuilder.insertWatermarkText
train
public function insertWatermarkText($fileName, $text, $rotationAngle) { //check whether files are set or not if ($fileName == '') throw new Exception('File not specified'); //Build JSON to post $fieldsArray = array('Text' => $text, 'RotationAngle' => $rotationAngle); ...
php
{ "resource": "" }
q610
DocumentBuilder.replaceText
train
public function replaceText($fileName, $oldValue, $newValue, $isMatchCase, $isMatchWholeWord) { //check whether files are set or not if ($fileName == '') throw new Exception('File not specified'); //Build JSON to post $fieldsArray = array('OldValue' => $oldValue, 'NewVal...
php
{ "resource": "" }
q611
DestroyAttributeValue.handle
train
public function handle(AttributeValueRepository $attributeValueRepository, Dispatcher $event) { $attributeValue = $attributeValueRepository->find($this->id); $attributeValueRepository->destroy($attributeValue); $event->fire(new AttributeValueWasDestroyed($attributeValue)); return ...
php
{ "resource": "" }
q612
Validator.cleanUp
train
static function cleanUp( $string ) { if ( NORMALIZE_INTL ) { $string = self::replaceForNativeNormalize( $string ); $norm = normalizer_normalize( $string, Normalizer::FORM_C ); if ( $norm === null || $norm === false ) { # normalizer_normalize will either return false or null # (depending on which doc ...
php
{ "resource": "" }
q613
Validator.toNFC
train
static function toNFC( $string ) { if ( NORMALIZE_INTL ) { return normalizer_normalize( $string, Normalizer::FORM_C ); } elseif ( self::quickIsNFC( $string ) ) { return $string; } else { return self::NFC( $string ); } }
php
{ "resource": "" }
q614
Validator.toNFD
train
static function toNFD( $string ) { if ( NORMALIZE_INTL ) { return normalizer_normalize( $string, Normalizer::FORM_D ); } elseif ( preg_match( '/[\x80-\xff]/', $string ) ) { return self::NFD( $string ); } else { return $string; } }
php
{ "resource": "" }
q615
Validator.toNFKC
train
static function toNFKC( $string ) { if ( NORMALIZE_INTL ) { return normalizer_normalize( $string, Normalizer::FORM_KC ); } elseif ( preg_match( '/[\x80-\xff]/', $string ) ) { return self::NFKC( $string ); } else { return $string; } }
php
{ "resource": "" }
q616
Validator.toNFKD
train
static function toNFKD( $string ) { if ( NORMALIZE_INTL ) { return normalizer_normalize( $string, Normalizer::FORM_KD ); } elseif ( preg_match( '/[\x80-\xff]/', $string ) ) { return self::NFKD( $string ); } else { return $string; } }
php
{ "resource": "" }
q617
Validator.fastCombiningSort
train
static function fastCombiningSort( $string ) { self::loadData(); $len = strlen( $string ); $out = ''; $combiners = []; $lastClass = -1; for ( $i = 0; $i < $len; $i++ ) { $c = $string[$i]; $n = ord( $c ); if ( $n >= 0x80 ) { if ( $n >= 0xf0 ) { $c = substr( $string, $i, 4 ); $i += 3; ...
php
{ "resource": "" }
q618
Validator.placebo
train
static function placebo( $string ) { $len = strlen( $string ); $out = ''; for ( $i = 0; $i < $len; $i++ ) { $out .= $string[$i]; } return $out; }
php
{ "resource": "" }
q619
Validator.replaceForNativeNormalize
train
private static function replaceForNativeNormalize( $string ) { $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', Constants::UTF8_REPLACEMENT, $string ); $string = str_replace( Constants::UTF8_FFFE, Constants::UTF8_REPLACEMENT, $string ); $string = str_replace( Constants::UTF8_FFFF, Constants::UTF...
php
{ "resource": "" }
q620
Redirects.seeRedirectBetween
train
public function seeRedirectBetween($oldUrl, $newUrl, $statusCode) { // We must not follow all redirects, so save current situation, // force disable follow redirects, and revert at the end. $followsRedirects = $this->isFollowingRedirects(); $this->followRedirects(false); $re...
php
{ "resource": "" }
q621
Redirects.urlDoesNotRedirect
train
public function urlDoesNotRedirect($url) { if ('/' === $url) { $url = ''; } // We must not follow all redirects, so save current situation, // force disable follow redirects, and revert at the end. $followsRedirects = $this->isFollowingRedirects(); $this-...
php
{ "resource": "" }
q622
Redirects.sendHeadAndGetResponse
train
protected function sendHeadAndGetResponse($url) { /** @var REST $rest */ $rest = $this->getModule('REST'); $rest->sendHEAD($url); return $rest->client->getInternalResponse(); }
php
{ "resource": "" }
q623
FormFieldExtension.setCalendarConfig
train
public function setCalendarConfig($arg1, $arg2 = null) { if (is_array($arg1)) { $this->calendarConfig = $arg1; } else { $this->calendarConfig[$arg1] = $arg2; } return $this; }
php
{ "resource": "" }
q624
FormFieldExtension.getCalendarConfig
train
public function getCalendarConfig($name = null) { if (!is_null($name)) { return isset($this->calendarConfig[$name]) ? $this->calendarConfig[$name] : null; } return $this->calendarConfig; }
php
{ "resource": "" }
q625
FormFieldExtension.updateAttributes
train
public function updateAttributes(&$attributes) { $attributes['data-calendar-config'] = $this->owner->getCalendarConfigJSON(); $attributes['data-calendar-enabled'] = $this->owner->getCalendarEnabled(); }
php
{ "resource": "" }
q626
FormFieldExtension.getCalendarEnabled
train
public function getCalendarEnabled() { if ($this->owner->isReadonly() || $this->owner->isDisabled()) { return 'false'; } return ($this->calendarDisabled || $this->owner->config()->calendar_disabled) ? 'false' : 'true'; }
php
{ "resource": "" }
q627
Extractor.getImageCount
train
public function getImageCount($pageNumber) { $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/images'; $signedURI = Utils::sign($strURI); $responseStream = Utils::processCommand($signedURI, 'GET', '', ''); $json = json_decode($res...
php
{ "resource": "" }
q628
Item.compare
train
public static function compare(Item $a, Item $b): int { return Symbol::compare($a->subject, $b->subject) ?: Symbol::compareList($a->passed, $b->passed) ?: Symbol::compareList($a->further, $b->further) ?: ($b->eof - $a->eof); }
php
{ "resource": "" }
q629
Item.createFromRule
train
public static function createFromRule(Rule $rule): self { return new static( $rule->getSubject(), [], $rule->getDefinition(), $rule->hasEofMark(), $rule->getTag() ); }
php
{ "resource": "" }
q630
Item.shift
train
public function shift(): ?self { $further = $this->further; if (!$further) { return null; } $passed = $this->passed; $passed[] = array_shift($further); return new static($this->subject, $passed, $further, $this->eof, $this->tag); }
php
{ "resource": "" }
q631
Item.getAsRule
train
public function getAsRule(): Rule { return new Rule( $this->subject, array_merge($this->passed, $this->further), $this->eof, $this->tag ); }
php
{ "resource": "" }
q632
WeChatAudioDriver.getAudio
train
private function getAudio() { $audioUrl = 'http://file.api.wechat.com/cgi-bin/media/get?access_token='.$this->getAccessToken().'&media_id='.$this->event->get('MediaId'); return [new Audio($audioUrl, $this->event)]; }
php
{ "resource": "" }
q633
File.getFile
train
public function getFile($fileName, $storageName = '') { //check whether file is set or not if ($fileName == '') { AsposeApp::getLogger()->error(Exception::MSG_NO_FILENAME); throw new Exception(Exception::MSG_NO_FILENAME); } //build URI $strUR...
php
{ "resource": "" }
q634
File.copyFile
train
public function copyFile($fileName, $storageName = '', $newDest) { //check whether file is set or not if ($fileName == '' || $newDest == '') { AsposeApp::getLogger()->error(Exception::MSG_NO_FILENAME); throw new Exception(Exception::MSG_NO_FILENAME); } ...
php
{ "resource": "" }
q635
TextEditor.findText
train
public function findText() { $parameters = func_get_args(); //set parameter values if (count($parameters) == 1) { $text = $parameters[0]; } else if (count($parameters) == 2) { $WorkSheetName = $parameters[0]; $text = $parameters[1]; } else...
php
{ "resource": "" }
q636
TextEditor.getTextItems
train
public function getTextItems() { $parameters = func_get_args(); //set parameter values if (count($parameters) > 0) { $worksheetName = $parameters[0]; } $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . ((isset($parameters[0])) ? '/worksheets/...
php
{ "resource": "" }
q637
Product.getMaximumInstallmentQuantity
train
public function getMaximumInstallmentQuantity() { $product = $this->getProduct() ? $this->getProduct() : $this->getParentBlock()->getProduct(); $maximumInstallment = $this->getMaximumInstallment($product); return $maximumInstallment->getMaximumInstallmentsQuantity(); }
php
{ "resource": "" }
q638
Parser.parse
train
public function parse(string $input, $actions = []): TreeNodeInterface { if ($actions instanceof ActionsMap) { $actions_map = $actions; } elseif ($actions) { $actions_map = new ActionsMap($actions); } else { $actions_map = null; } $stack =...
php
{ "resource": "" }
q639
ChartEditor.addChart
train
public function addChart($chartType, $upperLeftRow, $upperLeftColumn, $lowerRightRow, $lowerRightColumn) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cell...
php
{ "resource": "" }
q640
ChartEditor.deleteCharts
train
public function deleteCharts() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/cha...
php
{ "resource": "" }
q641
ChartEditor.readChartLegend
train
public function readChartLegend($chartIndex) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->workshe...
php
{ "resource": "" }
q642
ChartEditor.getChartArea
train
public function getChartArea($chartIndex) { $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/charts/' . $chartIndex . '/chartArea'; $signedURI = Utils::sign($strURI); $responseStream = Utils::processCommand($signedURI, 'GET', '...
php
{ "resource": "" }
q643
ChartEditor.getFillFormat
train
public function getFillFormat($chartIndex) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheet...
php
{ "resource": "" }
q644
ChartEditor.getBorder
train
public function getBorder($chartIndex) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName...
php
{ "resource": "" }
q645
ChartEditor.setChartTitle
train
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'); ...
php
{ "resource": "" }
q646
ChartEditor.deleteChartTitle
train
public function deleteChartTitle($chartIndex) { //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'); ...
php
{ "resource": "" }
q647
ConnectionPool.close
train
public function close() { $this->closed = true; foreach ($this->connections as $connection) { $connection->close(); } $this->idle = new \SplQueue; if ($this->deferred instanceof Deferred) { $deferred = $this->deferred; $this->deferred = nu...
php
{ "resource": "" }
q648
ConnectionPool.prepareStatement
train
private function prepareStatement(string $sql): \Generator { $connection = yield from $this->pop(); \assert($connection instanceof Link); try { $statement = yield $connection->prepare($sql); \assert($statement instanceof Statement); } catch (\Throwable $excep...
php
{ "resource": "" }
q649
Table.prepareStates
train
protected function prepareStates(Grammar $grammar): void { /** @var TableRow[] $rows */ $rows = []; /** @var ItemSet[] $states */ $states = []; $item = Item::createFromRule($grammar->getMainRule()); $item_set = ItemSet::createFromItems([$item], $grammar); /** ...
php
{ "resource": "" }
q650
DestroyProductType.handle
train
public function handle(ProductTypeRepository $productTypeRepository, Dispatcher $event) { $productType = $productTypeRepository->find($this->id); // TODO : Check if the product type is in use $productTypeRepository->destroy($productType); $event->fire(new ProductTypeWasDestroyed($...
php
{ "resource": "" }
q651
UserHasAccount.checkFlag
train
public function checkFlag(array $context): bool { if (!isset($context['user'])) { throw new \InvalidArgumentException(sprintf('The context parameter must contain a "user" key to be able to evaluate the %s flag.', $this->getName())); } $user = $context['user']; if (is_str...
php
{ "resource": "" }
q652
RouteServiceProvider.loadCachedRoutes
train
protected function loadCachedRoutes() { $this->app['events']->fire('routes.loading'); require $this->app->getCachedRoutesPath(); $this->app['events']->fire('routes.loaded'); }
php
{ "resource": "" }
q653
CasAuthenticator.start
train
public function start(Request $request, AuthenticationException $authException = null) { //The URL have to be completed by the current request uri, // because Cas Server need to know where redirect user after authentication. return new RedirectResponse($this->cas->getUri().$request->getUri()...
php
{ "resource": "" }
q654
CasAuthenticator.onLogoutSuccess
train
public function onLogoutSuccess(Request $request) { phpCAS::setDebug($this->cas->getDebug()); phpCAS::setVerbose($this->cas->isVerbose()); if (!phpCAS::isInitialized()) { phpCAS::client( $this->cas->getVersion(), $this->cas->getHostname(), ...
php
{ "resource": "" }
q655
Converter.convert
train
public function convert($folder = null) { //build URI $strURI = Product::$baseProductUri . '/words/' . $this->getFileName() . '?format=' . $this->saveFormat; if ($folder) { $strURI = $strURI . "&folder=" . urlencode($folder); } //sign URI $signedURI = Uti...
php
{ "resource": "" }
q656
Converter.convertLocalFile
train
public function convertLocalFile($inputPath, $outputPath, $outputFormat) { $str_uri = Product::$baseProductUri . '/words/convert?format=' . $outputFormat; $signed_uri = Utils::sign($str_uri); $responseStream = Utils::uploadFileBinary($signed_uri, $inputPath, 'xml'); $v_output = Util...
php
{ "resource": "" }
q657
Converter.convertWebPages
train
public function convertWebPages($strXML) { if ($strXML == '') throw new Exception('XML not specified'); //build URI $strURI = Product::$baseProductUri . '/words/loadWebDocument'; //sign URI $signedURI = Utils::sign($strURI); ...
php
{ "resource": "" }
q658
UpdateProduct.handle
train
public function handle(ProductRepository $productRepository, Dispatcher $event) { $product = $productRepository->find($this->id)->fill(array_except(get_object_vars($this), ['attributes'])); $productRepository->save($product, $this->attributes); $event->fire(new ProductWasUpdated($product))...
php
{ "resource": "" }
q659
Logger.log
train
public function log($level, $message, array $context = array()) { if ($this->outputIsUrgent($level) || $this->isEnabled()) { $this->dispatch($message, $context); } }
php
{ "resource": "" }
q660
Logger.formatFileLine
train
private function formatFileLine($string) { $format = $this->getOption('dateFormat') . $this->getOption('delimiter'); return date($format) . $string; }
php
{ "resource": "" }
q661
Logger.dispatch
train
private function dispatch($message, $context) { $output = $this->interpolate($message, $context) . PHP_EOL; if ($this->getOption('outputToFile') === true) { $file = $this->getOption('logFile'); if (!is_writable($file)) { throw new AsposeCloudException('The f...
php
{ "resource": "" }
q662
MessageDefaults.allKeys
train
public static function allKeys() { static $allKeys = null; if (is_null($allKeys)) { $allKeys = array_values((new ReflectionClass(get_called_class()))->getConstants()); } return $allKeys; }
php
{ "resource": "" }
q663
WebHookHandler.setLogger
train
public function setLogger($logger) { if(!in_array('Psr\Log\LoggerInterface', class_implements($logger, true))) { throw new \InvalidArgumentException('Logger object does not implement Psr\Log\LoggerInterface'); } $this->logger = $logger; }
php
{ "resource": "" }
q664
WebHookHandler.setInput
train
public function setInput($input, $isDecoded = false) { if(!$isDecoded) $input = json_decode($input, true); if(!$input) { if($this->logger) $this->logger->error('Could not decode input', array('input' => $input)); throw new WebHookHandlerException('Could not decode input', WebHookHandlerException::INPUT_DEC...
php
{ "resource": "" }
q665
WebHookHandler.getInputFromHTTP
train
private function getInputFromHTTP() { if($this->logger) $this->logger->debug('Getting and decoding HTTP request body'); $input = file_get_contents('php://input'); $this->setInput($input); return $this->input; }
php
{ "resource": "" }
q666
WebHookHandler.ensureInput
train
private function ensureInput() { if(!$this->input) { $this->getInputFromHTTP(); if(!$this->input) throw new WebHookHandlerException('Could not fetch input', WebHookHandlerException::INPUT_FETCH_FAILED); } }
php
{ "resource": "" }
q667
WebHookHandler.getTimestamp
train
public function getTimestamp($format = self::TIMESTAMP_FORMAT_RFC1123) { $this->ensureInput(); if(!isset($this->input['timestamp'])) return null; switch($format) { case static::TIMESTAMP_FORMAT_UNIX: return strtotime($this->input['timestamp']); case static::TIMESTAMP_FORMAT_RFC1123: default: retu...
php
{ "resource": "" }
q668
WebHookHandler.getPayload
train
public function getPayload() { if($this->payload) return $this->payload; $this->ensureInput(); if(empty($this->input['payload'])) { if($this->logger) $this->logger->error('No payload in input data'); throw new WebHookHandlerException('No payload in input data', WebHookHandlerException::NO_PAYLOAD); } ...
php
{ "resource": "" }
q669
WebHookHandler.verifyHash
train
public function verifyHash() { $this->ensureInput(); if(empty($this->input['hash'])) throw new WebHookHandlerException('No hash provided in input payload', WebHookHandlerException::NO_INPUT_HASH); if($this->input['payloadEncrypted']) { if(!$this->payloadJSONString && !$this->getPayload()) return false; ...
php
{ "resource": "" }
q670
WebHookHandler.sendExceptionResponse
train
public function sendExceptionResponse(WebHookHandlerException $e) { $httpCode = '400 Bad Request'; switch($e->getCode()) { case WebHookHandlerException::NO_PRIVATE_KEY: $httpCode = '500 Internal Server Error'; break; case WebHookHandlerException::INVALID_DECRYPTED_JSON: case WebHookHandlerException...
php
{ "resource": "" }
q671
QuoteToOrder.execute
train
public function execute(Observer $observer) { $quote = $observer->getQuote(); $order = $observer->getOrder(); $order ->setGabrielqsInstallmentsQty($quote->getGabrielqsInstallmentsQty()) ->setGabrielqsInstallmentsInterestRate($quote->getGabrielqsInstallmentsInterestRa...
php
{ "resource": "" }
q672
ItemSet.createFromItems
train
public static function createFromItems(array $items, Grammar $grammar): self { $final_items = []; $new_items = $items; /** @var Symbol $known_next_symbols */ $known_next_symbols = []; while ($new_items) { /** @var Symbol $next_symbols */ $next_symbols ...
php
{ "resource": "" }
q673
ItemSet.getNextSets
train
public function getNextSets(Grammar $grammar): array { $next_map = []; foreach ($this->items as $item) { $symbol = $item->getExpected(); if (!$symbol) { continue; } $name = $symbol->getName(); $next_item = $item->shift(); ...
php
{ "resource": "" }
q674
ItemSet.hasItem
train
public function hasItem(Item $item, bool $initialOnly = true): bool { $list = ($initialOnly) ? $this->initialItems : $this->items; foreach ($list as $my_item) { if (0 === Item::compare($my_item, $item)) { return true; } } return false; }
php
{ "resource": "" }
q675
ItemSet.hasFinalItem
train
public function hasFinalItem(): bool { foreach ($this->items as $item) { if ($item->hasEofMark() && !$item->hasFurther()) { return true; } } return false; }
php
{ "resource": "" }
q676
ItemSet.getReduceRule
train
public function getReduceRule(): ?Rule { foreach ($this->items as $item) { if (!$item->hasFurther()) { return $item->getAsRule(); } } return null; }
php
{ "resource": "" }
q677
ItemSet.isSame
train
public function isSame(ItemSet $that): bool { if (count($this->items) !== count($that->items)) { return false; } foreach ($this->items as $i => $item) { if (0 !== Item::compare($item, $that->items[$i])) { return false; } } r...
php
{ "resource": "" }
q678
ItemSet.validateDeterministic
train
private function validateDeterministic(Grammar $grammar): void { /** @var Item[] */ $finite = []; $terminals = []; $non_terminals = []; foreach ($this->items as $item) { $next_symbol = $item->getExpected(); if (!$next_symbol) { $finite[...
php
{ "resource": "" }
q679
ItemSet.validateDeterministicShiftReduce
train
private function validateDeterministicShiftReduce( array $finite, array $terminals, array $nonTerminals, Grammar $grammar ): void { if ($finite && $terminals) { $left_terminals = $grammar->getTerminals(); foreach ($terminals as $item) { ...
php
{ "resource": "" }
q680
Worksheet.getCellsList
train
public function getCellsList($offset, $count) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $...
php
{ "resource": "" }
q681
Worksheet.getRowsList
train
public function getRowsList() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetN...
php
{ "resource": "" }
q682
Worksheet.getColumnsList
train
public function getColumnsList() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->workshe...
php
{ "resource": "" }
q683
Worksheet.getMaxColumn
train
public function getMaxColumn($offset, $count) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $...
php
{ "resource": "" }
q684
Worksheet.getAutoShapesCount
train
public function getAutoShapesCount() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->wor...
php
{ "resource": "" }
q685
Worksheet.getAutoShapeByIndex
train
public function getAutoShapeByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $th...
php
{ "resource": "" }
q686
Worksheet.getChartsCount
train
public function getChartsCount() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->workshe...
php
{ "resource": "" }
q687
Worksheet.getChartByIndex
train
public function getChartByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->...
php
{ "resource": "" }
q688
Worksheet.getHyperlinksCount
train
public function getHyperlinksCount() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->wor...
php
{ "resource": "" }
q689
Worksheet.getHyperlinkByIndex
train
public function getHyperlinkByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $th...
php
{ "resource": "" }
q690
Worksheet.deleteHyperlinkByIndex
train
public function deleteHyperlinkByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . ...
php
{ "resource": "" }
q691
Worksheet.addHyperlink
train
public function addHyperlink($firstRow, $firstColumn, $totalRows, $totalColumns, $url) { //check whether worksheet name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); if ($firstRow == '') throw new Exception('First...
php
{ "resource": "" }
q692
Worksheet.updateHyperlink
train
public function updateHyperlink($hyperlinkIndex, $url, $screenTip, $displayText) { //check whether worksheet name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); if ($hyperlinkIndex == '') throw new Exception('Hyper...
php
{ "resource": "" }
q693
Worksheet.getComment
train
public function getComment($cellName) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->wo...
php
{ "resource": "" }
q694
Worksheet.getOleObjectByIndex
train
public function getOleObjectByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $th...
php
{ "resource": "" }
q695
Worksheet.getPictureByIndex
train
public function getPictureByIndex($index) { //check whether worksheet name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this...
php
{ "resource": "" }
q696
Worksheet.getValidationByIndex
train
public function getValidationByIndex($index) { //check whether worksheet name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $t...
php
{ "resource": "" }
q697
Worksheet.getMergedCellByIndex
train
public function getMergedCellByIndex($index) { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $t...
php
{ "resource": "" }
q698
Worksheet.getMergedCellsCount
train
public function getMergedCellsCount() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->wo...
php
{ "resource": "" }
q699
Worksheet.getValidationsCount
train
public function getValidationsCount() { //check whether workshett name is set or not if ($this->worksheetName == '') throw new Exception('Worksheet name not specified'); $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->wo...
php
{ "resource": "" }