query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1d0cecac9b8acad4b2f34084ac872e0c | f1ae5e1cf9391946968185e10d80774a | Converts 0-255 based RGB to Hex | function rgbToHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)} | 1 |
ce6c09777278cd844c0ccd2abb3159f3 | ab4e51964ced354a22e8c57268225846 | 通过ID跟商品Id查询sku是否存在 | GdGoodsSkuid selectOneGdGoodsSkuid(Map<String, Object> map); | 1 |
1545137540615c1563f1176fe7bb1a5b | e2196847fb64d7348252c4b0d4a5ee9b | Base function for representing factor vector as bar plot | options = self.options()
color = options['rgbcolor']
width = float(options['width'])
import numpy
ind = numpy.array(self.ind, dtype=float)
datalist = numpy.array(self.datalist, dtype=float)
subplot.bar(ind, datalist, color=color, width=width, label=options['legend... | 1 |
185a691c08915a41ff3f78f8b25aa1bb | 162feb6ae0f6be111e8956e76b87d346 | Return a fully-qualified database resource name string. | if database is None:
db = ""
else:
db = database
return "%s/%s/%s/%s" % (name, namespace, uri, db) | 1 |
cd07518bd7e47b46a2b784b57ed4ec11 | 3420d4f89187977e7ca6ff4efddab8c5 | 获得射击骨骼 | public class GunTowerController : BaseTowerController
private void mapBones () {
Transform a = transform.Find ("Armature");
turretBone = a.Find("turrent");
barrelRBone = turretBone.Find("branch_R").Find("gun_R_0");
barrelLBone = turretBone.Find("branch_L").Find("gun_L_0");
} | 1 |
ab2de3db2e80cbbf284100d21e3ccd89 | 14f3a2c9d5d9d9c2c2c67bf88e1babb2 | @brief
Calculate MAC summ by GOST algorithm. | {
register uint32 c0;
uint32 accumul[2];
uint32 n1 = ctx->seed[0];
uint32 n2 = ctx->seed[1];
for( c0 = len >> 3; c0; c0-- )
{
n1 ^= *pdata++;
n2 ^= *pdata++;
__GOST_STEP_DIRECT( ctx->key, n1, n2 );
__GOST_STEP_DIRECT( ctx->key, n1, n2 );
}
if( len & 0x00000007 )
{
accumul[0] = 0;
accumul... | 1 |
24b6b0d77ead022436862b6de0b9e238 | fc22184cbeaa9106a771ac03b431e0cc | Initialisation of PWM1 (TIMER4) | TIM_OC_InitTypeDef tim3PWM_Config;
htimer3.Instance = TIM3;
htimer3.Init.Period = 10000 - 1;
htimer3.Init.Prescaler = 4900;
if (HAL_TIM_PWM_Init(&htimer3) != HAL_OK){
Error_handler();
}
memset(&tim3PWM_Config, 0, sizeof(tim3PWM_Config));
tim3PWM_Config.OCMode = TIM_OCMODE_PWM1;
tim3PWM_Config.OCPolarity = T... | 0 |
db57e88c5f59f69f1b7f40e224370e15 | e2e3cc277a41d5c174177310408b0ca5 | Returns:
The function name (see __init__). | class FunctionCFG(object):
def fn_name(self):
return self._fn_name | 1 |
ae98eb530b055f88150492520aef0719 | 8e6409ca149157f8870fbd79dfe0453b | 重定向(向客户端发送 重定向 请求头) | public class HttpFileServerHandler extends SimpleChannelInboundHandler<FullHttpRequest>
private void sendRedirect(ChannelHandlerContext ctx,String newUri){
FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.FOUND);
response.headers().set(HttpHeaderNames.LOCATION,newUri)... | 1 |
9ad9ee2aa1a12abe7e4a6b15a4705170 | 67a0d767ddc3d9059849c9bb4d182342 | Returns the value of the specified number as a double, which may involve rounding. | {
var success = double.TryParse(input.SafeString(), out var result);
if (!success)
return null;
if (digits == null)
return result;
return Math.Round(result, digits.Value);
} | 1 |
966a6a1a89d3888357b1ef6e8d5dcfd4 | c02465ecf9042e775112fcb3a42ff977 | Populate fields named in "fields" with values in *args. | h = {}
options = args.last.is_a?(Hash) ? args.pop : {}
field_set = self.class.serializable_fields.keys
fields = self.class.serializable_fields.keys[0,args.size]
fields.zip(args).each do |(field, arg)|
h[field] = arg
field_set.delete field
end
o... | 1 |
c5b06d0cefff7f7a3219d077df06fd24 | b07665d00635bb574df99ccc0f3cbf0b | Updates all the connectivity (bond, angles, dihedrals and graphs) | class Topology(object):
def update_bond_types(self):
self.update_connection_types() | 0 |
6b1f3e89afcf12dcc1f5e4e290cbe675 | 8740ce4154e27eb1003021d813aa0e6b | Returns the value of the '<em><b>Inventory</b></em>' containment reference.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Inventory</em>' containment reference isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | Inventory createInventory(); | 0 |
ab0b1a45021b7bfe1538b1ce18964b66 | 9eb471e55d2841c8137e84c1968a25ff | Function to determine the indices corresponding to the values in an array greater than a minimum value. | indsabove = []
fv = data[:,splitrule[0]]
for point_i in range(len(fv)):
if fv[point_i] > splitrule[1]:
indsabove.append(point_i)
return indsabove | 1 |
bb52830b9c4940c4df4459670c7cbad8 | 1cd41d547693fd441facd67e03479130 | Deletes the CourseProgram with the given course_program_id | global $_DB;
return $_DB->query("DELETE FROM CourseOffering WHERE CourseOfferingID = '$courseOfferingId'");
} | 0 |
eaaf405318f5f735580206c6727a50be | 97ae31191c9e575666071da6e3a7d988 | 获取部分硬更新的更新数据操作对象。软更新是只仅对属性值不为null的执行更新操作。
实体类型
硬保存字段名 | namespace Furion.DatabaseAccessor
public sealed partial class EntityExecutePart<TEntity>
where TEntity : class, IPrivateEntity, new()
public Task<EntityEntry<TEntity>> UpdateExcludeAsync(IEnumerable<string> propertyNames, bool? ignoreNullValues = null)
{
return GetRepository().UpdateExcl... | 1 |
0dfe6512879efe9fc3c042626c72b500 | 15c11128d6e1ad6cdef479d279ddedb7 | Remove outer single quotes on strings, if any ('foo bar' --> foo bar) | if (value.length > 1 && (value[0] === "'" || value[0] === '"')) {
value = value.substr(1, value.length - 2);
}
return value;
} | 1 |
8e28189203c7eb7c31e2bce8b437a2ae | 4c2e7fd803b5a12a5fae06f0b90823b0 | 设置服务器配置,包括端口、TCP选项等 | class swoole_server_port
public function set(Array $settings)
{
} | 1 |
c74ee01c4390ade3bfa8ed0ceb6c2593 | ae2c1cab8f7b3740d401e29fc88f950f | method to perform bidirectional A* search | setup(nodes);
vector<Node*> openSet;
openSet.push_back(start);
map<Node*, Node*> comeFrom;
start->setGScore(0);
start->setFScore(heuristic(start, end));
while (!openSet.empty()) {
Node *current = getLowestFScore(openSet);
if (current == end) {
reconstructPath(comeFrom, current);
end->makeEnd();
runn... | 0 |
fb781f008780d49e40b8c96bcd6c0989 | e6759badb7821a5251e278879d829102 | 弹出对话框,提示用户跳转到授权界面 | val builder: AlertDialog.Builder = AlertDialog.Builder(this)
.apply {
setTitle(resources.getString(R.string.app_name))
setMessage(resources.getString(R.string.permission_message))
.setPositiveButton(resources.getString(R.string.go_to_setting)) { _,... | 1 |
10f24214951401c30878326c7042e37f | 107c03edf1a75d0779d4866210802ac7 | Subscribes the caller to receive snapshot updates for the specified tag names. | namespace DotNetCore.Api.Areas.WS.Data
public class RTDataProxy : IRTDataProxy<TagRawData>
public void Subscribe(List<TagSubObj> lstTag)
{
this._dataSource.Subscribe(lstTag);
} | 1 |
ec23aa1362e7c8b84ce5bc1955269e04 | 505dd7f796ac3235fe7adf74b619a55f | Determine onsets of EMG pulses.
Follows the approach by Solnik et al. [Sol10]_. | import apCode.SignalProcessingTools as spt
import numpy as np
import matplotlib.pyplot as plt
ker = spt.gaussFun(np.arange(2*ker_len),mu=0, sigma=1)
ind_max = np.argmax(ker)
ker = ker[ind_max:int(len(ker/2))]
ker = ker/np.sum(ker)
x_ker = np.convolve(np.abs(x),ker, mode = 'full')
x_k... | 1 |
077471e41c9bc14eb781a7046d90c63b | 64ccbfc3761f75e3036998ed18258c52 | System.Boolean System.Nullable`1<System.TimeSpan>::Equals(System.Nullable`1<T>) | {
{
Object_t * L_0 = ___other;
if (L_0)
{
goto IL_0010;
}
}
{
bool L_1 = (bool)(__this->___has_value_1);
return (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
}
IL_0010:
{
Object_t * L_2 = ___other;
if (((Object_t *)IsInst(L_2, IL2CPP_RGCTX_DATA(InitializedTypeInfo(method->declaring_type)->rgc... | 1 |
0a3948b0524e161ac694d7a294340580 | 57f9552cd7d671e836dd2cfeb524cdb5 | Declare record entity structure. | MOD_USE(Core);
CLS_Record = makeCoreClass(SYM(Record), CLS_Core,
METH_TABLE(
CMETH_BIND(Record, new)),
METH_TABLE(
METH_BIND(Record, castToward),
METH_BIND(Record, cat),
METH_BIND(Record, crossEq),
METH_BIND(Record, crossOrder),
... | 1 |
3c904712f70c7ee6833ef3ea20130423 | 74fc54e1b46c904840cb4068fc266fef | 放缩所有地图 | namespace MapWinGIS.Interfaces
void CollapseAll(); | 0 |
746829d4b932605fa3118c39fa19d3b9 | c44013dcf418bfdec0a6951a2a82530c | 获取提现完成时间 | class UserDepositRecord extends Model
public function getPaidTime()
{
return $this->__get(self::PAID_TIME);
} | 1 |
a4822f5a4855642872b1e95a7d41d038 | 13ee124a6cc2da90e4a226e3c30dc48b | remove the current menu on the screen | public class MainMenuController : MenuController
public override void RemoveMenu()
{
RemoveUI(mainMenuUI);
} | 1 |
7c23f14516c257c82922aa0ce0410f0a | 872d9f9c0734b94f6c64f86849e68d20 | Call API endpoint to fet list of pools, execute callback if present on success | const results: PoolTransaction[][] = []
const factory = new this.web3.eth.Contract(this.factoryABI, this.factoryAddress)
const events = await factory.getPastEvents('BPoolRegistered', {
filter: {},
fromBlock: this.startBlock,
toBlock: 'latest'
})
let promises = []
for (let i = 0... | 0 |
5cd440bb862997fb84e54d0ea638ab56 | 75d050c8bdc872d3bdbaa1776feda8f4 | 首付款发生变化时,修改合同总额 | @Service // 必须导入dubbo的注解
public class ContractProductServiceImpl implements ContractProductService{
@Override
public void update(ContractProduct contractProduct) {
Double amount = 0D;
if(contractProduct.getCnumber()!=null && contractProduct.getPrice()!=null){
amount = contractProduct.get... | 1 |
8c573a7c207fbf54c1c5806b843ce94e | eb7e617cff185dab787847cb143f7229 | img: numpy array, 1 - mask, 0 - background
Returns run length as string formated.
If index_offset = 1 we assume arrays start at 1. | pixels = img.T.flatten()
pixels = np.concatenate([[0], pixels, [0]])
runs = np.where(pixels[1:] != pixels[:-1])[0] + 1
runs[1::2] -= runs[::2]
return " ".join(str(x) for x in runs) | 1 |
d018691e26eecc5d6c85caf45c02859b | d12ebbe5a3e5cd94a76c8705732dad1c | 根据商户产品多个ID修改对应产品mp_show状态为status | class BMergeOrderController extends BusinessbaseController
public function update_product_status($merge_id,$data){
$productid=$this->bmerge_order_model->get_pruductids($merge_id);
if($productid[0]>0){
if (count($productid) > 1) {
$a_c_map["id"] = array("in", $productid);
... | 1 |
2f1d9a012d271a007230fe18c73e49e2 | b2bd27770f7044340b33bc6535b744e1 | 如果该对象是null,则执行action | namespace Common.Extensions
public static class ConditionalExtensions
public static bool IfNotNull<T>(this T source, Action<T> action)
{
if (!source.IsNull())
{
action(source);
return true;
}
return false;
} | 0 |
22d2e9dde98b73f1fc8c69f05756c70f | de763183ad7628f02366c5f86c16d423 | Кнопка закрытия программы в окне предупреждения. | def close():
if messagebox.askyesno("Выход","Выйти из программы?"):
root.destroy() | 1 |
0ec131584b2732de0e8b25ed869944f6 | f6846efc055dbd92cd8165a55b281734 | Were the current project changed? If so, save it before. | {
if ( this.projectManager == null )
{
return false;
}
return this.projectManager.getCurrentProject().isChanged();
} | 1 |
6c788ecd939191671977c756ae92026c | 528da3d924b41390f243ee2c377f6288 | 模拟所有用户做了所有关卡 | class oop
public function simulate1UserDo1LevelUntialPassed(){
$html = '
<html>
<head>
<script type="text/javascript" src="../../../../libs/jquery-1.4.2.js"></script>
<script type="text/javascript">
var level = 1;
var accuracy = 10;
var start = function(){
$.ajax({
type : "po... | 0 |
59a63b2945d4fece874fb723a281c96a | 40689dd33021f2978e0b5a637f79c156 | damage unit with "dmg" vector2 such that wounddamage and damage are increased. eg. (wounddamage,damage) | public class Tactics_Master_List : MonoBehaviour
public int get_DamageMed(UnitCore CallingUnit){
return (int) (CallingUnit.health * Random.Range(0.2f,0.5f));
} | 0 |
5e0de9e587aeeb1c8a8ba12d69356605 | 08d6b61af441376848fae88cc74b1473 | Checks that twiggy has been setup for use. | {
$mockTwig = $this->mockTwig();
$unit = $this->getMockBuilder(TwigAwareTrait::class)
->getMockForTrait();
$unit->setTwig($mockTwig);
$this->assertSame(
$mockTwig,
$this->callProtectedMethod($unit, 'twig')
);
} | 1 |
d84edd671bc8f352166e6ff0a3d71b75 | 6f95530caaa4133935b91c03389d72a2 | Brush-specific handling of GraphicsReady event | {
m_GraphicDirty = true;
if (p_OnlyGraphics)
return;
m_Dirty = true;
} | 0 |
18a58cbeffeadde415c299d1b79b42ea | 0426ed66cd49fbdfe0790aba703b500d | Pass the current action descriptor to the AuthorizeCore
method on the same thread by using HttpContext.Items | namespace DispatchApp.Utilities
public class ManagementCustomAuthorization : AuthorizeAttribute
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
return base.AuthorizeCore(httpContext);
} | 0 |
78ad27bfd6b4e4f11823ea04b29549fd | 8dcddb8dff2ce572618715c76e7bb606 | Devuelve el mundo al que se llega al avanzar a la derecha. | if (col+1 < TAMAÑO_MUNDO) {
return espacioMundo[fila][col+1];
}
return 0;
} | 1 |
272ea3121f087e19a1d759c5f388ca32 | 5d121210d02d10ae1554834ec0036dfa | Sprawdzenie akcji usunięcia zasobu z wniosku. | {
$typWniosku = $wniosek->getWniosekNadanieOdebranieZasobow() ?
TypWnioskuConstants::WNIOSEK_NADANIE_ODEBRANIE_ZASOBOW :
TypWnioskuConstants::WNIOSEK_UTWORZENIE_ZASOBU;
return $typWniosku;
} | 0 |
a96b29459fd6e22124bdf1d72e29bfa8 | 4dab52621c36f4a495c239d42397c3c9 | Permet au joueur d'aller en bas | class Hostile extends Phaser.Scene
goDown() {
if (!this.alreadyCrossedDoor) {
this.botleftdooropen.destroy();
this.botrightdooropen.destroy();
var levelToGo;
if (this.currentPosition.whereIsBoss === 'bot') {
levelToGo = 'level' + this.playerStats.L... | 1 |
19044be9b4d93e265ed715f6d7cb1c54 | cd3ac8ca68e537625d451404c6a6e1d6 | 开始打包热更dll | public IActionResult UpdateAdmin([FromBody]List<string> list)
{
var dllRemoveList = AppDomain.CurrentDomain.GetData(UrlStarupHelper.DllName) as List<string>;
if (dllRemoveList != null)
{
foreach (var item in dllRemoveList)
{
... | 1 |
96cf365e53d2b607b3917a4d4179f019 | 159c69a3598e09930d6e258613df26c8 | SLEEP - Causes the agent to sleep once. Time must be in seconds. | MSG *p_msg;
p_msg = get_msg();
p_msg -> type = MSG_SLEEP;
p_msg -> recv_pid = TASK_INIT;
p_msg -> int_info[0] = seconds;
return send_msg(p_msg);
} | 1 |
d69ab5ce664aeae5a3e50c5d0ca611ea | 2329094dc1d007cc2acb17b745af3e50 | Saves all loaded arenas to file. | {
try
{
FileWriter writer = new FileWriter(FILE_PATH);
for (Arena arena : reducedPermutations)
{
writer.write(arena.toString() + System.lineSeparator());
}
writer.close();
}
catch (IOException e)
{
e.printStackTrace();
}
} | 1 |
5ccbedecc7ada2b965c8f021e30f6dcb | 71183bb1925eacc1100df4600a50c1e9 | Prevents a core dump. | {
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
RaiseException(0x77777777, NULL, 0, NULL);
return 0;
} | 0 |
eca58ce2c245715438cb9e7de49d5d5c | f1dcf1967116a547356369d58c924b3f | 获取共享内存的文件描述符 | int get_shm()
{
return comm_shm(0,IPC_CREAT);
} | 1 |
38053a6513174032b9280acc6749c1d4 | af3302194b801f9443087003a4b4c042 | The package that is accessing the permission protected data. | class DatasetAccess(dict):
def role(self) -> Optional[str]:
return pulumi.get(self, "role") | 0 |
85076a99183440e84132ff397dc770bb | be45111bc5f92ef1063692c8afc2eac9 | 例子 求1到100的和 | function a(){
var num=0
for(var i=100;i<=200;i++){
num+=i
}
return num
} | 0 |
b1541edb6e0495725ce98f06a87e832c | c2ca9a4af60f3d762c71a16e58ae4744 | Initializes UpdateContact parameter list. | namespace Google.Apis.Doubleclicksearch.v2
public class ConversionResource
public class UpdateRequest : DoubleclicksearchBaseServiceRequest<Google.Apis.Doubleclicksearch.v2.Data.ConversionList>
protected override void InitParameters()
{
base.InitParameters();
} | 0 |
ba45db384adbcdfc0d7e4066d61d2dad | 07716819d54e0bd802b6a8ad55c19704 | Creates a new GuiScreen instance. | {
_playButton = new GuiButton(new Vector2(0F, 0.2F), 0.3F, 0.2F) { BackColour = Color.Transparent, Anchor = Anchor.TopMiddle };
_highScoreButton = new GuiButton(new Vector2(0F, 0.45F), 0.3F, 0.2F) { BackColour = Color.Transparent, Anchor = Anchor.TopMiddle };
_quitButton = ne... | 1 |
ca52ee60680243c60c52ef443ea4edd5 | a99a63f1f7eae9abde815e4580760053 | given the 3D array of log expected-state transition counts across the time
span, ln_xi, and the 2D array of log expected-state-occupancy counts,
ln_gamma, compute the implied log likelihoods of transitioning between the
states | gamma1 = tf.exp(log_gamma1)
gamma2 = tf.exp(log_gamma2)
t1 = tf.reduce_sum(gamma2[:, 1:, :, :]
* (log_b[:, 1:, tf.newaxis, :]
+ log_a[:, 1:, :, :]),
axis=[1, 2, 3])
gamma1_1, log_b1 = gamma1[:, 0, :], log_b[:, 0, :]
t2 = tf.redu... | 1 |
f74e821697ea007da28faa665f988d14 | 2e1f1a33bb7ba7f622d62fa1db096594 | Call field-specific functions after value is set to avoid conflicts | class Moy_Form_Field
public function __call($name, $args)
{
if (strpos($name, 'render') === 0) {
if (method_exists($this->_control, $name)) {
$this->_control->setValue($this->_value);
call_user_func_array(array($this->_control, $name), $args);
}
... | 1 |
22e924ee376a9460c791121d6cfdcbb1 | a776c475f72abccf549eb9e54d28717e | Retrieve time pattern that will be visible in the UI | class TimeType extends AbstractFieldType
public function buildView(SearchFieldView $view, FieldConfigInterface $config, array $options)
{
$pattern = 'H';
if ($options['with_minutes']) {
$pattern .= ':i';
}
if ($options['with_seconds']) {
$pattern .= ':s';
... | 1 |
370cc89d0edf8b00ef1e16a4dc1814c7 | 2a71053d57a59ef3d6badc03b545c516 | Whether the element is completely out of the view of any of the containers. | if( !element.IsVisible )
return false;
Rect bounds = element.TransformToAncestor( container ).TransformBounds( new Rect( 0.0, 0.0, element.ActualWidth, element.ActualHeight ) );
var rect = new Rect( 0.0, 0.0, container.ActualWidth, container.ActualHeight );
return rect.Contains( bounds.TopLeft ) && rect... | 0 |
56407d1aa944121be1a2c4bfd521e196 | 42141b697becaefec205b45e422ebc13 | Enables Rules to be defined in terms of variables that are defined later on.
This enables recursive rule definitions. | public Object visit(final Rule obj, final Object arg) throws RIFException {
final Set<RuleVariable> declared = new HashSet<RuleVariable>(obj.getDeclaredVariables());
if (!obj.getDeclaredVariables().isEmpty()) {
final Set<RuleVariable> used = obj.getHead().getVariables();
if (obj.isImplication()) {
used.a... | 0 |
7f39f2981e9bb60bc99aba578e147a23 | 238b4a7dcbf4c0b7aeeda0968ce1a249 | Show the RGB and depth images. | def vis_segmentations(im, im_depth, labels, labels_gt, colors):
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(221)
im = im[:, :, (2, 1, 0)]
plt.imshow(im)
ax.set_title('input image')
ax = fig.add_subplot(222)
plt.imshow(im_depth)
ax.set_title('input depth')
ax = fig.add_subplot(223)
... | 1 |
3910e2044cd4cea98c26b550970468d1 | ca6e62d7364bc7b1df66b7c29b48a46b | 异步获取销售记录 | class EC
public function getSales($data)
{
$response = $this->client('post', 'sales/getSales', $data);
return $response;
} | 0 |
2f92c8fad47bcb3825d65127af59e2dc | 1a71d22aafcd365ca3e1b89aaa718895 | Serialize an EzSecurityToken | final class LockToken implements \JsonSerializable
public function jsonSerialize(): array
{
return [
$this->resource,
$this->type,
$this->users,
$this->getValidity()->getTimestamp()
];
} | 0 |
08bee6ed5fe812a25b4d22c4a2a7ce14 | f87201d92a22f2820fe4e06ddb223d55 | returns true if trees
with roots as root1 and root2are mirror | bool isMirror(node* root1,node *root2)
{
if(root1==root2)
{
return true;
}
if(root1==NULL or root2==NULL)
{
return false;
}
return ((root1->data==root2->data) and isMirror(root1->left,root2->right) and isMirror(root1->right,root2->left));
} | 1 |
3c0d9df59c08b6723a4a7f36388a93ba | e73585fe97430ba9c77c6cebf6b0e34d | Returns the user signup object from the current code | {
SignupInfo signupInfo = new SignupInfo();
signupInfo.SignupId = (int)session[Globals.SessionSignupIdStr];
signupInfo.IdNumber = (string)session[Globals.SessionUserUIDStr];
signupInfo.SignupName = (string)session[Globals.SessionUserNameStr];
return signupInfo;
} | 1 |
ff027f9af5825fe6af4434ffd3af9037 | 0f79bfda36433a0db267e9fdc9f0c338 | 重新加载表格数据,从第一页开始查询 | export default class TalkerSortWeight extends React.Component
refreshTable() {
var that = this;
let queryCondition = this.state.queryCondition;
that.setQueryCondition({
pageNumber: 1,
pageSize: 10,
searchText:"",
searchTextField:""
});
... | 1 |
38b876e019d0769bac5d36a80d689475 | 4387ee7c4a3e65bf0ab3741ce6510d4d | Removes an employee skill record | {
$boolResult = $skill->delete();
if($boolResult){
$successMsg= 'Record Successfully Deleted';
return $this->jsonMessage('OK',$successMsg);
}
} | 1 |
90aaeb30208a48e952e01472572f5486 | 22379a12c97f63ceb085574064e06906 | Verifica si un joystick regreso al centro despues de ser movido. | {
CircleExercise actualMov = CircleExercise.INPROCESS;
Joint handLeft, handRight;
Point actualHandPointLeft, actualHandPointRight;
double AdmittedError = ErrorTypeToDouble()*100;
handLeft = received.Joints[JointType.HandLeft];
handRight = r... | 0 |
fcdef9cdf594667530fcd681ccf4f179 | 2c10bd4f3c375ae40fcbf2b49f39986e | 计算最多能将方块下落的高度 | let count = 0;
let times = 0;
let ball_height = 0;
while (h * bounce > window) {
h = h * bounce;
count++;
}
times = 1 + count * 2;
return times;
} | 0 |
291ee73778cc98805972ab1c64eda7f6 | 07749d285f4b902070b44c8af6758eb3 | Method that takes in account name and return credential object that matches that account name | for credential in cls.credential_list:
if credential.account_name == account_name:
return True
return False | 0 |
278b96536cd21ad76efe6dedfdd319ec | 8fdcb5df0a71ec3272c70661f99a8534 | Retorna si tiene movimiento en el eje X | bool MPU9250::getXPosMotionDetected() {
i2c_readBit(devAddr, MPU9250_RA_MOT_DETECT_STATUS, MPU9250_MOTION_MOT_XPOS_BIT, buffer);
return buffer[0];
} | 1 |
3ae641193fbcdacfd189ccd03b8b5b55 | 9c34e491622b7c82655f560c2f69aba0 | 获取/更新登录超时时间 | checkAndUpdate(req, res, next) {
let reqToken = req.headers['x-access-token']
if (reqToken) {
Token.findOne({
token: reqToken
}, (err, result) => {
if (err) {
console.log(err)
res.json(setErrorRes('查询数据库出错'))
}
if (result) {
let now = Dat... | 1 |
2ed300567db077adeea4ba74171197ab | 09b21984c258ff7df4b7bc0ab105da64 | 根据PricePref.txt文件,根据需要加入的先验知识的比例,获得U0和Gu | {
Presolution pre = new Presolution();
DataTable temp = new DataTable();
temp = ddd.Copy();
pre.Plot5(temp);
SaveTemp(temp);
if (tt)
{
for (int i = rawStartLine; i < temp.Rows.Count; i++)
{
... | 0 |
1ca5d996bad64c4f785bf70a6446ae67 | 1946099cd38d42751fb8e90c053b4b19 | This module sets the variable containing a single test to execute. | def set_run_this_test(args):
global run_test
if len(args[0:]) > 0:
run_test = args[0:] | 1 |
1d0e3ad9d2f739d8db32b8c0b616e94f | d3a9bccdd55bd76c0756cf9abf5a18dc | Returns Url records that have been crawled. | class url extends \core\persistent
public function get_processed() {
global $DB;
return $DB->get_field_sql("
SELECT COUNT(*)
FROM {tool_crawler_url}
WHERE lastcrawled >= ?",
array(crawler::get_config()->crawlstart));
... | 0 |
0b328ea4f2bea4a5ac7dcfff973c45fe | 857f2bfe1650ffe9465942c2f778ee21 | 根据名称和快捷键创建menu并添加到menuBar | public class MenuManager implements ActionListener
public JMenu createMenu(String menuPath, String menuName, char menuMnemonic, String desc, int pos) {
return (createMenu(menuBar,menuPath,menuName,menuMnemonic,desc, pos));
} | 1 |
c64b16c9c1db70036414382c42ca005b | 285cd81bc53a8b31e2be3c9edc63cbb7 | Parse a primary alert. | class AlertFactory
protected static function parseAlert(AlertInterface $alert, array $args): AlertInterface {
$alert->setContent(ArrayHelper::get($args, "content"));
$alert->setDismissible(ArrayHelper::get($args, "dismissible", false));
return $alert;
} | 1 |
cfa2b8b9e77075fbb80c01d6bbe2d1b9 | db64fccef9f32bbe440eb6e8c3a289db | ##명령실행(아이핀 인증키 호출용) | exit;
$id = 'hsjjks@naver.com';
$subject = "계좌주검증";
$url="https://v5.paygate.net/v5/transaction/seyfert/checkbankcode";
$this->seyfertinfo = $config = $this->db->query(" select * from mari_config ")->row_array();
$_method = "POST";
$nonce = "bnkvn" . time() . rand(111, 999);
$refId =$nonce = "bnkvr... | 0 |
afe7b957459c7e77ff7234cac03b8dd1 | c8d6b11132df3bb483c26d6230dc03cb | Method to calculate an orders gross profit value and gross profit percent | def profit_as_percent(gross_profit_value, net_price)
@profit = (gross_profit_value/net_price)
if (net_price <= 0)
@profit = 0
end
return (@profit * 100).round(2)
end | 0 |
ee2fe9668482038f9978a6fc0ef18a18 | 6f94d4f1df6c55c63099786d326ec8e9 | Destructor cho danh sách thí sinh | {
List delete = L , tmp;
while (delete != NULL)
{
tmp = delete->next ;
free(delete->element.studentName);
free(delete);
delete = tmp;
}
} | 1 |
9f8436f686737a97fa20e0f885068b66 | 16ee0fc413d609e5376935312d7e3695 | Get Coupon Status | {
$result = $this->db->select('status,count(1) as status_count')
->where('coupon_id', $id)
->group_by('status')
->get('coupon_data')
->result_array();
return $result;
} | 1 |
9d471e055c435a5610e5875f5515477e | 3c6dfad9aabe4bcfbd88a75c1af0e9ca | Called before <see cref="Actions"/> has been changed. | namespace CADability.Actions
public abstract class Action : ICommandHandler
public virtual bool OnEnter() { return false; } | 1 |
9b4be5e13a8eb51a2fd36abf6aff7438 | 992c27777d99edd2b57edea1ff70f980 | Puts an end to the transition and activates the trigger previously specified. | namespace HalloweenControllerRPi
void TriggerEnd(Function func); | 1 |
6834c13f30d4746ad379f5d916476557 | 2dd8aada57afeebc4b3d1c19abafc6c4 | 将用户级别储存在全局的SESSION中 | if(!isset($GLOBALS['user_level'])){
$user_level=F("user_level");
if(empty($user_level)){
$user_level=M("user_level")->getField("id,name,img,min,max");
F("user_level",$user_level);
}
$GLOBALS['user_level']=$user_level;
return $user_level;
... | 0 |
e207b0f00399470ebfbc75303bf232fa | 28f7066097109d0a9fa67cfc7178b369 | Function that allocates a 2D array of ints and returns it | float **Ary2D = new float*[m];
if(Ary2D==NULL){cout<<"No memory!\n";exit(1);}
for(int i=0;i<m;i++){
Ary2D[i] = new float[n];
if(Ary2D[i]==NULL){cout<<"No memory!\n";exit(1);}
}
return Ary2D;
} | 0 |
9e50c0d78986aa182898c23caefc5f05 | f4ca905c1ebb73e57a342e62f324e7b1 | 注册时更新用户孩子姓名 | Mvv\mvvLogin::check(self::role_name, function ($userinfor) {
try {
$param = $_POST;
$steps_id = $param['steps_id'];
$child_name = Model\x5on::getLike($param['name']);
$result = Mvv\mvvRegGroup::stud($userinfor->unionId, $steps_id, $child_name);
$this->json(['code' => 0,... | 1 |
751bf3169f021cbbfa2ecc8c939d4e47 | 5d9dc97a513ef236429d0d4807954426 | 从字典中移除某个道具 | public class AbsActor :MonoBehaviour,IDynamicProperty
public void RemoveProperty(int id)
{
if (DicProperty.ContainsKey(id)) DicProperty.Remove(id);
} | 1 |
6b7a849a55ab7fc2158d93d6701e94d4 | 8762f4f5552223dacf5514067e3b24a1 | Get and print the node specified by FILENAME and NODENAME to STREAM.
If DUMP_SUBNODES is non-zero, recursively dump the nodes which appear
in the menu of each node dumped. | Targ_PrintNode(GNode *gn, int pass)
{
debug_printf("# %s%s", gn->name, gn->cohort_num);
GNode_FprintDetails(opts.debug_file, ", ", gn, "\n");
if (GNodeFlags_IsNone(gn->flags))
return;
if (!GNode_IsTarget(gn))
return;
debug_printf("#\n");
if (gn == mainNode)
debug_printf("# *** MAIN TARGET ***\n");
if (pass... | 0 |
11057d28b5d11256842cfd164bca0439 | f049d5a5fe0602e613c8ddf10ab38cae | Ein Intent für alle "Unhandled requests". Er informiert darüber,
dass der Skill die gewünschte Funktionalität nicht besitzt und beendet ihn. | class UnhandledIntentHandler(AbstractRequestHandler):
def handle(self, handler_input):
speech = "Say yes to continue or no to end the game!!"
handler_input.response_builder.speak(speech).ask(speech)
return handler_input.response_builder.response | 0 |
ece88b3a5c76690e1c40c408d9a14f63 | 09d8c70988cacf042a787bb5c5ccb5cf | whether object uses an automatic line style | class ControllerConfigurationArc(c.ControllerConfigurationComponent):
def auto_line_type(self, state):
self._auto_line_type = state | 1 |
35213c64db08109d8ebebaf37c2ca387 | 0070e32ecd0b6b42ca0ad9b75c65f1c2 | 如果这个特征已经是唯一的,不可再分 | if self.isLeaf :
if len(set(lable_list)) == 1:
self.lable = lable_list[0]
else:
lable_count = {}
for one_lable in set(lable_list):
lable_count[one_lable] = lable_list.count(one_lable)
max_count = max(l... | 1 |
2e22a2c94b69b0838edf393731aef21b | 9ca3086e6ffc2f2845e782f54b25b64d | Search the spotify API for the given song | with aiohttp.ClientSession(headers=self._headers) as session:
async with session.post(SONG_REQUEST, data=json.dumps({"song": song_id})) as response:
requested = await response.json()
return requested["success"] | 0 |
9fb8b799e327ad5caf6733f56a997acf | b9a9f028183177c54e3751d6213a66d2 | 增加一个直接显示评论内容的函数( object==>str ) | class Movie_comment(models.Model):
def __str__(self):
return str(str(self.username) + '_' + str(self.movie_id)) | 0 |
717dd0b501f81d22d4eed3b722100830 | a0a4b47abe9becc23eff99ca9a19f024 | 保存未审核的用户 | @Service
public class UserService
@Transactional
public void saveUnregistered(UnregisteredUser unregisteredUser) {
this.unregisteredUserRepository.save(unregisteredUser);
} | 1 |
62f8b6d003add31906e3b560451a0fa5 | ed1fc874f15abed8f3378cfc2ce6f0cb | Доподписание всех типов документов и сообщения под пользователем с второй подписью | public class TestScenario
@Test
public void testAllDocsSecondSign() {
robot.delay(5000);
m.openAndEnterIFobs(d.Login2, d.PasswordUser2,
d.PasswordKey2, d.Folder2);
int x1 = d.UAHamt;
while (x1 > 0) {
m.signingDocUAH(d.docnoUAH, d.UAHaccountA, d.Folder2, d.... | 1 |
912a72d52570aa130c14436c54a47379 | 509987179fb649d15fa5546a2c081020 | 返回 RabbitMQ 端口 | public class RedisSessionModule extends ConfigurableModule<RedisSessionModule.Config> public static class Config
public Integer getPort() {
return port;
} | 0 |
64de17b458e8f7e103eedae9c9eb1f45 | 1155fce5727f0fc9e320af8d32a8fb0c | Retrieve an Agent Pool update by id | namespace Okta.Sdk.Api
System.Threading.Tasks.Task<AgentPoolUpdate> ResumeAgentPoolsUpdateAsync( string poolId , string updateId , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); | 0 |
b9e27435347a73aaf3ff508714d87007 | b56bdc95f002fa117ad5ef27a8ae3c32 | Evaluate per-page fingerprints. | fingerprint = []
for i in np.arange(df_comp.shape[0]):
mock = df_comp.iloc[i,:].nonzero()[0]
df_comm = pd.DataFrame()
for idx in mock:
df_frac = concat_rep(path_data, list_filenames, idx, df_comp.iloc[i,idx], n_cells, n_rep)
df_comm = pd.concat([df_comm,df_frac]... | 1 |
7e453a3fb80c933c512265f64c83c810 | 7a375ce748960bd62cedccb48dbff486 | Cancels this import. | export default class Importer
requestCancelImport() {
this._importCancelRequested = true;
} | 1 |
a3ed845668d01165638ad57783a815e9 | bf79fe68e7c87c2bba138648722101be | Update the state after searching people by manuscripts | def update_list(request):
global search_ids
username = "::ERROR::"
filter_value = False
skip = True
if request.method == "POST":
my_form = AuthorSearchForm(data=request.POST)
if my_form.is_valid():
username = unidecode.unidecode(my_form.cleaned_data['username'])
... | 1 |
dd7686cac242e3a657ecd0779ae0f26b | a65cc6098910da683b59f6b33886f59d | Focus on the next object in the group | void lv_group_add_obj(lv_group_t *group, lv_obj_t *obj)
{
if (group == NULL)
return;
if (obj->group_p) {
if (lv_obj_is_focused(obj)) {
lv_group_focus_next(obj->group_p);
LV_LOG_INFO("group: assign object to an other group");
}
}
obj->group_p = group;
lv_obj_t **next = lv_ll_ins_tail... | 1 |
a1e2ce1c30767b4e92cd90e8f0423e0c | 435ac056851a126acf7d4918537715d9 | 某个tag推荐作品列表 | public final class NetApi
public static String getRecommendData(int tagId) throws Exception{
ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("tag_id", String.valueOf(tagId)));
params.add(new BasicNameValuePair("has_count",String.valueOf(0)));
params.add(new Ba... | 1 |
5889620bf78a409a238a51569b74f359 | 94adee9ca1a2093eceb814641cedbcbb | 将视图模型转换为EF模型 | namespace Enterprise.Framework.ORM.EntityFramework.BasicTransform.Impl
public class BaseAutoTransform<TDataModel, TViewModel, TKey> : IBaseAutoTransform<TDataModel, TViewModel, TKey> where TDataModel : BaseEntity<TKey>
public TViewModel DataModelConvertViewModel(TDataModel DataModel)
{
Mapper.Cr... | 0 |
b67106ef2fb83674eaa21cfd8de0c252 | 0367f818758d41d59a5977038e50b214 | creates new bucket lists for the current user | data = {'list_name': 'Travelling'}
resp_bucketlist = self.app.post('/api/v1.0/bucketlists/',
data=data, headers=self.get_header())
if resp_bucketlist.status_code == 200:
return True
return False | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.