query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
aa90d16de562367d2230696ee46813ef | 17903b55589c609f23d5e174bdb94e65 | 删除采购退货 | class ErpReturnedController extends BaseController
public function delReturnedPurchase(){
if(IS_AJAX){
$id = intval(I('param.id', 0));
$data = $this->getEvent('ErpReturned')->delReturnedPurchase($id);
$this->echoJson($data);
}
} | 1 |
e36ffd64fb88ab6dfcf927bd955798c3 | 377fc9fa3783d97833fdab24591053aa | Renvoie une liste de devis d'un client dont les attributs sont similaires aux paramètres. | class mDevis extends CI_Model
public function getCountDevisByClient($idClient) {
$this->db->from($this->_tblName);
$this->db->where('idClient', $idClient);
return $this->db->count_all_results();
} | 0 |
6cde869c9c6e13ad46cc295aedb767cb | 99f34f4b7f4ed1dff447b954bd808e3e | Gets collection of all public event types | export class SettingsService
public getEventTypes(): Array<EventType> {
return this.settings.eventTypes;
} | 1 |
1ad90bfdf33d3f8c3bb43512230f82f9 | 05da6d2b957a9041af1c084214fd993b | Constructor. All values passed to the constructor are accessible as fields
on the data object. | class DataObject implements \ArrayAccess, DataObjectInterface
public function __construct(array $data = [])
{
$this->data = $data;
} | 1 |
bd3e12b8b31ad4412d5e56caad130f87 | 0af3d8e9509d97040a78c5bf55c10fae | write node in bracket format (Penn treebank style) | class Tree:
def _to_bracket(self, node):
if node.isPos():
pos_tag = node.value
word = node.children[0].value
s = '('+' '.join([pos_tag, word])+')'
return s
else:
string = []
for child in node.children:
string.append(... | 1 |
e2a0bbe178f9175b0c8d95978bbc2c5d | 481e973a5e0738126894bda8ddce2647 | Link the TabLayout and the ViewPager2 together. Must be called after ViewPager2 has an adapter
set. To be called on a new instance of TabLayoutMediator or if the ViewPager2's adapter
changes.
adapter. | class SpreaderViewPagerHelper private constructor(
private val tabLayout: SpreaderTabLayout,
private val viewPager: ViewPager?
)
fun attachWith(tabLayout: SpreaderTabLayout, viewPager: ViewPager?) {
SpreaderViewPagerHelper(tabLayout, viewPager).setupWithViewPager()
} | 0 |
0df6e14d7ad60596a63d12d703421899 | f7c24b843ec8c169c8e445ce419928db | Get all the amenities selected by the user | class Place(BaseModel, Base):
def amenities(self):
amenitylist = []
for amenity in list(models.storage.all(models.Amenity).values()):
if amenity.id in self.amenity_ids:
amenitylist.append(amenity)
return amenitylist | 1 |
2413ebe94e25d2613d5389f5ca99d812 | a5d4208e2356133935512ca4830e4102 | Получение данных пасспорта | $view = TemplateManager::GetView('PasportField');
$filed_render = new $view($this);
return $filed_render->render();
} | 0 |
b4b5285100bc36e27bcc34ff00e9697f | a96c7f75c513dacc1b24503927bb4b20 | Muestra por pantalla el mensaje de bienvenida del juego. | class Host():
def wellcome(self):
msg = "Bienvenid@ %s, en el siguiente juego usted debe pensar un número de 4 cifras (sin repetirse) y el ordenador adivinará cual es la cifra que eligió.\nIndicar cuantas cifras son correctas y cuantas regular(correctas pero en otra posición)." % self.name.upper()
print(msg) | 1 |
27969030140c0e160424bbea7c5347d1 | 3d2a0a36a70c529c2e613323b32ee0ba | Builds the core package of the Python-API. | def full_build(test_output="", noseflags=""):
execute(clean)
execute(pylint_for_build)
execute(fast_tests, test_output=test_output, noseflags=noseflags)
execute(package) | 1 |
a4aa068493d4c24cd7112c9b594581d3 | 88ba9239d008129b1fb658b7416a67e1 | Common Child | {
int i = 0, j = 0, k = 0;
int mini = INT_MIN;
vector<int> ans;
while (i < n1 && j < n2 && k < n3)
{
if (A[i] == B[j] && A[i] == C[k] && A[i] != mini)
{
mini = A[i];
ans.push_back(A[i]);
i++;
j++;
k++;
}
else... | 0 |
be90b04bb9b3e7e31c425ce7185b71f5 | bdd703cb5dc9a33fa252114e2ca88994 | 获取故障的总故障编码 | namespace BLL.PerformanceAlarm
public class BLLUnitPerformance
public DataSet GetFAULTCATEGORY()
{
return DCA.GetFAULTCATEGORY();
} | 0 |
e5b23f919464153c62b9acf7215b9b72 | 930df86f6149df2fc8b039ce913d646b | CHECK: index type: index | func TestParsingIndexExpression(t *testing.T) {
input := "myArray[1 + 1]"
l := lexer.New(input)
p := New(l)
program := p.ParseProgram()
checkParserErrors(t, p)
stmt, ok := program.Statements[0].(*ast.ExpressionStatement)
indexExp, ok := stmt.Expression.(*ast.IndexExpression)
if !ok {
t.Fatalf("exp not ast.Ind... | 1 |
1cb9c1bcece3920a16f480a9ca7eacd8 | b6691058ca69a428ed33da05fa0b6936 | Выполняет команду 1С. | namespace Coco_R
void Execute(Modulo cmd); | 0 |
924ad87f2abc546915a298d5a7134db5 | aabd2145b63096f4f9956f708a75a8f3 | Teste de Integração entre as classes Palestras e Sessão | public class SesionTest
@Test
public void getSala1() {
Sala sala = new Sala(2);
System.out.println("Sesion: Prueba getSala1");
sala.anadirSesion(ses1);
assertNotNull(ses1.getSala());
} | 0 |
d3cf181d81da5d16e47a26eda9b379e7 | bb5996e6acbb6a8d1fe54511169936b8 | 根据组织ID查询后3级 | @Query(value = "select u.ID as USER_ID,u.USER_NAME,u.USER_NAME_CN from au01_user u where u.ID in (select o.ORG_LEADER from au02_organization o where o.ID=:orgId)" ,nativeQuery = true)
List<JSONObject> queryOrgFgld(@Param("orgId")String orgId); | 0 |
24936fc8018e43d5647fad6547a50705 | 1845acff987ff6c914251dbc286f08bb | Continues the enumeration of relays started using <c>yFirstRelay()</c>.
<para>
Caution: You can't make any assumption about the returned relays order.
If you want to find a specific a relay, use <c>Relay.findRelay()</c>
and a hardwareID or a logical name.
</para> | {
if (this.currentEnumerator == null)
{
if (!this.topEnumerator.MoveNext())
{
return false;
}
this.currentEnumerator = this.topEnumerator.Current.GetEnumerator();
... | 1 |
33d3afb51e8f67bffae663bd6f2a0c6a | a358b3c8b68d11b5185761818edfdf9d | Generate inertial readings given position and attitude. | self._inertial_frame_id = msg.header.frame_id
if len(self._inertial_frame_id) == 0:
self._inertial_frame_id = 'world'
self._x = msg.point.x
self._y = msg.point.y
self._z = msg.point.z
self._max_forward_speed = msg.max_forward_speed
self._use_fixed_head... | 0 |
0ecb5cc5303bb8e8fa7eeb4a428b581a | 77eaf21e768edb9c84dd324aacaf50c9 | 添加缓冲界面,若layoutRes为0则表示移除 | class SnackbarUtils
fun addView(layoutId: Int, index: Int): SnackbarUtils {
if (getSnackbar() != null) {
val addView = LayoutInflater.from(getSnackbar()!!.view.context).inflate(layoutId, null)
return addView(addView, index)
} else {
return this
}
} | 0 |
947b591a869c05fa84477ec5ff0d00a9 | 0d18f5a9dfa7f8d33f336081fe44a9bc | Funcion para controlar password incorrecto | function controlla_password() {
localStorage.verifica = "PasswordErrata";
location.href = "../Registrazione/login.html";
} | 1 |
7fed40f13bd3638d915803fbf0d25b56 | 3d7b37f6996ef189adbda6a5e4397fd9 | 获取数据库中所有已加锁程序的包名集合 | public class WatchDogDao
public List<String> queryAllLockedPackageNames() {
List<String> list = new ArrayList<>();
SQLiteDatabase database = openHelper.getReadableDatabase();
Cursor cursor = database.query(WatchDogOpenHelper.TABLE_NAME, new String[]{"packageName"},
null, null, nu... | 1 |
92470fa54bfe02711141f35e7aa428fc | fd037257c6010fcf5ee7add33f14b87e | 存储设备数据接口测试 | print "开始执行test006"
url=self.data.get_value('device_list','url')
path=self.data.get_value('device_list','path')
path2=self.data.get_value('device_list','path2')
method=self.data.get_value('device_list','method')
print method
base_params=self.data.get_value('device... | 1 |
2432e7d49f8ea871e6b6b5e0811b3039 | 2ae4fca5db840b10003687b1742def93 | 实现一个字节的位反转 | namespace LCL
public static class ByteExtensions
public static byte ReverseBit(this byte b, int index)
{
b ^= (byte)(1 << index);
return b;
} | 0 |
624c405c33ff17d6cfc8d7fe3cb52fa6 | 978e8dd462cc2fe73d24c13c6bee29d5 | Adds a line to the list of menubar lines. | public function addLine(): void; | 1 |
ef41c4e92cb6a02374587a92ca169598 | 1dfa99ea394011be6380a1d759778726 | 设置作者author和机构author_org | $this->authorName = $name;
$this->authorLink = $link;
$this->authorIcon = $img;
} | 0 |
9b24515b6e2be37ffc325d65c03936ce | 29eb3b7dd5e334c49741e3924125d9ba | Sets the user_name of this UserSimple. | public class CreateUserCompletionDTO
public void setUserName(String userName) {
this.userName = userName;
} | 0 |
0d59ae3bd7490e99dfaf51d360dc925e | e80ce7f88051b604c05a26824e39b56f | 加工房产地址,将地区码转换成详细地址,并获取经纬度 | print 'addr_to_loc()'
if '梅花路' in address:
address = address.replace('梅花路', '锦绣路梅花路')
if '号' in address:
address2 = address.split('号')[0]+'号'
elif '弄' in address:
address2 = address.split('弄')[0]+'号'
elif '路' in address:
address2 = address.split('路')[0]+'路'
elif '中心' in address:
address2 = address.split... | 1 |
4741643fca58386f3905288222f42911 | 507f169749128d4fe748f7ed6cf15c23 | 鼠标移动到固定位置ele | g_ele = ele;
tipPosition = {x: getLeft(ele), y: (getTop(ele) + ele.offsetHeight + 4)};
} | 0 |
91e45e94d1cb2629d876c43b7373e59f | c7437905cff308d9a9787c1828783173 | Get all the Products which it's stock is 50 or lower | {
dataGridView1.DataSource = db.Products.Where(x => x.UnitsInStock > 20 && x.UnitsInStock < 50).OrderByDescending(y => y.UnitPrice).Select(x => new
{
x.ProductName,
x.ProductID,
x.UnitsInStock,
x.UnitPrice
}).ToL... | 0 |
ab5eed7e4b7ce81dc5bfdeae3393bbb1 | 41bb7487be1034dd8841ea9b1e5a12a2 | Demodulating symbol from noisy received vector | int decoderInitializerBPSK(vector<double> &channelOutput, vector<double> &codeword, vector<double> &fade_a, vector<double> &fade_b, double sigma, double E_sender)
{
if(channelOutput.size()!=codeword.size()) {
cout<<"input codeword not right!"<<endl;
return -1;
}
else if (fade_a.size()!=fade_b.size()) {
... | 1 |
17d4c12f40e8baeed5efdb4fc0e47650 | b85a8a717c4ebb4275199ae88e5eb055 | POST method for handling delete Author request. | {
$author = Author::findOrFail($id);
$author->delete();
return redirect('/admin/authors')->with('danger', 'Author is successfully removed');
} | 1 |
0179b7627886e8c976271bf1c205a171 | 9fb5783a554873aa2ed9e54830fb17ab | Функция подготавливает объект со значениями полей для отправки на сервер | {
$insert_fields = array('object_id'=>$object['id'], 'lang'=>Core::$_lang);
if (is_array($fields))
{
foreach($class['fields'] as $field)
{
if (isset($fields[$field['name']]) || isset($fields[$field['id']]))
{
if (isset($fields[$field['name']])) $value = $fields[$field['name']];
else $valu... | 1 |
196a6c1d9c774bfb1eada25486335c5e | 9cfe6849b7bb22ffb0252c4dee55fbd7 | Initializes the collC004tActaAies collection (array).
By default this just sets the collC004tActaAies collection to an empty array (like clearcollC004tActaAies());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, setting the initial arra... | abstract class BaseFixtureFecha extends BaseObject implements Persistent
public function initPartidoss()
{
$this->collPartidoss = array();
} | 0 |
f96dc4309089d0d1080afdbd9bcfbec2 | e51e7651ed5b70dcca80843e77cbc3f3 | Returns the numbers of routes that are to be displayed in RouteFragment. | abstract public class OnboardingSupportFragment extends Fragment
protected abstract int getPageCount(); | 0 |
cc4f670b9931ad3d2d8fc357c879717f | 5d543dcfd542c7038058d8070df117a3 | 查询未同步至惠配货的核销记录的外部关联ID | public List showPurchaseRejectOutIdListBySourceid(String sourceid) throws Exception; | 1 |
a651c4b3039ec920d337db63d93c8a34 | c9c0f6e4fe4af84e6c00a32a6729f6c6 | 注册服务到kong | {
ConsulClient client = new ConsulClient(c =>
{
c.Address = new Uri("http://localhost:8500/");
c.Datacenter = "dc1";
});
string ip = configuration["ip"];
int port = int.Parse(configuration["port"]);
client.Ag... | 0 |
c491e99a31735f8eba63fadf4ed5a53d | 13748610be3167c28d86618d6f77d7a5 | Updates last used topic of user | if(user.getInt("highest_level") < topicData.getInt("level")) {
user.put("best_topic", currentTopic);
user.put("highest_level", topicData.getInt("level"));
}
return user;
} | 0 |
d6b654b876f7cd6aa2515e316db85d85 | 289b74fc773d79b82c38aaf0af4850e4 | Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapStartServiceStep <em>Start Service Step</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Command_start_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Command_start_feature",
"_UI_Command_type"),
... | 0 |
e7c0f4ea2ae1d9962067ecc96fa043ce | e0de8b7f071c965ffb7aab1c378c764a | Výška stromu, rekurzívne určenie | try:
if (root is None):
return -1
else:
return 1 + max(heightTree(root['left']),
heightTree(root['right']))
except Exception as exp:
error.reraise(exp, 'BST:heihgTree') | 1 |
60ea5d528dcfc37e10d6a65c729b7ce1 | 0979ee2e6aa34f28e83cd09ac0d7334c | парсит загруженные в локальный кеш файлы и пишет данные в БД | namespace dirhash
class Program
private static void DbWorker()
{
while (true)
{
if (FilesHashQueue.Count == 0)
Thread.Sleep(1);
else
try
{
List<KeyValuePair<string, str... | 1 |
e55acc5fc85d51d8cc63cbac1ae0231f | 09b2714172313687c2ceb10a6075e4d6 | 建立COTP包 | let nonce = crypto.randomBytes(16);
let cipher = crypto.createCipheriv(algorithm, password, nonce)
let buf = Buffer.concat([cipher.update(data), cipher.final()])
let tag = cipher.getAuthTag();
let cmdHead = Buffer.alloc(4);
cmdHead.writeUInt32BE(nonce.length + buf.lengt... | 1 |
348dbbf4a54399a0b8c5aaae26be8144 | 879928eb853c83e9c6a91e63b237bbcf | テキストをダブルクリックしたときの処理 | var target = event.target;
modifyMainText(target);
helper.addDOMEvent(target, target.main, 'mousedown', mainClick);
} | 0 |
d4f590d901974745ec6d847e520798b8 | e7003d95b280cb44b1415edd4313d1e0 | Train using an HDF5 dataset with one-hot target conversion. | self.load_metadata(inputs=train_inputs)
self.make(is_train=True)
self.init()
start_time = datetime.now()
model_name = self.name
train_loss: List[float] = []
train_accuracy: List[float] = []
val_loss: List[float] = []
val_accuracy: List[float] = []
... | 0 |
d4ffcfb95413524c56603a181a69ce7f | c0c462b236ff7524b00032094f14c954 | Get the existing item inserted into the hashmap the earliest | namespace Orvid.Concurrent.Collections
internal class Segment<TStored,TSearch>
public bool GetOldestItem(ref TStored key, out TStored item, ConcurrentHashtable<TStored, TSearch> traits)
{
var searchHash = traits.GetItemHashCode(ref key);
var mask = (UInt32)(_List.Length - 1);
... | 1 |
4c7f335f734110fcde7e05334300a454 | b149180db6411d2126b5256002a7c68f | containsAny方法检查给定的String是否包含给定字符集中的任何字符。这组字符可以以String或char varargs的形式传递。 | func testContainsAny(s, chars string) bool {
return strings.ContainsAny(s, chars)
} | 1 |
6c0336cc763e8cc36128f6be4b87a388 | 621a794505ea6885440ab4cfd26bf366 | Extract an S3 bucket key from an S3 url. | key_start = object_url.find("aws.com/") + len("aws.com/")
key_end = object_url.find("?")
if key_end == -1:
key_end = len(object_url)
return object_url[key_start:key_end] | 1 |
0ead18e3c669d1b99afa364020ce2547 | 44d14e26d40269ee9c496206e6a33eb5 | Batch Amend Order | if($_SESSION['access'] == 'admin') {
extract($_POST);
if (!get_magic_quotes_gpc()) {
$notes = $this->db->real_escape_string($notes);
}
$orderValue = str_replace ('$' ,'' , $order_value);
$payment = str_replace ('$' ,'' , $payment);
$shipping = str_replace ('$' ,'' , $shipping);
$orderGST = ($... | 1 |
dd6535911d593164d333a1a146603d17 | ec4c015a6b5e2a6ccf29576d6a0a4345 | 读取地址数据到缓存。 | {
string selectSqlStr = "select * from NMCCity";
List<NMCCity> list = SqlHelper.Default.ExecuteList<NMCCity>(selectSqlStr);
MemoryCacheHelper.Set(cacheKey, list, DateTime.Now.AddHours(8));
} | 1 |
b79d7cc1b0a05ac97fb592e9d1ddbed6 | ad7f7da36dd451db614356f38a8c2a18 | Executes when "Settings" menu item is selected from TrayIcon//s context menu. | namespace EIAP
public partial class FormMain : Form
private void toolStripMenuItemSettings_Click(object sender, EventArgs e)
{
buttonSettings_Click(sender, e);
} | 0 |
120876ed14f3c34a27e915abef70edc2 | 96cead158d31d1ca8997456dad571e59 | Validates feature columns DNNLinearCombinedRegressor. | class DNNRegressorTest(test.TestCase):
def testRegression_MatrixData(self):
cont_features = [feature_column.real_valued_column('feature', dimension=4)]
regressor = dnn.DNNRegressor(
feature_columns=cont_features,
hidden_units=[3, 3],
config=run_config.RunConfig(tf_random_seed=1))
inp... | 0 |
ed92efe45f83c6b76d4f68d2af2e7e5a | 2ed9664135a27283e0d8819e6640cf88 | Creates an <see cref="Maybe{T}"/> that Just contains the given non-null
<paramref name="value"/>. | namespace Monads.Maybe
public class MaybeMaker<A> : IMonadMaker<Maybe, A, Maybe<A>>
public Maybe<A> Unit(A value) => MaybeMonad.Unit(value); | 1 |
633c6d2fb5f864fd382a50c9c847a883 | d9c354f5e9bfea163b1e8b957cf6e838 | 背包点击物品保护 | public class CollectionGroupBagItem : MonoBehaviour
public void OnClickCannotAccept()
{
List<int> Items = new List<int>();
List<int> Counts = new List<int>();
Tab_Handbook tHandBook=TableManager.GetHandbookByID(this.id,0);
if(tHandBook==null)
{
return;
}
... | 0 |
4e186e62b1def1d1518b12b7e67fb5cc | a5fd7bd0115892a65de73c920d324ae1 | Determines what objects are on the deck and returns a dictionary {object type: [(slot, robot coordinate positions)]} | if frame is None:
_, frame = self.camera.read()
frame = imutils.resize(frame, width=self.resize_width)
clean_frame = np.copy(frame)
if len(self.deck_roi) == 2:
name_to_boxes_map = self.object_detector.detect(frame, self.deck_roi)
else:
nam... | 1 |
24988bce723222ea1b548a22225eca42 | 10b68a46eeba28a54d4d1ef119659c04 | 货物月均价格下跌指数 | {
var mdm = new double[prices.Length];
mdm[0] = 0d;
for (var i = 1; i < prices.Length; ++i)
{
var plusDm = candles[i].High - candles[i - 1].High;
var minusDm = candles[i - 1].Low - candles[i].Low;
if (plusDm < 0)
... | 0 |
940a843de30debcb47d060f2c590a906 | a12f685b619ab1808272d535574b9260 | Get bookings starts between the given dates. | List<Booking> getAllBookingsBetweenDates(LocalDate from, LocalDate to) throws ServiceException; | 1 |
1bffdbd62120a3b8c949680f4165ee14 | 2edec3b2157e06affc04b665d12695a1 | Repace all ticket types associated with this event ID, with those ticket types in the `$tickets` array. | class Event extends \HbgEventImporter\Entity\PostManager
public function saveTicketTypes()
{
if (isset($this->additional_ticket_types)) {
update_field('field_5ae2e55f94974', $this->additional_ticket_types, $this->ID);
}
} | 0 |
0f239b9b92dfca354dac76ea79021b70 | 6513965b9164d3e19d0f5e01509503bd | {@link com.internousdev.bentopad.dto.bentopadDTO#getName()} のためのテスト・メソッド。 | public void testGetName() {
System.out.println("getName");
String expResult = "Nickel";
String result = instance.getName();
assertEquals(expResult, result);
} | 1 |
a7a2fe5f9a36b00ae1782721a22475a3 | eea93d84dca1c3b60f5d231637cfec30 | <p>발송할 SMS리스트를 가져온다. | @Transactional(value = "transactionManager")
@Component
@Slf4j
public class MemberJoinFOComponentImpl extends AbstractComponent implements MemberJoinFOComponent
@Override
public List<MemberWebSelectResult> selectSmsListForMember(MemberBoDTO dto) {
return memberBaseSelectService.selectSmsListForMember(dto);
} | 1 |
7408680641cd2183284c43a684cc15ba | 7832867a312ccfd5c0b122f9b5f7cf33 | # function to clean API response calls | x = httr::status_code(res)
if (x != 200) {
stop("The API returned an error", call. = FALSE)
}
} | 0 |
7784e6bdaaaaa700789f52e22f64c6ee | ae2022bcd343de548d1a86a812f9af75 | Receive Command###################################################################### | {
switch( cmd )
{
case 0x30:
{
SCommCTCmd ctCmd;
memcpy(&ctCmd, data, dataSize);
sigGen.Config(100, ctCmd.CTRefMin/MAX_CURR, ctCmd.CTRefMax/MAX_CURR);
currentIdPid.SetParams(ctCmd.Kp_current, ctCmd.Ki_current, -0.8, 0.8);
currentIqPid.SetParams(ctCmd.Kp_current, ctCmd.Ki_current, -0.8, 0.8);
E... | 1 |
80fe395ae17d2a651b5a9d1d655d5edc | e684376f9c9eb014436d42f9228b892b | This function takes an image, and returns the value of the distance (in pixles) that the line is
from the center of the image | def LineCorr(image, offset=1):
top = image[:-offset,:]
bottom = image[ offset:,:]
return np.sum(top * bottom) / np.sqrt(np.sum(top * top) *
np.sum(bottom * bottom)) | 0 |
896a3ae188330ad9d5e5f3dc45c31d5c | 02f9cc894bfb5754d04338c9e466f1e2 | Performs a check of all permissions on files and folder in the core directory.
Validates Request, Checks the environment. | {
if (!$this->checkPermissions()) {
return $this->modx->lexicon('access_denied');
}
return true;
} | 0 |
4813ca8d09a50d8d1eedc77a83c988b9 | 7818e3cd9b2be06a47babc8e4711e1ae | Tests attribute iteration. | job = _make_job()
for name, _ in getmembers(
Job, lambda x: type(x) is Attribute):
v = object()
setattr(job, name, v)
self.assertEqual(getattr(job, name), v) | 1 |
e198089fa267086d26bac0ae8882b150 | 88b9be929ab23b247e0be3b39250f53c | Clears the current selection of the combo box and the molecular weight to be empty | output_tb.delete("1.0",END)
gene_tb.delete("1.0",END)
gene_name.delete(0,END)
protein_name.delete(0,END)
gene_name.insert(END, " ...(Name of mRNA) ...")
protein_name.insert(END, " ...(Name of protein) ...") | 0 |
fcc4f15ff50471ab8b738e17f7e568be | 06518822f05faac36f74ec307553bb40 | 绑定删除表关系复选框事件 | function bindAttrRemoveEvent() {
$dlg.find('img').off('click').on('click', function () {
me.removeAttrVal($(this).closest('tr'));
fixIndex();
});
} | 0 |
80cf4d2f17b93e10b20875661bebf117 | bb2c8a62823e054ccdb9d56f3644caa8 | Returns the before event handler collection | {
return array(
Events::PRE_ADD_FROM_STRING => array(
'onAddFromString',
-100
),
Events::PRE_BUILD_FROM_ITERATOR => array(
'onBuildFromIterator',
-100
)
);
} | 1 |
701b26838f2ee85b291418bd42d86b2b | eaad091b0c249a52108176e570d4db0f | 实名认证-更新图片资质 | public void userRealNameEdit() throws Exception {
operator = getOperator();
data = new HashMap<String, Object>();
long id = paramLong("id");
String realNameVerifyRemark = paramString("realNameVerifyRemark");
int realNameStatus = paramInt("realNameStatus");
userIdentifyService.userAttestationEdit(id, realNa... | 0 |
8c73c89d4bea9e99d9f5095463f81e20 | 22aeb6ca80e5b016e01c74656d3f75cc | Check if <alias> has a value | class CloudRepoSourceContext extends \DrSlump\Protobuf\Message
public function hasAliasContext(){
return $this->_has(4);
} | 1 |
0991aed235aea722b3249bd347fd1157 | efbdd0402774fd7362af76aeca19a92f | 学生获取自己报修的已维修订单 | public List<RepairRecordCustom> findRepairRecordByStudentId(@Param("studentId")String studentId) throws Exception; | 1 |
0a26d2b622109b81092ae5a0c4b5af44 | e99c9f1228cf9ba8352bb115cd7cc73c | Returns the configured credentials provider. | public final class BigtableInstanceAdminSettings
public CredentialsProvider getCredentialsProvider() {
return stubSettings.getCredentialsProvider();
} | 1 |
17cbbeb1fb2618acce9d1f32a35fc2d0 | c088da8919f0be1d99906b65164e5401 | Gets the displayable completions. These will be the completions that the
user is to see when deciding what option to select. For example
the actual completion might be to turn 'anobject.completion'
into 'anobject["completion"]'. But the user would see just 'completion'
in the list. | object[] GetCompletions(INakedObjectAdapter inObjectAdapter, string autoCompleteParm, INakedFramework framework); | 1 |
6e79bb439ef8bca47458d2df5703a549 | ab7e90ad0130d405f185e3f8f47cf101 | Returns the title of this excel file | class LaravelExcelReader
public function getTitle()
{
return $this->excel->getProperties()->getTitle();
} | 1 |
e0474e198a25a77e1a205f050643fa40 | ac2ca84ab163af214bf7c4c2642c16ee | Implements the critic head of an actor-critic neural network for value function approximation. | class Critic(keras.Model):
def __init__(self):
super(Critic, self).__init__()
self.fc1 = layers.Dense(100, kernel_initializer='he_normal')
self.fc2 = layers.Dense(1, kernel_initializer='he_normal') | 1 |
9480fc73fb45f05482b3d87dafb8fb27 | ed22fade402c9a91f32bfd2a2840d01d | 获取记录条数(异步) | namespace JZ.IMS.IRepository
Task<int> GetRecordCountAsync(string conditions, object parameters = null); | 1 |
5ce223689df380b7755c89dae5cf4121 | 4bd0ae746bb8d8398b66135579585185 | Generate OS specific property keys | Properties osProperties = System.getProperties();
System.out.println(osProperties.get("os.name"));
System.out.println(
osProperties.get("os.name").toString().startsWith("Window") ? "windows" : "unix"
);
System.out.println(osProperties.get("os.arch"));
Syst... | 0 |
8543ba00474060658a66cd59474751c6 | d291bd66067912faea37742b64ac6eeb | 条件にマッチする要素をすべて削除しその要素数を返します。 | namespace Unicoen.Model public abstract class UnifiedExpressionCollectionBase<TElement, TSelf>
: UnifiedExpression, IUnifiedCreatable<TSelf>,
IUnifiedElementCollection<TElement>, ICopiable
where TElement : UnifiedElement
where TSelf : UnifiedExpressionCollectionBase<TElement, TSelf>
public bool Remov... | 0 |
346e0248a9025b16451af7075fe36b04 | 3adaaedae6cdb3e4709e9fcaf23f6d3d | apresenta a View para se inserir um novo Agente | class AgentController extends Controller
public function create(){
return View::make('agent.create');
} | 1 |
c4d8647623089b0c4561319e48cfd9bb | 27c6414ea8d8361ac962f0a8165ba4bb | Returns macros collection from db. | return $http.get(macrocalcURL).then(sendMacroResult, sendErrorToService);
function sendMacroResult(response) {
return response.data;
}
function sendErrorToService(error) {
return $q.reject(error);
}
} | 1 |
f9a41febdfa31dd214b34a806035ac7f | 14be75ac12fe5c7e6bab364118c9b1e0 | If the object encoding is using uniform encoding, obtain the type
id of the uniform type. | namespace Tangosol.IO.Pof.Reflection
public abstract class AbstractPofValue : IPofValue
class PofValueReader : PofStreamReader
public virtual object ReadValue()
{
return PofValue.IsUniformEncoded
? base.ReadAsObject(PofValue.TypeId)
... | 1 |
5614411759cb3aedda72ec5ca6c217bd | 8b9841a6eafa15e865025a9f2e25da48 | Set Orientation method generates a random
orientation for a character | class SeaBattleSetUp():
def orientation(self):
orient = random.randrange(2)
return orient | 1 |
9757d871d37b238c74f910d879437fb2 | 568d7f8076935a49d8573feeeef83af8 | Training op on task B. | class ImprintModel(object):
def eval_step_b(self, sess, task_b_data):
prediction_b, y_b = sess.run(
[self.prediction_b_all, self.labels_b_v_all],
feed_dict={
self.inputs_b: task_b_data.x_train,
self.labels_b: task_b_data.y_train,
self.inputs_b_v: task_b_data.x_tes... | 0 |
be0871c09bf05996e4233df5b12bb17c | c4cc78133e99fad8d7fe3d79435a6f11 | 获取添加经理所需参数 | function getAddCustomerGroupParams(){
var customerid = $('#a_customer').attr('customerid'); customerid = $.trim(customerid);
var remark = $('#remark').val();
return {
customerid: customerid,
remark: remark
}
} | 0 |
089c61b569f22c656ce8da42c33e8cd2 | 7241dca9a0c8617aa572477e3535f1d7 | kayıt listeleme butonuna bastığımızda kayıt listeleme formunu çağırıyorz | namespace Music
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
{
listele();
} | 0 |
03e4bac1eb3d7267a10193ae926e53db | 67315ed0806d87a476f19b590d31b6e0 | Tags owned by the current user only | class PrivateTagsApiTests(TestCase):
def test_tags_limited_to_user(self):
user2 = get_user_model().objects.create_user(
'other@gmail.com',
'testpass'
)
Tag.objects.create(user=user2, name='Fruity')
tag = Tag.objects.create(user=self.user, name='Comfort Food')
... | 1 |
fe3790690aeca42724f8dba6414e2e05 | 0de6316ad0c309777041f01ce242556a | Sirve para consultar la cantidad maxima de registros para
solcitud de CAE o Informacion de CAEA | {
try
{
return _manifiesto_niquel.listarMaximaCantidadTulas();
}
catch(Excepcion ex)
{
throw ex;
}
} | 0 |
bf62373b03edb668f69c0f0097659b24 | 1aac601c87656f49cfec9519136ef102 | Returns the filename for a cropped/scaled/masked file. | $file_name_only = pathinfo( $file_name, PATHINFO_FILENAME );
$file_extension = strtolower( pathinfo( $file_name, PATHINFO_EXTENSION ) );
$crop_extension = '';
if ( true === $crop ) {
$crop_extension = '-c';
} elseif ( is_array( $crop ) ) {
$crop_extension = '-' . implode( '', array_map( function( $posit... | 1 |
ac8403cd413766ee86b739a403d4088b | b37b7b54de0a4fc6c0be90d908157754 | 判断团队人数是否和竞赛人数相等 | {
int result = team.Count;
foreach (var obj in team)
{
if (obj.GetSize() == 2)
{
result++;
}
}
return result;
} | 0 |
5d2b60f69502b5d0a59788f427463af7 | afa3b4135b8bb2b39c212f108cfe3167 | Test a successful script execution with autocommit on. | $conn = $this->getMock( 'MockPDO' );
$db = new DboTestSource();
$db->setConnection( $conn );
$db->useNestedTransactions = false;
$db->nestedSupport = true;
$conn->expects( $this->once() )->method( 'beginTransaction' )->will( $this->returnValue( true ) );
$conn->expects( $this->never() )->method(... | 0 |
92a2bc0e9b29f88cdc6f0d749a176421 | 422ccf423f28abe199fca07993ea1c7c | Test against stored scipy results | def test_pearsonr_same_as_scipy(a, b):
xs_corr = pearson_r(a, b, 'time')
xs_p = pearson_r_p_value(a, b, 'time')
scipy_corr, scipy_p = pearsonr(a, b)
assert np.allclose(xs_corr, scipy_corr)
assert np.allclose(xs_p, scipy_p) | 1 |
11a2355563910b2a96e30580a424d05d | 7b39e0f180140bb477963c0ab533acdd | Select a node to ping using randomised round-robin as per
section 4.3 of the paper.
(helps to provide time bounded strong completeness) | fn select_bucket_ping<'a, I>(nodes: I) -> Option<NodeEntry>
where
I: Iterator<Item=&'a BucketEntry>
{
let now = Instant::now();
nodes
.filter(|n| n.backoff_until < now)
.min_by_key(|n| n.last_seen)
.map(|n| n.address.clone())
} | 0 |
8093cf76d2ba88fd2f06b71bc9225da7 | 4de8b210e6df39ff6ad5fa33be5a98d8 | By default, automatically size columns to fit visible content. | C autoWidth(boolean autoWidth); | 1 |
36f417d109d83dae5dcbbbcd9cd87d74 | 9114f3227ea96fbe717f870979ba0e08 | 获取用户其他信息(阅读次数,体验次数,通关次数) | function getOtherUserInfoMethod(getUserInfParams){
console.log(getUserInfParams)
mineObj.getAToken.httpFn({
url: getUserInfParams.urlOtherUserInfo,
type: 'POST',
data: getUserInfParams.jsonData,
success: function (data) {
var data = data.data;
console.log(... | 0 |
a9b7f5d199903b83bbed3dd50578fc7d | f6a6b6c28e9451767b87dbbc5046c888 | Sweeps the field of the magnet power supply, vs angle of the sample holder. Units are Tesla!!!
This function takes field values as its input. These
values have to be specified in Tesla!
This function performs a magnetic field sweep for every angle in Avector.
Generates a 2d data file.
Input:
supply (qtlab.instrument) ... | ds = self.as_yt(B_field)
lower_boundary = self.project_boundary(self.range.x, self.range.y).value
lines = trace_fieldlines(ds, number_fieldlines, lower_boundary=lower_boundary, **kwargs)
coordinates, field_strengths = [], []
with ProgressBar(len(lines), ipython_widget=kwargs.get(... | 0 |
b0afd4f1ca07cf4153f7f8acf6546708 | a3d8fa79b7815fe693a05e3ff5912975 | llena select con comunas en modal modificar direcciones | var compDpto = document.getElementById("sdpto");
var compCiudad = document.getElementById("sciudad");
if (compDpto != null &&
compCiudad != null) {
hiddenOptSelect("sciudad");
var dpto = compDpto.value;
dpto = dpto.split(",")[1];
for (var i = 0; i < compCiudad.opt... | 0 |
c20dfda8c025e75fd428d974b0caf550 | 91d242793de71c01b2c22b7379c568c7 | Creates a luma transformation of an rgb array | local dim, w, h = im:size()[1], im:size()[2], im:size()[3]
if dim ~= 3 then
print('<error> expected 3 channels')
return im
end
local r = im:select(1, 1)
local g = im:select(1, 2)
local b = im:select(1, 3)
local z = torch.Tensor(w, h):zero()
z = z:add(0.21, r)
z = z:add(0.72, g)
z = z:add(0.07, b)
retur... | 1 |
123e693aed06fc2b8f77ce68cf969e1f | 683014c732079bfe5c3d86f04c03d96a | Generates a BETWEEN statement based on the age range provided. Following with the standard Between
semantics, the range is considered fully inclusive, i.e., x <= age <= y. | public class SelectPlan
public StringBuffer getBetweenExpr(StringBuffer expr,
StringBuffer lower, StringBuffer upper, boolean sense) {
return new StringBuffer(dbVendor.getBetween(expr.toString(),
lower.toString(), upper.toString(), sense));
} | 1 |
772d18ae4dbbff0522ce4a8dd23e681e | 9638b494317c75ae067a443b208dbbac | Searches for the specified object and returns the index of the last occurrence within the entire collection. | namespace ArchitectNET.Core.Collections
int LastIndexOf(TItem item, int startIndex = -1, int maximumCount = -1); | 1 |
c3a3d274206d0be1d4572a8e404e0772 | 3d5a0d8d9bb227e163cc44dd6f68063c | inicia toda a matriz que contém os disparos | disparos.push({
x: nave.x + 20,
y: nave.y - 10,
width: 10,
height: 30
});
} | 0 |
7742cddf29f1153fb4cc72fc20aa0f2f | edfd8c68864fdd55e4f87a28d5e99683 | Computes the hat matrix.
The hat matrix is defined by H = X (X^t X)^{-1} X^t with
- X the (weighted) design matrix
- ^t the transpose,
- ^{-1} the inverse matrix
and where all multiplications are matrix multiplications.
It has the property that \hat{y} = H * y where
- \hat{y} are the (weighted) predictions
- y the (wei... | import numpy as np
from r8vec_norm_l2 import r8vec_norm_l2
from sys import exit
a = np.zeros ( ( n, n ) )
x_norm_l2 = r8vec_norm_l2 ( n, x )
if ( x_norm_l2 == 0.0 ):
print ( '' )
print ( 'HELMERT2 - Fatal error!' )
print ( ' Input vector has zero L2 norm.' )
exit ( 'HELMERT2 - Fatal error!'... | 0 |
dc2ff10e73c7189cd451699f6a5cef80 | a6def6babf8b9065a0ac4c409418f94f | Check previews for product's siblings on product page. | class PrintScience_Personalization_Block_Checkout_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_Item_Renderer
public function getPersonalizationPreviews()
{
$default = array();
$apiSessionKey = $this->getPersonalizationApiSessionKey();
$apiResponse = Mage::getModel('printscience_person... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.