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
Bootstrap any application services.
public function boot() { Paginator::useBootstrap(); view()->composer("*", function($view){ $acc_id=Auth::guard('customer')->id(); if(!Auth::guard('customer')->check()){ $tt=0; }else{ $ttq = Cart::where('customer_id',$acc_id)->get(); $tt=0; foreach($ttq as $key => $item){ $tt += $item['quantity']; } } $count = Favorite::where('customer_id',$acc_id)->count(); $view->with(compact('tt','count')); }); }
{ "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
sg_map_meta_cap function to add Meta Capability Handling.
public function sg_map_meta_cap( $caps, $cap, $user_id, $args ) { $capability_type = 'small_group'; if ( 'edit_' . $capability_type == $cap || 'delete_' . $capability_type == $cap || 'read_' . $capability_type == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array( ); } /* If editing a help note, assign the required capability. */ if ( "edit_{$capability_type}" == $cap ) { if( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a help note, assign the required capability. */ elseif( "delete_{$capability_type}" == $cap ) { if( isset( $post->post_author ) && $user_id == $post->post_author && isset( $post_type->cap->delete_posts ) ) $caps[] = $post_type->cap->delete_posts; elseif ( isset( $post_type->cap->delete_others_posts ) ) $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private help note, assign the required capability. */ elseif( "read_{$capability_type}" == $cap ) { if( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMapMetaCap($metaCap = true){\n\t\t$this->mapMetaCap = $metaCap;\n\t}", "function map_meta_cap($cap, $user_id, ...$args)\n {\n }", "function erp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {\n return apply_filters( 'erp_map_meta_caps', $caps, $cap, $use...
[ "0.7113233", "0.68950325", "0.68331647", "0.6664682", "0.6118787", "0.6091864", "0.5811714", "0.58066976", "0.5763529", "0.56482375", "0.56384635", "0.55844116", "0.5581189", "0.55544406", "0.55460584", "0.5411758", "0.5384209", "0.5345685", "0.51998556", "0.5140477", "0.5113...
0.7116632
0
Run the database seeds.
public function run() { // obtenemos los roles... $role_administrador = Role::where('nombre', 'Administrador')->first(); $role_recepcionista = Role::where('nombre','Recepcionista')->first(); $role_medico = Role::where('nombre', 'Médico')->first(); /* // creamos 10 recepcionistas factory(User::class, 10) ->create() ->each(function ($u) use ($role_recepcionista) { $u->role()->associate($role_recepcionista); $u->save(); }); */ // me creo como administrador User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => 'marianod93@gmail.com', 'telefono' => '2901-606964', 'role_id' => $role_administrador->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); // por si acaso... User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => 'marcesdan@gmail.com', 'telefono' => '2901-606964', 'role_id' => $role_administrador->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); // y como recepcionista User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => 'marianodeush@hotmail.com', 'telefono' => '2901-606964', 'role_id' => $role_recepcionista->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); }
{ "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
Creates a demand object from settings
public function createFromSettings(array $settings) { /** @var ReservationDemand $demand */ $demand = $this->objectManager->get(static::DEMAND_CLASS); if ($demand instanceof PeriodAwareDemandInterface) { $this->setPeriodConstraints($demand, $settings); } $this->applySettings($demand, $settings); return $demand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createDemandFromSettings ($settings) {\n\t\t/** @var PlaceDemand $demand */\n\t\t$demand = $this->objectManager->get('DWenzel\\\\Ajaxmap\\\\Domain\\\\Model\\\\Dto\\\\PlaceDemand');\n\t\tif (isset($settings['orderBy']) && isset($settings['orderDirection'])) {\n\t\t\t$demand->setOrder($settings['orde...
[ "0.7201751", "0.7110685", "0.6074803", "0.5508471", "0.53642505", "0.535256", "0.535256", "0.535256", "0.5309225", "0.5165147", "0.5156386", "0.5149077", "0.5134196", "0.5104301", "0.5065539", "0.50389946", "0.50341195", "0.502032", "0.49730998", "0.49667892", "0.4958916", ...
0.714715
1
TODO: Implement deleteStatement() method.
public function deleteStatement() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function getDeleteStatement();", "public function walkDeleteStatement(AST\\DeleteStatement $deleteStatement): void;", "public function testDeleteStmt()\n {\n $delete = $this->getConnection()\n ->delete()\n ('dummy_posts')\n ('blog_id = :id');\n ...
[ "0.8400239", "0.70125234", "0.6945524", "0.6887968", "0.6805836", "0.67936546", "0.6769431", "0.67364323", "0.66977626", "0.66763014", "0.6607683", "0.6605072", "0.65323144", "0.65315753", "0.64970666", "0.6473081", "0.64414334", "0.6420754", "0.64002836", "0.63570464", "0.63...
0.8804365
0
Set passcode and secret while initialization
public function __construct($settings) { if (empty($settings)) { throw new \Exception("Empty webmoney merchant settings data"); } if (empty($settings['merchant_code'])) { throw new \Exception("merchant_code of WMService is empty"); } if (empty($settings['passcode'])) { throw new \Exception("Passcode of WMService is empty"); } if (empty($settings['secret_key'])) { throw new \Exception("Secret key of WMService is empty"); } $this->passcode = $settings['passcode']; $this->merchant_code = $settings['merchant_code']; $this->secret_key = $settings['secret_key']; $this->production_mode = !empty($settings['production_mode']); $this->is_local_test = !empty($settings['is_local_test']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "function set_pass($pass)\n\t{\n\t\t$this->pass =$pass;\n\t}", "p...
[ "0.6567301", "0.6506423", "0.6473258", "0.6420782", "0.6351151", "0.6351151", "0.6325709", "0.62705135", "0.62335616", "0.61936057", "0.61847633", "0.6176646", "0.61755073", "0.607649", "0.6067332", "0.6032113", "0.6031188", "0.60241413", "0.60241413", "0.60241413", "0.599231...
0.0
-1
Construct new curl object with application/json header
public function getCurl() { $curl = new Curl(); $curl->setOption(CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', 'Authorization:' . $this->passcode, 'X-Forwarded-Host:' . $_SERVER['HTTP_HOST'], 'X-Forwarded-For:' . $_SERVER['SERVER_ADDR'], 'Referer:' . NetHelper::getCurrentURL(), )); $curl->setOption(CURLOPT_TIMEOUT, 200); $curl->setOption(CURLOPT_CONNECTTIMEOUT, 200); // temporarily disables SSL verifying $curl->setOption(CURLOPT_SSL_VERIFYPEER, false); return $curl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curlWrap($url, $json, $action)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10 );\n\tcurl_setopt($ch, CURLOPT_URL, ZDURL.$url);\n\tcurl_setopt($ch, CURLOPT_USERPWD, ZDUSER.\"/token:\".ZDAPIKEY);\n\tswitch($action){\n\t\tcase \"POST\":\n...
[ "0.6230993", "0.60206294", "0.60076064", "0.5906765", "0.5892303", "0.5887997", "0.5784917", "0.5750129", "0.5738976", "0.569356", "0.5627053", "0.5583021", "0.55770916", "0.55668825", "0.55457026", "0.5523307", "0.55180323", "0.54977", "0.5472187", "0.5450166", "0.544933", ...
0.53465617
28
Validates passcode and secret key
protected function validateCodes() { if (empty($this->passcode)) { throw new \Exception("Passcode has not been set."); } if (empty($this->merchant_code)) { throw new \Exception("merchant_code has not been set."); } if (empty($this->secret_key)) { throw new \Exception("secret_key has not been set."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPasskeyLoginValidate(){\n\t\t\n\t\tif(@$this->identification == \"\" | @$this->passkey == \"\"){\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Your Username and Password are required to complete this task.\", \"\");\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\...
[ "0.69811463", "0.6426371", "0.6420528", "0.62968606", "0.62725306", "0.6259516", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6224626", "0.6211366", "0.6175029", "0.6048249", "0.60013", "0.5985303", "0.59244883", "0.5834638", "0.5827106", ...
0.6364201
3
Get status code from code list
public static function getStatusCode($code) { $codes = self::statusCodes(); if (!empty($codes[$code])) { return $codes[$code]; } throw new Exception("Invalid status code: " . $code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _requestStatus($code) {\n $status = array( \n 200 => 'OK',\n 404 => 'Not Found', \n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n ); \n return ($status[$code]) ? $status[$code] : $status[500]; \n }", "priva...
[ "0.7016233", "0.6983833", "0.6980347", "0.69282967", "0.68979484", "0.6894529", "0.6873282", "0.6856017", "0.6817893", "0.6700735", "0.6660813", "0.663219", "0.6577447", "0.6554962", "0.6548249", "0.65004635", "0.6490911", "0.64885116", "0.64885116", "0.64885116", "0.64885116...
0.6749368
9
Create target API URL
public function createURL($action) { var mode = 'payment' $host = $this->is_local_test ? self::WMMERCHANT_HOST_TEST : self::WMMERCHANT_HOST; if ($this->is_local_test) mode = "sandbox"; return $host .'/'. mode. '/' . $action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "public function buildApiUrl($api) {\n return $this->endpointSettings['endpoint'] . $api;\n }", "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t =...
[ "0.7228964", "0.71141094", "0.7075931", "0.7009556", "0.6971671", "0.6932797", "0.67965037", "0.6765249", "0.6740785", "0.66934013", "0.66514313", "0.65746", "0.652567", "0.64761025", "0.64601934", "0.6459889", "0.6455813", "0.6418593", "0.6407407", "0.64048755", "0.638533", ...
0.5959884
53
Parse transaction redirect result URL
public function validateResultURL($status) { $this->validateCodes(); if (empty($_GET['transaction_id'])) { return 'Empty transaction id'; } if (empty($_GET['checksum'])) { return 'Empty checksum'; } $text = $_GET['transaction_id'] . $status . $this->merchant_code . $this->passcode; $hash = Security::hashChecksum($text, $this->secret_key); if ($hash !== $_GET['checksum']) { return 'Invalid checksum.'; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']...
[ "0.61955774", "0.6188728", "0.6188728", "0.6188728", "0.6188728", "0.6188728", "0.60653955", "0.5990395", "0.5975536", "0.59262735", "0.5919954", "0.59146416", "0.5910312", "0.5910312", "0.5889769", "0.5808984", "0.5751311", "0.56851184", "0.5658237", "0.56554747", "0.5636378...
0.530772
50
Parse transaction redirect success URL
public function validateSuccessURL() { return $this->validateResultURL(self::SUCCESS_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSuccessUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getSuccessLocation() {\n\t\treturn $_SERVER['HTTP_REFERER'];\n\...
[ "0.71170336", "0.629864", "0.629864", "0.629864", "0.629864", "0.629864", "0.62781817", "0.62279457", "0.6156074", "0.61440563", "0.6119394", "0.6098481", "0.6061107", "0.60521966", "0.6027535", "0.5992193", "0.5902258", "0.5846273", "0.5846273", "0.5832094", "0.58214056", ...
0.66811
1
Parse transaction redirect failed URL
public function validateFailedURL() { return $this->validateResultURL(self::FAILED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']...
[ "0.64620984", "0.6188506", "0.6073079", "0.60307777", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.59565467", "0.5854566", "0.5853595", "0.58483976", "0.58380926", "0.5820106", "0.58071005", "0.5725522", "0.56887007", "0.56564033", "0.563576", "0.559916...
0.62009406
1
Parse transaction redirect canceled URL
public function validateCanceledURL() { return $this->validateResultURL(self::CANCELED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectUrl(): string;", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getRedirectUrl()\n {\n return null;\n }",...
[ "0.58109176", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.5774087", "0.5745655", "0.5706383", "0.5702832", "0.57019633", "0.5668898", "0.5656144", "0.5628209", "0.56242675", "0.55989325", "0.5575704", "0.5551249", "0.5544042", "0.55298066", "0.551...
0.6333161
0
get detail item that will send
public function getDetailSend(Request $request) { $data = d_productorder::where('po_id', $request->id) ->with('getAgent') ->with(['getPODt' => function ($query) { $query ->where('pod_isapproved', 'Y') ->with(['getItem' => function ($query) { $query ->with('getUnit1') ->with('getUnit2') ->with('getUnit3') ->get(); }]) ->with('getUnit') ->get(); }]) ->first(); $ekspedisi = DB::table('m_expedition') ->where('e_isactive', '=', 'Y') ->get(); //$data->stockItem = $stockItem; $data->total = d_productorderdt::where('pod_productorder', $request->id)->sum('pod_totalprice'); $data->dateFormated = Carbon::parse($data->po_date)->format('d M Y'); $data->ekspedisi = $ekspedisi; return response()->json($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_detail() {\n return $this->detail;\n }", "public function getDetail();", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->...
[ "0.7291318", "0.7212081", "0.7004057", "0.7004057", "0.7004057", "0.6791553", "0.6705254", "0.66846895", "0.665332", "0.66443145", "0.6633574", "0.6613011", "0.6613011", "0.6609222", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", ...
0.0
-1
get list of paymentMethod
public function getPaymentMethod() { // get pusat $pusatCode = m_company::where('c_type', 'PUSAT')->select('c_id')->first(); $pusatCode = $pusatCode->c_id; $data = m_paymentmethod::where('pm_isactive', 'Y') ->whereHas('getAkun', function ($q) use ($pusatCode) { $q->where('ak_comp', $pusatCode); }) ->with('getAkun') ->get(); return response()->json([ 'data' => $data ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ...
[ "0.805618", "0.80237746", "0.7838028", "0.76399994", "0.7594898", "0.7503392", "0.7456745", "0.74385417", "0.73682684", "0.7221175", "0.71844894", "0.71409684", "0.7015059", "0.70058465", "0.6955736", "0.69505453", "0.693007", "0.69244844", "0.6905005", "0.6877195", "0.687553...
0.6469307
37
function to store jurnal
private function jurnalSendOrder(float $totHpp, float $ongkir, String $notasales, Request $request) { $details = []; // Acc persediaan keluar $acc_persediaan = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Persediaan Item') ->first(); $acc_persediaan_jalan = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Persediaan dalam perjalanan') ->first(); if(!is_null($request->harga) && $request->harga != 0) { // Acc Ongkir $acc_beban_ongkir = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA beban ongkos kirim') ->first(); $acc_kas = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Kas/Setara Kas') ->first(); } $parrent = DB::table('dk_pembukuan')->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); if(!$parrent || !$acc_persediaan || !$acc_persediaan_jalan){ return [ 'status' => 'gagal', 'message' => 'beberapa COA yang digunakan untuk transaksi ini belum ditentukan.' ]; } array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_persediaan_jalan->pd_acc, "jrdt_value" => $totHpp, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_persediaan_jalan->pd_keterangan, "jrdt_cashflow" => $acc_persediaan_jalan->pd_cashflow ]); if(!is_null($request->harga) && $request->harga != 0){ array_push($details, [ "jrdt_nomor" => 2, "jrdt_akun" => $acc_beban_ongkir->pd_acc, "jrdt_value" => $request->harga, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_beban_ongkir->pd_keterangan, "jrdt_cashflow" => $acc_beban_ongkir->pd_cashflow ]); } array_push($details, [ "jrdt_nomor" => 3, "jrdt_akun" => $acc_persediaan->pd_acc, "jrdt_value" => $totHpp, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_persediaan->pd_keterangan, "jrdt_cashflow" => $acc_persediaan->pd_cashflow, ]); if(!is_null($request->harga) && $request->harga != 0){ array_push($details, [ "jrdt_nomor" => 4, "jrdt_akun" => $acc_kas->pd_acc, "jrdt_value" => $request->harga, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_kas->pd_keterangan, "jrdt_cashflow" => $acc_kas->pd_cashflow, ]); } // return $details; $jurnal = jurnal::jurnalTransaksi($details, date('Y-m-d'), $notasales, $parrent->pe_nama, 'TK', Auth::user()->u_company); if($jurnal['status'] == 'error'){ return $jurnal; } if($request->paymentType == 'T') { $details = []; $acc_kas = m_paymentmethod::where('pm_id', $request->paymentMethod) ->first(); $acc_kas_ket = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Kas/Setara Kas') ->first(); $acc_DP = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Pendapatan Dibayar Dimuka') ->first(); $parrent = DB::table('dk_pembukuan')->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); if(!$parrent || !$acc_DP || !$acc_kas){ return [ 'status' => 'gagal', 'message' => 'beberapa COA yang digunakan untuk transaksi ini belum ditentukan.' ]; } array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_kas->pm_akun, "jrdt_value" => $request->payCash, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_kas_ket->pd_keterangan, "jrdt_cashflow" => $acc_kas_ket->pd_cashflow ]); array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_DP->pd_acc, "jrdt_value" => $request->payCash, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_DP->pd_keterangan, "jrdt_cashflow" => $acc_DP->pd_cashflow ]); $jurnal = jurnal::jurnalTransaksi($details, date('Y-m-d'), $notasales, $parrent->pe_nama, 'TK', Auth::user()->u_company); if($jurnal['status'] == 'error'){ return $jurnal; } } return [ 'status' => 'berhasil', 'message' => '' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jadwal(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n// ----------------------------------------------------------------------\n // meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue'...
[ "0.5888985", "0.5633174", "0.5628414", "0.5613958", "0.55559343", "0.54032", "0.53976536", "0.5388568", "0.53870237", "0.53557503", "0.53144425", "0.5270367", "0.5268651", "0.5260969", "0.5241741", "0.52033776", "0.5183557", "0.5182659", "0.51787883", "0.51689696", "0.5167948...
0.0
-1
return 'this is dashboar';
public function index(Request $request) { $posters = Poster::all(); return view('admin.index',[ 'posters' => $posters, 'page_name'=>'dashboard', 'langs' => Lang::all(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function well()\n{\n return \"foxphp\";\n}", "function Hola(){\n return 'Hola Darwin'; \n}", "public function falar(){\n\t\treturn \"Som\";\n\t}", "public function alterMeToo()\n {\n return \"fantabulous\";\n }", "function stringMethod()\n {\n// return 1;\n }", "function b...
[ "0.74391776", "0.72810084", "0.6764207", "0.66425455", "0.6583202", "0.64278054", "0.64128363", "0.6411482", "0.6403098", "0.63632584", "0.6306986", "0.6306986", "0.62921107", "0.6222296", "0.6203622", "0.62008935", "0.6176501", "0.616253", "0.6155817", "0.61545926", "0.61139...
0.0
-1
end func: __construct Get or set Job key
public function key($key = null) { if($key === null) return $this->key; $this->key = $key; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($key)\n {\n $this->key = $key;\n }", "public function getLockKey($job)\n {\n return $this->prefix.get_class($job).':'.$this->key;\n }", "public function __construct($key)\n {\n $this->key = $key;\n }", "public function __construct($key)\n {\n ...
[ "0.6477422", "0.63714445", "0.6324853", "0.6324853", "0.6324853", "0.62862635", "0.5891638", "0.58866084", "0.58866084", "0.5880597", "0.587692", "0.587692", "0.587692", "0.587692", "0.587692", "0.587692", "0.5876362", "0.5876362", "0.58371025", "0.58364046", "0.58364046", ...
0.5804263
25
end func: key Add a cron expression
public function on($format) { $this->formats[] = Format::factory($format); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCron() { // cron parameters passed via JSON query string\n\t\t$cron = json_decode(Flight::request()->query['cron'],true);\n\t\t$t = explode(\":\",$cron['t']); //time\n\t\t$i= 0;\n\t\t$str='';\n\t\tforeach ($cron['d'] as $d) { //compose day of Week\n\t\t\tif ($d) $str .= $i.',';\n\t\t\t$i++;\n\t\...
[ "0.7509266", "0.7335807", "0.7074098", "0.7074098", "0.68722135", "0.65738714", "0.6537081", "0.6522536", "0.64599377", "0.6453049", "0.6427951", "0.64113075", "0.6365154", "0.63514215", "0.6327963", "0.6315157", "0.629822", "0.62900054", "0.6288639", "0.62833124", "0.6241392...
0.0
-1
end func: on Add callback to fire for job
public function trigger($callback) { $this->callbacks[] = $callback; // Lazy evaluate return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function onEnd(): void;", "public function after_run(){}", "public function callback();", "public function onFinish() {\n\t\t$this->onResponse->executeAll(false);\n\t\tparent::onFinish();\n\t}", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function after($...
[ "0.6754883", "0.65809137", "0.65297437", "0.64483464", "0.63377744", "0.6299356", "0.6299356", "0.62503904", "0.6242394", "0.62246776", "0.61952275", "0.6121663", "0.6069406", "0.6068362", "0.6016906", "0.59881735", "0.59823865", "0.59722036", "0.5926913", "0.59115016", "0.58...
0.0
-1
end func: trigger Determine if this Job is set to be run, if so, run it
public function run($time) { if(empty($this->formats) or empty($this->callbacks)) return false; if(!is_array($time)) $time = getdate($time); $should_run = false; foreach($this->formats as $format) { if(!$format->test($time)) continue; $should_run = true; break; } if(!$should_run) return false; foreach($this->callbacks as $callback) { if(!is_callable($callback)) continue; call_user_func($callback); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run_job()\r\n\t{\r\n\t}", "public function hasJob(): bool;", "public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just ...
[ "0.68277204", "0.6624578", "0.6510412", "0.6470208", "0.63723767", "0.6296154", "0.6082285", "0.6069997", "0.6068144", "0.6068144", "0.6018827", "0.6003223", "0.5971469", "0.5971469", "0.59371185", "0.59261274", "0.58667743", "0.5821147", "0.58165455", "0.58077943", "0.577727...
0.0
-1
Get all ADT types
public function getValidTypes() { return array("Float", "Integer", "Location", "Text", "Boolean", "MultiText", "Date", "DateTime", "Enum", "MultiEnum", "Group"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getAdtTypes()\n {\n $query = \"SELECT ALL FROM adv_type\";\n return $this->getQueryData($query, $this->getConnection());\n }", "public static fun...
[ "0.8104263", "0.8104263", "0.8104263", "0.8104263", "0.7992159", "0.7942152", "0.7877116", "0.77502185", "0.7582065", "0.7574785", "0.7574785", "0.75543743", "0.7513106", "0.7469903", "0.74530625", "0.74530625", "0.74091035", "0.7398906", "0.7392792", "0.7290119", "0.7182691"...
0.0
-1
Check if given type is valid
public function isValidType($a_type) { return in_array((string)$a_type, $this->getValidTypes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertT...
[ "0.81301844", "0.7605631", "0.7464584", "0.7453233", "0.74303216", "0.7374696", "0.7330754", "0.7312097", "0.73045266", "0.72687274", "0.7252112", "0.72197706", "0.7219039", "0.7069082", "0.70035636", "0.69912547", "0.6982228", "0.6960759", "0.6943651", "0.6878082", "0.685796...
0.6864588
20
Get instance of ADT definition
public function getDefinitionInstanceByType($a_type) { $class = $this->initTypeClass($a_type, "Definition"); return new $class(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefinition();", "public function getDefinition();", "public function getDefinition() {}", "public function getInstanceByDefinition(ilADTDefinition $a_def)\r\n\t{\r\n\t\tif(!method_exists($a_def, \"getADTInstance\"))\r\n\t\t{\t\t\t\r\n\t\t\t$class = $this->initTypeClass($a_def->getType());\...
[ "0.7202446", "0.7202446", "0.7117087", "0.70327014", "0.650909", "0.64566433", "0.64566433", "0.6396597", "0.6234741", "0.6207323", "0.59791976", "0.5947958", "0.59183973", "0.583498", "0.5825931", "0.5794372", "0.57867825", "0.5759898", "0.5756079", "0.57560426", "0.5736088"...
0.7133288
2
Get instance of ADT
public function getInstanceByDefinition(ilADTDefinition $a_def) { if(!method_exists($a_def, "getADTInstance")) { $class = $this->initTypeClass($a_def->getType()); return new $class($a_def); } else { return $a_def->getADTInstance(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInstance(): object;", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function instance();", "abstract public function get_instance();", "abstract public function instance();", "public function g...
[ "0.71512145", "0.7042584", "0.6944135", "0.6942822", "0.6783025", "0.6754488", "0.6686437", "0.6669435", "0.6665037", "0.6581002", "0.65632546", "0.6563135", "0.6563135", "0.6563135", "0.6563135", "0.6562312", "0.6495414", "0.6492811", "0.6468329", "0.643674", "0.6390926", ...
0.64213425
20
bridges Get form bridge instance for ADT
public function getFormBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "FormBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridg...
[ "0.6226911", "0.6221184", "0.60709274", "0.5868567", "0.5578884", "0.5485785", "0.5461808", "0.5460027", "0.5388528", "0.53154093", "0.52404904", "0.5183814", "0.5161728", "0.5161465", "0.5150575", "0.5140566", "0.5127729", "0.509111", "0.50733495", "0.5071981", "0.50525117",...
0.7022916
0
Get DB bridge instance for ADT
public function getDBBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "DBBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "private function getDBA() {\n\t\tif ( $this->dba != null ) {\n\t\t\treturn $this->dba;\n\t\t}\n\t\tswitch ( $this-...
[ "0.7011467", "0.66538334", "0.6570967", "0.6403578", "0.63902646", "0.6369858", "0.6368706", "0.62863606", "0.625861", "0.62197703", "0.61985743", "0.619759", "0.61788714", "0.61603236", "0.61416847", "0.61349", "0.6133471", "0.61327225", "0.61229753", "0.6114849", "0.6108568...
0.79595876
0
Get presentation bridge instance for ADT
public function getPresentationBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "PresentationBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType()...
[ "0.6440561", "0.6297715", "0.6102629", "0.6033755", "0.5811633", "0.57800436", "0.5729517", "0.56088495", "0.52797216", "0.5263347", "0.5245963", "0.51340455", "0.5122018", "0.51195294", "0.5107162", "0.51070225", "0.5100116", "0.50740755", "0.5073153", "0.5071852", "0.507106...
0.78331214
0
Get search bridge instance for ADT definition
public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true) { if($a_range) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeRange"); return new $class($a_adt_def); } catch(Exception $e) { } } // multi enum search (single) == enum search (multi) if(!$a_multi && $a_adt_def->getType() == "MultiEnum") { $class = $this->initTypeClass("Enum", "SearchBridgeMulti"); return new $class($a_adt_def); } if($a_multi) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeMulti"); return new $class($a_adt_def); } catch(Exception $e) { } } $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeSingle"); return new $class($a_adt_def); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType()...
[ "0.5672799", "0.55703974", "0.5428149", "0.52475214", "0.51427054", "0.5131958", "0.51317525", "0.5120147", "0.5120147", "0.5118711", "0.51143926", "0.51143926", "0.510476", "0.50948733", "0.5080495", "0.50742376", "0.5065063", "0.5056488", "0.50546724", "0.5035494", "0.50160...
0.66711986
0
Get active record instance for ADT
public function getActiveRecordBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "ActiveRecordBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getInstance()\n {\n return Doctrine_Core::getTable('Actividad');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TrOnlineRecord');\n }", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_r...
[ "0.63890654", "0.6366125", "0.6313488", "0.63093156", "0.629069", "0.6254954", "0.62446594", "0.6192995", "0.61900324", "0.61162394", "0.61070716", "0.6092329", "0.6058042", "0.6052052", "0.6048207", "0.6031779", "0.6027855", "0.60212207", "0.6014998", "0.5984389", "0.596708"...
0.633572
2
active records Get active record instance
public static function getActiveRecordInstance(ilADTGroupDBBridge $a_properties) { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecord.php"; return new ilADTActiveRecord($a_properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function get_active_instance() {\n\n\n }", "public function get_active_instance() { \n\n\n\t}", "public function query()\n {\n if ($model = $this->model) {\n return new $model();\...
[ "0.6939554", "0.6804903", "0.6641189", "0.66146743", "0.6605447", "0.6516161", "0.65153503", "0.65153503", "0.64461744", "0.6412062", "0.6348409", "0.62574935", "0.6246687", "0.6225461", "0.6220919", "0.62063897", "0.619673", "0.61849815", "0.61756223", "0.6128354", "0.612232...
0.0
-1
Init active record by type
public static function initActiveRecordByType() { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init(string $type = \"PDO\") {\n $this -> __createAdapter($type, static::$table);\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "protected function initDatabaseRecord() {}", "private function init() {\r\n settype($this->id, \"int\"...
[ "0.71986485", "0.6576926", "0.6419527", "0.62899625", "0.62655044", "0.6261549", "0.62429035", "0.6198593", "0.6197844", "0.61652935", "0.6157843", "0.6111789", "0.6106766", "0.60818005", "0.6047299", "0.60472363", "0.6037188", "0.60242766", "0.6020157", "0.6000934", "0.59628...
0.75186765
0
Get active record by type instance
public static function getActiveRecordByTypeInstance(ilADTGroupDBBridge $a_properties) { self::initActiveRecordByType(); return new ilADTActiveRecordByType($a_properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOne($type = null)\n {\n $entities = $this->find($type, 0, 1);\n\n return current($entities);\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig(...
[ "0.6463997", "0.6371282", "0.6360918", "0.62883675", "0.6251028", "0.61414796", "0.6056854", "0.60512775", "0.60190904", "0.5987947", "0.59825766", "0.59322745", "0.5897965", "0.58886963", "0.58833104", "0.5862784", "0.58550763", "0.58211666", "0.5818487", "0.5818309", "0.579...
0.0
-1
Deletes an existing Coins model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { if($this->findModel($id)->delete()) { return $this->message("删除成功",$this->redirect(['index'])); } else { return $this->message("删除失败",$this->redirect(['index']),'error'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redire...
[ "0.68401295", "0.6752759", "0.67374176", "0.6615568", "0.65954083", "0.65898204", "0.65854096", "0.6568951", "0.6534552", "0.65126", "0.64915913", "0.6462519", "0.6441085", "0.64198214", "0.64053595", "0.6399127", "0.6329099", "0.6329099", "0.6328673", "0.63234293", "0.631428...
0.0
-1
Finds the Coins model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (empty($id)) { return new StartPage(); } if (empty($model = StartPage::findOne($id))) { return new StartPage(); } return $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (empty($id)) {\n return new Coins();\n }\n\n if (empty($model = Coins::findOne($id))) {\n return new Coins();\n }\n\n return $model;\n }", "public abstract function find($primary_key, $model);", "protected...
[ "0.67781603", "0.64340687", "0.6303363", "0.6303363", "0.6303363", "0.62548906", "0.62514013", "0.6202046", "0.6164167", "0.6127484", "0.6041405", "0.6001315", "0.6001315", "0.5936162", "0.59317225", "0.5917346", "0.59159744", "0.5885853", "0.5879709", "0.586875", "0.5866249"...
0.0
-1
End of Page Header
function Table_Headers($header,$w) { //Colors, line width and bold font $this->SetFillColor(153,153,153); $this->SetTextColor(0); $this->SetDrawColor(128,0,0); $this->SetLineWidth(.3); $this->SetFont('Arial','B','7'); //Header //Output table header for($i=0;$i<count($header);$i++) $this->Cell($w[$i],5,$header[$i],1,0,'C',1); $this->Ln(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endHeader(){\n\t\techo '</h4>';\n\t\techo CHtml::closeTag('div');\n\t}", "public static function after_header() {\r\n\r\n\t}", "public static function end_header()\n\t{\n\t\treturn sprintf('</h%d>',\n\t\t\tmin(6, self::$nivel_cabecalho)\n\t\t);\n\t}", "public function endPage() {}", "public...
[ "0.77213377", "0.75642085", "0.7467698", "0.7352255", "0.727965", "0.6980245", "0.6979666", "0.69016623", "0.68502426", "0.6787376", "0.6787376", "0.67381376", "0.67101634", "0.67008936", "0.66994077", "0.66744477", "0.66536444", "0.6646254", "0.66281587", "0.6613058", "0.661...
0.0
-1
Set the array of column widths
function SetWidths($w) { $this->widths=$w; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setColumnsWidth($array) { \n foreach ($array as $elem) {\n if ($elem != \"\")\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\n else\n $this->columnsWidth[] = \"\";\n }\n }", "public function setColumnsWidth($arr...
[ "0.84666574", "0.8461548", "0.7884374", "0.7204073", "0.7204073", "0.7204073", "0.7203653", "0.70085454", "0.69931114", "0.69743675", "0.69743675", "0.69743675", "0.68887454", "0.68887454", "0.68887454", "0.68887454", "0.68604493", "0.67976296", "0.67976296", "0.67714906", "0...
0.7043035
8
Set the array of column alignments
function SetAligns($a) { $this->aligns=$a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetAlignment()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// No parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// Store the alignment values\n\t\t$this->_arrAlignments = func_get_args();\n\n\t\treturn $this->_arrAlignments;\n\t}", "function SetAligns($a)\n{\n $this->aligns=$a;\n}", ...
[ "0.646107", "0.643756", "0.643756", "0.643756", "0.643756", "0.631971", "0.62340987", "0.6184184", "0.61625123", "0.61625123", "0.61625123", "0.61168545", "0.60073733", "0.60073733", "0.59812677", "0.59812677", "0.5974367", "0.59457725", "0.59457725", "0.59457725", "0.5945772...
0.6225126
8
If the height h would cause an overflow, add a new page immediately
function CheckPageBreak($h) { if($this->GetY()+$h>$this->PageBreakTrigger) $this->AddPage($this->CurOrientation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function ...
[ "0.63094914", "0.63094914", "0.63094914", "0.63094914", "0.6265578", "0.6265578", "0.6193789", "0.6178936", "0.61739904", "0.61739904", "0.61739904", "0.61739904", "0.6171177", "0.61668706", "0.6158568", "0.6145702", "0.6143539", "0.61062163", "0.61062163", "0.61062163", "0.6...
0.6149417
16
Computes the number of lines a MultiCell of width w will take
function NbLines($w,$txt) { $cw=&$this->CurrentFont['cw']; if($w==0) $w=$this->w-$this->rMargin-$this->x; $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; $s=str_replace("\r",'',$txt); $nb=strlen($s); if($nb>0 and $s[$nb-1]=="\n") $nb--; $sep=-1; $i=0; $j=0; $l=0; $nl=1; while($i<$nb) { $c=$s[$i]; if($c=="\n") { $i++; $sep=-1; $j=$i; $l=0; $nl++; continue; } if($c==' ') $sep=$i; $l+=$cw[$c]; if($l>$wmax) { if($sep==-1) { if($i==$j) $i++; } else $i=$sep+1; $sep=-1; $j=$i; $l=0; $nl++; } else $i++; } return $nl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _countLine($w,$txt){\r\n//! @return int\r\n //Computes the number of lines a MultiCell of width w will take\r\n $cw=&$this->CurrentFont['cw'];\r\n if($w==0) $w=$this->w-$this->rMargin-$this->x;\r\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n $s=str_replace(\"\\r\",'',$txt);\r\n $nb=s...
[ "0.7832041", "0.6803364", "0.66419834", "0.65514416", "0.6517452", "0.6490402", "0.63917375", "0.6361387", "0.62462586", "0.6191976", "0.61789393", "0.6149459", "0.6143311", "0.61333185", "0.61333185", "0.6129266", "0.6129266", "0.6129266", "0.6127733", "0.610188", "0.6099326...
0.6070884
27
End of Multi Cell with wrap //// SQL Query /////
function Sytem_Time(){ // system date and time $query1="Select NOW();"; $result = mysql_query($query1) or die (mysql_error()); $num1 = mysql_num_rows($result); for($i=0; $i<$num1; $i++) { $row = mysql_fetch_array($result); $datePosted = $row[$i]; } // end system date return $datePosted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tablecell_close() {\n $this->doc .= '</td>';\n }", "private function closeCell()\n {\n foreach (array('td', 'th') as $cell) {\n if ($this->elementInScope($cell, true)) {\n $this->inCell(\n array(\n 'name' => $cell,\n...
[ "0.62118584", "0.5884189", "0.571484", "0.5549765", "0.5487167", "0.54302734", "0.5356242", "0.52908635", "0.5241742", "0.5235592", "0.52257425", "0.52086663", "0.52056617", "0.51697", "0.5127812", "0.51223296", "0.5122152", "0.5118309", "0.50867945", "0.50851434", "0.5070744...
0.0
-1
Test that get methods work as expected.
public function testGet() { $all_results = self::$api->getAll(); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($all_results); $expected_client_id = $all_results[0]['client_id'] ?: null; $this->assertNotNull($expected_client_id); $expected_audience = $all_results[0]['audience'] ?: null; $this->assertNotNull($expected_audience); $audience_results = self::$api->getByAudience($expected_audience); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($audience_results); $this->assertEquals($expected_audience, $audience_results[0]['audience']); $client_id_results = self::$api->getByClientId($expected_client_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($client_id_results); $this->assertEquals($expected_client_id, $client_id_results[0]['client_id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test__GetGet()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->get,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsGet')\n\t\t);\n\t}", "public function testGetFinancialStatementAllUsingGet()\n {\n }", "public function testGetMetadata2UsingGET()\n {\n }", "publi...
[ "0.7554496", "0.75490654", "0.75325716", "0.75278807", "0.7495102", "0.74765456", "0.7468528", "0.7363385", "0.7360457", "0.73598367", "0.73037773", "0.7292913", "0.7278999", "0.72523546", "0.7247173", "0.72195005", "0.71560836", "0.711672", "0.711043", "0.70800465", "0.70473...
0.0
-1
Test that pagination parameters are passed to the endpoint.
public function testGetWithPagination() { $expected_count = 2; $results_1 = self::$api->getAll([], 0, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount($expected_count, $results_1); $expected_page = 1; $results_2 = self::$api->getAll([], $expected_page, 1); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount(1, $results_2); $this->assertEquals($results_1[$expected_page]['client_id'], $results_2[0]['client_id']); $this->assertEquals($results_1[$expected_page]['audience'], $results_2[0]['audience']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPagination()\n {\n\n // Set public page length to 2.\n set_option('per_page_public', 2);\n\n $item1 = $this->_item(true, 'Item 1');\n $item2 = $this->_item(true, 'Item 2');\n $item3 = $this->_item(true, 'Item 3');\n $item4 = $this->_item(true, 'Item ...
[ "0.70548224", "0.67531145", "0.67249376", "0.6706914", "0.6686927", "0.66857654", "0.6682336", "0.6552432", "0.6549364", "0.6505953", "0.64882123", "0.64774555", "0.6447404", "0.6440942", "0.64331806", "0.641788", "0.64111185", "0.63885736", "0.6384449", "0.63785315", "0.6356...
0.7644956
0
Test that the "include_totals" parameter works.
public function testGetAllIncludeTotals() { $expected_page = 0; $expected_count = 2; $results = self::$api->getAll(['include_totals' => true], $expected_page, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('total', $results); $this->assertEquals($expected_page * $expected_count, $results['start']); $this->assertEquals($expected_count, $results['limit']); $this->assertNotEmpty($results['client_grants']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTotal()\n {\n\n \t$data = [\n \t\t'base_price' => 10,\n \t\t'spacing_cost' => 10,\n \t\t'work_level_cost' => 50,\n \t\t'urgency_cost' => 20,\n \t\t'number_of_pages' => 5,\n \t\t'total_additional_services_cost' => 10\n \t\t// 'vat' => 100\n \t];\n\n $foo = se...
[ "0.6468725", "0.61584353", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.6009728", "0.59305", "0.5900423", "0.5868993", "0.58609045", "0.5784935", "0.5773006", "0.57543004", "0.57496685", "0.57306576", "0.5725652", "0.5710329", "0.5680534", "0.56702...
0.7849056
0
Test that we can create, update, and delete a Client Grant.
public function testCreateUpdateDeleteGrant() { $client_id = self::$env['APP_CLIENT_ID']; $audience = self::$apiIdentifier; // Create a Client Grant with just one of the testing scopes. $create_result = self::$api->create($client_id, $audience, [self::$scopes[0]]); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('id', $create_result); $this->assertEquals($client_id, $create_result['client_id']); $this->assertEquals($audience, $create_result['audience']); $this->assertEquals([self::$scopes[0]], $create_result['scope']); $grant_id = $create_result['id']; // Test patching the created Client Grant. $update_result = self::$api->update($grant_id, self::$scopes); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertEquals(self::$scopes, $update_result['scope']); // Test deleting the created Client Grant. $delete_result = self::$api->delete($grant_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNull($delete_result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_machine_user_can_perform_client_credentials_grant() {\n\n $user = factory(User::class)->create();\n\n $createdClientResponse = $this->log_in_and_create_client_for_user($user);\n\n // so you can logout for client credentials grant!\n auth()->logout();\n\n $res...
[ "0.6682855", "0.664292", "0.66278887", "0.6474675", "0.63155806", "0.619589", "0.6142597", "0.6067689", "0.6056032", "0.6029367", "0.60248876", "0.5914911", "0.5910681", "0.5909496", "0.5839494", "0.5836691", "0.58031607", "0.5800475", "0.58004636", "0.579917", "0.57944465", ...
0.7718429
0
Test that create method throws errors correctly.
public function testCreateGrantExceptions() { $throws_missing_client_id_exception = false; try { self::$api->create('', self::$apiIdentifier, []); } catch (CoreException $e) { $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid "client_id" parameter'); } $this->assertTrue($throws_missing_client_id_exception); $throws_missing_audience_exception = false; try { self::$api->create(self::$env['APP_CLIENT_ID'], '', []); } catch (CoreException $e) { $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid "audience" parameter'); } $this->assertTrue($throws_missing_audience_exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function test_create_fail()\n ...
[ "0.7649306", "0.7294477", "0.7200737", "0.71371174", "0.71354246", "0.7016177", "0.7015628", "0.6975069", "0.6965918", "0.69426477", "0.6902013", "0.6862566", "0.6816115", "0.6748471", "0.6737254", "0.6724987", "0.669673", "0.6691872", "0.66804904", "0.66707915", "0.6661572",...
0.6320508
58
Indexes Duplicates like so: $array["$movie_name ($year)"][$provider]
public function get_collated_movie_list_with_details() { $movies = $this->movies; $error_messages = array(); foreach ($this->movie_providers as $provider_name => $provider) { list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); } foreach ($movies as $provider_name => $provider_movies) { foreach ($provider_movies as $name_and_year => $movie) { $id = $movie->ID; list($movie, $error_messages) = $this->cache_logic_get_movie_details_by_provider_and_id($provider_name, $id); $name_and_year = $movie->get_display_name(); $movies[$provider_name][$name_and_year] = $movie; } } $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies); return $all_movies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_movies_with_duplicate_name_per_year_get_a_year()\n {\n $search = $this->getimdbsearch();\n $results = $search->search('Home 2015', array(TitleSearch::MOVIE));\n $this->assertIsArray($results);\n\n $found = false;\n foreach ($results as $result) {\n ...
[ "0.5577337", "0.4683959", "0.46682495", "0.4599428", "0.45880413", "0.45753264", "0.45324612", "0.4510924", "0.4510479", "0.44979447", "0.4473694", "0.44175297", "0.4411343", "0.43881652", "0.43605217", "0.43367344", "0.42892995", "0.42819673", "0.42708978", "0.42610693", "0....
0.41853112
24
Indexes Duplicates like so: $array["$movie_name ($year)"][$provider]
public function get_collated_movie_list() { $movies = $this->movies; $error_messages = array(); foreach ($this->movie_providers as $provider_name => $provider) { list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); } $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies); return array($all_movies, $error_messages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_movies_with_duplicate_name_per_year_get_a_year()\n {\n $search = $this->getimdbsearch();\n $results = $search->search('Home 2015', array(TitleSearch::MOVIE));\n $this->assertIsArray($results);\n\n $found = false;\n foreach ($results as $result) {\n ...
[ "0.5577337", "0.4683959", "0.46682495", "0.4599428", "0.45880413", "0.45753264", "0.45324612", "0.4510924", "0.4510479", "0.44979447", "0.4473694", "0.44175297", "0.4411343", "0.43881652", "0.43605217", "0.43367344", "0.42892995", "0.42819673", "0.42708978", "0.42610693", "0....
0.0
-1
unused TODO: Break down into get and put
public function memcache_get_movies_list_by_provider_keyed_by_id($provider_name) { $found = false; $error_messages = array(); $searchkeyvalues = array("provider" => $provider_name, "movies" => "movies", "keyed_by" => "id"); // Try memcached first, if ($this->verbose == true) { echo "<br/>Trying memcached for movies list " . $provider_name; } list($found, $movies_keyed_by_id, $error_message) = $this->memcache_store->get_search($searchkeyvalues); $error_messages[] = $error_message; if ($found == true) { if ($this->verbose == true) { echo "<br/>Found movies list in memcached"; } } if ($found == false) { if ($this->verbose == true) { echo "<br/>Didn't find movies list in memcached "; } list($movies_keyed_by_id, $new_error_messages) = $this->curl_get_movies_list_by_provider_keyed_by_id_retry($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); if ($movies_keyed_by_id != array()) { if ($this->verbose == true) { echo "<br/>Storing movies list in memcached "; } $this->memcache_store->store_search($searchkeyvalues, $movies_keyed_by_id, $this->memcache_expiry); } } return array($movies_keyed_by_id, $error_messages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function get();", "abstract public function get() ;", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract protected functi...
[ "0.70916957", "0.7083901", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6329277", "0.61808896", "0.61808896", "0.6149985", "0.6129177", "0.6003", "0.59629816", "0.5945499", "0.59389096", "0.5930002", "0.5930002", "0.5930002", "0.5930002", ...
0.0
-1
/ parse the response
function parse_response_array($string) { $response_string_array = explode("&", $string); $proper_array = array(); foreach ($response_string_array as $value) { list($key, $val) = explode("=", $value); $val = urldecode($val); $proper_array["$key"] = $val; } unset($key); unset($val); return $proper_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->...
[ "0.81643206", "0.81230325", "0.7904068", "0.7804625", "0.7563842", "0.7549407", "0.7455809", "0.7264202", "0.72639376", "0.7238908", "0.717791", "0.7171854", "0.71452177", "0.7117078", "0.7050187", "0.6987313", "0.6923118", "0.6918776", "0.6905822", "0.6904758", "0.6888165", ...
0.0
-1
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function index() { session_start(); if(!isset ($_SESSION['id_usuario']) == true) { unset ($_SESSION['id_usuario']); unset ($_SESSION['email']); unset ($_SESSION['nome']); $this->load->view('login_view'); }else{ redirect("dashboard/"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.7655508", "0.74145436", "0.7396173", "0.7317418", "0.72283363", "0.72283363", "0.71903646", "0.7166857", "0.7151917", "0.7145717", "0.7108151", "0.70780236", "0.70754886", "0.70406276", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.69742966", "0....
0.0
-1
Define the model's default state.
public function definition() { return [ 'about_ar' => $this->faker->sentence(3), 'about_en' => $this->faker->sentence(3), 'about_id' => $this->faker->sentence(3), 'our_vision_ar' => $this->faker->sentence(3), 'our_vision_en' => $this->faker->sentence(3), 'our_vision_id' => $this->faker->sentence(3), 'our_goals_ar' => $this->faker->sentence(3), 'our_goals_en' => $this->faker->sentence(3), 'our_goals_id' => $this->faker->sentence(3), 'meta_title_ar' => 'about_meta_title_ar', 'meta_title_en' => 'about_meta_title_en', 'meta_title_id' => 'about_meta_title_id', 'meta_descrption_ar' => 'about_meta_descrption_ar', 'meta_descrption_en' => 'about_meta_descrption_en', 'meta_descrption_id' => 'about_meta_descrption_id', 'admin_id' => 1, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamNa...
[ "0.77757794", "0.72255844", "0.6857964", "0.67950636", "0.67661", "0.6433752", "0.64074224", "0.63712305", "0.61876214", "0.61864567", "0.6159088", "0.61543477", "0.6153316", "0.61428887", "0.6116904", "0.61084956", "0.6106097", "0.60391295", "0.60389197", "0.6019848", "0.598...
0.0
-1
/$query = $this>db>get('tb_collection'); return $query>result_array();
public function getAllCollection() { return $this->db->get('tb_collection')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection($table)\n {\n $sql = 'SELECT * FROM '.$table;\n ...
[ "0.7017653", "0.6901569", "0.67929614", "0.67762166", "0.6691817", "0.6596962", "0.65945613", "0.656072", "0.65531754", "0.6491643", "0.64909357", "0.64734757", "0.6461831", "0.64484036", "0.64322704", "0.64143544", "0.6387219", "0.6387219", "0.6370071", "0.6370071", "0.63700...
0.7420564
0
Display a listing of the resource.
public function index(Channel $channel, ThreadFilters $filters,Trending $trending) { $threads = $this->getThreads($filters, $channel); if (request()->wantsJson()){ return $threads; } return view('threads.index',[ 'threads' => $threads, 'trending' => $trending->get() ]); }
{ "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() { return view('threads.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request,Recaptcha $recaptcha) { $this->validate($request, [ 'title' => 'required', new Spamfree, 'body' => 'required', new Spamfree, 'channel_id' => 'required|exists:channels,id', 'g-recaptcha-response' => 'required',$recaptcha ]); $response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [ 'secret' => config('services.recaptcha.secret'), 'response' => $request->input('g-recaptcha-response'), 'remoteip' => request()->ip() ]); $thread = Thread::create([ 'user_id' => Auth::id(), 'channel_id' => $request->channel_id, 'title' => $request->title, 'body' => $request->body, 'slug' => $request->title ]); return redirect($thread->path()) ->with('flash','Your thread has been published'); }
{ "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($channelId,Thread $thread,Trending $trending) { if(auth()->check()){ $key = sprintf("users.%s.visits.%s",auth()->id(),$thread->id); cache()->forever($key, Carbon::now()); } $trending->push($thread); $thread->increment('visits'); return view('threads.show', compact('thread')); }
{ "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(Thread $thread) { // }
{ "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.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6...
0.0
-1
Remove the specified resource from storage.
public function destroy($channel,Thread $thread) { $this->authorize('update',$thread); $thread->delete(); if (request()->wantsJson()){ return response([],204); } return redirect('/threads'); }
{ "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
Get all grades from DB for a job.
public function getAll($jobCode) { return DB::table('job_grades') ->selectRaw( 'grade_code as "code",'. 'grades.name as "name",'. 'coalesce(job_grades.bottom_rate, grades.bottom_rate) as "bottomRate",'. 'coalesce(job_grades.mid_rate, grades.mid_rate) as "midRate",'. 'coalesce(job_grades.top_rate, grades.top_rate) as "topRate"' ) ->join('grades', 'grades.code', '=', 'grade_code') ->where([ ['job_code', $jobCode] ]) ->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n // $now = Carbon::now();\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\...
[ "0.69820565", "0.6650518", "0.660851", "0.6213045", "0.6179357", "0.6079971", "0.5987647", "0.5964477", "0.59400564", "0.5917752", "0.588163", "0.57473576", "0.56992936", "0.56447303", "0.5636128", "0.5612012", "0.5548827", "0.554741", "0.55380625", "0.5469715", "0.5435844", ...
0.6500198
3
Insert job grades data into DB.
public function save($obj) { DB::table('job_grades')->insert($obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run() {\n\t\t\t$grades = [\n\t\t\t\t[\n\t\t\t\t\t'user_id' => 13, 'teacher_id' => 4, 'lesson_id' => 4, 'grade' => 96, 'class_id'=>4\n\t\t\t\t],\n\t\t\t];\n\t\t\t\n\t\t\tGrade::insert($grades);\n\t\t}", "public function save_grade() {\r\n\r\n\t\t\t//new method\r\n\t\t\t$sql = \"UPDATE grades SET s...
[ "0.6941419", "0.6906519", "0.6869692", "0.6655187", "0.6618155", "0.65494514", "0.64384466", "0.62312955", "0.62205535", "0.62078834", "0.61688274", "0.6085597", "0.6039224", "0.5905748", "0.5861165", "0.5853976", "0.5703828", "0.5692595", "0.56907314", "0.5648165", "0.563188...
0.6641959
4
Delete job grades data from DB by id.
public function delete($jobCode) { DB::table('job_grades')->where('job_code', $jobCode)->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_grade() {\r\n\t\t\t$sql = \"DELETE FROM grades WHERE id = $this->id;\";\r\n\t\t\tDatabase::$db->query($sql);\r\n\t\t}", "public function delete($id)\n {\n if (!$result = $this->db->query(\"DELETE from `work_experience` WHERE `id` = '$id'\")) {\n throw new \\mysqli_sql_...
[ "0.7941263", "0.6906004", "0.68382186", "0.67633384", "0.67079735", "0.6679208", "0.661946", "0.65448284", "0.65324193", "0.65250564", "0.65060234", "0.64472854", "0.6380111", "0.6373853", "0.63716185", "0.63681436", "0.63502324", "0.63428783", "0.6333624", "0.6311695", "0.63...
0.65745234
7
Finds and displays documents for a Post.
public function attachmentsAction(Request $request, $id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $post = $em->getRepository('ManhattanPostsBundle:Post') ->findOneByIdJoinAttachments($id); if (!$post) { throw $this->createNotFoundException('Unable to find Post entity.'); } $document = new Attachment(); $document->addPost($post); $form = $this->createForm(new AttachmentType(), $document); return $this->render('ManhattanPostsBundle:Document:documents.html.twig', array( 'entity' => $post, 'form' => $form->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find(int $post_id);", "public function documento_index(){\n\n\t\t# Paginate Options\n\t\t$options = array(\n\t\t\t'conditions'=>array(),\n\t\t\t'order'=>array('created'=>'DESC')\n\t\t);\n\t\t$this->paginate = $options;\n\n\t\t# Filtro\n\t\tConfigure::load('filters');\n\t\t// $this->Filter->addFil...
[ "0.6277988", "0.61591315", "0.6138418", "0.6114021", "0.6052781", "0.5967254", "0.59295666", "0.59262615", "0.58983856", "0.5883074", "0.587688", "0.58642757", "0.58642757", "0.5830671", "0.58302385", "0.58176345", "0.581348", "0.5799267", "0.5781214", "0.5781214", "0.5781214...
0.0
-1
Creates a new Photo entity.
public function createAction(Request $request, $id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $post = $em->getRepository('ManhattanPostsBundle:Post')->findOneById($id); if (!$post) { throw $this->createNotFoundException('Unable to find Post entity.'); } $document = new Attachment(); $document->addPost($post); $form = $this->createForm(new AttachmentType(), $document); $form->bind($request); if ($form->isValid()) { $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('console_news_documents', array('id' => $post->getId()))); } return $this->render('ManhattanPostsBundle:Document:documents.html.twig', array( 'entity' => $post, 'form' => $form->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(PhotoCreateRequest $request)\n {\n DB::beginTransaction();\n $photo = $this->createPhotoInstance($request->all());\n $photo->owner()->associate(auth()->user());\n $photo->save();\n\n $photo->location()->save(\n new PhotoLocation($request->only(...
[ "0.69726104", "0.67689604", "0.6723387", "0.6504086", "0.6366454", "0.636426", "0.636071", "0.63554937", "0.6308249", "0.6210118", "0.61672735", "0.6148431", "0.6077052", "0.60464895", "0.60335493", "0.6025153", "0.60214853", "0.6017426", "0.60113525", "0.6001169", "0.5992657...
0.0
-1
Displays a form to edit an existing Attachment entity.
public function editAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $document = $em->getRepository('ManhattanPostsBundle:Attachment') ->findOneByIdJoinPost($document_id); if (!$document) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $editForm = $this->createForm(new AttachmentType(), $document); return $this->render('ManhattanPostsBundle:Document:edit.html.twig', array( 'entity' => $document, 'edit_form' => $editForm->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r...
[ "0.7313674", "0.7073301", "0.6913725", "0.6901526", "0.6835631", "0.6715678", "0.66902244", "0.6689565", "0.6684678", "0.6674456", "0.6667076", "0.66635054", "0.6643036", "0.66376776", "0.6631607", "0.6620606", "0.6603884", "0.65765953", "0.65576696", "0.6549511", "0.6538451"...
0.6897075
4
Edits an existing Attachment entity.
public function updateAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $document = $em->getRepository('ManhattanPostsBundle:Attachment') ->findOneByIdJoinPost($document_id); if (!$document) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $editForm = $this->createForm(new AttachmentType(), $document); $editForm->bind($request); if ($editForm->isValid()) { $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('console_news_document_edit', array('id' => $id, 'document_id' => $document_id))); } return $this->render('ManhattanPostsBundle:Document:edit.html.twig', array( 'entity' => $document, 'edit_form' => $editForm->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Attachment $attachment)\n {\n $data = $request->all();\n $attachment->fill($data);\n $attachment->save();\n return redirect()->route('attachment.index');\n }", "public function update($id = null)\n {\n $attachment = $this->Attac...
[ "0.6940358", "0.66863227", "0.66678387", "0.6618783", "0.6502045", "0.6269806", "0.6240325", "0.61733574", "0.61345464", "0.61226195", "0.60483867", "0.60294735", "0.6023398", "0.5915604", "0.5908727", "0.59067714", "0.5872089", "0.5798749", "0.5760527", "0.5757321", "0.57252...
0.62401927
7
Deletes a Post entity.
public function deleteAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ManhattanPostsBundle:Attachment')->find($document_id); if (!$entity) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $em->remove($entity); $em->flush(); return $this->redirect($this->generateUrl('console_news_documents', array('id' => $id))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(Entity $post): void {\n\t\t$sql = \"DELETE p, c FROM post p LEFT JOIN comment c ON p.id = c.post_id WHERE p.slug = :slug\";\n\n\t\t$request = $this->pdo->prepare($sql);\n\t\t$request->execute([\n\t\t\t'slug' => $post->getSlug(), \n\t\t]);\n\t}", "public function delete() {\n\t\t$db = self:...
[ "0.75967354", "0.75843984", "0.7361133", "0.73482597", "0.730979", "0.7286891", "0.72386193", "0.7179393", "0.71759504", "0.7155827", "0.7135466", "0.7090645", "0.7080448", "0.70553327", "0.7054368", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.704...
0.0
-1
Builds tabs of the Wizard.
function buildTabs() { $this->_formBuilt = true; // Here we get all page names in the controller $pages = array(); $myName = $current = $this->getAttribute('id'); while (null !== ($current = $this->controller->getPrevName($current))) { $pages[] = $current; } $pages = array_reverse($pages); $pages[] = $current = $myName; while (null !== ($current = $this->controller->getNextName($current))) { $pages[] = $current; } // Here we display buttons for all pages, the current one's is disabled foreach ($pages as $pageName) { $disabled = ($pageName == $myName ? array('disabled' => 'disabled') : array()); $tabs[] = $this->createElement('submit', $this->getButtonName($pageName), ucfirst($pageName), array('class' => 'flat') + $disabled); } $this->addGroup($tabs, 'tabs', null, '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTabs() {}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n...
[ "0.7487054", "0.6603563", "0.6448827", "0.63951415", "0.6376598", "0.6342076", "0.63246083", "0.6316735", "0.62946516", "0.6253495", "0.6227628", "0.62228113", "0.61793476", "0.6155166", "0.61530346", "0.6118265", "0.6103463", "0.6070469", "0.6066338", "0.6050339", "0.5984342...
0.795176
0
Builds command buttons of the Wizard.
function buildButtons($disable = null, $commands = null) { $buttons = array('back', 'next', 'cancel', 'reset', 'dump', 'apply', 'process'); if (isset($commands)) { $buttons = array_merge($buttons, $commands); } if (!isset($disable)) { $disable = array(); } elseif (!isset($disable[0])) { $disable = array($disable); } $attributes = array('class' => 'cmdButton'); $confirm = array('class' => 'cmdButton', 'onclick' => "return(confirm('Are you sure ?'));"); $prevnext = array(); foreach ($buttons as $event) { switch ($event) { case 'cancel': $type = 'submit'; $attrs = $confirm; break; case 'reset': $type = 'reset'; $attrs = $confirm; break; default : $type = 'submit'; $attrs = $attributes; break; } if (in_array($event, $disable)) { $attrs['disabled'] = 'true'; } if ($event == 'dump') { $dump = $this->controller->_act[$event]; if ($dump === false) { continue; } $opts = array('1' => 'Progress2 dump info', '2' => 'Forms values container', '3' => 'Included Files', '4' => 'Declared Classes', '5' => 'Declared Actions'); $prevnext[] =&HTML_QuickForm::createElement('select', 'dumpOption', '', $opts); } $prevnext[] =&HTML_QuickForm::createElement($type, $this->getButtonName($event), ucfirst($event), HTML_Common::_getAttrString($attrs)); } $this->addGroup($prevnext, 'buttons', '', '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateButtons() {}", "public function addsButtons() {}", "protected function registerButtons() {}", "protected function registerButtons() {}", "protected function createButtons()\n {\n $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();\n\n...
[ "0.7672829", "0.6662608", "0.64239997", "0.64237934", "0.6387147", "0.6354915", "0.6313808", "0.62804395", "0.6232462", "0.6232462", "0.6232462", "0.6232462", "0.6232462", "0.6231556", "0.6231556", "0.6231556", "0.6231556", "0.6231286", "0.6231286", "0.6231286", "0.6231286", ...
0.6647811
2
Builds the form that define the main properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: main properties'); $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1'); $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2'); $this->addGroup($shape, 'shape', 'Shape:'); $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural'); $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse'); $this->addGroup($way, 'way', 'Direction:'); $autosize[] =& $this->createElement('radio', null, null, 'Yes', true); $autosize[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($autosize, 'autosize', 'Best size:'); $psize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $psize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $psize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $psize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $psize['position'] =& $this->createElement('text', 'position', 'position', array('disabled' => 'true')); $psize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($psize, 'progresssize', 'Size, position and color:', ' '); $this->addElement('text', 'rAnimSpeed', array('Animation speed :', '(0-1000 ; 0:fast, 1000:slow)')); $this->addRule('rAnimSpeed', 'Should be between 0 and 1000', 'rangelength', array(0,1000), 'client'); // Buttons of the wizard to do the job $this->buildButtons(array('back','apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress me...
[ "0.77083474", "0.6770756", "0.6582365", "0.62868875", "0.6283344", "0.6056346", "0.60378045", "0.60249215", "0.595588", "0.5948091", "0.57597005", "0.5717113", "0.57070196", "0.5703448", "0.5602351", "0.5581841", "0.5547263", "0.5502277", "0.5478038", "0.5475706", "0.5434613"...
0.76451546
1
Builds the form that define cell properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: cell properties'); $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32)); $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32)); $cellvalue['min'] =& $this->createElement('text', 'min', 'minimum', array('size' => 4)); $cellvalue['max'] =& $this->createElement('text', 'max', 'maximum', array('size' => 4)); $cellvalue['inc'] =& $this->createElement('text', 'inc', 'increment', array('size' => 4)); $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' '); $cellsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $cellsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $cellsize['spacing'] =& $this->createElement('text', 'spacing', 'spacing', array('size' => 2)); $cellsize['count'] =& $this->createElement('text', 'count', 'count', array('size' => 2)); $this->addGroup($cellsize, 'cellsize', 'Size:', ' '); $cellcolor['active'] =& $this->createElement('text', 'active', 'active', array('size' => 7)); $cellcolor['inactive'] =& $this->createElement('text', 'inactive', 'inactive', array('size' => 7)); $cellcolor['bgcolor'] =& $this->createElement('text', 'bgcolor', 'background', array('size' => 7)); $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' '); $cellfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 32)); $cellfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $cellfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($cellfont, 'cellfont', 'Font:', ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n ...
[ "0.6875267", "0.6660737", "0.61252147", "0.59181416", "0.5750583", "0.5628293", "0.56004137", "0.54911566", "0.5465777", "0.54592305", "0.5447524", "0.5405576", "0.5394894", "0.5352851", "0.5344981", "0.5321192", "0.5305566", "0.52538455", "0.51949364", "0.51825327", "0.51637...
0.7368667
0
Builds the form that define border properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: border properties'); $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $borderpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($borderpainted, 'borderpainted', 'Display the border:'); $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32)); $borderstyle['style'] =& $this->createElement('select', 'style', 'style', array('solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted', 'inset' => 'Inset', 'outset' => 'Outset')); $borderstyle['width'] =& $this->createElement('text', 'width', 'width', array('size' => 2)); $borderstyle['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($borderstyle, 'borderstyle', null, ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n ...
[ "0.69055814", "0.68195033", "0.61908114", "0.61072564", "0.5682266", "0.56485695", "0.5436292", "0.5436292", "0.5434116", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5430103", "0.53658926", "0.5246863", "0.5181012", "0.516103", "0.5084275", "0.50808173...
0.75592405
0
Builds the form that define label properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: string properties'); $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $stringpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:'); $this->addElement('text', 'stringid', 'Id:', array('size' => 32)); $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32)); $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32)); $stringsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $stringsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $stringsize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $stringsize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $stringsize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' '); $stringvalign[] =& $this->createElement('radio', null, null, 'Left', 'left'); $stringvalign[] =& $this->createElement('radio', null, null, 'Right', 'right'); $stringvalign[] =& $this->createElement('radio', null, null, 'Top', 'top'); $stringvalign[] =& $this->createElement('radio', null, null, 'Bottom', 'bottom'); $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:'); $stringalign[] =& $this->createElement('radio', null, null, 'Left', 'left'); $stringalign[] =& $this->createElement('radio', null, null, 'Right', 'right'); $stringalign[] =& $this->createElement('radio', null, null, 'Center', 'center'); $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:'); $stringfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 40)); $stringfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $stringfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($stringfont, 'stringfont', 'Font:', ' '); $stringweight[] =& $this->createElement('radio', null, null, 'normal', 'normal'); $stringweight[] =& $this->createElement('radio', null, null, 'Bold', 'bold'); $this->addGroup($stringweight, 'stringweight', 'Font weight:'); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress me...
[ "0.73174626", "0.7069547", "0.61137474", "0.6010999", "0.5921938", "0.590024", "0.58631486", "0.5731205", "0.5695295", "0.56791323", "0.56460327", "0.5556063", "0.5541505", "0.5540495", "0.5534142", "0.5522498", "0.54466337", "0.54130286", "0.5405719", "0.53947335", "0.537910...
0.67848015
2
Builds the form that show a preview of your progress bar design
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: run demo'); $this->addElement('static', 'progressBar', 'Your progress meter looks like:'); // Buttons of the wizard to do the job $this->buildButtons(array('reset','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n ...
[ "0.710235", "0.63623637", "0.62253284", "0.6152803", "0.60618824", "0.5923924", "0.57680374", "0.57551", "0.57166356", "0.56992376", "0.56499654", "0.5645377", "0.5642863", "0.56302464", "0.5626179", "0.5624876", "0.56189144", "0.56085944", "0.56044364", "0.55827785", "0.5565...
0.76990116
0
Builds the form that allow to save your PHP/CSS code
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: save PHP/CSS code'); $code[] =& $this->createElement('checkbox', 'P', null, 'PHP'); $code[] =& $this->createElement('checkbox', 'C', null, 'CSS'); $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:'); // Buttons of the wizard to do the job $this->buildButtons(array('next','apply')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beaver_extender_fe_style_editor_build_form() {\n\t\n?>\n\t\t<form action=\"/\" id=\"beaver-extender-fe-style-editor-form\" name=\"beaver-extender-fe-style-editor-form\">\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_fe_style_editor_save\" />\n\t\t\t<input type=\"hidden\" na...
[ "0.7886451", "0.68713915", "0.67178565", "0.6539944", "0.6483157", "0.6474773", "0.64229256", "0.6420625", "0.63697195", "0.63479596", "0.6323945", "0.63135266", "0.62959915", "0.6291068", "0.6272934", "0.6272123", "0.62512887", "0.6247538", "0.6239279", "0.6233017", "0.62312...
0.7944517
0
Display a listing of the resource.
public function index() { return Container::paginate(); }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { $container = new Container($request->all()); $container->save(); return $this->successResponse($container, '¡Contenedor registrado correctamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.63416...
0.0
-1
Display the specified resource.
public function show(Container $container) { return $this->successResponse($container); }
{ "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
Update the specified resource in storage.
public function update(Request $request, Container $container) { $container->update($request->all()); return $this->successResponse($container, '¡Contenedor actualizado correctamente!'); }
{ "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(Container $container) { $container->delete(); return $this->successResponse($container, '¡Contenedor enviado a la papelera correctramente!'); }
{ "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
Override to fix problem on coutry
public function getCountryHtmlSelect($type) { if($type == 'billing') { $address = $this->getQuote()->getBillingAddress(); /* $address = $this->getQuote()->getCustomer()->getPrimaryBillingAddress(); if (!$this->isCustomerLoggedIn() || $address == null) $address = $this->getQuote()->getBillingAddress(); */ } else { $address = $this->getQuote()->getShippingAddress(); /* $address = $this->getQuote()->getCustomer()->getPrimaryShippingAddress(); if (!$this->isCustomerLoggedIn() || $address == null) $address = $this->getQuote()->getShippingAddress(); */ } $countryId = $address->getCountryId(); if (is_null($countryId) || $countryId == '' || $countryId == ' ') { $countryId = Mage::getStoreConfig('general/country/default'); } $select = $this->getLayout()->createBlock('core/html_select') ->setName($type.'[country_id]') ->setId($type.':country_id') ->setTitle(Mage::helper('checkout')->__('Country')) ->setClass('validate-select') ->setValue($countryId) ->setOptions($this->getCountryOptions()); if ($type === 'shipping') { $select->setExtraParams('onchange="shipping.setSameAsBilling(false);"'); } return $select->getHtml(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function output() {}", "function output() {\n \n }", "protected function _output($data) {}", "public function serch()\n {\n }", "protected function _clearAndOutput() {}", "public function output() {\n }", "public function emitirSom()\n {\n }", "public static function o...
[ "0.60281885", "0.60188675", "0.5942657", "0.5905212", "0.58281714", "0.57719547", "0.57484466", "0.57482123", "0.56876653", "0.56279594", "0.56279594", "0.5618731", "0.5596647", "0.55584323", "0.5539451", "0.5534219", "0.55122787", "0.5512048", "0.55106145", "0.5509389", "0.5...
0.0
-1
Display a listing of the resource.
public function index(Request $request) { // // if($request->has("per_page")) { // // $sort = $request->get("sort"); // $sort_array = explode("|", $sort); // if ($request->sort != "") { // $transactions = Transaction::select("product_name","code","user_name","size","quantity","bought_price","sold_price","created_at")->orderBy($sort_array["0"], $sort_array[1])->paginate(40); // // // }else{ // $transactions = Transaction::select("product_name","code","size","user_name","quantity","bought_price","sold_price","created_at")->paginate(40); // } // // // return response()->json($transactions,200); // } $has_query=false; if($request->has("query")){ $query=$request->get("query"); $has_query=true; $transactions= Transaction::where( 'code', 'LIKE', '%'.$query.'%' ) ->orWhere('product_name', 'LIKE', '%'.$query.'%') ->orWhere('bill_no', 'LIKE', '%'.$query.'%') ->orWhere('user_name', 'LIKE', '%'.$query.'%') ->orderBy("created_at","desc") ->paginate(40); }else{ $transactions=Transaction::orderBy("created_at","desc")->paginate(40); } return view("inventory.transaction.index",compact("transactions","has_query","query")); // }
{ "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() { return view("inventory.transaction.create"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request,[ "stock_id"=>"required|exists:stocks,id", "quantity"=>"required", "price"=>"required", "billNo"=>"required" ]); $stock=Stock::findorfail($request->get("stock_id")); if($request->get("quantity")>$stock->quantity) return; $user=User::findorfail($stock->user_id); $transaction=new Transaction(); $transaction->product_name=$stock->product->name; $transaction->code=$stock->product->code; $transaction->quantity=$request->get("quantity"); $transaction->discount=0; $transaction->sold_price=$request->get("price"); $transaction->bought_price=$stock->bought_price; $transaction->bill_no=$request->get("billNo"); $transaction->code=$stock->code; $transaction->size=$stock->size->name; $transaction->user_id=$stock->user_id; $transaction->user_name=$user->name; $transaction->save(); $stock->quantity=$stock->quantity-$request->get("quantity"); $stock->save(); return response()->json([$stock->id,$stock->quantity],200); }
{ "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
Return a Map URL.
public function index() { // Loads all terms by vocabulary. $vid = 'sas_normativa'; $output = []; // Gets only father terms. $query = \Drupal::database() ->select('taxonomy_term_data', 'td') ->fields('td', ['tid']); $query->join('taxonomy_term_hierarchy', 'th', 'td.tid = th.tid'); $query->condition('td.vid', $vid) ->condition('th.parent', 0); $parent_tids = $query->execute()->fetchCol(); foreach ($parent_tids as $tid) { /** @var \Drupal\taxonomy\Entity\Term $term */ $term = Term::load($tid); $term_url = current($term->get('field_map_url')->getValue()); $url = filter_var($term_url['uri'], FILTER_VALIDATE_URL) ? $term_url['uri'] : '#'; $output[$term->id()] = [ 'name' => $term->getName(), 'url' => $url, ]; // Check if parent has children. $children = \Drupal::entityTypeManager() ->getStorage('taxonomy_term') ->loadTree($vid, $term->id()); if (!empty($children)) { foreach ($children as $child) { /** @var \Drupal\taxonomy\Entity\Term $term_child */ $term_child = Term::load($child->tid); $term_url = current($term_child->get('field_map_url')->getValue()); $url = filter_var($term_url['uri'], FILTER_VALIDATE_URL) ? $term_url['uri'] : '#'; $output[$term->id()]['children'][] = [ 'name' => $term_child->getName(), 'url' => $url, ]; } } } return [ '#theme' => 'map_url', '#terms' => $output, '#attached' => [ 'library' => ['map_url/map_url'], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function genMapsLink()\n {\n $city = str_replace(' ', '+', $this->getCity()->getCityName());\n $street = str_replace(' ', '+', $this->getStreet());\n $hno = str_replace(' ', '+', $this->getHouseNo());\n\n $url = \"https://maps.google.com?q=\" . $city . '+' . $street . '+' . $h...
[ "0.75371623", "0.7034539", "0.688014", "0.67182136", "0.6485782", "0.6479126", "0.64056385", "0.6398175", "0.6347809", "0.62826335", "0.6201406", "0.6167323", "0.6161241", "0.61537945", "0.61461097", "0.6090766", "0.6051659", "0.60376555", "0.6023853", "0.6010482", "0.6000835...
0.0
-1
Display a listing of the resource.
public function index() { $subscriber=Subscriber::orderBy('id','desc')->get(); return view('backend.subscriber.index',compact('subscriber')); }
{ "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() { return view('backend.subscriber.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'email'=>'required|unique:subscribers', ]); try { $category=new Subscriber; $file=$request->file('file'); $category->email=$request->email; if($category->save()){ $notification=array( 'alert-type'=>'success', 'messege'=>'Thankyou for Subscribing our Newsletter', ); return redirect()->back()->with($notification); }else{ $notification=array( 'alert-type'=>'info', 'messege'=>'Something wrong.Try again later', ); return redirect()->back()->with($notification); } } catch (\Throwable $th) { $notification=array( 'alert-type'=>'error', 'messege'=>'Something went wrong. Please try again later.', ); return redirect()->back()->with($notification); } }
{ "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 sendBulkMail(Request $request){ $subcriber=Subscriber::all(); foreach ($subcriber as $value) { Mail::to($value)->send(new newslater($request->all())); } }
{ "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
/ Usage In the following example we generate a select field with three options. mdx:Render Outputs: mdx:Render o httidy Notice: the `options` method also accepts other formats besides an associative array. Take a look at the documentation of the [HtChoice]( class in order to learn more.
function testRender(){ #mdx:Render $select = new HtSelect("id_category"); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); #/mdx echo $select $this->expectOutputRegex("/select.*?id.*?name.*?option.*?1.*?Category1.*?3.*?Category3.*?select/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hundope_select_field_render() { \n\t\n}", "public static function renderSelect();", "public function it_shows_select_input_with_options()\n {\n // configure\n $inputs = [\n [\n 'type' => 'select',\n 'name' => 'country',\n 'option...
[ "0.6602616", "0.65285176", "0.65074456", "0.64679456", "0.6366054", "0.62528723", "0.6250871", "0.6240499", "0.62020624", "0.6188851", "0.6174806", "0.61741877", "0.614924", "0.6126591", "0.61098266", "0.6106556", "0.6067673", "0.6064495", "0.60634756", "0.6050614", "0.605013...
0.6652916
0
/ Selecting an option If you have read the documentation of the `HtField` and the `HtWidget` parent classes you already know that you are supposed to use the `context` method in order to set the value of a field/widget: mdx:SelectedOption Outputs: mdx:SelectedOption o httidy
function testSelectedOption(){ #mdx:SelectedOption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->context(['id_category'=>2]); #/mdx echo $select $this->expectOutputRegex("/option.*?2.*selected/"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?...
[ "0.67317617", "0.67007697", "0.61267126", "0.6101564", "0.6092063", "0.6082261", "0.59615076", "0.5959076", "0.59364", "0.5885151", "0.58820623", "0.58743864", "0.58718723", "0.5857547", "0.58489746", "0.5836531", "0.5825224", "0.58173037", "0.58064955", "0.57943064", "0.5789...
0.71186876
0
/ Setting a caption The "caption" is the default text which appears on the select field when no option has been selected yet. This is usally a message indicating that the user should choose something: mdx:Caption Outputs: mdx:Caption o httidy
function testCaption(){ #mdx:Caption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:'); #/mdx echo $select $this->expectOutputRegex("/select.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaptionValue(){\n\t\t#mdx:CaptionValue\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none'\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?opti...
[ "0.72729474", "0.69511145", "0.6939236", "0.6899094", "0.6625466", "0.651141", "0.64263403", "0.64084697", "0.62733597", "0.6265194", "0.6231165", "0.6140197", "0.6131023", "0.6128065", "0.6066711", "0.6044273", "0.60297805", "0.60256106", "0.6001828", "0.5976827", "0.5966360...
0.7215593
1
/ Notice that by default the value "0" is used for the caption option. This means that when the form gets sent, if no option has been selected, then the "0" value will be sent as the category id, which in most cases would mean "no category". However, you can change that value if you want by using a second paramenter to the `caption` method: mdx:CaptionValue Outputs: mdx:CaptionValue o httidy
function testCaptionValue(){ #mdx:CaptionValue $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none' #/mdx echo $select $this->expectOutputRegex("/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaption(){\n\t\t#mdx:Caption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:');\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n...
[ "0.6484493", "0.6234255", "0.6195198", "0.6007746", "0.5943674", "0.5917132", "0.5907298", "0.5901107", "0.5729295", "0.5701957", "0.56089604", "0.5607314", "0.55738", "0.55517393", "0.55383116", "0.5505386", "0.55046487", "0.5491411", "0.5473566", "0.5465717", "0.5463196", ...
0.67867893
0
check to see if the master display setting is on
public function browsing_before_listings_column($params, Smarty_Internal_Template $smarty) { $reg = geoAddon::getRegistry($this->name); if (!$reg->browsing_filters_enabled) { return ''; } return $this->display_browsing_filters($params, $smarty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function is_master() {\n\t\treturn $this->_config->is_master();\n\t}", "private function has_master(){\n\t\tif($this->master==\"None\"){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function hasShowDisplay()\n {\n return $this->show_display !== null;\n }", "public funct...
[ "0.7242355", "0.71827495", "0.68063414", "0.6568732", "0.6526326", "0.6501586", "0.63494587", "0.6265772", "0.62612176", "0.62404495", "0.6102821", "0.609206", "0.608015", "0.60614306", "0.6058337", "0.59887844", "0.5975927", "0.59679526", "0.5964528", "0.5959535", "0.5955034...
0.0
-1
Run the database seeds.
public function run() { DB::table('news')->truncate(); $news = array( ['title' => 'news 0', 'imageUrl' => '3d.png', 'content' => 'Odit, itaque, deserunt corporis vero ipsum nisi eius odio natus ullam provident.'], ['title' => 'news 1', 'imageUrl' => 'compass.png', 'content' => 'Excepturi, obcaecati, quisquam id molestias eaque asperiores voluptatibus cupiditate error assumenda delectus odit similique earum .'] ); // Loop through each user above and create the record for them in the database foreach ($news as $s_news) { News::create($s_news); } }
{ "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
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 genre (id INT AUTO_INCREMENT NOT NULL, name LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(180) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE employee (id INT AUTO_INCREMENT NOT NULL, first_name LONGTEXT NOT NULL, last_name LONGTEXT NOT NULL, email VARCHAR(180) NOT NULL, password VARCHAR(255) NOT NULL, roles JSON NOT NULL, UNIQUE INDEX UNIQ_5D9F75A1E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE book (id INT AUTO_INCREMENT NOT NULL, employee_id INT DEFAULT NULL, genre_id INT DEFAULT NULL, name LONGTEXT NOT NULL, author LONGTEXT NOT NULL, INDEX IDX_CBE5A3318C03F15C (employee_id), INDEX IDX_CBE5A3314296D31F (genre_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE borrowed (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, borrow_date DATETIME NOT NULL, return_date DATETIME NOT NULL, INDEX IDX_2F44F8E5A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE books_borrowed (borrowed_id INT NOT NULL, book_id INT NOT NULL, INDEX IDX_464B489D64BC3968 (borrowed_id), INDEX IDX_464B489D16A2B381 (book_id), PRIMARY KEY(borrowed_id, book_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE book ADD CONSTRAINT FK_CBE5A3318C03F15C FOREIGN KEY (employee_id) REFERENCES employee (id)'); $this->addSql('ALTER TABLE book ADD CONSTRAINT FK_CBE5A3314296D31F FOREIGN KEY (genre_id) REFERENCES genre (id)'); $this->addSql('ALTER TABLE borrowed ADD CONSTRAINT FK_2F44F8E5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE books_borrowed ADD CONSTRAINT FK_464B489D64BC3968 FOREIGN KEY (borrowed_id) REFERENCES borrowed (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE books_borrowed ADD CONSTRAINT FK_464B489D16A2B381 FOREIGN KEY (book_id) REFERENCES book (id) ON DELETE CASCADE'); }
{ "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.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
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('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A3314296D31F'); $this->addSql('ALTER TABLE borrowed DROP FOREIGN KEY FK_2F44F8E5A76ED395'); $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A3318C03F15C'); $this->addSql('ALTER TABLE books_borrowed DROP FOREIGN KEY FK_464B489D16A2B381'); $this->addSql('ALTER TABLE books_borrowed DROP FOREIGN KEY FK_464B489D64BC3968'); $this->addSql('DROP TABLE genre'); $this->addSql('DROP TABLE user'); $this->addSql('DROP TABLE employee'); $this->addSql('DROP TABLE book'); $this->addSql('DROP TABLE borrowed'); $this->addSql('DROP TABLE books_borrowed'); }
{ "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.79502094", "0.7863702", "0.7606416", "0.7492738", "0.73199725", "0.7245919", "0.7187675", "0.7153845", "0.71537775", "0.71420383", "0.71353674", "0.71216005", "0.7115856", "0.7105365", "0.70985687", "0.7080349", "0.70783705", "0.7072629", "0.7068311", "0.7065529", "0.70536...
0.0
-1
Schreibt eine XMLDatei mit allen im Fileadmin befindlichen Dateien, ohne Pfadangabe zum Fileadmin
public function writeXmlResourceList() { // Neues XMLWriter-Objekt $this->xmlwriter = new \XMLWriter(); // Dokumenteneigenschaften $this->xmlwriter->openMemory(); $this->xmlwriter->setIndent(TRUE); $this->xmlwriter->startDocument('1.0'); // Document Type Definition (DTD) $this->xmlwriter->startDtd('resourcelist'); $this->xmlwriter->writeDtdElement('resourcelist', '(file)'); $this->xmlwriter->writeDtdElement('file', '(uid,pid,tstamp,crdate,type,storage,identifier,extension,mime_type,name,title,sha1,size,creation_date,modification_date,width,height,uuid)'); $this->xmlwriter->writeDtdElement('uid', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('pid', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('tstamp', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('crdate', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('type', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('storage', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('identifier', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('extension', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('mime_type', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('name', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('title', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('sha1', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('size', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('creation_date', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('modification_date', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('width', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('height', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('uuid', '(#PCDATA)'); $this->xmlwriter->endDtd(); // Daten schreiben $this->xmlwriter->startElement('resourcelist'); foreach ($this->fileList as $file) { $this->xmlwriter->startElement('file'); $this->xmlwriter->writeElement('uid', $file->getUid()); $this->xmlwriter->writeElement('pid', $file->getPid()); $this->xmlwriter->writeElement('tstamp', $file->getTstamp()); $this->xmlwriter->writeElement('crdate', $file->getCrdate()); $this->xmlwriter->writeElement('type', $file->getType()); $this->xmlwriter->writeElement('storage', $file->getStorage()); $this->xmlwriter->writeElement('identifier', $file->getIdentifier()); $this->xmlwriter->writeElement('extension', $file->getExtension()); $this->xmlwriter->writeElement('mime_type', $file->getMimeType()); $this->xmlwriter->writeElement('name', $file->getName()); $this->xmlwriter->writeElement('title', $file->getTitle()); $this->xmlwriter->writeElement('sha1', $file->getSha1()); $this->xmlwriter->writeElement('size', $file->getSize()); $this->xmlwriter->writeElement('creation_date', $file->getCreationDate()); $this->xmlwriter->writeElement('modification_date', $file->getModificationDate()); $this->xmlwriter->writeElement('width', $file->getWidth()); $this->xmlwriter->writeElement('height', $file->getHeight()); $this->xmlwriter->writeElement('uuid', $this->getUuid($file->getUid(), 'sys_file')); $this->xmlwriter->endElement(); } $this->xmlwriter->endElement(); $this->xmlwriter->endElement(); $this->xmlwriter->endDocument(); $writeString = $this->xmlwriter->outputMemory(); $file = GeneralUtility::tempnam('resource_'); GeneralUtility::writeFile($file, $writeString); $folder = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/deployment/media/' . date('Y_m_d', time()); GeneralUtility::mkdir($folder); GeneralUtility::upload_copy_move($file, $folder . '/' . date('H-i-s', time()) . '_resource.xml'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getActualFile(){\n\t\treturn $this->xmldir;\n\t}", "public function SaveXMLFile();", "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "protected function parseXmlFile() {}", "public function _xml_fields()\n {\n require_code('files');\n $full_path = ...
[ "0.61117387", "0.6020937", "0.5980788", "0.5951313", "0.59273994", "0.58811504", "0.58527964", "0.5803609", "0.58006555", "0.579879", "0.5788797", "0.5671248", "0.5567873", "0.5563062", "0.55348915", "0.5524854", "0.5495945", "0.5452236", "0.5432296", "0.5420363", "0.54015565...
0.0
-1
Schreibt eine Dateiliste des Fileadmins, ohne Deploymentdateien
public function readFilesInFileadmin() { $fileArr = $newArr = array(); // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/'; $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path); $pathCount = strlen($path); // deployment-Ordner exkludieren foreach ($fileList as $filekey => $filevalue) { if (strstr($filevalue, '/fileadmin/deployment') == FALSE) { $newArr[$filekey] = substr($filevalue, $pathCount); } } return $newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeLists() {\n\n\t\t// get lists file name\n\t\t$adminops_file = $this->settings['adminops_file'];\n\n\t\t// compile lists file contents\n\t\t$lists = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" . CRLF\n\t\t . \"<lists>\" . CRLF\n\t\t . \"\\t<titles>\" . CRLF;\n\t\tforeach ($this...
[ "0.6159149", "0.60997367", "0.604208", "0.578313", "0.57729435", "0.57020223", "0.56754524", "0.5642211", "0.5625906", "0.56167734", "0.55953205", "0.5579391", "0.5572567", "0.5568225", "0.5556994", "0.5549812", "0.55435014", "0.5527608", "0.5522776", "0.55180866", "0.5497576...
0.6809908
0