query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d8208de3c6ab23d31334d181b2fc5ee8 | 0a803b6b9c694f5de3341fe0c7f2bbf6 | Returns the oldest item in the queue | class Queue:
def get(self):
return self._queue[0] | 1 |
78dc3a8fe5fee1c7977ff960b3b57c0e | c86226e5d451addcbae28e771532ccff | Método para llevar a cabo la modificación de los datos de la oficina usuaria
Requiere: un objeto con los datos de la oficina usuaria
Modifica: Modifica los datos de una oficina
Retorna: Devuelve un true si se ejecutó la actualización correctamente en la base de datos. | $resultado = 0;
$sentencia = "UPDATE t_oficio SET
nombre='".ucfirst(mb_strtolower(htmlspecialchars($datos['nombre'])))."',
codigo='".mb_strtoupper(htmlspecialchars($datos['codigo']))."'
WHERE codigo='".htmlspecialchars($datos['codigo2'])."'
";
if (mys... | 1 |
fd7777d9da02f1a518233f0bf408ebc5 | 11aa03a264d02261ce06cc2139666972 | 获取所有Get开头的方法 | public class I18NOperator implements InitializingBean{
private List<Method> getDtoGetMethods(Class<?> dtoClass){
Method[] methods = dtoClass.getDeclaredMethods();
List<Method> dtoAllFields = new ArrayList<Method>();
if(methods.length>0)
for(Method method : methods){
if(method.getName().contains("get"))
... | 1 |
7763747d6a6607946a2b5347164a5ec5 | 130157d929dbb72d8bce8274aa084888 | Create a new player from info over the net | string data = string.Empty;
data+= _charID.ToString()+";";
data+= _GUID.ToString()+";";
data+= _opponent.ToString();
networkView.RPC("NetCreatePlayer",NetworkManager.Client,data);
} | 1 |
206a5409374bf03c5960df365a350349 | fca5efd532f1b8adfe9a80bef7b14467 | Free the disassembler instance | namespace CrypTool.Plugins.EncryptedVM
[Author("Robert Stark", "robert.stark@rub.de", "", "")]
[PluginInfo("CrypTool.Plugins.EncryptedVM.Properties.Resources", "EncryptedVM_Assembler_Name", "EncryptedVM_Assembler_Tooltip", "EncryptedVM/doc/assembler.xml", new[] { "CrypWin/images/default.png" })]
[ComponentC... | 0 |
e3546b91e8fe3f817d3c05b46c3255b1 | 02cfe9d5a5f387f89b202a1b6352ae1a | 上传图片的弹窗(默认标题是上传头像) | function uploadImg(imgType) {
if(imgType=="logo"){
var titleMessage="请从相册挑选一个logo图片进行上传";
}
else {
var titleMessage="请从相册挑选一件衣服图片进行上传";
}
var hideSheet= $ionicActionSheet.show({
cancelOnStateChange:true,
cssClass:'action_s',
titleText: "<b>"+titleMes... | 0 |
68bab58d8c7e4a713d63f2520408b533 | 3c3c122cdddeecade0e57aa9a8149949 | 保存系统配置到缓存的私有方法,供saveConfig及load方法调用
<dl><dt><b>业务描述:</b></dt><dd>
循环Result对象,生成Config对象,后保存到MemoryCache中
</dd></dl>
<dl><dt><b>范例:</b></dt><dd>
无
</dd></dl>
<dt><b>修改历史:</b></dt> | for (IConfigCache cache : caches.values()) {
cache.build();
caches.put(cache.getClass(), cache);
}
} | 0 |
45dfcb47d924b36424895a99c4493cdc | 3e5a39d368f406d613826bd969d0a6bd | Assigns a singing key to the correspondent platform of a project. Next compilations will try to use the key.
If there was another key assigned to the platform the new key overwrites it. | class PlatformDict(object):
def set_platform(self, platform_):
self._platform = platform_ | 0 |
ad4dd77c95fe25acf49e0c3148e98dd1 | b10bfabd35e63926ac99e5000a801ba3 | Bestimme aus der uebergebenen Temperatur den Eisanteil der Wolke.
https://link.springer.com/content/pdf/10.1007%2Fs00382-013-1964-9.pdf | T = temperature(theta, pi, celsius=True)
p = pressure(pi)
c0 = 0.6105851e3
c1 = 0.4440316e2
c2 = 0.1430341e1
c3 = 0.2641412e-1
c4 = 0.2995057e-3
c5 = 0.2031998e-5
c6 = 0.6936113e-8
c7 = 0.2564861e-11
c8 = -0.3704404e-13
T[T < -80] = -80
x = T
es = c0 + x * (c1 + x... | 0 |
6d03337e66ce92625f24f14d3308f072 | aca75d7ccf264df445e70519ea0011c2 | Inspects pydantic model and gathers all validator_field_mappings
between validators and fields. | class PydanticModelField(models.JSONField):
def validate(self, value, model_instance):
super().validate(value, model_instance)
self._validate_pydantic_model(value, model_instance) | 0 |
4ff8894b7250fe68eb86859af9e525b9 | e8dd52b196ca49a977726c413d745a2b | Returns the indicare_7_1 of this form_di_segnalazione. | @ProviderType
public class form_di_segnalazioneWrapper implements form_di_segnalazione,
ModelWrapper<form_di_segnalazione>
@Override
public void setINIZIALI_1_e(java.lang.String INIZIALI_1_e) {
_form_di_segnalazione.setINIZIALI_1_e(INIZIALI_1_e);
} | 0 |
03e8da8baf9a10490354dfb3c6511831 | 03d03a1c2960e961283713b9b1ec7fb1 | Devuelve una instancia de HojarutaDao con una conexión que depende del gestor de base de datos | public function getProyeccionDao($dbName); | 0 |
c707f2d706aedde9cd2f64bd73341cb2 | 331f0be55fd9be4dc5bd3b6b3cf246b9 | Get the ansi escape sequence for the foreground colour. | class CLI256:
def fg(value: int) -> str:
return f"\033[38;5;{value}m" | 1 |
bace567478818baebc89b81c16e7f89b | df1089244ff3e0d3094deb9f79223c86 | Makes sure the action list is cloned. | action_list1 = [("SET_FIELD", ("ETH_DST", 45)),
("SET_FIELD", ("ETH_DST", 1))]
action_list2 = [("SET_FIELD", ("VLAN_VID", 0x100F)),
("PUSH_VLAN", 0x88a8),
("SET_FIELD", ("VLAN_VID", 0x1015))]
self.assertEqual(action_list1, l... | 1 |
a9d7dd700a53822cdccef88248cb32b4 | 56f49c69eb9c2db8adb7ecab374d6f34 | Gets the nearest point on the shape to the specified point. | namespace Netron.Diagramming.Core
IShape GetShapeAt(Point surfacePoint); | 0 |
f941e158c4b8fc1bb48de31b0f4659a0 | 975052470423778726ecde06254b8259 | Tests that MainActivity starts | public class ItemCloneTest extends ActivityInstrumentationTestCase2
public void testStart() throws Exception {
ItemActivity activity = (ItemActivity) getActivity();
} | 0 |
eb73777d376327c76409e0cc499dddde | a3a427bbb1d317a35c7d2f2b8bd69ef7 | Dump Rx/Tx CAM(and associated Status SRAM) entry | {
#ifdef RF_HAS_POWER_MODE_LIB
rflib_power_mode_type power_mode = rflib_get_power_mode( path );
#endif
switch (rxf[path].mode)
{
case RXF_CDMA_MODE:
case RXF_HDR_MODE:
#if (defined(RF_HAS_GPS))
case RXF_GPS_MODE:
#endif
#ifdef RF_HAS_POWER_MODE_LIB
#ifndef RF_HAS_RXF_V2
MSM_W_MASKED_ij(RXF_CDMA(DACCc_... | 0 |
2759b3391b77a61fa365a35b51679ca0 | 15b78f3347c62c3f9c46c50505a7cc53 | Devolve o total de vendas inválidas no ficheiro a que estas estatísticas dizem respeito. | public int getVendasLidas(); | 0 |
e16815f8a456204935869f46919df51e | 95bdc48f9d18bd98aefd31c0b38b5e77 | Sets a comma-delimited list of regular expressions to match properties
that should be excluded from the JSON output.
A comma-delimited list of regular expressions | class Torrent():
def exclude_regexs(self):
return self._exclude['regexs'] | 0 |
69613b0702c7f874d67ff8ba186bf63a | 9025abd6e90bada98db6794a1083aab3 | 隐藏顶部条右边的图标 | public class SystemTitle extends LinearLayout
public void hideTitleRightDrawable() {
if (title != null) {
title.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
}
} | 1 |
1e53ab3e372b06bcd40450e14164dc96 | 1099ecc47c14b5df8083cd3f9550f1ce | @brief Sets the TL security level.
Access level: User level\n | unsigned char GetTLSecurityLevel()
{
return g_stDSMO.m_ucTLSecurityLevel;
} | 0 |
743da121cc96e829af26a35c93321cab | 4087e267bb59a20381c3280c2ed4d3b0 | Vérifie le succès du soin. | public class SolveResults
public boolean isSucces() {
return succes;
} | 1 |
18e0cf47b6f34a22c6577355b9b9259f | fe3cf75613410baf906d83f870e7c0d1 | This method sketches the scene during the day by
drawing a house of the available wood and a sun which
is besides and above the house | def draw_study():
draw_sky()
draw_ground() | 0 |
4a0a8beec5285352a5c11565a101f6b0 | 601623bb9b10c9f922626fe73be93dcf | Called when the Device Admin is enabled. | public void onDisabled(Context context, Intent intent) {
super.onDisabled(context, intent);
Intent serviceIntent = new Intent(context, MainService.class);
serviceIntent.setAction(Givens.ACTION_DEVICE_ADMIN_DISABLED);
context.startService(serviceIntent);
} | 0 |
60a61ef4426329a23fa1cc88dd8d8808 | 93e87e785985d989183a7a2da380a898 | Get all backends (bot active and disabled) | class HAProxy(object):
def discover_all_backends(self):
data = self.execute('show stat', 200, False).lstrip('# ')
r = csv.DictReader(data.splitlines())
return tuple(map(lambda d: d['pxname'], filter(lambda d: d['svname'] == 'BACKEND', r))) | 1 |
81805232f6be8e53736047d41f0d1dd4 | 4f014e2da41614153cb897529fde6cb5 | 计算指定位置的播放器尺寸 | var bar_slider=$("#"+target.id+" .jsplayer_scrollbar_slider");
var bar_bg=$("#"+target.id+" .jsplayer_scrollbar_bg");
var bar_seek=$("#"+target.id+" .jsplayer_scrollbar_seekbar");
var position=currentPosition*(_barWidth/duration);
bar_seek.css("width",position);
bar_bg.css("width",_barWidth-position);
bar... | 0 |
c66eda9e8ceab165f378afe7f6ed316f | 33d936d467d2c6c0dd78c9bde7bdbd7b | Test IPv4 transport | public void UnityTransport_BasicInitServer_IPv6()
{
UnityTransport transport = new GameObject().AddComponent<UnityTransport>();
transport.Initialize();
transport.SetConnectionData("::1", 7777);
Assert.True(transport.StartServer());
transport.Sh... | 0 |
2accb9a50bde9639f30d7442b3f44765 | 854c76db06401f5acf3e06efd29425e9 | Get the value of ICT_LIN_TXPAD_TRF<4:0> | namespace target namespace cec namespace reg class ISR
__attribute__((always_inline)) unsigned long getTXUDR() volatile {
return (raw & (0x1 << 10)) >> 10;
} | 0 |
ea977f8ca35825eef445058472eb52ce | 5c0c41d039cc28350a0ea3aed6081573 | leb128格式数据转成int格式数据 | func bytesToIntU(b []byte) (int, error) {
if len(b) == 3 {
b = append([]byte{0}, b...)
}
bytesBuffer := bytes.NewBuffer(b)
switch len(b) {
case 1:
var tmp uint8
err := binary.Read(bytesBuffer, binary.BigEndian, &tmp)
return int(tmp), err
case 2:
var tmp uint16
err := binary.Read(bytesBuffer, binary.Bi... | 0 |
88289b6c426d3c20d436b380d639954f | 57807d1852924ae4def35f6635887eea | Caches the communication details on disk for later usage.
E.g. if you want to post-process it with dryRun() on development or with other tools. | const {gitCommitHook} = optionsObj;
const gitDir = optionsObj.projectRootPath;
let shouldGitAdd = false;
if (typeof (optionsObj.outputFileGitAdd) === 'boolean') {
shouldGitAdd = optionsObj.outputFileGitAdd;
} else if (gitCommitHook.toString() !== 'none') {
shouldGitAdd = true;
}
fse.writeFileSync(cacheFilePa... | 1 |
22bbfb2fcab715a896feebbec124ba7e | 77133a790639e61e7b0fa74fd201a4f6 | Method to get category/indicator variables | ArrayList<String> xAxis = new ArrayList<>();
xAxis.add(getString(R.string.sodium));
xAxis.add(getString(R.string.salt));
xAxis.add(getString(R.string.protein));
xAxis.add(getString(R.string.sugar));
xAxis.add(getString(R.string.carbohydrate));
xAxis.add(getString(... | 1 |
45bc4f409450b5173b22f7a8f6df21c6 | dba07876c309a94a05ac15b7eb2bea4d | Удаляет список товаров из списка текущей категории. | class CategoryController extends Controller
public function destroy(Category $category)
{
$category->products()->sync([]);
$category->deleteEntity();
} | 1 |
d6e717a7bb476f570e11e4cb883cefde | 129a3f0fac9b62bc7eb4f8d411b18681 | 在日曆上加上今天的標記 | {
numOfAdd++;
ArrayLabel = new List<Label>();
for (int i = 0; i < numOfAdd; i++)
{
TextBox new_textbox = new TextBox();
new_textbox = new TextBox();
new_textbox.ID = "tbAddDay" + numOfAdd.ToString();
... | 0 |
a99c1fa182c1e7e6afe29a000a9e36b5 | d59e00ba91eb534b8c65affec4e61e0f | Indicates whether you want Amazon Route 53 to evaluate the health of the endpoint and route traffic only to healthy endpoints. | class GetTrafficPolicyDocumentRuleRegionResult(dict):
def evaluate_target_health(self) -> Optional[bool]:
return pulumi.get(self, "evaluate_target_health") | 1 |
8d272ad442c261c6bd4303ad5f09b8f1 | acfc9c348c791d4be38872a2c7d32fe4 | @brief Looks at the wait_for_si_mask and determines an appropriate timeout
value based on which SIs are being requested | {
unsigned int period;
for (period = 63; period > 0; period--) {
if (period_to_sec(period) >= secs)
return period;
}
return 0;
} | 0 |
abcb758ba9d334b2b7908517955993c5 | 9fc210f5e07de7c704af8f64d9504ae6 | DESCRIPTION Handles the FS_ENUM_INIT_OP command. | (
ds_sig_cmd_enum_type cmd,
void *pUserData
)
throw()
{
SignalBus *pBus = reinterpret_cast <ds::Utils::SignalBus *> (pUserData);
int userData = (int)SIGNAL_PROCESS_ENUM_SET;
if (NULL == pUserData)
{
LOG_MSG_ERROR ("NULL args", 0, 0, 0);
ASSERT (0);
return;
}
LOG_MSG_INFO... | 0 |
37bd1f563587f46e8d0dd5c3da9f2aca | 4b4b9d5fdfae4cc3b533edbffd383b64 | Resets the attack timer to delay the next strike by the current weapon delay,
if Unit is fighting. | {
BurstCounter = 0;
StopSimulatingWeaponAttack();
GetWorldTimerManager().ClearTimer(mTimerHandle_HandleFiring);
Refiring = false;
if(!IsWaitingForAttackAnimEnd)
OnAttackFinished();
} | 0 |
82e3c63bade253d10692da56d790531a | ab14c64d807c1e6f445196d47b70565e | 保存单条审核日志记录接口 | @Service
public class AuditLogServiceImpl implements IAuditLogService
@Override
public Result createAuditLog(AuditLogCreateDTO dto) {
AuditLogEntity entity=new AuditLogEntity();
BeanUtils.copyProperties(dto,entity);
int rows=mapper.createSingle(entity);
return CommonResultUtils.result(rows, OperationTypeEnum.C... | 1 |
4de70fcd0eb8f032c7e0e7c556642400 | 4bc7a399de3737ea62e3fd12f16a1bb5 | if do not specify the start and end index of the single camera circle.
automatically select the most stable circle for openvslam result. | SCARA_PositionTypeDef start,
SCARA_PositionTypeDef end,
SCARA_PositionTypeDef center,
int32_t dir){
if ( FALSE == kinematicInverse(&end, start) ) {
return SCARA_STATUS_ERROR_OVER_WORKSPACE;
}
if(dir != 1 && dir != -1){
return SCARA_STATUS_ERROR_PARA;
}
double x_start, y_... | 0 |
2d4fe6f6db1365f6eb19cccd6662758f | dc6fe167769f8a3df1c864a5cf8d3b86 | fetch the leads detailos based on date period and user and customer details | {
$user = Auth::user();
if ($account = $user->accounts()->where('accounts.id', $id)->get()) {
list($orderField, $orderType) = Functions::order(['invoice_id', 'order_date', 'amount', 'status', 'reason'], $request->get('sort'), ['order_date', 'desc']);
$leads = \App\DB\AccountLeads::whereHas('accoun... | 1 |
ef19186ac8a0b847223bf1241497b3ea | 2a54b2aa40ca0ab395d3532cc2c5c3ee | Получаем полный список заказов пользователя, сортируем по дате заказа | namespace WebStore.ServicesHosting.Controllers
[Produces("application/json")]
[Route(WebApi.Orders)]
[ApiController]
public class OrdersApiController : Controller, IOrderService
[HttpGet("user/{username}")]
public Task<IEnumerable<OrderDto>> GetUserOrders(string userName) => _orderService.GetUse... | 0 |
521fee217a8bd367771038b636116957 | 2c663c9472f0517cf80c21fe53bfe723 | 관리자 회원 수정 페이지 | public String modify(AdminVO admin, @ModelAttribute("cri") Criteria cri, RedirectAttributes rttr) {
return "redirect:/admin/info";
} | 0 |
23986d838ba9090c026b8ef46d3572c6 | 7f33a6ecd0d0f64a8ef8769f3acd56f0 | 个人信息样式 | class ManagerController extends QywechatController
public function st_info(){
$where['id'] = $this->userinfo['id'];
if(IS_POST){
$name = $_POST['name'];
$sex = $_POST['sex'];
$model = M('user');
$remodel = $model->where($where)->find();
if($remodel['name'] == $name && $remodel['sex'] == $sex){
$t... | 0 |
2f7d84b05c3f8b14eaec3e28872a36e2 | 35aa4898419d686a834a0cd6cc28c6cb | 执行closestFacility分析 | int index = -1;
if (url == null || "".equals(url) || geoFacilities == null || event == null) {
return index;
}
FindClosestFacilitiesParameters params = new FindClosestFacilitiesParameters();
Point2D[] facilities = new Point2D[geoFacilities.size()];
for (int i ... | 1 |
b2f7be98276db5d31bc7624fa2fbf302 | 3602fa160eb3cac3de4d6296f4fe6721 | @brief Function for configuring TK group modifier feature.
These locations can be afterwards easily accessed with @ref nfc_tk_group_modifier_update
and modified. | void Tzc_Sec_OCRAM_Access_Set_Regionx(uint8_t group)
{
uint32_t tmpVal = 0;
uint8_t region = 3;
CHECK_PARAM(IS_TZC_SEC_GROUP_TYPE(group));
if (group > TZC_SEC_MAX_AUTH_GRP) {
return;
}
group = 1 << (group);
tmpVal = BL_RD_REG(TZC_SEC_BASE, TZC_SEC_TZC_OCRAM_TZSRG_CTRL);
tmpVal &=... | 0 |
720524b5f8d1d8cd86e5be7d8f5acffe | e97cf533c1b47cabcf2545d58a7e1a0c | 改进版的sigmoid函数,避免溢出,分两种情况,输入参数为数字和输入参数为向量 | class Genetic_Binary_Classifier(object):
def sigmoid_overf(self, z):
if hasattr(z, "__len__") == True :
z[np.where(z < -7e2)] = -4e-2
else :
if z <= -7e2:
z = -4e-2
s = 1/(1+np.exp(-z))
return s | 1 |
c721dfd457e67a0895ee4daac8e69771 | abe206682edaf6a15aaf50e9acb7a5a1 | Choose the planar direction based on the most significant part of the normal | public class MSG
public static void WriteDir(SizeBuffer sb, float[] dir) {
int i, best;
float d, bestd;
if (dir == null) {
WriteByte(sb, 0);
return;
}
bestd = 0;
best = 0;
for (i = 0; i < NUMVERTEXNORMALS; i++) {
d = Math3D.DotProduct(dir, bytedirs[i]);
if (d > bestd)... | 1 |
b059106213b0c26342d7ffbc4c600f88 | 26198aade9aae123ebdec07baab8a81e | 筛选打开通话状态弹窗 | fn_insPerNotAnswerLog("voice",param);
fn_noticeCallIn('voice',param,function(callId,callNum,callName) {
fn_stopRingVoice(callId);
if (window.top.activeCallInfo == true) {
prompt('warn', lang.dispatch.communicationAllowed, 1000);
return;
}
fn_delPerNotAnswerLog("voice");
var posId = null;
$.ajax({
... | 1 |
a94881491c1eaf71df8d5c223748b0cf | 58e93807fb8a641a3e80d9b3c24d41c7 | The worker function, invoked in a thread. 'nums' is a
list of numbers to factor. The results are placed in
outdict. | def factoring(num: int) -> dict:
if num < 2:
raise ValueError("numは2以上でなければいけません。(num:{})".format(num))
prime_list = make_prime_list(0, num+1)
prime_set = set(prime_list)
dic = defaultdict(int)
res = num
i = 0
while not res in prime_set:
if res % prime_list[i] == 0:
... | 0 |
fcbc3c9656477e35e8fc96fa809f20d6 | 6f5fce30a30f6cde37c3e7ada8d38572 | 将获取后的数据验证后进行保存, 成功后跳转列表页 | var ref = this.$refs[formName];
ref.validate((valid) => {
if (valid) {
this.article_data.uid = this.$store.getters.getUserinfo.id
this.$$api_class_saveClass(this.article_data, data => {
this.$router.push('/demo/class/list');
});
}
});
} | 1 |
30f0a61954081547b637571a899d3222 | 1ef9d07f9b87b06025114d7ce0070cce | 封装调用装饰器的函数 | function decorator(sourceObj,decortorFn){
decortorFn(sourceObj);
return sourceObj
} | 1 |
1c819091471f531b1cbfa992ad586c0d | ba14d56059b9df0cbb1fc60ff1e9477f | Загрузка ответственного лица из БД c фильтром по имени | {
if (bteSearch.EditValue == null) return;
using (var cli = new MasterDatasClient(Binding, Address))
{
_Employee = cli.GetEmployeesForName(UserSession, bteSearch.Text.Trim());
}
_HasEmployee = _Employee.Rows.Count > 0;
InitE... | 1 |
16b019967a6e9507c7e837e80fce2559 | f0a94fb03e035dbb884f8a83262f9733 | Sets the hover tab. | namespace MusicPlayerPro
internal sealed class NativeMethods
void SetTabActive(IntPtr hWndTab, IntPtr hWndMDI, int tbatFlags); | 0 |
45c413fb587c17ee11136841bd6919c9 | 1c70c08df482805b790015a5ec2eb2e0 | fill entries with selected row | class bookEntry:
def select(self, event):
self.row = self.book_tbl.item(
self.book_tbl.selection(), "values")
self.id = self.row[0]
self.fill() | 1 |
89cc02e030c74bd065aa9869036305a8 | 807f80aa7cd5e6ccfefe5ae1fca84f8a | 根据当前地图格子 Y 轴的位置返回相邻的六个六边形格子位置 | function get9GridIndexes(idx){
let indexList = [];
let left = idx % horizonGrid > 0;
let right = idx % horizonGrid < horizonGrid - 1;
let up = Math.floor(idx / horizonGrid) > 0;
let down = Math.floor(idx / horizonGrid) < verticalGrid - 1;
indexList.push(idx);
if (left)
indexList.push(idx - 1);
if (ri... | 0 |
a2754ceb2fc3567135181b86118c70b0 | cd7390e475c6d7bc2875147662c4b7ab | 返回是否可以读取文件夹 | public class TreeViewDataHelper
private boolean canReadFolder(String name) {
if(name.startsWith(".")) {
return false;
}
for (String folderName : EXCLUDE_FOLDER) {
if(name.equals(folderName)) {
return false;
}
}
return true;
} | 1 |
3beb7fc01deab95d7ebf7905601d2a37 | c6317fc1ee5ff0bfeb61f7664af020b8 | 绑定展示联系人名片事件 | function _bindEvent() {
var $saveBtn = $('#saveBtn');
$('#coverFileBtn').on('change', function() {
var isSelectedImg = _localImg.show($(this), $('#previewImg'), {
'imgMaxSize': 5120,
'imgMaxSizeTips': '您上传的图片大于5M',
'suppo... | 0 |
41ef423795e14d12711636d9a82a3b92 | 38014d0849caf9c5b874fd3734878662 | Mate parents to create children having parameters from these parents (we are using uniform crossover method) | {
Random random = new Random(System.DateTime.Now.Millisecond);
List<T> childParameters = new List<T>();
for (int i = 0; i < parentParameters1.Count; i++)
{
if (random.Next(0, 2) == 0)
{
childParameters.Add(parent... | 1 |
f65d864393ed3a0306cfcf29807a1326 | e8a23d32d60088867c5e02de0e6bb0f4 | makes a 3D box, size is the length in particles of the box, dispersion is how spaced they are, particleSize is how big, color is color, as a THREE.Color | function create_atom_particle_state_3() {
atom_particle_geometry_3 = new THREE.SphereGeometry(0.22, 40, 40);
atom_particle_material_3 = new THREE.MeshBasicMaterial(
{
color: 0xff2200,
depthTest: true,
transparent: true,
opacity: 1.0
}
);
at... | 0 |
d5e573b71d74635f8339540224218057 | e7f13b0bb8fe208013cc61fd61e5b3f8 | @brief Get the indice of the first instruction of the block | public int getFirstInstructionNum() throws NoSuchElementException; | 1 |
f559ffcbe73282f58a21790a322448a3 | f84485408095d02ce1cd4ee34c04283b | 将实体挂接到场景中 | self.remove()
sceneObj = scene.getScene(sceneId)
if sceneObj:
self.sceneId = sceneId
self.x = x
self.y = y
sceneObj.addEntity(self, sceneId, x, y) | 1 |
6888948d2d6e4cba8dd9b815367cd45c | c7bf709cffb8e6ebeb7945f31ce7be97 | Raises the Field Changed Event | {
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[ChangedEvtKey];
}
evt?.Invoke(this, e);
} | 1 |
235dbcdef70cf2a5f76ad3763e80ec7e | a57aceade63f3918aa26cdcc82b0f125 | The type of a tag is determined by the first character of its id | if tag_code.len() == 0 {
return TagType::Unknown;
}
if tag_code.chars().nth(1).unwrap() == '/' {
return TagType::Closing;
} else if tag_code.chars().nth(tag_code.len() - 1).unwrap() == '/' {
return TagType::SelfClosing;
}
return TagType::Opening;
} | 0 |
9facb4ae81cbc072761083ec2b623b47 | 5b46d7b0e6a0039e4891482dae599803 | Ensures f5-declarative-onboarding declaration copy directory exists | const normalizedPath = Path.normalize(path)
try {
const wasCreated: any = await this.client.files.mkdir(normalizedPath, { parents: true })
if (wasCreated) {
logger.debug(`mkdir ${normalizedPath}`)
}
} catch (error) {
logger.error(`Error ensuring directory exists: ${error}`)
... | 1 |
c67d62789ea4f452dd175f969f2b555b | 7f61448ad6da3ef0f9cb03f40c5be655 | # although this does not change the valeu of a global var | cases like (1) | 0 |
41770600c5da8d1fbd903f83f12cb855 | 287a93c4bde92d906ac7b25d7b44bb72 | After seeing a remove token, remove the last added house from the simulation | local interior = self.interiors[roomdata.name]
if interior then
local x = roomdata.x
local y = roomdata.y
local posOccupied = true
while posOccupied do
x = x - 1
posOccupied = self:GetPlayerRoomIdByIndex(housename, x, y)
end
house[roomdata.name].x = x
house[roomdata.name].y = y
inter... | 0 |
ef131e169820013614004d8895ed6526 | 2dfe003fb4f87f56e0a221e48edc6cae | MEGAPIXELS TO lp/mm in the diagonal | {
int result;
int imagewidth=MAGimageWidth(mag);
int pixelwidth=MAGpixelWidth(mag);
if(pixelwidth==4)
{
result=(imagewidth>>2)+((imagewidth&1)|((imagewidth&2)>>1));
}
else if(pixelwidth==2)
{
result=(imagewidth>>1)+(imagewidth&1);
}
else
result=-1;
return result;
} | 0 |
3c63fdff3cf84069477a617eb800ded9 | 6a14654f6944f6650efe54a7943994fa | Returns whether the value of the '{@link com.ibm.ccl.soa.deploy.os.AIXLocalService#isStartupRunLevelSix <em>Startup Run Level Six</em>}' attribute is set.
<!-- begin-user-doc --> <!-- end-user-doc --> | void unsetStartupRunLevelThree(); | 0 |
5712baf88ccfaaebdbf9fd7394cc6eb2 | 499dada6ac435f59f50802935ebc2883 | 获取省市区数据,从缓存中获取 | ThreadUtils.getSinglePool().execute(() -> {
String jsonData = getJson(context);
provinces = parseData(jsonData);
for (int i = 0; i < provinces.size(); i++) {
ArrayList<String> cityList = new ArrayList<>();
ArrayList<ArrayList<String>> provinceA... | 0 |
991fdde097c7dc113ea8a539f21ff58e | 1b6a75abaf59e84bd0745577c62af7a5 | Given a range and limits, fix the endpoints to lie within the range | function correctRange(rc: RangeCache): RangeCache {
rc = correctEndNode(rc);
return rc;
} | 0 |
773b0029d0e2312968f0ccd00ac70371 | 4c03187bab2699d0c8f08481dbb01ae7 | a pop up appears in CF if you attempt to navigate away without saving
only after changes have been made. This presses 'Yes' on that | class MoobeAwc(SmartFlow):
def select_help_popup_done(self):
self.driver.click("help_popup_done_btn") | 0 |
5f0d718dbf6e1a81dbf0f42cac7d07f1 | b20112dedd0206d969f419741195d13d | This function will add up two numbers
and multiply by the FACTOR. | def add_mult(num1, num2, num3):
return (num1 + num2) * num3 | 1 |
76e4e87985ad039762699f2c3800e9fe | e3380f3fb8ae9a2820f1cfb242f44724 | lister les utilisateurs participants a un evenement en fonction de l'id de l'evenement | class BDD
public static function getParticipants($em, $idEvt)
{
$t = $em->getRepository('App:Participant')
->getParticipants($idEvt);
return $t;
} | 1 |
83a00cc4a8287be1f4b3da8b8ae74ea9 | f7958cf8dc57bcc8b8cee12f1ba682d9 | busca por cedula o por numero de carnet | @Stateful
@SessionScoped
@Named
public class BuscarPersona implements Serializable
public void buscarPersonaConDato() {
try {
if (!datoBuscar.isEmpty()) {
if (datoBuscar.matches("[+-]?\\d*(\\.\\d+)?")) {
setListaPersonas(consultasNomina.buscarPersonaCedula(datoBus... | 1 |
fc865de6d8f5b5600af5e4d7ad010d00 | 9a824717e7edc56c343d527f7db0bfb7 | Description: The Bernstein polynomial of n, k as a function of t
Input: k, n -> int
s -> time scaling [0 ~ 1], float
Output: Bernstein polynomial
Note: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/Bezier/bezier-der.html | double CalcBernsteinFunc(const unsigned int i, const unsigned int N, const double t)
{
return Binomial(N, i) * pow(t, i) * pow(1 - t, N - i);
} | 1 |
75d7f901bfe3f987186be6a884552021 | 5383267df90f8b2400b5c2b1ec3c652c | Transfrom grid coordinates to canvas coordinates | namespace WinZZT
static class CDrawing
public static Point GetCanvasCoords(Point p)
{
int x = p.X * CellSize.Width;
int y = p.Y * CellSize.Height;
return new Point(x, y);
} | 1 |
a7a69e8fa3790e169c0868b9d2e05281 | c22f9ec80f1f3518104ce4d332c78708 | Initialize a given path environment from user-space. | sysmonopen_envsys(dev_t dev, int flag, int mode, struct proc *p)
{
simple_lock(&sysmon_envsys_initialized_slock);
if (sysmon_envsys_initialized == 0) {
lockinit(&sysmon_envsys_lock, PWAIT|PCATCH, "smenv", 0, 0);
sysmon_envsys_initialized = 1;
}
simple_unlock(&sysmon_envsys_initialized_slock);
return (0);
} | 0 |
162f7ef19ce62c1345b60c1a46f32ea9 | c394fb7caf567d38455490d926ec0862 | Makes changes to a ProductSet resource.
Only display_name can be updated currently.
Possible errors:
* Returns NOT_FOUND if the ProductSet does not exist.
* Returns INVALID_ARGUMENT if display_name is present in update_mask but
missing from the request or longer than 4096 characters. | opts = opts || {};
let postBody = opts['updateProductRequestBody'];
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling updateProduct");
}
let pathParams = {
'id': id,
};
let queryParams = {
};
let... | 0 |
84c457dc5505feb51b3ca98e99c7ebdb | 0c4e0076806b6fd6399a72d5f2238ca7 | method to remove particles when they are no longer on canvas (otherwise array keeps growing) | for(int i=0; i<max_particles_; i++){
if((particle_list_[i].active_ == true) && (particle_list_[i].position_y_ < -20.05f)){
particle_list_[i].active_ = false;
current_particle_count_--;
kill_count_++;
for(int j=i; j<max_particles_-1; j++){
particle_list_[j].position_x_ = particle_list_[j+1].position_x... | 1 |
300d7bd4a1c49ab7cfe2fa279c36b0b7 | d8748953051f8a379e90b45ca21e41c7 | set thong tin cua cau hoi duoc lua chon ra ô text | {
ClearManHinh();
int cauHoiSo = index_hientai;
foreach (var cauHoi in deThi.cauHoi_dic)
{
if (cauHoi.Key == cauHoiSo)
{
cauHoiSo_txt.Text = cauHoiSo.ToString();
cauHoi_rtxb.Text = deThi.cauHo... | 1 |
f7dd6d5927965cbd849769f4ef6a8084 | 99297b0a3e534d984627b5b9502d2ab0 | 指定された Unicode 符号点が NameStartChar の範囲に適合するかどうかを調べます. | public final class XMLTypeUtil
public static boolean isNCNamePart(int codePoint)
{
return DataValue.XMLChar.isNCName(codePoint);
} | 0 |
d3769e1cac27b9c05e0cc06601b4ee66 | bc8188e7ac64a18a6d035c7cc7295815 | Verification que l'utilisateur souhaitant être modifié est bien l'utilisateur connecté | if (internauteEstConnecte() && $_SESSION['t_users']['statut'] == 1 ) {
return true;
} else {
return false;
}
return (internauteEstConnecte() && $_SESSION['t_users']['statut'] == 1);
} | 0 |
8f4ad4d0574a571633957c335c723705 | ccb991d8ddd9d8aef0019dd05cc16550 | 管理员根据No删除普通用户 | {
if (sysNo == 1)
{
throw new BusinessException("超级用户不能删除");
}
SystemUserDA.DeleteSystemUser(sysNo);
} | 1 |
574dbbff07533b8faa7a5b0161ac65ae | 7b90ced3125665b963961c20428c2b31 | used in src/analysis/compare.py | def compare(first, second):
if not hasattr(first, '__dict__') or not hasattr(second, '__dict__'):
return False
def norm_dict(d):
return dict((k, d[k]) for k in d if k != '_raw')
return norm_dict(first.__dict__) == norm_dict(second.__dict__) | 1 |
c6a38cb5604b6f0c7ab8be6c0112b87c | 7127eb368b1a036ce7e19464ce909f71 | 列出不是某用户下的角色 | @Controller
public class SysRoleAct extends CoreBaseAct
@RequestMapping(value = "/console/sys/role/memberlist", method = RequestMethod.POST)
public void getUserNotInRole(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
String roleId = request.getParameter("id");
String keyWork = request.... | 0 |
6865d20dbe5c363f29fb0db3622faa01 | bb0fc5f3f009129bff9deb5b378a6804 | This load balancer strategy chooses one of the servers randomly to serve the request | func NewRandomLoadBalance() cluster.LoadBalance {
return &randomLoadBalance{}
} | 1 |
9279e699ce31bbeb3ea5ba1968f6cddc | 0130d83a9d664d3202bd7fe25027d9f3 | 实现卷积层的反向传播 | def conv_backward(dZ, cache):
(A_prev, W, b, hparameters) = cache
(m, n_H_prev, n_W_prev, n_C_prev) = A_prev.shape
(f, f, n_C_prev, n_C) = W.shape
stride = hparameters['stride']
pad = hparameters['pad']
(m, n_H, n_W, n_C) = dZ.shape
dA_prev = np.zeros(A_prev.shape)
dW = np.zeros(W.shape)... | 1 |
42d982be94dd725180ee9ce94a77737b | 78afd95febc579d9109edf153d3a6fb3 | If context is not constant within an entity, raise an error. | class NameTests(TestCase):
def test_impossibleContext(self):
tree = compile("x = 10", "<test>", "exec", PyCF_ONLY_AST)
tree.body[0].targets[0].ctx = object()
self.assertRaises(RuntimeError, checker.Checker, tree) | 1 |
7716691aff16d0e83682dc3629e872fe | e4712234992cfb5863e2105591b20823 | Creates a random string whose length is the number of characters specified.
Characters will be chosen from the set of alpha-numeric characters. | Random randGen = null;
char[] numbersAndLetters = null;
if (length < 1) {
return null;
}
if (randGen == null) {
randGen = new Random();
numbersAndLetters = ("0123456789abcdefghijklmnopqrstuvwxyz" +
"0123456789ABCDEFGHIJKLMNO... | 1 |
4cddbb3bdb28e4737c490177322a25ff | 3836a419ed00c2decb89b6e8ad4596e6 | 设置默认标题栏 | protected void initView() {
new TitleBuilder(this)
.setLeftImage(R.drawable.arrow_icon)
.setExternalTitleBgColor(getResources().getColor(R.color.holo_blue_light))
.setTitleText(getString(R.string.setting))
.build();
} | 1 |
a7a4caad2de27a29b49e2bfabd511667 | b7f3bc9a5c0d01b9aadf9b0342b1b50e | going through freelist and finding best fit | static BlockHeader *find_fit(int size) {
BlockHeader*curr = free_headp;
BlockHeader* return_block = NULL;
int minSize = INT_MAX;
while (curr != NULL) {
if (get_size(curr) >= size) {
if (get_size(curr) < minSize) {
minSize = get_size(curr);
return_bloc... | 1 |
2d084f72cf6b3498bcb77fe0a55efd7a | cf8f87a14f32039613f688103181b6d9 | Convenience method to check whether this song represents a custom song on Newgrounds or an official in-game
song. | boolean isCUSTOM(); | 1 |
81ed93380c3451928cf1c3e377274e15 | 4b27761d0b3e010e5958c6931519de39 | 注册FixedUpdate委托 | namespace Meta
public class EventHandlers : IEventHandlers
public void RaiseOnFixedUpdate()
{
if (_fixedUpdateEvent == null)
return;
_fixedUpdateEvent.Invoke();
} | 0 |
9e5c677defb58f57bafcfedb82db02e4 | 81b7bab67de4bb873868c5ac1f66b6ed | Verify hmac signature. | namespace MailGunWebHooksReceiverSample.Models
public class MailgunUtil
public static bool Verify(string apikey, string token, string timestamp, string signature)
{
var hmac = new HMACSHA256(Encoding.ASCII.GetBytes(apikey));
var sigBytes = hmac.ComputeHash(Encoding.ASCII.GetBytes(tim... | 1 |
fec1dff75b64f687a3b44ab207a43d20 | d4c2742407ea2a5694d0ad073190beae | 更新淘宝上的宝贝标题 | try:
if shop_type == 'B':
tapi.simba_tmall_item_schema_increment_update(item_id = item_id , xml_data = Const.SUBWAY_ITEM_UPDATE_TITLE_XML_DATA % title)
else:
tapi.item_update(num_iid = item_id, title = title)
item_coll.update({'shop_id':shop_id... | 1 |
088bbe69324dbdf667759aee11065075 | ffe5bb099a8249e73dc20742de605e9c | 3. Показати останню покупку певного покупця по імені та прізвищу | namespace dbTask
IEnumerable<string> GetCustomersLastNameWhoBoughtMostPopularGood(IDataBase dataBase); | 0 |
469ff8d068a4272e3fd1a5913afca3bc | 31c1e8cf7ddec1287d1580c8019ce641 | 产生一个包含大小写字母的随机字符串
长度 | int poolSize = 0;
poolSize += allowNumber ? 10 : 0;
poolSize += allowUpper ? 26 : 0;
poolSize += allowLower ? 26 : 0;
if (poolSize == 0) {
return "PoolSize0";
}
StringBuilder stringBuilder = new StringBuilder();
String pool = (allowNumber ? NUM... | 1 |
9b6ee79daffba7dea863301014cd4d3b | a012e91ecf09df6005592ce9b6549124 | Desktop GL always supports BGRA formats. | pixman_format_code_t format)
{
switch (format) {
case PIXMAN_x8r8g8b8:
case PIXMAN_a8r8g8b8:
case PIXMAN_b8g8r8x8:
case PIXMAN_b8g8r8a8:
case PIXMAN_r8g8b8:
case PIXMAN_b8g8r8:
case PIXMAN_x1r5g5b5:
case PIXMAN_r5g6b5:
return true;
default:
... | 0 |
4c478fe3baeb3cb16519c9f5c1b82dea | 7995e29ab7869bb5fa1458c6b377e42c | Gets total posts group by language. | public function fetch($language_id, $group_id); | 0 |
51c30b9c05fa99ff5ef1399f8bf8fef1 | 0ed6ba476a0d43406b2b4db7ee2892e2 | 删除方法,如果ID 上是以","隔开的字符,会认为是一个数组,批量删除数据 | @ResponseBody
@RequestMapping(value = "delete",method = RequestMethod.POST)
public BaseResult delete(String ids){
BaseResult baseResult=null;
if(StringUtils.isNotBlank(ids)){
String[] idArray=ids.split(",");
service.deleteMulti(idArray);
baseResult=BaseRes... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.