query stringlengths 7 5.25k | document stringlengths 15 1.06M | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
get the ObjectID and store it in the session variable | function OBJM_setCurrentSessionState(&$respData)
{
parse_str($respData) ;
$projID = $PROJECTID;
$PageID = $PAGEID;
$objID = $OBJECTID;
$_SESSION['currEditableObjID'] = $objID;
$_SESSION['currPageID'] = $PageID;
$_SESSION['currProjID'] = $projID;
$respData = 'OK';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSessionID();",
"public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}",
"final function getSession_id() {\n\t\treturn $this->getSessionId();\n\t}",
"public function getSessionID()\n {\n return $this->_session;\n }",
"public static function getSessionid();",
... | [
"0.73259157",
"0.7212702",
"0.713236",
"0.70653033",
"0.6996906",
"0.69799054",
"0.69516957",
"0.6933173",
"0.6918101",
"0.69053423",
"0.68070936",
"0.67806655",
"0.672962",
"0.66660756",
"0.6652238",
"0.6637522",
"0.66199607",
"0.66092914",
"0.6603086",
"0.65822566",
"0.6566... | 0.0 | -1 |
using the slide array now generate the code | function OBJM_getSlideShowInfocode(&$codestr, $myslidearr)
{
//$codestr="";
$tempstr = "";
$gEffectSep = $GLOBALS['gEffectSep'];
// write the code into the script node
$tempstr = "var slidearr = []; var gslideIndex = 0; ";
$codestr = $codestr . $tempstr;
$arrlen = count($myslidearr);
$nItems = 0;
for... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function slide(){\r\n\t\t\r\n\t}",
"function OBJM_getAutoSlideShowInfoCode(&$codestr)\r\n{\r\n\t$tempstr = \"\"; \r\n\t$codestr = \"\"; \r\n\tif(!isset($_SESSION['sceneCompXMLDOM']) )\r\n\t\treturn false;\r\n\tif(!isset($_SESSION['sceneCompXMLFilePath']))\r\n\t\treturn false;\r\n\t\r\n\t$sceneArr;\t\r\n\t... | [
"0.63714504",
"0.5906517",
"0.5895319",
"0.58403003",
"0.57721364",
"0.57005954",
"0.5700309",
"0.56345993",
"0.5560075",
"0.55486447",
"0.5540491",
"0.5508459",
"0.54328257",
"0.54278815",
"0.5393459",
"0.53758585",
"0.53611267",
"0.53483534",
"0.5329583",
"0.53157586",
"0.5... | 0.6434293 | 0 |
just generate the code | function OBJM_getPageShowInfo(&$codestr, $pagenameArr, $currentPageIndex)
{
$tempstr = "";
$codestr = "";
// write the code into the script node
$pagecount = count($pagenameArr);
$tempstr = "var gpagearr = [];";
$tempstr = $tempstr . "var gcurrpageIndex = " .$currentPageIndex . ";";
$tempstr = $tempstr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generate() ;",
"function Generate()\n \t{\n \t\t\n \t}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
... | [
"0.7674509",
"0.76112866",
"0.75846803",
"0.75846803",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75112146",
"0.75112146",
"0.75112146",
"0.75112146",
"0.75112146",
"0.7467985",
"0.73182106",
"0.7196925",
"0.71296734",
"0.699222",
"0.6953588",
"0... | 0.0 | -1 |
first get the array of slide IDs | function OBJM_getAutoSlideShowInfoCode(&$codestr)
{
$tempstr = "";
$codestr = "";
if(!isset($_SESSION['sceneCompXMLDOM']) )
return false;
if(!isset($_SESSION['sceneCompXMLFilePath']))
return false;
$sceneArr;
$retval = $_SESSION['sceneCompXMLDOM']->load($_SESSION['sceneCompXMLFilePath']);
if(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAvailableSlideUIDs(){\n\n $slideUIDs = $this->find( 'list', [\n 'fields' => [\n 'HeaderSlide.uid',\n 'HeaderSlide.uid'\n ]\n ]);\n\n //Return the slide UIDs in a a sequentially indexed array\n return array_values( $s... | [
"0.7091818",
"0.65734255",
"0.6500556",
"0.64915705",
"0.64915705",
"0.63222426",
"0.6232934",
"0.62046564",
"0.61948305",
"0.61872244",
"0.61867285",
"0.6130438",
"0.6108768",
"0.6080826",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.60524... | 0.0 | -1 |
Template Name: WPCampus 2018: Watch | function wpc_2018_enable_watch_videos() {
if ( function_exists( 'wpcampus_network_enable' ) ) {
wpcampus_network_enable( 'videos' );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caption() {\n\t\treturn \"watches\";\n\t}",
"function wp_print_community_events_templates()\n {\n }",
"public function mvr_ctr_basic_admin_template(): string {\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_el... | [
"0.6049604",
"0.57118225",
"0.5580223",
"0.55565786",
"0.54781216",
"0.54729337",
"0.5429304",
"0.53471035",
"0.53406715",
"0.5319915",
"0.5316051",
"0.53141856",
"0.5276216",
"0.5275025",
"0.5272571",
"0.518251",
"0.51752186",
"0.51545906",
"0.5146451",
"0.5146451",
"0.51464... | 0.0 | -1 |
Prints watch videos page. | function wpc_2018_print_watch_videos_content( $content ) {
if ( function_exists( 'wpcampus_print_watch_videos' ) ) {
wpcampus_print_watch_videos( 'wpc-videos', array(
'playlist' => 'wpcampus-2018',
'show_event' => false,
'show_filters' => false,
));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wpc_2016_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2016',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}",
"public funct... | [
"0.72184587",
"0.6371902",
"0.63163924",
"0.63097936",
"0.62435746",
"0.622321",
"0.6176564",
"0.6164794",
"0.6153655",
"0.6133823",
"0.6124422",
"0.6115143",
"0.60959274",
"0.60726327",
"0.6063696",
"0.6013747",
"0.6006231",
"0.5990126",
"0.59749126",
"0.59701407",
"0.595036... | 0.71291244 | 1 |
Create an order based on the attributes of a charge. | public static function createForCharge(\Stripe\Charge $charge, $user)
{
return self::create([
'user_id' => $user->id,
'charge_id' => $charge['id'],
'charged_at' => $charge['created'],
'charge_amount' => $charge['amount'],
'card_last_four' => $charg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildOrder($orders) {\n\t$order = [\n\t\t\"service_uid\" => $orders[0][15],\n\t\t\"points\" => 0,\n\t\t\"invoice_number\" => $orders[0][2],\n\t\t\"purchase_detail\" => [],\n\t\t\"prices\" => [],\n\t\t\"branch_name\" => $orders[0][0],\n\t\t\"createtime\" => date('Y-m-d H:i:s')\n\t];\n\n\t$total = 0;\n\t$di... | [
"0.5980189",
"0.59595215",
"0.5950711",
"0.59360516",
"0.58234584",
"0.5813438",
"0.58033156",
"0.5671984",
"0.56533015",
"0.5641409",
"0.5637551",
"0.5585764",
"0.5584091",
"0.55672723",
"0.55497193",
"0.55447143",
"0.5524416",
"0.55082005",
"0.54963654",
"0.5480509",
"0.546... | 0.5040755 | 74 |
Display a listing of the resource. | public function index()
{
//
/*$roles = Role::all();
return view('blog.admin.categories.index')->withCategories($categories);*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
/*$this->validate($request,[
'name' => 'required|max:255'
]);
$category = new Category;
$category->name = $request->name;
$category->save();
Session::flash('success', ' New Category has been created')... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.63416... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$roles = Role::all();
$role = Role::find($id);
$users = User::whereHas('roles', function ($query) use ($role){
$query->where('id',$role->id);
})->orderBy('created_at','desc')->paginate(10);
return view('users.role')->withRoles($roles)->... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853"... | 0.0 | -1 |
Array with fields from functions.clean_up.csvTableFields from TS Constructor. The method initiate the parent object | function __construct( $parentObj )
{
$this->pObj = $parentObj;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initCSV() {}",
"public function __construct()\n {\n parent::__construct(\"CSV headers and rows did not match up.\");\n }",
"public function __construct() {\n parent::__construct();\n $this->_table_columns = array(\"id\", \"entry_date\", \"account_type\", \"entry_va... | [
"0.7261639",
"0.6564941",
"0.64760524",
"0.6379491",
"0.6352982",
"0.6289181",
"0.61774784",
"0.6100279",
"0.6089668",
"0.6081211",
"0.6054398",
"0.60237443",
"0.59224045",
"0.5913266",
"0.5908257",
"0.5907287",
"0.5898471",
"0.5884764",
"0.58560175",
"0.5851096",
"0.5835364"... | 0.0 | -1 |
getMode() : Display a single item from the database | private function getMode()
{
$mode = $this->mode;
$conf_view = $this->conf_view;
$sumOfModes = count( $conf_view );
// RETURN false : there isn't any single view
if ( $sumOfModes < 1 )
{
// RETURN : no DRS prompt needed
if ( !$this->pObj->b_drs_error )
{
return fal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function showSingle($id);",
"function show(int $id);",
"public function show(Modelo $modelo)\n {\n //\n }",
"public function show(Modelo $modelo)\n {\n //\n }",
"public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\... | [
"0.65377283",
"0.6361877",
"0.62688947",
"0.62688947",
"0.62545556",
"0.6201617",
"0.6152115",
"0.6103773",
"0.60771",
"0.6076273",
"0.6052327",
"0.6047852",
"0.6030736",
"0.6030736",
"0.60179985",
"0.60174125",
"0.60130465",
"0.6002538",
"0.6002538",
"0.60019404",
"0.5993482... | 0.0 | -1 |
hook_afterConsolidatetRows( ): Implement the hook rows_filter_values | private function hook_afterConsolidatetRows()
{
// Hook isn't used
if ( !is_array( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ 'browser' ][ 'browser_single' ] ) )
{
// RETURN without any prompt to DRS
if ( !$this->pObj->b_drs_hooks )
{
return;
}
// RETURN with a promp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function filter_row(&$row) {}",
"private function get_filterItemsFromRows()\n {\n // Default return value\n $arr_return = array();\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // RETURN rows are empty\n if ( empty( $this->rows ) )\n {\n // DRS\n if ( $this->pObj->b_drs_wa... | [
"0.6786167",
"0.66917896",
"0.62202233",
"0.6012041",
"0.5958116",
"0.5958116",
"0.5958116",
"0.5958116",
"0.56704456",
"0.56704456",
"0.5609677",
"0.5607713",
"0.55783933",
"0.5556022",
"0.5550583",
"0.55172926",
"0.5465594",
"0.54653746",
"0.54415244",
"0.5439634",
"0.54369... | 0.5172029 | 36 |
main() : Display a single item from the database | public function main()
{
// Set mode
$mode = $this->getMode();
if ( $mode < 1 )
{
return false;
}
$this->init();
$arr_result = $this->initSql();
if ( $arr_result[ 'error' ][ 'status' ] )
{
$template = $arr_result[ 'error' ][ 'header' ] . $arr_result[ 'error' ][ 'promp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }",
"p... | [
"0.65929663",
"0.65698856",
"0.65380996",
"0.64348406",
"0.64250404",
"0.63928664",
"0.63859946",
"0.63669646",
"0.635552",
"0.6335626",
"0.63166726",
"0.6281439",
"0.6265734",
"0.62485045",
"0.6215338",
"0.6210536",
"0.614904",
"0.6142465",
"0.61373246",
"0.61248904",
"0.612... | 0.0 | -1 |
generate random string and return it. | public static function randomString($len = 10, $type = 1, $prefixType = 0, $prefixConnection = ''){
$string = '';
$prefix = '';
for ($i = 0; $i<$len; $i++){
if ($type == 1) {
$t = rand(0, 2);
if ($t==0) {
$string .= rand(0, 9);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function randomString() {\r\n\t\t\t$rand=md5(microtime(true));\r\n\t\t\treturn $rand;\r\n\t\t}",
"private function createRandomString() {\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$res = '';\n\t\tfor ($i = 0; $i < 20; $i++) {\n\t\t\t$res .= $characters[mt_r... | [
"0.85796714",
"0.84142613",
"0.8373132",
"0.8358501",
"0.83148146",
"0.82727355",
"0.8246858",
"0.81015354",
"0.801373",
"0.79320097",
"0.78795356",
"0.7848304",
"0.7827705",
"0.781005",
"0.7778028",
"0.7740162",
"0.77271163",
"0.77207345",
"0.76824623",
"0.76506037",
"0.7638... | 0.0 | -1 |
load dynamic const values | public static function loadConstValue($key, $prefix, $constClass = 'common\models\CommonConst') {
$constValue = '';
$constName = "$constClass::$prefix$key";
if (defined($constName)) {
$constValue = constant($constName);
}
return $constValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function load_constant($term) \n{\n\tglobal $dbf;\n\n\t$sql_slct_const = \"SELECT * FROM base_constant WHERE const_term='$term'\";\n\t$sql_cons = $dbf;\n\t$sql_cons->query($sql_slct_const);\n\t$sql_cons->next_record();\n\t\t\n\t$rows = $sql_cons->rowdata();\n\tif($term != $rows['const_term']) \n\t{\n\t\texit(\"Con... | [
"0.63095534",
"0.6238769",
"0.6179823",
"0.6077702",
"0.5909709",
"0.58986384",
"0.5630229",
"0.56218773",
"0.5448326",
"0.5448326",
"0.5448326",
"0.5448326",
"0.5437693",
"0.54044896",
"0.53656316",
"0.5349921",
"0.53486496",
"0.53486496",
"0.5336277",
"0.5296317",
"0.528916... | 0.5471481 | 8 |
encode id to hash string | public static function hashEncodeInt($id) {
$salt = \Yii::$app->params['hashid.salt'];
$minLength = \Yii::$app->params['hashid.minLength'];
$encodeString = '';
$ha = new Hashids($salt, $minLength);
$encodeString = $ha->encode($id);
return $encodeString;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIdHash() {\n return encrypt( [ 'id' => $this->id ] );\n }",
"private function encode_id( $id ) {\n\t\treturn base64_encode( $id );\n\t}",
"function hashid_encode($data, $name = null)\n {\n return hashid($name)->encode($data);\n }",
"public static function encodeIdAct... | [
"0.7730453",
"0.772805",
"0.7471882",
"0.7462594",
"0.7402388",
"0.7264607",
"0.7242917",
"0.7193168",
"0.7179232",
"0.7132763",
"0.7087553",
"0.69910973",
"0.69087344",
"0.6888903",
"0.6871193",
"0.67771757",
"0.67180806",
"0.6675878",
"0.6599424",
"0.65475595",
"0.65045196"... | 0.7815603 | 0 |
string split for all encode | function mb_str_split($str){
return preg_split('/(?<!^)(?!$)/u', $str );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function strSplit($string, $encoding = 'UTF-8') {}",
"private function multi_byte_string_to_array()\n {\n $this->strings = array_values(\n array_filter(\n preg_split(\"//u\",$this->string),\n \"strlen\"\n )\n );\n }",
"public... | [
"0.6531202",
"0.634297",
"0.63323504",
"0.6319958",
"0.631937",
"0.6087709",
"0.60465986",
"0.60049385",
"0.59139836",
"0.5901888",
"0.5886274",
"0.5856758",
"0.582313",
"0.5772213",
"0.57547086",
"0.57099015",
"0.5675601",
"0.56172425",
"0.5610562",
"0.5527461",
"0.5456433",... | 0.6400987 | 1 |
Plugin Name: TruongTuyen_Toolkit Plugin URI: Description: Toolkit work with Unyson Framework Version: 1.0.0 Author: TruongTuyen Author URI: License: GPL2+ Text Domain: truongtuyen plugin language file | function yourextension_lang(){
load_plugin_textdomain('yourextension', false, basename( dirname( __FILE__ ) ) . '/languages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function i18n() {\n load_plugin_textdomain( 'elementor-lightx-widgets' );\n }",
"function sec_init() {\n\tload_plugin_textdomain(EVNT_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) );\n}",
"function add_butns_tinymce_plugin($plugin_array) {\n $plugin_array['butnsbutton'] = WP_PLUGIN_URL... | [
"0.67014587",
"0.66261137",
"0.66121066",
"0.65631706",
"0.65595835",
"0.6546077",
"0.6516016",
"0.6501919",
"0.64985013",
"0.6489037",
"0.6486619",
"0.645089",
"0.6443126",
"0.641498",
"0.64054286",
"0.64019483",
"0.6374884",
"0.6349164",
"0.6345154",
"0.63406634",
"0.632954... | 0.64238036 | 13 |
parse http header response | function http_response_headers($ret_str) {
$hdrs = array();
$arr = explode("\r\n\r\n", $ret_str);
foreach ($arr as $each)
if (substr($each, 0, 4) == 'HTTP')
$hdrs[] = $each;
return $hdrs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _parseHeader() {}",
"#[Pure]\nfunction http_parse_headers($header) {}",
"function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r... | [
"0.83169067",
"0.7487907",
"0.7127702",
"0.7112591",
"0.70451623",
"0.7016287",
"0.6985608",
"0.6967405",
"0.6958488",
"0.69515896",
"0.68509287",
"0.6840427",
"0.68246156",
"0.6816638",
"0.678077",
"0.678077",
"0.678077",
"0.676847",
"0.67633003",
"0.66776305",
"0.6643737",
... | 0.7015261 | 6 |
split http header response into array | function http_response_header_lines($hdr_str) {
$lines = explode("\n", $hdr_str);
$hdr_arr['status_line'] = trim(array_shift($lines));
foreach ($lines as $line) {
list($key, $val) = explode(':', $line, 2);
$hdr_arr[trim($key)] = trim($val);
}
return $hdr_arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}",
"function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = ... | [
"0.73479515",
"0.72186905",
"0.7212431",
"0.71825874",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.70838654",
"0.704647",
"0.7034281",
"0.7026964",
"0.6987525",
"0.69862616",
"0.6935225",
"0.69257486",
"0.69257486",
"0.6925748... | 0.7586716 | 0 |
retrieve html content from modem | function file_get_contents_curl($mURL, $mACCESS) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $mURL);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$mACCESS");
curl_setop... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getcontent($server, $port, $file) {\r\n\t\t$cont = \"\";\r\n\t\t$ip = gethostbyname($server);\r\n\t\t$fp = fsockopen($ip, $port);\r\n\t\tif (!$fp) {\r\n\t\t\t return \"Unknown\";\r\n\t\t} else {\r\n\t\t\t $com = \"GET $file HTTP/1.1\\r\\nAccept: */*\\r\\nAccept-Language: de-ch\\r\\nAccept-Encoding: gzip, ... | [
"0.61912197",
"0.599159",
"0.5931739",
"0.5899963",
"0.58813804",
"0.58723855",
"0.57884014",
"0.5770614",
"0.575179",
"0.57154524",
"0.5701984",
"0.5665799",
"0.5664598",
"0.5642691",
"0.5634356",
"0.5600609",
"0.55532163",
"0.5551408",
"0.55285543",
"0.5517519",
"0.5498249"... | 0.0 | -1 |
retrieve http header from modem | function getHeader() {
global $server, $html, $hostname, $userpwd;
$chopts = array(
CURLOPT_URL=>$hostname,
CURLOPT_PORT=>80,
CURLOPT_TIMEOUT=>5,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_HEADER=>true,
CURLOPT_USERPWD=>"$userpwd",
CURLOPT_FOLLOWLOCATION=>true);
$ch = curl_init();
curl_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$header... | [
"0.7232992",
"0.7232992",
"0.7232992",
"0.6934952",
"0.6816407",
"0.6788126",
"0.66968197",
"0.6550089",
"0.6511528",
"0.64461684",
"0.64042807",
"0.63862365",
"0.6323514",
"0.6322029",
"0.6316209",
"0.63048244",
"0.62687916",
"0.6250848",
"0.62495553",
"0.62345546",
"0.62300... | 0.63923717 | 11 |
try to match modem by 'Server:' from http header | function tryServer() {
global $server, $hostname, $username, $password;
switch($server) {
case "Nucleus/4.3 UPnP/1.0 Virata-EmWeb/R6_2_0": system("changers/viking $hostname $username $password"); exit(0); break;;
case "RomPager/4.07 UPnP/1.0": system("changers/tplink1 $hostname $username $password"); exit(0); br... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function headerMsisdnAction(){\n $headers = apache_request_headers();\n \n Zend_Debug::dump( $headers);\n die();\n \n \n \n \n echo $headers['Y-MSISDN'].'###';\n echo @$_SERVER['Y-MSISDN'].'###';\n die();\n }",
"functio... | [
"0.54496396",
"0.54465276",
"0.5368983",
"0.5254187",
"0.5145285",
"0.51441336",
"0.51431316",
"0.51309735",
"0.5084767",
"0.5077037",
"0.50609636",
"0.50503993",
"0.50424284",
"0.5022582",
"0.50207037",
"0.5012467",
"0.5012117",
"0.50076365",
"0.5005996",
"0.5001603",
"0.498... | 0.50675124 | 10 |
try to match modem by html '' | function tryTitle() {
global $html, $hostname, $username, $password;
$doc = new DOMDocument();
@$doc->loadHTML($html);
$nodes = $doc->getElementsByTagName('title');
$title = $nodes->item(0)->nodeValue;
if($title) {
switch($title) {
case "DVR": exit(0);
case "INTELBRAS WRN 240": system("changers/i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function app_contact_check_inj($val = '') {\n return preg_match('#(\\r|\\n)(?:to|from|b?cc)\\s*:#si', $val);\n}",
"function trieParTxt($txtVerif,$txtARespecter){\n\t\t\t\t$txtCorrespondant = false;\n\t\t\t\t\n\t\t\t\tif( preg_match('#'.$txtARespecter.'#',$txtVerif)) {\n\t\t\t\t\t$txtCorrespondant = true;\n\t\... | [
"0.527976",
"0.50017875",
"0.48581153",
"0.48297492",
"0.47648388",
"0.4720816",
"0.46922216",
"0.46870118",
"0.4684975",
"0.4678415",
"0.46768722",
"0.46702808",
"0.46496105",
"0.46453077",
"0.46368906",
"0.4636599",
"0.46014473",
"0.45932984",
"0.4592873",
"0.45910442",
"0.... | 0.0 | -1 |
retrieve modem authentication realm from http header | function getRealm() {
global $hostname, $realm;
$chopts = array(
CURLOPT_URL=>$hostname,
CURLOPT_PORT=>80,
CURLOPT_TIMEOUT=>5,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_HEADER=>true);
$ch = curl_init();
curl_setopt_array($ch, $chopts);
$return = curl_exec($c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function read_auth_header() {\n\t\t$auth_header = isset( $_SERVER['HTTP_AUTHORIZATION'] ) ? $_SERVER['HTTP_AUTHORIZATION'] : null;\n\n\t\tif ( !is_null( $auth_header ) ) {\n\t\t\t// Grab our type\n\t\t\t$auth_header_type = explode( ' ', $auth_header )[0];\n\n\t\t\t// Grab our string, and do some string p... | [
"0.65520126",
"0.6253562",
"0.61188495",
"0.60663706",
"0.58420783",
"0.5770771",
"0.57658464",
"0.5747157",
"0.5716443",
"0.5703648",
"0.566769",
"0.56633323",
"0.5626101",
"0.56052816",
"0.55784595",
"0.5561879",
"0.55455554",
"0.55434877",
"0.5533076",
"0.5511598",
"0.5507... | 0.6690058 | 0 |
Append an ordinal indicator to a numeric value. | function str_ordinal($value, $superscript = false)
{
$number = abs($value);
$indicators = ['th','st','nd','rd','th','th','th','th','th','th'];
$suffix = $superscript ? '<sup>' . $indicators[$number % 10] . '</sup>' : $indicators[$number % 10];
if ($number % 100 >= 11 && $number % 1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addOrdinal($num) {\n\t\ttry {\n\t\t\tif (!in_array(($num % 100), array(11, 12, 13))){\n\t\t\t\tswitch ($num % 10) {\n\t\t\t\t\t// Handle 1st, 2nd, 3rd\n\t\t\t\t\tcase 1: return $num.'st';\n\t\t\t\t\tcase 2: return $num.'nd';\n\t\t\t\t\tcase 3: return $num.'rd';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tre... | [
"0.5982373",
"0.5979901",
"0.55339915",
"0.54651165",
"0.5463416",
"0.51590705",
"0.51133007",
"0.498149",
"0.49227795",
"0.48972845",
"0.48784953",
"0.4855803",
"0.48298126",
"0.48257002",
"0.4780186",
"0.4777891",
"0.4774414",
"0.47550923",
"0.47222975",
"0.469611",
"0.4617... | 0.54786056 | 3 |
Append an ordinal indicator to a numeric value. | function number_increment_sign($value)
{
if($value >= 0) {
return '+';
} else {
return '';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addOrdinal($num) {\n\t\ttry {\n\t\t\tif (!in_array(($num % 100), array(11, 12, 13))){\n\t\t\t\tswitch ($num % 10) {\n\t\t\t\t\t// Handle 1st, 2nd, 3rd\n\t\t\t\t\tcase 1: return $num.'st';\n\t\t\t\t\tcase 2: return $num.'nd';\n\t\t\t\t\tcase 3: return $num.'rd';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tre... | [
"0.5982373",
"0.5979901",
"0.55339915",
"0.54786056",
"0.54651165",
"0.5463416",
"0.51590705",
"0.51133007",
"0.498149",
"0.49227795",
"0.48972845",
"0.48784953",
"0.4855803",
"0.48298126",
"0.48257002",
"0.4777891",
"0.4774414",
"0.47550923",
"0.47222975",
"0.469611",
"0.461... | 0.4780186 | 15 |
Append a class name. | function percentage_rate_class($value, $base = 50)
{
if(!is_numeric($value)) {
$value = 0;
}
$percentage = (float)$value;
if($percentage == 100) {
return 'excelent';
}
if($percentage == 0) {
return 'neutral';
}
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function percentage_rate($value, $append_plus = false)
{
$percentage = (float)$value;
if($percentage > 0) {
return ($append_plus ? "+" : "").$percentage."%";
} else {
return $percentage."%";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.5981... | 0.0 | -1 |
Append a class name. | function number_increment_class($value)
{
return $value > 0 ? 'positive' : ($value < 0 ? 'negative' : 'unchanged');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function question_type_class($type)
{
switch($type) {
case QUESTION_TYPE_MULTIPLE_CHOICE :
return ''; // Default, no class
case QUESTION_TYPE_ONE_OF_VALUES :
return 'type-ofc';
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function section_score_header($section_score, $scoring = 'score')
{
if($scoring == 'percentile') {
return 'Your Score: '.str_ordinal($section_score);
} else if($scoring == 'stanine') {
return 'Your Stanine: '.$section_score;
}
return 'Your Score: '.$section_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function section_score_composite_header($score, $scoring = 'score')
{
if($scoring == 'percentile') {
return 'Your Percentile: '.str_ordinal($score);
}
return 'Your Score: '.$score;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.5981... | 0.0 | -1 |
Append a class name. | function section_score_table($score, $scoring = 'score')
{
if($scoring == 'percentile') {
return str_ordinal($score);
}
return $score;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function gain_if_correct($score_increment, $total, $correct, $suffix)
{
if($total == $correct) {
return 'N/A';
}
return $score_increment. " ".$suffix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function answer_status_class($answer)
{
if($answer['is_correct']) {
return 'correct';
} else if($answer['is_unanswered']) {
return 'unanswered';
} else {
return 'incorrect';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.5981865... | 0.0 | -1 |
Append a class name. | function answer_status_tags_class($answer)
{
if(($answer['has_tags'])) {
return 'warning';
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( ... | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.5981... | 0.0 | -1 |
retorna el resultado de llamr a la clase y hacer consultas a la base de datos, | public function getFunction($obj); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resultado(){\n\t\t\treturn $this->result=mysql_fetch_object($this->query);\n\t\t\t}",
"public function getAll(){\r\n $sql=\"SELECT * FROM salas\";\r\n try{\r\n //creo la instancia de conexion\r\n $this->connection= Connection::getInstance();\r\n ... | [
"0.7477516",
"0.7328853",
"0.73000413",
"0.72325826",
"0.7183479",
"0.7163526",
"0.71136844",
"0.71050525",
"0.7082869",
"0.7078526",
"0.70645267",
"0.7057175",
"0.70523",
"0.7048317",
"0.7039162",
"0.702969",
"0.7029054",
"0.7025341",
"0.698548",
"0.6982075",
"0.6972118",
... | 0.0 | -1 |
Return the igniter service key responsible for the Processor class. The key must be the same as the one used in the assigned igniter service. | protected static function getFacadeAccessor()
{
return 'processor';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getServiceKey() {\n return $this->_get( 'service_key' );\n }",
"public function getServiceKey()\n {\n return $this->getParameter('serviceKey');\n }",
"public function getServiceKey() {}",
"protected function getKey()\n {\n\treturn 'ip:' . $this->ip;\n }",
"publi... | [
"0.7038256",
"0.67894286",
"0.6732171",
"0.63158596",
"0.6294346",
"0.6274648",
"0.62365735",
"0.62061197",
"0.6174985",
"0.6115981",
"0.60961175",
"0.60961175",
"0.60961175",
"0.60961175",
"0.60961175",
"0.6089252",
"0.6082439",
"0.6080213",
"0.6074824",
"0.60482734",
"0.604... | 0.0 | -1 |
Display a listing of the resource. | public function index(): View
{
$products = $this->productService->list();
return view('products.index', compact('products'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create(): View
{
$categories = $this->categoryService->list();
return view('products.create', compact('categories'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.7594622",
"0.7594622",
"0.7588457",
"0.7580005",
"0.75723624",
"0.7499764",
"0.7436887",
"0.74322647",
"0.7387517",
"0.735172",
"0.73381543",
"0.73117113",
"0.72958225",
"0.7280436",
"0.7273787",
"0.72433424",
"0.7230227",
"0.7225085",
"0.71851814",
"0.71781176",
"0.717402... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(StoreProductRequest $request): RedirectResponse
{
$this->createProductCommand->execute(new ProductDTO($request->validated()));
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.7285922",
"0.714503",
"0.71324795",
"0.6639801",
"0.6620405",
"0.6568167",
"0.65257645",
"0.650948",
"0.64484984",
"0.6375281",
"0.6373189",
"0.63650924",
"0.63650924",
"0.63650924",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(int $id): View
{
$product = $this->productService->find($id);
abort_unless($product, 404);
$categories = $this->categoryMapper->map($product, $this->categoryService->list());
return view('products.edit', compact('product', 'categories'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(UpdateProductRequest $request, int $id): RedirectResponse
{
$this->updateProductCommand->execute($id, new ProductDTO($request->validated()));
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy(int $id): RedirectResponse
{
$this->deleteProductCommand->execute($id);
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853"... | 0.0 | -1 |
Loads the session storage handler | public static function load($name = null) {
$class_name = 'Kuuzu\\KU\\Core\\Session\\' . KUUZU::getConfig('store_sessions');
if ( !class_exists($class_name) ) {
trigger_error('Session Handler \'' . $class_name . '\' does not exist, using default \'Kuuzu\\KU\\Core\\Session\\File\'', E_USER_ERROR);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"public static function setAsSessionHandler()\n ... | [
"0.71013063",
"0.6844777",
"0.67214483",
"0.65603197",
"0.64592654",
"0.6355589",
"0.6320818",
"0.62356997",
"0.6222851",
"0.6150736",
"0.6137202",
"0.6128961",
"0.61177063",
"0.61128676",
"0.60955334",
"0.60686505",
"0.60648364",
"0.6063041",
"0.59682107",
"0.59311396",
"0.5... | 0.6244705 | 7 |
Run the database seeds. | public function run()
{
$visitante = new App\Models\Pet;
$visitante->original_name = 'example-1.png';
$visitante->save();
$visitante = new App\Models\Pet;
$visitante->original_name = 'example-2.png';
$visitante->save();
$visitante = new App\Models\Pet;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact... | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.78414... | 0.0 | -1 |
Register widget with WordPress. | function __construct() {
parent::__construct(
'rss_widget', // Base ID
esc_html__( 'RSS Widget', 'rss-widget' ), // Name
array( 'description' => esc_html__( 'A Wiget To Display RSS Feeds', 'rss-widget' ), ) // Args
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_widget() {\n register_widget( 'WPP_Widget' );\n }",
"function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}",
"function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}",
"function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}",
"f... | [
"0.8390025",
"0.83101994",
"0.82505625",
"0.82505625",
"0.82282835",
"0.80624324",
"0.79771596",
"0.7901524",
"0.7809308",
"0.77684814",
"0.77520776",
"0.7727257",
"0.7609239",
"0.75666004",
"0.75445676",
"0.75443226",
"0.7522003",
"0.75196254",
"0.75170845",
"0.7512498",
"0.... | 0.0 | -1 |
Frontend display of widget. | public function widget( $args, $instance ) {
echo $args['before_widget'];
if ( ! empty( $instance['title'] ) ) {
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
}
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'New title', 't... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}",
"public function render_widget() {\n\n return Widget::render($t... | [
"0.7524313",
"0.7412757",
"0.7273009",
"0.72217935",
"0.7036741",
"0.70207494",
"0.7011758",
"0.6995235",
"0.6836181",
"0.68110406",
"0.6790932",
"0.67542267",
"0.673366",
"0.67055386",
"0.6681578",
"0.6669653",
"0.6665645",
"0.66538507",
"0.6650898",
"0.6644663",
"0.6637213"... | 0.0 | -1 |
Sanitize widget form values as they are saved. | public function update( $new_instance, $old_instance ) {
$instance = array(
'title' => (!empty($new_instance['title'])) ? strip_tags($new_instance['title']) : '',
'rss_feed' => (!empty($new_instance['rss_feed'])) ? strip_tags($new_instance['rss_feed']) :... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sanitize()\n {\n parent::sanitize();\n\n foreach ($this->_cleanData as $key => $value) {\n $this->_cleanData[$key] = strip_tags($value);\n }\n }",
"public function sanitize_input_fields()\n {\n }",
"protected function sanitize() {}",
"public... | [
"0.71835464",
"0.7149636",
"0.6942603",
"0.683952",
"0.681107",
"0.6642593",
"0.65851724",
"0.65072626",
"0.6451891",
"0.6451891",
"0.64336884",
"0.64276963",
"0.6426025",
"0.63837826",
"0.63769865",
"0.6295462",
"0.6271859",
"0.62593806",
"0.6257514",
"0.6252859",
"0.6232507... | 0.0 | -1 |
Executa queries dentro do banco de dados | public function execute($query, $params = [])
{
try {
$stm = $this->conn->prepare($query);
$stm->execute($params);
return $stm;
} catch (PDOException $e) {
die("Erro: ". $e->getMessage());
//Em um projeto real o erros com banco de dados não... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function execute () {\n $this->query->execute();\n }",
"private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t... | [
"0.7270004",
"0.7142566",
"0.69164103",
"0.6901614",
"0.6742385",
"0.66762936",
"0.66324353",
"0.6619268",
"0.6544367",
"0.65282506",
"0.6496744",
"0.6452328",
"0.64160985",
"0.6415992",
"0.63754225",
"0.63688284",
"0.63619995",
"0.6353324",
"0.6343713",
"0.6342602",
"0.63360... | 0.0 | -1 |
/ $redis = new Redis(); $redis>connect('127.0.0.1', 6379); $redis>auth('pang123'); | public function getAccessToken() {
$data = $this->redis->get('pa_access_token');
if (!$data) {
$data['expire_time'] = 0;
$data['access_token'] = "0";
$this->redis->set('pa_access_token', $data, 7200);
}
if ($data['expire_time'] < time()) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index(){\n $redis = new Redis();\n// dump($redis);exit;\n $redis->connect('39.98.171.207',6379);\n echo \"Connection to server sucessfully\";\n exit;\n //查看服务是否运行\n echo \"Server is running: \" . $redis->ping();\n }",
"function __construct()\n ... | [
"0.6625169",
"0.6509125",
"0.6494901",
"0.6472493",
"0.64011395",
"0.63011533",
"0.621293",
"0.6199747",
"0.6158703",
"0.5988137",
"0.592838",
"0.59199363",
"0.5885519",
"0.5865095",
"0.582647",
"0.58195305",
"0.58094",
"0.5808195",
"0.5797825",
"0.5794965",
"0.57631713",
"... | 0.0 | -1 |
The bindings are needed for this test. | protected function getPackageProviders($app)
{
return ['Apitizer\ServiceProvider'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bindings();",
"private function registerBindings()\n {\n foreach($this->bindings as $key => $val)\n {\n $this->app->bind($key, $val);\n }\n }",
"public function testTestBindings(): void\n {\n $testCase = new LaravelServiceProviderTestCaseStub(\n ... | [
"0.7384024",
"0.6702766",
"0.6649531",
"0.64682204",
"0.6443739",
"0.6443081",
"0.64036846",
"0.6370931",
"0.6334543",
"0.6319543",
"0.628482",
"0.62079275",
"0.6154054",
"0.6132692",
"0.60701877",
"0.6022271",
"0.6020229",
"0.6005124",
"0.59704155",
"0.594596",
"0.59448373",... | 0.0 | -1 |
Create an http status exception which isnt 200 | public static function createHttpStatus($messageBody = 'Internal Error', $httpCode = self::CODE_HTTP_INTERNAL_ERROR, $resource = null, $previous = null){
$exp = new Exception($messageBody, self::CODE_PRETTY_HTTP_STATUS, $previous);
$exp->setHttpCode($httpCode);
$exp->setWebResource($resource);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testImportRawHttpResponseWithADifferentStatusCode()\n {\n $this->testImportingRawHttpResponseString(array('status' => 201));\n }",
"public static function httpStatusException($message)\n {\n return new self($message, self::HTTP_STATUS_EXCEPTION);\n }",
"function status... | [
"0.69780296",
"0.6932899",
"0.6788924",
"0.6677328",
"0.6641902",
"0.65888387",
"0.65841997",
"0.65726036",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.6481767",
"0.64634776",
"... | 0.6573051 | 7 |
Set http status code | public function setHttpCode($code) {
$this->httpCode = $code;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setStatusCode($code);",
"public function setStatusCode($status);",
"public function setStatusCode($code)\r\n {\r\n http_response_code($code);\r\n }",
"protected function setHTTPstatus($code)\n {\n $realCode = Response::$statusTexts;\n\n if (isset($realCode[$code])) {\n ... | [
"0.8461",
"0.83327407",
"0.82244104",
"0.8077079",
"0.80324346",
"0.80089784",
"0.79900753",
"0.78607595",
"0.7834268",
"0.78296024",
"0.7822765",
"0.78150415",
"0.78038394",
"0.7781591",
"0.77720827",
"0.776933",
"0.7698732",
"0.76858896",
"0.76733965",
"0.7667692",
"0.76179... | 0.73344105 | 34 |
Get http status code from this exception | public function getHttpCode() {
return $this->httpCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }",
"public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }",
"public function getHTTPStatusCode() { return $this->status; }",
"public function status() :int\n {\n return (int) $... | [
"0.825341",
"0.825341",
"0.81903046",
"0.8188432",
"0.81584764",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8054141",
"0.80318743",
"0.8021902",
"0.7994688",
"0.7985929",
"0.79839706",
... | 0.77977073 | 50 |
Set target web resources | public function setWebResource($webResource) {
$this->webResource = $webResource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTarget( $target )\n\t{\n\t\t$this->setAttribute( \"target\", $target );\n\t}",
"public function set_target( $target_url ) {\n\t\t$this->target = $target_url;\n\t}",
"public function setTarget($target)\n\t{\n\t\t// To do: verify format\n\t\t$this->target = $target;\n\t\t$this->setAttribute('t... | [
"0.5712412",
"0.5692095",
"0.5576863",
"0.5458014",
"0.54302514",
"0.53973955",
"0.5370095",
"0.5344174",
"0.53110564",
"0.53083926",
"0.52649486",
"0.5191557",
"0.5187284",
"0.51769507",
"0.5165854",
"0.5149242",
"0.5123086",
"0.507771",
"0.5069371",
"0.5067489",
"0.5045059"... | 0.5628316 | 2 |
Get target web resources | public function getWebResource() {
return $this->webResource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getResourceURIs()\n {\n $resources = array();\n\n $resources['logo'] = $this->getUrl('/resources/logo.png');//URI\n $resources['requestHandlerUrl'] = $this->getUrl('requestHandler.php');//URI //TODO: this should be an API URI (not sure if that will break something)\n ... | [
"0.6624343",
"0.60120773",
"0.6006819",
"0.59519875",
"0.5951842",
"0.59158397",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5873788",
"0.5781682",
"0.5760574",
"0.56977737",
"0.56977737",
"0.56977737",
"0.56977737",
"0.5679254",
"0.567290... | 0.566205 | 21 |
Set current class loader if exits | public function setClassLoader($classLoader) {
$this->classLoader = $classLoader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initializeClassLoader() {\n\t\tif (t3lib_div::int_from_ver( TYPO3_version ) < 6000000 ) {\n\t\t\tif (!class_exists('Tx_Extbase_Utility_ClassLoader', FALSE)) {\n\t\t\t\trequire(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');\n\t\t\t}\n\n\t\t\t$classLoader = new Tx_Extbase_U... | [
"0.6449069",
"0.64345604",
"0.6349427",
"0.6285698",
"0.62801504",
"0.6221782",
"0.60605997",
"0.6034293",
"0.5938983",
"0.5936819",
"0.5935965",
"0.5912662",
"0.5877881",
"0.5763958",
"0.57505107",
"0.5740398",
"0.5737271",
"0.5731739",
"0.57288975",
"0.57085896",
"0.5697624... | 0.6009884 | 8 |
Get current class loader | public function getClassLoader() {
return $this->classLoader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function getClassLoader() {}",
"public function get_loader()\n {\n return $this->loader;\n }",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this-... | [
"0.75710714",
"0.7341214",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.710501",
"0.7070505",
"0.6943578",
"0.6754278",
"0.66970307",
"0.6660568",
"0.66097414",
"0.6464757",
"0.6407922",
"0.639319",
... | 0.8027073 | 0 |
Adds a key to the array if not allready exists like: $array = array('foo' => 'bar'); $array = array_add($array, 'key', 'value');. | function array_add($array, $key, $value)
{
if (!isset($array[$key])) {
$array[$key] = $value;
}
return $array;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function array_add($array, $key, $value)\n\t{\n\t\tif ( ! isset($array[$key])) $array[$key] = $value;\n\n\t\treturn $array;\n\t}",
"function array_add(array $array, string $key, $value):array\n\t{\n\t\tif (is_null(get($array, $key)))\n\t\t{\n\t\t\tset($array, $key, $value);\n\t\t}\n\n\t\treturn $array;\n\t}",
... | [
"0.81507206",
"0.76679283",
"0.7539807",
"0.7490153",
"0.7490153",
"0.7129647",
"0.7006724",
"0.6836951",
"0.6780913",
"0.64957905",
"0.64640117",
"0.6351146",
"0.6292318",
"0.6284772",
"0.62483805",
"0.6234855",
"0.62160766",
"0.62023747",
"0.61330223",
"0.6118586",
"0.60863... | 0.8506814 | 0 |
Sets the default pagination options. | function setPaging($paging)
{
if(!empty($paging))
{
$this->link = $paging['link'];
$this->show = $paging['show'];
$this->page = $paging['page'];
$this->style = $paging['style'];
$pageCount = ceil($paging['count'] / $paging['limit'] );
$this->_pageDetails = array(
'page'=>$paging['... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}",
"protected function _initPaginator()\n {\n Zend_Pagina... | [
"0.7309758",
"0.673497",
"0.67254436",
"0.66409993",
"0.6604133",
"0.6555743",
"0.6369742",
"0.6341143",
"0.63105184",
"0.62757164",
"0.6267342",
"0.6255439",
"0.6246862",
"0.62216645",
"0.6210085",
"0.6136268",
"0.61005235",
"0.60575193",
"0.6051424",
"0.60480833",
"0.604808... | 0.0 | -1 |
Displays limits for the query | function show($text=null, $separator=null)
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
$t = '';
if(is_array($this->show))
{
$t = $text.$separator;
foreach($this->show as $value)
{
$link = preg_replace('/show=(.*?)&/','show='.$v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_limit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit() {}",
"function getLimit() ;",
"function getLimitBox()\n\t{\n\t\tglobal $mainframe;\n\... | [
"0.7206182",
"0.69826096",
"0.69826096",
"0.69826096",
"0.69826096",
"0.69826096",
"0.6959581",
"0.69326854",
"0.6905948",
"0.68720835",
"0.6763926",
"0.6734236",
"0.66919106",
"0.66881025",
"0.660505",
"0.65983456",
"0.6580594",
"0.652265",
"0.65064013",
"0.65064013",
"0.650... | 0.0 | -1 |
Displays limits for the query in selectbox | function myShow()
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
$t = '';
if(is_array($this->show))
{
if($this->style == 'ajax') {
$t = "<select class=\"select\" onChange=\"new Ajax.Updater('ajax_update','".preg_replace("/show=(.*?)&/","... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getLimitBox()\n\t{\n\t\tglobal $mainframe;\n\n\t\t// Initialize variables\n\t\t$limits = array ();\n\n\t\t// Make the option list\n\t\tfor ($i = 5; $i <= 30; $i += 5) {\n\t\t\t$limits[] = JHTML::_('select.option', \"$i\");\n\t\t}\n\t\t$limits[] = JHTML::_('select.option', '50');\n\t\t$limits[] = JHTML::_(... | [
"0.78705007",
"0.6926937",
"0.69128007",
"0.66814065",
"0.66652316",
"0.66478413",
"0.6483418",
"0.648327",
"0.6420989",
"0.6358318",
"0.63381815",
"0.63381815",
"0.63381815",
"0.63381815",
"0.63381815",
"0.6309305",
"0.6280352",
"0.62692094",
"0.6237849",
"0.6205195",
"0.619... | 0.0 | -1 |
Displays current result information | function result($text)
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
if($this->_pageDetails['recordCount'] > $this->_pageDetails['limit'])
{
$start_row = $this->_pageDetails['page'] > 1 ? (($this->_pageDetails['page']-1)*$this->_pageDetails['lim... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ViewResults() {\n echo \"<pre>\" . print_r($this->rs, TRUE) . \"</pre>\";\n }",
"function showResults(){\n global $ilUser, $tpl, $ilTabs, $ilLocator, $ilToolbar;\n\n $ilTabs->activateTab(\"showResults\");\n\n $ilToolbar->setFormAction($this->ctrl->getFormAction($thi... | [
"0.7782846",
"0.7450255",
"0.734988",
"0.734988",
"0.7349644",
"0.7302574",
"0.698796",
"0.6970239",
"0.6864085",
"0.68610084",
"0.68517977",
"0.67623997",
"0.67567486",
"0.6752688",
"0.67295384",
"0.67295384",
"0.672166",
"0.67204386",
"0.67204386",
"0.6720275",
"0.6720275",... | 0.0 | -1 |
Returns a list of page numbers separated by $separator | function pageNumbers($separator=null)
{
if (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }
$t = array();
$text = '';
$pc = 1;
do
{
if($pc == $this->_pageDetails['page'])
{
$text = '<span>'.$pc.'</span>';
}
else
{
if($this->style == 'a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function myPageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span class=numberlinkon> '.$... | [
"0.8161145",
"0.67474955",
"0.62342",
"0.6144174",
"0.60108674",
"0.5964183",
"0.595724",
"0.594568",
"0.5809402",
"0.5756099",
"0.56740075",
"0.55723804",
"0.5505724",
"0.5476217",
"0.5471395",
"0.54218286",
"0.54218286",
"0.54006463",
"0.5388477",
"0.53874815",
"0.5366174",... | 0.82875407 | 0 |
Returns a list of page numbers separated by $separator | function myPageNumbers($separator=null)
{
if (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }
$t = array();
$text = '';
$pc = 1;
do
{
if($pc == $this->_pageDetails['page'])
{
$text = '<span class=numberlinkon> '.$pc.'</span>';
}
else
{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span>'.$pc.'</span>';\n\t\t\t ... | [
"0.82875407",
"0.67474955",
"0.62342",
"0.6144174",
"0.60108674",
"0.5964183",
"0.595724",
"0.594568",
"0.5809402",
"0.5756099",
"0.56740075",
"0.55723804",
"0.5505724",
"0.5476217",
"0.5471395",
"0.54218286",
"0.54218286",
"0.54006463",
"0.5388477",
"0.53874815",
"0.5366174"... | 0.8161145 | 1 |
Displays a link to the previous page, where the page doesn't exist then display the $text | function prevPage($text='prev')
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['previousPage']) )
{
if($this->style == 'ajax')
{
//$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['previousPage'],"up... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function previous($text)\n\t{\n\t\treturn $this->backwards(__FUNCTION__, $text, $this->page - 1);\n\t}",
"function PreviousUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id - 1;\n\t\t// if id=0 this is the first article, so don't show text\n\t\tif ($new_id == 0){\n\t\t\treturn \"\";\n\t\t//... | [
"0.7728658",
"0.761609",
"0.7378077",
"0.7298928",
"0.72882986",
"0.7176808",
"0.7164734",
"0.71109456",
"0.70618325",
"0.70093465",
"0.700824",
"0.691703",
"0.6864042",
"0.6854228",
"0.67319095",
"0.67174816",
"0.67074054",
"0.6676611",
"0.6676403",
"0.66725117",
"0.6671372"... | 0.8316928 | 0 |
Displays a link to the next page, where the page doesn't exist then display the $text | function nextPage($text='next')
{
if (empty($this->_pageDetails)) { return false; }
if (!empty($this->_pageDetails['nextPage']))
{
if($this->style == 'ajax')
{
//$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['nextPage'],"update" => "... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">></a></li>';\n }\n }",
"public function next(string $text = 'Next', array $options = []): string\n {\n return $this->generateLink($te... | [
"0.72525835",
"0.7088597",
"0.7022927",
"0.69762427",
"0.68411785",
"0.68309224",
"0.6763134",
"0.6693151",
"0.6586086",
"0.6478846",
"0.64167935",
"0.6394911",
"0.63409",
"0.6329707",
"0.6272749",
"0.6260567",
"0.6243084",
"0.62086666",
"0.62011236",
"0.61731035",
"0.6145034... | 0.8054678 | 0 |
grants a passport token to the user. User $user, Request $request | public function grant($request, Supplier $supplier)
{
$response = $this->guzzle->post('oauth/clients',[
'form_params' => [
'name' => $supplier->name,
'redirect' => 'http://localhost/',
'token' => $request->token,
]
]);
$data = json_decode((s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function token(Request $request) {\n global $base_url;\n\n $payload = Json::decode($request->getContent());\n\n $response = \\Drupal::httpClient()->post($base_url . '/oauth/token', [\n 'verify' => TRUE,\n 'form_params' => [\n 'grant_type' => 'password',\n 'client_id' => $pay... | [
"0.6660562",
"0.66252416",
"0.65500987",
"0.65338385",
"0.64669263",
"0.6378788",
"0.6241137",
"0.6210433",
"0.62041277",
"0.6186837",
"0.6114993",
"0.5941711",
"0.59191376",
"0.590946",
"0.5877192",
"0.5832231",
"0.58276343",
"0.5820947",
"0.58154684",
"0.58090836",
"0.57993... | 0.0 | -1 |
Call the Model constructor | function __construct() {
parent::__construct();
$this->load->database();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }",
"function __construct () {\n\t\t$this->_model = new Model();\n\t}",
"function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }",
"function __construc()... | [
"0.8196736",
"0.8080118",
"0.8054001",
"0.7839992",
"0.78184336",
"0.78158236",
"0.7770901",
"0.773286",
"0.7704549",
"0.7701882",
"0.7701882",
"0.7701882",
"0.7701882",
"0.76811564",
"0.76426494",
"0.75779855",
"0.75710344",
"0.75621206",
"0.7518676",
"0.75171185",
"0.751711... | 0.0 | -1 |
Create the object representing the current request. | public function createRequest(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function factory()\n {\n $request = new Request();\n static::$_current = $request;\n return $request;\n }",
"public static function create()\n {\n $contentType = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : 'text/html';\n return (new Reque... | [
"0.7819796",
"0.75796235",
"0.7390413",
"0.71912575",
"0.7041319",
"0.70375586",
"0.6892279",
"0.68758136",
"0.6809956",
"0.67815953",
"0.67699075",
"0.6758292",
"0.6745856",
"0.6714415",
"0.67100155",
"0.6644409",
"0.6632911",
"0.66080236",
"0.6601363",
"0.65632135",
"0.6557... | 0.6902876 | 7 |
Create the instance that will output the response. | public function createResponseWriter(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function response() {\n return new Response;\n }",
"protected function createHttpResponse()\n {\n return new Response();\n }",
"public function createResponse()\n {\n return new Response;\n }",
"private function response() {\n if ($this->responseStatus !== 2... | [
"0.7633698",
"0.75850236",
"0.7502986",
"0.745646",
"0.7449684",
"0.73577356",
"0.73361456",
"0.71089935",
"0.69429004",
"0.6780523",
"0.6756643",
"0.6751104",
"0.672081",
"0.67011636",
"0.666654",
"0.6652955",
"0.66448355",
"0.66399264",
"0.6595596",
"0.6531698",
"0.65127426... | 0.6834764 | 9 |
Create the view object. | public function createView(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createView(){\n\t\t$vue = new View(\"Create\");\n\t\t$vue->generer();\n\t}",
"public function create()\n {\n return view($this->_config['view']);\n }",
"function __construct()\r\n {\r\n $this->view = new View();\r\n }",
"function __construct()\n {\n $this->... | [
"0.794952",
"0.76571953",
"0.7395223",
"0.7379122",
"0.7336238",
"0.7288675",
"0.7211296",
"0.7208456",
"0.71926713",
"0.7186296",
"0.7142922",
"0.70601517",
"0.702001",
"0.70051837",
"0.6971911",
"0.697179",
"0.6914115",
"0.68875027",
"0.68810904",
"0.6880818",
"0.68716836",... | 0.84783465 | 0 |
Create the user representation. | public function createUser(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }",
"public function create()\n {\n return $this->edit(new User);\n }",
"public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();... | [
"0.6878866",
"0.6863107",
"0.6825762",
"0.6823838",
"0.6710182",
"0.6693789",
"0.66874737",
"0.6669606",
"0.6666873",
"0.6658373",
"0.6646404",
"0.6632397",
"0.66148394",
"0.66148394",
"0.65879905",
"0.6575731",
"0.65502983",
"0.65495974",
"0.65370625",
"0.6521902",
"0.652189... | 0.6834517 | 5 |
Create the owner representation. | public function createOwner(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view ('owner.create');\n }",
"public function create()\n {\n //\n return view('create_owner');\n }",
"public function create()\n {\n return view('owner.create');\n }",
"public function create()\n {\n return view('ow... | [
"0.7349649",
"0.723654",
"0.7211741",
"0.7211741",
"0.7182614",
"0.6769957",
"0.6648783",
"0.66088873",
"0.6580069",
"0.65343875",
"0.64591855",
"0.6400853",
"0.6386555",
"0.63546115",
"0.62972206",
"0.6227148",
"0.62033653",
"0.620312",
"0.620312",
"0.620312",
"0.62007326",
... | 0.79933745 | 0 |
Create the data provider. | public function createProvider(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createData()\n {\n // TODO: Implement createData() method.\n }",
"protected function initDataProvider() {\n\t\t/** @var $dataProvider Tx_Taxonomy_Service_ExtDirect_Controller_DataProvider */\n\t\t$dataProvider = t3lib_div::makeInstance('Tx_Taxonomy_Service_ExtDirect_Controller_DataPr... | [
"0.691703",
"0.6883793",
"0.67868966",
"0.66193867",
"0.65907615",
"0.6486428",
"0.6482713",
"0.6482713",
"0.62751126",
"0.622989",
"0.62173843",
"0.6124171",
"0.607909",
"0.6061989",
"0.6054555",
"0.60082346",
"0.598421",
"0.59657675",
"0.593381",
"0.5905784",
"0.58849627",
... | 0.7122672 | 0 |
Create a new controller instance. | public function __construct()
{
$this->middleware('auth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createController()\n {\n $this->createClass('controller');\n }",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-... | [
"0.82668066",
"0.8173394",
"0.78115296",
"0.77052677",
"0.7681875",
"0.7659338",
"0.74860525",
"0.74064577",
"0.7297601",
"0.7252339",
"0.7195181",
"0.7174191",
"0.70150065",
"0.6989306",
"0.69835985",
"0.69732994",
"0.6963521",
"0.6935819",
"0.68973273",
"0.68920785",
"0.687... | 0.0 | -1 |
Show the application dashboard. | public function index()
{
$matchDates = MatchDate::orderBy('week_no')->get();
return view('layouts.matches.index', compact('matchDates'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }",
"function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}",
"public function showDashboard() { \n\t\n ... | [
"0.77850926",
"0.7760142",
"0.7561336",
"0.75147176",
"0.74653697",
"0.7464913",
"0.73652893",
"0.7351646",
"0.7346477",
"0.73420244",
"0.7326711",
"0.7316215",
"0.73072463",
"0.7287626",
"0.72826403",
"0.727347",
"0.727347",
"0.727347",
"0.727347",
"0.7251768",
"0.7251768",
... | 0.0 | -1 |
Check for end of stream. | public function stream_eof()
{
return ($this->_pos >= strlen($this->_pointer));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stream_eof() {\r\n\t\treturn $this->pos >= strlen($this->data);\r\n\t}",
"public function stream_eof()\r\n {\r\n return $this->_pos >= strlen($this->_data);\r\n }",
"public function stream_eof()\n {\n $isEof = ($this->_pos >= strlen($this->_data));\n return $isEof;... | [
"0.84634507",
"0.84209985",
"0.8390213",
"0.83486485",
"0.8246708",
"0.80031765",
"0.7909408",
"0.7906364",
"0.7851162",
"0.7810407",
"0.7714902",
"0.7656468",
"0.7654029",
"0.7581033",
"0.7580208",
"0.7441049",
"0.7411358",
"0.73846376",
"0.7362084",
"0.7338954",
"0.7312465"... | 0.83069265 | 4 |
Return the current position. | public function stream_tell()
{
return $this->_pos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getCurrentPosition()\n {\n return $this->getPositionInstance()->getPosition();\n }",
"public function getPosCur()\n {\n return $this->pos_cur;\n }",
"public function getCurrentPosition(): int;",
"public static function getPosition()\n {\n return self::$pos... | [
"0.8633055",
"0.830362",
"0.8256613",
"0.8245945",
"0.82310414",
"0.82310414",
"0.8101096",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80930287",
"0.8024884",
"0.80193627",
"0.8001666",
"0.8... | 0.0 | -1 |
Read from the stream. | public function stream_read($count)
{
if (!$this->_open) {
return false;
}
if (!($this->_mode & STREAM_VAR_READABLE)) {
return false;
}
$data = substr($this->_pointer, $this->_pos, $count);
$this->_pos = $this->_pos + strlen($data);
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readStream();",
"abstract public function read(AbstractStream $stream);",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function r... | [
"0.8190801",
"0.78004193",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7265477",
"0.72069097",
"0.7112128",
"0.7072189",
"0.70513386",
"0.70177794",
"0.69620675"... | 0.6508499 | 40 |
Write to the stream. | public function stream_write($data)
{
if (!$this->_open) {
return false;
}
if (!($this->_mode & STREAM_VAR_WRITEABLE)) {
return false;
}
$datalen = strlen($data);
$this->_pointer = substr($this->_pointer, 0, $this->_pos)
. $data
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write();",
"public function write();",
"protected function _write() {}",
"public function write()\n {\n }",
"abstract protected function write();",
"public function writeStream($resource);",
"public function write($s) {}",
"public function write($s) {}",
"public function write... | [
"0.7419436",
"0.7419436",
"0.7100575",
"0.70711845",
"0.66825634",
"0.6659639",
"0.6624464",
"0.6624464",
"0.66230446",
"0.66230446",
"0.66230446",
"0.66066575",
"0.65974814",
"0.6502326",
"0.6502326",
"0.6502326",
"0.6502326",
"0.64350414",
"0.64350414",
"0.6434489",
"0.6431... | 0.5575991 | 83 |
Move the position in the stream. | public function stream_seek($offset, $whence)
{
switch ($whence) {
// from start
case SEEK_SET:
if ($offset < strlen($this->_pointer) && $offset >= 0) {
$this->_pos = $offset;
return true;
} else {
return false;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function seek($position) {}",
"function seek($pos) {\n fseek($this->handle, $pos, SEEK_CUR);\n }",
"public function _seek($position);",
"public function seek()\r\n\t{\r\n\t}",
"protected function shift() {\r\n\t\tarray_shift($this->_streams);\r\n\t\t$this->_streamsCount--;\r\n\t}",
"public fun... | [
"0.6806508",
"0.6667892",
"0.64964783",
"0.6100045",
"0.60601807",
"0.6022693",
"0.59694767",
"0.59149235",
"0.5878716",
"0.5857605",
"0.5762012",
"0.5756327",
"0.57376146",
"0.5713159",
"0.57107794",
"0.5705842",
"0.568593",
"0.5680032",
"0.56681985",
"0.5640608",
"0.5637022... | 0.0 | -1 |
Write all data to storage. | public function stream_flush()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function writeAll( array $data ) {\n\n\t\t$this->_data = $data;\n\t}",
"public function writeAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write( s($name), s($value) );\n }\n }",
"function save() {\r\n foreach ($this->_data as $v)\r\n ... | [
"0.7294902",
"0.69378567",
"0.6879967",
"0.6850956",
"0.67007834",
"0.6676123",
"0.66586334",
"0.6617833",
"0.6536265",
"0.6484093",
"0.6457243",
"0.6453696",
"0.6432425",
"0.629232",
"0.6125354",
"0.60769874",
"0.60159403",
"0.5986041",
"0.59794605",
"0.5943955",
"0.5927488"... | 0.0 | -1 |
Return information about the stream. | public function stream_stat()
{
$stat = array(
'size' => strlen($this->_pointer)
);
return $stat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMetaData()\n {\n return stream_get_meta_data($this->_stream_handle);\n }",
"protected function getMetaData()\n {\n return stream_get_meta_data($this->stream);\n }",
"public function queryStream()\n {\n $response = $this->sendCommand(self::RCMD_QUERY_STREAM... | [
"0.7526914",
"0.7440086",
"0.7297649",
"0.7276369",
"0.7276369",
"0.7276369",
"0.7276369",
"0.72753835",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.72105086",
"0.7195592",
"0.70592344",
"0.6992175",
"0.6868408",
"0.6831635",
"0.6831635",
... | 0.65907466 | 24 |
This method is called in response to stat() calls on the URL paths As taken from the PHP Manual: "This method is called in response to stat() calls on the URL paths associated with the wrapper and should return as many elements in common with the system function as possible. Unknown or unavailable values should be set ... | public function url_stat($path, $flags)
{
if (!$this->setPointerFromPath($path, false)) {
//does not exist
return false;
}
$time = time();
$keys = array(
'dev' => 0,
'ino' => 0,
// chmod 700 means user has read, wri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stream_stat() {}",
"public function stream_stat() {\r\n\t\t$dir_ref = & $this->get_directory_ref();\r\n\t\tif ( substr( $this->file, -1 ) === '/' || isset( $dir_ref ) ) {\r\n\t\t\treturn $this->make_stat(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'mode' => WP_Test_Stream::DIRECTORY_MODE,\r\n\t\t\t\t)\r\n\t\... | [
"0.62163067",
"0.6117493",
"0.6007922",
"0.5945287",
"0.58938384",
"0.5811136",
"0.5711264",
"0.56994253",
"0.5614226",
"0.5612763",
"0.55745846",
"0.54490715",
"0.5425414",
"0.54240185",
"0.5423294",
"0.54211074",
"0.5371434",
"0.5355957",
"0.5349088",
"0.53255713",
"0.53003... | 0.554851 | 11 |
Read one entry from 'directory' | public function dir_readdir()
{
if (!$this->_open) {
return false;
}
if (key($this->_pointer) == count($this->_pointer) - 1) {
return false;
}
$key = key($this->_pointer);
next($this->_pointer);
return $key;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getSingle(string $path);",
"abstract public function read($path);",
"public function read () {\n while ($file = readdir($this->handle)) {\n if (!is_dir($this->path.$file)) {\n $finfo=array();\n $finfo['name']=$file;\n $fnam... | [
"0.5907646",
"0.57736266",
"0.5757999",
"0.56495625",
"0.56122607",
"0.5592924",
"0.5563659",
"0.5425593",
"0.5382181",
"0.5376592",
"0.537363",
"0.5327135",
"0.5317254",
"0.5316514",
"0.5218493",
"0.5179426",
"0.51744473",
"0.5141271",
"0.5132052",
"0.5115463",
"0.51145077",... | 0.49757582 | 32 |
Set the internal pointer Basically this method only sets the object property _pointer as a reference to a variable | protected function _setPointer($scope, $path, $create = false)
{
$varpath = explode('/', $path);
switch (strtoupper($scope)) {
// GET variables
case 'GET':
case '_GET':
$this->_pointer = &$_GET;
break;
// POST variables
case 'POST':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function assignObject()\n\t{\n\t\tif ($this->id != 0)\n\t\t{\n\t\t\tif ($this->call_by_reference)\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, false);\n\t\t\t}\n\t\t}\n\t}",
"functio... | [
"0.5907162",
"0.58758235",
"0.58386946",
"0.57590497",
"0.56614566",
"0.5538449",
"0.5504496",
"0.5496631",
"0.5494627",
"0.54057527",
"0.5360355",
"0.52570283",
"0.52497846",
"0.52421397",
"0.52356654",
"0.5219282",
"0.52126855",
"0.5211147",
"0.52003795",
"0.51917976",
"0.5... | 0.51763755 | 20 |
Set the internal pointer variable from the given variable path. | protected function setPointerFromPath($path, $create = false)
{
$url = parse_url($path);
$scope = $url['host'];
if (isset($url['path'])) {
$varpath = substr($url['path'], 1);
} else {
$varpath = '';
}
return $this->_setPointer($scope, $varp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set(string $path, $value);",
"protected function _setPointer($scope, $path, $create = false)\n {\n $varpath = explode('/', $path);\n\n switch (strtoupper($scope)) {\n // GET variables\n case 'GET':\n case '_GET':\n $this->_pointer = &$_GET;\n ... | [
"0.6412926",
"0.624664",
"0.61674225",
"0.61657435",
"0.61447185",
"0.61103237",
"0.6087896",
"0.60496175",
"0.60336685",
"0.59558386",
"0.5936602",
"0.5916707",
"0.58972484",
"0.58775276",
"0.58516604",
"0.5839962",
"0.58289194",
"0.58236367",
"0.58195466",
"0.58160836",
"0.... | 0.6150392 | 4 |
funcao construtor da classe | function cl_sau_receitamedica() {
//classes dos rotulos dos campos
$this->rotulo = new rotulo("sau_receitamedica");
$this->pagina_retorno = basename($GLOBALS["HTTP_SERVER_VARS"]["PHP_SELF"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct() ;",
"function _construct() {\n \t\n\t\t\n\t}",
"function __construct (){\n\t\t}",
"function _construct(){ }",
"public function _construct()\n\t{\n\n\t}",
"function __construct(){\n\n\t\t}",
"function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}",
"function __construct() {}",
... | [
"0.82710814",
"0.8201428",
"0.8043516",
"0.80062735",
"0.796183",
"0.7928873",
"0.7894286",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.7892753",
"0.7887893",
"0.788242",
"0.78764445",
"0.7872269",
"0.78641057",
"0.78625774",
"0.7862... | 0.0 | -1 |
funcao para atualizar campos | function atualizacampos($exclusao=false) {
if($exclusao==false){
$this->s158_i_codigo = ($this->s158_i_codigo == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_codigo"]:$this->s158_i_codigo);
$this->s158_i_profissional = ($this->s158_i_profissional == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_profissional"]:$th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _updatefields() {}",
"function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}... | [
"0.6695341",
"0.6605308",
"0.64370596",
"0.6316871",
"0.6283973",
"0.6258171",
"0.61481196",
"0.6110965",
"0.60848427",
"0.60702395",
"0.60149026",
"0.599725",
"0.59970146",
"0.5989812",
"0.59833664",
"0.59787756",
"0.5958578",
"0.5952102",
"0.5949218",
"0.58850634",
"0.58798... | 0.0 | -1 |
/ PUBLIC STATIC METHODS | public static function getInstance( $key )
{
if ( !array_key_exists( $key, self::$_instanceMap ) ) self::$_instanceMap[ $key ] = new View( $key );
return self::$_instanceMap[ $key ];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final private function __construct() {}",
"final private function __construct() {}",
"protected function __init__() { }",
"public function __init(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"pr... | [
"0.7062266",
"0.7062266",
"0.7059086",
"0.7045581",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"... | 0.0 | -1 |
Specifies the access control rules. This method is used by the 'accessControl' filter. | public function accessRules()
{
return array(
array('allow',
'actions'=>array('index','view'),
'users'=>array("@")
),
array('allow',
'actions'=>array('delall','add','edit'),
'users'=>User::mod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admins only\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t\t\t/*'users' => array(\"?\"),*/\n 'expression' => array($this,'isLogedInOrHasKey'),\n ),\n\t\t\tar... | [
"0.7228763",
"0.7199851",
"0.70905805",
"0.7083254",
"0.7078831",
"0.7078758",
"0.7078758",
"0.7071383",
"0.7071383",
"0.70645475",
"0.70633864",
"0.70073724",
"0.7003613",
"0.70006496",
"0.6997435",
"0.698881",
"0.69828933",
"0.6975965",
"0.6973628",
"0.6971721",
"0.6969118"... | 0.0 | -1 |
Return true if timer is elapsed. | public function isElapsed()
{
return ($this->isTimeout() || $this->isLimitExceeded());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testElapsed() {\n // Stop the timer\n $this->timer->stop();\n\n // Get the elapsed time\n $elapsed_time = $this->timer->get_elapsed();\n\n // It should be less than a second\n $this->assertTrue( $elapsed_time > 0 && $elapsed_time < 1 );\n }",
"public f... | [
"0.7291701",
"0.72388834",
"0.7129007",
"0.6868388",
"0.680269",
"0.67644596",
"0.6743978",
"0.66864604",
"0.6598486",
"0.6591055",
"0.64075446",
"0.63855726",
"0.63587296",
"0.6354655",
"0.6304697",
"0.62776744",
"0.6229328",
"0.62247473",
"0.6218459",
"0.61759305",
"0.61748... | 0.7796271 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.