content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
<?php
/**
* Class MethodAdminController
*
* Admin controller class for MethodAdminController
*/
class MethodAdminController extends BaseAdminController
{
/**
* @var string
*/
public $layout = 'application.modules.Genetics.views.layouts.genetics';
protected $itemsPerPage = 100;
public fu... | __label__POS | 0.939158 |
<?php
use OE\factories\models\traits\HasFactory;
/**
* Created by PhpStorm.
* User: veta
* Date: 19/08/2017
* Time: 23:23
*/
class OphDrPrescription_DispenseLocation extends BaseActiveRecordVersioned
{
use MappedReferenceData;
use HasFactory;
protected function getSupportedLevels(): int
{
... | __label__POS | 0.968534 |
/*
* rdar://63133398 (XNU: load_machfile improperly validates macho_size)
*
* Chris J-D <chrisjd@apple.com>
* SEAR Red Team / 2020-May-18
*/
#include <err.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <fcn... | __label__POS | 0.990811 |
<?php
use OE\factories\models\traits\HasFactory;
/**
* Created by PhpStorm.
* User: veta
* Date: 19/08/2017
* Time: 23:23
*/
class OphDrPrescription_DispenseCondition extends BaseActiveRecordVersioned
{
use MappedReferenceData;
use HasFactory;
protected function getSupportedLevels(): int
{
... | __label__POS | 0.7954 |
<?php
/**
* This is the model class for table "ophdrprescription_edit_reasons".
*
* The followings are the available columns in table 'ophdrprescription_edit_reasons':
* @property integer $id
* @property string $caption
* @property integer $display_order
* @property string $created_date
* @property string $cre... | __label__POS | 0.671769 |
<?php
class m210329_032827_add_print_authorise_columns extends OEMigration
{
public function up()
{
$this->addOEColumn('et_ophdrprescription_details', 'printed_by_user', 'int(10) unsigned NULL', true);
$this->addOEColumn('et_ophdrprescription_details', 'printed_date', 'datetime NULL', true);
... | __label__POS | 0.850243 |
<?php
class m180809_053651_update_existing_tapers extends CDbMigration
{
public function up()
{
$transaction = $this->getDbConnection()->beginTransaction();
try {
$this->dropForeignKey('ophdrprescription_item_taper_frequency_id_fk', 'ophdrprescription_item_taper');
$this... | __label__POS | 0.817778 |
<?php
class m180126_123700_tag_common_alphablockers extends CDbMigration
{
public function up()
{
$this->execute("SET @alphatag=(SELECT id from tag where `name` = 'Alphablocker');
# DM+D
INSERT IGNORE INTO medication_drug_tag (medication_drug_id, tag_id)
SELECT id, @alpha... | __label__POS | 0.95434 |
<?php
class m210826_125524_import_legacy_signatures extends OEMigration
{
private const NEW_ET = "et_ophdrprescription_esign";
private const ITEM_TBL = "ophdrprescription_signature";
private const LEGACY_ET = "et_consultant_signature";
public function safeUp()
{
if ($this->dbConnection->sc... | __label__POS | 0.958686 |
//
// MPCInterface.swift
// MultipeerChat
//
// Created by dave on 05/07/24.
//
import Foundation
import MultipeerConnectivity
import SwiftUI
protocol Connectivity {
func initImpl(username: String, viewModel: ViewModel) -> Void
func isPaired() -> Bool
func getUsername() -> String
func sendState() -... | __label__POS | 0.917005 |
```{eval-rst}
.. index::
single: TensorFlow 2; convert BERT Transformer Models
```
# Converting TensorFlow 2 BERT Transformer Models
The following examples demonstrate converting TensorFlow 2 models to Core ML using Core ML Tools.
## Convert the DistilBERT Transformer Model
The following example converts the ... | __label__POS | 0.9578 |
<?php
/**
* @var string $side
* @var string $form_css_class
*/
$cost_code = $this->firm->cost_code ?: $this->getDefaultCostCode();
?>
<div class="fpten-form-row">
<div class="fpten-form-column <?= $form_css_class ?>-date">
<?= date('d/m/Y') ?>
</div>
</div>
<div class="fpten-form... | __label__POS | 0.95514 |
<?php
/**
* @var int $page_number
* @var string $form_css_class
*/
?>
<?php if ($page_number !== 0) : ?>
<p style="page-break-after: always;">
<!--PAGE BREAK-->
</p>
<?php endif; ?>
<div class="fpten-form-row">
<?php foreach (array('left', 'right') as $side) : ?>
<div class="<... | __label__POS | 0.988048 |
<?php
/**
* @var string $form_css_class
*/
?>
<?php $patient_has_address = isset($this->patient->contact->address); ?>
<div class="fpten-form-row">
<div class="fpten-form-column">
<div class="fpten-form-row">
<div class="fpten-form-column <?= $form_css_class ?>-age">
... | __label__POS | 0.987016 |
/**
* Created by veta on 08/04/15.
*/
$(document).ready(function () {
$('#site_id').change(function () {
this.form.submit();
});
$('#subspecialty_id').change(function () {
this.form.submit();
});
});
function DeleteCommonDrug(ssdId) {
if (ssdId === undefined) {
return fal... | __label__POS | 0.978349 |
```{eval-rst}
.. index::
single: classifier; nearest neighbor updatable
single: updatable nearest neighbor classifier
single: nearest neighbor classifier
```
# Nearest Neighbor Classifier
This topic demonstrates the process of creating an updatable empty k-nearest neighbor model using Core ML Tools.
## C... | __label__POS | 0.729286 |
```{eval-rst}
.. index::
single: PyTorch; model tracing
single: model tracing
single: TorchScript
```
# Model Tracing
The easiest way to generate TorchScript for your model is to use PyTorch's [JIT tracer](https://pytorch.org/docs/stable/generated/torch.jit.trace.html). Tracing runs an example input tens... | __label__POS | 0.710241 |
<main class="main-event <?php echo $this->moduleStateCssClass; ?>" id="event-content">
<h2 class="event-title">
<?php echo $this->title ?>
<?php if ($this->event->is_automated) { ?>
<span id="automated-event">
<?php $this->renderPartial('//patient/event_automated'); ?>
... | __label__POS | 0.840867 |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... | __label__POS | 0.978662 |
#
# For licensing see accompanying LICENSE file.
# Copyright (C) 2025 Apple Inc. All Rights Reserved.
#
import unittest
from open_r1.rewards import code_reward, get_code_format_reward
class TestCodeRewards(unittest.TestCase):
def setUp(self):
# Define test cases that will be used by both reward function... | __label__POS | 0.981614 |
<?php
/**
* Class PrescriptionFormPrinterTest
* @method patients($fixtureId)
* @method prescription_items($fixtureId)
* @method prescription_item_tapers($fixtureId)
* @method users($fixtureId)
* @method firms($fixtureId)
* @method sites($fixtureId)
*/
class PrescriptionFormPrinterTest extends OEDbTestCase
{
... | __label__POS | 0.820493 |
/*
* Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use thi... | __label__POS | 0.71683 |
<?php
class m190808_045047_create_cat_prom5_answer_results extends OEMigration
{
public function safeUp()
{
$this->createOETable('cat_prom5_answer_results', array(
'id' => 'pk',
'element_id' => 'int(11)',
'question_id' => 'int(11) NOT NULL',
'answer_id' =... | __label__POS | 0.936595 |
/**
* @fileoverview Helper methods for typed arrays.
*/
goog.module('protobuf.binary.typedArrays');
const {assert} = goog.require('goog.asserts');
/**
* @param {!ArrayBuffer} buffer1
* @param {!ArrayBuffer} buffer2
* @return {boolean}
*/
function arrayBufferEqual(buffer1, buffer2) {
if (!buffer1 || !buffer2) ... | __label__POS | 0.820781 |
goog.module('protobuf.binary.tag');
const BufferDecoder = goog.require('protobuf.binary.BufferDecoder');
const WireType = goog.require('protobuf.binary.WireType');
const {checkCriticalElementIndex, checkCriticalState} = goog.require('protobuf.internal.checks');
/**
* Returns wire type stored in a tag.
* Protos stor... | __label__POS | 0.981547 |
/**
* @fileoverview Helper methods for reading data from the binary wire format.
*/
goog.module('protobuf.binary.reader');
const BufferDecoder = goog.require('protobuf.binary.BufferDecoder');
const ByteString = goog.require('protobuf.ByteString');
const Int64 = goog.require('protobuf.Int64');
const {checkState} = go... | __label__POS | 0.957305 |
goog.module('protobuf.runtime.BinaryStorage');
const Storage = goog.require('protobuf.runtime.Storage');
const {checkDefAndNotNull} = goog.require('protobuf.internal.checks');
/**
* Class storing all the fields of a binary protobuf message.
*
* @package
* @template FieldType
* @implements {Storage}
*/
class Bin... | __label__POS | 0.913192 |
/*
##########################################################
# #
# __ __ _____ _ _ _____ _ _ _____ #
# \ \ / /\ | __ \| \ | |_ _| \ | |/ ____| #
# \ \ /\ / / \ | |__) | \| | | | | \| | | __ #
# \ \/ \/ / /\ \ |... | __label__POS | 0.770604 |
/**
* @fileoverview A buffer implementation that can decode data for protobufs.
*/
goog.module('protobuf.binary.BufferDecoder');
const ByteString = goog.require('protobuf.ByteString');
const functions = goog.require('goog.functions');
const {POLYFILL_TEXT_ENCODING, checkCriticalPositionIndex, checkCriticalState, ch... | __label__POS | 0.701097 |
<?php $questions = CatProm5Questions::model()->findAll(array('order'=>'display_order'));
$answerResults = $element->catProm5AnswerResults;
?>
<div class="element-fields full-width flex-layout cols-10">
<table>
<tbody>
<?php foreach ($questions as $ques) {
$index = $ques->id - 1;
... | __label__POS | 0.966463 |
/**
* @fileoverview Utilities to index a binary proto by fieldnumbers without
* relying on strutural proto information.
*/
goog.module('protobuf.binary.indexer');
const BinaryStorage = goog.require('protobuf.runtime.BinaryStorage');
const BufferDecoder = goog.require('protobuf.binary.BufferDecoder');
const WireType... | __label__POS | 0.872892 |
goog.module('protobuf.runtime.Storage');
/**
* Interface for getting and storing fields of a protobuf message.
*
* @interface
* @package
* @template FieldType
*/
class Storage {
/**
* Returns the pivot value.
*
* @return {number}
*/
getPivot() {}
/**
* Sets a field in the specified field nu... | __label__POS | 0.994399 |
<?php
class CatProm5EventResultTest extends ActiveRecordTestCase
{
public $model;
public $fixtures = array(
'elements' => 'CatProm5EventResult',
);
public function getModel()
{
return $this->model;
}
public function dataProvider_Search()
{
return array(
... | __label__POS | 0.825298 |
<?php
class CatProm5AnswerResultTest extends ActiveRecordTestCase {
public $model;
public $fixtures = array(
'answerRecords' => 'CatProm5AnswerResult',
);
public function getModel()
{
return $this->model;
}
public function dataProvider_Search()
{
return array(
... | __label__POS | 0.848717 |
<?php
class CatProm5QuestionsTest extends ActiveRecordTestCase
{
public $model;
public $fixtures = array(
'questions' => 'CatProm5Questions'
);
public function getModel()
{
return $this->model;
}
public function dataProvider_Search()
{
return array(
arr... | __label__POS | 0.781615 |
/**
* @fileoverview Proto internal runtime checks.
*
* Checks are grouped into different severity, see:
* http://g3doc/third_party/protobuf/javascript/README.md#configurable-check-support-in-protocol-buffers
*
* Checks are also grouped into different sections:
* - CHECK_BOUNDS:
* Checks that ensure that... | __label__POS | 0.755083 |
/**
* @fileoverview Kernel wrapper message.
*/
goog.module('protobuf.testing.binary.TestMessage');
const ByteString = goog.require('protobuf.ByteString');
const Int64 = goog.require('protobuf.Int64');
const InternalMessage = goog.require('protobuf.binary.InternalMessage');
const Kernel = goog.require('protobuf.runti... | __label__POS | 0.99987 |
/**
* @fileoverview Ensures types are live that would be live in a typical g3
* JS program.
*
* Making certain constructs live ensures that we compare against the same
* baseline for all code size benchmarks. This increases the size
* of our benchmarks, but note that this size in a regular app would be
* attribu... | __label__POS | 0.703016 |
<?php
/**
* OpenEyes.
*
* (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
* (C) OpenEyes Foundation, 2011-2014
* This file is part of OpenEyes.
* OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Softw... | __label__POS | 0.659216 |
<?php
class m141014_100611_remove_filter_settings_service extends OEMigration
{
public function up()
{
$this->addColumn('patientticketing_queueset', 'filter_priority', 'boolean NOT NULL DEFAULT true');
$this->addColumn('patientticketing_queueset', 'filter_subspecialty', 'boolean NOT NULL DEFAUL... | __label__POS | 0.821428 |
<?php
class m220113_152620_update_event_site_id_from_patientticketing extends OEMigration
{
public function safeUp()
{
if ($this->isColumnExist('patientticketing_ticketqueue_assignment', 'assignment_site_id')) {
$sql = <<<SQL
SELECT t.event_id AS event_id, a.assignment_site_id a... | __label__POS | 0.941004 |
<?php
class m220124_143112_add_patientticketing_user_widget_assignment_table extends OEMigration
{
public function safeUp()
{
$this->createOETable('patientticketing_user_widget_assignment', [
'id' => 'pk',
'widget_id' => 'VARCHAR(255)',
'ticket_id' => 'INTEGER NOT NU... | __label__POS | 0.610256 |
<?php
class m141209_160405_rename_table extends CDbMigration
{
public function up()
{
$this->dropForeignKey('patientticketing_appointment_type_last_modified_user_id_fk', 'patientticketing_appointment_type');
$this->dropForeignKey('patientticketing_appointment_type_created_user_id_fk', 'patientt... | __label__POS | 0.98533 |
Overview
--------
The directory layer is tested by adding some additional instructions and state to
the existing stack tester. Each 'thread' of the stack tester should have its own
directory testing state.
Additional State and Initialization
-----------------------------------
Your tester should store three addition... | __label__POS | 0.706671 |
<?php
use Foo\TestEnum;
use Foo\TestMessage;
use Foo\TestMessage\Sub;
use Foo\TestPackedMessage;
use Foo\TestUnpackedMessage;
define('MAX_FLOAT_DIFF', 0.000001);
if (PHP_INT_SIZE == 8) {
define('MAX_INT_STRING', '9223372036854775807');
define('MAX_INT_UPPER_STRING', '9223372036854775808');
} else {
defin... | __label__POS | 0.747814 |
<?php
/**
* @var OEModule\PatientTicketing\models\Ticket $ticket
*/
$display_queue = $ticket->getDisplayQueueAssignment();
$is_patient_called = null;
$data = json_decode($display_queue->details,true);
if($data) {
if (array_key_exists('value', $data[0])) {
if (is_array($data[0]['value'])) {
$i... | __label__POS | 0.859058 |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
... | __label__POS | 0.635161 |
<?php
namespace Google\Protobuf\Internal;
use Google\Protobuf\EnumValueDescriptor;
class EnumDescriptor
{
use HasPublicDescriptorTrait;
private $klass;
private $legacy_klass;
private $full_name;
private $value;
private $name_to_value;
private $value_descriptor = [];
public function ... | __label__POS | 0.959587 |
/* For licensing see accompanying LICENSE file.
Copyright (C) 2024 Apple Inc. All Rights Reserved.
*/
// prompt for GPT 4
import { getCleanCSS } from "./PromptHelpers";
export function Prompt4Multiples(prompt, css, svg, numDesigns) {
let fullPrompt = `You are writing CSS for animating the SVG contained with... | __label__POS | 0.632854 |
#include "google/protobuf/compiler/code_generator.h"
#include "google/protobuf/io/zero_copy_stream.h"
#include "google/protobuf/io/printer.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include "schema_proto2_to_proto3_util.h"
#include "google/protobuf/compiler/plugin.h"
using ... | __label__POS | 0.600746 |
package com.apple.foundationdb.tuple;
import java.nio.charset.Charset;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class ByteArrayUtilTest {
@Test
void printableWorksForAllByteValues(){
//Quick test to make sure that no bytes are unprintable
byte[] bytes = new byte[2*((... | __label__POS | 0.927005 |
#ifndef PROTOBUF_BENCHMARKS_UTIL_SCHEMA_PROTO2_TO_PROTO3_UTIL_H_
#define PROTOBUF_BENCHMARKS_UTIL_SCHEMA_PROTO2_TO_PROTO3_UTIL_H_
#include "google/protobuf/message.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include <sstream>
#include <algorithm>
using google::protobuf::Des... | __label__POS | 0.871191 |
package com.apple.foundationdb;
import com.apple.foundationdb.tuple.Tuple;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadLocalRandom;
import org.junit.jupiter.a... | __label__POS | 0.710217 |
<?php
class m210831_071100_add_consent_show_patient_questions extends OEMigration
{
public function safeUp()
{
$exists_meta_data = $this->dbConnection->createCommand()->select('id')->from('setting_metadata')->where('`key` = :setting_key', array(':setting_key' => 'consent_show_patient_questions'))->quer... | __label__POS | 0.688484 |
<?php
class m210824_113212_consent_type_assessment extends OEMigration
{
public function up()
{
$this->createOETable(
'ophtrconsent_type_assessment',
array(
'id' => 'pk',
'element_id' => 'int(10) unsigned',
'type_id'... | __label__POS | 0.840883 |
<?php
class m211115_125200_generate_necessary_esign_elements extends OEMigration
{
const first_element_date = "2019-12-01";
const signatory_element = "et_ophtrconsent_esign";
public function safeUp()
{
$event_type_id = $this->getIdOfEventTypeByClassName("OphTrConsent");
$this->dbConne... | __label__POS | 0.961016 |
<?php
class m210810_115137_migrate_risks_from_benfitrisk extends OEMigration
{
public function safeUp()
{
if (!$this->verifyTableExists('et_ophtrconsent_benefitrisk_risk')) {
return true;
}
$this->alterOEColumn('et_ophtrconsent_benfitrisk', 'risks', 'mediumtext', true);
... | __label__POS | 0.923759 |
<?php
class m210729_133900_add_et_best_interest_decision extends OEMigration
{
public function up()
{
if ($this->dbConnection->schema->getTable('et_ophtrconsent_best_interest_decision', true) === null) {
$this->createOETable("et_ophtrconsent_best_interest_decision", array(
'... | __label__POS | 0.730363 |
<?php
class m140212_135544_table_versioning extends OEMigration
{
public function up()
{
$this->addColumn('ophtrconsent_type_type', 'active', 'boolean not null default true');
$this->addColumn('ophtrconsent_leaflet', 'active', 'boolean not null default true');
$this->versionExistingTab... | __label__POS | 0.918668 |
<?php
class m210902_074011_adding_consent_form_extra_procedure_tables extends OEMigration
{
public function up()
{
$this->dropForeignKey('et_ophtrconsent_extraprocedure_eye_id_fk', 'et_ophtrconsent_extraprocedure');
$this->dropForeignKey('et_ophtrconsent_extraprocedure_booking_event_id_fk', 'et... | __label__POS | 0.783823 |
<?php
class m210731_100000_add_et_medical_capacity_advocate extends OEMigration
{
public function up()
{
if ($this->dbConnection->schema->getTable('et_ophtrconsent_medical_capacity_advocate', true) === null) {
$this->createOETable("et_ophtrconsent_medical_capacity_advocate", array(
... | __label__POS | 0.8226 |
<?php
class m210903_051349_create_ophtrconsent_extra_proc_subspecialty_assignment_table extends OEMigration
{
public function up()
{
$this->createOETable(
'ophtrconsent_extra_proc_subspecialty_assignment',
array(
'id' => 'pk',
'extra_proc_id' => '... | __label__POS | 0.651529 |
<div class="cols-10">
<?= $form->hiddenField($element, 'booking_event_id') ?>
<table class="cols-full large-text">
<colgroup>
<col class="cols-3">
</colgroup>
<tbody>
<?php foreach ($element->procedure_assignments as $i => $procedure) {
$eye_id = (... | __label__POS | 0.839703 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_06DieSonne_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_06DieSonne_RAW
stem_dir: Bach10_06DieSonne_STEMS
stems:
S01:
component: ''
filename: Bach10_06DieSonne_STEM_01.wav
i... | __label__POS | 0.619658 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_02AchLiebenChristen_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_02AchLiebenChristen_RAW
stem_dir: Bach10_02AchLiebenChristen_STEMS
stems:
S01:
component: ''
filename: Bach10_0... | __label__POS | 0.628739 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_01AchGottundHerr_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_01AchGottundHerr_RAW
stem_dir: Bach10_01AchGottundHerr_STEMS
stems:
S01:
component: ''
filename: Bach10_01AchGottu... | __label__POS | 0.646447 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_07HerrGott_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_07HerrGott_RAW
stem_dir: Bach10_07HerrGott_STEMS
stems:
S01:
component: ''
filename: Bach10_07HerrGott_STEM_01.wav
i... | __label__POS | 0.624313 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_09Jesus_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_09Jesus_RAW
stem_dir: Bach10_09Jesus_STEMS
stems:
S01:
component: ''
filename: Bach10_09Jesus_STEM_01.wav
instrument: b... | __label__POS | 0.636372 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_05DieNacht_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_05DieNacht_RAW
stem_dir: Bach10_05DieNacht_STEMS
stems:
S01:
component: ''
filename: Bach10_05DieNacht_STEM_01.wav
i... | __label__POS | 0.638183 |
<?php
class m140820_152443_rbac extends CDbMigration
{
public function up()
{
$this->insert('authitem', array('name' => 'TaskEditGeneticTest', 'type' => 1));
$this->insert('authitem', array('name' => 'TaskViewGeneticTest', 'type' => 1));
$this->insert('authitemchild', array('parent' =>... | __label__POS | 0.677778 |
<?php
class m161123_102417_fix_patient_pedigree extends OEMigration
{
public function up()
{
$this->renameTable('patient_pedigree', 'genetics_patient_pedigree');
$this->dropForeignKey('patient_pedigree_patient_id_fk', 'genetics_patient_pedigree');
$this->alterColumn('genetics_patient_pe... | __label__POS | 0.957101 |
<?php
class m170613_135445_genetics_add_more_relation_type extends CDbMigration
{
public function up()
{
$this->update('genetics_relationship', array('relationship' => 'Sibling (full)'), 'relationship = "Sibling"');
$relationships = array(
"Son",
"Daughter",
... | __label__POS | 0.766135 |
<?php
class m140820_144737_bloodsample_rbac extends CDbMigration
{
public function up()
{
$this->insert('authitem', array('name' => 'TaskEditBloodSample', 'type' => 1));
$this->insert('authitem', array('name' => 'TaskViewBloodSample', 'type' => 1));
$this->insert('authitemchild', array... | __label__POS | 0.676051 |
<?php
class m161107_131809_rejectable_study_participation extends OEMigration
{
public function up()
{
$statuses = array(
'Approved',
'Rejected',
);
$this->createOETable('study_participation_status', array(
'id' => 'pk',
'status' => 'varc... | __label__POS | 0.971557 |
<?php
class m161025_124555_genetic_study extends OEMigration
{
public function up()
{
$this->createOETable('genetics_study', array(
'id' => 'pk',
'name' => 'varchar(255) NOT NULL',
'criteria' => 'text',
'end_date' => 'datetime',
), true);
... | __label__POS | 0.72359 |
<?php
class m140929_115949_laboratory_rbac extends OEMigration
{
public function up()
{
$this->addRole('Genetics Laboratory Technician');
$this->addTask('TaskEditGeneticsWithdrawals');
$this->addOperation('OprnEditGeneticsWithdrawals');
$this->addOperationToTask('OprnEditGeneti... | __label__POS | 0.998308 |
<?php
class m140820_151115_rbac extends CDbMigration
{
public function up()
{
$this->insert('authitem', array('name' => 'TaskEditDNAExtraction', 'type' => 1));
$this->insert('authitem', array('name' => 'TaskViewDNAExtraction', 'type' => 1));
$this->insert('authitemchild', array('parent... | __label__POS | 0.646295 |
<?php
class m161114_103506_pedigree_additions extends OEMigration
{
public function up()
{
$this->createOETable('pedigree_base_change_type', array(
'id' => 'pk',
'change' => 'varchar(50)',
));
$this->addColumn('pedigree', 'base_change_id', 'int(11)');
$th... | __label__POS | 0.977274 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_10NunBitten_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_10NunBitten_RAW
stem_dir: Bach10_10NunBitten_STEMS
stems:
S01:
component: ''
filename: Bach10_10NunBitten_STEM_01.wav
... | __label__POS | 0.623406 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_04ChristeDuBeistand_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_04ChristeDuBeistand_RAW
stem_dir: Bach10_04ChristeDuBeistand_STEMS
stems:
S01:
component: ''
filename: Bach10_0... | __label__POS | 0.659514 |
album: ''
artist: Bach10
composer: ''
excerpt: 'yes'
genre: Classical
has_bleed: 'no'
instrumental: 'yes'
mix_filename: Bach10_03ChristederdubistTagundLicht_MIX.wav
origin: Bach10
producer: ''
raw_dir: Bach10_03ChristederdubistTagundLicht_RAW
stem_dir: Bach10_03ChristederdubistTagundLicht_STEMS
stems:
S01:
compon... | __label__POS | 0.626763 |
<?php
/**
* Class GeneController
*
* Contains the actions pertaining to genes
*/
class GeneController extends BaseModuleController
{
public $layout = 'genetics';
protected $itemsPerPage = 20;
/**
* Configure access rules
*
* @return array
*/
public function accessRules()
{... | __label__POS | 0.661708 |
<?php
/**
* Class BaseChangeAdminController
*
* Admin controller class for PedigreeBaseChangeType
*/
class BaseChangeAdminController extends BaseAdminController
{
/**
* @var string
*/
public $layout = 'genetics';
protected $itemsPerPage = 100;
public function accessRules()
{
... | __label__POS | 0.738127 |
def get_eval_prompt(prompt_mode="default"):
"""
prompt_mode: default, 'correctness', 'detailed_orientation', 'context', 'temporal', 'consistency'
"""
system_prompt = {
"default": "You are an intelligent chatbot designed for evaluating the correctness of generative outputs for question-answer pai... | __label__POS | 0.976796 |
<?php $current_uri = '/' . $this->module->id . '/' . $this->id . '/' . $this->action->id; ?>
<?php if ($this->checkAccess('Genetics Admin')) : ?>
<nav class="oe-full-side-panel">
<h3>Admin</h3>
<ul>
<?php
$sidebarLinks = array(
'Amino Acid C. Type' => Yii::app()->createUrl('/Genetics/a... | __label__POS | 0.996503 |
<?php
class m200630_223053_create_operationchecklists_event_element_set_assignment_table extends OEMigration
{
public function up()
{
// Creating Table
$this->createOETable('ophtroperationchecklists_event_elementset_assignment', array(
'id' => 'pk',
'step_id' => 'int(11)... | __label__POS | 0.733053 |
<?php
class m200630_080422_create_operationchecklists_element_set_item_table extends OEMigration
{
public function up()
{
$this->createOETable('ophtroperationchecklists_element_set_item', array(
'id' => 'pk',
'set_id' => 'int(11)',
'element_type_id' => 'int(10) unsig... | __label__POS | 0.690399 |
<?php
class m200705_015948_create_operationchecklists_discharge_response_table extends OEMigration
{
public function up()
{
$this->createOETable('ophtroperationchecklists_discharge_results', array(
'id' => 'pk',
'element_id' => 'int(11)',
'question_id' => 'int(11)',
... | __label__POS | 0.74803 |
<?php
class m221010_003220_amend_patient_messages_view extends OEMigration
{
public function up()
{
$this->execute("CREATE OR REPLACE VIEW v_patient_messages AS
SELECT
m.id AS message_id,
ev.patient_id AS patient_id,
m.event_id AS event_id,
m.message_type_id AS messa... | __label__POS | 0.990075 |
;/*
; derived from: FreeBSD @(#)syscalls.master 8.2 (Berkeley) 1/13/94
;
; System call name/number master file.
; This is file processed by .../xnu/bsd/kern/makesyscalls.sh and creates:
; .../xnu/bsd/kern/init_sysent.c
; .../xnu/bsd/kern/syscalls.c
; .../xnu/bsd/sys/syscall.h
; .../xnu/bsd/sys/sysproto.h
; .../xnu/bsd/... | __label__POS | 0.699317 |
<?php
/**
* @var string $selectedPreviewType
* @var array $previewGroups
* @var array $previewsByYear
*/
$navIconUrl = Yii::app()->assetManager->getPublishedUrl(Yii::getPathOfAlias('application.assets.newblue'), true) . '/dist/svg/oe-nav-icons.svg';
$previewWidth = @Yii::app()->params['lightning_viewer']['image_... | __label__POS | 0.90612 |
# 第三章 字符串、向量和数组
## 练习3.1
使用恰当的using 声明重做 1.4.1节和2.6.2节的练习。
解:
1.4.1
```cpp
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
int sum = 0;
for (int val = 1; val <= 10; ++val) sum += val;
cout << "Sum of 1 to 10 inclusive is " << sum << endl;
return 0;
}
```
2.6.2 类似
## 练习... | __label__POS | 0.975035 |
<?php
/**
* @var $model_list ElementType[]|EventType[]
* @var $errors array
*/
$model_name = str_replace('Type', '', get_class($model_list[0]));
$event_name = null;
?>
<h3>Event custom text</h3>
<?php echo $this->renderPartial('_form_errors', array('errors' => $errors)) ?>
<?= CHtml::beginForm(array('id' => 'custom... | __label__POS | 0.733801 |
# 第十八章 用于大型程序的工具
大规模应用程序的特殊要求包括:
- 在独立开发的子系统之间协同处理错误的能力。
- 使用各种库进行协同开发的能力。
- 对比较复杂的应用概念建模的能力。
## 异常处理
**异常处理**(exception handling)机制允许程序中独立开发的部分能够在运行时就出现的问题进行通信并作出相应的处理。
### 抛出异常
在C++语言中,我们通过**抛出**(throwing)一条表达式来**引发**(raised)一个异常。异常类型和当前的调用链决定了哪段**处理代码**(handler)将用来处理该异常。
程序的控制权从`throw`转移到`catch`模块。
**栈展开**:当... | __label__POS | 0.986993 |
#include "ex_12_27.h"
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
TextQuery::TextQuery(ifstream& ifs) : file(new vector<string>)
{
string text;
while (getline(ifs, text))
{
file->push_back(text); // 保存文本
int n = file->size() - 1; // 当前行号
istringstream line... | __label__POS | 0.844767 |
#ifndef EX12_27_H
#define EX12_27_H
#include <fstream>
#include <memory>
#include <vector>
#include <string>
#include <map>
#include <set>
class QueryResult; //为了定义函数query的返回类型,这个定义是必须的
class TextQuery
{
public:
// 行号的类型
using line_no = std::vector<std::string>::size_type;
TextQuery(std::ifstream&);
QueryResu... | __label__POS | 0.940223 |
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
// from ex 10.9
void elimdups(std::vector<std::string> &vs)
{
std::sort(vs.begin(), vs.end());
auto new_end = std::unique(vs.begin(), vs.end());
vs.erase(new_end, vs.end());
}
void biggies(std::vector<std::string> &vs, std::size_... | __label__POS | 0.861145 |
//
// Created by cer
// chapter 3
// 字符串、向量和数组
#include <iostream>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
using std::bitset;
void basic_getline(){
string line;
while (getline(cin, line))
... | __label__POS | 0.990662 |
#include <iostream>
#include <tuple>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <numeric>
#include "ex_17_4_SalesData.h"
using namespace std;
// matches有三个成员:1.一个书店的索引。2.指向书店中元素的迭代器。3.指向书店中元素的迭代器。
typedef tuple<vector<Sales_data>::size_type,
vector<Sales_data>:... | __label__POS | 0.937138 |
//
// Created by cer
// chapter 1
// 开始
#include <iostream>
#include "Sales_item.h"
void basic_io(){
std::cout << "Enter two numbers:" << std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
}
void basic_while(... | __label__POS | 0.973184 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.