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 |
|---|---|---|---|---|---|---|
Set the value of email | public function setEmail($email)
{
$this->email = $email;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setEmail($value)\n {\n $this->_email = $value;\n }",
"public function setEmail($value) {\r\n $this->email = $value;\r\n }",
"public function setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\... | [
"0.8320114",
"0.8207443",
"0.81339836",
"0.80443805",
"0.7915434",
"0.78432465",
"0.78333914",
"0.7637634",
"0.7605696",
"0.756671",
"0.75154626",
"0.75154626",
"0.7496423",
"0.7487856",
"0.7484968",
"0.74780154",
"0.74690026",
"0.7465834",
"0.74249554",
"0.73958474",
"0.7376... | 0.0 | -1 |
Set the value of phone_number | public function setPhone_number($phone_number)
{
$this->phone_number = $phone_number;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPhoneNumber($phone_number): void\n {\n $this->_phoneNumber = $phone_number;\n }",
"function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default,... | [
"0.78021264",
"0.7687545",
"0.76150024",
"0.75051856",
"0.7486988",
"0.74764365",
"0.7443406",
"0.74153167",
"0.74139726",
"0.7357721",
"0.7357721",
"0.7333779",
"0.7333779",
"0.7274097",
"0.7213269",
"0.7206081",
"0.7206081",
"0.7204833",
"0.7195353",
"0.71811473",
"0.714684... | 0.6853466 | 31 |
Set the value of bp | public function setBp($bp)
{
$this->bp = $bp;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setValue ($value) {\n\t\t$this->_value = $value;\n\t}",
"function setPlace( &$value )\n {\n $this->Place = $value;\n }",
"function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}",
"function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}",
"public function setValue($val... | [
"0.61799836",
"0.6149069",
"0.6136377",
"0.6131183",
"0.6059759",
"0.5970114",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.59155583",
"0.5915305",
"0.5915305",
"0.5834921",
"0.5... | 0.7108403 | 0 |
Set the value of localisation | public function setLocalisation($localisation)
{
$this->localisation = $localisation;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function settingLanguage() {}",
"public function settingLocale() {}",
"function setLocale($localename)\r\n\t{\r\n\t\t$this->pathLocale = $localename;\r\n\t\t$f = $this->_getFileName();\r\n\t\t/* load language configuration */\r\n\t\tif (file_exists($f))\r\n\t\t{\r\n\t\t\tglobal $tmp;\r\n\t\t\tinclude($f... | [
"0.73815644",
"0.72877604",
"0.7263297",
"0.7075487",
"0.7017133",
"0.69707304",
"0.6961756",
"0.69266105",
"0.69202536",
"0.6900012",
"0.6876838",
"0.687326",
"0.6863539",
"0.6830927",
"0.6804752",
"0.67062795",
"0.66866696",
"0.66562253",
"0.663825",
"0.66019934",
"0.659575... | 0.62951505 | 35 |
Set the value of ville | public function setVille($ville)
{
$this->ville = $ville;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVille($valeur)\n {\n $this->ville = $valeur;\n }",
"public function setVida($valor){\n $this->vida=$valor;\n }",
"protected function setVida() {\n $this->vida = 200;\n }",
"public function setValue($v){\n $this->value = $v;\n }",
"public function setV... | [
"0.7607434",
"0.6543471",
"0.64467597",
"0.626502",
"0.61783457",
"0.6159194",
"0.6065006",
"0.602216",
"0.5956322",
"0.5891147",
"0.57661486",
"0.57028466",
"0.55879563",
"0.55873495",
"0.5540058",
"0.54986167",
"0.5491278",
"0.5480593",
"0.54791987",
"0.5475379",
"0.5460666... | 0.6607578 | 1 |
Set the value of uniqueId | public function setUniqueId($uniqueId)
{
$this->uniqueId = $uniqueId;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setUniqueID($key) {\r\n\t\t$this->uniqueID = $key;\r\n\t}",
"public function setUniqueId($uniqueId){\n $this->uniqueId = $uniqueId;\n }",
"public function setUniqueIdAttribute($value): void\n {\n\n\t\t$this->attributes['unique_id'] = uniqid(str_replace(' ', '-', $value), true);\n\t}",
"public... | [
"0.74906033",
"0.74151075",
"0.73116803",
"0.7160486",
"0.7000528",
"0.6869744",
"0.670103",
"0.66879684",
"0.6642139",
"0.6553679",
"0.6553279",
"0.6539984",
"0.6530855",
"0.6432999",
"0.63978803",
"0.63976145",
"0.6393939",
"0.6376019",
"0.6368848",
"0.63168156",
"0.6309743... | 0.6100524 | 31 |
Set the value of created_at | public function setCreated_at($created_at)
{
$this->created_at = $created_at;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDateTime($value)\n {\n $this->createdAt=$value;\n }",
"public function setCreatedAtValue()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = $value;\n }",
"pub... | [
"0.8108836",
"0.7978941",
"0.791579",
"0.78679883",
"0.77636284",
"0.7692112",
"0.75862956",
"0.7556652",
"0.7477115",
"0.7448109",
"0.7448109",
"0.7448109",
"0.7448109",
"0.7448109",
"0.74423444",
"0.73563635",
"0.73563635",
"0.7307852",
"0.73021567",
"0.73021567",
"0.726894... | 0.68940467 | 43 |
Set the value of created_by | public function setCreated_by($created_by)
{
$this->created_by = $created_by;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCreatedBy($createdBy);",
"private function SetCreatedBy(User $value = null)\n\t\t{\n\t\t\t$this->createdby = $value;\n\t\t}",
"public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }",
"public function _setCreatedBy($createdBy) {\n\t\t$t... | [
"0.8133105",
"0.81027514",
"0.8092404",
"0.7935914",
"0.7823249",
"0.77964735",
"0.7785043",
"0.7785043",
"0.7785043",
"0.77207595",
"0.7638569",
"0.75950086",
"0.75556827",
"0.75140077",
"0.75140077",
"0.75058687",
"0.74027807",
"0.7369703",
"0.7325514",
"0.7325514",
"0.7325... | 0.7609677 | 11 |
Set the value of update_at | public function setUpdate_at($update_at)
{
$this->update_at = $update_at;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAt($updated_at)\n {\n $this->updated_at = $updated_at;\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setU... | [
"0.7373528",
"0.7331793",
"0.7293645",
"0.7293645",
"0.7293645",
"0.7285675",
"0.7249674",
"0.7249674",
"0.70946604",
"0.70505416",
"0.70440763",
"0.70376456",
"0.70323217",
"0.69707924",
"0.6928115",
"0.6917095",
"0.6915163",
"0.691319",
"0.69127333",
"0.68610305",
"0.686103... | 0.70844126 | 9 |
Set the value of update_by | public function setUpdate_by($update_by)
{
$this->update_by = $update_by;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _setUpdatedBy($updatedBy) {\n\t\t$this->_updatedBy = $updatedBy;\n\t}",
"public function setBy($x) { $this->by = $x; }",
"public function updateBy( array $data, $value = NULL, $field = 'id' );",
"public function setUpdatedBy()\n {\n $userService = app()->make(AuthUserService::class)... | [
"0.71269834",
"0.67451936",
"0.6626519",
"0.65955627",
"0.6535593",
"0.6336943",
"0.618899",
"0.61513186",
"0.60835236",
"0.6080476",
"0.60582566",
"0.60320497",
"0.6027964",
"0.60158443",
"0.6012018",
"0.5960064",
"0.58396405",
"0.5832077",
"0.5820128",
"0.5818278",
"0.57888... | 0.7710697 | 0 |
used for paging products | public function countAll(){
$query = "SELECT id FROM " . $this->table_name . "";
$stmt = $this->conn->prepare( $query );
$stmt->execute();
$num = $stmt->rowCount();
return $num;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function do_paging()\n {\n }",
"function getFeatureProducts(){\n \n $itemonpage = !empty($_GET['per_page'])?$_GET['per_page']:3;\n $page = !empty($_GET['page'])?$_GET['page']:1;\n $offset= ($page-1)*$itemonpage;\n\n $numberPage = ceil(30/$itemonpage);\n ... | [
"0.7094803",
"0.69295263",
"0.6808069",
"0.6734872",
"0.6727695",
"0.67153203",
"0.6694537",
"0.6688724",
"0.66794324",
"0.66738987",
"0.6614161",
"0.65810066",
"0.6577566",
"0.6577566",
"0.6577121",
"0.6550058",
"0.6549534",
"0.6529021",
"0.65032494",
"0.6491343",
"0.6486829... | 0.0 | -1 |
Bootstrap any application services. | public function boot()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }",
"public function boot()\n {\n // Boot here application\n }",
"public func... | [
"0.7344842",
"0.7212776",
"0.7207748",
"0.7123287",
"0.7109729",
"0.70822036",
"0.7076881",
"0.70718396",
"0.7051853",
"0.7025475",
"0.7011949",
"0.70043486",
"0.6955807",
"0.69322443",
"0.69319373",
"0.69272774",
"0.6911386",
"0.69069713",
"0.6898877",
"0.6898432",
"0.689659... | 0.0 | -1 |
Register any application services. This service provider is a great spot to register your various container bindings with the application. As you can see, we are registering our "Registrar" implementation here. You can add your own bindings too! | public function register()
{
$this->app->bind(
'Illuminate\Contracts\Auth\Registrar',
'StartMeUp\Services\Registrar'
);
$repositories = [
'Company',
];
foreach ($repositories as $repository) {
$this->bindRepository($repository);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }"... | [
"0.7448802",
"0.72350603",
"0.7203969",
"0.71519727",
"0.7146342",
"0.71411484",
"0.71408015",
"0.7137989",
"0.71339524",
"0.71320623",
"0.71277446",
"0.7103666",
"0.71013707",
"0.70943624",
"0.7073023",
"0.7061431",
"0.70569307",
"0.70553035",
"0.70532185",
"0.7049688",
"0.7... | 0.715534 | 3 |
Function to sanitize values received from the form. Prevents SQL injection | function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sanitize_input_fields()\n {\n }",
"public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}",
"function... | [
"0.7573986",
"0.74317616",
"0.7415901",
"0.7355193",
"0.733741",
"0.7241798",
"0.71910816",
"0.71896744",
"0.714539",
"0.71444225",
"0.7109398",
"0.710709",
"0.7086688",
"0.7072003",
"0.7046222",
"0.7044782",
"0.7020191",
"0.70146024",
"0.69494987",
"0.6933605",
"0.6929717",
... | 0.0 | -1 |
Lists all Genre entities. | public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$genres = $em->getRepository('SerieBundle:Genre')->findAll();
return $this->render('genre/index.html.twig', array(
'genres' => $genres,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n return GenreResource::collection(Genre::all());\n }",
"public function actionIndex()\n {\n $searchModel = new GenreSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n ... | [
"0.70429295",
"0.70120436",
"0.6894314",
"0.6893458",
"0.68385917",
"0.67797714",
"0.67756814",
"0.66557527",
"0.65557504",
"0.6534678",
"0.6530369",
"0.64410657",
"0.6388792",
"0.6383442",
"0.6366813",
"0.6326284",
"0.6247234",
"0.6222564",
"0.6216516",
"0.6213483",
"0.61941... | 0.70362043 | 1 |
Creates a form to delete a Genre entity. | private function createDeleteForm(Genre $genre)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('genre_delete', array('id' => $genre->getId())))
->setMethod('DELETE')
->getForm()
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private funct... | [
"0.69484854",
"0.686731",
"0.6823078",
"0.67485756",
"0.6739969",
"0.6655109",
"0.6602307",
"0.6596271",
"0.6556525",
"0.655565",
"0.6552498",
"0.65520245",
"0.6529108",
"0.65102917",
"0.650087",
"0.64991164",
"0.6472959",
"0.6464222",
"0.64621615",
"0.64598924",
"0.64330435"... | 0.7664629 | 0 |
Display a listing of the resource. | public function __construct() {
$this->data['title'] = 'Category';
} | {
"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() {
//
if (!Entrust::can('category-create')) {
return redirect('');
}
$this->data['sub_title'] = 'Create Category';
$this->data['parent'] = Category::where('parent', '=', 0)->lists('name', 'id');
return view('backend.category.create', $this->data);
} | {
"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(CategoryRequest $request) {
//
$thumb ='images\categories\thumb';
$full = 'images\categories\full';
$input = $request->except('image');
$input['status'] = $request->get('status') == 'on' ? 1 : 0;
if ($request->get('parent')) {
$parent_slug = Category::find($input['parent'])->slug;
$input['slug'] = $parent_slug . '/' . str_slug($input['name']);
} else {
$input['slug'] = str_slug($input['name']);
}
$input['order'] = Category::max('order') + 1;
$cat = new Category($input);
if ($request->hasFile('image')) {
$name = $input['slug'] . '.' . $request->file('image')->getClientOriginalExtension();
$cat->image = $name;
Image::make($request->file('image'))->save($full . '/' . $name);
Image::make($request->file('image'))->resize('200', '200')->save($thumb . '/' . $name);
}
if ($cat->save()) {
return redirect()->route('backend.category.index');
}
} | {
"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.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id) {
//
} | {
"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) {
//
if (!Entrust::can('category-update')) {
return redirect('');
}
$this->data['sub_title'] = 'Edit Category';
$this->data['category'] = Category::find($id);
$this->data['parent'] = Category::where('id', '!=', $id)->where('parent', '=', 0)->lists('name', 'id');
return view('backend.category.edit', $this->data);
} | {
"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(CategoryRequest $request, $id) {
//
$thumb = 'images/categories/thumb';
$full = 'images/categories/full';
$input = $request->all();
$input['status'] = $request->get('status') == 'on' ? 1 : 0;
if ($request->get('parent')) {
$parent_slug = Category::find($input['parent'])->slug;
$input['slug'] = $parent_slug . '/' . str_slug($input['name']);
} else {
$input['slug'] = str_slug($input['name']);
}
$category = Category::find($id);
if ($request->hasFile('image')) {
if (Storage::exists('images/categories/thumb/' . $category->image)) {
Storage::delete('images/categories/thumb/' . $category->image);
}
if (Storage::exists('images/categories/full/' . $category->image)) {
Storage::delete('images/categories/full/' . $category->image);
}
$name = $input['slug'] . '.' . $request->file('image')->getClientOriginalExtension();
$input['image'] = $name;
Image::make($request->file('image'))->save($full . '/' . $name);
Image::make($request->file('image'))->resize('200', '200')->save($thumb . '/' . $name);
}
$category->update($input);
return redirect()->route('backend.category.index');
} | {
"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) {
//
if (!Entrust::can('category-delete')) {
$this->data['category'] = Category::getNested();
return view('backend.category.lists', $this->data);
}
$category = Category::find($id);
if ($category->delete()) {
$category->where('parent', $id)->update(['parent' => 0]);
$this->data['category'] = Category::getNested();
return view('backend.category.lists', $this->data);
}
} | {
"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.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Run the database seeds. | public function run()
{
Teacher::truncate();
$teacher1 = Teacher::create([
'first_name' => 'Markus',
'last_name' => 'Jean Raul',
'status' => '1',
]);
$teacher2 = Teacher::create([
'first_name' => 'McCan',
'last_name' => 'Isak Paul',
'status' => '0',
]);
$teacher3 = Teacher::create([
'first_name' => 'Fernandes',
'last_name' => 'Paco Dimitri',
'status' => '1',
]);
$speciality1 = Speciality::find(1);
$speciality2 = Speciality::find(2);
$speciality3 = Speciality::find(3);
$teacher1->speciality()->associate($speciality1);
$teacher2->speciality()->associate($speciality2);
$teacher3->speciality()->associate($speciality3);
$teacher1->save();
$teacher2->save();
$teacher3->save();
} | {
"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 |
Determine if the user is authorized to make this request. | public function authorize()
{
return Auth::check();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }"... | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.789145... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'dataset' => 'required|max:255',
'nazov_dataset' => 'required|max:255',
'short' => 'required|max:255',
'spravca' => 'required|max:255',
'povinna_institucia' => 'required|max:255',
'kontakt_zastupcu' => 'required|max:255',
'tel' => 'required|max:255',
'stav_elektronizacie' => 'required|max:255',
'format' => 'required|max:255',
'rozsah_udajov' => 'required|max:255',
'aktualizacia_udajov' => 'required|max:255',
'spceifikacia_obsahu' => 'required|max:255',
'zverejnitelnost' => 'required|max:255',
'odovodnenie' => 'required|max:255',
'plan_zverejnenia' => 'date'
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche... | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.76830... | 0.0 | -1 |
przekazuje baseUrl tylko do kontrolera | public function onDispatch(MvcEvent $e) {
$this->baseUrl=$this->getRequest()->getBasePath();
parent::onDispatch($e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bu($url='')\n{\n static $baseUrl;\n $baseUrl=Yii::app()->request->baseUrl;\n $baseUrl .= $baseUrl.'/'.ltrim($url,'/');\n if(param('root_control'))\n {\n $baseUrl = \"/\" . param('root_control') . $baseUrl;\n }\n return $baseUrl; \n}",
"public function getBaseUrl() {}",
"public function baseU... | [
"0.77263504",
"0.7721347",
"0.7659341",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7600484",
"0.7453957",
"0.7395846",
"0.7379311",
"0.7369998",
"0.73616683",
"0.7299054",
"0.72864056",
"0.72554",
"0.72352505",
"0.7224565",
"0.7209777",
"0.7187",
"0.7177516",
"0... | 0.0 | -1 |
/ funkcja jest wykonywana przed akcjami kontrolera | public function setEventManager(EventManagerInterface $events) {
parent::setEventManager($events);
$events->attach('dispatch', function ($e) {
$controllerClass = $e->getRouteMatch()->getParam('controller', 'index');
// przekazuje do szablonu wywoływany kontroler
$e->getViewModel()->setVariable('controller', $controllerClass);
//przekazuje baseUrl do szablonu layout.phtml
$e->getViewModel()->setVariable('baseUrl', $this->getRequest()->getBasePath());
$userSession = new Session\Container('uzytkownik');
if ($userSession->details) {
$e->getViewModel()->setVariable('uzytkownik', $userSession->details);
}
}, 100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function contrato()\r\n\t{\r\n\t}",
"public function AggiornaPrezzi(){\n\t}",
"function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}",
"public function accueil()\n {\n }",
"protected function editar()\n {\n }",
"private function metodo_privado() {\n }",
"public ... | [
"0.65372866",
"0.64477366",
"0.6423411",
"0.6368704",
"0.62858874",
"0.6274564",
"0.62723154",
"0.6250783",
"0.61720794",
"0.61577755",
"0.61488384",
"0.6109094",
"0.6093255",
"0.60749316",
"0.607078",
"0.60268474",
"0.60112166",
"0.6008805",
"0.6003453",
"0.6000231",
"0.5998... | 0.0 | -1 |
/ === quick & dirty PHP prettyprinter for arrays ========================================================== | public function pp($arr){
$retStr = "<dl>\n";
if (is_array($arr)){
foreach ($arr as $key=>$val){
if (is_array($val)){
$retStr .= "<dt>" . $key . " => </dt>\n<dd>" . $this->pp($val) . "</dd>\n";
}
else{
$retStr .= "<dt>" . $key . " => </dt>\n<dd>" . $val . "</dd>\n";
}
}
}
$retStr .= "</dl>\n";
return $retStr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _pre($array) { echo '<pre>'; print_r ($array); echo '</pre>'; }",
"function dump_array($the_array)\n{\n echo \"<ul>\";\n\n foreach ($the_array as $key1 => $value1) {\n echo \"<li><span class='key'>$key1</span>\";\n\n # If the value is itself an array, then print that as well.\n ... | [
"0.71115845",
"0.7043661",
"0.7000103",
"0.69114006",
"0.67974585",
"0.6767884",
"0.6694972",
"0.6639608",
"0.663276",
"0.66135705",
"0.6610518",
"0.6606194",
"0.6480899",
"0.6375793",
"0.63615245",
"0.6360632",
"0.6349452",
"0.6348594",
"0.6342662",
"0.63387275",
"0.6331262"... | 0.59548545 | 50 |
rtrn_default_value is a function that returns a default value. This function is used to allow workflow to operate properly even if there are missing active dashboards. The function accepts the paramter id (used to specify which module to update), and value (taken from the modules relational "value" property). | function imageselector_rtrn_default_value($sid, $options)
{
//Specify the database to connect to
//use to find default value
global $db;
//read database, find default value
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'];
if($options['lookuptablename']!='')
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'].' where '.$options['lookupidcolumnname'].'::text=(select '.$options['lookupcolumnname'].' from '.$options['lookuptablename']." where ".$options['lookupsearchcolumnname']."=".$options['lookupsearchvalue'].')::text;';
if($options['lookupinputmodulesid']!='')
$sql='select '.$options['desccolumnname'].' as description,'.$options['urlcolumnname'].' as url,'.$options['idcolumnname'].' as id from '.$options['tablename'].' where '.$options['lookupidcolumnname']."::text=(select value from station_variables where (name='value') and (sid=".$options['lookupinputmodulesid']."))::text;";
$result = $db->fetchAll($sql);
$sql = 'update station_variables set value=\''.$result[0]['id'].'\' where sid='.$sid.' and name=\'value\';';
$result = $db->fetchAll($sql);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultValue();",
"public function getDefaultValue();",
"public function getDefaultValue() {}",
"public function getDefaultValue() {}",
"public function getDefaultValue(): mixed;",
"function define_default($param, $value) {\n\t\t//\n\t}",
"function mm_default($field, $value='', $role... | [
"0.608201",
"0.608201",
"0.60247",
"0.6024106",
"0.58687603",
"0.58345205",
"0.5822871",
"0.561045",
"0.5571496",
"0.5551484",
"0.5543126",
"0.5433066",
"0.54206157",
"0.53860533",
"0.5348922",
"0.5331395",
"0.5321716",
"0.5308049",
"0.5298644",
"0.52762187",
"0.5266832",
"... | 0.5750242 | 7 |
Retrieves the collection of ReflectionProperties for the object. | public static function ofThe(object $object): self
{
$theClass = theClassOfThe($object);
if (!alreadyCached($theClass, ReflectionProperties::$cache)) {
$reflection = new ReflectionObject($object);
$properties = [];
$level = 0;
do {
$properties = self::addTo($properties, $level, $reflection);
++$level;
$reflection = $reflection->getParentClass();
} while($reflection);
ReflectionProperties::$cache[$theClass] = new self(...$properties);
}
return ReflectionProperties::$cache[$theClass];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getReflectionProperties($object)\n {\n return self::getReflectionClass($object)->getProperties();\n }",
"protected function getReflectedProperties()\n {\n if (is_null($this->_ReflectedPropertiesCache)) {\n $this->_ReflectedPropertiesCache = array();\n\n ... | [
"0.7943348",
"0.79229677",
"0.7331014",
"0.7136801",
"0.711634",
"0.6825437",
"0.6774929",
"0.67694074",
"0.6713741",
"0.6633608",
"0.65743434",
"0.6465461",
"0.64167017",
"0.64146894",
"0.64146894",
"0.64107394",
"0.64107394",
"0.63095707",
"0.6307349",
"0.6272798",
"0.62542... | 0.0 | -1 |
Handle error to exception. | public static function handle()
{
set_error_handler([ErrorHandler::class, 'errorToException'], E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function handleError(\\Exception $e);",
"public function handle(\\Exception $error);",
"public function handleException($exception);",
"public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($las... | [
"0.8004618",
"0.7790179",
"0.7080405",
"0.67256945",
"0.66817313",
"0.6642069",
"0.661947",
"0.65872926",
"0.6553732",
"0.652721",
"0.6494951",
"0.648108",
"0.646394",
"0.6461653",
"0.64553684",
"0.64196056",
"0.63927585",
"0.6285294",
"0.62603825",
"0.625788",
"0.6238074",
... | 0.0 | -1 |
LLAMADA A LA PLANTILLA | public function plantilla(){
include "views/template.php";#include(): Se utiliza para invocar el archivo que contiene el código html (es decir, incluye el template que está en la carpeta views)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function graficoLinha() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $idx++;\n $color = $this->getColor($idx);\n $this->desenhaLinha($item, $color, $maxValue);\n ... | [
"0.59238005",
"0.5835028",
"0.57242537",
"0.5703667",
"0.5633615",
"0.5587144",
"0.5474995",
"0.54482603",
"0.53998995",
"0.53949934",
"0.5367377",
"0.5363346",
"0.526598",
"0.52410316",
"0.5219348",
"0.5209642",
"0.52086306",
"0.5202947",
"0.51796204",
"0.5159445",
"0.514196... | 0.0 | -1 |
Merge $defaultCrudConfig with crudConfig array and return the merged array | private function getCrudConfig($action) {
$config = isset($this->crudConfig) ? $this->crudConfig : [];
$config = array_replace_recursive($this->defaultCrudConfig, $config);
if (! isset($config[$action])) {
throw new \Exception("Invalid config for $action.");
}
return $config[$action];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheet... | [
"0.629771",
"0.6081072",
"0.5964614",
"0.564848",
"0.5647698",
"0.5608753",
"0.55674237",
"0.5514988",
"0.55116916",
"0.549727",
"0.5490413",
"0.54854226",
"0.54098266",
"0.53893554",
"0.52684885",
"0.5228975",
"0.5226455",
"0.5202413",
"0.5170636",
"0.5148066",
"0.5141824",
... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$model = $this->getClassName();
$config = $this->getCrudConfig('create');
$item = app('App\\' . $model);
$viewVars = [
'model' => $model,
$config['viewVar'] => $item,
'viewVar' => $config['viewVar']
];
foreach ($config['relatedModels'] as $var => $relatedModel) {
$viewVars[$var] = app($relatedModel)::pluck('name', 'id');
}
return view(strtolower($model) . '.form', $viewVars);
} | {
"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 |
Display the specified resource. | public function show($id)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('show');
$item = app('App\\' . $model)::where('id', $id)
->first();
return view(strtolower($model) . '.show', [
'model' => $model,
$config['viewVar'] => $item
]);
} | {
"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)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('edit');
$item = app('App\\' . $model)::where('id', $id)
->first();
$viewVars = [
'model' => $model,
$config['viewVar'] => $item,
'viewVar' => $config['viewVar']
];
foreach ($config['relatedModels'] as $var => $relatedModel) {
$viewVars[$var] = app($relatedModel)::pluck('name', 'id');
}
return view(strtolower($model) . '.form', $viewVars);
} | {
"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 |
Remove the specified resource from storage. | public function destroy($id)
{
$model = $this->getClassName();
$config = $this->getCrudConfig('delete');
$item = app('App\\' . $model)::where('id', $id)
->first();
preg_match('/\\\([a-z]+)Controller$/i', static::class, $matches);
$indexAction = '/';
if (isset($matches[1])) {
$indexAction = '/'. strtolower(Inflector::pluralize($matches[1]));
}
if (empty($item)) {
return redirect($indexAction);
}
$item->delete();
return redirect($indexAction);
} | {
"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.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Returns a collection with all items | public function collection(): ItemCollection
{
if ($this->collection) {
return $this->collection;
}
return $this->collection = new ItemCollection($this->app, $this->path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function getAll() : Collection;",
"public function all(): Collec... | [
"0.8674736",
"0.82896125",
"0.82896125",
"0.82896125",
"0.82896125",
"0.81310076",
"0.8089803",
"0.80866605",
"0.78209794",
"0.78171456",
"0.7706342",
"0.7691358",
"0.76245475",
"0.76195467",
"0.76195467",
"0.76195467",
"0.76195467",
"0.7616132",
"0.76082325",
"0.75934744",
"... | 0.0 | -1 |
Checks if a specified item exists | public function exists(string $item): bool
{
$path = $this->path . '/' . $item . '.json';
return is_file($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function itemExists($key);",
"function itemExists(Array $args = array())\n {\n $itemid = isset($args['itemid']) ? $args['itemid'] : $this->object->itemid;\n\n // Make sure we have a primary field\n if (empty($this->object->primary)) throw new Exception(xarML('The object #(1) has no... | [
"0.7817557",
"0.7751124",
"0.7649958",
"0.75421745",
"0.74676985",
"0.74314886",
"0.7398742",
"0.7398742",
"0.7326359",
"0.71478736",
"0.706621",
"0.70564634",
"0.69869924",
"0.69680256",
"0.69623107",
"0.69395345",
"0.6919507",
"0.6919507",
"0.6919507",
"0.6864059",
"0.67999... | 0.709157 | 10 |
Gets an item object by ID | public function get(string $item): ?Item
{
// check if the item exists
if (!$this->exists($item)) {
return null;
}
return new Item($this->app, $this->path . '/' . $item . '.json');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getItem( $id );",
"public function getItem ($id);",
"public function getItem($id)\n {\n return $this->where('id', $id)->first();\n }",
"public function getItem($id) {\n foreach($this->all as $item) {\n if ($id == $item->getId()) {\n return $item;\... | [
"0.8447974",
"0.8445204",
"0.8359441",
"0.82213354",
"0.8212603",
"0.81223804",
"0.80825126",
"0.80374664",
"0.7828867",
"0.7577514",
"0.7553535",
"0.75347316",
"0.74788094",
"0.7472165",
"0.7471226",
"0.7467295",
"0.74409056",
"0.7429152",
"0.7429152",
"0.74074715",
"0.73905... | 0.0 | -1 |
Creates a new item | public function create($props): Item
{
return Item::create($this->app, $this->path, $props);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createNewItem();",
"public function createItem($data);",
"public function create()\n {\n // Not needed cause this is coming from the item listing\n }",
"public function createItem (Item $item) {\n $this->itemsDB->create($item);\n $item->setId($this->retrieveLastItemId());\n... | [
"0.896043",
"0.812573",
"0.8045087",
"0.7690441",
"0.73969585",
"0.73680484",
"0.73546934",
"0.7256986",
"0.7255335",
"0.7243418",
"0.723289",
"0.7186418",
"0.71463406",
"0.71209294",
"0.70673144",
"0.70545524",
"0.70542413",
"0.700561",
"0.6986255",
"0.696522",
"0.696522",
... | 0.6596427 | 49 |
Verifies the integrity of the items and files and cleans up expired items | public function cleanUp(): string
{
$warnings = '';
$files = [];
// verify validity of the items
foreach ($this->collection() as $itemName => $item) {
if ($item->isExpired()) {
// delete expired item and its file
$item->delete();
} else {
// item is not expired, verify if its file is still there
$file = $this->app->filePath($item->filename());
if (is_file($file)) {
// note the file path down for later
$files[] = $file;
} else {
$warnings .= sprintf(
'File "%s" for item "%s" does not exist' . "\n",
$file,
$itemName
);
}
}
}
// find orphaned files
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->app->filePath()));
foreach ($iterator as $file) {
// skip dotfiles like .gitignore
if (substr($file->getFilename(), 0, 1) === '.') {
continue;
}
// check if we encountered the file in any item before
if (!in_array($file->getPathname(), $files)) {
$warnings .= sprintf('File "%s" is orphaned' . "\n", $file->getPathname());
}
}
return $warnings;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleteExpiredFiles(){\r\n $dir = $this->emailVerify->getDataFolder().self::FOLDER_PATH;\r\n foreach (glob($dir.\"*.token\") as $file) {\r\n $uF = unserialize(gzdecode(file_get_contents($file)));\r\n $tee = new TokenExpireEvent($this->emailVerify, $uF[\"token\"]);... | [
"0.6432089",
"0.6081106",
"0.587504",
"0.58073884",
"0.58016634",
"0.5795249",
"0.579096",
"0.577308",
"0.57053995",
"0.56975317",
"0.56790584",
"0.5670454",
"0.56674725",
"0.56099015",
"0.5606711",
"0.5599495",
"0.5563707",
"0.5554562",
"0.55514324",
"0.5541887",
"0.5532494"... | 0.62844634 | 1 |
Run the database seeds. | public function run()
{
SearchList::create([
'class_path' => News::class,
'field' => 'title',
'module_slug' => 'news',
'route_name' => 'show_news',
'is_require_slug' => 1,
'is_active' => 1
]);
SearchList::create([
'class_path' => Video::class,
'field' => 'name',
'module_slug' => 'news',
'route_name' => 'show_videos',
'is_require_slug' => 1,
'is_active' => 1
]);
SearchList::create([
'class_path' => Photo::class,
'field' => 'name',
'module_slug' => 'news',
'route_name' => 'show_photo',
'is_require_slug' => 1,
'is_active' => 1
]);
} | {
"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 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }"... | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.789145... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'order_id' => 'required|array',
'order_id.*' => 'required|exists:orders,id',
'product_code' => 'required|array',
'product_code.*' => 'required|exists:products,code',
'product_color' => 'required|array',
'product_color.*' => 'required',
'product_qtyp' => 'required|array',
'product_qtyp.*' => 'required|numeric',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche... | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.76830... | 0.0 | -1 |
/ / Fixtures / | protected function setUp () : void {
$this->range = IPRange::from("216.66.0.0/18");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=... | [
"0.71607834",
"0.71281236",
"0.7115191",
"0.7110753",
"0.70805305",
"0.707585",
"0.7060482",
"0.7035313",
"0.6984477",
"0.6838064",
"0.6749169",
"0.67430943",
"0.6680036",
"0.666387",
"0.66508746",
"0.6641702",
"0.66233236",
"0.66230315",
"0.65836895",
"0.6583572",
"0.6570889... | 0.0 | -1 |
/ / Tests / | public function testGetBase () : void {
$this->assertEquals("216.66.0.0", $this->range->getBase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testBasicTest()\n {\n\n }",
"public function run_tests()\n {\n }",
"private static function test()\n {\n $files = ['TestCase'];\n $folder = static::$root.'Testing'.'/';\n\n self::call($files, $folder);\n }",
"public static function get_tests()\n ... | [
"0.73162836",
"0.730368",
"0.712729",
"0.70596766",
"0.70554894",
"0.69886196",
"0.6986688",
"0.69600177",
"0.69174826",
"0.6908079",
"0.690172",
"0.6848736",
"0.6839514",
"0.68180716",
"0.6818071",
"0.6804616",
"0.6801958",
"0.67977554",
"0.67827606",
"0.6745591",
"0.6743375... | 0.0 | -1 |
Creates a new Instance of this Exception | public static function occurred(array $context): self
{
return new RequestException(
"There was an error requesting the Model",
500,
null,
$context
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }",
"public function create()\n {\n throw new Exception('Not yet implemented');\n }",
"public function __construct()\n {\n throw new Exception('This class is not intended to be in... | [
"0.7183871",
"0.6969446",
"0.6225343",
"0.6150776",
"0.61459947",
"0.6103415",
"0.60607654",
"0.6055027",
"0.6034815",
"0.6024999",
"0.5974546",
"0.59155774",
"0.5908322",
"0.59035397",
"0.5843574",
"0.58402526",
"0.5827022",
"0.5786861",
"0.5777891",
"0.57568276",
"0.5752584... | 0.0 | -1 |
Show a postcode resource. | public function show(string $postcode, string $houseNumber, string $houseNumberAddition = null): JsonResponse
{
try {
$address = $this->addressService->search(str_replace(' ', '', $postcode), (int)$houseNumber, $houseNumberAddition);
return response()->json($address);
} catch (\Exception $e) {
abort($e->getCode(), $e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Code $code)\n {\n //\n }",
"public function show(Code $code)\n {\n //\n }",
"public function get($postcode);",
"public function show(Access_Code $access_Code)\n {\n //\n }",
"public function showAction($code = null)\n {\n $profile... | [
"0.67284966",
"0.67284966",
"0.6461401",
"0.63094765",
"0.6200232",
"0.6175458",
"0.615293",
"0.6060309",
"0.6014391",
"0.6014391",
"0.6014391",
"0.5974579",
"0.5969461",
"0.595958",
"0.5959221",
"0.5935607",
"0.5912109",
"0.59072113",
"0.5904935",
"0.58819765",
"0.58819765",... | 0.57767063 | 43 |
Retrieve image Edit Data | public function retrieve_image_editdata($image_id)
{
$this->db->select('*');
$this->db->from('image_gallery');
$this->db->join('product_information','image_gallery.product_id = product_information.product_id');
$this->db->where('image_gallery.image_gallery_id',$image_id);
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->result_array();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCompleteEditImage()\n\t{\n\t\t$saveThis = Image::model()->findByPk($_POST['Image']['imageid']);\n\n\t\t$saveableThings = Image::model()->allowedSaves();\n\t\t\n\t\t$tags=Image::model()->tags();\n\t\tforeach($tags as $tag)\n\t\t{\n\t\t\tif ($_POST['Image'][$tag] == true)\n\t\t\t{\n\t\t\t\t$_PO... | [
"0.6906226",
"0.6848612",
"0.6662698",
"0.6586425",
"0.65791845",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6446003",
"0.6381529",
"0.63679564",
"0.6351312",
"0.6329007",
"0.6323736",
"0.62449336",
... | 0.6403706 | 15 |
empty function in order to avoid Fatal error: Cannot redeclare class SPF\deployment\Lock | function lock()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function lock(): void;",
"public function lock() {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"protected function hashLockClause() {}",
"public f... | [
"0.69460756",
"0.6747951",
"0.673069",
"0.673069",
"0.673069",
"0.673069",
"0.673069",
"0.66911846",
"0.6621509",
"0.65507424",
"0.65036345",
"0.63380384",
"0.6212664",
"0.61554587",
"0.6136137",
"0.60556024",
"0.60331434",
"0.5976369",
"0.59563076",
"0.5946219",
"0.5936445",... | 0.6970383 | 0 |
Write a function which takes any string as input, and returns it's reverse. For example, | public function reverseString( $string ) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function solution($str) {\n return strrev($str);\n}",
"function reverseString(&$str) {\n\t$str = strrev($str);\n}",
"function reverse($string)\n{\n $r = strlen($string);\n if($r == 1)\n {\n return $string;\n }\n else\n {\n $n--;\n return reverse(substr($string,1, $r)) . substr($string, 0, 1);\n ... | [
"0.7737465",
"0.7521762",
"0.75001484",
"0.7224193",
"0.7224193",
"0.7224193",
"0.7224193",
"0.707716",
"0.7007522",
"0.6929951",
"0.69180924",
"0.68492144",
"0.67312324",
"0.6600258",
"0.65217924",
"0.6451435",
"0.63529676",
"0.6351132",
"0.6301745",
"0.6197365",
"0.61238897... | 0.80795825 | 0 |
Write a function which returns the longest word in the first paragraph of the Ghettysburg Address (provided in Questions::GHETTYSBURG_ADDRESS below. | public function findLongestWord() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getLongestWord($sentence) {\n\t\t$words = explode(' ', $sentence);\n\n\t\t$longestWord = '';\n\n\t\t$nbWords = count($words);\n\n\t\tif($nbWords > 0) {\n\t\t\t$longestWord = $words[0];\n\t\t}\n\n\t\tfor($i = 0; $i < $nbWords; $i++) {\n\t\t\tif(strlen($words[$i]) > strlen($longestWord)) {\n\t\t\t\t$longest... | [
"0.631341",
"0.6028681",
"0.59418696",
"0.57612014",
"0.5729432",
"0.5695807",
"0.56765896",
"0.5636818",
"0.55954856",
"0.5512497",
"0.5505409",
"0.55048025",
"0.546145",
"0.54491013",
"0.54468757",
"0.5408977",
"0.53503466",
"0.53432417",
"0.53345686",
"0.5306806",
"0.52966... | 0.69784844 | 0 |
BONUS QUESTION Write a function that accepts a query string as input, performs a repo search on the github api using the query string, and prints the name, url, and language of the repository. TIPS: GitHub API info is located at Use the search endpoint: EXAMPLE OUTPUT: testrocket Ruby sublimetext2rubytests Python rubyplsql Ruby | public function listGithubSearchResults( $query ) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_project_github($user, $project) {\n $ch = @curl_init(); //inicia uma nova sessao\n curl_setopt($ch, CURLOPT_URL, \"http://github.com/api/v2/json/repos/show/$user/$project\"); //faz a pesquisa contida no url\n\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1'); //utiliza Googlebot 2.1\n cu... | [
"0.6684253",
"0.64568156",
"0.63924336",
"0.6026684",
"0.60118747",
"0.5912671",
"0.56734014",
"0.56247395",
"0.55762845",
"0.5573877",
"0.55727476",
"0.55644506",
"0.5533422",
"0.55119205",
"0.5500073",
"0.54918104",
"0.54769564",
"0.5463076",
"0.541388",
"0.5401627",
"0.539... | 0.6833719 | 0 |
Constructs a new class instance. | public function __construct(MenuLinkManagerInterface $link) {
$this->link = $link;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newInstance();",
"public function newInstance();",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function newInstance(): object;",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{... | [
"0.77641046",
"0.77641046",
"0.7518188",
"0.73818344",
"0.7319518",
"0.7319518",
"0.72318393",
"0.72280085",
"0.7218966",
"0.7172303",
"0.71602905",
"0.71520376",
"0.7122838",
"0.70705116",
"0.7035188",
"0.7032948",
"0.69531524",
"0.69531524",
"0.6950831",
"0.69421065",
"0.69... | 0.0 | -1 |
Creates a new class instance. | public static function create(ContainerInterface $container) {
return new static(
$container->get('plugin.manager.menu.link')
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"function createInstance(ClassDefinition $classDefinition);",
"function new_instance($class)\n {\n }",
"public function create(string $class);",
"public function newInstance();... | [
"0.8045186",
"0.7730439",
"0.7575917",
"0.7553807",
"0.7517733",
"0.7517733",
"0.74608153",
"0.74295586",
"0.74137187",
"0.73178077",
"0.71588844",
"0.71373075",
"0.71373075",
"0.7119144",
"0.7119144",
"0.7119144",
"0.7109181",
"0.70463014",
"0.6973363",
"0.69717866",
"0.6945... | 0.0 | -1 |
Keeping query bit more lighweight and stripping of unnecessary fields | private function _getContent() {
$fieldsToLoad = array('id', 'pagetitle', 'longtitle', 'description', 'parent',
'alias', 'pub_date', 'parent', 'introtext', 'content', 'createdby', 'createdon', 'class_key');
$c = $this->xpdo->newQuery('disBoard');
$c->setClassAlias('Board');
$c->distinct();
$c->select(array(
$this->xpdo->getSelectColumns('disBoard', 'Board', 'Board_', $fieldsToLoad),
$this->xpdo->getSelectColumns('disBoard', 'subBoard', 'subBoard_', $fieldsToLoad),
'lastpost_pagetitle' => 'Post.pagetitle',
'lastpost_content' => 'Post.content',
'lastpost_id' => 'Post.id',
'lastpost_author' => 'Post.createdby',
'lastpost_username' => 'User.username',
'lastpost_display_name' => 'Profile.display_name',
'lastpost_use_display_name' => 'Profile.use_display_name',
'lastpost_thread_id' => 'Post.parent',
'lastpost_parent' => 'c.ancestor', // Setting this to Board to show as last post on it
'lastpost_class_key' => 'Post.class_key',
'lastpost_createdon' => 'Post.createdon',
'subPost_pagetitle' => 'subPost.pagetitle',
'subPost_content' => 'subPost.content',
'subPost_id' => 'subPost.id',
'subPost_author' => 'subPost.createdby',
'subPost_username' => 'User2.username',
'subPost_display_name' => 'Profile2.display_name',
'subPost_use_display_name' => 'Profile2.use_display_name',
'subPost_thread_id' => 'subPost.parent',
'subPost_parent' => 'c2.ancestor', // Setting this to Board to show as last subPost on it
'subPost_class_key' => 'subPost.class_key',
'subPost_createdon' => 'subPost.createdon'
));
$c->innerJoin('disClosure', 'c', "{$this->xpdo->escape('c')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')} ");
$c->leftJoin('disBoard', 'subBoard', "{$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')}
AND {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('class_key')} = 'disBoard'");
$cSub = $this->xpdo->newQuery('disPost');
$cSub->setClassAlias('postPrimary');
$cSub->select(array("MAX({$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('id')})"));
$cSub->leftJoin('disClosure', 'c3', "{$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('c3')}.{$this->xpdo->escape('descendant')}");
$cSub->where(array(
"{$this->xpdo->escape('c3')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('Board')}.{$this->xpdo->escape('id')}",
"{$this->xpdo->escape('postPrimary')}.{$this->xpdo->escape('class_key')} = 'disPost'"));
$cSub->prepare();
$c->leftJoin('disPost', 'Post', "{$this->xpdo->escape('Post')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('c')}.{$this->xpdo->escape('descendant')}
AND {$this->xpdo->escape('Post')}.{$this->xpdo->escape('class_key')} = 'disPost'
AND{$this->xpdo->escape('Post')}.{$this->xpdo->escape('id')} = ({$cSub->toSQL()})");
$cSub2 = $this->xpdo->newQuery('disPost');
$cSub2->setClassAlias('postSecondary');
$cSub2->select(array("MAX({$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('id')})"));
$cSub2->leftJoin('disClosure', 'c4', "{$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('c4')}.{$this->xpdo->escape('descendant')}");
$cSub2->where(array(
"{$this->xpdo->escape('c4')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('id')}",
"{$this->xpdo->escape('postSecondary')}.{$this->xpdo->escape('class_key')} = 'disPost'"
));
$cSub2->prepare();
$c->leftJoin('disClosure', 'c2', "{$this->xpdo->escape('c2')}.{$this->xpdo->escape('ancestor')} = {$this->xpdo->escape('subBoard')}.{$this->xpdo->escape('id')} ");
$c->leftJoin('disPost', 'subPost', "{$this->xpdo->escape('subPost')}.{$this->xpdo->escape('parent')} = {$this->xpdo->escape('c2')}.{$this->xpdo->escape('descendant')}
AND {$this->xpdo->escape('subPost')}.{$this->xpdo->escape('class_key')} = 'disPost'
AND subPost.id = ({$cSub2->toSQL()})");
$c->leftJoin('disUser', 'User', "{$this->xpdo->escape('User')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('Post')}.{$this->xpdo->escape('createdby')}");
$c->leftJoin('disUserProfile', 'Profile', "{$this->xpdo->escape('Profile')}.{$this->xpdo->escape('internalKey')} = {$this->xpdo->escape('User')}.{$this->xpdo->escape('id')}");
$c->leftJoin('disUser', 'User2', "{$this->xpdo->escape('User2')}.{$this->xpdo->escape('id')} = {$this->xpdo->escape('subPost')}.{$this->xpdo->escape('createdby')}");
$c->leftJoin('disUserProfile', 'Profile2', "{$this->xpdo->escape('Profile2')}.{$this->xpdo->escape('internalKey')} = {$this->xpdo->escape('User2')}.{$this->xpdo->escape('id')}");
$c->where(array(
'Board.parent' => $this->id,
'Board.published' => 1,
'Board.deleted' => 0,
));
$c->sortby("{$this->xpdo->escape('Board')}.{$this->xpdo->escape('menuindex')}", 'ASC');
$c->prepare();
$rows = self::_loadRows($this->xpdo, 'disCategory', $c);
$rows = $rows->fetchAll(PDO::FETCH_ASSOC);
if (count($rows) == 0) {
return;
}
$hydrated = array();
foreach ($rows as $row) {
$hydrated = $this->xpdo->discuss2->hydrateRow($row, $hydrated);
}
$disCategory = $this->xpdo->newObject('disBoard');
foreach ($hydrated as $k => $board) {
if ($board['class_key'] == 'disBoard') {
$disCategory->id = $board['id'];
$disCategory->_policies = array();
if ($disCategory->checkPolicy('load') !== true) {
unset($hydrated[$k]);
}
}
}
reset($hydrated);
$boards = $this->xpdo->discuss2->createTree($hydrated);
$boards = $this->_treeToView($boards);
$this->xpdo->setPlaceholder('discuss2.content', implode("\n",$boards));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function filterFields();",
"function pre_query() {\n $this->view->field += $this->casetracker_fields;\n unset($this->view->field['cuid']); // this could be more surgical.\n }",
"function get_clean_query() {\n\t$q = gzinflate(base64_decode(strtr($_POST['query_csv'], '-_', '+/')));\n\t\n\t... | [
"0.6370656",
"0.602359",
"0.59116215",
"0.5793583",
"0.57823604",
"0.5693136",
"0.56552315",
"0.5649633",
"0.56182706",
"0.5617679",
"0.5590357",
"0.5575314",
"0.55678827",
"0.5503875",
"0.546336",
"0.54584396",
"0.5451576",
"0.543907",
"0.5434108",
"0.54175216",
"0.541518",
... | 0.0 | -1 |
coalesce PHP analogue of the SQL Coalesce() function | public static function coalesce()
{
foreach ( func_get_args() as $arg )
{
if ( ! is_null($arg) )
{
return $arg;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function coalesce() {\n $args = func_get_args();\n foreach ($args as $arg) {\n if (!empty($arg)) {\n return $arg;\n }\n }\n return $args[0];\n}",
"function coalesce() {\n\tforeach (func_get_args() as $arg) {\n\t\tif (!is_null($arg)) {\n\t\t\treturn $arg;\n\t\t}\n\t}\n\treturn... | [
"0.7806044",
"0.77543956",
"0.73745275",
"0.7299998",
"0.72654265",
"0.7109365",
"0.7058567",
"0.70412886",
"0.69763064",
"0.6945191",
"0.64951587",
"0.64951587",
"0.6367801",
"0.6272312",
"0.6272312",
"0.60627323",
"0.60503703",
"0.5912443",
"0.539057",
"0.5390514",
"0.52836... | 0.7734427 | 2 |
coalesce_empty PHP analogue of the SQL Coalesce() function, but testing using empty() | public static function coalesce_empty()
{
foreach ( func_get_args() as $arg )
{
if ( ! empty($arg) )
{
return $arg;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function emptyCoalesce($data, $default = null)\n {\n return ($data === null || $data === false) ? $default : $data;\n }",
"public function stdWrap_ifEmptyDeterminesEmptyValuesDataProvider() {}",
"function empty2($mixed) {\n return empty($mixed);\n}",
"function empty2null($value)\n{\n retur... | [
"0.6996738",
"0.64395374",
"0.6435617",
"0.6393643",
"0.62302077",
"0.62040013",
"0.62037736",
"0.6141909",
"0.61118096",
"0.6110162",
"0.6109612",
"0.60486203",
"0.5991668",
"0.5989255",
"0.59713304",
"0.5959974",
"0.5952991",
"0.5934893",
"0.59234565",
"0.5915025",
"0.58645... | 0.79544985 | 0 |
Get the next day that isn't a weekend, and increment offset by 1 | function next_day(&$offset)
{
do
{
$offset++;
}
while(
in_array(gmdate('D', gmmktime() + ($offset * 24 * 60 * 60)), array('Sat', 'Sun'))
||
in_array(gmdate('Y-m-d', gmmktime() + ($offset * 24 * 60 * 60)), $GLOBALS['config']['non-work_dates'])
);
return gmdate('Y-m-d', gmmktime() + ($offset * 24 * 60 * 60));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function next_weekday($weekday) {\n global $week_names;\n $date = new DateTime();\n $i = (int)$date->format(\"w\"); // 0=Sunday\n $j = array_search($weekday, $week_names); // 0=Monday\n $diff = (($j+1) - $i + 7); // days til next $weekday [0..6]\n $diff = ($diff+6)%7+1; // days til next $weekday [1..7]\n $d... | [
"0.7612667",
"0.68836385",
"0.678421",
"0.6588184",
"0.65747416",
"0.64728457",
"0.64715475",
"0.64234346",
"0.6367625",
"0.622929",
"0.6223433",
"0.62195903",
"0.6195394",
"0.61399776",
"0.6133045",
"0.6100721",
"0.60137105",
"0.5990598",
"0.5947617",
"0.5930861",
"0.5915248... | 0.80644 | 0 |
Create a new command instance. | public function __construct($asamblea_id)
{
parent::__construct();
$this->asamblea_id = $asamblea_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"pu... | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315... | 0.0 | -1 |
Alert For Some Unappropriate articles Very important feature..... | public function alert($prop_id, $prop_title){
// PropertyModel
$prop_model = model('PropertyModel');
// User Model
$user_model = model('UserModel');
// Session
$session = session();
// Check is user logged in
if(!$session->get('logged_in')) return redirect()->to(site_url('user'));
// Get Current Article
$current_article = $prop_model->ret_article($prop_id, $prop_title);
# Render #
return view("alert", [
'header' => view("admin/header"),
'footer' => view("admin/footer"),
'navigation' => view("navigation", [
'active_item' => 'home'
]),
'current_article' => $current_article[0],
'user_navigation' => view("user_navigation"),
'userdata' => $session->get('logged_data'),
'article' => $current_article,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Article $article)\n {\n return 'cetet page n\\existe pas';\n }",
"public function verifArticle(){//Fonction qui s'active après qu'il y ait eu Validation\n\n //mettre les $_POST en variable.\n if (isset($_POST['nom_article'])&& !empty($_POST['nom_article'])&& isset($_POST['th... | [
"0.5907941",
"0.5873155",
"0.5843601",
"0.5801825",
"0.5747831",
"0.5707108",
"0.5694442",
"0.56772107",
"0.56337357",
"0.56204605",
"0.5557034",
"0.5552519",
"0.5549941",
"0.5540343",
"0.55329305",
"0.55115813",
"0.5503798",
"0.54987514",
"0.5481074",
"0.5477375",
"0.5469423... | 0.0 | -1 |
Run the database seeds. | public function run()
{
$unidades = [
['H87', 'Pieza', 'Múltiplos/Fracciones/Decimales'],
['E48', 'Unidad de servicio', 'Unidades específicas de la industria (varias)'],
['EA', 'Elemento', 'Unidades de venta'],
['KGM', 'Kilogramo', 'Mecánica'],
];
foreach($unidades as $unidad){
UnidadDeMedida::create([
'clave' => $unidad[0],
'nombre' => $unidad[1],
'tipo' => $unidad[2],
'creado_por' => 0,
'actualizado_por' => 0
]);
}
} | {
"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 |
Run the database seeds. | public function run()
{
if(env('APP_ENV') != 'production') {
DB::table('aulas')->truncate();
$aulas = factory(\App\Aula::class, 20)->create();
}
} | {
"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 |
User name for DB connect | public function __construct(){
$user = 'root';
// User password for DB connect
$pass = 'root';
// Data for connect to DB
$dsn = 'mysql:dbname=colnect;host=localhost;port=8889;charset=utf8;';
try {
// Call class PDO for connection to DB
MySQL::$db = new \PDO(
$dsn,
$user,
$pass
);
} // try
catch(\PDOException $ex){
echo "Connection error.\n Info: $ex->getMessage()";
} // catch
// Connecting the folder with templates for twig
$this->loader = new Twig_Loader_Filesystem('./App/Templates');
$this->twig = new Twig_Environment($this->loader);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDbUsername(): string\n {\n return (string) Config::get('DB_USERNAME');\n }",
"public function getDatabaseUsername()\n {\n return $this->settings['db_username'];\n }",
"function get_database_user()\n\t{\n\t\treturn ($this -> database_user);\n\t}",
"protected functi... | [
"0.7437743",
"0.74318403",
"0.68889153",
"0.6870653",
"0.67985123",
"0.6521536",
"0.6501483",
"0.648917",
"0.6470702",
"0.6468964",
"0.646254",
"0.64451224",
"0.64451224",
"0.64451224",
"0.64131117",
"0.63837284",
"0.6376278",
"0.63732",
"0.63296354",
"0.63296354",
"0.6317948... | 0.0 | -1 |
Run the database seeds. | public function run()
{
for ($memberCount = 1; $memberCount <= 3; $memberCount++) {
$members = App\User::inRandomOrder()->take($memberCount * 15)->get()->toArray();
factory(App\Team::class, 15)->create(['max_size'=>$memberCount])->each(function (App\Team $u) use (&$members, $memberCount) {
for ($member = 0; $member < $memberCount; $member++) {
$member_object = array_pop($members);
$u->teamMembers()->create(['user_id' => $member_object['id']]);
if ($member == 0) {
$u->leader_user_id = $member_object['id'];
}
}
});
}
} | {
"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 |
Attempt to decode the incoming RAW post data from JSON. | function decodificarJSON($content)
{
$arrayObjetos = json_decode($content, true);
//If json_decode failed, the JSON is invalid.
if(!is_array($arrayObjetos))
{
throw new Exception('Received content contained invalid JSON!');
}
return $arrayObjetos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function retrieveJsonPostData()\n {\n $rawData = file_get_contents(\"php://input\");\n // this returns null if not valid json\n return json_decode($rawData);\n }",
"public static function decodeJSON()\n {\n $body = file_get_contents('php://input');\n $object = ... | [
"0.7149263",
"0.68835807",
"0.6729324",
"0.66388774",
"0.6582044",
"0.6524215",
"0.6516565",
"0.63638896",
"0.6350524",
"0.6350524",
"0.6350524",
"0.6350524",
"0.6350524",
"0.63103044",
"0.6293077",
"0.62666774",
"0.62552595",
"0.6244853",
"0.6139509",
"0.61326444",
"0.609216... | 0.0 | -1 |
this up() migration is autogenerated, please modify it to your needs | public function up(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE historico_ticket (id INT AUTO_INCREMENT NOT NULL, ticket_id INT NOT NULL, cliente_id INT NOT NULL, empleado_id INT NOT NULL, grupo_id INT NOT NULL, estado_id INT NOT NULL, fecha DATETIME NOT NULL, asunto VARCHAR(255) NOT NULL, mensaje LONGTEXT NOT NULL, respuesta LONGTEXT NOT NULL, INDEX IDX_30462644700047D2 (ticket_id), INDEX IDX_30462644DE734E51 (cliente_id), INDEX IDX_30462644952BE730 (empleado_id), INDEX IDX_304626449C833003 (grupo_id), INDEX IDX_304626449F5A440B (estado_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644DE734E51 FOREIGN KEY (cliente_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_30462644952BE730 FOREIGN KEY (empleado_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_304626449C833003 FOREIGN KEY (grupo_id) REFERENCES `group` (id)');
$this->addSql('ALTER TABLE historico_ticket ADD CONSTRAINT FK_304626449F5A440B FOREIGN KEY (estado_id) REFERENCES estado (id)');
$this->addSql('ALTER TABLE `group` DROP historico_ticket_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function up();",
"abstract public function up();",
"abstract public function up();",
"abstract public function up();",
"public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE... | [
"0.80072445",
"0.7915632",
"0.7915632",
"0.7915632",
"0.75720376",
"0.7561417",
"0.75285745",
"0.7499062",
"0.7494408",
"0.7454009",
"0.7446965",
"0.74338573",
"0.74321055",
"0.7427382",
"0.74184984",
"0.7378431",
"0.73753154",
"0.73706865",
"0.73640925",
"0.7351718",
"0.7329... | 0.0 | -1 |
this down() migration is autogenerated, please modify it to your needs | public function down(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE historico_ticket');
$this->addSql('ALTER TABLE `group` ADD historico_ticket_id INT NOT NULL');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function down()\n {\n //add your migration here \n }",
"public function down()\n {\n //add your migration here\n }",
"public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'... | [
"0.7950277",
"0.78636813",
"0.76065636",
"0.7493955",
"0.7320625",
"0.7245268",
"0.7187498",
"0.71543235",
"0.715298",
"0.7141911",
"0.7135835",
"0.71214414",
"0.71154845",
"0.71057886",
"0.7098064",
"0.70800334",
"0.7078775",
"0.70729095",
"0.7068331",
"0.7066272",
"0.705336... | 0.0 | -1 |
Get the registered name of the component. | protected static function getFacadeAccessor()
{
return 'ees.elastic';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getComponentName()\n {\n return $this->_componentName;\n }",
"public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $compone... | [
"0.8145252",
"0.81059104",
"0.79843503",
"0.7875069",
"0.7621859",
"0.71461004",
"0.7101458",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.705496",
"0.70394325",
"0.70209575",
"0.69877225",
"0.69877225",
"0.69877225",
"0.6984164",
"0.6965933",
... | 0.0 | -1 |
Run the database seeds. | public function run()
{
$voices=Voice::Where('language',$language)->get(['ssml_gender','name','natural_sample_rate_hertz']);
foreach($voices as $voice){
$ssml_gender=strtok($voice, ' ');
$voiceCode= substr($voice, strpos($voice, " ") + 1);
$languageCode2=substr($voiceCode, 0, strpos($voiceCode, '-', strpos($voiceCode, '-')+1));
if($languageCode1==$languageCode2){
$languageVoice=LanguageVoice::create([
'language_id' => $newLanguage->id,
'name' => $voiceCode,
'ssml_gender' =>$ssml_gender ,
'natural_sample_rate_hertz' => $voice->natural_sample_rate_hertz,
]);
}
}
} | {
"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 |
===[ Pagesetter interface ]============================================== | function active()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPage(Page $page);",
"public function set_page($page);",
"protected function setupPage() {}",
"public function setPage($page){\n $this->page=$page;\n }",
"public function setPageID(){/*ACTUALLY NOT DEFINED*/}",
"public function setPage($value)\n {\n return $this->set('Page... | [
"0.775415",
"0.7512885",
"0.7330351",
"0.71276003",
"0.7106843",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"0.69891834",
"... | 0.0 | -1 |
Dirty way to get field name | function OnPrePublicationCreated($args)
{
$tmp = explode(":", $this->name);
$fname = $tmp[2];
$this->parseTypeData();
foreach ($args['pubInfo']['fields'] as $field) {
if ($field['id'] === $this->fid){
$mkinfo = pagesetter_mymap_decode($args['pubData'][$field['name']]);
if (isset($mkinfo['lat'])) {
$coords = array('lat' => $mkinfo['lat'],'lng' => $mkinfo['lng']);
} else {
$marker = pnModAPIFunc('MyMap','user','getMarkers',array('id' => $mkinfo['mkid']));
$coords = array(
'lat' => $marker[0]['lat'],
'lng' => $marker[0]['lng']);
}
$info = pagesetter_mymap_reverse($coords, $this->infoType);
$args['pubData'][$fname] = $info;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function getFieldName() {}",
"public function getFieldName() {\n return $this->fieldName;\n }",
"public function getDbFieldName($field_name);",
"public function getFieldName($field) {\n return $field['name'];\n }",
"public function getFieldName()\... | [
"0.91779",
"0.868267",
"0.8209913",
"0.82087165",
"0.8192724",
"0.81904155",
"0.81904155",
"0.81904155",
"0.818789",
"0.81417066",
"0.7969671",
"0.792807",
"0.7921345",
"0.789533",
"0.7858285",
"0.78532594",
"0.78172356",
"0.7812157",
"0.75323755",
"0.7526021",
"0.75194454",
... | 0.0 | -1 |
/ Checkbox image opmaken | function CheckoxImage($value)
{
$ckecked = "checkbox_checked.gif";
$unckeched = "checkbox_unchecked.gif";
if ( $value == 0 )
{
return "<img src=\"images/".$unckeched."\" width=\"16\" height=\"16\" border=\"0\">";
}
else
{
return "<img src=\"images/".$ckecked."\" width=\"16\" height=\"16\" border=\"0\">";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function surgeon_save_checkbox_image_field($data, $i) {\n $addon_option_image = $_POST['product_addon_option_image'][$i];\n for ( $ii = 0; $ii < sizeof( $data['options'] ); $ii++ ) {\n $image = sanitize_text_field( stripslashes( $addon_option_image[ $ii ] ) );\n $data['options'][$ii]['image'... | [
"0.6598669",
"0.6596252",
"0.6528963",
"0.65153515",
"0.63958496",
"0.6358763",
"0.6354054",
"0.6294119",
"0.62889445",
"0.61716133",
"0.6163863",
"0.60828614",
"0.6028327",
"0.6000511",
"0.59055394",
"0.5900837",
"0.58353907",
"0.5830131",
"0.5828242",
"0.58257085",
"0.57927... | 0.73031205 | 0 |
kijken of de user is ingelogd. | function LoginCheck()
{
if (isset($_SESSION['LoginCheck']) && $_SESSION['LoginCheck'] == 1 )
{
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ingelogd() {\n\t\t\treturn $this->bLoggedIn;\n\t\t}",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"public function documentcheck() {\n $user = User::load(\\Drupal::currentUser()->id());\n bhge_user_registration_user_login($user);... | [
"0.6956884",
"0.6604249",
"0.6499653",
"0.64937097",
"0.6480486",
"0.64564633",
"0.64526325",
"0.64526325",
"0.64421487",
"0.6428092",
"0.639187",
"0.63469726",
"0.63437545",
"0.63436896",
"0.63381386",
"0.62929106",
"0.6264437",
"0.62553537",
"0.6235065",
"0.6224071",
"0.620... | 0.0 | -1 |
Construct function, load user, tree, action auto. | public function __construct()
{
parent::__construct();
$this->session->set('docFrom', 'doc');
$this->libs = $this->doc->getLibPairs();
$this->loadModel('user');
$this->loadModel('tree');
$this->loadModel('action');
$this->loadModel('project', 'proj');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct () {\n\t\t\n\t\t$this->conf = config::get();\n\t\t\n\t\t$this->getParams();\n\t\t$this->initTemplate();\n\t\t\n\t\t# Create user object and log result if any\n\t\t$this->user = new user();\n\t\tif ($this->action == 'user') {\n\t\t\t$ret = $this->user->run($this->actionMethod);\n\t\t\tlo... | [
"0.5636954",
"0.55494684",
"0.5490253",
"0.54815555",
"0.5401781",
"0.5395869",
"0.53925383",
"0.53900063",
"0.5333937",
"0.53282505",
"0.5321683",
"0.5299704",
"0.5282949",
"0.52812797",
"0.52801013",
"0.5276443",
"0.5247643",
"0.5246771",
"0.5240767",
"0.5230425",
"0.522236... | 0.0 | -1 |
Go to browse page. | public function index()
{
$this->doc->setMainMenu();
$projects = $this->doc->getLimitLibs('project', '9');
$customLibs = $this->doc->getLimitLibs('custom', '9');
$subLibs = $this->doc->getSubLibGroups(array_keys($projects));
$this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;
$this->view->projects = $projects;
$this->view->customLibs = $customLibs;
$this->view->subLibs = $subLibs;
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n $this->locate(inlink('browse'));\n }",
"public function index()\n {\n $this->locate(inlink('browse'));\n }",
"public function index()\n { \n $this->locate(inlink('browse'));\n }",
"public function browse() {\n\n\t}",
"public function br... | [
"0.75257325",
"0.75257325",
"0.74997085",
"0.7149494",
"0.69553435",
"0.6946902",
"0.6825591",
"0.6692888",
"0.6443369",
"0.6431612",
"0.64211005",
"0.6336887",
"0.6127397",
"0.6080071",
"0.607097",
"0.6005378",
"0.59615505",
"0.58307827",
"0.58027107",
"0.5797956",
"0.578450... | 0.0 | -1 |
Show libs for project. | public function projectLibs($projectID)
{
$this->doc->setMainMenu();
$project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
$this->view->title = $project->name;
$this->view->project = $project;
$this->view->libs = $this->doc->getLibsByProject($projectID);
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function includeLibs()\n {\n $string = '';\n\n if($this->css_files)\n {\n foreach( $this->css_files as &$css_file )\n {\n $string .= '<link rel=\"stylesheet\" href=\"' . $css_file . '\" type=\"text/css\" />';\... | [
"0.60208815",
"0.5907887",
"0.56242406",
"0.5551945",
"0.552166",
"0.54081833",
"0.53306717",
"0.5310104",
"0.52883095",
"0.52828646",
"0.52627695",
"0.5251477",
"0.5222435",
"0.5171557",
"0.5169163",
"0.5168592",
"0.5087217",
"0.50619435",
"0.5047678",
"0.50367916",
"0.50146... | 0.6026059 | 0 |
Show files for project. | public function showFiles($projectID, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->doc->setMainMenu();
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('docList', $uri);
$project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->title = $project->name;
$this->view->project = $project;
$this->view->files = $this->doc->getLibFiles($projectID, $pager);
$this->view->pager = $pager;
$this->display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n\n $this->types->trackFilter();\n\n return view('site::file.index', [\n 'repository' => $this->files,\n 'items' => $this->files->paginate(config('site.per_page.file', 10), ['files.*'])\n ]);\n }",
"public function show()\n {\n ... | [
"0.690084",
"0.6798628",
"0.66780096",
"0.6556828",
"0.6529496",
"0.64509404",
"0.6388526",
"0.63789344",
"0.6368741",
"0.631704",
"0.6311938",
"0.62367433",
"0.62305564",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
"0.6224735",
... | 0.6256061 | 11 |
Run the database seeds. | public function run()
{
Ayar::create(['name' => 'baslik', 'value' => 'Yazılım Dünyası']);
Ayar::create(['name' => 'author', 'value' => 'Ahmet TORPİL']);
Ayar::create(['name' => 'aciklama', 'value' => 'Az kod Çok iş..']);
Ayar::create(['name' => 'keywords', 'value' => 'yazlılım, php, java']);
Ayar::create(['name' => 'facebook', 'value' => 'https://www.facebook.com/ahmet.torpil.3']);
Ayar::create(['name' => 'twitter', 'value' => 'https://www.twitter.com/torpilahmet']);
Ayar::create(['name' => 'github', 'value' => 'https://www.github.com/torpilahmet']);
} | {
"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 |
A visual identifier that represents this user. | public function getUsername(): string
{
return (string) $this->email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserVisibleName() {\n\t\t\treturn $this->getUID();\n\t\t}",
"public function getName()\n {\n return self::USER_ID;\n }",
"public function getVisualId()\n {\n return $this->getId();\n }",
"public function getId() {\n\t\treturn SYS_USERNAME;\n\t}",
"public functio... | [
"0.69463336",
"0.68791765",
"0.6734728",
"0.6636532",
"0.65999246",
"0.6594324",
"0.6588144",
"0.6577275",
"0.6567396",
"0.6563488",
"0.6538281",
"0.6509249",
"0.650821",
"0.64903057",
"0.64898163",
"0.6444243",
"0.642105",
"0.64198184",
"0.64189166",
"0.6388467",
"0.6387211"... | 0.0 | -1 |
Ensures handler is responsible for this $object type | protected function isExpectedObject($object)
{
return $object instanceof Page;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function isHandler($object): bool;",
"public function handledClass();",
"protected function get_object_type()\n {\n }",
"public function handle($obj)\n {\n\n }",
"abstract protected function handle();",
"public function handlesObject(object $object, ?string $statusName =... | [
"0.6535716",
"0.64086235",
"0.638438",
"0.63834167",
"0.59654367",
"0.5922701",
"0.5818496",
"0.574152",
"0.57183313",
"0.57183313",
"0.55841714",
"0.55027235",
"0.54724306",
"0.5465892",
"0.54625785",
"0.54527295",
"0.54465985",
"0.5443516",
"0.54137474",
"0.5413743",
"0.541... | 0.0 | -1 |
Removes the routing cache each time there is a change in page so that the new routes get cached | public function clearRouteCache()
{
$isSuccess = $this->removeRoutingCache();
$this->addRemoveNotification($isSuccess);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function clearRouteCache() { \n self::$_cache = [];\n }",
"protected function clearRewriteCache()\n {\n $cache = (int) Shopware()->Config()->routerCache;\n $cache = $cache < 360 ? 86400 : $cache;\n\n $sql = \"SELECT `id` FROM `s_core_config_elements` WHERE `name` L... | [
"0.79029155",
"0.69259477",
"0.6717992",
"0.6717992",
"0.6548481",
"0.6507365",
"0.65009224",
"0.64128596",
"0.6369026",
"0.63547254",
"0.63236314",
"0.63236314",
"0.62545705",
"0.62499845",
"0.62346107",
"0.62163705",
"0.62129873",
"0.62043697",
"0.61919767",
"0.6161796",
"0... | 0.7894451 | 1 |
Adds flash message to request bag | protected function addRemoveNotification($isSuccess)
{
/** @var FlashBag $flashBag */
$flashBag = $this->request->getSession()->getFlashBag();
if ($isSuccess) {
return $flashBag->add(
"success",
"Routing cache was removed successfully."
);
}
return $flashBag->add(
"error",
"Error occurred while removing routing cache."
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addFlashMessages() {}",
"protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}",
"public function getFlashBag();",
"public function flashAction(Request $request){\n $session = $request->getSession();\n $session->getFlashbag(... | [
"0.7813819",
"0.75208616",
"0.72758305",
"0.7113392",
"0.7032096",
"0.70204556",
"0.68060786",
"0.6765197",
"0.675048",
"0.67157406",
"0.6712126",
"0.669395",
"0.66656977",
"0.6662019",
"0.6631557",
"0.6602355",
"0.65978765",
"0.6554176",
"0.649974",
"0.6499506",
"0.6499506",... | 0.0 | -1 |
Initializes internal state of Base\TblProdInfo object. | public function __construct()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }",
"public f... | [
"0.68105006",
"0.651888",
"0.6446361",
"0.620798",
"0.6200149",
"0.619444",
"0.61800057",
"0.61496913",
"0.6143833",
"0.61148447",
"0.6112663",
"0.6097498",
"0.6095022",
"0.6072521",
"0.6048642",
"0.6027924",
"0.5995149",
"0.5994371",
"0.5961943",
"0.59225196",
"0.59165114",
... | 0.0 | -1 |
Returns whether the object has been modified. | public function isModified()
{
return !!$this->modifiedColumns;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\treturn $this->_Modified;\n\t}",
"function isModified() {\n\t\t$modified = $this->_Modified;\... | [
"0.83879375",
"0.83879375",
"0.83879375",
"0.83879375",
"0.83082765",
"0.83082765",
"0.82983106",
"0.8264392",
"0.8264392",
"0.8264392",
"0.82167906",
"0.8185849",
"0.8185849",
"0.8012204",
"0.8002042",
"0.7990688",
"0.7959424",
"0.78494513",
"0.7748471",
"0.76909226",
"0.766... | 0.77422196 | 30 |
Has specified column been modified? | public function isColumnModified($col)
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n return !!$this->modifiedColumns;\n }",
"public function isModified()\n {\n ... | [
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.7803793",
"0.76689327",
"0.74715585",
"0.6770546",
"0.665858",
"0.6598173",
"0.65959066",
"0.65959066",
"0.658281",
"0.6565356",
... | 0.8052138 | 9 |
Get the columns that have been modified in this object. | public function getModifiedColumns()
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getColumns()\r\n\t{\r\n\t\tif($this->dirty) {\r\n\t\t\t$this->setColumns();\r\n\t\t\t$this->dirty = false;\r\n\t\t}\r\n\r\n\t\treturn $this->columns;\r\n\t}",
"public function getColumns() {\n return $this->columns;\n }",
"public function getColumns() {\n\t\treturn( $this->getTable()-... | [
"0.7925953",
"0.75937617",
"0.7570396",
"0.75701535",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7569227",
"0.7503249",
"0.74628466",
"0.7447904",
"0.7441013",
"0.7441013",
"0.74355763",... | 0.8734276 | 11 |
Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved. | public function isNew()
{
return $this->new;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"public function isPersisted() {}",
"public function isPersisted();",
"public function... | [
"0.81485754",
"0.79410106",
"0.7855305",
"0.7850718",
"0.7850718",
"0.7850718",
"0.7827253",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.75811595",
"0.7467159",
"0.73795795",
"0.72870225",
"0... | 0.0 | -1 |
Setter for the isNew attribute. This method will be called by Propelgenerated children and objects. | public function setNew($b)
{
$this->new = (boolean) $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isNew() {\n return $this->_is_new;\n }",
"public function isNew() {\n return $this->isNew;\n }",
"public function getIsNew()\n {\n return $this->_isNew;\n }",
"public function isNew() {\r\n\t\treturn $this->isNew;\r\n\t}",
"public function isNew()\n {\n ... | [
"0.79710007",
"0.7835108",
"0.7832491",
"0.78101975",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.7809465",
"0.78018904",
"0.7751557",
"0.7751402",
"0.76770586",... | 0.6408553 | 65 |
Whether this object has been deleted. | public function isDeleted()
{
return $this->deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isDeleted() {\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted()\n\t{\n\t\treturn $this->deleted;\n\t}",
"public function isDeleted()\n\t {\t\n\t\tif($this->deleted){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t }",
"public function isDeleted() {\n $result = $this->... | [
"0.8562077",
"0.85489553",
"0.847859",
"0.841372",
"0.83469534",
"0.8306214",
"0.8253008",
"0.8204199",
"0.8199161",
"0.8129381",
"0.8055836",
"0.8054757",
"0.79842097",
"0.7902642",
"0.7902642",
"0.7884733",
"0.78280705",
"0.78280705",
"0.78085715",
"0.78014433",
"0.7751264"... | 0.85768765 | 13 |
Specify whether this object has been deleted. | public function setDeleted($b)
{
$this->deleted = (boolean) $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
"public function isDeleted()\n {\n return $this->deleted;\n }",
... | [
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7958723",
"0.7906329",
"0.790587",
"0.7845915",
"0.7823076",
"0.7796806",
"0.7796806",
"0.7724928",
"0... | 0.0 | -1 |
Sets the modified state for the object to be false. | public function resetModified($col = null)
{
if (null !== $col) {
if (isset($this->modifiedColumns[$col])) {
unset($this->modifiedColumns[$col]);
}
} else {
$this->modifiedColumns = array();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setUnmodified()\n {\n\t$this->modified= false;\n }",
"protected function resetCleanState()\n {\n $this->isModified = false;\n }",
"public function resetBooleans()\n {\n $this->setShowSize(false);\n $this->setShowDescription(false);\n $this->setShowExtension(f... | [
"0.79724675",
"0.6914967",
"0.681861",
"0.6604693",
"0.6559294",
"0.6538363",
"0.6529017",
"0.6525662",
"0.65205616",
"0.65205616",
"0.6460042",
"0.64104676",
"0.6399038",
"0.6397247",
"0.6286152",
"0.6149016",
"0.6117093",
"0.61135846",
"0.6074225",
"0.6031991",
"0.60030097"... | 0.0 | -1 |
Compares this with another TblProdInfo instance. If obj is an instance of TblProdInfo, delegates to equals(TblProdInfo). Otherwise, returns false. | public function equals($obj)
{
if (!$obj instanceof static) {
return false;
}
if ($this === $obj) {
return true;
}
if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
return false;
}
return $this->getPrimaryKey() === $obj->getPrimaryKey();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function equals($obj): bool;",
"public function equals(TechDivision_Lang_Object $obj)\r\n\t{\r\n\t\tif ($obj === $this) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\r\n\t}",
"public function equals($obj)\r\n {\r\n return $this == $obj;\r\n }",
"public function equals($other... | [
"0.5974638",
"0.58890516",
"0.5838681",
"0.53373724",
"0.5244692",
"0.51087123",
"0.5049009",
"0.5047194",
"0.5045512",
"0.49910748",
"0.4970721",
"0.49246427",
"0.48588404",
"0.48126227",
"0.47819924",
"0.47780332",
"0.47546092",
"0.47462583",
"0.47450653",
"0.47381195",
"0.... | 0.56141466 | 13 |
Get the associative array of the virtual columns in this object | public function getVirtualColumns()
{
return $this->virtualColumns;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\tif ($column != \"\")\n\t\t\t\t$columns[$column]... | [
"0.76158535",
"0.7158348",
"0.70720017",
"0.69968843",
"0.6985094",
"0.6938954",
"0.69297487",
"0.6901429",
"0.6901429",
"0.6895026",
"0.683313",
"0.6832541",
"0.67884564",
"0.67727613",
"0.6764035",
"0.6741913",
"0.6737029",
"0.67210835",
"0.671678",
"0.67081195",
"0.669189"... | 0.83912134 | 10 |
Checks the existence of a virtual column in this object | public function hasVirtualColumn($name)
{
return array_key_exists($name, $this->virtualColumns);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function columnExists(Property $property);",
"public function hasColumn($columnName)\r\n {\r\n }",
"public function hasColumn($name);",
"public function exists()\n {\n return ! is_null($this->first([Grammar::VIRTUAL_META_ID_COLUMN]));\n }",
"function has_column($column_nam... | [
"0.72912693",
"0.7069401",
"0.6898071",
"0.68416446",
"0.6824293",
"0.676904",
"0.6740452",
"0.6668266",
"0.6536544",
"0.65023524",
"0.64584386",
"0.6379843",
"0.63561594",
"0.6336987",
"0.6330798",
"0.63250196",
"0.63250196",
"0.6201744",
"0.61848426",
"0.61798006",
"0.61741... | 0.75793344 | 10 |
Get the value of a virtual column in this object | public function getVirtualColumn($name)
{
if (!$this->hasVirtualColumn($name)) {
throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
}
return $this->virtualColumns[$name];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModelValue()\n {\n if (! is_callable($callback = $this->getCallback())) {\n throw new Exception('Invalid custom column callback');\n }\n\n return call_user_func($callback, $this->getModel());\n }",
"protected function get_column() {\n\n\t\t$column = $this... | [
"0.70321596",
"0.6991185",
"0.69045335",
"0.6838851",
"0.6789454",
"0.67638856",
"0.67497355",
"0.6722602",
"0.6671526",
"0.6625604",
"0.6570242",
"0.6570242",
"0.6563344",
"0.651202",
"0.651202",
"0.6470058",
"0.6417256",
"0.63867766",
"0.63725686",
"0.6354128",
"0.6346862",... | 0.65017635 | 25 |
Set the value of a virtual column in this object | public function setVirtualColumn($name, $value)
{
$this->virtualColumns[$name] = $value;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set($column,$value);",
"public function setViaTableAttributesValue($value);",
"public function __set( $name, $value ) {\n\t\tif( $this->getTable()->hasColumn( $name ) ) {\n\t\t\t$this->_updateBuffer[ $name ] = $value;\n\t\t}\n\t}",
"public function __set($name, $value)\n\t{\n \t\tif ($this->c... | [
"0.66085964",
"0.6299626",
"0.6004378",
"0.5985626",
"0.5895093",
"0.58565485",
"0.58516127",
"0.5834983",
"0.57772404",
"0.5694158",
"0.56827945",
"0.5680758",
"0.5672021",
"0.56634164",
"0.5648054",
"0.5630224",
"0.5629798",
"0.5603019",
"0.55679774",
"0.5558206",
"0.554440... | 0.6603297 | 11 |
Logs a message using Propel::log(). | protected function log($msg, $priority = Propel::LOG_INFO)
{
return Propel::log(get_class($this) . ': ' . $msg, $priority);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function log( $message );",
"abstract protected function log(LogMessage $message);",
"public function log($message) {\n }",
"public function log($message) {\n }",
"public function log($message) {\n }",
"protected function _log($message)\n {\n $this->_log->save(get_class... | [
"0.667082",
"0.654459",
"0.65067875",
"0.65067875",
"0.65067875",
"0.6447468",
"0.62092775",
"0.615258",
"0.612445",
"0.6118253",
"0.6080866",
"0.60773015",
"0.60421455",
"0.6007046",
"0.6004927",
"0.5998537",
"0.59630483",
"0.59242696",
"0.5907607",
"0.5906802",
"0.589693",
... | 0.5452701 | 78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.