query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
66c464ccc6113dd96378d549a40ef703 | 8c801a90e370a192a6a6febdec4caafb | 根据科目编码或名称查询科目对象 若不存在则返回null
科目编码 | public SchoolSubjects findSunbjectsBySubjectsName(String subjectsName); | 0 |
47488bed61ebdbd704c353f2d49703a6 | a4bcf24c35bf9ec16320c79aa49086ee | 第一个大于等于给定值的位置 | public class LinearSearch
public static int firstGreaterOrEqual(Comparable[] arr, Comparable target){
if(arr == null)
throw new IllegalArgumentException("arr can not be null.");
for(int i = 0 ; i < arr.length ; i ++)
if(arr[i].compareTo(target) >= 0)
return i;
... | 1 |
f4f99da30a5366948e1ed58d57a91d78 | cffa8b8754b0c6e87a4aa5eb36c1e527 | Проверяет является-ли класс сервисом админки | {
if (null === $configuration->getClass()) {
return false;
}
return true;
} | 0 |
1b7a1739ba4035ee9942092d766c58bb | 32f937aca05179c807f01ffb1314099d | 根据传入数据表 批量更新医嘱中是否发送成功 | namespace CJia.PIVAS.Models
public class CheckAdviceModel : Tools.Model
public bool BatchModifyCheckDetailValid(string transID, long updateBy, DateTime beginDate, DateTime endDate, string officeId)
{
string sqlBatchUpdateCheckDetailValid = SqlTools.SqlBatchUpdateCheckDetailValid;
if ... | 1 |
4df404d2ddbab37966a8a3057dbead46 | 1ba0c64493802e9e6572dcc7a08197e6 | Verify the order by posting back to eSelectPlus. | if($this->getRequest()->isPost()) {
$validated = true;
$orderId = '100000001';
if($validated) {
}
else {
Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure'=>true));
}
}
else
Mage_Core_Controller_Varien_Action::_redirect('');
} | 0 |
aa90065ebe7965f79863fed742b2624b | df07c9a0babcaf53ec47b9cd40dc831e | read attribute value using key-indexing syntax (e.g. as in a dict)
on the device | class DeviceProxy:
def read_attribute_asynch(self, attr_name):
raise NotImplementedError() | 0 |
06db2536bbd5c96008496bfc7d8fe75a | 2cfbbfb041bc68ba07f306565374982a | Compute the totals loudness of critical band rate spectra.
The total loudness is the sum of the specific loudnesses. The spectra
should be scaled to critical band levels. | class Fast_Mahadevan96:
def _calc_spectrum_compt(self, freqs):
fedd = self.fedd
temp = self.temp_e
scalar = np.isscalar(freqs)
freqs = np.atleast_1d(freqs)
f_p, l_p = self._synch_peak(fedd, self.msol, temp)
lsp = np.power(freqs/f_p, -self.alpha_crit) * l_p
lsp[fre... | 0 |
28ba0163a3d03320ff15b3234101c052 | 6e46d48863700848b735697395da1327 | Get the subquery ResultSet tracking array from the top ResultSet.
(Used for tracking open subqueries when closing down on an error.) | @SuppressWarnings("UseOfObsoleteCollectionType")
public Vector<TemporaryRowHolder> getParentResultSet(String resultSetId); | 1 |
42243566a782afadd3d62f564e16c50f | c356c1c9cdbba9ce79ed60931f838473 | Get idCadastro | class Application_Model_Catalogo extends Application_Model_Entidade
public function getDta_cadastro() {
return $this->dta_cadastro;
} | 0 |
45b4b00ef8e97accd2b4f1a57cc34e39 | 56193f4f0e4222bdca72084137d630f7 | testcase1:打开testerhome首页,然后搜索社团,点击第一个帖子 | self.driver.find_element_by_partial_link_text("社区").click()
self.driver.find_element_by_partial_link_text("最新发布").click()
logging.info(time())
WebDriverWait(self.driver, 30).until(
expected_conditions.visibility_of_element_located((By.CSS_SELECTOR, ".topic .title a"))
... | 0 |
fc30c1b2ee98f924b6b4f33d97c8aee9 | c739afee4d4c52e218d6d30dd95a38e7 | @brief Copies the configuration values to device's EEPROM. | uint8_t i;
memset(&myConfig, 0, sizeof(ConfigNode_t));
myConfig.deviceId = readEEPROMByte(EEPROM_DEVICEID_START);
myConfig.rchanId = readEEPROMByte(EEPROM_RCHANID_START);
myConfig.rsf = readEEPROMByte(EEPROM_RSF_START);
myConfig.groupId = readEEPROMByte(EEPROM_GROUPID_START) |
readEEPROMByte(EEPROM_GROUPID_STA... | 0 |
180b77f02c400b93ba063e7798a5ebd9 | b3c80bd36d1f5fa5424eb3748983a61d | save profile image of a team member | if ( !current_user_can( 'edit_user', $user_id ) ) {
return false;
}
update_user_meta( $user_id, 'user_image', $_POST[ 'user_image' ] );
} | 1 |
b5c0123c13bc466d0ed4db3905d209f0 | 57cc49dadf2abc710f098bf6beee9a8d | Creates a collection with the null point | namespace ScoutBase.Core
[Serializable]
public class GeographicalPoint
public static IEnumerable<GeographicalPoint> GetNewList(GeographicalPoint geographicalPoint)
{
var result = new List<GeographicalPoint>();
if (geographicalPoint != null)
{
result.Add(geographicalPoint);
}
return result;
} | 0 |
495653a14a7227a60381771e002954ae | 14a52e4ece5073893588781f6c90c5e5 | TRUNCATE THE STRING OF A NUMBER TO REMOVE TRAILING ZEROES | {
char *pNum = numero;
static char Num[MAXID+1];
if (strlen(numero) < sizeof(Num)) {
size_t ix = 0;
while(ix < sizeof(Num)) {
Num[ix++] = EOS;
}
strcpy(Num,numero);
char *ptr = Num + strlen(Num) - 1;
while(ptr != Num && *ptr == '0') {
*ptr = EOS;
ptr--;
}
if (ptr != Num) {
if (*ptr == '.... | 1 |
c97b42d5322388514669294e9eedcc5f | f12a29d66c1ab20685e1133da47f5895 | 创建共享内存,并存入数据 | int ImageProcess::ShareMemoryInit(key_t key)
{
ShareMemoryID = shmget(key,sizeof(ShareData_Typedef),0666|IPC_CREAT);
if(ShareMemoryID == -1)
{
cout << "Camera shmget failed" << endl;
return -1;
}
ShareMemoryAddress = shmat(ShareMemoryID,NULL,0);
if(ShareMemoryAddress == (void*)-1)
{
cout << "Camera shmat f... | 1 |
0ef08d3d1469b06d601807966e766e48 | 0f62f61c518cca53207e5871b9e05de0 | Returns the maximum Z value in this dataset. | public class DataSet
public double getMaximum() {
return 0;
} | 0 |
7b56cdfef343e4e501917e83116e181a | 52eb20d6d51e9ed180837642c8e12062 | Returns the value of the '<em><b>Record Type</b></em>' containment reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class SalesDDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements noNamespace.SalesDDocument
public static class SalesDImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements noNamespace.SalesDDocument.SalesD
public static class ROWDATAImpl extend... | 1 |
bff4ad5ffaed9af3e9de755fd25cf7be | c868256c389f47875eb9934ce72f0f28 | 1件のペットの情報を更新 | @Controller
@RequestMapping("/pet")
public class petController
public void updatePet(Pet pet){
petMapper.updateByPrimaryKey(pet);
} | 1 |
70af06d1782a60fa3102a04909c32303 | f34078c9b914a99edcdd36ec4aee366c | Returns a RecyclerView's ViewHolders as a list if they are of the specified type.
ViewHolders of different types are skipped. | return when (viewType) {
TYPE_SPACE -> MyHolder(View(parent.context))
else -> MyHolder(getItemView(parent), holderListener)
}
} | 0 |
897a93c42a77cb42606677be5f2a2257 | 3393e39d2a6f0886dc911dc8d3d9d258 | 按ModBus功能码为16的协议写数据 | Modbus.RequestAddress = address;
Modbus.RequestFunction = 0x06;
Modbus.RequestRegister = reg;
ModbusSend8(address, 0x06, reg, value);
} | 0 |
e550253bf5837e546583ae082e4c0d0e | 4111dda385abb7be472f5d3cb4383a2b | Writing two byte integer value on the socket | def WriteWord (value):
WriteByte(value >> 8)
WriteByte(value & 0xFF) | 1 |
6bfa37fc5c32f6e275885132e84e5fed | f0be8e108b7b51d6bfad5a308ef0027d | Деление числа с размерностью на вещественное число. | Big operator / (int x) const {
Big ret;
ret.init();
int re = 0;
for (int i = size - 1; i >= 0; i--) {
int t = (re * N + digit[i]) / x;
int r = (re * N + digit[i]) % x;
ret.digit[i] ... | 0 |
fb9081b0d422d98138e68ffa18c76c7a | 22e06b703bdbf646a19d77e997290e40 | Get the list of composite fields. | abstract class AbstractDemandFactory
public function getCompositeProperties()
{
return static::$compositeProperties;
} | 1 |
d4cd2fc47f4e25c51f068e879f229526 | 62a2f5255dc69feb7e0b4800bb0e2194 | To save postponed messaged to Redis. | sms_id_key = _clean_key(sms_id)
mailing_key = f"sms_mailing_{sms_id_key}"
mailing_phones_key = f"phones_for_sms_mailing_{sms_id_key}"
tr = self.redis.multi_exec()
tr.set(
mailing_key,
json.dumps(
{
"sms_id": sms_id,
... | 1 |
30d2b614e079f99a4758e7846cd16e9e | 4b755bfdf08f9f518e70907f4eb5384d | A method to pop illegal moves from the list of current moves based on situational changes.
That is, elephant is blocked, horse is blocked, etc. | validMoves = new ArrayList<>();
invalidMoves = new ArrayList<>();
if(isMultiLegMove){
CheckersMove previousMove = previousMoves.get(previousMoves.size()-1);
validMoves.addAll(getPossibleTakeMoves(previousMove.getEndingX(), previousMove.getEndingY()));
return;
... | 0 |
82abd9b7c37bc2112213adb97e20e657 | 4a0b57ca5c59b1c41d08a0d9fa7ed908 | JobCollectInterval returns the period of job info collection. | res := Get(ThanosMaxSourceResEnvVar, "raw")
switch res {
case "raw":
return "0s"
case "0s":
fallthrough
case "5m":
fallthrough
case "1h":
return res
default:
return "0s"
}
} | 1 |
81810d6f82208b9f66f01fadff63f7b4 | 5c167f01c02167dd0cfb5d4e8d78175a | Advance the scanner until the current symbol is one of the
symbols in the specified array of follows. | {
while (!in_follow_set(fol, current_token->kind) && current_token->kind != TOKEN_EOF)
{
current_token = next_token();
}
current_token = back_token();
} | 1 |
1c5dcb5796451aceb52a09aa9cda378e | 74e9b6d29d8c5c215a343140df7b285d | 设置区块的高度 | controlTable(){
function setBar(){
let winHei = document.documentElement.offsetHeight;
let h = winHei - tableBody.getBoundingClientRect().top - 50;
tableBody.style.height = h + 'px';
} | 1 |
c3a8566a414e40cce0fcf390409efe5b | 3c0f49acad8b0abb926eeb6ba0fdfb66 | 读取滤波器系数 | {
int tmp;
sensor.state = (ushort)((indata[0] << 8) | indata[1]);
int Number = indata[2];
if ((Number >= 0) && (Number <= 5))
{
tmp = (indata[3] << 24) | (indata[4] << 16) | (indata[5] << 8) | indata[6];
sensor.Coefficie... | 1 |
795d8aaecebb496cccef1ba7faab41f6 | 5cec405c2199370f54361e173771a317 | checks combo box values to change direction and weight of gravity | {
string choiceP1 = this.p1ColourCombo.GetItemText(this.p1ColourCombo.SelectedItem);
string choiceP2 = this.p2ColourCombo.GetItemText(this.p2ColourCombo.SelectedItem);
if ((choiceP1 == "White") && (choiceP2 == "White"))
{
p1ColourCombo.Selected... | 0 |
39ae3e5ffe88753ec4449f46eb36684d | 751ee8008c62d18477161e4ad80671e9 | Redirect to resource with reports. | def report():
return redirect(url_for('static', filename='pdfs/report.pdf')) | 1 |
fd36fb0e85cc97d71aafa1802f4500c2 | 9de31214e8a3b29556df203bb8d359d7 | Disable the active light and enable the passive light. | void MainController::slot_remoteControlDeactivated()
{
m_lightbutton_operation->slot_setLight(LightButton::LED_BLINK);
} | 0 |
dc24231580ac9afd9d6607f7fa6098d6 | f82533b08dc81c23de1c3442239f7e58 | Test case for patchNamespacedStatefulSet
. | class TestAppsV1beta1Api(unittest.TestCase):
def test_patch_apps_v1beta1_namespaced_stateful_set_status(self):
pass | 1 |
8739b57b49ca106a122918783d871a46 | b159da749e736432896d6681238c0d25 | auto generated Axis2 call back method for getScheduleData method
override this method for handling normal response from getScheduleData operation | int pGenericReportId,
int pReportScheduleId,
Map pParams,
int pUserId,
String pUserName,
ArrayList pErrorMess)
throws RemoteException; | 0 |
cdd381d5e1cb79e1e17293376203c7b6 | 5eed2010556b900c4275a08e12ecdc8f | Returns a count of all given player's games in the database,
as well as the games in which it is the player's turn | def getGames(playerID):
x = db.prepare("SELECT games from users where id = $1::integer limit 1;")(playerID)
if not x:
return None
return dict(x[0]["games"]); | 0 |
f1045c4b623bb8086f9778bb5498d334 | 8c236ae1d3f721bda49aa2a5aa7da713 | about 2% of the time, we send a full update (meaning, we transmit all the joint data), even if nothing has changed.
this is to guard against a joint moving once, the packet getting lost, and the joint never moving again. | { uint32_t TimeDelta = Time-PrevTime;
if( (PrevPacket==0) || (TimeDelta>=50) ) return 1;
int16_t Climb = Packet.DecodeClimbRate();
if(abs(Climb)>=100) return 1;
OG... | 0 |
1ec9447cd880e285e12ba9c24e01a081 | 461977a5d0f612aa586259fa9c79c6a0 | Initialize Timer 0 as CTC | void tcnt0_init(void)
{
ASSR |= (1<<AS0);
TIMSK |= (1<<TOIE0);
TCCR0 |= (1<<CS00);
} | 0 |
587d4d9ffe0d8951d3cb4cce37d60c70 | 813fe3c966737508114d729fd2de463a | Attempts to translate the given text and return the
results. If it cannot be found, it marks a small error
then returns the key. | def find_translated_text_memory(orig_text):
search_key = special_char_remove(orig_text.strip())
if search_key in texts:
prepared_text = texts[search_key]
return prepared_text
else:
return '' | 0 |
2b27c1602862fa11f709b3beba2878aa | 3b8e60406b2f8efd09cde311a2698526 | Get the "version" property from an XML Stream. | namespace PayPal.Payments.Common.Utility
public sealed class PayflowUtility
internal static String GetXmlVersion(String Request)
{
Logger.Instance.Log("PayPal.Payments.Communication.PaymentState.GetXmlVersion(String): Entered.", PayflowConstants.SEVERITY_DEBUG);
String Version;
... | 1 |
eb8dd37349469bd3108b0d89616a7337 | d5992201f9c0b55d02ccb25d708d937a | 选中所有展开的节点 | this.expandedNodes.forEach(nodeId => {
this.treeControl.expand(this.treeControl.dataNodes.find(node => node.id === nodeId));
});
} | 0 |
578583ed05ee4a1878f3873b498e9677 | bbd57006e557216d9883c6c91aef582c | function that updates the database column for the password. As an argument i give a hash that contains the password
and password_confirmation. | class User
def hash_password
self.salt = User.generate_salt
self.password = self.digest_of(self.validate_password)
end | 0 |
0da0350cb11612cb870a418311ab8535 | 4c60cf9fd736979e9e346460d71882bd | Opens a new connection to the specified data provider. | string providerName,
string configurationString,
string connectionString)
{
InitConfig();
return ConfigurationInfo.GetDataProvider(
new ConnectionStringSettings(configurationString, connectionString, providerName),
connectionString);
} | 0 |
3f9536f17f442acf33466c224ac8811b | 458af9bd9fc25205baebee2e93f5a786 | 查找mac地址的设备已绑定的用户名列表 | List<String> findMacByMobile(String telephone); | 0 |
86f6e924e573e0f6951b94a1d7bc11b2 | 97d555180cfd23428053f893e5db59cd | 取卡密期限 | if (is_post()) {
$data_post = $this->input->post(NULL, true);
$res = $this->loop_model->get_where('user_card',array('card_no'=>$data_post['card_no']));
if($res){
$res['endtime'] = date('Y-m-d',$res['endtime']);
error_json($res);
}el... | 1 |
33e01cf13722f4baf1e7828857aea802 | 7f031b38337261c891b4651d62ec316a | Tests the API by supplying a location and date and returning the response | class ApiTest(unittest.TestCase):
def test_03_predict(self):
r = requests.get('http://localhost:8080/predict?country=united_kingdom&date=2019-05-05')
check_complete = json.loads(r.text)['status']
self.assertEqual(check_complete, 'OK') | 1 |
4457d0dd015af9ae4bce665416de09e2 | c818ce66757aa34ec1c28babbaa1db5a | 全部脱敏 | $userName1 = "张三";
$userName2 = "张三丰";
$userName3 = "张三丰帅";
$userName4 = "张三丰帅气";
$mobile = "13888888888";
$mobile1 = mobile_mosaic($mobile);
$userName11 = user_name_mosaic($userName1);
$userName21 = user_name_mosaic($userName2);
$userName31 = user_name_mosaic($userName3);
$userName41 = user_name_mo... | 1 |
4a66dff2ff6c330faaf825ee3e669ee3 | 84437514827bf7c9053a48d322be10a3 | 生成基线模型,作为后续数据处理和特征工程的对照。 | class BaseAnalytic(object):
def establish_baseline(self):
pass | 1 |
6e6b788ff3ddd466cec45d1e9ce6b7d1 | aff3e380d742be4e6b05f1d4e6fe9082 | 从给定的XML资源id加载Graph | {
if (string.IsNullOrEmpty(fileName))
return;
if (!System.IO.File.Exists(fileName))
return;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(fileName);
var graph = xmlDoc.DocumentElement;
this.scrollX = in... | 1 |
393f3afb6e470b68f3a23f3bdce1495f | b7cc6dcfd54efa1c45b511204573ed91 | method to clear datagridview2 | namespace GenDaoAndBatUpd_sample
public partial class Form1 : Form
private void btnClear2_Click(object sender, EventArgs e)
{
this.ClearColor2();
this.dataGridView2.DataSource = null;
} | 1 |
8e60a439e6c1c5420afc4c250c97cdab | c3de3f42ff278c744594aea8577be002 | if we can't hash args, just call function | class Memoized(cls):
def __init__(self, *args, **kwargs):
self._cache = {}
super().__init__(*args, **kwargs)
def __call__(self, *args):
if any(not hashable(arg) for arg in args):
return super().__call__(*args)
key = tuple(args)
... | 1 |
5226bb84281c0db5d30083fad88d8a13 | 544ea22049871e8721e6b6e58570bd66 | 1 字一色 2 清一色,3 混一色 0 无色 | namespace ZJH
HandTy CGameLogic::GetHandCardsType_private(uint8_t *cards) {
SortCards(cards, MaxCount, false, false, false);
uint8_t p0 = GetCardPoint(cards[0]);
uint8_t p1 = GetCardPoint(cards[1]);
uint8_t p2 = GetCardPoint(cards[2]);
if (p0 == p1) {
if (p1 == p2) {
return Ty30;
}
return Ty20;
... | 0 |
d6d9748d42ff8a850938b85189e636d1 | 3e74417d3d91e07039398f23cfd806b5 | 分配授权时往中间表插入数据 | void insertNewRelationship(@Param("roleId")Integer roleId,@Param("authIdList")List<Integer> authIdList); | 1 |
4a9821f08ece2268f501dcad0bba71b0 | c27df231678bd67e4c43a44f5909372e | Retrieve client ip address and determine whether it is on the whitelist | if (!isset($_SERVER['REMOTE_ADDR'])) {
return true;
}
$ipAddr = explode('.', $_SERVER['REMOTE_ADDR']);
foreach ($whiteListIps as $key => $ip) {
$ipArr = explode('.', $ip);
foreach ($ipArr as $index => $group) {
if ($group == '*') {
$ipArr[$index] = $ipAddr[$index];
}
}
$whiteListIps[... | 1 |
db097bc3df8466b9c8c43a74f5839e2c | 644697e932e5b043b613012ca6be9b6e | Return the smallest key point (where a path starts or ends) that is at least a specified
offset | function toKeyPoints(chainContext: IChain, maxArcFacet?: number): IPoint[] {
var result: IPoint[] = [];
for (var i = 0; i < chainContext.links.length; i++) {
var link = chainContext.links[i];
var wp = link.walkedPath;
var keyPoints = path.toKeyPoints(wp.pathContext, m... | 0 |
909f239cb47ecd61528734795eac7293 | e28f157647e5d9f5bdd54c9b85ea3f98 | Gets whether or not the player wants to revert to an earlier point in the game. | public boolean wantToPlayAgain(); | 0 |
c4eb7ef73578dc1d2b14997c6b2b62ba | e9bd6d9a228064591e6f869a4b280d38 | Perform a probe to check whether the instance can be reached,
and whether access is permitted. | def probe(owner, cloud_id, machine_id, host, key_id='', ssh_user=''):
if not host:
raise RequiredParameterMissingError('host')
ping_res = ping(owner=owner, host=host)
try:
ret = probe_ssh_only(owner, cloud_id, machine_id, host,
key_id=key_id, ssh_user=ssh_user)
... | 1 |
98067df95e63a1929154a70dbe80a271 | e5b8279778b443013141138172ff16bc | 校验用户的token是否与和缓存中的一致 (返回ChallengeResult) | Result isChallenge(RoleInstance role, int targetRoleId); | 0 |
bc495fa74e962ab74fb83bb3ef490752 | 683ed8757dd126222182000bbf43d501 | 打开查看藏品信息页面 | function MainuiController:openGetItemView(status, list, source, extend, open_type)
if status == false then
if self.exhibition_view then
self.exhibition_view:close()
self.exhibition_view = nil
end
else
self.ref_class = ref_class or ItemExhibitionList
playOt... | 1 |
b0b2f4ef821cfc042f90fca8ac2ba86d | 3808c105bd1a6b4e752e7a0b99004393 | オンライン画像リソースの縦幅を取得します | {
if ($oImage = $this->getImage()) {
$oBox = $oImage->getSize();
return $oBox->getHeight();
}
return null;
} | 1 |
41d22402c0c0d7b4607c106a1fd03d4a | 2276c563d240335229bb1315e6a75086 | Tokenize a non-decimal integer literal - e.g. Ox4F2E, 0b1101 | if(not("b" in t.value or "o" in t.value or "x" in t.value)):
t.value = int(t.value)
return t | 0 |
4987f6acdeec4bf3a66f61e63a678630 | 5a11d89311f59dc5301e40b66e3f1b98 | create a model sphere consisting out of triangles | void createSpheresData()
{
const float radius = 10.0f;
SphereModel::getTriangleRepresentation(radius,
numberOfSamples,
&numberOfSphereTriangleCoordinates,
&numberOfSphereTrianglePoints,... | 1 |
9e466b3f347326c4b0039e2b55eea0a9 | f7e077d32e7fb43df2f378daaa0631d6 | @brief Vrati pocet volnych byte v odchozim bufferu | unsigned char uart_numof_bytes_in_buffer(void)
{
if (uart_rcvbuff_front == RECEIVE_BUFF_EMPTY)
{
return 0;
}
if (uart_rcvbuff_front < uart_rcvbuff_end)
{
return((uart_rcvbuff_front - uart_rcvbuff_end) + 1);
}
else if (uart_rcvbuff_front > uart_rcvbuff_end)
{
return((RECEIVE_BUFF_SIZE - uart_rcvbuff_front ... | 0 |
a43f19d82b06296c48b276a66a65478f | 4888781343f73c3ed3f132b80d8fe67f | アクセル処理 | {
if (Input.GetMouseButton(0) && motoController.inputController == MotoController.InputController.Mouse)
{
acc();
}
if (Input.GetMouseButton(1) && motoController.inputController == MotoController.InputController.Mouse)
{
mBreak();
}
} | 1 |
4beafa0974b0d19e26b01169dbfbd6ec | e9cdf90a8b1c7f0017e69653bd1d5999 | @brief Tests whether the current footstep is close enough to the goal for ending the search. | bool CPathfinding::PathfindStep()
{
return m_ObjectiveFound;
} | 0 |
1f5c8e12d0dd1a42ad7b4b3ff984ff46 | c2b285a004c6f2388d9ccdd6cafe1499 | Reeordonne les medias selon leur identifiants | class Model_Media extends Model
public function sort_photos($sort_photos){
if (!empty($sort_photos) AND is_array($sort_photos['sort']))
{
foreach ($sort_photos['sort'] as $index => $id)
{
$query = DB::update($this->_tableImages)
->set(array('sort'... | 1 |
121b263d1e7aa19776cb13f4fca446f8 | 50035e288121b3af254c45054f1df76f | Determines how many rounds will be played based on user input | public class ConsolePrompts
public int rndPrompt() {
int rounds = 0;
Scanner reader = new Scanner(System.in);
System.out.println("\nROUND SELECTION---------------- " + "\nInput Amount of Rounds to Play:");
rounds = reader.nextInt();
reader.nextLine();
return rounds;
} | 1 |
93761c9e9143516e5d6ee90f3404d411 | ddd1baf3d78613b860ddae60b3328b97 | Gets the value of the solutionId property.
possible object is
{@link Long } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContactQuery", propOrder = {
"id",
"created",
"createdBy",
"updated",
"updatedBy",
"conflictId",
"modId",
"accountCurrencyCode",
"accountId",
"accountIntegrationId",
"accountModId",
"accountPriceListId",
"accountP... | 0 |
18403cee33d7a34e034661af489c76f4 | 623f447373cddd7f921731a85f64ee30 | 文件上传初始化线程池大小 | public class ExecutorManager
public static ThreadPoolExecutor getUploadThreadPool() {
if (uploadThreadPool != null) {
return uploadThreadPool;
}
synchronized (ExecutorManager.class) {
if (uploadThreadPool == null) {
ThreadFactory namedThreadFactory =
... | 1 |
dd0a897ceb3ada9fa575fab5ee89aada | 9f118422e8dd42968bd2ed86890b82e6 | Node registration timeout. | class _AnritsuTestCases(object):
def registration_timeout(self):
return self._anritsu.send_query("TESTREGISTRATIONTIMEOUT?") | 1 |
02fc41e9e08f9fa71c86a6fcb3ce091b | bc18050cd2f887fc86a37637b151ff8d | Uppfærir notanda sem admin. | if (admin == null) {
throw new ValidationException("Admin object is null");
}
admin.getUser().setAdmin(false);
entityManager.remove(entityManager.merge(admin));
} | 0 |
43e67339e2458584a3328937be5b87a7 | 06b7a59d474001307eb3e2f37b5e8d37 | Returns whether pathobject p1 dominates path object p2 | def dominates(p, q):
found = False
for i in range(1, len(p)):
if p[i] > q[i]:
return False
if p[i] < q[i]:
found = True
return found | 1 |
ef364cc0db69bdc37c0cec0578e310b9 | 29b47dee576e5723c3d5c62632d5a27e | Translate meter length into pixel length (y axis) | double temp = (yval - m_minY)/(m_maxY - m_minY);
double temp2 = temp * (m_YaxisEnd - m_YaxisStart);
temp2 = m_YaxisEnd - temp2;
return temp2;
} | 1 |
49ad1c9637c66ea69b3adad40c150001 | 9ee1437008642dd5d6d6dda389ee614c | Check to see if CustomerOwnedIpv4Pool property is set | namespace Amazon.EC2.Model
public partial class ProvisionPublicIpv4PoolCidrRequest : AmazonEC2Request
internal bool IsSetIpamPoolId()
{
return this._ipamPoolId != null;
} | 0 |
5f50eb236d3f3b5d2f989be35df21531 | 3042af7ef45a6c65d67b4f4085f84a7f | When all colors are opaque, only the foreground layer should be visible. | PendingLayerKnownOpaque_DISABLED) {
PaintChunk chunk1;
chunk1.properties.property_tree_state = PropertyTreeState(
TransformPaintPropertyNode::Root(), ClipPaintPropertyNode::Root(),
EffectPaintPropertyNode::Root());
chunk1.bounds = FloatRect(0, 0, 30, 40);
chunk1.known_to_be_opaque = false;
... | 0 |
76ee95a427510791e127950ea0003217 | 3369023686544841393dd020e2a42e8f | 对默认的Sheet添加行 | for(int rowNo = 1; rowNo < limit; rowNo++ ){
sheet.getRow(rowNo).createCell(columnNo).setCellValue(defaultValue);
}
} | 0 |
473c9536fe16b2f586d0cf3562738e0f | 51a32dc7e74c095dbd89ae758f0bb82d | Returns no data yet message | namespace EmployeeList_2._0
public partial class Form1 : Form, ILogger
private void NotDataMessage()
{
SumOfDepSalary.Text = sumOfDepSalaryTitle + noDataString;
AvgOfDepSalary.Text = avgOfDepSalaryTitle + noDataString;
CountOfDepEmp.Text = countOfDepEmpTitle + noDataStrin... | 1 |
b6bae6dafa43cc4e6d0f0f1404eb4ac7 | 72937737dc2c6a994a8e0c884c77916f | 遍历一个目录,把文件添加到文件列表 | File file = new File(dirPath);
if (!file.isFile() && file.exists()) {
File[] files = file.listFiles();
resultList.addAll(Arrays.asList(files));
}
} | 1 |
65029abc9db8c521dc171a85c26bf36e | 42e43fb6a7a37343e6a7448814de5b00 | Link(child, parent)
child, parent Body objects as returned by NewBody().
Attach child to parent. This child-parent connection has no meaning outside
of what the script decides to do with it.
To "unlink", call eapi.Unlink().
To get a list of attached children , call eapi.GetChildren(parent).
To get a child's parent, cal... | {
if (parent == nullptr)
{
DoNotifyException("Invalid attachment", "Cannot attach to a null object.");
return false;
}
if (parent == this)
{
DoNotifyException("Invalid attachment", "Cannot attach to ourself.");
return false;
}
if (GetParent() == parent)
{
DoNotifyException("Invalid a... | 1 |
463c55281af70197fdf15786c0ead56e | 1d7e00ef75c76f0df76831df37768ddd | Returns the current sweep. | class windfreak_synthd(object):
def getSweepType(self):
return int(self.sendCommand('X?')) | 1 |
0f863fee86757d5bc40e73637cee9abc | fc85879c6872e296d8f367f17b6e47e7 | Funkcja wstawiająca pobrane grupy do elementu select w formularzu dodawania studenta | function Login(options)
function fillGroups(groups) {
const select = $('.auth-reg-block__select-js');
select.empty();
for (let group of groups) {
select.append(`<option class="auth-reg-block__select-elem">${group.code}</option>`);
}
} | 1 |
7a03f137d6250acc3ba588b4f935f1cf | 7214d1405fbc6d0450a7adf93eadc783 | 두 변수의 덧셈결과를 리턴하는 함수 | void add(int x, int y, int *sum){
int ret = x + y;
*sum = ret;
} | 0 |
2e215769a205e3c81c1918bb56770f5b | a63670f246e45e443ab0b15ef8d60119 | Animates a Sprite object from the SpriteManager | class GameScene(SceneBase):
def _animate_object(self, sprite_object, frame_time):
sprite_object._current_frame = (self._frame_ctr // frame_time) % sprite_object._anim_frames
sprite_object._set_image() | 1 |
3804e91db6102f60fe31c728462aaff8 | efd74a1db3c1d2da91ef4dd15690d815 | 初始化到指定的xy | void CDIBFrame::Init(int x,int y,int nBitCount)
{
if (x < 1 || y < 1)
return;
if (m_FrameDC && m_x == x && m_y == y)
return;
m_x = x;
m_y = y;
m_nBitCount = nBitCount;
CreateFrame();
} | 1 |
7d89754593ddceb3ece6d06ffe1dc8ec | 9c88c21f93261f38495021b125bb6c63 | アバターの画像を表示する | if(radioAvatarMan.prop( "checked" )) {
imageAvatarMan.show();
} else {
imageAvatarWoman.show();
}
} | 1 |
2fbd0cc9454eb62d91fc9afd8d872fc3 | b6dbbf12c77a7d1f04400fe4d6191b8f | Store scanned history into firebase database | async create(data) {
try {
const result = await db.insertData('scan', data);
return result;
} catch (error) {
return null;
}
} | 0 |
f297db83a45b67e3978ceb3e9f6ff0df | 55c4d93777eb57a6a4c0c806e29cb369 | Intenta encontrar el menor bono compensatorio intentando poner cada familia en un lugar diferente | {
for (int i = arp[2].Count -1; i>=0; i--)
{
if (r.Next(3)==2 && Acomodar(arp[2][i]))
{
arp[2].RemoveAt(i);
}
}
} | 0 |
35942e7e7251edd902f5c63f60eaa410 | ce9f6a12e559e2a1f8b47cdc39fc2e0c | 规定规则,当不人工指定path的时候path就是名字加/在前面 | public class ServletPathSpec extends PathSpec
public static String normalize(String pathSpec)
{
if (StringUtils.isNotBlank(pathSpec) && !pathSpec.startsWith("/") && !pathSpec.startsWith("*"))
return "/" + pathSpec;
return pathSpec;
} | 1 |
96f49a8af724843501a730612aeb6a4c | 6fece00820babaacc7f5387bdde8c075 | 查看年检巡检记录 | if request.method == "GET":
record_id = request.GET.get("record_id")
user_id = request.GET.get("user_id")
page = request.GET.get("page")
size = request.GET.get("size")
identity = request.GET.get("identity")
if record_id:
recordObj = detect_record.objects.f... | 0 |
d1766a4699f2740ce34ba54e9a89fd48 | b15313a8d5e9f86414fce44652c58ceb | Get value from local resource | public class SonarPmdLocalizer extends SonarLocalizer
@Override
protected String getPropertyValue(final SonarProperty property, final Object resource) {
return property.getValue();
} | 0 |
f2d5918b38e93c730ef5be9d2114ad4f | 704e67446027bda6c61e186c36d66ad9 | 获得球员位置 和 朝向,
获得球的位置 和 球员到球的向量的角度,
判断球员有没有控到球,如果没有则让球员朝向球 | PlayerTask task;
const point2f& pos = model->get_our_player_pos(runner_id);
const point2f& ball = model->get_ball_pos();
const float& dir = model->get_our_player_dir(runner_id);
const float& dir_ball = (fabs(anglemod(dir - (ball - pos).angle())));
bool player_oriente_ball = (fabs(anglemod(dir - (ball - pos).angl... | 1 |
763d48de81a61f6956c3e9057ba81d7a | ea257fb20e3540b9e00ce982ccd2e5fc | Controls the visibility of the clear all button.
It is only visible when there are markers in the document | C clearButtonVisible(boolean clearButtonVisible); | 1 |
9719a2a881724c0aaf5eca6f2d076c95 | 4ac738a6310b6bcc92e0049fd1687c09 | Should return the name of the file containing the method which issued the log
message. | public class LogRecord
public String getSourceMethodName() {
return sourceMethodName;
} | 0 |
fc05549fed28bb82e07460eb555c8ff8 | 58cfbd58a3012d8338a3501670e3e227 | dir/file.suffix → file | func basename(s string) string {
slash := strings.LastIndex(s, "/")
s = s[slash+1:]
if dot := strings.LastIndex(s, "."); dot >= 0 {
s = s[:dot]
}
return s
} | 1 |
89d210f26bcbf2d15834345eda38b838 | 3cb68a66cfcf93fe2222467bd862112e | 查询板块资金排行数据记录 | def get_plate_fund_flow(kind):
if kind not in ['hyzjl', 'gnzjl']:
raise ValueError("kind 必须是 ['hyzjl', 'gnzjl'] 中的一个值")
url_template = "http://data.10jqka.com.cn/funds/{kind}/field/" \
"tradezdf/order/desc/page/{page}/ajax/1/"
i = 1
results = []
while 1:
url = url_... | 1 |
c4bacccf42039e69574d89fb6e5b542e | 512c8334e3709714f7925ba9973d3f9b | Gets the camera poses matched to the input in the camera pose finder. The poses are sorted in
terms of descending similarity (i.e. the most similar is first). | public int[] getMatching(); | 1 |
4dcca9d1a373eaacdd0501e399f105ae | 5134c719408e7143780c0ecfb1bb06b6 | The script's entry point. | try {
var assembly = Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly();
Log.Warn($"{assembly.VersionString()} (build: {assembly.BuildString()})");
var isConsoleMode = (Array.IndexOf(args, "--console") >= 0);
if (isConsoleMode) args = args.Where(a => a != "--console").ToA... | 1 |
8ea67e852f3b73d278b99a27ea47b43b | 7b907f5d968bb129e1c45c1193c55616 | 判断PLS系数是否与当前光谱和维数相匹配 | namespace Ai.Hong.Algorithm
unsafe public class SDStandardizing
public static bool IsValidCoef(byte[] calCoefData, int specCols)
{
StandardizingCoefParameter para = GetStandardizingCoefParameter(calCoefData);
return para.specCols == specCols && para.datatype == DATAMARK;
} | 1 |
b0710beba264ae0486cf5f140b61faa9 | cd52e883d96fcbab4175d96fc668e8b2 | 获取两个显示对象的距离 | function distance(obj1, obj2) {
var a = obj1.offsetLeft - obj2.offsetLeft;
var b = obj1.offsetTop - obj2.offsetTop;
return Math.sqrt(a*a + b*b);
} | 1 |
ad98cf70cb3abca00e7900b76fa9fb41 | 02452382a4d4f2a7748727d14a3d25f6 | returns block address for word address and block size | int getBlockAddress(int wordAdd, int blockSize)
{
return wordAdd/blockSize;
} | 1 |
3911a127d457922815b80f550f9c0a1f | 2ead7c00f914887b47cd3b510f8a3394 | Display upgrade disclaimer. | var displaySpans = getByClass(displaySpan);
if (displaySpans.length > 0) {
for (var i = 0; i < displaySpans.length; i++) {
displaySpans[i].innerHTML = 'Ad revenue is what allows us to keep this site running. If you\'re blocking ads, we\'d appreciate it if you added us to your whitelist or consider... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.