query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cef7c95d52d4882a6d0f5e7e04f6020a | df687b8a2f00403c6ef94975700fa4e4 | 获取机器人通话时长,单位:秒 | {
if (startTime == null || endTime == null || type == TYPE_VOIP_CALL_IN_REFUSED
|| type == TYPE_VOIP_CALL_IN_MISSED || type == TYPE_ORDINARY_CALL_OUT)
{
return 0;
}
else
{
return Math.abs(endTime.getTime() - startTime.getTime()) / 1000;... | 1 |
91f7540275d67897c95d1a8b1f541842 | e72948f703f3fdd5534dfd1e76790742 | Path du fichier contenant la table de correspondance entre les anciens
identifiant et les nouveaux | class AttestationExtras
public function getAncienAssedic() {
return $this->ancienAssedic;
} | 0 |
8af1eb33c46045b483e1fa60c869fa34 | fdb9c9918514e6a2a8845d2b4b2e85f2 | objectのリストをAction型のリストへと変換します | class AdvanceFeatureFragment : BaseFragment(), View.OnClickListener
private inline fun <T, R> Iterable<T>.convert(action: (T) -> R): Iterable<R> {
val list: MutableList<R> = arrayListOf()
for (item: T in this) {
list.add(action(item))
}
return list
} | 1 |
5879dc88b37682855d3d7b0536271204 | 35c059291617c4ea7a28acaeefe2a719 | Duplicate the provided socket address. | sockunion_dup (union sockunion *su)
{
union sockunion *dup = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
memcpy (dup, su, sizeof (union sockunion));
return dup;
} | 1 |
544ee078b31234114b8503368d5c8081 | fdcb893f251896f5c35a05ad5428d9ad | 获取距离最近的超人作为攻击目标 | function BossAI:NearestTarget(_boss_unit_point, _herotargets)
local i=0
local targetposlist = {}
local returndist = 10000
local herolist = {}
local targetdistlist = {}
local pointi = -1
for i=1,#_herotargets do
table.insert(targetposlist,_herotargets[i]:GetOrigin())
table.insert(herolist,_herotarget... | 1 |
205dee96d3851be3a068c0d5d95f5d4f | f45aa55a9099669c73807b0aa977e7b6 | delays loading of youtube embedded videos | window['onYouTubeIframeAPIReady'] = waitForReadyStateComplete;
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
} | 0 |
3658528193dfcb04926698f0a5bf874b | dcb7e9586ce660159129a7e57bdfb92f | Provide the URL of a Consul server. | @CWMPObject(name = "Device.ManagementServer.")
@XmlRootElement(name = "Device.ManagementServer")
@XmlType(name = "Device.ManagementServer")
@XmlAccessorType(XmlAccessType.FIELD)
public class ManagementServer
public ManagementServer withUrl(String url) {
this.url = url;
return this;
} | 0 |
795893ca4e4c0e5882f05b20880469ff | cb79178bf04b4e2ff7462ed90b870019 | Given a resource id, determine the storage node on which is resides.
StorageNodeId, RepNodeId or AdminId
StorageNode cannot be determined or if the resource id is not an
id that equates to a StorageNode component, return null. | namespace BuildXL.Cache.ContentStore.Distributed.NuCache
public abstract class CentralStorage : StartupShutdownBase
protected virtual string PreprocessStorageId(string storageId) =>
DistributedCentralStorage.ParseCompositeStorageId(storageId).fallbackStorageId; | 0 |
b6bcc77082fdcfb8fd94d9eb2fb82a12 | 77db9704ffcb9728fb076c0fc597d0ce | Gets the type of this meeting (meeting types are user-configurable) | class Meetings implements NotifiableInterface
public function getType()
{
return $this->type;
} | 1 |
eaf5285ec967f2ef3293671e6bbf84f7 | aaf08ecac7675063d56a53ecb344ced2 | 对第i个任务的堆栈进行初始化 | unsigned i;
for(i=0;i<MAX_TASKS;i++){
task_arr[i].init_sp = task_stack + TASK_SIZE*(i+1);
}
} | 1 |
cd217023530faf00cae0f9b2afcde969 | 1ed5e299fa2815666f6394ceadf89f1e | ExecMaterialRestrPos
Calls tuplestore to restore the last saved file position. | {
long rec = (this.sf.Position/this.ut_len) + 1;
this.sf.Seek( (rec * this.ut_len)
- this.sf.Position,SeekOrigin.Current);
} | 0 |
3535ff976b65481ba806e0c610a32e17 | a273fca6e8c4a1431c2e748dfcd1fa38 | @brief Controlla l'esistenza di un arco nel grafo | class AdjacencyGraphic
bool exist(int i, int j) const
{
if(i<v && j<v && i>=0 && j>=0)
{
return a[i][j]!=NoEdege;
}
return false;
} | 1 |
da5e01860f57c8e1562a2b6c7dca2360 | 5e2ddc8364b852211115086c2b5e56af | Return boolean that determines if another object blocks the light source from current object | bool Scene::lightShinesAt(const Point& Ro, const Light& light)
{
Point Ld;
float t;
if (!light.directionTo(Ro, Ld, t))
return false;
if (empty())
return true;
for (std::vector<SceneObject*>::iterator object=this->objectHierarchy.objects.begin();
object!=this->objectHierarchy.objects.end(); ++object... | 1 |
a703240766ad7426211c60c4e1583a22 | b3baf0a5bf4d8f480889eddd9e5fda5a | Get <see cref="SmtpSettings"/> profile with given name, or null if no profile found | {
if (profileName == null)
{
throw new ArgumentException("Null profile name provided.");
}
return _profileDefinitionByName.Value.GetValueOrThrow(
profileName,
"Unable to find profile '{0}'.");
} | 0 |
7fed7d1099df1618af54dcee867f537c | 6f973e08816e00e8726783f06539fbf2 | Creates force objects that can be referenced by the body object.
You can have multiple references to the same force object. | PowerlinkObject object, PowerlinkSubobject subObject) {
if (subObject != null) {
System.out.println("Force object actual value:" + object.getIdRaw()
+ subObject.getIdRaw());
} else {
System.out
.println("Force object actual valu... | 1 |
bb79275f9c4d361c58e9e426f0cf0238 | c12a5062b79cc2e280602041c2eac883 | check whether two link list are identical or not | {
ln iter1 = l1.head,iter2 = l2.head;
while(iter1 && (iter1->next))
{
iter1= iter1->next;
}
while(iter2 && (iter2->next))
{
iter2= iter2->next;
}
return (iter1==iter2);
} | 0 |
52e7e2fcbfdcc8b5c7cb320f4d08b017 | d7b2e6220013afc7a918ddf4bf1f71b6 | ? Subtract two unsigned 32 bit numbers | func opUI32Sub(inputs []ast.CXValue, outputs []ast.CXValue) {
outV0 := inputs[0].Get_ui32() - inputs[1].Get_ui32()
outputs[0].Set_ui32(outV0)
} | 1 |
ac3b75f2baf2f63220238b726afc32be | 0d68e49a8b53be60f3068be53e6424b2 | Load past pickled data (page items); produce nothing | self.assert_is_single(None, "data")
p_id = self.index["participant"][0]
file_path = self.data_path / f"{p_id}.pk.gz"
if self.use_lru_cache:
return cached_load_pandas_pickle_file(file_path)
return load_pandas_pickle_file(file_path) | 1 |
0c2b6bcebacc64b931b35b71f614695a | a58b4f95f4287a26585a25d5058c4b23 | Called from 'find_id_moniker'. We tried to lookup a moniker, found a hook, but found no stored moniker. So we'll try and autogenerate one. | {
int r_idx;
get_mon_num_prep(vault_aux_simple, NULL);
r_idx = get_mon_num(dun_level + 10);
get_mon_num_prep(NULL, NULL);
vault_aux_char = r_info[r_idx].d_char;
} | 0 |
ed0dee6551150e6a5dfc2078959dc325 | d40274739a51f4f2b8a9907fddc23e60 | Updates the specified scan configuration.
`projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. | gdcv::ListScanConfigsRequest request,
gaxgrpc::CallSettings callSettings = null)
{
throw new sys::NotImplementedException();
} | 0 |
edbb62f8f1bb97352cca4cf140a5849e | 27cc6c0ba29c1cb29a074ebbba182d29 | Clear the drag-over border when the drag moves away from this
location. | function dropZoneDragLeave(e)
{
$.doTimeout(overlayTimeoutId, DRAG_LEAVE_DELAY, function ()
{
$overlay.removeClass("ilFileDragOver");
});
} | 1 |
6a590a1a1ffedcfe6424346cf69f9c1c | 7b6d703f7ba4b29e7b4eda46d2321f18 | Function called when sliderbar is dragged (scrobble feature) | static void slider_cb(GtkRange *range, struct _data *data)
{
gdouble value = gtk_range_get_value(GTK_RANGE(data->gst_data->slider));
gst_element_seek_simple(data->gst_data->playbin, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT,
(gint64)(v... | 1 |
041565eadf420d68d3a882cc56ee57fa | 18409f203228c0db2d4fefe5c52bc1c7 | 檢核發票資訊 | {
cancelDate = default;
allowance = mgr.GetTable<InvoiceAllowance>().Where(a => a.AllowanceNumber == item.CancelAllowanceNumber).FirstOrDefault();
if (allowance == null)
{
return new Exception(String.Format("折讓證明單不存在,折讓證明單號碼:{0},TAG:< CancelAllowan... | 1 |
cafdd47affda4a87bacbdeb4a0390599 | fd1777e8d4532d8b0b74478d15da7b3c | @brief Callback for a radio button change | void DialogRadioCB(Widget w, Widget dialog, XtPointer call_data)
{ char *s;
Widget caption;
XtVaGetValues(XtParent(w), XtNuserData, &caption, NULL);
if(caption!=NULL)
{ XtVaGetValues(w, XtNlabel, &s, NULL);
XtVaSetValues(caption, XtNstring, s, NULL);
};
global_device=CLEAN_DIALOG_DEVICE;
global_widget... | 1 |
b3bad4d7d0cd11e5e5f8b52bdb293567 | 4c8e27aa5dda2393b5b745c9a21fa9fa | !< Funcion para Transmitir datos en crudo por UART2 | char error = 0;
#ifdef USEINTDRIVENTX
char i;
if (CQueue_isEmpty(&txq2) && (U2STAbits.UTXBF==0)) {
U2TXREG = Ch;
}
else {
IEC1bits.U2TXIE = 1;
if (CQueue_isFull(&txq2)) {
for (i=0;i<10;i++) {
if (CQueue_isFull(&txq2))
DelayUsecs(50);
else
break;
}
}
if (CQueue_isFull(&txq2)) {
... | 1 |
bf1e881f95c32af9e4b52dd2348fb497 | 47e6d6129c8b501c70a17d3df36c7f3d | Insere o rodapé na tabela de dados do relatório | $retorno = "<table class=\"tbl_footer\" width=\"1000\">
<tr>
<td align=\"left\"><a href=''>#</a></td>
<td align=\"right\">Página: {PAGENO}</td>
</tr>
</table>";
return $retorno;
} | 1 |
bda1e6c5a032e640fc16862612b915b8 | fd714b49ab0918adc08154bf2e6eab1d | GET: AspNetRoles/Create | {
var roles = db.SystemRoles.ToList();
ViewBag.Members = db.Members.ToList();
return View(roles);
} | 0 |
9e5defbb7d9e35e2a5395cfb5892901f | 74a6632cd19ea385d75f6b4f2458b920 | 将如com.test.Hello<com.baidu.OK>这样的泛型类格式化成Hello<OK> | fun simplifyTypeName(txt: String) : String{
val buf = StringBuilder()
var prePos = -1
txt.forEachIndexed { index, c ->
if(c == '<' || c == '>' || c == ',' || c == ' '){
if(prePos >= 0){
val segment = txt.substring(prePos, index)
... | 1 |
d0e3da8bc5a3ec0834c462350097c587 | 69b037a970be8d965e0392380accee92 | ==========================================================
<T>设置双精度浮点数。</T>
========================================================== | if (!this.validate(4)) return;
this._dataView.setFloat32(this._position, value, true);
this._position += 4;
} | 0 |
fb37f080a7e695f5aa632eef00d03f87 | 7afdc2923e1df80147fbb9c7ea5b563f | Possible directions returned by update_direction | head = self.get_head()
if head is None:
return None
head_direction = head.direction
if head_direction == Direction.UP:
return [Direction.UP, Direction.RIGHT, Direction.LEFT]
elif head_direction == Direction.RIGHT:
return [Direction.UP, Directio... | 1 |
45412b6f8bbd9e1346334f68994aaeca | 1882afad0d634dea748ea2e61897abc6 | Delete an existing model deployment and relinquish all resources associated. | namespace Microsoft.Azure.Management.ResourceManager
public static partial class DeploymentsOperationsExtensions
public static async System.Threading.Tasks.Task DeleteAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken =... | 1 |
b7379fa20eda9d0fede3176c595036ef | 1200f7a8215da78d4bbb0fa5a407e0ce | -------------------------------------------------------------------------------
CanChangePasswordUser
can we change the provided users password?
------------------------------------------------------------------------------- | function radius_auth_can_change_password($username = "")
{
return 0;
} | 1 |
0efc498f48e8977219d194b592fee454 | 719967b89ae4d06d57a2b0e9e309f7f3 | Maps the guest tapped notification. | namespace Insane.Notifications.iOS.Presenter
void HandleNotificationTapped(UNNotificationResponse notificationResponse); | 1 |
f7decfb0ff5c38b040399eb1c563559c | 49a046644ff0250efd744ce88705283e | Set the name. Throws IllegalArgumentException if name is an empty string (length 0),
or if name is a null-reference. | public class UserAuthenticationManager
public NameStatus setName(String name) {
if (name.length() == 0) {
return NameStatus.EMPTY;
}
if (name.length() > NAME_MAX) {
return NameStatus.TOO_LONG;
}
this.name = name;
this.nameIsChanged = true;
... | 0 |
e4a2ac0c2a1a43e87287c486364397c6 | 70fc776f94c126481587a8c7bffc56ff | 开启框选放大canvas 功能 | function zoomCorner(isLeft, isTop) {
$('#dragCanvas').remove();
GalleryStopMove();
$(window).off("resize", resizeInit);
ZoomAttrPosition();
ToolBarList.ZoomScale = 2;
var canvas = $('#CanvasLeft')[0];
var cxt = canvas.getContext('2d');
canvas.width = MainObj.NewCanvasWidth * 2;
canva... | 1 |
c75b4b3ea04f651d44a781026ee587ed | b796ab5d4b65d58d90a49a4ca099903b | Returns the relative "gray" level of an RGB value | {
float gray = (rgb.r*299 + rgb.g*587 + rgb.b*114 + 500)/1000;
return gray;
} | 1 |
1b33f741d4f98081623f02cf938f8d5b | cc20c9c4e6cd13ad306755f3cb5dd6af | 根据actionName查询action表数据 | Action findActionByName(String name); | 1 |
23292c242b6b0d36c1f5ddbe7a6120a3 | 9774abf90585662621a6064678574456 | Преобразует массив PostgreSQL в массив php | {
$result = [];
foreach ($array as $key => $value) {
if (is_string($value))
$value = "'" . str_replace("'", "\\'", $value) . "'";
else if (is_bool($value)) $value = $value ? '1' : '0';
else if (is_null($value)) $value = 'null';
$resu... | 0 |
79bfa49608c3beb77a14b52514d86e67 | ad9c50c1d6f9f1d16645cb8bf81ddc26 | Returns a colour based on menu UI position. | if pos < 85:
return Color(100-pos, 0, 255-pos*3)
elif pos < 170:
pos -= 85
return Color(0, 0, 255 - pos * 3)
else:
pos -= 170
return Color(0, 100-pos, 255-pos*3) | 1 |
2475bc654185f743f1dbbd0fb5c24529 | 5f8bddc4ec6979f7bf04e9ada015f26b | 验证text的MD5加密串是否sign一致 | try {
byte[] bytes=text.getBytes(charset);
byte[] sign=Base64.decodeBase64(b64Sign);
verify.update(bytes);
return verify.verify(sign);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (SignatureException e) {
e.printStackTrace();
}
return false;
} | 0 |
03d2f369f4b1d436e7aa31973ee3232e | a25638783db07ff26d6772d2133f260b | 292. * 添加附件
293.
294. * 附件和邮件正文的总大小不可超过1MB。
295.
296. * @param array $attach , key为文件名称,附件类型由文件名后缀决定,value为文件内容;文件内容支持二进制<br>
297. * 支持的文件后缀:bmp,css,csv,gif,htm,html,jpeg,jpg,jpe,pdf,png,rss,text,txt,asc,diff,pot,tiff,tif,wbmp,ics,vcf
298. * @return bool
299. * @author Lijun
300. | class SaeEmail extends CApplicationComponent
public function setAttach($attach)
{
return $this->email->setAttach($attach);
} | 1 |
d171f89afd1daedc1d4b26fa08fb1470 | 174affc236803582c22e2b78f900f6f0 | 获取手动入库列表 | @POST("depot/getInOrder")
Observable<GsonResponse<InOrderResponse>> getInOrderList(@Body GsonRequest<Map<String, Object>> request); | 1 |
2e2bada8937f49644015a057ab0f246e | 6df5312c1a2641d5b78652f2fe355a80 | Return the state of a given vchan connection | class Service
getChannelConnectivityState () {
if (!this._client) return new Error('miss client')
const channel = this._client.getChannel()
const state = channel.getConnectivityState(true)
const stateDescs = ['IDLE', 'CONNECTING', 'READY', 'TRANSIENT_FAILURE', 'SHUTDOWN']
return {
state,
... | 1 |
96f410fa2ea9a1a7b7a22c622ccbca8f | 4f9896ec4147b1882a02d83e86c9851a | \brief AES interrupt handler
\note AES interrupt subroutine in Electronic Code Book (ECB) mode. | int mode,
size_t length,
unsigned char iv[16],
const unsigned char *input,
unsigned char *output )
{
unsigned char c;
unsigned char ov[17];
int ret = 0;
#if defined(CRY... | 0 |
844029dd7d4a6259d9a4c0173445013f | f63d5d0dd3dad2c6063df33226325fa2 | This method is called each time a new value is selected from the
combobox. It selects the new camera selected by the user. | namespace Recognition_Cam public partial class Form1 : Form
private void Camera_comBox_SelectedIndexChanged(object sender, EventArgs e) {
capture.Dispose();
capture = new Capture(Camera_comBox.SelectedIndex);
} | 1 |
c3c43bc223bc041be889d6e6153b3d3e | 466d9ac7f85b208b403f2fa9097e5cc2 | Return true no matter what: buy on the first day leave it at that. | def no_buy(context, data):
context.bp = True | 0 |
8e7e383befbe7f043a2ca624876a7513 | 63b73a0915aebec22d6e1fe4bdc674aa | Convert edge types from the ABI types to ONNX strings | x = input_g[0]
edge_index = input_g[1]
edge_attr = input_g[2]
def idx2opsstr(idx):
ops_str_list = ["none","skip_connect","nor_conv_1x1","nor_conv_3x3","avg_pool_3x3"]
return ops_str_list[idx]
op_str_1_0 = idx2opsstr(torch.nonzero(edge_attr[0]).item())
... | 0 |
91d47cbd79a7e6aefffa3f9fac27123d | d838062b37c2aad8c705f9ea2e29d2ff | 初始化DirectDraw[有关DirectDraw部分已经由SDK内部创建,用户不需要调用该接口函数] | HRESULT InitD3D(HWND hWnd)
{
if (NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) return E_FAIL;
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory(&d3dpp, sizeof(d3dpp));
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;... | 0 |
29478a6d9dc4d19db8b0cab78c24379a | 26ab25763f7323f2f173023ce61e1e8b | Get the local address that the client initiated the request from. | public class CauldronNettyInterface
public static SocketAddress getLocalAddress() {
return ((NettyHttpRequestContext) InvocationContext.getRequestContext()).getCtx().channel().localAddress();
} | 0 |
1c8bb5e2686faa6755f11ad444af23e4 | 552a8c6dc831b0d8485b403426605cb4 | Método utilizado para saber si el colaborador se encuentra infectado. | if self.infected:
return False
self.infected = True
self.time_infected = self.env.now
return True | 0 |
174d869620414ce32fe448345a77b1c7 | e418aa71f3c75157a29353784f75b870 | 获取一个推荐的游戏服务器id,如果有登录过的服务器,优先选取上次登录的服务器,否则选择有账号的服务器,否则选择推荐服务器 | {
vector<stGServer*> vecSvrs;
MAP_SERVERS::iterator it = m_mpServers.begin();
for(;it != m_mpServers.end();++it)
{
stGServer& server = it->second;
if(server.openRobot == 1 && server.status == emSERVER_STATE_NORMAL && pRobot->CanEnterGameType(server.gameType))
{
vecSvrs.push_back(&server);
... | 0 |
d76bd6d31ecf0a04505c20348085ba35 | f04cc4d1919ee1a7af59cd77bab92469 | Lookup the raw translation of a string (without any extra escaping or interpolation). | class TranslatorStub extends BaseStub implements TranslatorInterface
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null)
{
return $this->doStubCall(__FUNCTION__, \get_defined_vars(), $id);
} | 0 |
f7339e796811421574728a83cb4d431b | bd04a508304c1b0425ff5f8305d282de | Handle all unfound attributes by adding a deferred function call that
delegates to the underlying mock redis instance. | class Session
def method_missing(name, *args)
call name, *args
end | 0 |
58742d5d3275785e2f955d1538b829f6 | 837ef6fac700968237c5338a79337353 | Initialise JComponent to display a more detailed information of an item
currently being selected in the JList. | public Component getListCellRendererComponent(JList<? extends Relationship> jlist, final Relationship e, int i, boolean isSelected, boolean hasFocus) {
JLabel originalEntityLabel = new JLabel(m_accessor.getEntity(e.getEntityId()).getName());
JLabel relationshipLabel = new JLabel(e.getRelationshipTex... | 1 |
fd511366fe7a8c09ca638a97d933b9da | 62f54d4129100c7733b6497d6030c32f | we only want to compute routes for edge links we know | function addLink(fromNodeId, toNodeId) {
if (fromNodeId == toNodeId) {
return;
}
if (nodePropertiesIndexedById[fromNodeId].level >= nodePropertiesIndexedById[toNodeId].level) {
return;
}
graphInfo.edges.push({
"id": generateANewIdForEdge(),
"edgeProperties": [],
... | 0 |
19cd2c5bf757d6f7f838e262fd9751dc | d6892964efcb454cca0d3f4359ece2ae | Começa a ouvir para identificar o usuário | function doPresence() {
client.send([`USER ${cadastro.user_name} ${cadastro.user_port}`], cadastro.server_port, cadastro.server_address, (err) => {
});
} | 0 |
0eb07aa66e78a5357d96cdf5a9f0b424 | 49e6e5e9f7c00c766f33e4d5dff6a9bc | Finding the time when the user begins playing | int getStartingTime(FILE *fp) {
int hours = 0;
int minutes = 0;
fscanf(fp, "Runde 1: %d:%d", &hours, &minutes);
rewind(fp);
return hours * 60 + minutes;
} | 1 |
d3eade0fce30539d071e28ff1e194acc | b5f7143745abb67780dd68b18ee8e755 | 删除车牌设备 | function deleteCar() {
var deviceID = $(this).prev().prev().attr("device-id");
var vehicles = g_car.vehicles;
for (var i in vehicles) {
var carOne = vehicles[i].deviceID;
if (deviceID == carOne) {
g_car.vehicles.splice(i, 1);
break;
}
}
$(this).parent(... | 1 |
6730f6e8fe34a78bba87a82ec2a6f3ce | 8c5e941e269e79eb12feb7ab1995ef3a | show map information to the view including player, occupied countries, corresponding continents and soldiers | public class MapController extends Controller implements IMapController
@Override
public void initFromModel() {
if (!mapIsDrawn) {
for (Hex hex : ModelFacade.getHexes()) {
getView().addHex(hex.getLocation(), hex.getType());
if (hex.getType() != HexType.DESERT) {
getView().addNumber(hex.getLocation(),... | 0 |
c39d89e9ed880d1f7c83e7607d13ae2a | 1e287bf6a6e4859f637c4041ce5f20ef | 根据报告ID和检测项ID查询对象 | @Select("select * from record where reportID=#{reportID} and indicatorID=#{indicatorID}")
Record getRecordByReportIDAndIndicatorID(String reportID,String indicatorID); | 1 |
f4e06692351da54c33331ceeba38a16c | e0891b783613ad7b146461a06f701fe8 | Creates a tracer for an outgoing remote call. | public final class CassandraClientTracing
public CassandraClientTracing clientOf(String remoteServiceName) {
return toBuilder().remoteServiceName(remoteServiceName).build();
} | 1 |
acb96aeab6db4292f108215d3cd688cf | afe815906de1a5ed70163aacc598d954 | Méthode permettant d'identifier la taille de la boucle. | int taille = 0;
do {
System.out.println(string);
taille = sc.nextInt();
} while (!taille(taille, alpha.getHauteur()));
return taille;
} | 0 |
3c6b40aaf35b92724a4ba1d61966113e | 3234ac28e5719389d234eb761475cb9b | Returns the meta object for class '{@link com.github.kanafghan.welipse.webdsl.Reset <em>Reset</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @SuppressWarnings("CheckReturnValue")
public class PostgreSqlParserBaseListener implements PostgreSqlParserListener
@Override public void enterReset_rest(PostgreSqlParser.Reset_restContext ctx) { } | 0 |
5c2b8961c2994cefa0993989a8bdb1c0 | 6a0f89b8c10ae5ed81cd725d5e8e4fc9 | Returns the all registered theme definitions. | public function getThemes(); | 1 |
da2102686368fbc158da4834f1c02265 | f2fa4eefb2993070359d0b31a99d6095 | Summary:
Initiates a read of up to a specified number of bytes to a device asynchronously
and invokes a callback method when complete.
Parameters:
count:
Number of bytes to read from the GPIB.
callback:
The System.AsyncCallback that is raised when the read completes.
state:
Object that contains additional user infor... | namespace SpiDriver
public class Device
public async Task<int> ReadAsync(byte[] bytes, int offset, int count) {
if (count == 0)
return 0;
await _portSemaphore.WaitAsync().ConfigureAwait(false);
try {
await Task.Run(() => {
byte[... | 0 |
7977e0e8454a2169118f2fe51e8d3e1a | ffdd3688817ba4124f1645a5b199a64e | url是否推到队列中 | {
if (null == url)
{
return;
}
if (!allowExtract)
{
url.AllowExtractUrl = false;
}
this.urlQueue.Add(url);
} | 1 |
ad14ba1ed4fd642a6b7b815e277516cf | a47c6948d6e661566b4c99338ac01af3 | Returns `true` if the set is a superset of another,
i.e. `self` contains at least all the values in `other`.
# Examples
```
use nimiq_collections::LimitHashSet;
let sub: LimitHashSet<_> = [1, 2].iter().cloned().collect();
let mut set = LimitHashSet::new(10);
assert_eq!(set.is_superset(&sub), false);
set.insert(0);... | {
TurboContract.Requires(other != null, conditionString: "other != null");
return _set.IsSupersetOf(other);
} | 1 |
1ae34e1cf76b1deca61150213bb46764 | 5940aaba06b4feda566b109d35049a4e | 导出用户数据,通过头部信息做断言 | app = "account"
model = "UserProfile"
fields = [
{"name": "id"},
{"name": "username", "verbose_name": "用户名"},
{"name": "nick_name", "verbose_name": "昵称"},
{"name": "last_login"},
{"name": "groups.name", "many": True, "verbose_name": "组"},
]
filters = [
... | 0 |
50deda0458a43dbd0410b2110559a4d4 | a73e55cabe45edd7a1b7ff859c8c8221 | Fills up tank to full capacity | public class UFOFuelContorller : MonoBehaviour
public void FillUp()
{
capacity = maxCapacity;
} | 1 |
2b5e9118ab961f3cad20c588bafddd5e | e60fb8e1d543e27cb24eebef5f8a2a22 | Importation des propriétés selon la donnée fournie | {
foreach ((array)$data as $attribut => $value) {
switch ($attribut) {
case 'BRAND_ID':
$this->setBrandId($value);
break;
case 'BRAND_NAME':
$this->setBrandName($value);
break;
... | 1 |
8908119fd640644213abdc2afcde148e | 2a9ddbc59296b642d1b6b4ec9a3a6f4d | Checks minimum topology size for running a certain example. | topo = BellTopo( n=8 )
net = Mininet( topo=topo,
host=CPULimitedHost, link=TCLink, controller = OVSController)
net.start()
print "Dumping host connections"
dumpNodeConnections( net.hosts )
CLI( net )
net.stop() | 0 |
844a5e536f6409e14e86bdab2e2415e8 | 8c9e77491fe8b0397535edca5ead8deb | Use put-call parity to calculate put price | def putprice(S, K, sigma, r, delta, T, d1, d2):
return (K*np.exp(-r * T)*norm.cdf(-d2)) - (S*np.exp(-delta * T)*norm.cdf(-d1)) | 1 |
76e3292f93884f73fa46201554e567e8 | 68467f0bbca785f7aca8d6e893f3b0aa | Get a snapshot of the pool infos that is sorted. | ISorted<T> Snapshot(); | 1 |
203bfdd423ad09e9ee7a5c266a01ac96 | 7b7242938dbddc0d943e65ecfcebc0b6 | 根据shoes_id删除shoes | int deleteShoe(int id); | 1 |
3d71c5807c2b8cb057fd2fceec47103c | 06396345e252a405e60565e40fa8a203 | elements that are present on every page | $data = array();
foreach ($this->_commonElements as $url => $cnt) {
if (($cnt > 1) && ($cnt == $this->_totalPages)) {
$data[] = $url;
}
}
if ($this->_logoImgSrc != '') {
$data[] = $this->_logoImgSrc;
$data[] = $this->_logoIm... | 1 |
d7a925ca879f89ff9e5c15984c24c011 | 9ec3bbccbd06db723d3cd6590bb2a1a2 | Функция изменения издательства | $sql = 'CALL `author_update`("' . $id . '", "' . $name . '")';
$db = new DB();
$db->query($sql);
} | 0 |
e05b0260782dcba5adc72b58611d3a59 | a9eeeee6716e70b0080af88acf6117ae | Set whether batches should be optimized into a single bulk operation.
Will revert to batches, if bulk is not supported | class GetQueueResult:
def enable_batched_operations(self) -> Optional[bool]:
return pulumi.get(self, "enable_batched_operations") | 0 |
f0bc6eb3bf0413a8d6f1f0680c2abf53 | dcd111608b7351e218869740c3dd8ffa | 获取订单状态,1待发货,2已关闭,3已退款 | @Service
public class OrderService
public Integer getStatus(Integer orderId){
return orderMapperDao.getStatus(orderId);
} | 1 |
4bde29d1c9adcbf36008a881aaa7be05 | 2e76be6551f96a8e666c9b3c9c70ed3d | 数据验证前的预处理(max/min value) | function inputCheck(elem){
var val=parseInt(elem.value);
if(isNaN(val)){
val=elem.dataset.blzMin;
}
if(val<elem.dataset.blzMin-0){
val=elem.dataset.blzMin;
}else if(val>elem.dataset.blzMax-0){
val=elem.dataset.blzMax;
}
elem.value=val;
} | 1 |
d2de2a12117901b65b8fc052b8a9680e | cf10c089f7f50e5bb1e05ae85ea7989e | Cég kezelése | {
$data['title'] = 'Dolgozók';
$data['employees'] = $this->employees_model->get_employees();
$this->load->view('templates/header', $data);
$this->load->view('templates/menu');
$this->load->view('work/employees/index', $data);
$this->load->view('templates/footer');
... | 0 |
cbbf69ad43260a3e6888829e33400647 | e5d1b0588c00ee7c08fa92b4a0336d1d | 执行原生sql语句,如果sql是查询语句,返回二维数组 | class admin extends controller{
public function excuteSql($sql)
{
$admin_model = pc_base::load_model('admin_model');
$result = $admin_model->query($sql);
$result = $admin_model->fetch_array($result);
return $result;
} | 0 |
fff7f07826eb0a6e3f2ae512de8ff061 | 2750be5b458052ea759d438ba1ac8285 | After blocks are generated change their properties (handles event "controller_action_layout_generate_blocks_after") | class Magegiant_GiftCard_Block_Abstract extends Mage_Core_Block_Template
public function _prepareLayout()
{
return parent::_prepareLayout();
} | 0 |
e03424d9998484bd1066e1b5b5b2d708 | a7da19de51e23445628a9399f6a40ce2 | Returns the meta object for the reference list '{@link CIM.IEC61970.ControlArea.ControlArea#getTieFlow <em>Tie Flow</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getControlArea_Type(); | 0 |
e30670713a71cc9248a6bac94db35953 | a54313315920f3a67b134ffd35102c9a | Gets the version of the config.xml that was saved at a certain time. | {
var ET = cordovaContext.requireCordovaModule('elementtree')
var config = readFileUTF8('./config.xml')
var tree = ET.parse(config)
return tree.getroot().attrib.version
} | 0 |
8904de18818cf84536e88cf025ee76b0 | 9509c700e9568bcfb244537ccc44f5df | Get expected improvement over best posterior mean capped by
the best seen reward so far. | class EfficientGlobalOptimization(openturns.optim.OptimizationAlgorithmImplementation):
def getExpectedImprovement(self):
return _uncertainty.EfficientGlobalOptimization_getExpectedImprovement(self) | 1 |
39841dc8190f9b931b45788a1e441f95 | a720e416ee73850051f11ae8eb00e1ab | Get boundary indices between non-overlapping triangular windows. | class RoomTwo(Room):
def get_boundaries(self):
n = self.n
index_heater = np.arange(1, n - 1)
index_wall = np.concatenate((np.arange(0, n ** 2 + 1, n), np.arange((n ** 2) - 1, 2 * n ** 2, n),
np.array([n - 1, n * (2 * n - 1)])))
index_window = np.arang... | 0 |
ca1d731c7ab378961eeb849130b4b113 | 6bd5133ab0484650317ecfebd58bb3f9 | Update the DeadPool data of this SlimePlayer.
If there is no DeadPool linked, try to get it back from the current DeadPoolTable,
and if there is no entry in the table, a fresh one is created. | void updateDataClient(Player player); | 0 |
a61a88c17746c0341a8e0a86ed43bbcb | e5403b47a97676857a51e0ca4c0876a4 | in case of UPDATE rowid = 0 | public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
return 0;
} | 0 |
f59afe1f0ff1f70b749fe3c376cb2abe | 69c54c388f1d6c0d1ea694156c2c8747 | Shift the custom highlight on the data grid view to indicate the current step for which evidence is about to be captured. | {
this.gv.IndicatorWidth = 50;
if (e.Info.IsRowIndicator && e.RowHandle >= 0)
{
e.Info.DisplayText = (e.RowHandle + 1).ToString();
}
} | 0 |
40d598853b56f2bee272a0425cb17706 | 8f456041bbc9b160d7e44930eb16e964 | 通过车系查询车版本 | public class CarDataPresenter extends WrapPresenter<CarDataView>
public void getCarBySeries(String seriesId, String token) {
mSubscription = RXUtil.execute(mService.getCarBySeries(seriesId, token),
new Observer<ResponseMessage<List<CarBean>>>() {
@Override
... | 1 |
322b44fd327505d72e0c0c4f14a87d50 | e3666dae6499b8085d611003a514b57e | Paginator for ListPermissionSetsProvisionedToAccount operation | {
var options = new InvokeOptions();
options.RequestMarshaller = ListAccountsForProvisionedPermissionSetRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAccountsForProvisionedPermissionSetResponseUnmarshaller.Instance;
return InvokeAsync<ListAccounts... | 0 |
fb9dd67469863d786e951165f507abdb | 9e2100291773d9608adb9c9238acccf2 | @brief Reads the mtimecmp register. | uint8_t getMR(void)
{
return WIZCHIP_READ(WZTOE_MR);
} | 0 |
692410397008bddbf8045d4e4309d912 | 447009d161654c56308e93714233687b | Turn a list of filepaths into a nested dict | class versioned_storage:
def flatten_dir_tree(self, tree):
result = {}
def helper(tree, leading_path = ''):
dirs = tree['dirs']; files = tree['files']
for name, file_info in files.items():
file_info['path'] = leading_path + '/' + name
result[file... | 0 |
e13ae134b8a5ff97599112fd0db95038 | 5112913877ac4345ae1d95940755de64 | Creates a resolver class instance from a class name. | constructor(className: string) {
super(className);
} | 0 |
b4475ddd0bca116fe3bc9d5e59adaeb3 | c89a8e6e88bcd7a14838d81d2859143b | Creates an instance of a Vector3. | export class Vec3
constructor (x: number = 0, y: number = 0, z: number = 0)
{
this.set(x, y, z);
} | 1 |
ae00ab7df6bc4938ded7086c5e67c240 | bbaff6fcf069da0a904add5a1ee5816f | Sets the value of addressInfo. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CompanyInfoType", propOrder = {
"companyName",
"addressInfo",
"telephoneInfo",
"email",
"url",
"businessLocale",
"paymentForm",
"contactPerson",
"travelArranger",
"loyaltyProgram"
})
public class CompanyInfoType
public List<A... | 0 |
5183c242a6d488bd5a957922639b5c94 | b2e05f9791582817b2e2eae538616961 | Calculate remaining time | class Adds(models.Model):
def remaining_Time(self):
now = datetime.now(timezone.utc)
expiration = self.Due_date
minutes = ceil((expiration - now).total_seconds() / 60)
return int(minutes) | 1 |
8b6288f72f0a1f411a9992e67323dcd1 | f51c72d74d0f067efb4b7f493ba11540 | This method handles events fired when the user changes the selection in one of the list boxes | namespace GroupProject
public partial class wndMain : Window
private void ItemCbo_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
}
catch (Exception ex)
{
HandleError(MethodInfo.GetCurrentMethod().DeclaringType.... | 1 |
aa538a067b58a4b98c383cfbb70fa3ea | aae5d446992591350cb629d8e18a63c9 | solo or unsolo a track | public class SoundPlayer extends JComponent void addMidiControls()
public void actionPerformed(ActionEvent e) {
sequencer.setTrackSolo(tracknum, solo.isSelected());
} | 1 |
86cb2e7cefb9746dee7a64ed6bc8de7d | 9494f825a4b906b1da51f55866319589 | z-score normalize all samples w.r.t. training set | for i in range(0, len(train_data)):
mean = np.mean(train_data[i])
stdev = np.std(train_data[i])
np.subtract(train_data[i], mean)
if stdev > 0:
np.divide(train_data[i], stdev)
return train_data | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.