repo
stringclasses
21 values
path
stringlengths
10
100
func_name
stringlengths
6
71
original_string
stringlengths
115
97k
language
stringclasses
1 value
code
stringlengths
115
97k
code_tokens
listlengths
27
7.5k
docstring
stringlengths
6
1.88k
docstring_tokens
listlengths
1
177
sha
stringclasses
21 values
url
stringlengths
100
189
partition
stringclasses
1 value
summary
stringlengths
9
340
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
matomo-org/matomo
plugins/PrivacyManager/ReportsPurger.php
ReportsPurger.shouldReportBePurged
public static function shouldReportBePurged($reportDateYear, $reportDateMonth, $toRemoveDate) { $toRemoveYear = (int)$toRemoveDate->toString('Y'); $toRemoveMonth = (int)$toRemoveDate->toString('m'); return $reportDateYear < $toRemoveYear || ($reportDateYear == $toRemoveYear && $repo...
php
public static function shouldReportBePurged($reportDateYear, $reportDateMonth, $toRemoveDate) { $toRemoveYear = (int)$toRemoveDate->toString('Y'); $toRemoveMonth = (int)$toRemoveDate->toString('m'); return $reportDateYear < $toRemoveYear || ($reportDateYear == $toRemoveYear && $repo...
[ "public", "static", "function", "shouldReportBePurged", "(", "$", "reportDateYear", ",", "$", "reportDateMonth", ",", "$", "toRemoveDate", ")", "{", "$", "toRemoveYear", "=", "(", "int", ")", "$", "toRemoveDate", "->", "toString", "(", "'Y'", ")", ";", "$", ...
Returns true if a report with the given year & month should be purged or not. @param int $reportDateYear The year of the report in question. @param int $reportDateMonth The month of the report in question. @param Date $toRemoveDate The date a report must be older than in order to be purged. @return bool
[ "Returns", "true", "if", "a", "report", "with", "the", "given", "year", "&", "month", "should", "be", "purged", "or", "not", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/ReportsPurger.php#L250-L257
train
Checks if a report should be purged
[ 30522, 2270, 10763, 3853, 2323, 2890, 6442, 4783, 5311, 5999, 1006, 1002, 3189, 13701, 29100, 1010, 1002, 3189, 13701, 9629, 2232, 1010, 1002, 9538, 5302, 28614, 2618, 1007, 1063, 1002, 9538, 5302, 12417, 14644, 1027, 1006, 20014, 1007, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Style.php
Style.get_font_size
function get_font_size() { if ($this->__font_size_calculated) { return $this->_props["font_size"]; } if (!isset($this->_props["font_size"])) { $fs = self::$_defaults["font_size"]; } else { $fs = $this->_props["font_size"]; } if (...
php
function get_font_size() { if ($this->__font_size_calculated) { return $this->_props["font_size"]; } if (!isset($this->_props["font_size"])) { $fs = self::$_defaults["font_size"]; } else { $fs = $this->_props["font_size"]; } if (...
[ "function", "get_font_size", "(", ")", "{", "if", "(", "$", "this", "->", "__font_size_calculated", ")", "{", "return", "$", "this", "->", "_props", "[", "\"font_size\"", "]", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "_props", "[", ...
Returns the resolved font size, in points @link http://www.w3.org/TR/CSS21/fonts.html#propdef-font-size @return float
[ "Returns", "the", "resolved", "font", "size", "in", "points" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1007-L1062
train
Return the font size
[ 30522, 3853, 2131, 1035, 15489, 1035, 2946, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 1035, 15489, 1035, 2946, 1035, 10174, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 24387, 1031, 1000, 15489, 1035, 2946, 1000, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/WidgetsProvider.php
WidgetsProvider.getWidgetContainerConfigs
public function getWidgetContainerConfigs() { $configs = array(); $widgetContainerConfigs = $this->getAllWidgetContainerConfigClassNames(); foreach ($widgetContainerConfigs as $widgetClass) { $configs[] = StaticContainer::get($widgetClass); } return $configs; ...
php
public function getWidgetContainerConfigs() { $configs = array(); $widgetContainerConfigs = $this->getAllWidgetContainerConfigClassNames(); foreach ($widgetContainerConfigs as $widgetClass) { $configs[] = StaticContainer::get($widgetClass); } return $configs; ...
[ "public", "function", "getWidgetContainerConfigs", "(", ")", "{", "$", "configs", "=", "array", "(", ")", ";", "$", "widgetContainerConfigs", "=", "$", "this", "->", "getAllWidgetContainerConfigClassNames", "(", ")", ";", "foreach", "(", "$", "widgetContainerConfi...
Get all existing widget container configs. @return WidgetContainerConfig[]
[ "Get", "all", "existing", "widget", "container", "configs", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/WidgetsProvider.php#L76-L86
train
Get all WidgetContainerConfigs
[ 30522, 2270, 3853, 2131, 9148, 24291, 8663, 18249, 2121, 8663, 8873, 5620, 1006, 1007, 1063, 1002, 9530, 8873, 5620, 1027, 9140, 1006, 1007, 1025, 1002, 15536, 24291, 8663, 18249, 2121, 8663, 8873, 5620, 1027, 1002, 2023, 1011, 1028, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/AnnotationList.php
AnnotationList.canUserModifyOrDelete
public static function canUserModifyOrDelete($idSite, $annotation) { // user can save if user is admin or if has view access, is not anonymous & is user who wrote note $canEdit = Piwik::isUserHasWriteAccess($idSite) || (!Piwik::isUserIsAnonymous() && Piwik::getCurrentUser...
php
public static function canUserModifyOrDelete($idSite, $annotation) { // user can save if user is admin or if has view access, is not anonymous & is user who wrote note $canEdit = Piwik::isUserHasWriteAccess($idSite) || (!Piwik::isUserIsAnonymous() && Piwik::getCurrentUser...
[ "public", "static", "function", "canUserModifyOrDelete", "(", "$", "idSite", ",", "$", "annotation", ")", "{", "// user can save if user is admin or if has view access, is not anonymous & is user who wrote note", "$", "canEdit", "=", "Piwik", "::", "isUserHasWriteAccess", "(", ...
Returns true if the current user can modify or delete a specific annotation. A user can modify/delete a note if the user has write access for the site OR the user has view access, is not the anonymous user and is the user that created the note in question. @param int $idSite The site ID the annotation belongs to. @pa...
[ "Returns", "true", "if", "the", "current", "user", "can", "modify", "or", "delete", "a", "specific", "annotation", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/AnnotationList.php#L389-L396
train
Can user modify or delete
[ 30522, 2270, 10763, 3853, 2064, 20330, 5302, 4305, 12031, 8551, 12260, 2618, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 5754, 17287, 3508, 1007, 1063, 1013, 1013, 5310, 2064, 3828, 2065, 5310, 2003, 4748, 10020, 2030, 2065, 2038, 3193, 3229...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
ContainerBuilder.getAlias
public function getAlias($id) { $id = (string) $id; if (!isset($this->aliasDefinitions[$id])) { throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id)); } return $this->aliasDefinitions[$id]; }
php
public function getAlias($id) { $id = (string) $id; if (!isset($this->aliasDefinitions[$id])) { throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id)); } return $this->aliasDefinitions[$id]; }
[ "public", "function", "getAlias", "(", "$", "id", ")", "{", "$", "id", "=", "(", "string", ")", "$", "id", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "aliasDefinitions", "[", "$", "id", "]", ")", ")", "{", "throw", "new", "InvalidArgum...
Gets an alias. @param string $id The service identifier @return Alias An Alias instance @throws InvalidArgumentException if the alias does not exist
[ "Gets", "an", "alias", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L900-L909
train
Get alias definition
[ 30522, 2270, 3853, 2131, 22786, 2015, 1006, 1002, 8909, 1007, 1063, 1002, 8909, 1027, 1006, 5164, 1007, 1002, 8909, 1025, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 14593, 3207, 16294, 22753, 2015, 1031, 1002, 8909, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Guess/Guess.php
Guess.getBestGuess
public static function getBestGuess(array $guesses) { $result = null; $maxConfidence = -1; foreach ($guesses as $guess) { if ($maxConfidence < $confidence = $guess->getConfidence()) { $maxConfidence = $confidence; $result = $guess; } ...
php
public static function getBestGuess(array $guesses) { $result = null; $maxConfidence = -1; foreach ($guesses as $guess) { if ($maxConfidence < $confidence = $guess->getConfidence()) { $maxConfidence = $confidence; $result = $guess; } ...
[ "public", "static", "function", "getBestGuess", "(", "array", "$", "guesses", ")", "{", "$", "result", "=", "null", ";", "$", "maxConfidence", "=", "-", "1", ";", "foreach", "(", "$", "guesses", "as", "$", "guess", ")", "{", "if", "(", "$", "maxConfi...
Returns the guess most likely to be correct from a list of guesses. If there are multiple guesses with the same, highest confidence, the returned guess is any of them. @param Guess[] $guesses An array of guesses @return self|null
[ "Returns", "the", "guess", "most", "likely", "to", "be", "correct", "from", "a", "list", "of", "guesses", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Guess/Guess.php#L67-L80
train
Returns the best guess
[ 30522, 2270, 10763, 3853, 2131, 12681, 2102, 22967, 2015, 1006, 9140, 1002, 3984, 2229, 1007, 1063, 1002, 2765, 1027, 19701, 1025, 1002, 4098, 8663, 20740, 5897, 1027, 1011, 1015, 1025, 18921, 6776, 1006, 1002, 3984, 2229, 2004, 1002, 3984,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/FlexObject.php
FlexObject.filterElements
protected function filterElements(array &$elements): void { if (!empty($elements['storage_key'])) { $this->_storage['storage_key'] = trim($elements['storage_key']); } if (!empty($elements['storage_timestamp'])) { $this->_storage['storage_timestamp'] = (int)$elements['...
php
protected function filterElements(array &$elements): void { if (!empty($elements['storage_key'])) { $this->_storage['storage_key'] = trim($elements['storage_key']); } if (!empty($elements['storage_timestamp'])) { $this->_storage['storage_timestamp'] = (int)$elements['...
[ "protected", "function", "filterElements", "(", "array", "&", "$", "elements", ")", ":", "void", "{", "if", "(", "!", "empty", "(", "$", "elements", "[", "'storage_key'", "]", ")", ")", "{", "$", "this", "->", "_storage", "[", "'storage_key'", "]", "="...
Filter data coming to constructor or $this->update() request. NOTE: The incoming data can be an arbitrary array so do not assume anything from its content. @param array $elements
[ "Filter", "data", "coming", "to", "constructor", "or", "$this", "-", ">", "update", "()", "request", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexObject.php#L844-L854
train
Filter elements to keep the original storage key and timestamp
[ 30522, 5123, 3853, 11307, 12260, 8163, 1006, 9140, 1004, 1002, 3787, 1007, 1024, 11675, 1063, 2065, 1006, 999, 4064, 1006, 1002, 3787, 1031, 1005, 5527, 1035, 3145, 1005, 1033, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 5527, 1031, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Field.php
Field.resetElementClassName
public function resetElementClassName(string $className, string $resetClassName) { if (($key = array_search($className, $this->getElementClass())) !== false) { $this->elementClass[$key] = $resetClassName; } return $this; }
php
public function resetElementClassName(string $className, string $resetClassName) { if (($key = array_search($className, $this->getElementClass())) !== false) { $this->elementClass[$key] = $resetClassName; } return $this; }
[ "public", "function", "resetElementClassName", "(", "string", "$", "className", ",", "string", "$", "resetClassName", ")", "{", "if", "(", "(", "$", "key", "=", "array_search", "(", "$", "className", ",", "$", "this", "->", "getElementClass", "(", ")", ")"...
reset field className. @param string $className @param string $resetClassName @return $this
[ "reset", "field", "className", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field.php#L1062-L1069
train
Reset the element class name
[ 30522, 2270, 3853, 25141, 12260, 3672, 26266, 18442, 1006, 5164, 1002, 2465, 18442, 1010, 5164, 1002, 25141, 26266, 18442, 1007, 1063, 2065, 1006, 1006, 1002, 3145, 1027, 9140, 1035, 3945, 1006, 1002, 2465, 18442, 1010, 1002, 2023, 1011, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Kernel/Clauses/Clause.php
Clause.interceptWhereClause
protected function interceptWhereClause($payload) { foreach ($this->clauses['where'] as $item) { list($key, $value) = $item; if (isset($payload[$key]) && $payload[$key] !== $value) { return true; } } }
php
protected function interceptWhereClause($payload) { foreach ($this->clauses['where'] as $item) { list($key, $value) = $item; if (isset($payload[$key]) && $payload[$key] !== $value) { return true; } } }
[ "protected", "function", "interceptWhereClause", "(", "$", "payload", ")", "{", "foreach", "(", "$", "this", "->", "clauses", "[", "'where'", "]", "as", "$", "item", ")", "{", "list", "(", "$", "key", ",", "$", "value", ")", "=", "$", "item", ";", ...
@param mixed $payload @return bool
[ "@param", "mixed", "$payload" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Clauses/Clause.php#L56-L64
train
Intercepts where clause
[ 30522, 5123, 3853, 19115, 2860, 5886, 8586, 28128, 2063, 1006, 1002, 18093, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 24059, 1031, 1005, 2073, 1005, 1033, 2004, 1002, 8875, 1007, 1063, 2862, 1006, 1002, 3145, 1010, 1002, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/LocationProvider/GeoIp.php
GeoIp.getRegionNames
public static function getRegionNames() { if (is_null(self::$regionNames)) { $GEOIP_REGION_NAME = array(); require_once PIWIK_INCLUDE_PATH . '/libs/MaxMindGeoIP/geoipregionvars.php'; self::$regionNames = $GEOIP_REGION_NAME; } return self::$regionNames; ...
php
public static function getRegionNames() { if (is_null(self::$regionNames)) { $GEOIP_REGION_NAME = array(); require_once PIWIK_INCLUDE_PATH . '/libs/MaxMindGeoIP/geoipregionvars.php'; self::$regionNames = $GEOIP_REGION_NAME; } return self::$regionNames; ...
[ "public", "static", "function", "getRegionNames", "(", ")", "{", "if", "(", "is_null", "(", "self", "::", "$", "regionNames", ")", ")", "{", "$", "GEOIP_REGION_NAME", "=", "array", "(", ")", ";", "require_once", "PIWIK_INCLUDE_PATH", ".", "'/libs/MaxMindGeoIP/...
Returns an array of region names mapped by country code & region code. @return array
[ "Returns", "an", "array", "of", "region", "names", "mapped", "by", "country", "code", "&", "region", "code", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider/GeoIp.php#L166-L175
train
Get all region names
[ 30522, 2270, 10763, 3853, 2131, 23784, 18442, 2015, 1006, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 2969, 1024, 1024, 1002, 2555, 18442, 2015, 1007, 1007, 1063, 1002, 20248, 11514, 1035, 2555, 1035, 2171, 1027, 9140, 1006, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/GeoIp2/GeoIP2AutoUpdater.php
GeoIP2AutoUpdater.getSchedulePeriod
public static function getSchedulePeriod() { $period = Option::get(self::SCHEDULE_PERIOD_OPTION_NAME); if ($period === false) { $period = self::SCHEDULE_PERIOD_MONTHLY; } return $period; }
php
public static function getSchedulePeriod() { $period = Option::get(self::SCHEDULE_PERIOD_OPTION_NAME); if ($period === false) { $period = self::SCHEDULE_PERIOD_MONTHLY; } return $period; }
[ "public", "static", "function", "getSchedulePeriod", "(", ")", "{", "$", "period", "=", "Option", "::", "get", "(", "self", "::", "SCHEDULE_PERIOD_OPTION_NAME", ")", ";", "if", "(", "$", "period", "===", "false", ")", "{", "$", "period", "=", "self", "::...
Returns the configured update period, either 'week' or 'month'. Defaults to 'month'. @return string
[ "Returns", "the", "configured", "update", "period", "either", "week", "or", "month", ".", "Defaults", "to", "month", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/GeoIp2/GeoIP2AutoUpdater.php#L416-L423
train
Get the scheduler period
[ 30522, 2270, 10763, 3853, 4152, 7690, 9307, 4842, 3695, 2094, 1006, 1007, 1063, 1002, 2558, 1027, 5724, 1024, 1024, 2131, 1006, 2969, 1024, 1024, 6134, 1035, 2558, 1035, 5724, 1035, 2171, 1007, 1025, 2065, 1006, 1002, 2558, 1027, 1027, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Goals/API.php
API.getGoalSpecificDataTable
protected function getGoalSpecificDataTable($recordName, $idSite, $period, $date, $segment, $idGoal) { Piwik::checkUserHasViewAccess($idSite); $archive = Archive::build($idSite, $period, $date, $segment); // check for the special goal ids $realGoalId = $idGoal != true ? false : sel...
php
protected function getGoalSpecificDataTable($recordName, $idSite, $period, $date, $segment, $idGoal) { Piwik::checkUserHasViewAccess($idSite); $archive = Archive::build($idSite, $period, $date, $segment); // check for the special goal ids $realGoalId = $idGoal != true ? false : sel...
[ "protected", "function", "getGoalSpecificDataTable", "(", "$", "recordName", ",", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", ",", "$", "idGoal", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(", "$", "idSite", ")", ";",...
Utility method that retrieve an archived DataTable for a specific site, date range, segment and goal. If not goal is specified, this method will retrieve and sum the data for every goal. @param string $recordName The archive entry name. @param int|string $idSite The site(s) to select data for. @param string $period Th...
[ "Utility", "method", "that", "retrieve", "an", "archived", "DataTable", "for", "a", "specific", "site", "date", "range", "segment", "and", "goal", ".", "If", "not", "goal", "is", "specified", "this", "method", "will", "retrieve", "and", "sum", "the", "data",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Goals/API.php#L646-L660
train
Get the data table for a specific goal and site
[ 30522, 5123, 3853, 2131, 3995, 9777, 5051, 6895, 8873, 19797, 6790, 10880, 1006, 1002, 2501, 18442, 1010, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1010, 1002, 8909, 3995, 2389, 1007, 1063, 14255, 9148, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php
EventDispatcherDebugCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $options = []; if ($event = $input->getArgument('event')) { if (!$this->dispatcher->hasListeners($event)) { $io->getErrorStyle()->warning(sprintf...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $options = []; if ($event = $input->getArgument('event')) { if (!$this->dispatcher->hasListeners($event)) { $io->getErrorStyle()->warning(sprintf...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", ")", ";", "$", "options", "=", "[", "]", ";", "if", ...
{@inheritdoc} @throws \LogicException
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php#L72-L92
train
Describe the language
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 22834, 1027, 2047, 25353, 2213, 14876, 4890, 21756, 2571, 1006, 1002, 7953, 1010, 1002, 6434, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpCache/Store.php
Store.getCacheKey
private function getCacheKey(Request $request) { if (isset($this->keyCache[$request])) { return $this->keyCache[$request]; } return $this->keyCache[$request] = $this->generateCacheKey($request); }
php
private function getCacheKey(Request $request) { if (isset($this->keyCache[$request])) { return $this->keyCache[$request]; } return $this->keyCache[$request] = $this->generateCacheKey($request); }
[ "private", "function", "getCacheKey", "(", "Request", "$", "request", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "keyCache", "[", "$", "request", "]", ")", ")", "{", "return", "$", "this", "->", "keyCache", "[", "$", "request", "]", ";", ...
Returns a cache key for the given Request. @return string A key for the given Request
[ "Returns", "a", "cache", "key", "for", "the", "given", "Request", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L438-L445
train
Generate a cache key for the request
[ 30522, 2797, 3853, 2131, 3540, 5403, 14839, 1006, 5227, 1002, 5227, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 3145, 3540, 5403, 1031, 1002, 5227, 1033, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3145, 3540, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/Kernel.php
Kernel.command
public function command($signature, Closure $callback) { $command = new ClosureCommand($signature, $callback); Artisan::starting(function ($artisan) use ($command) { $artisan->add($command); }); return $command; }
php
public function command($signature, Closure $callback) { $command = new ClosureCommand($signature, $callback); Artisan::starting(function ($artisan) use ($command) { $artisan->add($command); }); return $command; }
[ "public", "function", "command", "(", "$", "signature", ",", "Closure", "$", "callback", ")", "{", "$", "command", "=", "new", "ClosureCommand", "(", "$", "signature", ",", "$", "callback", ")", ";", "Artisan", "::", "starting", "(", "function", "(", "$"...
Register a Closure based command with the application. @param string $signature @param \Closure $callback @return \Illuminate\Foundation\Console\ClosureCommand
[ "Register", "a", "Closure", "based", "command", "with", "the", "application", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Kernel.php#L192-L201
train
Add a ClosureCommand to the current environment
[ 30522, 2270, 3853, 3094, 1006, 1002, 8085, 1010, 8503, 1002, 2655, 5963, 1007, 1063, 1002, 3094, 1027, 2047, 8503, 9006, 2386, 2094, 1006, 1002, 8085, 1010, 1002, 2655, 5963, 1007, 1025, 2396, 29196, 1024, 1024, 3225, 1006, 3853, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Classification/NaiveBayes.php
NaiveBayes.sampleProbability
private function sampleProbability(array $sample, int $feature, string $label): float { if (!isset($sample[$feature])) { throw new InvalidArgumentException('Missing feature. All samples must have equal number of features'); } $value = $sample[$feature]; if ($this->dataTy...
php
private function sampleProbability(array $sample, int $feature, string $label): float { if (!isset($sample[$feature])) { throw new InvalidArgumentException('Missing feature. All samples must have equal number of features'); } $value = $sample[$feature]; if ($this->dataTy...
[ "private", "function", "sampleProbability", "(", "array", "$", "sample", ",", "int", "$", "feature", ",", "string", "$", "label", ")", ":", "float", "{", "if", "(", "!", "isset", "(", "$", "sample", "[", "$", "feature", "]", ")", ")", "{", "throw", ...
Calculates the probability P(label|sample_n)
[ "Calculates", "the", "probability", "P", "(", "label|sample_n", ")" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/NaiveBayes.php#L139-L168
train
Calculates the probability density of a feature
[ 30522, 2797, 3853, 7099, 21572, 3676, 8553, 1006, 9140, 1002, 7099, 1010, 20014, 1002, 3444, 1010, 5164, 1002, 3830, 1007, 1024, 14257, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 7099, 1031, 1002, 3444, 1033, 1007, 1007, 1063, 5466, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/Process.php
Process.fromShellCommandline
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) { $process = new static([], $cwd, $env, $input, $timeout); $process->commandline = $command; return $process; }
php
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) { $process = new static([], $cwd, $env, $input, $timeout); $process->commandline = $command; return $process; }
[ "public", "static", "function", "fromShellCommandline", "(", "string", "$", "command", ",", "string", "$", "cwd", "=", "null", ",", "array", "$", "env", "=", "null", ",", "$", "input", "=", "null", ",", "?", "float", "$", "timeout", "=", "60", ")", "...
Creates a Process instance as a command-line to be run in a shell wrapper. Command-lines are parsed by the shell of your OS (/bin/sh on Unix-like, cmd.exe on Windows.) This allows using e.g. pipes or conditional execution. In this mode, signals are sent to the shell wrapper and not to your commands. In order to injec...
[ "Creates", "a", "Process", "instance", "as", "a", "command", "-", "line", "to", "be", "run", "in", "a", "shell", "wrapper", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L191-L197
train
Create a new process from a shell commandline
[ 30522, 2270, 10763, 3853, 2013, 4095, 5349, 9006, 2386, 19422, 3170, 1006, 5164, 1002, 3094, 1010, 5164, 1002, 19296, 2094, 1027, 19701, 1010, 9140, 1002, 4372, 2615, 1027, 19701, 1010, 1002, 7953, 1027, 19701, 1010, 1029, 14257, 1002, 2051...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
SqlServerGrammar.compileAnsiOffset
protected function compileAnsiOffset(Builder $query, $components) { // An ORDER BY clause is required to make this offset query work, so if one does // not exist we'll just create a dummy clause to trick the database and so it // does not complain about the queries for not having an "order b...
php
protected function compileAnsiOffset(Builder $query, $components) { // An ORDER BY clause is required to make this offset query work, so if one does // not exist we'll just create a dummy clause to trick the database and so it // does not complain about the queries for not having an "order b...
[ "protected", "function", "compileAnsiOffset", "(", "Builder", "$", "query", ",", "$", "components", ")", "{", "// An ORDER BY clause is required to make this offset query work, so if one does", "// not exist we'll just create a dummy clause to trick the database and so it", "// does not ...
Create a full ANSI offset clause for the query. @param \Illuminate\Database\Query\Builder $query @param array $components @return string
[ "Create", "a", "full", "ANSI", "offset", "clause", "for", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L167-L189
train
Compiles an ansi offset query
[ 30522, 5123, 3853, 4012, 22090, 6962, 3695, 21807, 3388, 1006, 12508, 1002, 23032, 1010, 1002, 6177, 1007, 1063, 1013, 1013, 2019, 2344, 2011, 11075, 2003, 3223, 2000, 2191, 2023, 16396, 23032, 2147, 1010, 2061, 2065, 2028, 2515, 1013, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Db2.php
Zend_Db_Adapter_Db2.getServerVersion
public function getServerVersion() { $this->_connect(); $server_info = db2_server_info($this->_connection); if ($server_info !== false) { $version = $server_info->DBMS_VER; if ($this->_isI5) { $version = (int) substr($version, 0, 2) . '.' . (int) subst...
php
public function getServerVersion() { $this->_connect(); $server_info = db2_server_info($this->_connection); if ($server_info !== false) { $version = $server_info->DBMS_VER; if ($this->_isI5) { $version = (int) substr($version, 0, 2) . '.' . (int) subst...
[ "public", "function", "getServerVersion", "(", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "server_info", "=", "db2_server_info", "(", "$", "this", "->", "_connection", ")", ";", "if", "(", "$", "server_info", "!==", "false", ")", "{", ...
Retrieve server version in PHP style @return string
[ "Retrieve", "server", "version", "in", "PHP", "style" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Db2.php#L726-L739
train
Get Server Version
[ 30522, 2270, 3853, 4152, 2121, 6299, 27774, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1002, 8241, 1035, 18558, 1027, 16962, 2475, 1035, 8241, 1035, 18558, 1006, 1002, 2023, 1011, 1028, 1035, 4434, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Goals/API.php
API.enrichItemsTableWithViewMetrics
protected function enrichItemsTableWithViewMetrics($dataTable, $recordName, $idSite, $period, $date, $segment) { // Enrich the datatable with Product/Categories views, and conversion rates $customVariables = \Piwik\Plugins\CustomVariables\API::getInstance()->getCustomVariables($idSite, $period, $dat...
php
protected function enrichItemsTableWithViewMetrics($dataTable, $recordName, $idSite, $period, $date, $segment) { // Enrich the datatable with Product/Categories views, and conversion rates $customVariables = \Piwik\Plugins\CustomVariables\API::getInstance()->getCustomVariables($idSite, $period, $dat...
[ "protected", "function", "enrichItemsTableWithViewMetrics", "(", "$", "dataTable", ",", "$", "recordName", ",", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", ")", "{", "// Enrich the datatable with Product/Categories views, and conversion rat...
Enhances the dataTable with Items attributes found in the Custom Variables report. @param $dataTable @param $recordName @param $idSite @param $period @param $date @param $segment
[ "Enhances", "the", "dataTable", "with", "Items", "attributes", "found", "in", "the", "Custom", "Variables", "report", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Goals/API.php#L720-L768
train
Enriches the datatable with the data table metrics for the items table
[ 30522, 5123, 3853, 4372, 13149, 4221, 5244, 10880, 24415, 8584, 12589, 2015, 1006, 1002, 2951, 10880, 1010, 1002, 2501, 18442, 1010, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1007, 1063, 1013, 1013, 4372...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/Catalogue/MergeOperation.php
MergeOperation.processDomain
protected function processDomain($domain) { $this->messages[$domain] = [ 'all' => [], 'new' => [], 'obsolete' => [], ]; $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; foreach ($this->source->all($domain) as $id => $message) {...
php
protected function processDomain($domain) { $this->messages[$domain] = [ 'all' => [], 'new' => [], 'obsolete' => [], ]; $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; foreach ($this->source->all($domain) as $id => $message) {...
[ "protected", "function", "processDomain", "(", "$", "domain", ")", "{", "$", "this", "->", "messages", "[", "$", "domain", "]", "=", "[", "'all'", "=>", "[", "]", ",", "'new'", "=>", "[", "]", ",", "'obsolete'", "=>", "[", "]", ",", "]", ";", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Catalogue/MergeOperation.php#L30-L57
train
Process all messages in the domain
[ 30522, 5123, 3853, 2832, 9527, 8113, 1006, 1002, 5884, 1007, 1063, 1002, 2023, 1011, 1028, 7696, 1031, 1002, 5884, 1033, 1027, 1031, 1005, 2035, 1005, 1027, 1028, 1031, 1033, 1010, 1005, 2047, 1005, 1027, 1028, 1031, 1033, 1010, 1005, 158...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
guzzle/guzzle
build/Burgomaster.php
Burgomaster.debug
public function debug($message) { $prefix = date('c') . ': '; if ($this->sections) { $prefix .= '[' . end($this->sections) . '] '; } fwrite(STDERR, $prefix . $message . "\n"); }
php
public function debug($message) { $prefix = date('c') . ': '; if ($this->sections) { $prefix .= '[' . end($this->sections) . '] '; } fwrite(STDERR, $prefix . $message . "\n"); }
[ "public", "function", "debug", "(", "$", "message", ")", "{", "$", "prefix", "=", "date", "(", "'c'", ")", ".", "': '", ";", "if", "(", "$", "this", "->", "sections", ")", "{", "$", "prefix", ".=", "'['", ".", "end", "(", "$", "this", "->", "se...
Prints a debug message to STDERR bound to the current section. @param string $message Message to echo to STDERR
[ "Prints", "a", "debug", "message", "to", "STDERR", "bound", "to", "the", "current", "section", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/build/Burgomaster.php#L107-L116
train
Debug message to STDERR
[ 30522, 2270, 3853, 2139, 8569, 2290, 1006, 1002, 4471, 1007, 1063, 1002, 17576, 1027, 3058, 1006, 1005, 1039, 1005, 1007, 1012, 1005, 1024, 1005, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 5433, 1007, 1063, 1002, 17576, 1012, 1027, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreHome/Controller.php
Controller.getRowEvolutionGraph
public function getRowEvolutionGraph($fetch = false, $rowEvolution = null) { if (empty($rowEvolution)) { $label = Common::getRequestVar('label', '', 'string'); $isMultiRowEvolution = strpos($label, ',') !== false; $rowEvolution = $this->makeRowEvolution($isMultiRowEvolut...
php
public function getRowEvolutionGraph($fetch = false, $rowEvolution = null) { if (empty($rowEvolution)) { $label = Common::getRequestVar('label', '', 'string'); $isMultiRowEvolution = strpos($label, ',') !== false; $rowEvolution = $this->makeRowEvolution($isMultiRowEvolut...
[ "public", "function", "getRowEvolutionGraph", "(", "$", "fetch", "=", "false", ",", "$", "rowEvolution", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "rowEvolution", ")", ")", "{", "$", "label", "=", "Common", "::", "getRequestVar", "(", "'label'...
Generic method to get an evolution graph or a sparkline for the row evolution popover
[ "Generic", "method", "to", "get", "an", "evolution", "graph", "or", "a", "sparkline", "for", "the", "row", "evolution", "popover" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreHome/Controller.php#L224-L236
train
Returns the row evolution graph
[ 30522, 2270, 3853, 2131, 10524, 6777, 4747, 13700, 14413, 1006, 1002, 18584, 1027, 6270, 1010, 1002, 20538, 6767, 7630, 3508, 1027, 19701, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 20538, 6767, 7630, 3508, 1007, 1007, 1063, 1002, 3830, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/RichEditor.php
RichEditor.prepareVars
public function prepareVars() { $this->vars['field'] = $this->formField; $this->vars['editorLang'] = $this->getValidEditorLang(); $this->vars['fullPage'] = $this->fullPage; $this->vars['stretch'] = $this->formField->stretch; $this->vars['size'] = $this->formField->size; ...
php
public function prepareVars() { $this->vars['field'] = $this->formField; $this->vars['editorLang'] = $this->getValidEditorLang(); $this->vars['fullPage'] = $this->fullPage; $this->vars['stretch'] = $this->formField->stretch; $this->vars['size'] = $this->formField->size; ...
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'field'", "]", "=", "$", "this", "->", "formField", ";", "$", "this", "->", "vars", "[", "'editorLang'", "]", "=", "$", "this", "->", "getValidEditorLang", "(", ")", ...
Prepares the list data
[ "Prepares", "the", "list", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/RichEditor.php#L76-L100
train
Prepare the form field variables
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 2492, 1005, 1033, 1027, 1002, 2023, 1011, 1028, 2433, 3790, 1025, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 3559, 25023, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/Common2.php
HTML_Common2.setAttribute
public function setAttribute($name, $value = null) { $name = strtolower($name); if (is_null($value)) { $value = $name; } if (in_array($name, $this->watchedAttributes)) { $this->onAttributeChange($name, $value); } else { $this->attributes[$n...
php
public function setAttribute($name, $value = null) { $name = strtolower($name); if (is_null($value)) { $value = $name; } if (in_array($name, $this->watchedAttributes)) { $this->onAttributeChange($name, $value); } else { $this->attributes[$n...
[ "public", "function", "setAttribute", "(", "$", "name", ",", "$", "value", "=", "null", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "if", "(", "is_null", "(", "$", "value", ")", ")", "{", "$", "value", "=", "$", "name", ...
Sets the value of the attribute @param string Attribute name @param string Attribute value (will be set to $name if omitted) @return HTML_Common2
[ "Sets", "the", "value", "of", "the", "attribute" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/Common2.php#L242-L254
train
Set attribute value
[ 30522, 2270, 3853, 2275, 19321, 3089, 8569, 2618, 1006, 1002, 2171, 1010, 1002, 3643, 1027, 19701, 1007, 1063, 1002, 2171, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 2171, 1007, 1025, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 3643, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.addSender
protected function addSender($mailMessage, $message) { if (! empty($message->from)) { $mailMessage->from($message->from[0], Arr::get($message->from, 1)); } if (! empty($message->replyTo)) { foreach ($message->replyTo as $replyTo) { $mailMessage->reply...
php
protected function addSender($mailMessage, $message) { if (! empty($message->from)) { $mailMessage->from($message->from[0], Arr::get($message->from, 1)); } if (! empty($message->replyTo)) { foreach ($message->replyTo as $replyTo) { $mailMessage->reply...
[ "protected", "function", "addSender", "(", "$", "mailMessage", ",", "$", "message", ")", "{", "if", "(", "!", "empty", "(", "$", "message", "->", "from", ")", ")", "{", "$", "mailMessage", "->", "from", "(", "$", "message", "->", "from", "[", "0", ...
Add the "from" and "reply to" addresses to the message. @param \Illuminate\Mail\Message $mailMessage @param \Illuminate\Notifications\Messages\MailMessage $message @return void
[ "Add", "the", "from", "and", "reply", "to", "addresses", "to", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L177-L188
train
Adds the sender and replyTo addresses to the message.
[ 30522, 5123, 3853, 9909, 10497, 2121, 1006, 1002, 5653, 7834, 3736, 3351, 1010, 1002, 4471, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 4471, 1011, 1028, 2013, 1007, 1007, 1063, 1002, 5653, 7834, 3736, 3351, 1011, 1028, 2013, 1006, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Pdo/Abstract.php
Zend_Db_Adapter_Pdo_Abstract.lastInsertId
public function lastInsertId($tableName = null, $primaryKey = null) { $this->_connect(); return $this->_connection->lastInsertId(); }
php
public function lastInsertId($tableName = null, $primaryKey = null) { $this->_connect(); return $this->_connection->lastInsertId(); }
[ "public", "function", "lastInsertId", "(", "$", "tableName", "=", "null", ",", "$", "primaryKey", "=", "null", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "return", "$", "this", "->", "_connection", "->", "lastInsertId", "(", ")", ";", "}" ...
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence from the arguments and returns the last id generated by that sequence. On RDBMS brands that support IDENTITY/AUT...
[ "Gets", "the", "last", "ID", "generated", "automatically", "by", "an", "IDENTITY", "/", "AUTOINCREMENT", "column", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Abstract.php#L206-L210
train
Returns the last ID of the current table
[ 30522, 2270, 3853, 2197, 7076, 8743, 3593, 1006, 1002, 2795, 18442, 1027, 19701, 1010, 1002, 3078, 14839, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 1035, 30524, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php
RememberMeAuthenticationProvider.authenticate
public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { throw new AuthenticationException('The token is not supported by this authentication provider.'); } if ($this->secret !== $token->getSecret()) { throw new BadCredentialsException('T...
php
public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { throw new AuthenticationException('The token is not supported by this authentication provider.'); } if ($this->secret !== $token->getSecret()) { throw new BadCredentialsException('T...
[ "public", "function", "authenticate", "(", "TokenInterface", "$", "token", ")", "{", "if", "(", "!", "$", "this", "->", "supports", "(", "$", "token", ")", ")", "{", "throw", "new", "AuthenticationException", "(", "'The token is not supported by this authenticatio...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php#L41-L59
train
Authenticate a token
[ 30522, 2270, 3853, 14469, 3686, 1006, 19204, 18447, 2121, 12172, 1002, 19204, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6753, 1006, 1002, 19204, 1007, 1007, 1063, 5466, 2047, 27280, 10288, 24422, 1006, 1005, 1996, 19204, 2003, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Actions/API.php
API.getFilterPageDatatableSearch
protected function getFilterPageDatatableSearch($callBackParameters, $search, $actionType, $table = false, $searchTree = false) { if ($searchTree === false) { // build the query parts that are searched inside the tree if ($actionTyp...
php
protected function getFilterPageDatatableSearch($callBackParameters, $search, $actionType, $table = false, $searchTree = false) { if ($searchTree === false) { // build the query parts that are searched inside the tree if ($actionTyp...
[ "protected", "function", "getFilterPageDatatableSearch", "(", "$", "callBackParameters", ",", "$", "search", ",", "$", "actionType", ",", "$", "table", "=", "false", ",", "$", "searchTree", "=", "false", ")", "{", "if", "(", "$", "searchTree", "===", "false"...
Will search in the DataTable for a Label matching the searched string and return only the matching row, or an empty datatable
[ "Will", "search", "in", "the", "DataTable", "for", "a", "Label", "matching", "the", "searched", "string", "and", "return", "only", "the", "matching", "row", "or", "an", "empty", "datatable" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/API.php#L398-L438
train
Returns the datatable that matches the search string
[ 30522, 5123, 3853, 2131, 8873, 21928, 13704, 2850, 29336, 3085, 17310, 11140, 1006, 1002, 2655, 5963, 28689, 22828, 2015, 1010, 1002, 3945, 1010, 1002, 2895, 13874, 1010, 1002, 2795, 1027, 6270, 1010, 1002, 3945, 13334, 1027, 6270, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/Controller.php
Controller.getPurgeSettingsFromRequest
private function getPurgeSettingsFromRequest() { $settings = array(); // delete logs settings $settings['delete_logs_enable'] = Common::getRequestVar("enableDeleteLogs", 0); $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7); ...
php
private function getPurgeSettingsFromRequest() { $settings = array(); // delete logs settings $settings['delete_logs_enable'] = Common::getRequestVar("enableDeleteLogs", 0); $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7); ...
[ "private", "function", "getPurgeSettingsFromRequest", "(", ")", "{", "$", "settings", "=", "array", "(", ")", ";", "// delete logs settings", "$", "settings", "[", "'delete_logs_enable'", "]", "=", "Common", "::", "getRequestVar", "(", "\"enableDeleteLogs\"", ",", ...
Utility function. Gets the delete logs/reports settings from the request and uses them to populate config arrays. @return array An array containing the data deletion settings.
[ "Utility", "function", ".", "Gets", "the", "delete", "logs", "/", "reports", "settings", "from", "the", "request", "and", "uses", "them", "to", "populate", "config", "arrays", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/Controller.php#L48-L72
train
Returns the settings from the request
[ 30522, 2797, 3853, 2131, 5311, 8449, 18319, 3070, 22747, 21716, 2890, 15500, 1006, 1007, 1063, 1002, 10906, 1027, 9140, 1006, 1007, 1025, 1013, 1013, 3972, 12870, 15664, 10906, 1002, 10906, 1031, 1005, 3972, 12870, 1035, 15664, 1035, 9585, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CmsCompoundObject.php
CmsCompoundObject.getTwigNodeTree
public function getTwigNodeTree($markup = false) { $loader = new TwigLoader(); $twig = new Twig_Environment($loader, []); $twig->addExtension(new CmsTwigExtension()); $twig->addExtension(new SystemTwigExtension); $stream = $twig->tokenize(new Twig_Source($markup === false ? ...
php
public function getTwigNodeTree($markup = false) { $loader = new TwigLoader(); $twig = new Twig_Environment($loader, []); $twig->addExtension(new CmsTwigExtension()); $twig->addExtension(new SystemTwigExtension); $stream = $twig->tokenize(new Twig_Source($markup === false ? ...
[ "public", "function", "getTwigNodeTree", "(", "$", "markup", "=", "false", ")", "{", "$", "loader", "=", "new", "TwigLoader", "(", ")", ";", "$", "twig", "=", "new", "Twig_Environment", "(", "$", "loader", ",", "[", "]", ")", ";", "$", "twig", "->", ...
Returns Twig node tree generated from the object's markup. This method is used by the system internally and shouldn't participate in the front-end request processing. @link http://twig.sensiolabs.org/doc/internals.html Twig internals @param mixed $markup Specifies the markup content. Use FALSE to load the content from ...
[ "Returns", "Twig", "node", "tree", "generated", "from", "the", "object", "s", "markup", ".", "This", "method", "is", "used", "by", "the", "system", "internally", "and", "shouldn", "t", "participate", "in", "the", "front", "-", "end", "request", "processing",...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsCompoundObject.php#L410-L419
train
Returns Twig node tree
[ 30522, 2270, 3853, 2131, 2102, 16279, 3630, 3207, 13334, 1006, 1002, 2928, 6279, 1027, 6270, 1007, 1063, 1002, 7170, 2121, 1027, 2047, 1056, 16279, 11066, 2121, 1006, 1007, 1025, 1002, 1056, 16279, 1027, 2047, 1056, 16279, 1035, 4044, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Oracle.php
Zend_Db_Statement_Oracle.fetchColumn
public function fetchColumn($col = 0) { if (!$this->_stmt) { return false; } if (!oci_fetch($this->_stmt)) { // if no error, there is simply no record if (!$error = oci_error($this->_stmt)) { return false; } /** ...
php
public function fetchColumn($col = 0) { if (!$this->_stmt) { return false; } if (!oci_fetch($this->_stmt)) { // if no error, there is simply no record if (!$error = oci_error($this->_stmt)) { return false; } /** ...
[ "public", "function", "fetchColumn", "(", "$", "col", "=", "0", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "if", "(", "!", "oci_fetch", "(", "$", "this", "->", "_stmt", ")", ")", "{", "// if no er...
Returns a single column from the next row of a result set. @param int $col OPTIONAL Position of the column to fetch. @return string @throws Zend_Db_Statement_Exception
[ "Returns", "a", "single", "column", "from", "the", "next", "row", "of", "a", "result", "set", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L461-L497
train
Fetch a column from the result set
[ 30522, 2270, 3853, 18584, 25778, 2819, 2078, 1006, 1002, 8902, 1027, 1014, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 999, 1051, 6895, 1035, 18584, 1006, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Twig/Extension/CodeExtension.php
CodeExtension.fileExcerpt
public function fileExcerpt($file, $line, $srcContext = 3) { if (is_file($file) && is_readable($file)) { // highlight_file could throw warnings // see https://bugs.php.net/bug.php?id=25725 $code = @highlight_file($file, true); // remove main code/span tags ...
php
public function fileExcerpt($file, $line, $srcContext = 3) { if (is_file($file) && is_readable($file)) { // highlight_file could throw warnings // see https://bugs.php.net/bug.php?id=25725 $code = @highlight_file($file, true); // remove main code/span tags ...
[ "public", "function", "fileExcerpt", "(", "$", "file", ",", "$", "line", ",", "$", "srcContext", "=", "3", ")", "{", "if", "(", "is_file", "(", "$", "file", ")", "&&", "is_readable", "(", "$", "file", ")", ")", "{", "// highlight_file could throw warning...
Returns an excerpt of a code file around the given line number. @param string $file A file path @param int $line The selected line number @param int $srcContext The number of displayed lines around or -1 for the whole file @return string An HTML string
[ "Returns", "an", "excerpt", "of", "a", "code", "file", "around", "the", "given", "line", "number", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Twig/Extension/CodeExtension.php#L136-L163
train
Highlights a file and returns the excerpt
[ 30522, 2270, 3853, 5371, 10288, 17119, 13876, 1006, 1002, 5371, 1010, 1002, 2240, 1010, 1002, 5034, 21408, 10111, 18413, 1027, 1017, 1007, 1063, 30524, 1007, 1007, 1063, 1013, 1013, 12944, 1035, 5371, 2071, 5466, 16234, 1013, 1013, 2156, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SEO/Metric/DomainAge.php
DomainAge.getAgeWhoIs
private function getAgeWhoIs($domain) { $data = $this->getUrl('https://www.who.is/whois/' . urlencode($domain)); preg_match('#(?:Creation Date|Created On|created|Registered on)\.*:\s*([ \ta-z0-9\/\-:\.]+)#si', $data, $p); if (!empty($p[1])) { $value = strtotime(trim($p[1])); ...
php
private function getAgeWhoIs($domain) { $data = $this->getUrl('https://www.who.is/whois/' . urlencode($domain)); preg_match('#(?:Creation Date|Created On|created|Registered on)\.*:\s*([ \ta-z0-9\/\-:\.]+)#si', $data, $p); if (!empty($p[1])) { $value = strtotime(trim($p[1])); ...
[ "private", "function", "getAgeWhoIs", "(", "$", "domain", ")", "{", "$", "data", "=", "$", "this", "->", "getUrl", "(", "'https://www.who.is/whois/'", ".", "urlencode", "(", "$", "domain", ")", ")", ";", "preg_match", "(", "'#(?:Creation Date|Created On|created|...
Returns the domain age who.is lists for the current url @param string $domain @return int
[ "Returns", "the", "domain", "age", "who", ".", "is", "lists", "for", "the", "current", "url" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SEO/Metric/DomainAge.php#L91-L103
train
Get age who is
[ 30522, 2797, 3853, 2131, 4270, 2860, 6806, 2483, 1006, 1002, 5884, 1007, 1063, 1002, 2951, 1027, 1002, 2023, 1011, 1028, 2131, 3126, 2140, 1006, 1005, 16770, 1024, 1013, 1013, 7479, 1012, 2040, 1012, 2003, 1013, 2040, 2483, 1013, 1005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Filter.php
Filter.renderScopeElement
public function renderScopeElement($scope) { $params = ['scope' => $scope]; switch ($scope->type) { case 'date': if ($scope->value && $scope->value instanceof Carbon) { $params['dateStr'] = Backend::dateTime($scope->value, ['formatAlias' => 'dateMin']...
php
public function renderScopeElement($scope) { $params = ['scope' => $scope]; switch ($scope->type) { case 'date': if ($scope->value && $scope->value instanceof Carbon) { $params['dateStr'] = Backend::dateTime($scope->value, ['formatAlias' => 'dateMin']...
[ "public", "function", "renderScopeElement", "(", "$", "scope", ")", "{", "$", "params", "=", "[", "'scope'", "=>", "$", "scope", "]", ";", "switch", "(", "$", "scope", "->", "type", ")", "{", "case", "'date'", ":", "if", "(", "$", "scope", "->", "v...
Renders the HTML element for a scope
[ "Renders", "the", "HTML", "element", "for", "a", "scope" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Filter.php#L99-L171
train
Render the scope element
[ 30522, 2270, 3853, 17552, 26127, 12260, 3672, 1006, 1002, 9531, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 9531, 1005, 1027, 1028, 1002, 9531, 1033, 1025, 6942, 1006, 1002, 9531, 1011, 1028, 2828, 1007, 1063, 2553, 1005, 3058, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/API/ProcessedReport.php
ProcessedReport.getReportMetadata
public function getReportMetadata($idSite, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false) { Piwik::checkUserHasViewAccess($idSite); // as they cache key contains a lot of information there would be an even better cache result by caching parts of // th...
php
public function getReportMetadata($idSite, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false) { Piwik::checkUserHasViewAccess($idSite); // as they cache key contains a lot of information there would be an even better cache result by caching parts of // th...
[ "public", "function", "getReportMetadata", "(", "$", "idSite", ",", "$", "period", "=", "false", ",", "$", "date", "=", "false", ",", "$", "hideMetricsDoc", "=", "false", ",", "$", "showSubtableReports", "=", "false", ")", "{", "Piwik", "::", "checkUserHas...
Triggers a hook to ask plugins for available Reports. Returns metadata information about each report (category, name, dimension, metrics, etc.) @param int $idSite @param bool|string $period @param bool|Date $date @param bool $hideMetricsDoc @param bool $showSubtableReports @return array
[ "Triggers", "a", "hook", "to", "ask", "plugins", "for", "available", "Reports", ".", "Returns", "metadata", "information", "about", "each", "report", "(", "category", "name", "dimension", "metrics", "etc", ".", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/API/ProcessedReport.php#L173-L303
train
Returns the report metadata for the specified site and period.
[ 30522, 2270, 3853, 2131, 2890, 6442, 11368, 8447, 2696, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1027, 6270, 1010, 1002, 3058, 1027, 6270, 1010, 1002, 5342, 12589, 16150, 10085, 1027, 6270, 1010, 1002, 3065, 12083, 10880, 2890, 2537...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Events/Ev.php
Ev.add
public function add($fd, $flag, $func, $args = null) { $callback = function ($event, $socket) use ($fd, $func) { try { call_user_func($func, $fd); } catch (\Exception $e) { Worker::log($e); exit(250); } catch (\Error $e) { ...
php
public function add($fd, $flag, $func, $args = null) { $callback = function ($event, $socket) use ($fd, $func) { try { call_user_func($func, $fd); } catch (\Exception $e) { Worker::log($e); exit(250); } catch (\Error $e) { ...
[ "public", "function", "add", "(", "$", "fd", ",", "$", "flag", ",", "$", "func", ",", "$", "args", "=", "null", ")", "{", "$", "callback", "=", "function", "(", "$", "event", ",", "$", "socket", ")", "use", "(", "$", "fd", ",", "$", "func", "...
Add a timer. {@inheritdoc}
[ "Add", "a", "timer", ".", "{" ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Events/Ev.php#L55-L88
train
Adds an event to the event queue
[ 30522, 2270, 3853, 5587, 1006, 1002, 1042, 2094, 1010, 1002, 5210, 1010, 1002, 4569, 2278, 1010, 1002, 12098, 5620, 1027, 19701, 1007, 1063, 1002, 2655, 5963, 1027, 3853, 1006, 1002, 2724, 1010, 1002, 22278, 1007, 2224, 1006, 1002, 1042, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Visualization/Sparkline.php
Sparkline.setSparklineColors
private function setSparklineColors($sparkline) { $colors = Common::getRequestVar('colors', false, 'json'); if (empty($colors)) { // quick fix so row evolution sparklines will have color in widgetize's iframes $colors = array( 'backgroundColor' => '#ffffff', ...
php
private function setSparklineColors($sparkline) { $colors = Common::getRequestVar('colors', false, 'json'); if (empty($colors)) { // quick fix so row evolution sparklines will have color in widgetize's iframes $colors = array( 'backgroundColor' => '#ffffff', ...
[ "private", "function", "setSparklineColors", "(", "$", "sparkline", ")", "{", "$", "colors", "=", "Common", "::", "getRequestVar", "(", "'colors'", ",", "false", ",", "'json'", ")", ";", "if", "(", "empty", "(", "$", "colors", ")", ")", "{", "// quick fi...
Sets the sparkline colors @param \Davaxi\Sparkline $sparkline
[ "Sets", "the", "sparkline", "colors" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Visualization/Sparkline.php#L155-L189
train
Set sparkline colors
[ 30522, 2797, 3853, 4520, 14432, 4179, 18717, 2015, 1006, 1002, 12125, 4179, 1007, 1063, 1002, 6087, 1027, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 6087, 1005, 1010, 6270, 1010, 1005, 1046, 3385, 1005, 1007, 1025, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Yaml/Unescaper.php
Unescaper.utf8chr
private static function utf8chr(int $c): string { if (0x80 > $c %= 0x200000) { return \chr($c); } if (0x800 > $c) { return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); } if (0x10000 > $c) { return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 &...
php
private static function utf8chr(int $c): string { if (0x80 > $c %= 0x200000) { return \chr($c); } if (0x800 > $c) { return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); } if (0x10000 > $c) { return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 &...
[ "private", "static", "function", "utf8chr", "(", "int", "$", "c", ")", ":", "string", "{", "if", "(", "0x80", ">", "$", "c", "%=", "0x200000", ")", "{", "return", "\\", "chr", "(", "$", "c", ")", ";", "}", "if", "(", "0x800", ">", "$", "c", "...
Get the UTF-8 character for the given code point.
[ "Get", "the", "UTF", "-", "8", "character", "for", "the", "given", "code", "point", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Yaml/Unescaper.php#L124-L137
train
UTF - 8 = > UTF - 8
[ 30522, 2797, 10763, 3853, 21183, 2546, 2620, 2818, 2099, 1006, 20014, 1002, 1039, 1007, 1024, 5164, 1063, 2065, 1006, 1014, 2595, 30524, 2692, 1064, 1002, 1039, 1028, 1028, 1020, 1007, 1012, 1032, 10381, 2099, 1006, 1014, 2595, 17914, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Pdo/Mssql.php
Zend_Db_Adapter_Pdo_Mssql.limit
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); ...
php
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); ...
[ "public", "function", "limit", "(", "$", "sql", ",", "$", "count", ",", "$", "offset", "=", "0", ")", "{", "$", "count", "=", "intval", "(", "$", "count", ")", ";", "if", "(", "$", "count", "<=", "0", ")", "{", "/** @see Zend_Db_Adapter_Exception */"...
Adds an adapter-specific LIMIT clause to the SELECT statement. @link http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html @param string $sql @param integer $count @param integer $offset OPTIONAL @throws Zend_Db_Adapter_Exception @return string
[ "Adds", "an", "adapter", "-", "specific", "LIMIT", "clause", "to", "the", "SELECT", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Mssql.php#L317-L379
train
Limit result set
[ 30522, 2270, 3853, 5787, 1006, 1002, 29296, 1010, 1002, 4175, 1010, 1002, 16396, 1027, 1014, 1007, 1063, 1002, 4175, 1027, 20014, 10175, 1006, 1002, 4175, 1007, 1025, 2065, 1006, 1002, 4175, 1026, 1027, 1014, 1007, 1063, 1013, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Helpers/LogViewer.php
LogViewer.objectTail
public function objectTail($filepath, $lines = 1, $desc = true) { $data = $this->tail($filepath, $lines); $tailed_log = explode(PHP_EOL, $data); $line_objects = []; foreach ($tailed_log as $line) { $line_objects[] = $this->parse($line); } return $desc ? ...
php
public function objectTail($filepath, $lines = 1, $desc = true) { $data = $this->tail($filepath, $lines); $tailed_log = explode(PHP_EOL, $data); $line_objects = []; foreach ($tailed_log as $line) { $line_objects[] = $this->parse($line); } return $desc ? ...
[ "public", "function", "objectTail", "(", "$", "filepath", ",", "$", "lines", "=", "1", ",", "$", "desc", "=", "true", ")", "{", "$", "data", "=", "$", "this", "->", "tail", "(", "$", "filepath", ",", "$", "lines", ")", ";", "$", "tailed_log", "="...
Get the objects of a tailed file @param string $filepath @param int $lines @param bool $desc @return array
[ "Get", "the", "objects", "of", "a", "tailed", "file" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Helpers/LogViewer.php#L24-L35
train
Tail the log file and return the objects
[ 30522, 2270, 3853, 4874, 14162, 1006, 1002, 5371, 15069, 1010, 1002, 3210, 1027, 1015, 1010, 1002, 4078, 2278, 1027, 2995, 1007, 1063, 1002, 2951, 1027, 1002, 2023, 1011, 1028, 5725, 1006, 1002, 5371, 15069, 1010, 1002, 3210, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Workflow/Workflow.php
Workflow.getMarking
public function getMarking($subject) { $marking = $this->markingStore->getMarking($subject); if (!$marking instanceof Marking) { throw new LogicException(sprintf('The value returned by the MarkingStore is not an instance of "%s" for workflow "%s".', Marking::class, $this->name)); ...
php
public function getMarking($subject) { $marking = $this->markingStore->getMarking($subject); if (!$marking instanceof Marking) { throw new LogicException(sprintf('The value returned by the MarkingStore is not an instance of "%s" for workflow "%s".', Marking::class, $this->name)); ...
[ "public", "function", "getMarking", "(", "$", "subject", ")", "{", "$", "marking", "=", "$", "this", "->", "markingStore", "->", "getMarking", "(", "$", "subject", ")", ";", "if", "(", "!", "$", "marking", "instanceof", "Marking", ")", "{", "throw", "n...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/Workflow.php#L53-L90
train
Get the marking for the subject
[ 30522, 2270, 3853, 2131, 10665, 2075, 1006, 1002, 3395, 1007, 1063, 1002, 10060, 1027, 1002, 2023, 1011, 1028, 13967, 19277, 1011, 1028, 2131, 10665, 2075, 1006, 1002, 3395, 1007, 1025, 2065, 1006, 999, 1002, 10060, 6013, 11253, 10060, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/LanguagesManager/TranslationWriter/Writer.php
Writer.getTranslations
public function getTranslations($lang) { $path = $this->getTranslationPathBaseDirectory('lang', $lang); if (!is_readable($path)) { return array(); } $data = file_get_contents($path); $translations = json_decode($data, true); return $translations; }
php
public function getTranslations($lang) { $path = $this->getTranslationPathBaseDirectory('lang', $lang); if (!is_readable($path)) { return array(); } $data = file_get_contents($path); $translations = json_decode($data, true); return $translations; }
[ "public", "function", "getTranslations", "(", "$", "lang", ")", "{", "$", "path", "=", "$", "this", "->", "getTranslationPathBaseDirectory", "(", "'lang'", ",", "$", "lang", ")", ";", "if", "(", "!", "is_readable", "(", "$", "path", ")", ")", "{", "ret...
Get translations from file @param string $lang ISO 639-1 alpha-2 language code @throws Exception @return array Array of translations ( plugin => ( key => translated string ) )
[ "Get", "translations", "from", "file" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/TranslationWriter/Writer.php#L152-L164
train
Get translations for a lang
[ 30522, 2270, 3853, 2131, 6494, 3619, 13490, 2015, 1006, 1002, 11374, 1007, 1063, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 2131, 6494, 3619, 13490, 15069, 15058, 4305, 2890, 16761, 2100, 1006, 1005, 11374, 1005, 1010, 1002, 11374, 1007, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php
XmlReferenceDumper.writeValue
private function writeValue($value): string { if ('%%%%not_defined%%%%' === $value) { return ''; } if (\is_string($value) || is_numeric($value)) { return $value; } if (false === $value) { return 'false'; } if (true === $v...
php
private function writeValue($value): string { if ('%%%%not_defined%%%%' === $value) { return ''; } if (\is_string($value) || is_numeric($value)) { return $value; } if (false === $value) { return 'false'; } if (true === $v...
[ "private", "function", "writeValue", "(", "$", "value", ")", ":", "string", "{", "if", "(", "'%%%%not_defined%%%%'", "===", "$", "value", ")", "{", "return", "''", ";", "}", "if", "(", "\\", "is_string", "(", "$", "value", ")", "||", "is_numeric", "(",...
Renders the string conversion of the value. @param mixed $value
[ "Renders", "the", "string", "conversion", "of", "the", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php#L270-L299
train
Write the value to the language
[ 30522, 2797, 3853, 4339, 10175, 5657, 1006, 1002, 3643, 1007, 1024, 5164, 1063, 2065, 1006, 1005, 1003, 1003, 1003, 1003, 2025, 1035, 4225, 1003, 1003, 1003, 1003, 1005, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 2709, 1005, 1005, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
ReflectionExtractor.getProperties
public function getProperties($class, array $context = []) { try { $reflectionClass = new \ReflectionClass($class); } catch (\ReflectionException $e) { return; } $propertyFlags = 0; $methodFlags = 0; if ($this->accessFlags & self::ALLOW_PUBLI...
php
public function getProperties($class, array $context = []) { try { $reflectionClass = new \ReflectionClass($class); } catch (\ReflectionException $e) { return; } $propertyFlags = 0; $methodFlags = 0; if ($this->accessFlags & self::ALLOW_PUBLI...
[ "public", "function", "getProperties", "(", "$", "class", ",", "array", "$", "context", "=", "[", "]", ")", "{", "try", "{", "$", "reflectionClass", "=", "new", "\\", "ReflectionClass", "(", "$", "class", ")", ";", "}", "catch", "(", "\\", "ReflectionE...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php#L78-L129
train
Get all the properties of a class
[ 30522, 2270, 3853, 2131, 21572, 4842, 7368, 1006, 1002, 2465, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 3046, 1063, 1002, 9185, 26266, 1027, 2047, 30524, 3229, 10258, 26454, 1004, 2969, 1024, 1024, 3499, 1035, 2270, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/User/TagClient.php
TagClient.update
public function update(int $tagId, string $name) { $params = [ 'tag' => [ 'id' => $tagId, 'name' => $name, ], ]; return $this->httpPostJson('cgi-bin/tags/update', $params); }
php
public function update(int $tagId, string $name) { $params = [ 'tag' => [ 'id' => $tagId, 'name' => $name, ], ]; return $this->httpPostJson('cgi-bin/tags/update', $params); }
[ "public", "function", "update", "(", "int", "$", "tagId", ",", "string", "$", "name", ")", "{", "$", "params", "=", "[", "'tag'", "=>", "[", "'id'", "=>", "$", "tagId", ",", "'name'", "=>", "$", "name", ",", "]", ",", "]", ";", "return", "$", "...
Update a tag name. @param int $tagId @param string $name @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Update", "a", "tag", "name", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/User/TagClient.php#L63-L73
train
Update a tag
[ 30522, 2270, 3853, 10651, 1006, 20014, 1002, 6415, 3593, 1010, 5164, 1002, 2171, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 6415, 1005, 1027, 1028, 1031, 1005, 8909, 1005, 1027, 1028, 1002, 6415, 3593, 1010, 1005, 2171, 1005, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
IntegerToLocalizedStringTransformer.reverseTransform
public function reverseTransform($value) { $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); if (\is_string($value) && false !== strpos($value, $decimalSeparator)) { throw new TransformationFailedException(sprintf('The value "%s" is ...
php
public function reverseTransform($value) { $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); if (\is_string($value) && false !== strpos($value, $decimalSeparator)) { throw new TransformationFailedException(sprintf('The value "%s" is ...
[ "public", "function", "reverseTransform", "(", "$", "value", ")", "{", "$", "decimalSeparator", "=", "$", "this", "->", "getNumberFormatter", "(", ")", "->", "getSymbol", "(", "\\", "NumberFormatter", "::", "DECIMAL_SEPARATOR_SYMBOL", ")", ";", "if", "(", "\\"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php#L45-L56
train
Transforms a locale - dependent integer into a locale - dependent integer.
[ 30522, 2270, 3853, 7901, 6494, 3619, 14192, 1006, 1002, 3643, 1007, 1063, 1002, 26066, 3366, 28689, 4263, 1027, 1002, 2023, 1011, 1028, 2131, 19172, 5677, 14192, 20097, 1006, 1007, 1011, 1028, 4152, 24335, 14956, 1006, 1032, 2193, 14192, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Language/Language.php
Language.getFallbackPageExtensions
public function getFallbackPageExtensions($file_ext = null) { if (empty($this->page_extensions)) { if (!$file_ext) { $file_ext = CONTENT_EXT; } if ($this->enabled()) { $valid_lang_extensions = []; foreach ($this->languages ...
php
public function getFallbackPageExtensions($file_ext = null) { if (empty($this->page_extensions)) { if (!$file_ext) { $file_ext = CONTENT_EXT; } if ($this->enabled()) { $valid_lang_extensions = []; foreach ($this->languages ...
[ "public", "function", "getFallbackPageExtensions", "(", "$", "file_ext", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "page_extensions", ")", ")", "{", "if", "(", "!", "$", "file_ext", ")", "{", "$", "file_ext", "=", "CONTENT_EXT", ...
Gets an array of valid extensions with active first, then fallback extensions @param string|null $file_ext @return array
[ "Gets", "an", "array", "of", "valid", "extensions", "with", "active", "first", "then", "fallback", "extensions" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Language/Language.php#L286-L320
train
Get the list of page extensions that are not in the fallback language
[ 30522, 2270, 3853, 2131, 13976, 5963, 13704, 10288, 29048, 2015, 1006, 1002, 5371, 1035, 4654, 2102, 1027, 19701, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 3931, 1035, 14305, 1007, 1007, 1063, 2065, 1006, 999, 1002, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Twig/TwigExtension.php
TwigExtension.readFileFunc
public function readFileFunc($filepath) { /** @var UniformResourceLocator $locator */ $locator = $this->grav['locator']; if ($locator->isStream($filepath)) { $filepath = $locator->findResource($filepath); } if ($filepath && file_exists($filepath)) { ...
php
public function readFileFunc($filepath) { /** @var UniformResourceLocator $locator */ $locator = $this->grav['locator']; if ($locator->isStream($filepath)) { $filepath = $locator->findResource($filepath); } if ($filepath && file_exists($filepath)) { ...
[ "public", "function", "readFileFunc", "(", "$", "filepath", ")", "{", "/** @var UniformResourceLocator $locator */", "$", "locator", "=", "$", "this", "->", "grav", "[", "'locator'", "]", ";", "if", "(", "$", "locator", "->", "isStream", "(", "$", "filepath", ...
Simple function to read a file based on a filepath and output it @param string $filepath @return bool|string
[ "Simple", "function", "to", "read", "a", "file", "based", "on", "a", "filepath", "and", "output", "it" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TwigExtension.php#L1180-L1194
train
Read file content
[ 30522, 2270, 3853, 3191, 8873, 2571, 11263, 12273, 1006, 1002, 5371, 15069, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 6375, 6072, 8162, 29109, 24755, 4263, 1002, 8840, 11266, 2953, 1008, 1013, 1002, 8840, 11266, 2953, 1027, 1002, 2023, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Terminal.php
Terminal.getWidth
public function getWidth() { $width = getenv('COLUMNS'); if (false !== $width) { return (int) trim($width); } if (null === self::$width) { self::initDimensions(); } return self::$width ?: 80; }
php
public function getWidth() { $width = getenv('COLUMNS'); if (false !== $width) { return (int) trim($width); } if (null === self::$width) { self::initDimensions(); } return self::$width ?: 80; }
[ "public", "function", "getWidth", "(", ")", "{", "$", "width", "=", "getenv", "(", "'COLUMNS'", ")", ";", "if", "(", "false", "!==", "$", "width", ")", "{", "return", "(", "int", ")", "trim", "(", "$", "width", ")", ";", "}", "if", "(", "null", ...
Gets the terminal width. @return int
[ "Gets", "the", "terminal", "width", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Terminal.php#L24-L36
train
Get the width of the terminal.
[ 30522, 2270, 3853, 2131, 9148, 11927, 2232, 1006, 1007, 1063, 1002, 9381, 1027, 2131, 2368, 2615, 1006, 1005, 7753, 1005, 1007, 1025, 2065, 1006, 6270, 999, 1027, 1027, 1002, 9381, 1007, 1063, 2709, 1006, 20014, 1007, 12241, 1006, 1002, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/Controller.php
Controller.renderPartial
public function renderPartial($name, $parameters = [], $throwException = true) { $vars = $this->vars; $this->vars = array_merge($this->vars, $parameters); /* * Alias @ symbol for :: */ if (substr($name, 0, 1) == '@') { $name = '::' . substr($name, 1); ...
php
public function renderPartial($name, $parameters = [], $throwException = true) { $vars = $this->vars; $this->vars = array_merge($this->vars, $parameters); /* * Alias @ symbol for :: */ if (substr($name, 0, 1) == '@') { $name = '::' . substr($name, 1); ...
[ "public", "function", "renderPartial", "(", "$", "name", ",", "$", "parameters", "=", "[", "]", ",", "$", "throwException", "=", "true", ")", "{", "$", "vars", "=", "$", "this", "->", "vars", ";", "$", "this", "->", "vars", "=", "array_merge", "(", ...
Renders a requested partial. The framework uses this method internally. @param string $name The view to load. @param array $parameters Parameter variables to pass to the view. @param bool $throwException Throw an exception if the partial is not found. @return mixed Partial contents or false if not throwing an exception...
[ "Renders", "a", "requested", "partial", ".", "The", "framework", "uses", "this", "method", "internally", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L932-L1121
train
Renders a partial
[ 30522, 2270, 3853, 17552, 19362, 20925, 1006, 1002, 2171, 1010, 1002, 11709, 1027, 1031, 1033, 1010, 1002, 5466, 10288, 24422, 1027, 2995, 1007, 1063, 1002, 13075, 2015, 1027, 1002, 2023, 1011, 1028, 13075, 2015, 1025, 1002, 2023, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
MockArraySessionStorage.save
public function save() { if (!$this->started || $this->closed) { throw new \RuntimeException('Trying to save a session that was not started yet or was already closed'); } // nothing to do since we don't persist the session data $this->closed = false; $this->starte...
php
public function save() { if (!$this->started || $this->closed) { throw new \RuntimeException('Trying to save a session that was not started yet or was already closed'); } // nothing to do since we don't persist the session data $this->closed = false; $this->starte...
[ "public", "function", "save", "(", ")", "{", "if", "(", "!", "$", "this", "->", "started", "||", "$", "this", "->", "closed", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'Trying to save a session that was not started yet or was already closed'", ")",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php#L148-L156
train
Saves the session data
[ 30522, 2270, 3853, 3828, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2318, 1064, 1064, 1002, 2023, 1011, 1028, 2701, 1007, 1063, 5466, 2047, 1032, 2448, 7292, 10288, 24422, 1006, 1005, 2667, 2000, 3828, 1037, 5219, 2008, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Form.php
Form.getSessionKey
public function getSessionKey() { if ($this->sessionKey) { return $this->sessionKey; } if (post('_session_key')) { return $this->sessionKey = post('_session_key'); } return $this->sessionKey = FormHelper::getSessionKey(); }
php
public function getSessionKey() { if ($this->sessionKey) { return $this->sessionKey; } if (post('_session_key')) { return $this->sessionKey = post('_session_key'); } return $this->sessionKey = FormHelper::getSessionKey(); }
[ "public", "function", "getSessionKey", "(", ")", "{", "if", "(", "$", "this", "->", "sessionKey", ")", "{", "return", "$", "this", "->", "sessionKey", ";", "}", "if", "(", "post", "(", "'_session_key'", ")", ")", "{", "return", "$", "this", "->", "se...
Returns the active session key. @return \Illuminate\Routing\Route|mixed|string
[ "Returns", "the", "active", "session", "key", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Form.php#L1293-L1304
train
Get Session Key
[ 30522, 2270, 3853, 4152, 7971, 3258, 14839, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5219, 14839, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5219, 14839, 1025, 1065, 2065, 1006, 2695, 1006, 1005, 1035, 5219, 1035, 3145, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Optional.php
Optional.__isset
public function __isset($name) { if (is_object($this->value)) { return isset($this->value->{$name}); } if (is_array($this->value) || $this->value instanceof ArrayObject) { return isset($this->value[$name]); } return false; }
php
public function __isset($name) { if (is_object($this->value)) { return isset($this->value->{$name}); } if (is_array($this->value) || $this->value instanceof ArrayObject) { return isset($this->value[$name]); } return false; }
[ "public", "function", "__isset", "(", "$", "name", ")", "{", "if", "(", "is_object", "(", "$", "this", "->", "value", ")", ")", "{", "return", "isset", "(", "$", "this", "->", "value", "->", "{", "$", "name", "}", ")", ";", "}", "if", "(", "is_...
Dynamically check a property exists on the underlying object. @param mixed $name @return bool
[ "Dynamically", "check", "a", "property", "exists", "on", "the", "underlying", "object", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Optional.php#L51-L62
train
Method to check if a value is set
[ 30522, 2270, 3853, 1035, 1035, 26354, 3388, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 2003, 1035, 4874, 1006, 1002, 2023, 1011, 1028, 3643, 1007, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 3643, 1011, 1028, 1063, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/DataCollectorTranslator.php
DataCollectorTranslator.transChoice
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { if ($this->translator instanceof TranslatorInterface) { $trans = $this->translator->trans($id, ['%count%' => $number] + $parameters, $domain, $locale); } $trans = $this->translato...
php
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { if ($this->translator instanceof TranslatorInterface) { $trans = $this->translator->trans($id, ['%count%' => $number] + $parameters, $domain, $locale); } $trans = $this->translato...
[ "public", "function", "transChoice", "(", "$", "id", ",", "$", "number", ",", "array", "$", "parameters", "=", "[", "]", ",", "$", "domain", "=", "null", ",", "$", "locale", "=", "null", ")", "{", "if", "(", "$", "this", "->", "translator", "instan...
{@inheritdoc} @deprecated since Symfony 4.2, use the trans() method instead with a %count% parameter
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/DataCollectorTranslator.php#L67-L78
train
Devuelve el valor de una transacion
[ 30522, 2270, 3853, 9099, 9905, 6610, 1006, 1002, 8909, 1010, 1002, 2193, 1010, 9140, 1002, 11709, 1027, 1031, 1033, 1010, 1002, 5884, 1027, 19701, 1010, 1002, 2334, 2063, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11403, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UsersManager/Controller.php
Controller.userSettings
public function userSettings() { Piwik::checkUserIsNotAnonymous(); $view = new View('@UsersManager/userSettings'); $userLogin = Piwik::getCurrentUserLogin(); $user = Request::processRequest('UsersManager.getUser', array('userLogin' => $userLogin)); $view->userEmail = $user[...
php
public function userSettings() { Piwik::checkUserIsNotAnonymous(); $view = new View('@UsersManager/userSettings'); $userLogin = Piwik::getCurrentUserLogin(); $user = Request::processRequest('UsersManager.getUser', array('userLogin' => $userLogin)); $view->userEmail = $user[...
[ "public", "function", "userSettings", "(", ")", "{", "Piwik", "::", "checkUserIsNotAnonymous", "(", ")", ";", "$", "view", "=", "new", "View", "(", "'@UsersManager/userSettings'", ")", ";", "$", "userLogin", "=", "Piwik", "::", "getCurrentUserLogin", "(", ")",...
The "User Settings" admin UI screen view
[ "The", "User", "Settings", "admin", "UI", "screen", "view" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/Controller.php#L174-L238
train
Displays the user settings page
[ 30522, 2270, 3853, 5198, 18319, 3070, 2015, 1006, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 2483, 17048, 6761, 4890, 27711, 1006, 1007, 1025, 1002, 3193, 1027, 2047, 3193, 1006, 1005, 1030, 5198, 24805, 4590, 1013, 5198, 18319...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Psr7/AbstractUri.php
AbstractUri.getBaseUrl
protected function getBaseUrl() { $uri = ''; $scheme = $this->getScheme(); if ($scheme !== '') { $uri .= $scheme . ':'; } $authority = $this->getAuthority(); if ($authority !== '' || $scheme === 'file') { $uri .= '//' . $authority; } ...
php
protected function getBaseUrl() { $uri = ''; $scheme = $this->getScheme(); if ($scheme !== '') { $uri .= $scheme . ':'; } $authority = $this->getAuthority(); if ($authority !== '' || $scheme === 'file') { $uri .= '//' . $authority; } ...
[ "protected", "function", "getBaseUrl", "(", ")", "{", "$", "uri", "=", "''", ";", "$", "scheme", "=", "$", "this", "->", "getScheme", "(", ")", ";", "if", "(", "$", "scheme", "!==", "''", ")", "{", "$", "uri", ".=", "$", "scheme", ".", "':'", "...
Return the fully qualified base URL ( like http://getgrav.org ). Note that this method never includes a trailing / @return string
[ "Return", "the", "fully", "qualified", "base", "URL", "(", "like", "http", ":", "//", "getgrav", ".", "org", ")", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Psr7/AbstractUri.php#L300-L315
train
Get Base Url
[ 30522, 5123, 3853, 2131, 15058, 3126, 2140, 1006, 1007, 1063, 1002, 24471, 2072, 1027, 1005, 1005, 1025, 1002, 5679, 1027, 1002, 2023, 1011, 1028, 4152, 5403, 4168, 1006, 1007, 1025, 2065, 1006, 1002, 5679, 999, 1027, 1027, 1005, 1005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.runPaginationCountQuery
protected function runPaginationCountQuery($columns = ['*']) { $without = $this->unions ? ['orders', 'limit', 'offset'] : ['columns', 'orders', 'limit', 'offset']; return $this->cloneWithout($without) ->cloneWithoutBindings($this->unions ? ['order'] : ['select', 'order']) ...
php
protected function runPaginationCountQuery($columns = ['*']) { $without = $this->unions ? ['orders', 'limit', 'offset'] : ['columns', 'orders', 'limit', 'offset']; return $this->cloneWithout($without) ->cloneWithoutBindings($this->unions ? ['order'] : ['select', 'order']) ...
[ "protected", "function", "runPaginationCountQuery", "(", "$", "columns", "=", "[", "'*'", "]", ")", "{", "$", "without", "=", "$", "this", "->", "unions", "?", "[", "'orders'", ",", "'limit'", ",", "'offset'", "]", ":", "[", "'columns'", ",", "'orders'",...
Run a pagination count query. @param array $columns @return array
[ "Run", "a", "pagination", "count", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2204-L2212
train
Runs the count query
[ 30522, 5123, 3853, 2448, 4502, 20876, 3508, 3597, 16671, 4226, 2854, 1006, 1002, 7753, 1027, 1031, 1005, 1008, 1005, 1033, 1007, 1063, 1002, 2302, 1027, 1002, 2023, 1011, 1028, 9209, 1029, 1031, 1005, 4449, 1005, 1010, 1005, 5787, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/behaviors/ListController.php
ListController.extendListColumns
public static function extendListColumns($callback) { $calledClass = self::getCalledExtensionClass(); Event::listen('backend.list.extendColumns', function ($widget) use ($calledClass, $callback) { if (!is_a($widget->getController(), $calledClass)) { return; } ...
php
public static function extendListColumns($callback) { $calledClass = self::getCalledExtensionClass(); Event::listen('backend.list.extendColumns', function ($widget) use ($calledClass, $callback) { if (!is_a($widget->getController(), $calledClass)) { return; } ...
[ "public", "static", "function", "extendListColumns", "(", "$", "callback", ")", "{", "$", "calledClass", "=", "self", "::", "getCalledExtensionClass", "(", ")", ";", "Event", "::", "listen", "(", "'backend.list.extendColumns'", ",", "function", "(", "$", "widget...
Static helper for extending list columns. @param callable $callback @return void
[ "Static", "helper", "for", "extending", "list", "columns", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/ListController.php#L552-L561
train
Extend list columns
[ 30522, 2270, 10763, 3853, 7949, 9863, 25778, 2819, 3619, 1006, 1002, 2655, 5963, 1007, 1063, 1002, 2170, 26266, 1027, 2969, 1024, 1024, 2131, 9289, 3709, 10288, 29048, 26266, 1006, 1007, 1025, 2724, 1024, 1024, 4952, 1006, 1005, 2067, 10497...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/API.php
API.getLocationFromIP
public function getLocationFromIP($ip, $provider = false) { Piwik::checkUserHasSomeViewAccess(); if (empty($provider)) { $provider = LocationProvider::getCurrentProviderId(); } $oProvider = LocationProvider::getProviderById($provider); if (empty($oProvider)) { ...
php
public function getLocationFromIP($ip, $provider = false) { Piwik::checkUserHasSomeViewAccess(); if (empty($provider)) { $provider = LocationProvider::getCurrentProviderId(); } $oProvider = LocationProvider::getProviderById($provider); if (empty($oProvider)) { ...
[ "public", "function", "getLocationFromIP", "(", "$", "ip", ",", "$", "provider", "=", "false", ")", "{", "Piwik", "::", "checkUserHasSomeViewAccess", "(", ")", ";", "if", "(", "empty", "(", "$", "provider", ")", ")", "{", "$", "provider", "=", "LocationP...
Uses a location provider to find/guess the location of an IP address. See LocationProvider::getLocation to see the details of the result of this function. @param string $ip The IP address. @param bool|string $provider The ID of the provider to use or false to use the currently configured one. @throws Exception @retur...
[ "Uses", "a", "location", "provider", "to", "find", "/", "guess", "the", "location", "of", "an", "IP", "address", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/API.php#L361-L381
train
Get a location from the specified IP
[ 30522, 2270, 3853, 2131, 4135, 10719, 19699, 20936, 2361, 1006, 1002, 12997, 1010, 1002, 10802, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 14045, 8584, 6305, 9623, 2015, 1006, 1007, 1025, 2065, 1006, 4064, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Lists.php
Lists.getRowClass
public function getRowClass($record) { $value = ''; /** * @event backend.list.injectRowClass * Provides opportunity to inject a custom CSS row class * * If a value is returned from this event, it will be used as the value for the row class. * `$value` is...
php
public function getRowClass($record) { $value = ''; /** * @event backend.list.injectRowClass * Provides opportunity to inject a custom CSS row class * * If a value is returned from this event, it will be used as the value for the row class. * `$value` is...
[ "public", "function", "getRowClass", "(", "$", "record", ")", "{", "$", "value", "=", "''", ";", "/**\n * @event backend.list.injectRowClass\n * Provides opportunity to inject a custom CSS row class\n *\n * If a value is returned from this event, it will be ...
Adds a custom CSS class string to a record row @param Model $record Populated model @return string
[ "Adds", "a", "custom", "CSS", "class", "string", "to", "a", "record", "row" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L1089-L1116
train
Get the row class for the record
[ 30522, 2270, 3853, 2131, 10524, 26266, 1006, 1002, 2501, 1007, 1063, 1002, 3643, 1027, 1005, 1005, 1025, 1013, 1008, 1008, 1008, 1030, 2724, 2067, 10497, 1012, 2862, 1012, 1999, 20614, 10524, 26266, 1008, 3640, 4495, 2000, 1999, 20614, 1037...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/CombineAssets.php
CombineAssets.prepareAssets
protected function prepareAssets(array $assets) { if (!is_array($assets)) { $assets = [$assets]; } /* * Split assets in to groups. */ $combineJs = []; $combineCss = []; foreach ($assets as $asset) { /* * Allow a...
php
protected function prepareAssets(array $assets) { if (!is_array($assets)) { $assets = [$assets]; } /* * Split assets in to groups. */ $combineJs = []; $combineCss = []; foreach ($assets as $asset) { /* * Allow a...
[ "protected", "function", "prepareAssets", "(", "array", "$", "assets", ")", "{", "if", "(", "!", "is_array", "(", "$", "assets", ")", ")", "{", "$", "assets", "=", "[", "$", "assets", "]", ";", "}", "/*\n * Split assets in to groups.\n */", "...
Prepares an array of assets by normalizing the collection and processing aliases. @param array $assets @return array
[ "Prepares", "an", "array", "of", "assets", "by", "normalizing", "the", "collection", "and", "processing", "aliases", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/CombineAssets.php#L285-L349
train
Prepares assets array
[ 30522, 5123, 3853, 7374, 27241, 3215, 1006, 9140, 1002, 7045, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 7045, 1007, 1007, 1063, 1002, 7045, 1027, 1031, 1002, 7045, 1033, 1025, 1065, 1013, 1008, 1008, 3975, 7045, 1999, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Cache.php
Cache.setKey
public function setKey($key) { $this->key = $key; $this->driver->setNamespace($this->key); }
php
public function setKey($key) { $this->key = $key; $this->driver->setNamespace($this->key); }
[ "public", "function", "setKey", "(", "$", "key", ")", "{", "$", "this", "->", "key", "=", "$", "key", ";", "$", "this", "->", "driver", "->", "setNamespace", "(", "$", "this", "->", "key", ")", ";", "}" ]
Setter method to set key (Advanced)
[ "Setter", "method", "to", "set", "key", "(", "Advanced", ")" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Cache.php#L405-L409
train
Set the key for the current namespace
[ 30522, 2270, 3853, 2275, 14839, 1006, 1002, 3145, 1007, 1063, 1002, 2023, 1011, 1028, 3145, 1027, 1002, 3145, 1025, 1002, 2023, 1011, 1028, 4062, 1011, 1028, 2275, 18442, 23058, 1006, 1002, 2023, 1011, 1028, 3145, 1007, 1025, 1065, 102, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Log/LogManager.php
LogManager.prepareHandler
protected function prepareHandler(HandlerInterface $handler, array $config = []) { if (! isset($config['formatter'])) { $handler->setFormatter($this->formatter()); } elseif ($config['formatter'] !== 'default') { $handler->setFormatter($this->app->make($config['formatter'], $c...
php
protected function prepareHandler(HandlerInterface $handler, array $config = []) { if (! isset($config['formatter'])) { $handler->setFormatter($this->formatter()); } elseif ($config['formatter'] !== 'default') { $handler->setFormatter($this->app->make($config['formatter'], $c...
[ "protected", "function", "prepareHandler", "(", "HandlerInterface", "$", "handler", ",", "array", "$", "config", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "config", "[", "'formatter'", "]", ")", ")", "{", "$", "handler", "->", "setFor...
Prepare the handler for usage by Monolog. @param \Monolog\Handler\HandlerInterface $handler @param array $config @return \Monolog\Handler\HandlerInterface
[ "Prepare", "the", "handler", "for", "usage", "by", "Monolog", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Log/LogManager.php#L366-L375
train
Prepare handler for use in the app
[ 30522, 5123, 3853, 7374, 11774, 3917, 1006, 28213, 18447, 2121, 12172, 1002, 28213, 1010, 9140, 1002, 9530, 8873, 2290, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 9530, 8873, 2290, 1031, 1005, 4289, 3334, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Http/Concerns/InteractsWithInput.php
InteractsWithInput.hasAny
public function hasAny($keys) { $keys = is_array($keys) ? $keys : func_get_args(); $input = $this->all(); foreach ($keys as $key) { if (Arr::has($input, $key)) { return true; } } return false; }
php
public function hasAny($keys) { $keys = is_array($keys) ? $keys : func_get_args(); $input = $this->all(); foreach ($keys as $key) { if (Arr::has($input, $key)) { return true; } } return false; }
[ "public", "function", "hasAny", "(", "$", "keys", ")", "{", "$", "keys", "=", "is_array", "(", "$", "keys", ")", "?", "$", "keys", ":", "func_get_args", "(", ")", ";", "$", "input", "=", "$", "this", "->", "all", "(", ")", ";", "foreach", "(", ...
Determine if the request contains any of the given inputs. @param string|array $keys @return bool
[ "Determine", "if", "the", "request", "contains", "any", "of", "the", "given", "inputs", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Concerns/InteractsWithInput.php#L100-L113
train
Has Any key in the array
[ 30522, 2270, 3853, 17000, 2100, 1006, 1002, 6309, 1007, 1063, 1002, 6309, 1027, 2003, 1035, 9140, 1006, 1002, 6309, 1007, 1029, 1002, 6309, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 1002, 7953, 1027, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
AuthorizesRequests.authorizeForUser
public function authorizeForUser($user, $ability, $arguments = []) { [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments); return app(Gate::class)->forUser($user)->authorize($ability, $arguments); }
php
public function authorizeForUser($user, $ability, $arguments = []) { [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments); return app(Gate::class)->forUser($user)->authorize($ability, $arguments); }
[ "public", "function", "authorizeForUser", "(", "$", "user", ",", "$", "ability", ",", "$", "arguments", "=", "[", "]", ")", "{", "[", "$", "ability", ",", "$", "arguments", "]", "=", "$", "this", "->", "parseAbilityAndArguments", "(", "$", "ability", "...
Authorize a given action for a user. @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user @param mixed $ability @param mixed|array $arguments @return \Illuminate\Auth\Access\Response @throws \Illuminate\Auth\Access\AuthorizationException
[ "Authorize", "a", "given", "action", "for", "a", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php#L36-L41
train
Authorize a user to the given ability
[ 30522, 2270, 3853, 3166, 4697, 29278, 20330, 1006, 1002, 5310, 1010, 1002, 3754, 1010, 1002, 9918, 1027, 1031, 1033, 1007, 1063, 1031, 1002, 3754, 1010, 1002, 9918, 1033, 1027, 1002, 2023, 1011, 1028, 11968, 17310, 8553, 13832, 10623, 27417...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/AbstractAdapter.php
AbstractAdapter.createSystemCache
public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null) { $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); if (null !== $logger) { $opcache->setLogger($logger); } if (!sel...
php
public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null) { $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); if (null !== $logger) { $opcache->setLogger($logger); } if (!sel...
[ "public", "static", "function", "createSystemCache", "(", "$", "namespace", ",", "$", "defaultLifetime", ",", "$", "version", ",", "$", "directory", ",", "LoggerInterface", "$", "logger", "=", "null", ")", "{", "$", "opcache", "=", "new", "PhpFilesAdapter", ...
Returns the best possible adapter that your runtime supports. Using ApcuAdapter makes system caches compatible with read-only filesystems. @param string $namespace @param int $defaultLifetime @param string $version @param string $directory @param LoggerInterf...
[ "Returns", "the", "best", "possible", "adapter", "that", "your", "runtime", "supports", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L105-L124
train
Create the system cache
[ 30522, 2270, 10763, 3853, 9005, 27268, 6633, 3540, 5403, 1006, 1002, 3415, 15327, 1010, 1002, 12398, 15509, 7292, 1010, 1002, 2544, 1010, 1002, 14176, 1010, 8833, 4590, 18447, 2121, 12172, 1002, 8833, 4590, 1027, 19701, 1007, 1063, 1002, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.parseToken
protected function parseToken($token) { [$id, $content] = $token; if ($id == T_INLINE_HTML) { foreach ($this->compilers as $type) { $content = $this->{"compile{$type}"}($content); } } return $content; }
php
protected function parseToken($token) { [$id, $content] = $token; if ($id == T_INLINE_HTML) { foreach ($this->compilers as $type) { $content = $this->{"compile{$type}"}($content); } } return $content; }
[ "protected", "function", "parseToken", "(", "$", "token", ")", "{", "[", "$", "id", ",", "$", "content", "]", "=", "$", "token", ";", "if", "(", "$", "id", "==", "T_INLINE_HTML", ")", "{", "foreach", "(", "$", "this", "->", "compilers", "as", "$", ...
Parse the tokens from the template. @param array $token @return string
[ "Parse", "the", "tokens", "from", "the", "template", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L307-L318
train
Parse the token and return the content
[ 30522, 5123, 3853, 11968, 13462, 11045, 2078, 1006, 1002, 19204, 1007, 1063, 1031, 1002, 8909, 1010, 1002, 4180, 1033, 1027, 1002, 19204, 1025, 2065, 1006, 1002, 8909, 1027, 1027, 1056, 1035, 23881, 1035, 16129, 1007, 1063, 18921, 6776, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreConsole/Commands/CoreArchiver.php
CoreArchiver.makeArchiver
public static function makeArchiver($url, InputInterface $input) { $archiver = new CronArchive(); $archiver->disableScheduledTasks = $input->getOption('disable-scheduled-tasks'); $archiver->acceptInvalidSSLCertificate = $input->getOption("accept-invalid-ssl-certificate"); $archiver-...
php
public static function makeArchiver($url, InputInterface $input) { $archiver = new CronArchive(); $archiver->disableScheduledTasks = $input->getOption('disable-scheduled-tasks'); $archiver->acceptInvalidSSLCertificate = $input->getOption("accept-invalid-ssl-certificate"); $archiver-...
[ "public", "static", "function", "makeArchiver", "(", "$", "url", ",", "InputInterface", "$", "input", ")", "{", "$", "archiver", "=", "new", "CronArchive", "(", ")", ";", "$", "archiver", "->", "disableScheduledTasks", "=", "$", "input", "->", "getOption", ...
also used by another console command
[ "also", "used", "by", "another", "console", "command" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreConsole/Commands/CoreArchiver.php#L31-L64
train
Creates an archiver for the given URL and Input
[ 30522, 2270, 10763, 3853, 2191, 2906, 5428, 6299, 1006, 1002, 24471, 2140, 1010, 7953, 18447, 2121, 12172, 1002, 7953, 1007, 1063, 1002, 8756, 2099, 1027, 2047, 13675, 7856, 11140, 3512, 1006, 1007, 1025, 1002, 8756, 2099, 1011, 1028, 4487,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Mysqli.php
Zend_Db_Adapter_Mysqli.limit
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** * @see Zend_Db_Adapter_Mysqli_Exception */ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php'; throw new Zend_Db_Adapter_Mysqli_Excepti...
php
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** * @see Zend_Db_Adapter_Mysqli_Exception */ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php'; throw new Zend_Db_Adapter_Mysqli_Excepti...
[ "public", "function", "limit", "(", "$", "sql", ",", "$", "count", ",", "$", "offset", "=", "0", ")", "{", "$", "count", "=", "intval", "(", "$", "count", ")", ";", "if", "(", "$", "count", "<=", "0", ")", "{", "/**\n * @see Zend_Db_Adapt...
Adds an adapter-specific LIMIT clause to the SELECT statement. @param string $sql @param int $count @param int $offset OPTIONAL @return string
[ "Adds", "an", "adapter", "-", "specific", "LIMIT", "clause", "to", "the", "SELECT", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Mysqli.php#L526-L552
train
Limit statement to specific count and offset
[ 30522, 2270, 3853, 5787, 1006, 1002, 29296, 1010, 1002, 4175, 1010, 1002, 16396, 1027, 1014, 1007, 1063, 1002, 4175, 1027, 20014, 10175, 1006, 1002, 4175, 1007, 1025, 2065, 1006, 1002, 4175, 1026, 1027, 1014, 1007, 1063, 1013, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/GPM/Response.php
Response.getCurl
private static function getCurl() { $args = func_get_args(); $args = count($args) > 1 ? $args : array_shift($args); $uri = $args[0]; $options = $args[1] ?? []; $callback = $args[2] ?? null; $ch = curl_init($uri); $response = static::curlExecFollow($ch...
php
private static function getCurl() { $args = func_get_args(); $args = count($args) > 1 ? $args : array_shift($args); $uri = $args[0]; $options = $args[1] ?? []; $callback = $args[2] ?? null; $ch = curl_init($uri); $response = static::curlExecFollow($ch...
[ "private", "static", "function", "getCurl", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "args", "=", "count", "(", "$", "args", ")", ">", "1", "?", "$", "args", ":", "array_shift", "(", "$", "args", ")", ";", "$", "uri",...
Starts a HTTP request via cURL @return string The response of the request
[ "Starts", "a", "HTTP", "request", "via", "cURL" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/Response.php#L328-L359
train
Get the curl resource
[ 30522, 2797, 10763, 3853, 2131, 10841, 12190, 1006, 1007, 1063, 1002, 12098, 5620, 1027, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 1002, 12098, 5620, 1027, 4175, 1006, 1002, 12098, 5620, 1007, 1028, 1015, 1029, 1002, 1209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Worker.php
Worker.setProcessTitle
protected static function setProcessTitle($title) { set_error_handler(function(){}); // >=php 5.5 if (function_exists('cli_set_process_title')) { cli_set_process_title($title); } // Need proctitle when php<=5.5 . elseif (extension_loaded('proctitle') && function_e...
php
protected static function setProcessTitle($title) { set_error_handler(function(){}); // >=php 5.5 if (function_exists('cli_set_process_title')) { cli_set_process_title($title); } // Need proctitle when php<=5.5 . elseif (extension_loaded('proctitle') && function_e...
[ "protected", "static", "function", "setProcessTitle", "(", "$", "title", ")", "{", "set_error_handler", "(", "function", "(", ")", "{", "}", ")", ";", "// >=php 5.5", "if", "(", "function_exists", "(", "'cli_set_process_title'", ")", ")", "{", "cli_set_process_t...
Set process name. @param string $title @return void
[ "Set", "process", "name", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1550-L1561
train
Set process title
[ 30522, 5123, 10763, 3853, 2275, 21572, 9623, 16643, 9286, 1006, 1002, 2516, 1007, 1063, 2275, 1035, 7561, 1035, 28213, 1006, 3853, 1006, 1007, 1063, 1065, 1007, 1025, 1013, 1013, 1028, 1027, 25718, 1019, 1012, 1019, 2065, 1006, 3853, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php
CurrencyDataGenerator.generateDataForRoot
protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); return [ 'Version' => $rootBundle['Version'], 'Names' => $this->generateSymbolNamePairs($rootBundle), ]; }
php
protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); return [ 'Version' => $rootBundle['Version'], 'Names' => $this->generateSymbolNamePairs($rootBundle), ]; }
[ "protected", "function", "generateDataForRoot", "(", "BundleReaderInterface", "$", "reader", ",", "$", "tempDir", ")", "{", "$", "rootBundle", "=", "$", "reader", "->", "read", "(", "$", "tempDir", ",", "'root'", ")", ";", "return", "[", "'Version'", "=>", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php#L115-L123
train
Generate data for root bundle
[ 30522, 5123, 3853, 7013, 6790, 29278, 3217, 4140, 1006, 14012, 16416, 4063, 18447, 2121, 12172, 1002, 8068, 1010, 1002, 8915, 8737, 4305, 2099, 1007, 1063, 1002, 7117, 27265, 2571, 1027, 1002, 8068, 1011, 1028, 3191, 1006, 1002, 8915, 8737,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.resolveExplicitBindingIfPossible
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
php
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
[ "protected", "function", "resolveExplicitBindingIfPossible", "(", "$", "key", ",", "$", "value", ")", "{", "$", "binder", "=", "$", "this", "->", "binder", "(", ")", ";", "if", "(", "$", "binder", "&&", "$", "binder", "->", "getBindingCallback", "(", "$"...
Resolve an explicit parameter binding if applicable. @param string $key @param mixed $value @return mixed
[ "Resolve", "an", "explicit", "parameter", "binding", "if", "applicable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L179-L188
train
Resolve an explicit binding if possible
[ 30522, 5123, 3853, 10663, 10288, 24759, 28775, 2102, 8428, 4667, 10128, 6873, 18719, 3468, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 1002, 14187, 2121, 1027, 1002, 2023, 1011, 1028, 14187, 2121, 1006, 1007, 1025, 2065, 1006, 1002, 141...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/controllers/Files.php
Files.getThumbUrl
public static function getThumbUrl($file, $width, $height, $options) { return Backend::url('backend/files/thumb/' . self::getUniqueCode($file)) . '/' . $width . '/' . $height . '/' . $options['mode'] . '/' . $options['extension']; }
php
public static function getThumbUrl($file, $width, $height, $options) { return Backend::url('backend/files/thumb/' . self::getUniqueCode($file)) . '/' . $width . '/' . $height . '/' . $options['mode'] . '/' . $options['extension']; }
[ "public", "static", "function", "getThumbUrl", "(", "$", "file", ",", "$", "width", ",", "$", "height", ",", "$", "options", ")", "{", "return", "Backend", "::", "url", "(", "'backend/files/thumb/'", ".", "self", "::", "getUniqueCode", "(", "$", "file", ...
Returns the URL for downloading a system file. @param $file System\Models\File @param $width int @param $height int @param $options array @return string
[ "Returns", "the", "URL", "for", "downloading", "a", "system", "file", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/controllers/Files.php#L72-L75
train
Get thumb url
[ 30522, 2270, 10763, 3853, 2131, 2705, 25438, 3126, 2140, 1006, 1002, 5371, 1010, 1002, 9381, 1010, 1002, 4578, 1010, 1002, 7047, 1007, 1063, 2709, 2067, 10497, 30524, 2067, 10497, 1013, 6764, 1013, 7639, 1013, 1005, 1012, 2969, 1024, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.prepareRequestUri
protected function prepareRequestUri() { $requestUri = ''; if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) $requestUri = $this->server->ge...
php
protected function prepareRequestUri() { $requestUri = ''; if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) $requestUri = $this->server->ge...
[ "protected", "function", "prepareRequestUri", "(", ")", "{", "$", "requestUri", "=", "''", ";", "if", "(", "'1'", "==", "$", "this", "->", "server", "->", "get", "(", "'IIS_WasUrlRewritten'", ")", "&&", "''", "!=", "$", "this", "->", "server", "->", "g...
/* The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24) Code subject to the new BSD license (http://framework.zend.com/license/new-bsd). Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
[ "/", "*", "The", "following", "methods", "are", "derived", "from", "code", "of", "the", "Zend", "Framework", "(", "1", ".", "10dev", "-", "2010", "-", "01", "-", "24", ")" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1705-L1748
train
Prepare request URI
[ 30522, 5123, 3853, 7374, 2890, 15500, 9496, 1006, 1007, 1063, 1002, 5227, 9496, 1027, 1005, 1005, 1025, 2065, 1006, 1005, 1015, 1005, 1027, 1027, 1002, 2023, 1011, 1028, 8241, 1011, 1028, 2131, 1006, 1005, 2462, 2015, 1035, 2001, 3126, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
SqlServerGrammar.compileSelect
public function compileSelect(Builder $query) { if (! $query->offset) { return parent::compileSelect($query); } // If an offset is present on the query, we will need to wrap the query in // a big "ANSI" offset syntax block. This is very nasty compared to the // o...
php
public function compileSelect(Builder $query) { if (! $query->offset) { return parent::compileSelect($query); } // If an offset is present on the query, we will need to wrap the query in // a big "ANSI" offset syntax block. This is very nasty compared to the // o...
[ "public", "function", "compileSelect", "(", "Builder", "$", "query", ")", "{", "if", "(", "!", "$", "query", "->", "offset", ")", "{", "return", "parent", "::", "compileSelect", "(", "$", "query", ")", ";", "}", "// If an offset is present on the query, we wil...
Compile a select query into SQL. @param \Illuminate\Database\Query\Builder $query @return string
[ "Compile", "a", "select", "query", "into", "SQL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L27-L43
train
Compiles a select statement into a string
[ 30522, 2270, 3853, 4012, 22090, 11246, 22471, 1006, 12508, 1002, 23032, 1007, 1063, 2065, 1006, 999, 1002, 23032, 1011, 1028, 16396, 1007, 1063, 2709, 6687, 1024, 1024, 4012, 22090, 11246, 22471, 1006, 1002, 23032, 1007, 1025, 1065, 1013, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/behaviors/ReorderController.php
ReorderController.getRecords
protected function getRecords() { $records = null; $model = $this->controller->reorderGetModel(); $query = $model->newQuery(); $this->controller->reorderExtendQuery($query); if ($this->sortMode == 'simple') { $records = $query ->orderBy($model->g...
php
protected function getRecords() { $records = null; $model = $this->controller->reorderGetModel(); $query = $model->newQuery(); $this->controller->reorderExtendQuery($query); if ($this->sortMode == 'simple') { $records = $query ->orderBy($model->g...
[ "protected", "function", "getRecords", "(", ")", "{", "$", "records", "=", "null", ";", "$", "model", "=", "$", "this", "->", "controller", "->", "reorderGetModel", "(", ")", ";", "$", "query", "=", "$", "model", "->", "newQuery", "(", ")", ";", "$",...
Returns all the records from the supplied model. @return Collection
[ "Returns", "all", "the", "records", "from", "the", "supplied", "model", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/ReorderController.php#L230-L249
train
Get records from the model
[ 30522, 5123, 3853, 2131, 2890, 27108, 5104, 1006, 1007, 1063, 1002, 2636, 1027, 19701, 1025, 1002, 2944, 1027, 1002, 2023, 1011, 1028, 11486, 1011, 1028, 2128, 8551, 2121, 18150, 5302, 9247, 1006, 1007, 1025, 1002, 23032, 1027, 1002, 2944, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Goals/Model.php
Model.deleteGoalConversions
public function deleteGoalConversions($idSite, $idGoal) { $table = Common::prefixTable("log_conversion"); Db::deleteAllRows($table, "WHERE idgoal = ? AND idsite = ?", "idvisit", 100000, array($idGoal, $idSite)); }
php
public function deleteGoalConversions($idSite, $idGoal) { $table = Common::prefixTable("log_conversion"); Db::deleteAllRows($table, "WHERE idgoal = ? AND idsite = ?", "idvisit", 100000, array($idGoal, $idSite)); }
[ "public", "function", "deleteGoalConversions", "(", "$", "idSite", ",", "$", "idGoal", ")", "{", "$", "table", "=", "Common", "::", "prefixTable", "(", "\"log_conversion\"", ")", ";", "Db", "::", "deleteAllRows", "(", "$", "table", ",", "\"WHERE idgoal = ? AND...
actually this should be in a log_conversion model
[ "actually", "this", "should", "be", "in", "a", "log_conversion", "model" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Goals/Model.php#L60-L65
train
Deletes all conversions for a site and goal
[ 30522, 2270, 3853, 3972, 12870, 3995, 2389, 8663, 27774, 2015, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 8909, 3995, 2389, 1007, 1063, 1002, 2795, 1027, 2691, 1024, 1024, 17576, 10880, 1006, 1000, 8833, 1035, 7584, 1000, 1007, 1025, 16962,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php
DefinitionErrorExceptionPass.processValue
protected function processValue($value, $isRoot = false) { if (!$value instanceof Definition || !$value->hasErrors()) { return parent::processValue($value, $isRoot); } if ($isRoot && !$value->isPublic()) { $graph = $this->container->getCompiler()->getServiceReference...
php
protected function processValue($value, $isRoot = false) { if (!$value instanceof Definition || !$value->hasErrors()) { return parent::processValue($value, $isRoot); } if ($isRoot && !$value->isPublic()) { $graph = $this->container->getCompiler()->getServiceReference...
[ "protected", "function", "processValue", "(", "$", "value", ",", "$", "isRoot", "=", "false", ")", "{", "if", "(", "!", "$", "value", "instanceof", "Definition", "||", "!", "$", "value", "->", "hasErrors", "(", ")", ")", "{", "return", "parent", "::", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php#L29-L55
train
Process value of type Definition
[ 30522, 5123, 3853, 2832, 10175, 5657, 1006, 1002, 3643, 1010, 1002, 2003, 3217, 4140, 1027, 6270, 1007, 1063, 2065, 1006, 999, 1002, 3643, 6013, 11253, 6210, 1064, 1064, 999, 1002, 3643, 1011, 1028, 2038, 2121, 29165, 2015, 1006, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
Pecl.isWorking
public function isWorking() { // if no no location database is available, this implementation is not setup correctly if (!self::isLocationDatabaseAvailable()) { $dbDir = dirname(geoip_db_filename(GEOIP_COUNTRY_EDITION)) . '/'; $quotedDir = "'$dbDir'"; // check if...
php
public function isWorking() { // if no no location database is available, this implementation is not setup correctly if (!self::isLocationDatabaseAvailable()) { $dbDir = dirname(geoip_db_filename(GEOIP_COUNTRY_EDITION)) . '/'; $quotedDir = "'$dbDir'"; // check if...
[ "public", "function", "isWorking", "(", ")", "{", "// if no no location database is available, this implementation is not setup correctly", "if", "(", "!", "self", "::", "isLocationDatabaseAvailable", "(", ")", ")", "{", "$", "dbDir", "=", "dirname", "(", "geoip_db_filena...
Returns true if the PECL module that is installed can be successfully used to get the location of an IP address. @return bool
[ "Returns", "true", "if", "the", "PECL", "module", "that", "is", "installed", "can", "be", "successfully", "used", "to", "get", "the", "location", "of", "an", "IP", "address", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php#L122-L145
train
Returns true if the location database is available and false if not
[ 30522, 2270, 3853, 2003, 21398, 1006, 1007, 1063, 1013, 1013, 2065, 2053, 2053, 3295, 7809, 2003, 2800, 1010, 2023, 7375, 2003, 2025, 16437, 11178, 2065, 1006, 999, 2969, 1024, 1024, 2003, 4135, 10719, 2850, 2696, 15058, 12462, 11733, 3468,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Scheduler/Job.php
Job.run
public function run() { // If the truthTest failed, don't run if ($this->truthTest !== true) { return false; } // If overlapping, don't run if ($this->isOverlapping()) { return false; } // Write lock file if necessary $this->c...
php
public function run() { // If the truthTest failed, don't run if ($this->truthTest !== true) { return false; } // If overlapping, don't run if ($this->isOverlapping()) { return false; } // Write lock file if necessary $this->c...
[ "public", "function", "run", "(", ")", "{", "// If the truthTest failed, don't run", "if", "(", "$", "this", "->", "truthTest", "!==", "true", ")", "{", "return", "false", ";", "}", "// If overlapping, don't run", "if", "(", "$", "this", "->", "isOverlapping", ...
Run the job. @return bool
[ "Run", "the", "job", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Scheduler/Job.php#L277-L316
train
Runs the command
[ 30522, 2270, 3853, 2448, 1006, 1007, 1063, 1013, 1013, 2065, 1996, 3606, 22199, 3478, 1010, 2123, 1005, 1056, 2448, 2065, 1006, 1002, 2023, 1011, 1028, 3606, 22199, 999, 1027, 1027, 2995, 1007, 1063, 2709, 6270, 1025, 1065, 1013, 1013, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement.php
Zend_Db_Statement._fetchBound
public function _fetchBound($row) { foreach ($row as $key => $value) { // bindColumn() takes 1-based integer positions // but fetch() returns 0-based integer indexes if (is_int($key)) { $key++; } // set results only to variables tha...
php
public function _fetchBound($row) { foreach ($row as $key => $value) { // bindColumn() takes 1-based integer positions // but fetch() returns 0-based integer indexes if (is_int($key)) { $key++; } // set results only to variables tha...
[ "public", "function", "_fetchBound", "(", "$", "row", ")", "{", "foreach", "(", "$", "row", "as", "$", "key", "=>", "$", "value", ")", "{", "// bindColumn() takes 1-based integer positions", "// but fetch() returns 0-based integer indexes", "if", "(", "is_int", "(",...
Helper function to map retrieved row to bound column variables @param array $row @return bool True
[ "Helper", "function", "to", "map", "retrieved", "row", "to", "bound", "column", "variables" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement.php#L449-L463
train
Fetch the bound values from the query
[ 30522, 2270, 3853, 1035, 18584, 15494, 1006, 1002, 5216, 1007, 1063, 18921, 6776, 1006, 1002, 5216, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 1013, 1013, 14187, 25778, 2819, 2078, 1006, 1007, 3138, 1015, 1011, 2241, 16109, 4460,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/Material/Client.php
Client.list
public function list(string $type, int $offset = 0, int $count = 20) { $params = [ 'type' => $type, 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/material/batchget_material', $params); }
php
public function list(string $type, int $offset = 0, int $count = 20) { $params = [ 'type' => $type, 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/material/batchget_material', $params); }
[ "public", "function", "list", "(", "string", "$", "type", ",", "int", "$", "offset", "=", "0", ",", "int", "$", "count", "=", "20", ")", "{", "$", "params", "=", "[", "'type'", "=>", "$", "type", ",", "'offset'", "=>", "$", "offset", ",", "'count...
List materials. example: { "total_count": TOTAL_COUNT, "item_count": ITEM_COUNT, "item": [{ "media_id": MEDIA_ID, "name": NAME, "update_time": UPDATE_TIME }, // more... ] } @param string $type @param int $offset @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collectio...
[ "List", "materials", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Material/Client.php#L225-L234
train
List Materials
[ 30522, 2270, 3853, 2862, 1006, 5164, 1002, 2828, 1010, 20014, 1002, 16396, 1027, 1014, 1010, 20014, 1002, 4175, 1027, 2322, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 2828, 1005, 1027, 1028, 1002, 2828, 1010, 1005, 16396, 1005, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/FontMetrics.php
FontMetrics.getFont
public function getFont($familyRaw, $subtypeRaw = "normal") { static $cache = array(); if (isset($cache[$familyRaw][$subtypeRaw])) { return $cache[$familyRaw][$subtypeRaw]; } /* Allow calling for various fonts in search path. Therefore not immediately * return ...
php
public function getFont($familyRaw, $subtypeRaw = "normal") { static $cache = array(); if (isset($cache[$familyRaw][$subtypeRaw])) { return $cache[$familyRaw][$subtypeRaw]; } /* Allow calling for various fonts in search path. Therefore not immediately * return ...
[ "public", "function", "getFont", "(", "$", "familyRaw", ",", "$", "subtypeRaw", "=", "\"normal\"", ")", "{", "static", "$", "cache", "=", "array", "(", ")", ";", "if", "(", "isset", "(", "$", "cache", "[", "$", "familyRaw", "]", "[", "$", "subtypeRaw...
Resolves a font family & subtype into an actual font file Subtype can be one of 'normal', 'bold', 'italic' or 'bold_italic'. If the particular font family has no suitable font file, the default font ({@link Options::defaultFont}) is used. The font file returned is the absolute pathname to the font file on the system....
[ "Resolves", "a", "font", "family", "&", "subtype", "into", "an", "actual", "font", "file", "Subtype", "can", "be", "one", "of", "normal", "bold", "italic", "or", "bold_italic", ".", "If", "the", "particular", "font", "family", "has", "no", "suitable", "fon...
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FontMetrics.php#L336-L397
train
Returns font object
[ 30522, 2270, 3853, 2131, 14876, 3372, 1006, 1002, 2155, 2527, 2860, 1010, 1002, 4942, 13874, 2527, 2860, 1027, 1000, 3671, 1000, 1007, 1063, 10763, 1002, 17053, 1027, 9140, 1006, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 17053, 1031,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.encodeString
public function encodeString($str, $encoding = self::ENCODING_BASE64) { $encoded = ''; switch (strtolower($encoding)) { case static::ENCODING_BASE64: $encoded = chunk_split( base64_encode($str), static::STD_LINE_LENGTH, ...
php
public function encodeString($str, $encoding = self::ENCODING_BASE64) { $encoded = ''; switch (strtolower($encoding)) { case static::ENCODING_BASE64: $encoded = chunk_split( base64_encode($str), static::STD_LINE_LENGTH, ...
[ "public", "function", "encodeString", "(", "$", "str", ",", "$", "encoding", "=", "self", "::", "ENCODING_BASE64", ")", "{", "$", "encoded", "=", "''", ";", "switch", "(", "strtolower", "(", "$", "encoding", ")", ")", "{", "case", "static", "::", "ENCO...
Encode a string in requested format. Returns an empty string on failure. @param string $str The text to encode @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' @return string
[ "Encode", "a", "string", "in", "requested", "format", ".", "Returns", "an", "empty", "string", "on", "failure", "." ]
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L3048-L3079
train
Encode a string
[ 30522, 2270, 3853, 4372, 23237, 18886, 3070, 1006, 1002, 2358, 2099, 1010, 1002, 17181, 1027, 2969, 1024, 1024, 17181, 1035, 2918, 21084, 1007, 1063, 1002, 12359, 1027, 1005, 1005, 1025, 6942, 1006, 2358, 5339, 12898, 13777, 1006, 1002, 171...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/RedisTaggedCache.php
RedisTaggedCache.decrement
public function decrement($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); parent::decrement($key, $value); }
php
public function decrement($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); parent::decrement($key, $value); }
[ "public", "function", "decrement", "(", "$", "key", ",", "$", "value", "=", "1", ")", "{", "$", "this", "->", "pushStandardKeys", "(", "$", "this", "->", "tags", "->", "getNamespace", "(", ")", ",", "$", "key", ")", ";", "parent", "::", "decrement", ...
Decrement the value of an item in the cache. @param string $key @param mixed $value @return void
[ "Decrement", "the", "value", "of", "an", "item", "in", "the", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/RedisTaggedCache.php#L60-L65
train
Decrement the value of a tag
[ 30522, 2270, 3853, 11703, 28578, 4765, 1006, 1002, 3145, 1010, 1002, 3643, 1027, 1015, 1007, 1063, 1002, 2023, 1011, 1028, 5245, 21515, 4232, 14839, 2015, 1006, 1002, 2023, 1011, 1028, 22073, 1011, 1028, 2131, 18442, 23058, 1006, 1007, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/BinaryFileResponse.php
BinaryFileResponse.setAutoEtag
public function setAutoEtag() { $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); return $this; }
php
public function setAutoEtag() { $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); return $this; }
[ "public", "function", "setAutoEtag", "(", ")", "{", "$", "this", "->", "setEtag", "(", "base64_encode", "(", "hash_file", "(", "'sha256'", ",", "$", "this", "->", "file", "->", "getPathname", "(", ")", ",", "true", ")", ")", ")", ";", "return", "$", ...
Automatically sets the ETag header according to the checksum of the file.
[ "Automatically", "sets", "the", "ETag", "header", "according", "to", "the", "checksum", "of", "the", "file", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php#L140-L145
train
Set auto - etag
[ 30522, 2270, 3853, 2275, 4887, 3406, 12928, 2290, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 12928, 2290, 1006, 2918, 21084, 1035, 4372, 16044, 1006, 23325, 1035, 5371, 1006, 1005, 21146, 17788, 2575, 1005, 1010, 1002, 2023, 1011, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Events/Select.php
Select.tick
protected function tick() { while (!$this->_scheduler->isEmpty()) { $scheduler_data = $this->_scheduler->top(); $timer_id = $scheduler_data['data']; $next_run_time = -$scheduler_data['priority']; $time_now = microtime(true)...
php
protected function tick() { while (!$this->_scheduler->isEmpty()) { $scheduler_data = $this->_scheduler->top(); $timer_id = $scheduler_data['data']; $next_run_time = -$scheduler_data['priority']; $time_now = microtime(true)...
[ "protected", "function", "tick", "(", ")", "{", "while", "(", "!", "$", "this", "->", "_scheduler", "->", "isEmpty", "(", ")", ")", "{", "$", "scheduler_data", "=", "$", "this", "->", "_scheduler", "->", "top", "(", ")", ";", "$", "timer_id", "=", ...
Tick for timer. @return void
[ "Tick", "for", "timer", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Events/Select.php#L218-L248
train
tick the scheduler
[ 30522, 5123, 3853, 16356, 1006, 1007, 1063, 2096, 1006, 999, 1002, 2023, 1011, 1028, 1035, 6134, 2099, 1011, 1028, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 1002, 6134, 2099, 1035, 2951, 1027, 1002, 2023, 1011, 1028, 1035, 6134, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Piwik.php
Piwik.translate
public static function translate($translationId, $args = array(), $language = null) { /** @var Translator $translator */ $translator = StaticContainer::get('Piwik\Translation\Translator'); return $translator->translate($translationId, $args, $language); }
php
public static function translate($translationId, $args = array(), $language = null) { /** @var Translator $translator */ $translator = StaticContainer::get('Piwik\Translation\Translator'); return $translator->translate($translationId, $args, $language); }
[ "public", "static", "function", "translate", "(", "$", "translationId", ",", "$", "args", "=", "array", "(", ")", ",", "$", "language", "=", "null", ")", "{", "/** @var Translator $translator */", "$", "translator", "=", "StaticContainer", "::", "get", "(", ...
Returns an internationalized string using a translation token. If a translation cannot be found for the token, the token is returned. @param string $translationId Translation ID, eg, `'General_Date'`. @param array|string|int $args `sprintf` arguments to be applied to the internationalized string. @param string|null $l...
[ "Returns", "an", "internationalized", "string", "using", "a", "translation", "token", ".", "If", "a", "translation", "cannot", "be", "found", "for", "the", "token", "the", "token", "is", "returned", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Piwik.php#L820-L826
train
Translates a translation string
[ 30522, 2270, 10763, 3853, 17637, 1006, 1002, 5449, 3593, 1010, 1002, 12098, 5620, 1027, 9140, 1006, 1007, 1010, 1002, 2653, 1027, 19701, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 11403, 1002, 11403, 1008, 1013, 1002, 11403, 1027, 10763, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Style.php
Style.set_background_color
function set_background_color($color) { $col = $this->munge_color($color); if (is_null($col)) { return; //$col = self::$_defaults["background_color"]; } //see __set and __get, on all assignments clear cache, not needed on direct set through __set $th...
php
function set_background_color($color) { $col = $this->munge_color($color); if (is_null($col)) { return; //$col = self::$_defaults["background_color"]; } //see __set and __get, on all assignments clear cache, not needed on direct set through __set $th...
[ "function", "set_background_color", "(", "$", "color", ")", "{", "$", "col", "=", "$", "this", "->", "munge_color", "(", "$", "color", ")", ";", "if", "(", "is_null", "(", "$", "col", ")", ")", "{", "return", ";", "//$col = self::$_defaults[\"background_co...
Sets the background color @link http://www.w3.org/TR/CSS21/colors.html#propdef-background-color @param string $color
[ "Sets", "the", "background", "color" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1825-L1837
train
set background color
[ 30522, 3853, 2275, 1035, 4281, 1035, 3609, 1006, 1002, 3609, 1007, 1063, 1002, 8902, 1027, 1002, 2023, 1011, 1028, 14163, 15465, 1035, 3609, 1006, 1002, 3609, 1007, 1025, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 8902, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/DatabasePresenceVerifier.php
DatabasePresenceVerifier.addConditions
protected function addConditions($query, $conditions) { foreach ($conditions as $key => $value) { if ($value instanceof Closure) { $query->where(function ($query) use ($value) { $value($query); }); } else { $this->ad...
php
protected function addConditions($query, $conditions) { foreach ($conditions as $key => $value) { if ($value instanceof Closure) { $query->where(function ($query) use ($value) { $value($query); }); } else { $this->ad...
[ "protected", "function", "addConditions", "(", "$", "query", ",", "$", "conditions", ")", "{", "foreach", "(", "$", "conditions", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "Closure", ")", "{", "$", "query", ...
Add the given conditions to the query. @param \Illuminate\Database\Query\Builder $query @param array $conditions @return \Illuminate\Database\Query\Builder
[ "Add", "the", "given", "conditions", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/DatabasePresenceVerifier.php#L81-L94
train
Adds conditions to the query
[ 30522, 5123, 3853, 5587, 8663, 20562, 2015, 1006, 1002, 23032, 1010, 1002, 3785, 1007, 1063, 18921, 6776, 1006, 1002, 3785, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 3643, 6013, 11253, 8503, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
IntlDateFormatter.setTimeZone
public function setTimeZone($timeZone) { if ($timeZone instanceof \IntlTimeZone) { $timeZone = $timeZone->getID(); } if ($timeZone instanceof \DateTimeZone) { $timeZone = $timeZone->getName(); // DateTimeZone returns the GMT offset timezones without the ...
php
public function setTimeZone($timeZone) { if ($timeZone instanceof \IntlTimeZone) { $timeZone = $timeZone->getID(); } if ($timeZone instanceof \DateTimeZone) { $timeZone = $timeZone->getName(); // DateTimeZone returns the GMT offset timezones without the ...
[ "public", "function", "setTimeZone", "(", "$", "timeZone", ")", "{", "if", "(", "$", "timeZone", "instanceof", "\\", "IntlTimeZone", ")", "{", "$", "timeZone", "=", "$", "timeZone", "->", "getID", "(", ")", ";", "}", "if", "(", "$", "timeZone", "instan...
This method was added in PHP 5.5 as replacement for `setTimeZoneId()`. @param \IntlTimeZone|\DateTimeZone|string|null $timeZone @return bool true on success or false on failure @see http://www.php.net/manual/en/intldateformatter.settimezone.php
[ "This", "method", "was", "added", "in", "PHP", "5", ".", "5", "as", "replacement", "for", "setTimeZoneId", "()", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php#L561-L577
train
Set TimeZone - ID - NAME - NAME
[ 30522, 2270, 3853, 2275, 7292, 15975, 1006, 1002, 2051, 15975, 1007, 1063, 2065, 1006, 1002, 2051, 15975, 6013, 11253, 1032, 20014, 7096, 14428, 15975, 1007, 1063, 1002, 2051, 15975, 1027, 1002, 2051, 15975, 1011, 1028, 2131, 3593, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
HasAttributes.getArrayAttributeByKey
protected function getArrayAttributeByKey($key) { return isset($this->attributes[$key]) ? $this->fromJson($this->attributes[$key]) : []; }
php
protected function getArrayAttributeByKey($key) { return isset($this->attributes[$key]) ? $this->fromJson($this->attributes[$key]) : []; }
[ "protected", "function", "getArrayAttributeByKey", "(", "$", "key", ")", "{", "return", "isset", "(", "$", "this", "->", "attributes", "[", "$", "key", "]", ")", "?", "$", "this", "->", "fromJson", "(", "$", "this", "->", "attributes", "[", "$", "key",...
Get an array attribute or return an empty array if it is not set. @param string $key @return array
[ "Get", "an", "array", "attribute", "or", "return", "an", "empty", "array", "if", "it", "is", "not", "set", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php#L665-L669
train
Get array attribute by key
[ 30522, 5123, 3853, 2131, 2906, 29539, 4779, 3089, 8569, 2618, 3762, 14839, 1006, 1002, 3145, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 12332, 1031, 1002, 3145, 1033, 1007, 1029, 1002, 2023, 1011, 1028, 2013, 22578, 2239, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Simple/ChainCache.php
ChainCache.get
public function get($key, $default = null) { $miss = null !== $default && \is_object($default) ? $default : $this->miss; foreach ($this->caches as $i => $cache) { $value = $cache->get($key, $miss); if ($miss !== $value) { while (0 <= --$i) { ...
php
public function get($key, $default = null) { $miss = null !== $default && \is_object($default) ? $default : $this->miss; foreach ($this->caches as $i => $cache) { $value = $cache->get($key, $miss); if ($miss !== $value) { while (0 <= --$i) { ...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "$", "miss", "=", "null", "!==", "$", "default", "&&", "\\", "is_object", "(", "$", "default", ")", "?", "$", "default", ":", "$", "this", "->", "miss", ";"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/ChainCache.php#L64-L81
train
Get value from cache
[ 30522, 2270, 3853, 2131, 1006, 1002, 3145, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 1002, 3335, 1027, 19701, 999, 1027, 1027, 1002, 12398, 1004, 1004, 1032, 2003, 1035, 4874, 1006, 1002, 12398, 1007, 1029, 1002, 12398, 1024, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php
RedisTagAwareAdapter.doInvalidate
protected function doInvalidate(array $tagIds): bool { if (!$this->redisServerSupportSPOP()) { return false; } // Pop all tag info at once to avoid race conditions $tagIdSets = $this->pipeline(static function () use ($tagIds) { foreach ($tagIds as $tagId) { ...
php
protected function doInvalidate(array $tagIds): bool { if (!$this->redisServerSupportSPOP()) { return false; } // Pop all tag info at once to avoid race conditions $tagIdSets = $this->pipeline(static function () use ($tagIds) { foreach ($tagIds as $tagId) { ...
[ "protected", "function", "doInvalidate", "(", "array", "$", "tagIds", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "redisServerSupportSPOP", "(", ")", ")", "{", "return", "false", ";", "}", "// Pop all tag info at once to avoid race conditions", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php#L165-L189
train
Invalidate cache by tag ids
[ 30522, 5123, 3853, 24341, 10175, 8524, 2618, 1006, 9140, 1002, 6415, 9821, 1007, 1024, 22017, 2140, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2417, 23491, 2099, 14028, 6279, 25378, 16340, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Uri.php
Uri.param
public function param($id) { if (isset($this->params[$id])) { return html_entity_decode(rawurldecode($this->params[$id])); } return false; }
php
public function param($id) { if (isset($this->params[$id])) { return html_entity_decode(rawurldecode($this->params[$id])); } return false; }
[ "public", "function", "param", "(", "$", "id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "params", "[", "$", "id", "]", ")", ")", "{", "return", "html_entity_decode", "(", "rawurldecode", "(", "$", "this", "->", "params", "[", "$", "id"...
Get URI parameter. @param string $id @return bool|string
[ "Get", "URI", "parameter", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Uri.php#L306-L313
train
Get the parameter value
[ 30522, 2270, 3853, 11498, 2213, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 11498, 5244, 1031, 1002, 8909, 1033, 1007, 1007, 1063, 2709, 16129, 1035, 9178, 1035, 21933, 3207, 1006, 6315, 3126, 17920,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php
CompiledUrlMatcherDumper.groupStaticRoutes
private function groupStaticRoutes(RouteCollection $collection): array { $staticRoutes = $dynamicRegex = []; $dynamicRoutes = new RouteCollection(); foreach ($collection->all() as $name => $route) { $compiledRoute = $route->compile(); $staticPrefix = rtrim($compiledR...
php
private function groupStaticRoutes(RouteCollection $collection): array { $staticRoutes = $dynamicRegex = []; $dynamicRoutes = new RouteCollection(); foreach ($collection->all() as $name => $route) { $compiledRoute = $route->compile(); $staticPrefix = rtrim($compiledR...
[ "private", "function", "groupStaticRoutes", "(", "RouteCollection", "$", "collection", ")", ":", "array", "{", "$", "staticRoutes", "=", "$", "dynamicRegex", "=", "[", "]", ";", "$", "dynamicRoutes", "=", "new", "RouteCollection", "(", ")", ";", "foreach", "...
Splits static routes from dynamic routes, so that they can be matched first, using a simple switch.
[ "Splits", "static", "routes", "from", "dynamic", "routes", "so", "that", "they", "can", "be", "matched", "first", "using", "a", "simple", "switch", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php#L167-L205
train
Groups static routes into static routes and dynamic routes
[ 30522, 2797, 3853, 2967, 29336, 2594, 22494, 4570, 1006, 2799, 26895, 18491, 1002, 3074, 1007, 1024, 9140, 1063, 1002, 10763, 22494, 4570, 1027, 1002, 8790, 2890, 3351, 2595, 1027, 1031, 1033, 1025, 1002, 8790, 22494, 4570, 1027, 2047, 2799...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form.php
Form.handleFileSort
protected function handleFileSort(array $input = []) { if (!array_key_exists(Field::FILE_SORT_FLAG, $input)) { return $input; } $sorts = array_filter($input[Field::FILE_SORT_FLAG]); if (empty($sorts)) { return $input; } foreach ($sorts as $c...
php
protected function handleFileSort(array $input = []) { if (!array_key_exists(Field::FILE_SORT_FLAG, $input)) { return $input; } $sorts = array_filter($input[Field::FILE_SORT_FLAG]); if (empty($sorts)) { return $input; } foreach ($sorts as $c...
[ "protected", "function", "handleFileSort", "(", "array", "$", "input", "=", "[", "]", ")", "{", "if", "(", "!", "array_key_exists", "(", "Field", "::", "FILE_SORT_FLAG", ",", "$", "input", ")", ")", "{", "return", "$", "input", ";", "}", "$", "sorts", ...
@param array $input @return array
[ "@param", "array", "$input" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form.php#L698-L717
train
Handle file sort
[ 30522, 5123, 3853, 5047, 8873, 4244, 11589, 1006, 9140, 1002, 7953, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 9140, 1035, 3145, 1035, 6526, 1006, 2492, 1024, 1024, 5371, 1035, 4066, 1035, 5210, 1010, 1002, 7953, 1007, 1007, 1063, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/FileUpload.php
FileUpload.getPromptText
protected function getPromptText() { if ($this->prompt === null) { $isMulti = ends_with($this->getDisplayMode(), 'multi'); $this->prompt = $isMulti ? 'backend::lang.fileupload.upload_file' : 'backend::lang.fileupload.default_prompt'; } ...
php
protected function getPromptText() { if ($this->prompt === null) { $isMulti = ends_with($this->getDisplayMode(), 'multi'); $this->prompt = $isMulti ? 'backend::lang.fileupload.upload_file' : 'backend::lang.fileupload.default_prompt'; } ...
[ "protected", "function", "getPromptText", "(", ")", "{", "if", "(", "$", "this", "->", "prompt", "===", "null", ")", "{", "$", "isMulti", "=", "ends_with", "(", "$", "this", "->", "getDisplayMode", "(", ")", ",", "'multi'", ")", ";", "$", "this", "->...
Returns the escaped and translated prompt text to display according to the type. @return string
[ "Returns", "the", "escaped", "and", "translated", "prompt", "text", "to", "display", "according", "to", "the", "type", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/FileUpload.php#L186-L196
train
Get the text for the prompt
[ 30522, 5123, 3853, 2131, 21572, 27718, 18209, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 25732, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 2003, 12274, 7096, 2072, 1027, 4515, 1035, 2007, 1006, 1002, 2023, 1011, 1028, 2131, 10521...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...