query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
2166e2ba1bc98d83fef888f04300ae9c | a4fef73a60a9658c3dfdc958ddc6c76b | 启动 Sora 服务 | namespace CcNet.NotifySvc
public static class HproseServiceExtension
public static void Start(this HproseService service)
=> service?.Invoke("Start"); | 0 |
f1f0ca9f9c091fb468f8a9d131253b73 | e40d1bcd71e97999272fc3ebb3c11e8b | Returns the entry_id of the playing show, or None. | class Playback(object):
def id(self):
return self._id | 0 |
0c11a78fa2abfcd255b9a6b91d9b7047 | b07b7c3bf735b3aa88c78ac7f72188c0 | 取得EtlLogChannel資料表中,單一root channel id 向下所有資料 | sql = "SELECT ChannelName,Id,ImageUrl,FilePath FROM siteserver_Channel WHERE ParentId in(0,1) ORDER BY Id";
var dt = dal.ExtSql(sql);
dt = FilterFilePath(dt);
return dt;
} | 0 |
09c9adf6947e2e060b7b3a4af390d3d3 | 1a0d03541ee23d9765cd69121b6d7353 | Create an Alpha Strategy game. | self.root = None
self.game = game
self.NN = NN
self.ngames = ngames | 0 |
6b037b480abe5cfe170552426fd086dc | b1a9a6eaa13d4052bf06e55ec1a5762f | Removes an organization or player from an event | class Tribe__Events__API
public static function deleteOrganizer( $organizer_id, $force_delete = false ) {
return Tribe__Events__Organizer::instance()->delete( $organizer_id, $force_delete );
} | 0 |
4a9517bd62664d846351bf037513f7b8 | 84a2bcdd5152750a5b5838a3df01e614 | select Accelerometer Module API | {
uint8_t x_data, y_data, z_data;
float x_value, y_value, z_value;
printf("accelerometer\r\n");
if(accelerometer_existance_confirmed)
{
x_data = accel_read(XDATA);
y_data = accel_read(YDATA);
z_data = accel_read(ZDATA);
x_value = accel_data_to_number(x_data);
y_value = accel_data_to_number(y_data);
z_v... | 0 |
29dba2d5db113773c72129b965058783 | 825b1a15fae674f0f94b86789af27506 | Use scheduler to unregister based on id. | static GameLoopFunction<Integer> unregister(Class<?> clazz) {
return gameLoop -> gameLoop.getComponent(IGameLoopScheduler.class)
.map(iScheduleRegister -> iScheduleRegister.unregister(clazz))
.orElse(0);
} | 0 |
7433eb37c8a614ed9ed829eab067e2d5 | 353460b26ab317bc2b0f01a9b8599c35 | Return the detail endpoint URL for ``resource_obj``. | kwargs = {'username': obj.username}
url = reverse('user-detail', kwargs=kwargs)
return self.context['request'].build_absolute_uri(url) | 1 |
8a020e76367c4ec12c34bd7e0c8aaf7d | 8597801c4cca3372414578f42fd56ff8 | Returns a length-T sequence of ordinals on [1,365]. Can be used for
indexing a 365-day climatology; see `climatology365()`. | return [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
] | 0 |
48c2a2dba00d5ba183373f680a3861a0 | 31e35fd9f2702875df377d679a956a93 | Fetch the workloadSummary directly from couch and perform all
the processing and dirty keys manipulation.
Returns a dictionary key by dataset name with their information | helper = WMWorkloadHelper()
originalRequestURL = "%s/%s" % (arguments['CouchURL'], arguments['CouchWorkloadDBName'])
helper.loadSpecFromCouch(originalRequestURL, self.originalRequestName)
helper.truncate(self.workloadName, self.initialTaskPath,
self.acdcServer, se... | 0 |
76fe62c9fa2c13d76fbd1a9b4ce587ae | a5a23b4c138990302e20294392264b72 | Prepare form fields form dc table. | class TableForm extends EntityForm
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$restaurant_table = $this->entity;
$form['label'] = [
'#type' => 'textfield',
'#title' => $this->t('Label'),
'#maxlength' => 255,
'#default... | 1 |
b61e074a50e7969db69c32c322486abb | 2eccffc9edf313501a45b0345a9fd14d | Get logoutEvent for API | public function getApiRouteLogoutAction()
{
return [];
} | 0 |
4e3ccccd391ca5ef281afe6494a0f25b | 12bcf971b26ba5142d40a6c60e3c6a94 | NameWithTime formats string by time. | func ViewByTimeUnit(name string, t time.Time, unit rune) string {
switch unit {
case 'Y':
return fmt.Sprintf("%s_%s", name, t.Format("2006"))
case 'M':
return fmt.Sprintf("%s_%s", name, t.Format("200601"))
case 'D':
return fmt.Sprintf("%s_%s", name, t.Format("20060102"))
case 'H':
return fmt.Sprintf("%s_%s... | 1 |
d6d628d13679321c4dc5fa0eef1375cc | 3195b9a634ab89cebb6ff1ef5526232b | Called when the Autoplay data has been read in from storage
Get the Autoplay record for the current library | if (document.cookie.split(';').filter((item) => item.startsWith('autoplay=true')).length) {
userData.autoplay = true;
$('.js-youtube-trailer-autoplay').prop("checked", true);
} else {
userData.autoplay = false;
$('.js-youtube-trailer-autoplay').prop("checked", false);
}
} | 1 |
d13172467051a9fc6aac5ef577164667 | 58ea7c4f7ab0ce082463878ac126ceda | 设置每天特定小时开始作业触发器 | class SimpleRepeatingRule extends Base implements RecurRuleBase
public function setByHour(ByHourRule $byhour)
{
return $this->setChild('byhour', $byhour);
} | 1 |
34a763dc68b6535895692d5495c2179c | 479c1ff58d678aee79d5148abea111ce | Returns a tuple reflecting the current selection state | class Tree(Widget):
def selection(self):
return self._impl.get_selection() | 1 |
47e08c1f17c81f6f476948eb5c118ade | 56962ef638ddce2495b66733da1eb347 | Remember the current timer count so that we can restore it
when the system is powered-on | void TIM_init()
{
int i;
ftime( &systyme );
tinit = ( systyme.time * 1000 ) + systyme.millitm;
for ( i = 0; i < SYS_MAX_OOA_TIMERS; i++ ) {
swtimers[ i ].expiration = 0;
swtimers[ i ].event = (OoaEvent_t *) 0;
swtimers[ i ].next = inanimate;
inanimate = &swtimers[ i ];
}
} | 0 |
f2da83ce65a5b2256bbdf34b0241680b | 647881bf0b6bc1cd305cc709b3ae7967 | Return the rare offsets such that the first offset is always <= to the
second offset. This is useful when the caller doesn't care whether
rare1 is rarer than rare2, but just wants to ensure that they are
ordered with respect to one another. | if r0 > r1:
return r1, r0
else:
return r0, r1 | 1 |
5c29518b564c50ef36f6dceba78f8d29 | 40c825c24913a570ffcd50d982b3f244 | 校验补丁包是否正确 | @SuppressWarnings("all")
public class CheckUpdate
@RequiresPermission(allOf = {READ_EXTERNAL_STORAGE})
private boolean isCorrect() {
String md5;
LogUtils.e("isCorrect-1", FileUtils.isFileExists(apkFile), apkFile);
if (data != null) {
LogUtils.e(data.md5(), (TextUtils.isEmpty((md5... | 1 |
d5700bbfe8bbfd4d66204a49499298be | c6a89591787f41daec539feb005e68c3 | Tests whether a requested effect and an effect
present in an annotation are equal. | public class MethodParameterAnnotationsTest
@Test
public void annotationEquality() {
try (ScanResult scanResult = new ClassGraph()
.acceptPackages(MethodParameterAnnotationsTest.class.getPackage().getName()).enableAllInfo()
.scan()) {
assertThat(scanResult.getClas... | 0 |
937695d12a64afcf388463dee0a81f5c | 6c859323fbfe34399d1b11bbf0702fe3 | Get the number of resources black listed | class ControlledCacheWarmer(StoppableThread):
def __count_blacklisted(self):
result = 0
for value in six.itervalues(self.__active_pods):
if value.blacklisted_until is not None:
result += 1
return result | 1 |
90b8b143bff6850141b7bcfd60d5e38d | 052073750157c64cb36b60a96b8c5a00 | 每一秒执行一次查询 | @Component
public class PerCache
@Scheduled(cron = "0 0 0/2 * * ?")
public void testOne(){
init();
} | 0 |
9e594e9decad2f2b4f7ba24591158854 | 874387bdcad567f2821e08e660848611 | 取得两个日期之间的所有日期集合,包含起始日期和结束日期, 日期不分前后顺序,支持跨年。 | public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static List<Date> getDays(Date startTime, Date endTime) {
List<Date> dates =
new ArrayList(Double.valueOf(betweenDays(startTime, endTime)).intValue() + 1);
dates.add(startTime);
startTime = DateUtils.ad... | 1 |
275c6f8b0ceaf761323126932e090b01 | d36264c013b9313a1dfe8582ba446578 | 楽譜を右へスクロールする。 | self.update()
self.songCurrentIndex += 1
resetSongIndexCond = (
self.songCurrentIndex * self.moveStep
>= self.songNameWidth + self.spacing * self.isSongNameAllOut
)
if resetSongIndexCond:
self.songCurrentIndex = 0
self.isSongNameAll... | 1 |
3103e5ab9b687d44898e7e355e656558 | 2afc610257354b048e22765b9042eb56 | Static function which returns the backend specific configuration options
and defines the default values for the options | class AdminController extends AdminObjectController
public function getOptions()
{
return $this->nggConfig->getOptions();
} | 0 |
0bd70584526e1b87a3760ee1da2200c4 | 9fc49fc27ab039f3f40e110c92249298 | <para>Handle the reception of the list of the others available users</para>
<para>Store the list of the others available users send by the server</para> | void receiveUserList(String[] nicknames); | 1 |
8b3c6752e633e538060d41bd94e4eff5 | 64473809a4d0e488acdaff8ac77a8e14 | 先从缓存中获取缓存数据,如果不存在,则查询并放入缓存供下次使用 | @Service
@CacheConfig(cacheNames = {"userCache"})
public class UserServiceImpl implements UserService
@Override
@Cacheable("userList")
public List<UserEntity> getAll() {
System.out.println("缓存不存在,执行方法");
return userDao.getAll();
} | 1 |
e965fd632cb835d0d8aff561db4c44d2 | a92e6a126261601b1537f74703750dbd | Validates the webHook body data | {
inputStream.Position = 0;
string requestBody = await new StreamReader(inputStream).ReadToEndAsync();
return IsAuthenticWebhook(requestHeaders, requestBody, shopifySecretKey);
} | 1 |
926250dbbc9c60cadbebd20a60ebefdb | f0eb2b0033bd73c9ae0d517617899b6d | Sends push notification to some notification queue.
Implementation-agnostic. | Object pHandback)
{
try
{
if (mSender == null)
{
QueueConnection lConnection = getQueueConnection(mJNDIName);
mSession = lConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
mSender = mSession.createSender... | 1 |
9c024163e7d53903efaf8bc712f94bfd | 4abb9b33cb2850000dc32b588063ec2b | Simulate a DHCP server sending a DHCPv6 RELAY-REPLY encapsulating RELAY-REPLY packet message to next relay agent | class DHCPTest(DataplaneBaseTest):
def client_send_relayed_relay_forward(self):
relay_forward_packet = self.create_dhcp_relay_forward_packet()
testutils.send_packet(
self, self.client_port_index, relay_forward_packet) | 0 |
5b5446759959dffec7fcd05e8ae22976 | 1207bd54c8a6818af59f4c8edccb3412 | Create a new fat meme generator instance. | constructor(args, opts) {
super(args, opts);
this.props = {
actionList: this.options.actionList,
buildFromFs: !!this.options.buildFromFs,
generatorName: _consts.GENERATOR_NAME
};
} | 0 |
86d38f3d6ada4ca1af40b637241809a4 | 2820736f0f5abf3d84331757c70498a0 | Skriver ut node til skjermen "ord:count" | if (fwrite(&count, sizeof(count), 1, stdout) < 1) {
perror("Can't write to stdout");
exit(EXIT_FAILURE);
}
} | 0 |
18287eb5bab24ee336ff552087b69877 | 953bbbdcf1738370c53e387676d3e8fd | This method was overriden to make the structs more self describing | [DefaultExecutionOrder(3)]
public class CDSphereBehaviour : CDShapeBehaviour
public override CsObject GetDescStruct() {
return desc;
} | 1 |
09430cc48e6c267326055ea8e2f888b5 | cac6fd75173b9acd1986a634d0106fec | delete a thought by its id | class ThoughtController extends Controller
public function destroy(Thought $thought)
{
$thought->delete();
return response()->json('Thought deleted');
} | 1 |
6565e2326e9ef37738632011d7d09145 | 79e6fa39b3fac4241ded92f8624a7b21 | Returns ``True`` if the in-memory cache has expired. | if self.ttl_seconds is None or self.ttl_seconds == 0:
return True
cached_datetime = self.util.any_to_datetime(cached_date).datetime
cache_expires = cached_datetime + timedelta(seconds=self.ttl_seconds)
return cache_expires < arrow.get(datetime.utcnow()) | 1 |
f567a9ecd2b013935bfce618d9532265 | 10b5012a50f0274ed46997bf3dbd8e55 | Gets the requested culture from the "Accept-Language" header, if present. | namespace Microsoft.AspNet.Localization
public class AcceptLanguageHeaderRequestCultureProvider : RequestCultureProvider
public override Task<RequestCulture> DetermineRequestCulture([NotNull] HttpContext httpContext)
{
var acceptLanguageHeader = httpContext.Request.GetTypedHeaders().AcceptLangua... | 1 |
5a86c46eb1ab84ae5bd0e5d61ab5fb88 | d8266c6f7d950aa94513934d84de56de | Override getTwigValue to render field as html | class DynamicTwigField extends TokenBase
public function content() {
$definition = $this->getPluginDefinition();
return $definition['properties']['content'];
} | 0 |
1dcbf266820691c2fadce6d04ff62998 | 75307af5d378180694ad5a255ff4c37f | Asks the user for a list of grades (numbers)
Returns a list contianing the grades. | def request_list():
lob = [""] * LIST_SIZE
print("Enter blank value when complete")
i = 0
while i < (LIST_SIZE - 1):
lob[i] = input("Enter list item %d: " % (i + 1))
if lob[i] == 'B' or lob[i] == 'b':
lob[i] = B
elif lob[i] == 'S' or lob[i] == 's':
lob[i] ... | 0 |
7dd7422f74440f73f929738223e5d120 | f96aa03365837f2f211583c91a026c09 | Creates "numSlices" lists from "iterator", trying to keep each one as evenly-weighted as possible. Some lists may
be empty.
Items are assigned to the slice that has the lowest weight at the time that item is encountered, which
leads to pseudo-round-robin assignment. | def iterslicesdefault(iterable, n, fillvalue=None):
current = []
for a in iterable:
current.append(a)
if len(current) == n:
yield current
current = []
yield current + [fillvalue] * (n - len(current)) | 0 |
b60982562f9f2bfe57a0b38066a224cf | 22f7305566ba58261a4c2f50e0846874 | Move the traversal head to the next character position, feeds a new line if needed | if (vbGet(c) == '\n') {
c->column = 1;
c->line += 1;
} else {
c->column += 1;
}
return vbForwardRaw(c);
} | 1 |
dacdca16ac4b359e527a64fcaf420a23 | 60951b2afe0d14772ac39759b6507c26 | 先手函数,确定人人/机模式以及先后手 | public class ThirtyGame
public void PlayerFirst(String name ,int AnsMode){
System.out.println("後攻か・・頑張ろ!!");
waitMoment(1000);
System.out.println( name + "さんが先攻だね!1~3の数字を言って始めてね!");
if(AnsMode == 1){
while (true) {
PrayerAction act1 = new PrayerAction();
setCount... | 1 |
81093bba1457c5747dbc090ebd035ffc | 9a0916a5185771579d2992f540ff64da | Adjusts the music player's current volume output according to the volume slider and status. | SoundJLayer.volumeLevel = sliderVolume.getValue();
if(SoundJLayer.isMuted == false){
SoundJLayer.setGain(sliderVolume.getValue() / 100f);
}
} | 1 |
c33d23c260eaca2ffc363c3d2c38caac | 28968a726275641458df59226ec6895d | 判断用户插入数据库是否成功 | int use_mysql_1(const char *name,const char *password,MYSQL mysql1)
{
char string[50];
char string1[100];
sprintf(string,"select*from 用户数据 where 用户名=\"%s\"",name);
sprintf(string1,"insert into 用户数据 values(NULL,\"%s\",\"%s\")",name,password);
int i;
int ret;
unsigned int nu... | 1 |
25950e0b752116bbc11abface9f4e608 | a9cc5d4314a600947bd8b500138a55fa | 计算十六进制字符对应的数值(十进制) | {
return chr[0] * 128 + chr[1] * 64 + chr[2] * 32 + chr[3] * 16 + chr[4] * 8 + chr[5] * 4 + chr[6] * 2 + chr[7];
} | 0 |
aa6e209cb641fbbcf61234ef2d60d7f2 | 3ab1141e77561d88e9c3a29b8eba10c2 | Returns the footprint of the document. The footprint is the unique code which identifies a document state. The footprint is calculates from the values of
all attributes. | public class InMemoryIndex
public long getFootprint() {
return this.footprint;
} | 0 |
52e562d0544afe29f53d5699e93241bd | 6b1db791c5008347d9e93bd849cdb982 | 方法说明: 按条件查询一个 系统用户头像 对象 | StringBuilder sb = new StringBuilder("SELECT ");
sb.append(this.getFkSelectedItems(cond));
sb.append(" FROM user_avatar t ");
sb.append(this.getFkJoinTables());
sb.append(" WHERE 1=1 ");
sb.append(cond.getCondition());
sb.append(cond.getOrderSql());
log.in... | 1 |
ab30e7270f9e5af51d36032cd91f4b6a | 607f2024e959551cca1a1be870ffe599 | Open memory device driver. | int mmapdrv_open(struct inode *inode, struct file *file)
{
return(0);
} | 1 |
0319c3a43fa11cdc38d507ffa1b7f0f4 | 9ea9dbe9af1689572d56378698aeaf1a | Puts a message in the user input space | def userMessage (event) :
print wordWrap(event, 60) | 0 |
c297611f110dd0872de50451ac5fd45d | 4283f1983e9d470948848b0d9ba4456d | \brief Добавление перевода строки. | class Locale
public function addTranslation(MsgStr $translations)
{
$this->translations[] = $translations;
return $this;
} | 1 |
7d9248c15c07edee11098f942c184d43 | 4cc3e55aabccfb584b2cc3bf3f756abf | Recupera los gestos de la base de datos | public class Assignacions
public List<String> ObtenirGestos(LinkedList<Assignacions> a) {
List<String> list = new ArrayList<>();
String b;
Assignacions asign;
for (int i = 0; i < a.size(); i++) {
asign = a.get(i);
b = asign.nom_gest;
if (list.contains(... | 0 |
d29f0b751fa06e9dbd3e8b7b56458e25 | 156991c035303493aaad545ae37d8cf8 | add social footer at bottom of woocommerce pages | if ( has_nav_menu( 'footer-social' ) ) {
echo '<div id="footer-social-icons" class="footer-social-icons social-icons-navigation clearfix">';
wp_nav_menu( array(
'theme_location' => 'footer-social',
'container' => false,
'menu_class' => 'social-icons-menu',
'echo' => true,
'fallback_cb' => ''... | 1 |
e92651a0dc6451023c3238cbb3c79d7d | 7dd841ad8e622efa6f5b1590e4765f72 | Tests the Regular Expression extracting state names from values. | public void testRegexValue() {
baseCopyAction.getFrom().setRegex(REGEX);
String regex = baseCopyAction.regexValue();
assertEquals(REGEX, regex);
} | 0 |
6cf25763477b7ec7bdba1660aa591765 | 1bb13640b7fb37fafba93be70d22be7c | Returns the id of the next player. | if (currentPlayer == 1) {
return 2;
} else if (currentPlayer == 2) {
return 1;
}
} | 1 |
ce8ce101d991ff963eedc24ce1809e86 | 3ad368799feb61e3af6697a6032d1aa4 | 查询一个商品的销售、库存、出入库记录 | Map<String, Object> selectByGoodsID(Integer goodsID, Integer repositoryID) throws StorageManageServiceException; | 1 |
1b9b9eff1558ce72f73feaac7e62c85d | b1ad5c4725b561011ef5202ea1993bb9 | Mark acceptor as ready to send. | Transport readyToAccept() throws IOException; | 0 |
5658651e0ac978eaf9ef4a551921ef2c | b5cb091b4ff5421316e2ec4db85c0841 | First we query and compute some values, then we store them in the history list | class HistoryBase(object):
def record(self, dbh):
if self.ssm_id is not None and (self.d3 is None or self.d4 is None):
if not self.orbit_id:
raise RuntimeError("ssm_id but not orbit_id specified")
my_orb = Orbit.retrieve(dbh, self.orbit_id)
ssm_orb = SSM.retri... | 1 |
87251a4d2924deeadae5dbc512fbed09 | 33546806e48fc48986c82aab7f406ab2 | Extract pretrained object detection model and converts it to UFF.
The model is downloaded from Tensorflow object detection model zoo.
Currently only ssd_inception_v2_coco_2017_11_17 model is supported
due to model_to_uff() using logic specific to that network when converting. | sys.path.append("../object_detection")
MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_17'
MODEL_FILE = MODEL_NAME + '.tar.gz'
PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'
PATH_TO_LABELS = os.path.join('object_detection/data', 'mscoco_label_map.pbtxt')
NUM_CLASSES = 90
tar_file = tar... | 0 |
4abb3589eb186374f6d9a59ced8c6824 | f0454f044621b0cbda732a6e486c1017 | synchronizes the list of parameter unique ids in TDManagers of ExecTestCases
and the associated parameter list | {
_tests = newList;
int i = 0;
if(_tests.Count > 0)
{
foreach(string Input in _tests[0].Inputs.Keys)
{
AddToParameters("Input" + i, Input);
i++;
}
}
Add... | 0 |
6ec4c9fc99fc488ce5c272ad94d59a0e | de9c60c1c08abdc9bf64f95a21522ef0 | Test that linked lists are deduplicated. | class TestDuplicates(unittest.TestCase):
def test__remove_duplicates(self):
result = deduped_list
expected = [
'Fred',
'Dave',
'Sarah',
'John',
'Matthew',
'Joanna',
'Marjorie',
'Anna',
'Tony',
... | 0 |
7e2ee3ab0cb99025355d18c7da15e7e8 | 88667470309b22c97e7ab86606a093f2 | ファイルパスと文字コードを指定してファイルを読み込みArrayListに格納する。 | class TxtIo
function loadList($txtFn) {
if (! $txtFn) {
return null;
}
$list = null;
if (! $this->is_file_ex ( $txtFn )) {
return null;
}
$txtFn = mb_convert_encoding ( $txtFn, 'SJIS', 'UTF-8' );
if ($fp = fopen ( $txtFn, "r" )) {
$data = array ();
while ( false !== ($line = fgets ( $fp )) ) {... | 1 |
b39b36c79a45f489e00b7a3582f05659 | faaaac35dcc9413290aac839a0909ec2 | user might provide a link to file with no extension | b,ext = os.path.splitext(f.lower())
if ext=='':
return True
if ext in DOCUMENT_EXTENSIONS: return True | 1 |
8df09574fed724c00449c7c11aa8cc83 | f1c50aca99524f4c8a7a056223741240 | 设置连接超时和 Socket 超时,以及 Socket 缓存大小 | {
int bufSize = (int)_uBufSize;
setsockopt(_fdSocket, SOL_SOCKET, SO_SNDBUF,(char*)&bufSize, sizeof(int));
setsockopt(_fdSocket, SOL_SOCKET, SO_RCVBUF,(char*)&bufSize, sizeof(int));
#ifdef WIN32
DWORD tv = (DWORD)_msTimeout.count();
setsockopt(_fdSocket, SOL_SOCKET, SO_SNDTIMEO, (char*)&tv, sizeof(DWORD));
setsoc... | 1 |
fd1c6525c54f0b1fad25165ebd21698d | 9ac88ec50612367502bce894416540bc | Returns the meta object for the reference '{@link asmeta.transitionrules.turbotransitionrules.TurboCallRule#getCalledRule <em>Called Rule</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getTermAsRule_Term(); | 0 |
4d0fea6a35c68c63a005d9bca73e3ee6 | a272a76761ad5a69090978be25b25a0c | Select the segments assigned the specified status | public class AcknowledgementHandler extends SFRMComponent
private void updateMessageSegmentStatus(SFRMMessageDVO mDVO, List<Integer> segNums, SFRMAcknowledgementParser parser) throws DAOException{
if(segNums.size() != 0){
Vector<Integer> DFList = new Vector<Integer>();
Vector<Integer> PSList = new Vector<Intege... | 0 |
7b7ce4811b8fb16f9ba3170d97df8e94 | bf5741a9b19df6b795c8e22a753745f1 | Variation operators: Permutation Mutation | void Mutation(double chrom[sizepop][lenchrom])
{
for(int i=0;i<sizepop;i++)
{
double pick = ((double)rand())/RAND_MAX;
int choice = (int)(pick*sizepop);
while(choice > sizepop-1)
{
pick = ((double)rand())/RAND_MAX;
int choice = (int)(pick*sizepop);
... | 0 |
3a049964c0ee80ff85bd696580c7d03a | d4ddf2c058e9074c8ebd02f77258445d | Corrects distortion using Brown's (or Brown-Conrady) distortion model.
This is the same method used by OpenCV. | def correct_dist(initial_img):
k = [[1.15422732e+03, 0.00000000e+00, 6.71627794e+02], [0.00000000e+00, 1.14818221e+03, 3.86046312e+02],
[0.00000000e+00, 0.00000000e+00, 1.00000000e+00]]
k = np.array(k)
dist = [[-2.42565104e-01, -4.77893070e-02, -1.31388084e-03, -8.79107779e-05, 2.20573263e-02]]
dist = np.a... | 1 |
bcbb0e07b7e731e55d7a0639940733a4 | 276da1d7036984b2dce123e34199562c | Reference: https://stackoverflow.com/a/49362936 | def print_progress(iteration, total, prefix="", suffix="", decimals=1, bar_length=100):
import sys
str_format = "{0:." + str(decimals) + "f}"
percents = str_format.format(100 * (iteration / float(total)))
filled_length = int(round(bar_length * iteration / float(total)))
bar = "█" * filled_length + "... | 1 |
e72c44be9dc318f31981867170f14602 | b002276129b3813b0e707a512d867d71 | Sends a status report to the OSCAR server -- SNAC(0B,03) | int client_socket)
{
int32_t rc = 0;
rc = write(client_socket,
&status,
sizeof(status));
return rc;
} | 0 |
21003a8da67f524bd83d7fc2c37f39a7 | f842da18b531cc044265fa382a48b675 | 胆拖投注提示 | duihaoBet(){
} | 0 |
d96322853927eb032ea43bd7a7934559 | 34f0b2ee60dceb3976f01413e4b00feb | Тест получения данных из книги Excel | {
var result = new ExcelResult();
result.Path = "~/Download/Book1.xlsx";
return result;
} | 0 |
534f826f1d9e7644de405a6a03deaf77 | 6a269d3017b3ddb9835bb079c3161f15 | Function to add a new entry to the inventory | def _add_to_inventory(supplies):
if supplies[1] in inventory:
inventory.update({supplies[1]: (inventory[supplies[1]] + int(supplies[2]))})
else:
inventory.update({supplies[1]: int(supplies[2])}) | 1 |
6e9de2495a92aa3344d28958c08e706a | 8953ee6391b6baa358bc104fbebb628f | Returns path slice based on command line argument path | try:
path = sys.argv[1]
return path
except IndexError:
print('directory path argument required')
sys.exit(1) | 0 |
ff2941f483b33767592cf0ce343121c9 | 1afe3b487e1b2dfcfa70b946681732c9 | 根据项目名称删除试剂R1R2表中对应的数据 | public void deleteDrugProjectConterItem(Long id); | 0 |
572d08525261639bfc380fcfa0b688ea | ed032d70cc6307396f8040db872e3a69 | Hours to skip fetching. This field was supposed to designate
intervals for feed fetching. It's not generally implemented. See
<http://blogs.law.harvard.edu/tech/rss> for more information. | public final class Choice
extends AbstractVoiceXmlNode
public String getFetchtimeout() {
return getAttribute(ATTRIBUTE_FETCHTIMEOUT);
} | 0 |
838309bf187139664346d1289153db58 | 9850f74df077d718317ca27acfc1ad1a | Load item into Nuke.
This implementation will create a read node and associate the given path with
the read node's file input. | class AddFileToScene(tank.Hook):
def add_file_to_nuke(self, file_path, shotgun_data):
import nuke
file_path = file_path.replace(os.path.sep, "/")
(path, ext) = os.path.splitext(file_path)
valid_extensions = [".png", ".jpg", ".jpeg", ".exr", ".cin", ".dpx", ".tiff", ".mov"]
if ext... | 1 |
b405e43f4b9a2ee215090972dea7f2df | 210c88efe54a6fc979892b114fda9502 | Returns the DEPS file contents with pinned revision info. | filename = os.path.join(self._extract_dir, f'{self._distribution_name}-{self._version}.dist-info', 'DELVEWHEEL')
if os.path.isfile(filename):
with open(filename) as file:
return file.read().strip()
return '' | 0 |
f1c59f703493a5bda216c4bc0d7d8008 | cbdd5ce23e3e89f4018ff754af4b7c77 | Returns the meta object for the attribute '{@link de.ubt.ai7.csv_validator.caches.dataStructures.CachedContentConstraint#getAutomaton <em>Automaton</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getAutomaton_Transitions(); | 0 |
63df5b9df45e59660c1d4692001bafb0 | 7f3d03b0a0423c9733417cce9535c95b | Returns the symbol for the global (unnamed) namespace. | ReSymbolSpace* ReASNamedValue::symbolSpace() const {
return m_symbolSpace;
} | 0 |
0c893fc0c37d26fd76b250ba3daf479b | b21c7e52b537abe06c73a301c200d84c | Check if a skill exists in this guild with the specified name. | @Query("SELECT COUNT(s) FROM Skill s WHERE guild.id = ?1 AND name = ?2")
int countByGuildIdAndNameEqualIgnoreCase(long guildId, String name); | 1 |
07daa8644264b580d9383e51ba15700b | 34b397e5069d83b7c4a9c265006cd2e5 | Zero page Indirect addressing mode handler | INLINE int16 ZPIndAddrModeHandler_Address(void) {
int VectorLocation;
int EffectiveAddress;
VectorLocation=ReadPaged(ProgramCounter++);
EffectiveAddress=ReadPaged(VectorLocation)+(ReadPaged(VectorLocation+1)<<8);
return(EffectiveAddress);
} | 1 |
12116af47851ccef9af4701863318cb1 | fed5812f7ec81cb3726463562f932bc0 | justifies the currently selected block | namespace TrulyMail
public partial class Editor : UserControl, SearchableBrowser
private void justifyRightButton_Click(object sender, EventArgs e)
{
JustifyRight();
} | 1 |
14a0fdd15481cf8dd9f93215c370be36 | adf3cf2c1107fb293e437989d257203e | Update the download progress on the progress bar | namespace Test1
public partial class Downloader : Form
void appDownloader_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
toolStripProgressBar1.Value = e.ProgressPercentage;
} | 1 |
438385aefaa2f7533c2794d3a4d55cc6 | 311d11d41c3f5a075d0c266a46b25d2d | Function which calls the recursive function to read through a text file to create the binary search tree. | string buffer;
if ( theFile.eof() == false ) {
theFile >> buffer;
string word = buffer;
read_file_recursive(theFile);
cout << word << endl;
} else {
}
} | 0 |
1c84d02ad49583a3e6b99dcf08b89d13 | eb377f30c08fa538fadb233696018f11 | 更新SaleExtCode状态 | class ECManager
public function updateStatus($data)
{
return $this->send('post', 'sales/updateStatus', $data);
} | 1 |
c72c8013d44322f72b8feeda399da751 | 85fb63cf90d01a85cc3cc2e8d96e984e | leitura de dados salvos na pasta dentro da aplicação, cria o diretório caso ele não exista | public class WeaknessManager : MonoBehaviour
protected void ReadData(){
if(!Directory.Exists(WeaknessDirectory)){
PointsFinishMessage = new Dictionary<string, PointFinishMessage>();
EnablePoints = new List<string>();
Directory.CreateDirectory(WeaknessDirectory);
r... | 1 |
b4112b6f0ae0b0574c4c0258f29cc028 | c9928c0e203f94f72051cc71d20033bf | Certificate SigningAlgorithm validation rule. | class KeystoresAliasesKeyCertFileCertsInfoCertInfoArgs:
def sig_alg_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "sig_alg_name") | 0 |
7961301129545c377443b3d0410260f5 | 73c3ea232ddea7d734fa0775dea500cc | Sayacı çalıştırır | def count(text):
try:
text_sp = text.split("'")
text_int = int(text_sp[0])
for i in range(text_int):
speak(str(i+1))
speak("Süre doldu")
except:
speak("Sayıyı tekrar söyleyebilir misin ?")
num_answ = get_audio()
... | 1 |
4a8e41b9d3e7ccd1bb31da42cdf4d3dd | b4f7e1f78a8efef4cf3be2bebd463572 | Get all the belonging of players to clubs | public class GroupHireEntity
public List<Integer> getPlayers(){
List<Integer> players = new ArrayList<Integer>();
players.addAll(Arrays.asList(getAtt()));
players.addAll(Arrays.asList(getCen()));
players.addAll(Arrays.asList(getDef()));
players.addAll(Arrays.asList(getGolkeep()));
return players;
} | 0 |
0299e10512957dd8f0ec9b7e25c52255 | a6653c6d84a8b0d64b71218c5f54dd48 | 最后一波才展示boss,第一次通关,表里面填了showboss | class SController extends Controller
private function initBossRole(){
$show_position = \Ivy::app()->user->getState('show_position');
if(!$show_position){
\Ivy::app()->user->setState('show_position',1);
}
} | 0 |
d452275d70caa052682747608426374b | 944b4364c0546499be995c9fd5f45b31 | Timeout the fragment and enqueued packets. | {
int packagesSent = 0;
while ( (!lastFragmentQueue.isEmpty()) && (packagesSent < TOTAL_PACKAGES_SENT_AFTER_DELAY) ) {
writeMessageInSocket(tcpQueue.takeFirst(), packageQueue.takeFirst(), lastFragmentQueue.takeFirst());
packagesSent++;
}
if (lastFragmentQueue.isEmpty()) {
periodi... | 0 |
b69499ad13d81c33c037f9510534390c | 179a12eb4897e3dfab4bf820ccd42ce8 | Required authentication check | class result_client_report_result_download_30_ctrl extends AlladinController
protected function authenticate() {
$this->_core->checkLogin(array('admin', 'client'));
} | 1 |
694a9a30d84aa0a1b732363ea1c38ad9 | dc05d9f40a659050bd242a84ff087aa2 | Returns information on a specified family phone | {
$stmt = "SELECT
*
FROM
" . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_phone_category
WHERE
phc_id=" . Misc::escapeInteger($phc_id);
$res = DB_Helper::getInstance()->getRow($stmt, DB_FETCHMODE_ASSO... | 0 |
98e54979810336b04cc26db1e58e7319 | facbc34d9a850916697b7c58cb6f51e8 | 设置目标点(使用默认速度行走) | if self.leaving or self.death then return end
self.target_pos = Vector(x, y)
if pos_speed then
self.pos_speed = pos_speed
end
end | 1 |
130580318e5f7cb4a29a23234894a41d | 83a5afb09a8abb9af18282b9c229978f | recursively search for the last statement | final_stmt = expr
highest_line_no = -1
not_at_end = True
while not_at_end:
if hasattr(final_stmt, 'lineno'):
highest_line_no = final_stmt.lineno
body_is_valid = hasattr(final_stmt, 'body') and final_stmt.body
if hasattr(final_stmt, 'orelse') and final_stmt.orelse:
... | 1 |
8ee7b2ad7305dc054bb144583a063a1e | 21d507f7a1ca33b0e89543afa51a97f2 | Instance string formatting | if ($vars['event']['instance_all_day']) {
$vars['event']['date_string'] = date('l, F, j', strtotime($vars['event']['instance_start']));
}
else {
$vars['event']['date_string'] = date('l, F, j - g:i a', strtotime($vars['event']['instance_start']));
if (isset($vars['event']['end'])) {
$vars['event'... | 1 |
4f454e651096785fc69d59e4753a8bb3 | 6d354a46ed327a6e494a552f4614c9d0 | Compute the L1 loss.
**Type Constraints**: *float32* | def cntk_l1_loss(a: Union[cntk.Function, cntk.Variable], b: Union[cntk.Function, cntk.Variable]) -> cntk.Function:
return cntk.ops.reduce_sum(cntk.ops.abs(a - b)) | 1 |
74b780c4a7d0ed8ce350d03dc13a0628 | 2efc20cca83646a48f84376bd93bb504 | 指定した処理が処理受付テーブルに存在するかどうかをチェックします。
存在する場合はtrue、存在しない場合はfalseを返します。 | namespace MatsukiERP.DAL.Shared
public class ydPublicMethod
internal static bool IsExistProductProc(string procName)
{
procName = procName.ToUpper();
using (var da = new t_processTableAdapter())
using (var tab = da.GetDataByProductProcName(procName))
{
... | 1 |
873985c6110bbf3fbbbd310d133da779 | 41fea482cab7fb5e31f55047b3aad44a | 用来封禁一条论文。封禁后的论文,对学生、老师、未登录账号不可见
发出该 API 只能是管理员用户。后端要根据session校验 | namespace Newbe.Mahua.HttpApiClient.Api
public partial class MpqApi : IMpqApi
public ApiResponse<Object> Apiv1MpqApiBanWithHttpInfo (MpqApiBanHttpInput input = null)
{
var localVarPath = "/api/v1/Mpq/Api_Ban";
var localVarPathParams = new Dictionary<String, String>();
var... | 1 |
79159c1891002a523e24d3f52382dcd3 | ece437f9f05339cf0d76df143c28c61c | !
\qmlproperty QString FacebookTag::userIdentifier
Holds the identifier of the user which was tagged, if the tag
is a user tag and not a text tag | public class UserMentionMarkup extends MarkupElement implements TamTamSerializable
@Nullable
@JsonProperty("user_id")
public Long getUserId() {
return userId;
} | 0 |
4207c480ea1ee572253aa154deabd5af | 3daf75658c4657c057e6d6763a528f8d | Object for reading and storing variance optimizer results. | self.interval = interval
self.save_optimizer = save_optimizer
self.out_dir = out_dir
self.args = kwargs | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.