query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
73f8ec3bb3c951b52eec963edcaf7720 | 4d4fd2647bf841b93c96719d6def3dfd | Undo the last accept or reject action (pop off of the stack), and update state information | namespace Textile
public partial class TextileFormatter
private void PopState()
{
m_stackOfStates.Peek().Exit();
m_stackOfStates.Pop();
} | 1 |
f0df9262cebef66aca452b33b89ccadb | 32a80aeee4e44b6b1ff34fe00f39cb7a | 转化日期 转出格式YYYY-MM-DD | function timefmt(value){
return value?moment(value).format("YYYY-MM-DD"):"";
} | 1 |
5352896ca86c8c4da906006c4b5cd4a0 | 441770794c114672959ff10926cc36da | Calculates the 'disc id' of a CD for submission or retrieval from a CDDB database | class Net_CDDB_Disc
function getDiscId()
{
return $this->_discid;
} | 0 |
c93b4036bd45983a394befde3bf6500c | dd76c25bd06a9cf4f6c2a793c15ad3c9 | 功能:创建指定application的app_form Sections
说明: | {
if ($applicationName == ''){
$curlURL = "{$this->apiEndPoint}{$this->format}/{$this->applicationName}/formsandviews?authtoken={$this->authToken}&scope=creatorapi&zc_ownername={$this->applicationOwner}";
} else {
$curlURL = "{$this->apiEndPoint}{$this->format}/{$applicationN... | 0 |
31753b83c63536cd174ef382d3c3acc9 | f6bdfacf3b06ff09eb39e69b8231697c | Returns all service checks. | class PingdomApi
public function getChecks($limit = NULL, $offset = NULL) {
$parameters = array();
if (!empty($limit)) {
$parameters['limit'] = $limit;
if (!empty($offset)) {
$parameters['offset'] = $offset;
}
}
$data = $this->request('GET', 'checks', $parameters);
return $... | 1 |
6f7c2462efbd56488f35ffe140c11e47 | af1d281b3fe6b1f1473ed2cd612e7f3b | 福分收入统计 | class FreportTotalService
public static function getMonthCffIncome($year,$startMonth,$endMonth,$company_id=0,$select='*',$where=''){
$db = Zend_Registry::get('db');
$sql="select {$select} from ".self::$month_table." where fc_id in(18,19) and fcm_year={$year} and fcm_month>='{$startMonth}' and fcm_month<='{$endMonth... | 1 |
e9ba9d6101954f76036ce9a43f334365 | 867d960912d4b7fd4a86954bddfe0d72 | Fonction du thread T1 qui correspond au thread d'un client qui recoit un message et l'envoie a tout les autres client | void *traitement_send (void *param) {
char mess[MAX_MESS_SIZE] = "";
while (fgets (mess, MAX_MESS_SIZE, stdin) != NULL) {
mess[strlen (mess) - 1] = '\0';
send_message (mess);
}
pthread_exit (0);
} | 0 |
e53b780550bba874941db2b7522816a1 | eb1ebe86823abcec8ce04e5f04dd6642 | create model setting for 'convert row values' | for(var field in modelSchema) {
var fieldValue = modelSchema[field];
if(tblName === "task") {
if(field == "type") {
_.forEach(allFields, function(rowFields) {
var rawValue = rowFields[field];
switch(rawValue) {
... | 1 |
60092a440754c24cc43812a3c691212b | d6ace03d92ca51e73071556cd594ea13 | 将String转换成Double,如果转换失败则使用默认值。 | try {
if (!StringUtils.isBlank(str)) {
return Double.parseDouble(str);
}
} catch (NumberFormatException ex) {
if (logger.isWarnEnabled()) {
logger.warn(String.format("Parse %s to double fail, default: %f.", str, defaultValue));
... | 1 |
5685ff4175836df72a656ba1a89d5c3c | 78352c7ff78bac2a25b9c31a80a2f006 | Добавляем ребро в список ребер | class UndirectedGraphList:
def add_edge(self, y, x, weight):
if (y, x, weight) not in self.edges:
self.edges.append((y, x, weight))
counter = 0
for el in self.lst:
first_el = el.head.next
if first_el.value == y:
el.append((... | 1 |
6d6fbe2c4e976a410868effe6deb2171 | f9ad55aa8dcd6772eb5dccf996e864cb | fadd | int inst_ADDF(struct vm_context_t *context) {
BYTECODE_NUMERIC_OP(float, +);
return 1;
} | 1 |
99c2cd9303cd23f3ab310d161d29abb6 | 16aa8fa4c546514163092ff5a4d0fa43 | Creates an employee role you can then assign to employees. Square accounts can include any
number of roles that can be assigned to employees. These roles define the actions and
permissions granted to an employee with that role. For example, an employee with a "Shift
Manager" role might be able to issue refunds in Squar... | class Client extends \JoliCode\Forecast\Api\Runtime\Client\Client
public function createRole(?Model\RoleBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \JoliCode\Forecast\Api\Endpoint\CreateRole($requestBody), $fetch);
} | 1 |
81733399cb6bc0bf47a44c94adeffb70 | 957bbd90c9589dd6a5d7aede0d00d7aa | Scan name and allocate a shell principal with enough space in each field.
If enterprise is true, use enterprise principal parsing rules. Return
KRB5_PARSE_MALFORMED if name is malformed. Set *has_realm_out according to
whether name contains a realm separator. | bool_t
nfs_get_root_principal(seconfig_t *seconfig, char *host, caddr_t *rootname_p)
{
char netname[MAXNETNAMELEN+1], node[INST_SZ], secdomain[REALM_SZ];
rpc_gss_principal_t gssname;
switch (seconfig->sc_rpcnum) {
case AUTH_DES:
if (!host2netname(netname, host, NULL)) {
syslog(LOG_ERR,
"nfs_get_roo... | 0 |
5d98360e46cc6565fa3ced2d85ad85a2 | 32cb930dedc21aedce8891241c36b5a9 | 文字动画类名切换 | var _this = this;
var _textsArr = this.txtArr;
var _index: number = 0;
var _tween_text = egret.Tween.get(_textsArr[_index]);
_tween_text.to({ alpha: 1 },1000).call(textEffect);
function textEffect() {
_index += 1;
if(_index < _textsArr.length) {
... | 0 |
515a37cfe37f762f151b5c4bf342cb45 | 1325942ca3e7a7a3ceac6f73dbe1f244 | Decodes the JWT token and deserializes JSON payload to <typeparamref name="T"/>. | namespace Rocket.Surgery.Azure.Sync.Abstractions
T DeserializeToken<T>(string authToken) where T : IJwt; | 1 |
456904cef7277c0507e975f4e610bc90 | 7700c6e9895816a1c478cab2de3e1e1f | Appends messages from the specified context to the current context. | {
if (messages == null)
return this;
base.Messages.AddRange(messages);
return this;
} | 1 |
b882a7aa68e7c1e63f28e7bf48a70517 | 61314b69fd3dd9167b81a2e71e357802 | Initializes connections to the AWS SDK | self.sts: STSClient = boto3.client('sts')
self.ssm: SSMClient = boto3.client('ssm')
self.kms: KMSClient = boto3.client('kms') | 1 |
c8f975bfe4a896c2ab246efbfb22f4fb | 0f0e85f8b0862660269878798f042edc | Method to generate json text for time entry of redmine | time_entries = list()
for rminstance in rminstances:
if rminstance.team.all_people.get(user) is not None:
projects = rminstance.settings.projects_with_time
rw = rminstance.rest_wrapper
label = rminstance.label
user_id = rminstance.team.all_people[user]
... | 0 |
9a7e5bc73e6f101f5e4ba58af58a1399 | 8f0b67a61855f8d3cf8b940d46347a46 | Returns the depth-to-color mapping table. | {
const INT iHalfTableSize = ARRAYSIZE( m_DepthColorTable ) / 2;
FLOAT fGutter = 0.2f;
INT iTableIndex = iHalfTableSize;
FLOAT fStep = ( 1.0f - ( fGutter * 2.0f ) ) / iHalfTableSize;
for( FLOAT t = fGutter; t < ( 1.0f - fGutter ); t += fStep )
{
... | 1 |
e947f1aa08ece8671aad411867b9f0ff | c05930bc1b921f050dd674d6e7cee185 | Load a vec3 uniform | if (!GPU::isProgram(prg)) return;
if (uniformId >= maxUniforms) return;
memcpy(&(this->P->Programs[prg]->uni->uniform[uniformId]), &d, sizeof(glm::vec3));
} | 1 |
4555f5e491efcd9286c64e075ab7bdf1 | b872fc30e948ff893fbbc42e47c55e1d | 获得结构表中的数据 | void getStructData(TEMP_INFO* pTI) {
cout << "in C++, getStructData" << endl;
pTI->nChannelID = 110;
pTI->nAction = 2;
const char szName[128] = "self-define-event";
pTI->PTS = 1583378254787;
pTI->nEventID = 2345;
pTI->nPresetID = 43215;
pTI->nSequence = 54321;
pTI->nEventRelevanceID = 5432;
return;
} | 1 |
70b2e14d2fc15bc0836e7ba4ef524c54 | 29643ea5f28bdd0cf577c15d3de6da0c | Callback function for processing motor speeds | const mbot_motor_command_t *msg, void *user) {
mb_setpoints.fwd_velocity = msg->trans_v;
mb_setpoints.turn_velocity = msg->angular_v;
cmd_time = msg->utime;
} | 1 |
aedb0d736989980a7b2346f3bff576dd | e393a80fe379f35888453001bc7a16b6 | Retorna verdadeiro se o Refis do Distrito Industrial esta ativo | public boolean isQuintaAtivo(); | 0 |
44082f82f58376cf8a7a3e7ef3c2708e | bf299025e6d2ea7cbcf4c529f1469d59 | 反射获取MethodInfo并缓存下来进行调用。 | {
lock (lockhelper)
{
if (!_getPool.ContainsKey(pi))
{
_getPool.Add(pi, new DynamicMethodHelper(pi.GetGetMethod()));
}
return ((DynamicMethodHelper)_getPool[pi]).Execute(instance, null);
}
... | 1 |
a9b5ebf941eacb95482bb8731eaf5244 | 439b57152f1896036c6c0a7ba0d97a24 | Returns a list of message handlers in the structure
(message_handler,messager_filter)
Returns | namespace fwfwif
IJEFQueueMessenger[] GetMessengers(); | 0 |
fece8e21503ca01e495f1679e2c742e6 | e65eb1f15e05039a9e88aaafb10b2600 | Makes chosen button disable. | class MainActivity : AppCompatActivity()
private fun buttonDisnabled_decision() {
val button_decision: Button = findViewById(R.id.decision);
button_decision.isEnabled = false;
} | 1 |
a61c93c088ab7a2f4712b9bb6c8e030b | 1b1970d114857d4be1ad2f5505504167 | Checks that the correct error status is set when the end of the
input stream is encountered prematurely. | public void testEOF() throws Exception {
TrailerInputStream tis = new TrailerInputStream(new ByteArrayInputStream(
new byte[4]), 5);
IOUtils.toByteArray(tis);
} | 0 |
ad513db3021bb625d644cd10d8d609eb | 4739abb6effbc9b896b1685871edbabd | 获取我方玩家信息 | namespace NNewGuildBattle
void CCave::GetPlayerInfo (SCaveInfo& rInfo, CPlayerPtr pPlayer) const
{
if (!pPlayer)
return;
pPlayer->GetAllInfo(rInfo.sSelfInfo);
rInfo.eSelfSide = pPlayer->GetSide();
} | 1 |
7888ff8e4982810a39b08b6ff7ff2a82 | a83b826579c240b1337c6baa0cdf3589 | ローン申請を行う。 | public class LoanApplicationAction
public HttpResponse createLoan(final HttpRequest request, final ExecutionContext context) {
final LoanApplication entity = SessionUtil.get(context, "loan");
SessionUtil.delete(context, "loan");
final User user = SessionUtil.get(context, "user");
entity.... | 1 |
1e9ee7284764766b1c592e98cfe5da8d | 745d126c067dea4132716abacc257438 | 获取QQ信息,并下载其所带所有歌单 | def getQQMailInfo():
headers = {
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36',
'Cookie' : ''
}
nextPage = 'https://exmail.qq.com/cgi-bin/mail_list?sid=GakMxEIWM1OXe1YJ,7&folderid=3&page=0&topmails=0&loc=fo... | 0 |
bbc7e4eec9ddb172c50a818850fb8104 | ea1686e1422967959acd5a4f7fd0ad14 | 先按极角排序 | void sort_polar(array& buffer, point origin) {
std::for_each(buffer.begin(), buffer.end(), std::bind2nd(std::minus<point>(), origin));
sort_polar(buffer, 0, buffer.size());
} | 1 |
57e387924f18f3a98981832c473bae9c | 4836f350c6335981e5377de2ab70e8cd | initialize the sample rate converter - called at power-up and whenever sample rate changes | return &PCMSampleRateConverter{
b: make([][]int, numChannels),
dstSampleRate: dstSampleRate,
fn: fn,
numChannels: numChannels,
srcSampleRate: srcSampleRate,
}
} | 1 |
b56e392da944cb0f3279aa0bb0051834 | 71ea4e5ba835fa2be0f442792002ed9f | 删除收件人信息 | {
$id = intval($id);
if ($id){
$destroy = Receiver::destroy($id);
if ($destroy){
return response()->json(['status'=>200,'msg'=>'删除成功',]);
}else{
return response()->json(['status'=>-100,'msg'=>'删除失败']);
}
}else{
... | 1 |
58250c9cac1b0b72086beb92df2238c0 | cb01da40f019eaa6c0a01a3338c6c472 | # get baseline win rate for that character, not factoring in stage or mu | baseline.effectiveness <- function(col.name) {
sort(table(survey[[col.name]]), decreasing = TRUE)[1] / length(survey[[col.name]])
} | 1 |
ae2b716eb917bb4f5e0ddbac2b315d2d | 262b6b24d1df7879c3a38d21cb142a5b | 查出所有的员工和超级管理员 | public List<User> getAllUserAndAdmin(); | 1 |
221ac9d02dd96d58eb045e61fe57b57f | f7163caf2ebedd2da77c5c949a438c12 | Check for short open tag. | {
return it.hasNext() && ( it.current() != '<' && it.current() != '>');
} | 0 |
472ae73581310bf3266ca92f414b70f3 | 0d2c01b9c583f96460c494f808744efa | Sets the value of the VisibilityTimeout property. | public class QueueMeta
public void setVisibilityTimeout(Long visibilityTimeout) {
this.visibilityTimeout = visibilityTimeout;
} | 1 |
d65f88c7dcfa9954f28b11114a2df64b | 3ad6326d963989e7b82f01a9a5384a99 | Constructor for a stepper motor connected to a stepper motor driver.
The arguments are the number of steps per revalution, the pin on driver that
controls direction, and the pin on driver that controls the step. | stepMotor::stepMotor(int stepsPR, int dirPin, int stepPin)
{
SPR = stepsPR;
_dirPin = dirPin;
_stepPin = stepPin;
lastStepTime = 0;
shiftRegister = false;
pinMode(_dirPin,OUTPUT);
pinMode(_stepPin,OUTPUT);
} | 1 |
1f3bf75b6a7af0e1860a49061017dfa2 | 19d467b4d6432ac62f31d1924c04f0fd | Defines the player depends on the number of moves. | {
return (PlayerMove <= 3) ? 0
: (PlayerMove >= 4 && PlayerMove <= 6) ? 1
: 2;
} | 1 |
c3204f39834c831a3d8e109c49333fce | 211d8b1c8075cf76f736cf22e5f06c2d | Karatsuba multiplication. The product of |a| and |b| is stored in |r0| and |r1|
Note there is no byte or bit reversal because we are evaluating POLYVAL. | short *b1, short *a2, short *b2)
{
int i;
short t11[2*75-1];
short t12[2*75-1];
short t13[2*75-1];
short aa1[75];
short bb1[75];
short t21[2*75-1];
short t22[2*75-1];
short t23[2*75-1];
short aa2[75];
short bb2[75];
for (i=0; i<74; i++)
{
aa1[i] = a1[i+75]... | 0 |
0a08f874e5a3b5a5a7e5b224420e3cad | 536cbcc016e867ca9ddc13bc37df9288 | ToStringMapStringE casts an interface to a map[string]string type. | func ToString(value interface{}) (string, error) {
return MustString(value), nil
} | 0 |
c354db6d999d111fcbe5553e47ac7914 | dd54830355fc6a155b908abbb08fceaf | Removes the top-most card from the deck builder. | export default class CardCollection
removeFromTop() {
return this.pile.remove().element;
} | 1 |
55705b4f36fcca30d287e3ee53106de9 | b931c5d0857adf3eee63b9e810871376 | 这个功能相当于重新实现了一遍String的split方法 | @UtilityClass
public class RegexUtils
public String[] split(Pattern pattern, String content) {
return pattern.split(content);
} | 1 |
35742eddca886878cfc6913bf0b3e67f | c0a7b6f360237994d2be0da0dc3c3b17 | Indicate whether the concrete button supports the type "image". | public boolean isSupportedWebImage()
{
return this == PNG || this.isJPEG();
} | 0 |
303bbaa79cdacbb8c8ea6200ecbe4da2 | a3bcc349dd8382564dba909e255245e9 | View for hostel query in admin module. | class HostelController extends Controller
public function index()
{
return view('hostel::admin.hostel.index')->with([
'hostels' => Hostel::all(),
]);
} | 1 |
25652d1c732608765d7922c5adf8764f | 9205ac799a55d161269dfba4fd2af7d8 | Routine to write the coordinates out using FieldML hdf5 APIs | namespace gameswf
void write_coord_array(tu_file* out, const gameswf::array<coord_component>& pt_array)
{
int n = pt_array.size();
out->write_le32(n);
for (int i = 0; i < n; i++)
{
write_le<coord_component>(out, pt_array[i]);
}
} | 0 |
25cc385481b37843ccef98483c5b238e | 78f38fb6d3647527b285dd1f6ea0c38a | Set the path to the private key to use. | public class Account
public void setKeyPath(String keyPath) {
this.keyPath = keyPath;
} | 1 |
25d06ea90735b641d98f5f83f0656d3c | 569bfb040ee5b0d1aaa2ee3ad04c1682 | Start video capture mode on camera with given integer ID | interface CameraController
fun startCamera(cameraId: Int) | 1 |
6b98fcef6525fac4a46376a39e58b1cd | 5e992e305de45653793fe9b2e6956137 | 加载文件完成时,解析粒子数据 | public class ParticleSystemManager extends com.earthview.world.graphic.ScriptLoader
public void parseScript(com.earthview.world.core.DataStreamPtr stream, String groupName)
{
long streamParamValue = stream.nativeObject.pointer;
String groupNameParamValue = groupName;
parseScript_DataStreamPtr_EVString(this.nativ... | 1 |
6faedd0f376f5390b0e0f779c739b4e5 | 2c8dd0e45ca29e4db134bce8956be644 | Get the bitmap representing all live objects. | {
if (visualbmp == null)
{
visualbmp = new Bitmap(maze_width, maze_height);
}
Graphics g = Graphics.FromImage(visualbmp);
g.Clear(GetColor(WHITE));
foreach (MazeObject mo in mos)
{
mo.isVision = t... | 1 |
d86727392708a3eaada8507f827432a6 | 2c030317f584c51c5f4d08ee5eabcf65 | Insertion of the types of categories in database BDD_OFF
(Snacks salés, Gâteaux, Sodas...) | {
$stmt = self::$pdo->prepare('INSERT INTO types(id,cat_name) VALUES(NULL,?)');
return $stmt->execute([$cat_name]);
} | 1 |
43a57b404c671b33620351dc20d1ef31 | 11249ce07c2bbc361ff3f340b838f693 | 为系统保存宿主包名
<p>
此功能5.0.11-bugfix加入。
系统要做一个强杀的功能,由于eebbk.push是免杀进程,如果多个app集成不同版本的推送库等原因,会造成多个eebbk.push进程,
此保存就是告诉系统真实宿主是谁,然后其他的app的eebbk.push和该app都可以杀
</p> | if (null == mPm) {
return;
}
Intent mainIntent = new Intent(Intent.ACTION_MAIN).addCategory(
Intent.CATEGORY_HOME).addCategory(Intent.CATEGORY_DEFAULT);
List<ResolveInfo> resolveInfos = mPm.queryIntentActivities(
mainIntent, 0);
for (in... | 0 |
146b2176805a034a985424719b8cb5b7 | dbed27f0ef4c040a48cc5207244a8972 | 获得指定分钟之后的日期
为正时为指定分钟之后的日期,为负时为指定分钟之前的日期 | public class DateUtil
public static Date getAfterDateMinute(Date date, int minute) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.add(Calendar.MINUTE, minute);
return c.getTime();
} | 1 |
c845117b8122deca9c228c00389911e6 | 2958ac7627181103017ee4572d1759a4 | 仕入先名称を取得します。 | public class JuchuJuchuAddOnlyDtRecord extends KitRecord
public String getShohinNm() {
return (String) get("SHOHIN_NM");
} | 0 |
90f95fb4f6282636e6c13dad0a2f33da | 240001ad9dfa3550c67377ed91dfab3e | Mencari player terdekat setiap 3sec agar tidak terlalu memberatkan | public class EnemyAI : MonoBehaviour
private GameObject SearchNearestPlayer()
{
var playerArray = GameData.instance.spawnedPlayer;
GameObject nearestPlayer = null;
float nearestDis = Mathf.Infinity;
foreach (var player in playerArray)
{
if (!player) continue;
... | 0 |
083807a6eb5468c0008a777c285a3355 | 5f655d38dee918436a8ff72f8c6e6d62 | 新版网站主页跳转方法 | function gohome()
{
gourl(SYS_PATH."index.php/cms/index/index");
} | 1 |
96b0bfd5974eb06525cb145faaecebec | b47195b87e2330bef00ce64e1d0baf65 | Returns list of objects with a display_name property. | class GetGroupsByDisplayName(IcontrolRestCommand): # @IgnorePep8
def __init__(self, display_name,
*args, **kwargs):
super(GetGroupsByDisplayName, self).__init__(*args, **kwargs)
self.display_name = display_name | 0 |
6df090dd9c48783c20ae9c17de0f7180 | e5f18f758a5dc8ce3c78082007737851 | Retrieves all the information for a reporter's byline | {
$select = $this->select()
->from($this->_table, '*')
->where('report_id = ?', $id)
->order('created_at DESC');
return $this->fetchPairs($select);
} | 0 |
5a9ba6eba28be832d39f31746961fa9a | 5bce438c7b2d4b3127431fb88f5c5b16 | build the NavigationModel and configure the corresponding ModelService | class NavigationFragment
: BaseFragment<NavigationViewModel, AppFragmentNavigationBinding>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
viewModel.getNavigationList()
} | 0 |
568a157197c26e24964ca24318cfa8dc | ec1cd4932df5e6f95be00bb13c9ea7ef | 获取某张地图中以某个地图格为中心的九宫格 | _getSubGrid (gridIndex, radius) {
let result = [];
let row = Math.floor(gridIndex / tm.grid_width);
let col = gridIndex % tm.grid_width;
let span = Math.floor((radius - 1) / 2);
let left = col - span;
let bottom = row - span;
let right = col + span;
let to... | 1 |
566ee7969e8011e125abb8f6c9619491 | 0c26b7ed23f301ffca5cde6d4085d4c5 | Returns an empty String. Placeholder. | class NullObject
def to_str; ""; end | 1 |
54fcf5c4f225d906578d168b051cf6d5 | 0af3d1ef082aad2d2e01c5d0eedc23ff | A simple helper function that replaces NaN values with the nearest finite value. | def rmnan(input_value):
a = input_value[:]
la=len(a);
if np.isnan(a[0]) | np.isinf(a[0]):
a[0]=0
for point in range(0,la):
if np.isnan(a[point]) | np.isinf(a[point]):
a[point]=a[point-1]
return a | 1 |
18c1596452fb4b09e7e77cce13ea17c1 | b4f21b674d83898a610425c4996b0b87 | Funcao para retornar o peso do jogador | def obter_forca(u):
return (u[2]) | 0 |
2b1bdf232f61b468aa6d700481ad57fd | 6b831986c8744f9e475c038ebe13f868 | remap IO memory to kernel space | void irq_remap(){
outb(0x20, 0x11);
outb(0xA0, 0x11);
outb(0x21, 0x20);
outb(0xA1, 0x28);
outb(0x21, 0x04);
outb(0xA1, 0x02);
outb(0x21, 0x01);
outb(0xA1, 0x01);
outb(0x21, 0x0);
outb(0xA1, 0x0);
} | 0 |
f05ee722621b4611cd8cdf691dad906c | 9710b6b37036a44a9e297fc433fb6c96 | Navigates to the correct page then returns the HTML for that page. | let obj;
let html;
switch(viewEnum){
case Controller.MAIN_MENU:
obj = new MainMenu();
html = "./html/mainMenu.html";
break;
case Controller.TEAM_SELECT:
if(this.user === null){
alert("You ... | 1 |
184ca08df1f8441243e432ee4130e1d3 | f2752c48d2d0d0cdd6ffe21a85a711b5 | 获取具有最大序列的znode,名称 | public class ZKClient
public static String getMinSeqNode(String path) throws Exception{
return getMinSeqNode(path,null);
} | 0 |
de5da441af3ef17b1fcc471f2be7d851 | 4a866c1ebc6c7b854fbd40c1b684ef0a | 去除字符串内的控制字符
原始字符串 | {
$arr = array(' ', ' ', '&', '@', '#', '%', '\'', '"', '\\', '/', '.', ',', '$', '^', '*', '(', ')', '[', ']', '{', '}', '|', '~', '`', '?', '!', ';', ':', '-', '_', '+', '=');
foreach ($arr as $v) {
$str = str_replace($v, '', $str);
}
return $str;
} | 0 |
77c4437528ef57de80868bcb5caa74d9 | 55fc43fd61745449aee80193a35ad967 | 获取门店的活动
返回store_id为key的二维数组 | $map['a.merchants_id'] = $merchants_id;
$map['a_s.store_id'] = $store_id;
$map['start_time'] = array('lt',time());
$map['end_time'] = array('gt',time());
$activity_info = M('activity')->alias('a')->join('activity_store a_s on a.activity_id = a_s.activity_id')
->where(... | 0 |
0523bcd31f0b88a505ec42d4fd88d94a | 57568fb4f785a396f694096d00c63888 | przejście na stronę główną forum i potwierdzenie zgodności tytułu strony z oczekiwaną wartością | class ItalkiTest(unittest.TestCase):
def test_homepage_title_verification(self):
self.driver.get("https://www.italki.com")
self.assertEqual("italki: Learn a language online", self.driver.title, "Titles don't match") | 1 |
906be22002e60223a9b11caaa9804d59 | 5781b04b47984bff3e681f299b96a98f | Deploy a new rover, add it to this squad | public class ServiceManager implements Manager
@Override
public void addNewDroid() {
repair.addTechDroid();
} | 0 |
bb049f1ced329e9a34b809f2e7b0f050 | 29d0231d8597f51300d8aad0e147e1dc | create array of Vector3 positions for arc | {
if (accuracy == 0) return new Vector2[0];
var points = new Vector2[accuracy + 1];
int i = 0;
for (; i < accuracy; i++)
{
var angle = (i / (accuracy + 0f)) * 2 * Mathf.PI;
points[i] = new Vector2(Mathf.Cos(angle), Mathf... | 0 |
9868bbcc811dd69d04c2a461af942aea | 931d29d59bf449bc61e7a9c42aac632d | 通过函数名查找其在function_name中的id,并用bool返回其是否找到 | {
TaskNum_t id;
if(TaskFind(Function, &id) == true)
return id;
else
return -1;
} | 0 |
26a90d3b40908b8b1bb89e1bdaa999e4 | 81b53e16e2429dacab4f4c541d5269d9 | Get the category row id parameter name. | @Nonnull
@Override
public String getParameterId() {
return parameterId;
} | 0 |
c155d3ca260f46894044d9eda594582f | e05ad4cc59adb6689a7b6aeea8f92199 | 将proto数据写成对应名称模块,内容为解析proto数据返回builder对象 | func NewProtoParser(name string, generator MsgIndexHandler) *ProtoParser {
parser := &ProtoParser{}
parser.name = name
parser.Init(generator)
addParser(parser)
return parser
} | 0 |
fa8ac8bb346df555eaaeedc2c0722145 | a14e513821f36e4c901fcafa310abda0 | Get a blacklisted profile object. | public final class BlacklistMcAPI
public final boolean isBlackListed(final String search) {
return getProfile(search).isBlacklisted();
} | 0 |
84980196aa6a7af4d1570635e781b5d1 | ba30800c65aeff9be0dee2ea53771969 | 在指定库中执行setNX命令并设置过期秒数 | if (seconds < 0) {
return false;
}
return set(key, value, NX, EX, seconds);
} | 1 |
e0240bd8637addc28dfb55126ef8ae50 | 3adad51f824a6e27715b5f6d4f7703ee | [获取配置文件双层嵌套的key的value,针对value为BOOL的key]
eg:{"key1":{"key2":true}}
reply = fetch_key_key_value_str("key1", "key2")
reply : true | key_list = str(key).split(".")
for now_key in key_list:
if len(key_list) == 1:
value = data[now_key]
return value
else:
new_data = data[now_key]
key = str.join(".", key_list[1:])
return ComAssert.dict... | 1 |
5f2e3ec098a20933e6b39c29ff17a2cb | 728f56d2dfbe19a9a3dcd07dc987ee5b | 라즈베리파이를 종료시킨다. | class Linduino:
def close(self):
try:
self.port.close()
return 1
except Exception:
return 0 | 0 |
fcecc0c9247da1bc8811231309b72fb9 | 9d140d288d82b362b73c1b557c3531ab | Reparameterization function by sampling from an isotropic unit Gaussian.
# Arguments: | class VAE(nn.Module):
def reparameterize(self, mu, logvar):
std = torch.exp(0.5*logvar)
eps = torch.randn_like(std)
return eps.mul(std).add_(mu) | 1 |
06c8c9f57b57f26be72621fe717ce4de | 1d0d39cc052532903c32baf77b60db1e | 外发检定消息[可设置是否刷新数据及消息类型] | protected ICheckResponse sendCheckResponse(List<DealerCheckBO> list) {
JSONObject transactionType = getCheckTransactionType(list);
String rs = responseDealer(transactionType);
ICheckResponse msg = getResponseMsg(CheckResponseMsg.class, rs);
return msg;
} | 0 |
72b569282a5593ad806f8e5a06e3801d | f117eede4facdec2005b19e842d4cda1 | <p>
Failure test for <code>setXMIWriter(XMIWriter writer)</code>.
</p>
<p>
writer is null, IllegalArgumentException is expected.
</p> | try {
this.editor.setTarget(null);
fail("The target is null.");
} catch (IllegalArgumentException e) {
}
} | 0 |
ff5a441a0c48326754876d54696cf12d | b050f5f0693d03b489b6b6207babe85a | 从源字串中以指定字串头截取后半部分字串 | namespace BaiduBusFiddler
public static class Helper
public static string Substring(ref string source, string startStr, string endStr)
{
string result = "";
Int32 index = source.IndexOf(startStr) + startStr.Length;
Int32 endIndex = source.IndexOf(endStr, index);
... | 0 |
767d825099e9676617f388587cd88885 | 5e7c8e14f52587a38b2c601fb5eaa4d8 | Find the earliest event to be scheduled | var end;
for (var i = 0; i < schedule.length - 1; i++) {
end = schedule[i].end;
var start = schedule[i + 1].start;
var millisecondsDifference = start - end;
var minDifference = msToMins(millisecondsDifference);
if (mins <= minDifference) {
break;
}
... | 0 |
fc4bfbc50cb95cca417ec6a5bffe357f | 1fa497edba9234effb4209036e7a2a48 | 发布样板 | namespace IIMes.Services.Maintain.Services
public partial class BopBaseService : BaseMaintainService<SBopBase, SBopBaseDTO>, IBopBaseService
[Transactional]
public object Publish(BopBaseRequestDTO request)
{
int oldBopBaseId = request.BopBaseId;
string editor = request.Editor... | 1 |
120cfce9a2fa6847e43de93a206a573e | c9b14ded843afdf3c1315667a7bdddaf | Delete refund reason by ID. | namespace Nucleus.Api
ApiResponse<Object> DeleteReasonCodeUsingDeleteWithHttpInfo (Guid? reasonCodeId); | 1 |
de4d1f6b04c2c143b413e2d8affdbbe0 | f50a4354fcf6a0ac5b974fa20639d8ca | Iterate inventory items. | while True:
yield self.wait(
(self.tracker.wip_count, lambda v, c, s: v < self.inv_level)
)
if self.bom:
yield from self.check_bom_inv()
yield from self.release_inv() | 0 |
98154fe27c401802657f08746e10da84 | 0e415f40793946984882c6d644fb89c1 | converts SomeStringLikeThis to some_string_like_this | func ColumnMapper(colName string) string {
s := regexp.MustCompile("([a-z])([A-Z])").ReplaceAllString(colName, "${1}_${2}")
return strings.ToLower(s)
} | 1 |
7e6c1f301dbdb05b938180b1d9b2d24e | 0f014361cc3166fe88833a4217f0f021 | Get already instantiated object. | public function offsetGet(mixed $id): mixed
{
if (! $this->offsetExists($id)) {
throw new NotFoundException($id);
}
if (! is_object($this->instances[$id]) || ! method_exists($this->instances[$id], '__invoke')) {
return $this->instances[$id];
}
if (... | 1 |
875a0749645e865d2ed27762aa154e77 | f11628dc7b52ab527bb6a8560504f38e | 计算TF/IDF归一化值的分母 | public class CommonUtils
public static double calTfidf(int tf,int df,int len){
return (double)tf/len * (Math.log(RELRWParameterBean.getTotalDocument()/(double)df) + 1);
} | 0 |
9f1e8a20bf5b9ab5631b8e6a5fdabf53 | dd9d6f5c39edf5fbdf7a44a6737971bb | 重写paintEvent | bool Widget::eventFilter(QObject *watched, QEvent *event)
{
if(watched ==this->qw && event->type() == QEvent::Paint)
paint();
return QWidget::eventFilter(watched,event);
} | 0 |
1558062c88cb21cce1ac3507373fc005 | 568007bca78ca1826650cd0faba9b725 | Return the age in Saturn years | {
if (englishName=="Jupiter") return std::atan(0.005f/getEquinoxEquatorialPos(core).length())*180./M_PI * 4;
if (englishName=="Saturn") return std::atan(0.005f/getEquinoxEquatorialPos(core).length())*180./M_PI * 4;
if (englishName=="Mars") return std::atan(0.0001f/getEquinoxEquatorialPos(core).length())*180./M_PI * ... | 0 |
9501d90da5f4bc3f96a405a1de96a774 | 43ad2f94609e1494a4190375e82a2b28 | exchange 2 random cols in keysquare | k = int(math.sqrt(len(sudoku)))
sudokuSize = k*k
first = random.randint(1,sudokuSize)
second = random.randint(1,sudokuSize)
while(first == second):
second = random.randint(1,sudokuSize)
for i in range(0,sudokuSize):
ifst = sudoku[i].index(first)
iscd = sudoku[i].index(se... | 0 |
ed9d509cc4aae19723a80f01cf07b18f | 81c9c780301c17b11b7f132b567ccffb | The core *oauth_signature* generating logic. | class Request::TwitterAuthentication
def oauth_signature(consumer_secret, token_secret, method,
url, oauth_pairs, queries)
queries.merge!(oauth_pairs)
pairs = []
queries.sort.each do |key, val|
pairs.push("#{percent_encode(key.to_s)}=#{percent_encode(val.to_s)}")
... | 1 |
dc8328c1a6d14b161209618867168e69 | 2097036ece1a1f4d15af29258069e40e | Groupの所属人数データ更新 | class EasemobController extends Controller{
private function update_group_affiliations($groupid){
logger('更新群组成员人数...');
$group_info = easemob_get_the_group(array(0 => $groupid));
logger('群组信息:'.var_export($group_info,TRUE));
$affiliations = $group_info['data'][0]['affiliations_count'];
$groups = D('easemob_... | 1 |
891ab3d64a1f61925ad67aebf84796d2 | c8322a8f3680106f8286adcdd6ff335c | 获取城市实时交通拥堵指数数据 | def citytraffic(request, pid):
name = MainCityTrafficDataBase.objects.filter(cityCode=str(pid)).values('name')[0]['name']
data = City(pid, name)
return render(request, "Traffic/JiaoTong.html", locals()) | 0 |
fe920492d68da425acff7d313eabd40d | 2f13ad44fd2ab81c576a5c435759721a | Test that Twitter's API credentials are available in environment | def __check_environment():
required_values = ["REDDIT_USERNAME", "REDDIT_PASSWORD", "REDDIT_CLIENT_ID", "REDDIT_CLIENT_SECRET"]
for value in required_values:
assert os.getenv(value, None) is not None, f"{value} missing from .env" | 0 |
b0523cba9f5fb0a3c7e4fa9c73c053c8 | 5f304a2d12d73a618a88b1507b68c5ee | Determines whether this instance supports custom triggers (meaning user can add more triggers) | {
return this._triggerConfigurations != null && this._triggerConfigurations.Count > 0;
} | 1 |
74ccc268d9aa54cbb0570bdd248e34ee | 8bdb99969b4dc216e522b6003ce1e385 | 根据证件种类与号码 ,进行人员比对,复用 | var id = jQuery(user_ids).attr("id");
var index = id.split("_")[1];
var passFlag = true;
var idType = $("#"+id).find("#sdrecognizeeTypeName_"+index).val();
var idVal = $("#"+id).find("#sdrecognizeeId_"+index).val();
var sdrecognizeeName = $("#sdrecognizeeName_"+index).val();
var boxId = "sdrecognizeeId_"+index;
... | 1 |
fbac77fc597683cedb85c47513f1f1cb | e04e288ac3301390b4c8e514470594ce | Inicializa los campos de búsqueda | let selectSexo = document.getElementById('selectSexo');
let inputPersona = document.getElementById('inputPersona');
inputNombre.value="";
selectSexo.addEventListener('change', filtroBuscar);
inputPersona.addEventListener('keyup', filtroBuscar);
let inputCurso = document.getElementById('inputCurs... | 1 |
713085869a2dae9586cd54e641be7842 | a8cadb5e6ddebf81b200309f59dc3123 | Returns a collection of key value pairs representing settings used by Orchestrator web client. | namespace UiPathEJC.Service.Rest.Api
ApiResponse<ResponseDictionaryDto> SettingsGetWebSettingsWithHttpInfo (); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.