query_id
string
corpus_id
string
query
string
code
string
label
int64
d7a543ecc7aabacd8113dd5ad81d9ade
aeecaad2784aa192bed37815c44e0286
Returns to the value returned by the site_lab_tracker for this registered subject.
class LabTracker(object): def _get_default_value(self): default_value = self.get_default_value() self.set_is_default_value(True) return default_value
0
f8a51b8e0fe57caea1b95538401bdec5
96c2abe1c7206f7adbacb1b7cf5fef5e
Get all maps as collection instance.
class Validator public function maps() { return Collection::make( $this->validatorMaps() ); }
1
df7de209b4b7500ebb995db48213182d
82f51d64e78026c1f9ff260676a5e2ff
This function shows the preview of the character.
preview_data = self.all_preview_data[character_index] if self.get_current_player() == 1: self.p1_preview.change_character(preview_data.spritesheet, preview_data.name, preview_data.frame_durations) ...
1
c4321305024da5bb89e7622968d7f4de
0d87c089a6f85c14db51307c7ba8c0de
check that we can merge transcripts, even with fixed CDS coords
if TestTranscript.is_identical_no_cds(ivc1,ivc2) == False: return False start_test = (getattr(ivc1,"cds_start",None) is None and getattr(ivc2,"cds_start",None) is None) or\ (ivc1.cds_start == ivc2.cds_start) end_test = (getattr(ivc1,"cds_end",None) is None and ...
1
7a02705054ae0a8d998db542fd93ff80
1e6b7cabcde02c6d76333ebf22973fbf
Method to publish Message to target topic
String publishMessageToTopic(String topicArn, String subject, String message);
1
8e05f00ccb2d4fb9911f3b80e4c8b08e
e78c8010f551887e8bd60fc27f26bcfb
是否包含验证未通过的控件
{ bool Result = false; foreach (System.Windows.Forms.Control ctl in controls) { if (ctl == null) { } else if (ctl is IEditableControl) { if (((IEditable...
0
6e7e96002d2bce21f3fd1806c4d69713
215b4d121e5039abf12aacea3a36b797
Computes repulsion parameter
function computeNodeRepulsion( n1: Node, n2: Node, config: FA2Configuration, ): number { const coefficient = config.scalingRatio const xDist = n1.x - n2.x const yDist = n1.y - n2.y const massCoeff = coefficient * n1.mass * n2.mass let distance = 0 let factor = 0 let xdf: number let ydf: number if (config.ad...
1
696c497895859c36c8524e47978bb05d
00ee91d2753b876e22e981ba65e565b5
Convert Hz to MIDI numbers
def hz_to_midi(f): return 69.0 + 12.0 * np.log2(f/440.0)
1
af680d02065ab374a5ff5c7281728d9b
14f158a13a3f702d9193e187aab3e51e
Displays a form to edit an existing Provincia entity.
{ $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('gemaBundle:Vendedor')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Vendedor entity.'); } $deleteForm = $this->createDeleteForm($id); $editForm = $this->createEditForm($entity); $...
0
d0183ad6ed71b86816af5c05f9fa8016
ea7702a3e98082634bd79972bf4be12b
Função de criação de zumbis
int r, i, t; int x, y; r = random()% MAX_BAUS + 1; e.num_baus = r; for (i = 0; i < r; i++){ do { x = random() % (TAM-2) + 1; y = random() % (TAM-2) + 1; } while (posicao_ocupada(e, x, y) || limite(x, y) || tem_bau(e, x, y)); e.bau[i].coord.x = x; e.bau[i].coord.y = y; t = random() % (27-25)+25; ...
0
2a56d730addbc424430b4456c0d4a92c
a2c0266c9f96e1473e0b962d3ab6c1e0
根据bedID查询床位信息,返回修改界面
@Service("hospitalbedInInterService") @Transactional @SuppressWarnings({ "all" }) public class HospitalbedInInterServiceImp implements HospitalbedInInterService{ @Override public BusinessHospitalbed getBedByid(String id) { return hospitalbed.get(id); }
1
7aa9156a1bfa9ac3c55c2b5d3f8c4db0
a33e0a3513c44adc52c722c987e0a6fa
shift left arithmetic byte
unsigned int reg1u = reg1; reg1u = (reg1u << execute_shamt); reg1 = (int)reg1u; return (reg1 & 0xFFFFFFFF); }
0
9d817fcaf7c6c18862c5eada404fee79
14f0cc9044ccd4d29d1fbdc7179b02ab
Build a spatial decoder that performs deconvolutions and unpoolings
class spatial_broadcast_decoder(nn.Module): def __init__(self,input_length,device,lsdim,kernel_size=3,channels=[64,64,64,64,1]): super(spatial_broadcast_decoder,self).__init__() self.input_length=input_length self.device=device self.lsdim=lsdim assert kernel_size%2==1, "Kernel si...
0
f7e4ef542927157d980a848f62504d6b
37942472dddabd3db25a4f5f5c0c4dc6
#### 在一幅图中显示矩阵x每一列的折线图
outline <- function(x, txt = TRUE){ if (is.data.frame(x) == TRUE) x <- as.matrix(x) m <- nrow(x); n <- ncol(x) plot(c(1,n), c(min(x),max(x)), type = "n", main = "The outline graph of Data", xlab = "Number", ylab = "Value") for(i in 1:m){ lines(x[i,], col=i) if (txt == TRUE){ k <-...
0
433a61eb5a1ab3c4258d25629644bb26
687812503505b4d28cfab94a44c40a30
Stops the timer if a new stroke has started
namespace TCC_Eng_Info public sealed partial class MainPage : Page private void inkCanvas_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { _recogTimer.Stop(); }
1
d28ed52580b3cfe65f1ab113c6cb89b3
e1bf1447d02118ffe1c13f063e5eda4c
Gets the value of the arledgeritemid property. possible object is {@link ArrayOfInt }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "osiv", "osi", "qual1", "qual2", "id", "idType", "idText1", "idText2", "vType", "vnd", "versionNum", "prodType", "sourceSys", "custID", "serviceProviderCode", "productProviderCode", ...
0
cca69ee5f9f76f398e7565b0e2afa693
d65d9ad0bc7545d9e376d9e1493fe4b2
计算两个不同boxes的所有相互之间的iou,生成一个矩阵
class yoloLoss(nn.Module): def compute_iou(self, box1, box2): N = box1.size(0) M = box2.size(0) lt = torch.max( box1[:,:2].unsqueeze(1).expand(N,M,2), box2[:,:2].unsqueeze(0).expand(N,M,2), ) rb = torch.min( box1[:,2:].unsqueeze(1).expand(N...
1
e6ae41e5131d3e81453e89de9d633eb1
20a50928a0a46b904dee6d000f44b1d7
Không cho nhập chữ số vào họ tên
namespace Bài_tập_lớn.NET___Phần_mềm_quản_lý_thiết_bị.View public partial class QLThongKe : Form private void txtYear_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar)) { e.Handled = true; } }
0
4db21976f6e12a2b0c41faca40db5cac
b8cf64a5e9c86e6f31aa296af69d9313
Return identity.
def identity(x: torch.Tensor) ->torch.Tensor: return x
1
10dac88529c9c24c25c3105bbda04af7
308d26654c8be914e672482a10f50888
2017-06-09 zlb 查询上架广告最多的前十的城市
class AjaxController extends Controller public function getadvlrtop10(){ $data=D('DaydataInandout')->getadvlrtop10(); $num=0; foreach ($data as $k => $v) { $num++; $html.="<tr> <td>$num</td> <td><a hr...
0
1df15f41a9627d958ae304601ea49e8f
72ac538d62c111017acd9b820f4d2de2
! Replaces the painters with the specified ones. Used to refresh style. Custom feature painters will be instantiated.
public abstract class AdaptivePainter<E extends JComponent> extends AbstractPainter<E> @Override public void install(final E c) { painter.install(c); }
0
4a780e7b73015328e99da6658b154f60
e783485eb37decf97265e2b1da175e4b
подготовим список возможных транспортов
$('<div class="types-' + travel.route.vt + '">').appendTo(typesTransportList); numberTransportList.append(document.createTextNode(', ' + travel.route.name)); if (travel.transfer){ routeTravelHeader = getTravelHeaderTransfer(travel.transfer, routeTravelHeader, typesTransportList, numberTransportList)...
1
a83a9489402b062d337bc471b389da9b
d7ac318de2c8a50edf59083a637a02d3
Sets the starting identifier used when creating new nodes. <para>When rebuilding networks across sessions it is recommended that the identifier is set to the last used identifier.</para>
namespace Microsoft.EntityFrameworkCore.Metadata public class SqlServerModelAnnotations : RelationalModelAnnotations, ISqlServerModelAnnotations protected virtual bool SetIdentitySeed(int? value) => Annotations.SetAnnotation( SqlServerAnnotationNames.IdentitySeed, value);
1
e1e84c6574e9318029ce10d890e2515e
e5cf5e6a9cb6f56e1a3c933cda4222f0
Parametric interpolation of segment radius. Segment radius varies smoothly between neighboring segments. Without a neighbor, the forward half terminates in a half-ellipsoid and the backward half terminates in a cylinder of constant radius
def radius(org_dist, dst_dist, current_step, nb_steps, r=100): alpha = current_step / (nb_steps - 1.0) r = (1 - alpha) * org_dist + alpha * dst_dist + np.sin(np.pi * alpha) * r return r
1
503d58cf9107f1d6f8d299eb6cff7ddd
5aa562cf5659acb645774ad97362184b
Возвращает строку имен полей таблицы, кроме id, разделенных запятыми для формирование INSERT запроса
class DbModel implements IDBModel getFieldsForSelect(): string { let fieldsNames: string = ''; this.fields.forEach((field: IField) => { if (field.tableName === this.tableName) fieldsNames = `${fieldsNames}${field.dataField}, `; }); return fieldsNames || '*'; }
0
bb0f08949b38ccd8d65e5948072141b7
077d238e87536a18b0d7c1c923faccec
Makes predictions using a fit classifier based on Precision score.
class CalibratedPipelineHyperOptCV(BaseEstimator, ClassifierMixin, MetaEstimatorMixin): def predict(self, X): check_is_fitted(self) calibrated_classifier = self.calibrated_classifiers_[0] return self.classes_[np.argmax(calibrated_classifier.predict_proba(X), axis=1)]
0
24d061bccf2fa47e6c500c6f3e9d6cbf
ccf4c1936607d8f808c5aa07fb7b3ca5
=> Python does not have method overloading
def overloaded_add(arg1, arg2): return arg1 + arg2
1
a2ebd20f65f72ac854f2bea42869dbba
da376b9bbbff6cc25069c1f25e9b2ab6
Set the channel to log shard events to. **Example:** - `[p]connectset channel #general` This will set the event channel to general. **Arguments:** - `[channel]` - Is where you set the event channel. Leave it blank to disable.
class GuildConfig(commands.Cog, name='Settings'): async def set_channel(self, ctx): if ctx.invoked_subcommand is None: await ctx.send_help(ctx.command)
0
8399f2cdb8cdf83440258465c09f63c5
af57bba0e152a462951f57467a69a0b0
Applying Momentum Stochastic Gradient Descent.
def momentum_gradient_descent(params, X, y, cost_func, grad_func, alpha=0.01, epochs=100, k=64, l=0, beta=0.9): args = (params, X, y, cost_func, grad_func) kwargs = { 'alpha': alpha, 'epochs': epochs, 'k': k, 'l': l, 'step_func': step_moment...
1
f2b53e70f364b7c9dbf65802ce79e3db
78e3bb1699ff0d93b68bb0c90a4b2b54
Проверяет наличие перевода в истории. Если найден, то загружается из неё без обращения к серверу. Перевод однозначно определяется по тексту оригинала и направлению перевода.
public class MainActivity extends AppCompatActivity private void getTranslate() { if(myHistoryManager.checkIfHistoryItemExists(myTextInput.getText().toString())){ String translate = myHistoryManager.getHistoryTranslationByKey(myTextInput.getText().toString()); myTextOutput.setText(transl...
1
28ddd634f1cfc492ba2591e22fa2e5df
15d4b2e2aca61b02d577a9a8f80197b2
请求全部军团列表
function list() { CmdMgr.pushCmd(Cmd.C2S_Faction_List); }
1
de8cfaa7f81d211d74e839828e66154c
432fb4f04b1e9a1fdb678ad6f87899e3
Get the currently buffered text from the {@link InputStream}.
public class PrintStreamToStringBridge public String getText() { String ret=""; if (_ps!=null) { _ps.flush(); byte[] buffer=_baos.toByteArray(); try { ret=new String(buffer,_encoding); } catch(UnsupportedEncodingException e) { LOGGER.warn("Unsuppor...
0
cf62c4772827da1a9f7a1565a8166e5c
57c2b94b77840157705b68eeccf11099
Gets the value of the Reprocess field. Indicates if a message needs to be reprocessed. Will be picked up by a batch process.
boolean getReconciling();
0
4ff436d1db444202f60ae6df1e99f579
66ae0b3045c1b5f5aeaf301e0d0ee20e
ensures the right viewport for ordinary oscillogramme
{ if(h == 0) h = 1; glViewport((int)viewport.GetP0().GetX(), (int)(h-viewport.GetHeight()), (int)viewport.GetWidth(), (int)viewport.GetHeight()); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(clipping.GetLeft(), clipping.GetRight(), clipping.GetBottom(), clipping.GetTop(), clipp...
1
74a47c2b259fb0f7dd97547ab0988b5b
bb0c54d1694bbe0080b3487abb54a639
Delegate unimplemented methods/properties to the original generator iterator.
class GeneratorWrapper(Executor): def __init__(self, generator, iterate_once=False, exc_handler=None): Executor.__init__(self, generator, exc_handler) if iterate_once: next(generator)
0
8309043231cef8cd991d455a7b756a23
6076aebf419fa61700b23d4028355f91
Checks the return value of a BDD Method.
class QmfTestBase010(TestBase010): def _check_qmf_return(self, method_result): self.assertTrue(method_result.status == 0, method_result.text)
1
67e46a4ebb8c3342d1383a77551f7a1c
f304b62e000592b1a9857fe008da6b10
分配运营经理角色,如果服务商下已经有一个运营经理,则不分配
public static AgentService allotAgent(AgentUser agentUser, String orgi) { List<AgentStatus> agentStatusList = new ArrayList<AgentStatus>(); PagingPredicate<String, AgentStatus> pagingPredicate = null; if (StringUtils.isNotBlank(agentUser.getAgent())) { pagingPredicate = new Pagin...
0
aafbb0daaa8dbae438eeeb5d2e12485a
b7ec17fd6208c9cf50472030a54ab7ed
Test the equifrequent discretization method.
self, bn, train_data_discrete, train_data_discrete_cpds ): bn.fit_cpds(train_data_discrete, method="BayesianEstimator", bayes_prior="K2") cpds = bn.cpds assert ( np.mean( np.abs( cpds["d"].values.reshape(2) - train_d...
0
dc258f52b39d1fda7a881d7e0e5030dc
771c6e30410d7a0fe997c75e5ef8506b
Patches the properties of an existing Azure Cosmos DB database account.
{ if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } if (this.Client.SubscriptionId != null) { if (this.Cl...
0
c58742bf9f51bc7efe08d475ebb3d78c
8a348478c14fc07f0242f35766b4cb1a
Singleton access to Lookup controller
class InformationMachineAPIClient public function getLookup() { return Controllers\LookupController::getInstance(); }
1
77977e46bd6bf64fc0463faf8225d02e
caa52f38bcb7d1b9e1dae710627e888b
Turn the agent's head and camera down by 30 degrees.
void GLCamera::lookDown(float degrees) { lookUp(-degrees); }
1
ac5b117edebac77b9d21fde82dcdd19f
546dcfb6ecb7f43863de967050e3f544
Creates a new adapter for an object of class '{@link org.example.domainmodel.domainmodel.ScreenModule <em>Screen Module</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-use...
public class AbstractconstructsAdapterFactory extends AdapterFactoryImpl public Adapter createActivityAdapter() { return null; }
0
c2b9cf500100992bc39716e0993462d6
eb1106cbd690dea7743acc7e7e0649b5
Форма для редактирования магазина
class MerchantshopController extends BController public function actionEdit() { $viewData = array(); $shopEditForm = new ShopEditForm(); $viewData['district'] = District::model()->findAll(); $viewData['category'] = $this->categoryBehavior->getAll(); if (!Yii::app()->request->IsPo...
1
88809717dccaed2b6146a1aa09356195
fc0cd8fa81d7f1bbcd2eb700799de130
Save the network output to disk, one batch at a time.
for i,I in self.items.items(): current_frame = (self.current_frame - I['offset']) % (I['offset'] + 1) savefile = self.save_path + os.sep + i + os.sep + str(self.current_frame).rjust(8, '0') + '.png' item_shape = self.net['neuron_pools'][i]['shape'] if item_shape[0...
1
bcd3211ac6880b75a0aec3dba1175cbb
7b7d198d629b1537774e98d0f5d1376b
Check cache for existing waves
public class MainMenuController : MonoBehaviour void FillWaves() { ClearWaves(); for (int i = 0; i < CurrentLocation.Data.WavesData.Length; i++) ShowWave(i); }
0
95f4313c22b071b013a87023269bc27b
de173dcc9a6e2b8167aafaa92168c204
A function which clears all the variables of the game
class ThreadedMain(threading.Thread): #the main thread of the program, will handle all the function calls from Listener def clearVariables(self): self.MouseProcedure = list() self.lengthList = 0
1
ee20d8b5eb7c34091ef8617c31675791
8427a1692543db4fd1ffa61bf30b2d8e
@brief This function handles OTG WakeUp interrupt request.
void OTG_FS_IRQHandler(void) { USBH_OTG_ISR_Handler(&USB_OTG_Core); }
0
eb2102eff977226f17fb6a21543c5560
8c6f64af9dd5fb7d2b4a06ed544767cc
Calculates end time from start time adding by duration hours.
Timestamp endTime = new Timestamp(startTime.getTime() + (length*1000*60*60*24)); return endTime; }
0
300c6d6e8e2d3d47b5173454f09ef000
fbc08e223a09aad9b045e8d72bb8a9f7
check whether or not a string is a cron time expression
{ if (string.IsNullOrWhiteSpace(expression)) { return false; } try { ValidateExpression(expression); return true; } catch (CronFormatException) { return...
1
58d0910a4c0b5cf053ab4378aba8e3dc
32b759ba7b32bbdbc55e2823fe2976c8
Perform all actions related to putting the drill on the screen.
public class Jumbo_Drill : MonoBehaviour void Start_Drills() { if(!waiting) { drilling = true; Set_Drill_State(); } }
0
025231692d1c9c53960d190715635b43
d08dfa26b25961b78d3c0f8df467b3e5
是否来自另一个 Cloner 的消息.
@SuppressWarnings(value={"unchecked"}) public class PSRequest public boolean isOriginalRequest() { return m_cloneParentRequest == null; }
1
52c2d567f148d079bcd1aa4d13eac405
906024d6455fbc633ccadb03c00f3e46
Objecthandler for Koodistopalvelu taidealantyyppikategoriat
function getKoodoNames(){ $('.body_right').html(''); $.getJSON('Koodo.names.json.php', function(data){ if (data.length > 0) { for (row in data) { $('.body_right').append('<span class="Koodo" id="'+data[row].id+'"><button class="button" id="rightMainMenu">'+data[row].name+'</button></span...
0
536294eb863698b179539bdc29e70542
6f15cf11bd3bc541c22c61d89103b60b
Creates a temporary Ansible inventory file on disk
class Derployer def write_ansible_inventory_file server_type = self[:server_type] target_host = self[:target_host] target_ssh_port = self[:target_ssh_port] inventory_content = "[#{ server_type }]\n" \ "deploy_target " \ " an...
1
b29adf66886415f019e07aef7d236b41
2bde218b2e43ee2a8357e55cd657cef4
处理鼠标悬浮视频图标要素
HotspotMarker marker = hotspotMarker.get(povId); if (marker != null) { this.selectVectorElement(marker); } }
0
d157a3ae174cc653f4bc30ac9a8f29e2
d57f87b6444c38c7be1e3d651bbb9f13
Re-import and parse an array design which had previously been imported without parsing, but for which a parser is now available. reimported if currently it has a status of IMPORTED_NOT_PARSED, but there is now a parser available for its design files.
@Service("arrayDataService") @Transactional (propagation = Propagation.REQUIRED) public class ArrayDataServiceImpl implements ArrayDataService @Override public PlatformConfiguration loadArrayDesign(PlatformConfiguration platformConfiguration) { AbstractPlatformSource platformSource = platformConfiguration.g...
0
69891c3020e7e7704d81e218fa186d37
f741ef4017631abcb7c7064a6b2aa7f5
Get the messages sent by friends that are later than the given ID.
$data = array('count'=>$count, 'page'=>$page, 'since' => $since, 'since_id' => $since_id); $query = http_build_query($data, '', '&'); return $this->_GET( 'messages', 'direct_messages/sent.'.$this->twitterResultFormat, $query); }
0
dedde439b6e1b8aba7f004482a2e617a
f7d29bda8a0e7f8df7c040b0f0bf0adc
Update the room code when the user connects to a valid room
ref.once('value', function(snap) { document.getElementById("answer").innerHTML = ""; snap.forEach(function(child){ if (child.val().roomcode == roomcode) { var temp = child.val().name; addStrike(temp); } }); }); }
0
6afe355168eb289ffd6dbc1b912da56e
783d3a3722f160d70e02a84bd51e9966
Decrypt the given string. Assumes the string was encrypted using EncryptStringAES(), using an identical sharedSecret.
{ RijndaelManaged rijndaelProvider = null; try { DecryptKey = DecryptKey.PadRight(32, ' '); rijndaelProvider = new RijndaelManaged(); rijndaelProvider.Key = Encoding.UTF8.GetBytes(DecryptKey); ...
1
0c0a2613fd7b3582f0f2127c6690889d
86ea38486b0cd7a0c2e3462a4e894224
Returns the difference between the Total Time of the New and Base {@link Entry}s.
long getDiff ();
1
4d3ed72b4c28c5ff6b35cc66263488a1
7f61448ad6da3ef0f9cb03f40c5be655
++++++++++++++++++++++++++++++++ constructor ++++++++++++++++++++++++++++++++++++
cases like (1)
0
349751761fecbe073be7d1cd62debdac
7920b80b9134c6c507ea8f158f8b6c33
goes to recommendation activity/screen
public void onClick(View v) { Intent intent = new Intent(MakeNewMeetingActivity.this, RecommendDate.class); startActivity(intent); }
1
b1f592eceefaa67a5380172441ec0d7c
f7885802ba8cc6c4e8f1245d6b44efd3
Appends the formatted extension of a phone number to formattedNumber, if the phone number had an extension specified.
{ this._unformattedPhone = ""; if (sAreaCode.Length > 0) { this._unformattedPhone = sAreaCode + " "; } if (sPrefix.Length > 0) { this._unformattedPhone += sPrefix + " "; } this._unformattedPhone += sPostfix; }
0
f0b4cacdab5b77a904bd8915ec2caa7c
b823722d4707383076f6e14954113e66
ephemeral_gb attribute should be non-negative ( >= 0) integer
def GbTokib(Gb): return Gb * 976563
0
dbfd1a359eb676019b9acbf429f2b9e8
6033f57af828b6e85073cfee6ad84a4c
Function to zoom and crop the background surface to the correct level for display.
var minDim = Math.min(renderCanvas.width,renderCanvas.height); cropCanvas.width = renderCanvas.width; cropCanvas.height = renderCanvas.height; var cropWidthX = minDim; var cropHeightY = minDim; cropCanvasBB.style.width = cropWidthX + 'px'; cropCanvasBB.style.height = cropHeightY + 'px'; cropPosX = (rend...
1
65b2183e005f6d936dc448af79e3172f
c6c737c69526e0082019570105ccdb2c
Getting from the uploads endpoint is disallowed. A message is returned to indicate this.
self.client.login(**test_auth(superuser=False)) response = self.client.post( reverse("upload_delete", kwargs={"file_hash": self.upload.sha512}) ) self.assertEqual(response.status_code, 302)
0
ed894d85cb8e81214f0ba4f9c32d59f9
f0a8e669062aff0c1c2aea11f4573343
Returns the collection of this diagram's components.
public Component[] getComponents();
1
18114984c4043fc5a1ecd98a2b6898b1
1922666bb915a62c282a6c4720239051
Fly traffic pattern, using regular controllers (navigation will take care of determing target course)
void behaviourController(void) { if (isAuto) { behaviour_avoid(); behaviour_escape(); if(escape.state != IDLE) moveCommand(&escape); else if(avoid.state != IDLE) moveCommand(&avoid); else if (cruise.state != IDLE) moveCommand(&cruise); ...
0
8ca8865ca34c4cb1dd4755190bcd6052
a3a0fa8dd6ee096bb3f6fcc8277e282f
Create a new performance event with the given event id and start counting the time. If the logger doesn't care about this event id, it may return `null`.
void logEvent(String eventId);
0
4bc54ade6a150ffccb8a6e5ed8fd4e62
bc723f2fe4e71ddba844d3b1dc3ba02f
Look if there's a prefix parameter and strip it from the tagdata
abstract class AbstractCache implements Adapter public function removePrefixTag($str) { return $this->removePrefix($str, $this->options['prefix_tag']); }
1
91b09dbe96670c5580b1720e7115af68
f39ba0e15c8554e0f21159ec39622d07
Called when MenuType property has changed.
namespace LinkMe.Framework.Tools.ObjectBrowser.Net internal class NetNamespaceBrowserInfo : ElementBrowserInfo, INamespaceBrowserInfo, IDisposable internal void OnTypeOrderChanged() { if (m_types != null) { m_types = new SortedList(m_types); } }
0
c6936ce5a3d043b4667ed8d7050a96d1
ce161d561d592d8773cd234938753af8
Helper method returns the size of an element in the MDHistoWorkspace
{ if (variableLengthString) { return HDFHelper.getMachineWordSize(); } if (dataClass == HDF5DataClass.STRING) { return 1; } return elementSize; }
0
1e923fe9ff1f82c2413c90bd76973305
839a090316dc7b33ff36ef3a1cfddc15
Performs the Hough trasnform on the input edge detected matrix
vector<Vec4i> LaneDetector::houghLines(Mat img_mask) { vector<Vec4i> line; HoughLinesP(img_mask, line, 1, CV_PI / 180, 20, 20, 30); return line; }
1
224237c8e94ef3ca9a923010cbc667c5
c40aae5d5d25dab1b5012ae7a47a56f3
Follows users given in users_to_follow.txt file.
user = self.getOpt("user") ufile = self.datadir + user old_followers = [] old_friends = [] self.verbose("Diffing followship of '%s'." % user) if not os.path.exists(self.datadir): self.verbose("Creating datadir '%s'.\n" % self.datadir, 3) os.makedir...
0
2c789add52d39e24ad9e21ce1dd50cf1
f958ed4b6f42fca679379236ba60fb27
将权限PO对象转换为DTO对象,主要是处理DTO对象中的权限主体和资源操作。
@Component public class SecurityDTO implements ISecurityDTO @Override public AccessControlPO convertToAccessControlPO(AccessControlVO accessControlVO) throws Exception { if(accessControlVO == null) { logger.error(Errors.ERROR_BUSINESS_COMMON_ARGUMENT_INPUT_NULL + "accessControlVO"); ...
0
fe804db11657a3cdea652ec27320ffc0
2190c051c8556de98a7349c0fd16f5cb
Disconnect Disconnect from the remote machine, by sending an OBEX disconnect, and closing the transport on (and regardless of) response from the server.
{ int ret = AEE_SUCCESS; mt_obex_status_type status = (mt_obex_status_type)BT_CS_GN_SUCCESS; mt_obex_hdr_list_type *pHdrList = NULL; MSG_DEBUG("OEM OBEX cli disconnect pOemHdr %x ->",pOemHdr,0,0); if (pOemHdr) { OEMOBEXHdr_AddRef(pOemHdr); pHdrList = OEMOBEXHdr_GetHeaderList(...
1
3e69dd59fca3ee6aa9dc6cd576aa390e
21c9fbc7596916f2206e16712d2c277a
Like a Comment
async function likeComment(commentId: any) { await request(`/comments/${commentId}/like`, 'post', { senderIdentifier: getUUID() }) }
1
28d4698222c78cfbc71cfa84c8b2a786
ad5f60e3f1eb0a419d772f12121aab48
Check if the request was forwarded from webpack.
function is_proxied() { return defined( 'WPORG_PROXIED_REQUEST' ) && WPORG_PROXIED_REQUEST; }
0
5d21cc4b8b3288f55ec24d5d1efc8d06
676eea03f55f6ff0940cad669c86d0bf
This method gets called if/when the skill is lost, it removes all the passives
for k,skid in pairs(self.passive_obj_l) do local skill_o = g_skill_mgr:get_skill(skid) skill_o:effect(char_id, {}) end end
0
9a92021c17769047e3a58ac0c9104ff7
1d4149492a979caa105b9beea218dfed
This is called by the UI to get a new session. The life of the session is controlled by the Session manager. The SessionManager maintains HEAD$ which represents the most current state of the stream. It will also decide which changes should be made to existing sessions and the life time of existing sessions.
public final Handle requestNewSession(@NotNull Flags flags) { return activeController().requestSession(flags); }
1
756735792f213e3e0b2ca6ec0edd76ab
45ac42bfe1eae2e6b329f1b32a6cc8d5
Создаёт lcs по заданному типу и запросу OData.
{ Uri uri = new Uri("http://mydomain.com/api/products" + queryStringPart); QueryString queryString = uri.ParseODataQueryString(); return new ODataQuery<Product>(queryString); }
0
56561890d9b65ea1a41a12f9eae99b63
f80c0589031657b10c31f25a8c12734a
Gets town map
def get_map_world(): plt = maps.make_map_world() plt.savefig('geo/map_world.png') return Response(open('geo/map_world.png', 'rb').read(), mimetype='image/png')
0
43e4fe972b9b24cf89bf8be0a682bbf5
411b5469bcf3b848c1f7be02d8ee0708
General - Requery the last query with the new offset
public class SearchActivity extends AppCompatActivity implements FilterFragment.FilterOptionsDialogListener public void loadNextDataFromApi(int offset) { executeSearch(offset, query, null); }
1
54376f6c38dbae1864d094b744e11f0d
ea2281ede6e9967f043d8de43e930932
保存.obj文件
class Smpl(layers.Layer): def save_obj(self, _vertices, file_name): file = './{}.obj'.format(file_name) with open(file, 'w') as fp: for v in _vertices: fp.write('v %f %f %f\n' % (v[0], v[1], v[2])) for f in self.faces: fp.write('f %d %d %d\n' % (...
1
fdfd60478ba37420dde9e27d24807ed6
40ffd8e980cafb15834053af703e3224
Tests if this vector has no components. that is, its size is zero; <code>false</code> otherwise.
public class VectorExtArray implements Vector public boolean isEmpty() { return (0 == size) ? true : false; }
1
e94d2a248bad0b0d77227e3da9c838d1
067717068eabf032ad1c063f76c653e1
This lock type is always available, because it uses standard features.
export class NoLock implements AnyLock public async acquire(): Promise<boolean> { return Promise.resolve(true); }
1
9cc0e0886d550239cc523d83b3fba01e
9b5ce4ce78f80d3e74b0247fc3b5d77c
Methode qui calcule les points du tour present.
{ Dictionary<Unite, Point> unites = carte.GetUnites(this.joueurCourant); int pointBonus = 0; if (unites.Keys.First().GetType() == typeof(UniteOrc)) pointBonus = VerifPointBonus(unites); foreach(var point in unites.Values.Distinct()) { ...
1
d0e6d1e3cb391c00d3f90decc176166d
4c66865e93bc9d8ac9c6bde3680b52b9
Removes the keyboard to display the error message
namespace SmartHotel220.Clients.UWP.Services.DismissKeyboard public class DismissKeyboardService : IDismissKeyboardService public void DismissKeyboard() { InputPane.GetForCurrentView().TryHide(); }
1
4c5aef4c73951b5adea6aef972708077
7150ac915feeeec6b6c31a74bf71f370
Given an edge (src, dst), returns the reverse edge (dst, src).
class Edge: def __invert__(self): return Edge(self.target, self.source, self.weight)
1
dea44c282b52688c04af4f2f6b8a2b6b
59571643d8f71c2814885e8f6a8c99a9
Creates a dto from a data object.
new_dto = cls() if cls == EpisodeDTO: existing = EpisodeDAO().find(number=obj.number).first() if existing: new_dto = existing for key, value in obj.__dict__.iteritems(): if key == 'transcripts': setattr(new_dto, key, [DTOConvert...
1
792dcc00258faa3a2d952bb25bcfb10b
3617a30145a89de453746e3c3ee79674
具体写实现类文件
public void test3(){ byte[] classFile = ProxyGenerator.generateProxyClass("$Proxy0", Calculator.class.getInterfaces()); String path = "F:/Calculator.class"; try(FileOutputStream fos = new FileOutputStream(path)) { fos.write(classFile); fos.flush(); System....
1
940474f71bfef9e3aa7cbda1ec0ce835
f6214b601e3947537755c261282fbffd
TM_conversions::C_P042_compr_onboard
CompressedPackets_T_Common_Types_Pkg *Message_IN, kcg_bool *received, P021_OBU_T_TM *P021_OBU_out) { static array_int_500 _L5; static MetadataElement_T_Common_Types_Pkg _L30; RECV_ReadPackets_TM_lib_internal( Message_IN, 21032000, kcg_true, kcg_false, &_L5, &_L30, received); C_P021_co...
0
e8641932bbac92d830d2805f98968c3f
3ff5e191cfb44e318bc6bd873fb1f370
Return True if filename is valid, False if not
def test_filename_is_valid(): assert filename_is_valid("foobar.txt")
0
2f595c137577ab39283468f218dc9353
800c76484f6a75f8fee958dbe08379ea
Remove values that match the encoded defaults from the encodedValues object
function omitDefaultValues(urlState) { if (!urlState.controlPipe) { urlState = omit(urlState, 'controlPipe'); } if (isEmpty(urlState.nodeDetails)) { urlState = omit(urlState, 'nodeDetails'); } if (isEmpty(urlState.topologyOptions)) { urlState = omit(urlState, 'topologyOptions'); } return omitB...
1
e7bd7f209337fd6288511dbd0beeb965
2ed0723dd99359ddefc5ed05dd45888c
定位赎回页面的小贴士文本
class SNB_Buy_now_page(Snb_Buy_Now_PageUI): def get_buy_now_pay_pass_yf_text_loc_page(self): return self.get_buy_now_pay_pass_yf_text_loc().text
0
81ae20ddc76deaba4501a3a1884f2d17
445b3084d063dd59602310b2424c2e03
判断数据库中是否有书名为name的书
{ MySQL mysql = new MySQL(); DataTable table = new DataTable(); MySqlDataAdapter adapter = new MySqlDataAdapter(); MySqlCommand command = new MySqlCommand("SELECT * FROM `bookslibrarytable` WHERE `name` = @uN", mysql.getConnection()); command.Parameter...
1
2d53709cef700fcdc4f83db38ed55af8
a52984924d443a2c58dce5f6988338eb
Returns the document collaborators information
{ $endpoint = $this->endpoint('collaborators', array( 'user' => $user ?: $this->client->config('login'), 'repo' => $repository, )); $response = $this->client->get($endpoint); return $response; }
1
5e71e8bde66798ce33844c18b885f8cf
c8e4a8de6bf8731b5d9fa39a509e6da7
Parse a Dominion Land Survey well identifier
const endOfRow = wellId.indexOf('|'); const row = parseInt(wellId.substring(4, endOfRow), 10); const column = parseInt(wellId.substring(endOfRow + 9, wellId.length), 10); return { row, column }; }
1
43303b0571d9349b9d2e70e8b4f7b515
b084d8412824f2a7387b19cbb53f152d
校验主播 实名认证状态
isTrue(member.getRealNameStatus() != null && member.getRealNameStatus() == RealNameStatus.VERIFIED , msService.getMessage("NO_REAL_NAME")); }
1
17d4c61d58da9c0cf65885419887f573
8aa0a0de1e6d3e92282439a5149d9e8a
Checks if the busy flag is set. If it is set then it is busy. Note that the busy flag is the MSB of the data byte.
class CC2510(ChipDriver): def isFlashBusy(self): a = self.readXDATA(0x6270, 1) return (a[0] & 0x80 != 0)
1
cda5237231d7bc0ea99fbaa3cf6ef44c
c1b1bc0b5952fd481837dd0d0b76f649
horarioOrgao.js Função utilizada para validar o campo do horário. Aqui é verificado se tem algum valor, se o mesmo é numérico e se segue o formato HH:MM.
function eHora(value){ erHora.lastIndex = 0; return erHora.test(value); }
0