query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a427409a69debcc459cacf2b51118cb3 | 639622f8a5a25ae15dcb1321bc60ea97 | Check if the admin forced the next question | class TranscribeEntry
public function isForceConfirm()
{
return (bool) $this->forceConfirm;
} | 1 |
14896bac96b201e5f0efe778a2893411 | bfe8b2a4368acd90c5ff7766d4dd566f | 指定したスコアをRDBに保存します。<br> | @Controller
@RequestMapping("/hardRanking")
public class HardRankingController
@PostMapping(params = "insert")
public String insert(Model model, RankingForm rankingForm, BindingResult bindingResult) throws LogicException {
List<RankingDto> rankingDtoList = autoCast(session.getAttribute(SESSION_KEY_RANKING_DTO_LIST... | 0 |
4e4275dad308dfbeb89315257efca48d | 2da18d467a2c7c1a6fcb468b5baaea9a | Send a single byte to a device | void spi_flash_send_byte(uint8_t data)
{
apSSP_WriteFIFO(AHB_SSP0, data);
apSSP_DeviceEnable(AHB_SSP0);
while(apSSP_DeviceBusyGet(AHB_SSP0));
apSSP_DeviceDisable(AHB_SSP0);
apSSP_ReadFIFO(AHB_SSP0);
} | 1 |
13c093695dea9b0d57066bd2bc6ef4eb | e771f2b571445ce65e49878f29d2788a | Returns the prefix version of an infix expression. | int prefixExpr(istream & in)
{
vector<StackElement> prefixStack;
char ch;
int number;
string lExpr, rExpr;
ch = in.peek();
while (ch != EOF)
{
if (isspace(ch))
{
ch = in.get();
ch = in.peek();
continue;
}
if (isdigit(ch))
{
in >> n... | 0 |
cd7f6919122e8934361f26c6aea720e3 | e842b931d6888e083eb01c51a5e348fe | A helper function that takes two nodes belonging to the same graph and deletes
one, replacing it with the other (moving over pin connections, etc.). | singleton1_src = singleton1[1][0]
singleton1_tgt = singleton1[1][1]
singleton2_src = singleton2[1][0]
singleton2_tgt = singleton2[1][1]
new_edges = replace_nodes_in_edgelist(singleton2[0], singleton2_src, singleton1_src)
new_edges = replace_nodes_in_edgelist(new_edges, singleton2_tgt, singleton1... | 0 |
96c4258d7366b74bde8497c66763f8d3 | e5b01cd3b774c7f3b5cf19074dede33b | Returns null if an assembly of an equivalent identity has not been added previously, otherwise returns the reference that added it.
- Both assembly names are strong (have keys) and are either equal or FX unified
- Both assembly names are weak (no keys) and have the same simple name. | void ReferenceAssembly(Assembly assembly); | 0 |
bc6eed904e648437814c4875cdce1705 | 7f61448ad6da3ef0f9cb03f40c5be655 | This version of the constructor does nothing but initialize an | cases like (1) | 0 |
0dc93d8eceedf52b7ed8ee73c277d63f | 5f29416cc91b3bb003d656fcaac499d9 | 根据当前文章获取下一篇 | class Utils
public static function theNext($archive){
$db = Typecho_Db::get();
$content = $db->fetchRow($db->select()->from('table.contents')->where('table.contents.created > ? AND table.contents.created < ?',
$archive->created, Helper::options()->gmtTime)
->where('table.contents... | 1 |
a6edb6d38588013443dbdd1a926e3ca8 | 9a13e273f1f859779efae05cc462c357 | Extend the default WordPress post classes.
Adds a post class to denote:
Non-password protected page with a post thumbnail. | global $post;
if (isset($post)) $classes[] = $post->post_name;
return $classes;
} | 0 |
6d20930317c88909cd1598fadf1392da | 6a1640e5b9f4875fe3766b5005ccbb7e | Collect getSkinUrl() and similar calls from themes | class BcBaserHelper extends AppHelper
public function themeUrl() {
echo $this->getThemeUrl();
} | 0 |
0fd60dba31afb04373a0047d89654047 | e69ef8dfbcf90772c754895ba19d774f | Loads the specified module into the address space of the calling process | static RTEXITCODE loadModule(const char *pszFile)
{
RTEXITCODE rcExit = ensureInitialized();
if (rcExit != RTEXITCODE_SUCCESS)
return rcExit;
uint64_t uModAddrReq = g_uCurAddress == 0 ? UINT64_C(0x1000000) * g_cModules : g_uCurAddress;
uint64_t uModAddrGot = SymLoadModuleEx(g_hFake, NULL , pszFi... | 1 |
27e39075f981b908f36fd3f44a7e057a | 19519fdc0f8bfa80a1e9bb07c43c6073 | <p>常用于解析固定格式的字节流。</p>
<p>先从字节流的当前字节偏移位置处读取一个 <code>Uint16</code> 值,然后以此值为长度,读取此长度的字符串。</p> | int size = byteBuf.readShort();
if (size <= 0) {
return "";
}
byte[] bytes = new byte[size];
byteBuf.readBytes(bytes);
return new String(bytes, CHARSET);
} | 1 |
714efccfa9357fc944e17242092c7005 | f1ec74a4a3936bebd8088d6a967aae05 | Displays win text for Zyka and adds 1 to her score. | {
SendMessage("Yay, I won! What are the chances of that?");
} | 0 |
a5ee5f91754a5d332e2aa8a4894ba02b | ad942f73b09d1c1fb6efef9d6bfeec9c | Returns requested object value for column name. Value will be resolved with configured data converter | public function fetchValue($column_name); | 1 |
e06029c4bfed5e8ab155e1aff62578ac | 404af21beadb9ddadd0d96a3c252d9db | Revokes all tokens for the specified application | class GitHubOauth extends GitHubService
public function revokeAllAppAuthorizations($client_id)
{
$data = array();
return $this->client->request("/applications/$client_id/tokens", 'DELETE', $data, 204, '');
} | 1 |
9c06b5b011221fe1085e008fbfb4da84 | e833e75933a85cb80a9afd3be7868c33 | Этот метод берет рисовательную панель, которую мы передали в конструктор,
получает у этой панели переданную ей табличку для хранения координат,
и перезаписывает в ней текст на текущие координаты. | namespace barbershop
public partial class MainForm : Form
private void SetNewTable()
{
_currentTable = (ActiveTables)TabControl.SelectedIndex;
_currentDataGrid = DataSource.tables[_currentTable].TableSource.JoinDataGrid;
} | 0 |
acec2cc01d2a0c6a773fc5d24fed671e | 113eb4e26e8a252eff7df97fc57ca1bd | 计算某个组件的输入维度,最典型的应用就是计算dnn的input_dim | class Model(Serializable):
def get_dim_input(self):
return len(self.__input_shape) | 1 |
fe6f970a1287c98ef12488d796553b1c | ab8876e053a09426097917900f9dbb34 | 更改收藏状态并更新到数据库中 | @Component
public class CollectDao extends SqlSessionDaoSupport
public int updateCollect(Collect collect){
return this.getSqlSession().update("com.cqu.food.CollectMapper.updateCollect",collect);
} | 1 |
c67b44c8e64d77d4a4c0de9461ff893f | 6721a06af4ce3dcd51d0df7bcd0b9455 | 当日时间设置函数 | var NowTime="";
var date=new Date();
var year=date.getFullYear();
var month=date.getMonth()+1;
var day=date.getDate();
var hour=date.getHours();
var minute=date.getMinutes();
var second=date.getSeconds();
var xingqi=date.getDay();
switch(xingqi){
case 1:
xingqi="星期一";
break;
case 2:
xingqi="星期二";... | 1 |
c790d709e57ef36e7669656077be98ba | a5c5aada7c09e637c0ca885c4960c336 | 高校比较 | class Index extends Controller
public function szll()
{
$this->headFoot();
$this->left_bar();
$group = Series::where('delete_time', null)->order('seriesSort desc')->field('series,seriesID')->select();
$this->assign('group', $group);
$gallery = Gallery::where('webno', 2)->wher... | 0 |
44d74583eba938ce21fba5ac0feff05f | 15047b62c30ef2b26bc50969b73479e1 | 与えられた配列の中から、必須データを取得(空データもしくはスペースのみもだめ) | {
$keys = array();
foreach ($req as $key)
{
if (!array_key_exists($key, $args) || is_null($args[$key]) || !strlen($args[$key]))
{
$keys[] = $key;
}
}
return $keys;
} | 0 |
5dd3372695eab99b8e91f1833d598652 | 2de01e90df14f6925fbf5c8d0ba53511 | Test of the PyTorch reciprocal Node on Glow. | def f(a, b):
x1 = a * b
x2 = x1 * b
x3 = x2 * a
x4 = x3 / b
x5 = x4 / a
x6 = x5 / b
x7 = x6 * a
x8 = x7 * b
return x8
torch_glow.enableFusionPass_DO_NOT_USE_THIS()
torch_glow.setFusionStar... | 0 |
7c057a00b5e04068507d7ffa846dbf95 | 890060f10fea257726aca4d06a3e95e2 | 检查福利本是否解锁 | local baseLevel = self.getMainLevel()
local isUnlock = false
return true
end | 0 |
72043e08cdacd792d21d31e485437f53 | dd0d1bf4c9a80060a7ecc9655d1b4d2a | Test that during activate whitelist overrides audience check if user is in the whitelist. | def test_working_on_account_activated_signal():
rule = MembershipRuleFactory(domain='example.com')
mapping = UserOrganizationMappingFactory.create(
user__email='someone@example.com',
organization=rule.group.organization,
)
on_learner_account_activated(object(), mapping.user)
assert M... | 0 |
2863f6f6b2a7ef31bf82a5c1c1b5a156 | edcfb9b5a2142958afa464807d4215a8 | Returns the meta object for the containment reference '{@link canopus.canopusPerformanceScenario.Scripting#getInitial <em>Initial</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getMission_InitialScore(); | 0 |
4843248e6b107555d19e9cc59b784ae7 | 1f97df06b4284346cf68ba47b5b60494 | Запускает на сервере формирование отчета о статистике поисковых запросов. | class StatAdmin
public function phrases() {
$sReturnMode = getRequest('param0');
$thisHost = Service::DomainDetector()->detectHost();
$thisLang = Service::LanguageDetector()->detectPrefix();
$thisMdlUrl = '/' . $thisLang . '/admin/stat/';
$thisUrl = $thisMdlUrl . __FUNCTION__;
$thisUrlTail = '';
$t... | 1 |
1486ccbf79db56b55cf042796ca35f95 | 16facaed1cd55d7781ca7a080fafa956 | Lekérdezi a munkakörhöz tartozó kompetenciákat. | @Named("ApplicationManager")
@ConversationScoped
public class ApplicationManager implements Serializable
public String[] getCompetence() {
return competence;
} | 1 |
43639bfeb9af0e14472102e2e1cb2f19 | d27ddc5e2e7ad7e0cd7fb9db30ed7f4d | Returns the license key string. | class ShopSettings extends DataObjectDecorator
public static function get_license_key() {
return self::$license_key;
} | 1 |
24046a0e011ebfa31676d15215592f61 | 5522fecf47b6cfa4607a39fe5c84edec | 商品->评论 1->N | class Product extends Model
public function comments()
{
return $this->hasMany('App\Models\xShop\Comment');
} | 1 |
287f746c2c3c0dfa8c1c85f214b162d4 | 735885b3aadf9dcee5baf5e10d67cd8c | Retourne le nombre de cartes du talon | public class PaquetDeCartes
public int size() {
return getDeck().size();
} | 1 |
38f4b5532a6c83893156d4ba8565d5b6 | 74ca3c2978348294c320c3527f323a1a | Predict the bounding boxes and classes for each image in given path.
Draw the result on each image and save them in the second given path. | def save_results(image_path, anno, fname='result'):
new_img = Image.open(image_path)
d = ImageDraw.Draw(new_img)
is_list = type(anno) is list
rects = anno if is_list else anno.rects
for r in rects:
if is_list:
d.rectangle([r['x1'], r['y1'], r['x2'], r['y2']], outline=(255, 0, 0))... | 0 |
011a573d73bfdd7b5418dac958f1c9bc | bba9c8f30830683739fefddde98ac6ce | function returning energy generation through PP chain reactions | P_R = self.a/3*T**4
P_G = rho*self.k_B*T/self.mu_0/self.m_u
return P_R + P_G | 0 |
de03d18d2873f7d3d3279e7deda43e9c | 9a0ed82c0d5b8d272ddafb4a000f4796 | Walk a random walker for n steps. | self.all_points.add(self.walker.get_point())
for i in xrange(self.n_steps):
old_pt = self.walker.get_point()
new_pt = self.walker.next()
self.tcounts_dd[(old_pt, new_pt)] += 1
self.n_visits_from[old_pt] += 1
self.n_visits_to[new_pt] += 1
... | 1 |
2ed6c7ce15532138374ebf96238bfc28 | bc26ee7213cee3d481eaf6454f9c7d82 | <returns>The current <see cref="StatusEffectSnapshot"/> for <see cref="id"/> or null if no such status effect could be found.</returns> | {
if (id != null)
return GetStatus(id.Value.Uid, id.Value.Index, comp);
else
return DoAfterStatus.Invalid;
} | 0 |
cbfb74a960caafdbf5ff70aac09a5802 | 643fdcba00eb12f078d9703d7c088ecb | ===========================================================================
FUNCTION - sensor_util_set_stop_stream -
========================================================================== | {
int32_t rc = 0;
sensor_ctrl_t *ctrl = (sensor_ctrl_t *)sctrl;
sensor_lib_params_t *lib = (sensor_lib_params_t *)ctrl->lib_params;
struct sensorb_cfg_data cfg;
SLOW("enter");
SHIGH("Sensor stream OFF for %s \n",
lib->sensor_lib_ptr->sensor_slave_info.sensor_name);
if (ctrl->s_data->fd < 0) {
SERR... | 1 |
1c0ac19c412aa4278d28e296dd9e3bf8 | 23494a861ba4ca556f2c5f66c3dba6aa | Shoots 4 rays in all directions and checks if 'type' is hit on all sides | namespace TakeUpJewel
public static class Misc
public static ColliderType CheckHit(int x, int y)
{
return CheckHit(new Vector(x, y));
} | 0 |
c05f3f64056ade42e7a6674993d0a64c | c513e17ed5a9f24bd2400bf7446fb4d2 | Grants a set of operations to a user based on an operation template | namespace Beste.Rights
public class AccessControlList : IAccessControlList
public void Grant(string principal, string operation, string resource)
{
_granted.Include(principal,operation,resource);
} | 0 |
1de2365ac8239cc4c4f14507b7925250 | 0f4d1a6c1f876ff55189789f1758c2a4 | @brief Select all nodes | public function selectAll(): void
{
$this->selectAll = true;
} | 1 |
f9f3cc00d53ef0a0e05cb8aff8edbec4 | 3d1a8d3d92b5209724f9080d58d44bfa | Test interpolation between two axis-angle rotations with slerp. | test_inputs = [np.array(test_input).astype(np.float32)
for test_input in test_inputs]
self.assert_output_is_correct(self._vector_slerp_helper, test_inputs,
test_outputs, tile=False) | 1 |
ebec8c31f634020df9c369a36c32f5f8 | 86dda63aa37511d2ea8d74e57fb586d3 | Deletes an Item ownership | class InventoryController extends Controller
public function destroy(Request $request)
{
$items = Inventory::where([
['id','=',$request->id],
['owner_id','=',auth('web')->id()]
])->delete();
return redirect('/home')->with('success','Item Requested');
} | 1 |
4858c47b819097ffe30f78c08b5f2ee7 | fad89118d692c3c3bf5eebdf061d282f | Returns the meta object for the attribute '{@link eu.cloudwave.ude.fcore.FCORE.Attribute#getMax <em>Max</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getAtomicType_MaxExclusive(); | 0 |
0b2ee6fe1d7cf849b7916a8af01b80ef | 73c1cd50cc6ba46f22a3227fcc93682e | Simulates network call | class MainViewModel(application: Application) : AndroidViewModel(application), CoroutineScope
fun fakeRequest() = launch {
withLoading {
delay(5000)
}
} | 1 |
cc890d9f5ad213c7871f893cc297d40b | 4ac929b26b9a0305442fb6b3f90b5612 | 通过id来多表查询 | public class MybatisTest1
@Test
public void selectMultiTable(){
SqlSession sqlsession = MybatisUtils.getSqlsession();
StudentDao dao = sqlsession.getMapper(StudentDao.class);
List< Map<String, Object>> stringObjectMap = dao.selectMultiTable();
for (Map<String,Object> ... | 0 |
00c36fa9def3a889370447d82cfadeaf | 0a11c4e679b758038f20929de48c69e9 | 是否连续签到 | export class SignMgr extends BaseStorge
getContinuousSign() {
} | 1 |
f65f16cfd98208c09d35c172cc00ff6b | 74bf48680a31aeec2874f137d731ae22 | Handler of the ImageAcquired event of the device. | {
try
{
this.AcquiredImage.Dispose();
this.AcquiredImage = this.frameGrabber.GrabImageAsync(100.0);
}
catch (HalconException hex)
{
this.ErrorMessage = "Halcon Exception in Ac... | 0 |
d0dd78df0a17cc17bd5586b0a1087e15 | f746174262cf73c721da86ae021a3ef2 | Get subName | class Model
public function getSubName()
{
return $this->subName;
} | 1 |
0978a9b0bef64167ec09b0b76ffb0bf8 | b920f3d410684f1d911991183eb85601 | The class should raise an HTTPError exception if organizations cannot be retrieved from the API. | headers = {
'Accept': 'application/json',
'Authorization': 'BasicZm9vOmJhcg==',
}
response = await client.request(
method='GET',
path='/blue/rest/organizations/',
headers=headers,
)
assert response.status == 200, 'Response body is : ' + (await response.re... | 0 |
c6e731907c5d4f32cd4a64c600ea6420 | 0febbff744cba00b05582e4626f7bb3a | Gets Average Request Time. | public class JdbcDataSource implements DataSource
public long getAverageRequestTime(){
synchronized(POOL_LOCKER){
return requestCount == 0 ? 0 : accumulatedRequestTime / requestCount;
}
} | 1 |
894011a992075c6c91910d04e5bedf99 | 47cdb31ce2e4d04c06e1d281641d7617 | draw each teams' side, giving it a colored tint to represent the side | public class Agent
private void identifyTeam(PApplet applet) {
if (this.team == Owner.Red) {
applet.fill(255, 0, 0, 90);
} else {
applet.fill(0, 0, 255, 90);
}
} | 1 |
17de160163ad531cb3a193cdafd2b6f1 | e9871f1e5a6b342d692d8d5cc950261c | seekLeft标记是寻找target左边界还是右边界 | start, end := 0, len(intervals)-1
for start < end {
mid := start + (end-start)/2
if intervals[mid].Start < target {
start = mid + 1
} else {
end = mid
}
}
return start
} | 1 |
cd27b56b71a3fd5971819f126001fc8f | 2d1360171378ef650abc07fa439cc650 | Среднее время обслуживания заявки | long sum = 0;
long divideCounter = 0;
long helpA;
for (int i = 0; i < patientData.size(); i++) {
helpA = patientData.get(i).getWaitingTime();
if (0 != helpA) {
divideCounter++;
sum = sum + helpA;
}
}
if (... | 1 |
f6848396b86db8b7f7c86497ec82cab1 | 79fde523c1cfdaf8f700df5725575250 | BÀI 4: Tìm số dương nhỏ nhất trong mảng | {
if (n == 1)
{
return a[0];
}
int snn = Bai39(a, n - 1);
if (snn < a[n - 1])
{
return snn;
}
else
{
return a[n - 1];
}
} | 0 |
b84d905335df37206da661a170e522af | 7ef55b3364929bce1fcb65cfbd822d8f | expression : expression MULTIPLY expression
| expression DIVIDE expression
| expression PLUS expression
| expression MINUS expression
| expression POWER expression | {
int type = multiplication_expr();
while (1) {
if (accept("+")) {
binary1(type);
type = binary2(multiplication_expr(), 3, "\x5b\x01\xd8");
}
else if (accept("-")) {
binary1(type);
type = binary2(multiplication_expr(), 5, "\x5b\x29\xc3\x89\xd8");
}
else{
return type;
}
}
} | 0 |
1a563a8212b857695184b2d8f55b5a2a | 0f5205dd265ce175227347b417e5192b | Set the initial values of particle system parameters | namespace Edelweiss.CloudSystem
public void InitializeValues () {
particle.InitializeValues ();
} | 1 |
4a83a64536a461488a4122dd35174f83 | c9e28a06755e1bfac17abc4193423595 | Approximates integral using Trapezoidal Method | double deltaX = (max-min)/(intervals);
double multiple = (max-min)/(3*intervals);
double approximation = 0;
approximation += this.fExpression.Evaluate(min)*multiple;
approximation += this.fExpression.Evaluate(max)*multiple;
for ( int i = 1; i < intervals; i++ ) {
if ( (i % 2) == 0 ) {
appro... | 0 |
0308bfaf8cbe0573ee950ebc1de6a6ba | 475791f38f18145c825c9e6411073872 | Gets a mapped Propel type for specified native type. | abstract class BaseSchemaParser implements SchemaParser
protected function getMappedPropelType($nativeType)
{
if ($this->nativeToPropelTypeMap === null) {
$this->nativeToPropelTypeMap = $this->getTypeMapping();
}
if (isset($this->nativeToPropelTypeMap[$nativeType])) {
... | 1 |
d641c9e9d8e259be8bbdf0c8180af1a1 | 61e0eef766c8a96e41afca1aadac7e41 | Notch request callback. | {
RequestNotSupportedException::assertSupports($this, $request);
$details = ArrayObject::ensureArrayObject($request->getModel());
$this->gateway->execute($httpRequest = new GetHttpRequest());
$context = [
'httpRequestUri' => $httpRequest->uri,
'httpRequestQuer... | 1 |
b06bc06b6db84cda4f4e1dd9c74e4c63 | 330508ac2b387b0900902e88ab33d4d9 | Convert a byte to a bit-string representation. | return ""
+ (byte) ((b >> 7) & 0x1) + (byte) ((b >> 6) & 0x1)
+ (byte) ((b >> 5) & 0x1) + (byte) ((b >> 4) & 0x1)
+ (byte) ((b >> 3) & 0x1) + (byte) ((b >> 2) & 0x1)
+ (byte) ((b >> 1) & 0x1) + (byte) ((b) & 0x1);
} | 1 |
5fec8d9a24a4a966d38974fd4ed87ca2 | 08c20febb1b8a7d2e5cd8f8ed42f98f2 | Display theme header. | ?>
<header class="entry-header">
<?php
storefront_post_thumbnail( 'full' );
the_title( '<h1 class="entry-title">', '</h1>' );
?>
</header><!-- .entry-header -->
<?php
} | 1 |
a6d458282b5ac379adb0dd7b3a192158 | 5898bc6093d25c880062f70c161304fd | <para>Checks whether the user has opted in for SQM data collection as part of the Customer Experience Improvement Program (CEIP).</para> | public static class XmlRunSettingsUtilities
public static bool IsDataCollectionEnabled(string? runSettingsXml)
{
var dataCollectionRunSettings = GetDataCollectionRunSettings(runSettingsXml);
return dataCollectionRunSettings != null && dataCollectionRunSettings.IsCollectionEnabled;
} | 1 |
8303e98e45b30ae952cd81449c6f75e0 | b76b09e7cdd134d0fe7a03e9313ca7c6 | a bst with several levels of depth | from bst import BST
new_bst = BST()
new_bst.insert(30)
new_bst.insert(60)
new_bst.insert(40)
new_bst.insert(50)
new_bst.insert(45)
new_bst.insert(10)
new_bst.insert(8)
new_bst.insert(15)
return new_bst | 1 |
d8e89980d4082fbcfdab4d028474fda2 | 99a4cc4b35368b1608f21708fd8d694d | Returns the pci bus addresses corresponding to the pci addresses provided. | nvme_base = '/sys/bus/pci/devices/{0}/nvme'.format(pci_address)
if not os.path.isdir(nvme_base):
return []
devices = []
for nvme_ctrl in os.listdir(nvme_base):
ctrl_path = os.path.join(nvme_base, nvme_ctrl)
disks = [e for e in os.listdir(ctrl_path)
if e.startswit... | 0 |
6196791ab84eae271487e6b27afa1f4b | 7e24488f0c5001045c46cf409f933498 | Method for determining if the keyword is filled in the application. | return CollectionUtil.isAnyNonNull(nameKeywords, phoneKeywords, emailKeywords,
parentPhoneKeywords, parentEmailKeywords, addressKeywords,
schoolKeywords, acadStreamKeywords, acadLevelKeywords, tagKeywords);
} | 1 |
a210d6e794ed012bad65a58c599aa118 | 5bd674949ce5d54a2b92829119f11ded | Disables automatic wave spawning | public class GameController : MonoBehaviour
private void DisableSpawning()
{
foreach(var spawner in FindObjectsOfType<PointSpawners>())
{
spawner.DisableSpawning();
}
} | 1 |
1e204b2c5a2a1e3c6cd160fedf334c08 | 79e315bc10bb6c5d1aed82465f58c0f6 | Test que verifica que un pago no puede crearse con un empleado nulo | public void deletePago() {
PagoEntity entity = data.get(0);
pagoLogic.deletePago(dataEvento.get(1).getId(), entity.getId());
PagoEntity deleted = em.find(PagoEntity.class, entity.getId());
org.junit.Assert.assertNull(deleted);
} | 0 |
0627aecd3690f6b8daf42281a581188c | e180a75b885ef406364b5ab911f1b760 | 将用户批量加入用户组 | User user = isValid(accessToken, accessTokenManager);
if (user == null) {
expires();
return;
}
if (userGroup.getGroup() == null || userGroup.getGroup().getId() == null) {
failure("非法参数");
return;
}
Group group = groupManager... | 1 |
c4693254c6f998d5f714c98f2d1c8dea | 86ef84068098ced84a335ac308e734f8 | 显示-隐藏绑定成功提示弹框 | function success(){
$(".add_success").css("display", "block");
$(".add_success input").click(function(){
$(".add_success").css("display", "none");
})
} | 1 |
9a413135848bd2e037598e4383dd2309 | 7fa5f5066bdb269c0553440fa40a4b92 | Set an objective. | class SolverGurobiPrimal(SolverGurobi):
def set_objectif(self, model):
tmp = LinExpr()
for x in range(self.grid.shape[0]):
for y in range(self.grid.shape[1]):
if self.grid[x][y] != -1:
tmp.add(self.V[x][y], 1)
model.setObjective(tmp, GRB.MINIMIZE)
model.update() | 1 |
1423e55d429e067497ff9f8f619dc2d2 | f3a1e7130e3f62e2611098239c26b81b | Returns VR string fetched from setuptools. | _implementation = platform.python_implementation()
if _implementation == 'CPython':
_implementation_version = platform.python_version()
elif _implementation == 'PyPy':
_implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
sys.pypy_version_info.minor, sys.pypy_versi... | 0 |
7f9d4ee0a678c9b4a1098b9e738dd0ca | 7f799f091ae8822a8eaa938cfd331c81 | 寻找Element中,含有最多的指定Tag的那个子元素 | public class RSSController extends FXController
private Element findTag(Element element, String tag) {
List<Node> nodes = element.childNodes();
int maxP = 0;
Element max = null;
for (Node node: nodes) {
if (!(node instanceof Element)) {
continue;
}... | 1 |
1c9e09144cf43b0d573a6588da149ee8 | 25853dc15c594301b0b0d653ab449e4b | | |
| MT12232A LCD Initialization |
| |
+------------------------------------------------------------- | {
uint8_t parameter[14];
LCD_IO_Init();
ST7789H2_WriteReg(ST7789H2_SLEEP_IN, (uint8_t*)NULL, 0);
LCD_IO_Delay(10);
ST7789H2_WriteReg(0x01, (uint8_t*)NULL, 0);
LCD_IO_Delay(200);
ST7789H2_WriteReg(ST7789H2_SLEEP_OUT, (uint8_t*)NULL, 0);
LCD_IO_Delay(120);
parameter[0] = 0x00;
ST7789H2_Wr... | 0 |
4bedc3193fd2e301ccb7bb6a35516365 | 11e2960cf18f914bb1cd6b1b7a04620e | The method to set the default value of the expansion string for the PHP Tree Menu | class ZCRMCustomView
public function setDefault($default)
{
$this->default = $default;
} | 0 |
c6bac6658569346e4f678d3d11d69546 | a45e64fa3a7578541310b30f5295343e | 受付情報をパースする。
受付情報要素 | protected final void parse(DataMap request, String fileName, Document document) throws AesisException {
DataMap fileElement = getFileNameElement(fileName);
Element header = document.getElementById("dirTitName");
DataMap bind = new DataMap();
bind.put("jockey_id", fileElement.getStr("jockey_id"));
bind.put("k... | 0 |
bc4bd0ed790e8c59b7854054c0928fb4 | b8f7ead538d3853e5f97357bb06b3c4f | Sets the path to tilset files (under +prefix+). Default is 'tileset'. | class Configuration
def prefix_dir=(path)
set("prefix", path, true)
end | 0 |
e6d7f3ebaa991d70b516849a99750255 | f9969edf1f746cce01d87484922c9642 | Tokenizes the inputbuffer using strtok and returns
a vector of strings representing all the tokens.
Delimiters by spaces. | std::vector<std::string> aList;
aList.clear();
std::istringstream in(str);
char c;
std::string temp_str ="";
while (in.get(c)){
if (token.find(c) == std::string::npos){
temp_str += c;
} else {
aList.push_back(temp_str);
temp_str ="";
}
... | 0 |
ef084381b9e6e13ac97135fcf33b6a80 | 05094b21ddf4bf1919d2d413035c8337 | 暂停扫描动画 | class TraceAnalyzeModel
pause() {
if (this.animationLine) {
this.animationLine.pause();
}
} | 1 |
a1795a810f6747b81018c476fdcc47b8 | 1c9e407273e3d2688048c912fdc8bdde | The default implementation of list which builds the list from the
iterator. | class IntegerLists(Parent):
def _element_iter(itr, constructor):
for v in itr:
yield constructor(v) | 0 |
eed145ccd1983d2ccb7ff4f80272f9fe | 7b832ef6d1627e423a0d328818295070 | Depending on the state of the player, will play or pause a currently shown song. | namespace Dotify
class SongBarViewModel : INotifyPropertyChanged
void ChangeMusicStatus() {
if (_iconSelector) {
SongController.PlaySong();
}
else
SongController.PauseSong();
} | 1 |
efe1060206a5a955e6ab9e49a0b1a329 | b8804be2413de7ab93db8b6568510818 | Read signed 8-bit value from address and return result. | if self.__verbose:
print(__name__ + "." + traceback.extract_stack(None, 1)[0][2])
self.__handle_open()
return self.__handle_read(addr, 1, 0x4)[0] | 1 |
ac20415228250657d2f7689777a43e36 | 203df36f1b6411d5c7b8597a20dae610 | Создаёт объект реверсного блокировщика симпатий | namespace Sheep.Model.Friendship
Block CreateBlock(Block newBlock); | 0 |
0f08a99b1b5af4644b28ad5a12c17422 | 52afc4a1f3cc84161a5372619576263c | Todas las callback de interrupcion de UART llaman a esta función para hacer la transmisión. | {
for(uint16_t i=0;i<datosrec;i++) {
while(XMC_USIC_CH_TXFIFO_IsFull(XMC_UART0_CH0));
XMC_UART_CH_Transmit(XMC_UART0_CH0, rec_data[i]);
}
datosrec=0;
} | 0 |
b331487d2427b1759b63eaabe4cdf5c0 | 0c4b87390df537900f01ec651e24020c | GET: pilotos1 | namespace ConsumindoAPI.Controllers
public class GoleirosController : Controller
public ActionResult Index()
{
return View(_mapeamento.Mitos(1));
} | 0 |
a6f6dc9b8451b2fd8cab2e8ec41d9cb8 | c8d0002c950d0fb40e0348b29b96a218 | 后序打印二叉树(非递归)
使用两个栈结构
第一个栈进栈顺序:左节点->右节点->跟节点
第一个栈弹出顺序: 跟节点->右节点->左节点(先序遍历栈弹出顺序:跟->左->右)
第二个栈存储为第一个栈的每个弹出依次进栈
最后第二个栈依次出栈 | @Setter
@Getter
@ToString
public class TreeNode
public void postPrintNonRec(TreeNode root) {
if (Objects.isNull(root)) {
return;
}
TreeNode cur = root;
TreeNode pos = root;
Stack<TreeNode> s = new Stack<>();
while (Objects.nonNull(cur) || !s.empty()) {
... | 0 |
4ec2054a16f2f7f134c1950a7edcb648 | 274140c7306101ef5e3e501125f055c4 | Increments the losses total | let losses = parseInt(document.getElementById('lossCount').innerHTML);
losses += 1;
document.getElementById('lossCount').innerHTML = losses;
console.log('Lose');
document.getElementById('loseModal').classList.add('is-active');
} | 1 |
aae5bd26fcad6a228085b7ae65ad68c4 | 695ab704305e546e4c9fb63e9eb94aa2 | Raises the service stop event. | namespace SystemsMonitor
public class SystemsMonitorService : System.ServiceProcess.ServiceBase
protected override void OnStop()
{
StopService();
} | 1 |
299e5d2bd16d9759b263b4ff224b9856 | 2548ad2026d348684af136ec439ffe5c | 保存软件错误日志信息 | def save_error_log(status, msg, user_id, user_ip):
try:
log_info = LogInfo()
log_info.status = status
log_info.msg = msg
log_info.user_id = user_id
log_info.ip = user_ip
log_info.query_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
log_info.save()... | 1 |
b0c9c2f8dc3097f45ab23838b3a12e36 | 4cddf3e1e9b1481de63216a001b7b547 | エラー発生ファイルのキー番号配列を取得 | public abstract class MtasDataItem<T1 extends Number & Comparable<T1>, T2 extends Number & Comparable<T2>>
implements Serializable, Comparable<MtasDataItem<T1, T2>>
protected final Map<String, Integer> getErrorList() {
return errorList;
} | 0 |
930f5a7a6dc413eeed168299a0118d70 | 813a2f834f6e633cab30acde8f1921cc | Displays a form to edit an existing Thumb entity. | {
$entity = new Thumb();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
return $this->redirect($this->gene... | 0 |
e6026e0599955af0058ebb0dd2e4bc62 | 85108ac50c43388f82ed9ffe987a5526 | Override the target's display density. This command is helpful for testing your app across different screen densities on high-density screen environment using a low density screen, and vice versa. | public class UiBot
@Deprecated
public void setScreenResolution() {
if (true) {
Log.w(TAG, "setScreenResolution(): ignored");
return;
}
assumeMinimumResolution(500);
runShellCommand("wm size 1080x1920");
runShellCommand("wm density 320");
} | 1 |
e9e40cf1c335d9593522d7199d20550d | 365b0aa1d15ab19b13fc82a883874065 | 后序遍历的非递归 双栈法 | void BackOrderNonRecursion(BinaryNode *node)
{
LinkStack *stack = Init_LinkStack();
BiTreeStackNode *newnode = CreateBiTreeStackNode(node, MY_FALSE);
Push_LinkStack(stack, (LinkNode *)newnode);
while(Size_LinkStack(stack) > 0)
{
BiTreeStackNode *tnode = (BiTreeStackNode *)Top_LinkStack(stack... | 0 |
cf85df0c1b042e82c9ca1167ce7b7bf8 | 1d8847390839a91de6e03fe7bd631321 | \brief destructeur qui libere la memoire pour chacun des pointeurs vehicules crees | for (size_t i = 0; i < vehicleVector.size(); i++)
delete vehicleVector[i];
vehicleVector.clear();
} | 1 |
a80bddb000b1773101175a097b48dbdf | c5f2a610a784b3e59c48287fe290c1f7 | 批量删除用户收藏的地址 | Boolean deleteCollect(List<String> cList); | 1 |
02ee1d195ce1b4edaff1c841c506183e | bf2dc872217f20faaec0e71a846715ac | Collection is returned in the order of $keys given to the function. | {
$result = [];
foreach ($collection as $item) {
switch (true) {
case (is_array($item)):
$result[] = $item[$key];
break;
case (is_callable([$item, $key])):
$result[] = call_user_func([$item, $key]... | 0 |
3676e94225dc805fd27222ca875314a0 | 45dc6d79ebcd2ed6f9d946183d732ea3 | Set whether or not water drops are allowed on the fire | public class BotBehaviour
public void setEscapeLava(boolean allow) {
current().escapeLava = allow;
current().applyState();
} | 0 |
3e35d1f9b842763b84bdd27d5ed687e8 | 71cff082a47c1983fb0baf9c9596c08f | Returns a pointer to the recorder data structure. Use this together with
solution, e.g., in case a debugger connection is not available for uploading
the data. | static javacall_result recorder_destroy(javacall_handle handle)
{
return JAVACALL_OK;
} | 0 |
166de14b74b3c7ff2d0aa2f5183195fd | 622b1b19b7ff558472ddb900bf5bf5d9 | Método utilizado para se obter a capacidade da pilha | public class Pilha_Vetor
public int size(){
return this.topo;
} | 0 |
07cdc9c6655b719377a9aa8d45c6901c | bc3a075eafdd8846c511e51c5a72601e | Gets all pending users for a post | global $wpdb;
$items = [];
$postType = esc_sql($postType);
$results = $wpdb->get_results("SELECT DISTINCT `post_author` FROM `{$wpdb->posts}` WHERE `post_type` = '" . $postType . "' AND `post_status` = 'publish'", OBJECT);
if (isset($results) && !empty($results)) {
foreach ($results as $result) {
$i... | 0 |
7168f1ce18ff259b1b4da55d8385f0aa | 38f248d57ee54397fd5fc904e6c2df5b | ○ 背景レイヤの作成 | backLayer = new LSprite();
addChild(backLayer);
mapLayer = new LSprite();
backLayer.addChild(mapLayer);
charaLayer = new LSprite();
backLayer.addChild(charaLayer);
effectLayer = new LSprite();
backLayer.addChild(effectLayer);
talkLayer = new LSprite();
backLayer.addChild(talkLayer);
ctrlLayer = new LSprite()... | 1 |
5ba7bde0d56f84c45e8457cbc3e72136 | 3410b8a1275518da1cf67e94ba0b106e | 每秒回能 | public class BoatEnergy : MonoBehaviour
void FixedUpdate () {
if (Energy < MaxEnergy && Time.realtimeSinceStartup - LastCastTime >= EnergyRecoverDelay) {
Energy += EnergyRecoverPerSecond * Time.deltaTime;
Energy = Mathf.Clamp (Energy, 0, MaxEnergy);
}
} | 1 |
5258a2a6337dffb2bb74c7eeff8524a5 | 3bd8a9ae0172eb1a8797e2c6f7222cb7 | Removes an Entity with the key 'type' from the dictionary, if the dictionary contains that entity | for _, subtype_dict in self.tags.items():
for _, entity_list in subtype_dict.items():
entity_list[:] = [entity for entity in entity_list if entity != _entity] | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.