query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
018277ff5d33a31eee228e171405814f | 2fa3d768e33c5acde25929cff0010583 | BasicStatistics constructor. | BasicStatistics::BasicStatistics() {} | 1 |
bb881b43fa069076726316b9c7294d8e | 9e11cc350523ae69a613f36fedd770d9 | Checks if the argument has no subjects in it | {
return
(
$nSubject === NULL ||
is_string($this->entailment['s']) ||
$this->entailment['s']->equals($nSubject)
) && (
$nPredicate === NULL ||
is_string($this->entailment['p']) ||
$this->entailment['p']->equals($nPredicate)
) && (
$nObject === NULL ||
is_string($t... | 0 |
241ab0e515a726c7c73af40e223a65de | 9f00e0bc6c42ed5ddbacc73395e06237 | 存储圆半径的方法 | public class Circle{
void getRadius(double _Radius){
this.Radius=_Radius;
} | 1 |
3095267aaed32c152f1648a44c07e673 | 8643390b952bdf6bdeed32810946238e | Build the binary notification. | $binData = self::pack(self::BIT_B16, $apiKey);
$binData .= self::pack(self::BIT_B16, $this->getApiVersion($apiKey));
$binData .= self::pack(self::BIT_B32, $correlationId);
$binData .= self::encodeString($clientId, self::BIT_B16);
return $binData;
} | 1 |
5cf6b6513faa9e58af56a2a95fe85a4a | 29f7d5675561f662127f206a155bdec6 | 将form 表单中的数组改为“,” 分隔的数据 | $str = '';
foreach($arr as $v){
$str .= $v[$field].",";
}
return substr($str,0,-1);
} | 1 |
696b6660ae80dcef4bf18df2c7d36a2b | 922674524e8f29dbd2a0e8e6d7196d1d | Onclick info tab, show content. | var x = document.getElementById("r4Info");
if (x.style.display === "none") {
if(infoOpen == true) {
closeAllInfo();
}
x.style.display = "block";
infoOpen = true;
} else {
x.style.display = "none";
infoOpen = false;
}
} | 1 |
bba3934ac6dc3dd4f7e16fd924dab954 | 0358a5684fe6c3983f63823af3e824e5 | The function cuts sentences into separated words | def main(mess):
def _getBreaksentencesIntoWords(anySentences):
eachwordGentexList = []
for eachword in anySentences:
offersList = eachword.split()
for eachwordOffers in offersList:
eachwordGentexList.append(eachwordOffers)
return eachwordGentexList | 1 |
de1b789da1d7434a389a35a4d6aa97c4 | f4910034965a1c177f5224f29e96d33d | создание блока с вопросом | class m_quizkProgressWidgetContainer extends m_quizkBaseWidgetContainer
function createQuestion($row)
{
$answer = $row['qd_select_answer_id'];
$answerArray = array();
if (!empty($answer)) $answerArray = explode(';', $answer);
$title = $this->convertToDispString($row['qd_title']);
$content = $this->convertT... | 1 |
b2fce0a42821ac5d2888c1f9fb43b862 | bc75d127daf559166381b58d8aa9e4a4 | cacheSize is a function used to expirementally obtain an estimate of the size of the cache. | func BenchmarkCacheCleanUp(b *testing.B) {
testFunc := func(b *testing.B, capacity int) {
c := cache.New()
for i := 0; i < b.N; i++ {
b.StopTimer()
for i := 0; i < capacity; i++ {
c.SetWithExpiration(fmt.Sprintf("%d", i), i, time.Millisecond)
}
b.StartTimer()
c.ClearExpired()
}
}
initCapacit... | 0 |
7e4cb8959f8697914f6539f36f1e7bb4 | 88e7d68dcb4342b081f694cb910ca70c | Obtiene una lista de tesis relacionadas con un subtema o sinónimo
determinado. | public class RequestSubtopic extends Subtopic implements Serializable
public static ArrayList<RequestSubtopic> getSubtopicsRequestfromSubject(String sKey) {
return getSubtopicsRequestfromSubject(KeyFactory.stringToKey(sKey));
} | 0 |
fa7ba6befcaab8e6a81467203e720963 | 2b77a51c9dbdc500664fa7501561cd65 | Destructor - destroy a #raptor_uri object | if self[:subject_type].nonzero? && !(self[:subject].null?)
self[:subject] = case self[:subject_type]
when RAPTOR_IDENTIFIER_TYPE_ANONYMOUS
V1.raptor_free_string(self[:subject])
when RAPTOR_IDENTIFIER_TYPE_RESOURCE
V1.raptor_free_uri(self[:subject])
end
... | 0 |
2a14006ca83e9da6535df2a552b3f141 | a65730af160107be8171365eeb2fd533 | compute log-probability of given example | count_spam = 0
count_ham = 0
for word in example[1]:
if word in self.features:
if word in self.likelihood[0]:
count_spam += log(self.likelihood[0][word])
else:
count_spam += log(1e-4)
else:
... | 1 |
de4f39feca1b30251760fbd3e9c151c3 | e989baf03df0a33ca1338da9d6fe3a04 | Creating test to assess what happens when nonexistent category is passed
to endpoint | class TriviaTestCase(unittest.TestCase):
def test_questionByCategory_fail_400(self):
response = self.client().get('/categories/1000/questions')
data = json.loads(response.data)
self.assertEqual(response.status_code, 400)
self.assertEqual(data['status_code'], 400) | 1 |
6972d4ff6db589e92eb527f33b5a6832 | 20f904006a4e9e1804a454a754ce9883 | First we will check if an environment argument was passed via console arguments
and if it was that automatically overrides as the environment. Otherwise, we
will check the environment as a "web" request like a typical HTTP request. | class Application extends Container implements HttpKernelInterface, ResponsePreparerInterface
public function detectEnvironment($environments)
{
$base = $this['request']->getHost();
$arguments = $this['request']->server->get('argv');
if ($this->runningInConsole())
{
return $this->detectConsoleEnvironment($b... | 1 |
2decff17b21153f2806ef9a7af9539a7 | 4ec9f57ab2be6777cbc62e724d9d8b97 | Sets updater of referenced attribute | class BaseModel extends Model
public function updater()
{
return $this->hasOne(User::class, 'id', 'updater_id');
} | 0 |
b2f3b3b02096062391cd12c7c7bd97be | 6935f240e087ee281374d19a65dba162 | Prepare the needed data for Favorite widget and forward them to favorites.ftl | async show(matches) {
this._recordId = matches[1];
this._data = this._app.database.getRecordById(this._recordId);
let html = await fetch("page-detail/page-favorites.html");
let css = await fetch("page-detail/page-favorites.css");
if (html.ok && css.ok) {
html = await ... | 0 |
5f42aed66bed28a11e5fc4d6418f96a7 | b42e97313e7a4948157ac7061d8ee9ae | Ajoute le champ supplémentaires du contact en fonction du type | class ContactType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder
->add('name', TextType::class, array('label' => 'Nom ',
'attr' => array('class' => 'form-control ')))
->add('profession', null, array('la... | 0 |
03bd33983832582ed9f274699901988a | 4e0db75f1c7723d11f37e4008e7abc06 | 根据文件名,从origin_data中的name文件夹下拷贝img_num张图片到save_data文件夹下 | img_list = os.listdir(img_folder)
for i in img_list:
nums = re.findall(r"\d+\:?\d*", i)
out_name = '_'.join(nums)
os.rename(os.path.sep.join([img_folder, i]), os.path.sep.join([save_path, out_name + '.bmp'])) | 0 |
a0d813ce94b0d946369ce1f55023486c | d4b7cc22b7795dcbf541207a8537fbbc | 서버와 연결 끊기 요청하기 | public class A6_StudyCenter extends AppCompatActivity implements View.OnClickListener,
A6_MyClassListAdapter.MyClassListClickListener,
NetworkAsyncTasker.AsyncResponse
private void netConnForLogout() {
String url = "http://cb.egreen.co.kr/mobile_proc/login/new/logout_proc_m2.asp";
Conten... | 1 |
d81c445ea888bf0b465941f74b11b567 | 68a187be0bda24d2a4c5c58095662fd6 | returns the actual ODBC cursor type this datasource would
use for a given ResultSet type | public Object getCursorTypeMapping(); | 1 |
77ed7fcee69d2f466686b72d8261daf6 | c009e64f5b1002627fe81d8113fedb7b | 获取客服电话信息的URL. | var url = ApiBaseUrl + '/appv2/servicephone';
$.ajax({
type: "GET",
url: url,
dataType: 'json',
data: {},
headers: ajaxHeaders,
success: function(data){
if(data.status==1){
var phone = data.data.s... | 1 |
b3ddef32b20b3ae531b87355e2ee266e | 0bfff231dffddaff54f03981a9910e02 | Add two players to game engine. | self.first = FirstPlayer(self.width, self.height)
self.second = SecondPlayer(self.width, self.height)
self.player1.add(self.first)
self.player2.add(self.second) | 1 |
c746192efaca602b0c49acb0ed81de9b | c290049aab709a14d9b19f79e8765452 | Get the encryption properties for a container group. | ContainerGetPropertiesResponse response = getContainerPropertiesWithResponse(containerName,
null,
null,
CancellationToken.NONE);
return response.getDeserializedHeaders();
} | 0 |
f5a8778e14c9491b879cbb607224a0b0 | 35917b36d115d33e2d10b7359cd98e25 | Filters a sequence of values based on a <see cref="ISpecification{T}"/>. | namespace QuerySpecification
public static class QueryExtensions
public static IEnumerable<TEntity> Query<TEntity>(this IEnumerable<TEntity> source, Specification<TEntity> specification)
where TEntity : class
{
if (specification == null)
{
throw new NullRe... | 1 |
92240345e97c0d4a261e9a65aa19c481 | 1a22ad988486696a88d0128f1fa6e743 | The filter to apply to incoming messages. Only applies when the endpoint
endpointUri is a receiver | @JsonFlatten
public class EventChannelInner extends ProxyResource
public EventChannelInner withFilter(EventChannelFilter filter) {
this.filter = filter;
return this;
} | 1 |
c50963e9840c6b58666082de8a9e2271 | e0ff8ef87ebe3aac8e37aa26b4c49ab9 | Returns data for {@link DistributorTest::testEqualSeparatedAbbreviations()} test. | {
return [
[
'in2code.de',
10,
true
],
[
'in2code.d',
10,
false
],
[
'i',
1,
true
],
... | 1 |
4a9a65d9afcd6ad955266a18e12ffea9 | f345feae4d433e12b0848b80c487afb4 | set letter frequency in node | Tokens *current = tokens;
while(current != NULL){
current->frequency = (float)current->count/total;
current = current->next;
}
} | 1 |
617a279a1b1a2ecb4e71d55936ad1ee3 | 8c5fa99609a5543ec27d631613596e4c | 根据deptId获取医生列表 | @Service
public class HospitalInfoServiceImpl implements HospitalInfoService
public List<DeptDoctorInfo> getDeptInfoById(int deptId){
return hospitalMapper.getDeptDoctorList(deptId);
} | 1 |
d731ec17a27b3c4ece0347eb4c598f1d | acf7f565a8c571a7b9925eaa00daa655 | !
! If FIXED_TIMESTEP is defined, the Main loop will use fixed timestep timing. i.e. Monocle::deltaTime will be the same every frame.
!
! If FIXED_TIMESTEP is not defined, dynamic timing will be used. Monocle::deltaTime will be different values every frame.
! However, Monocle::deltaTime will never be allowed to rise ab... | int main()
{
GameTimer lockTimer;
GameLogic::Instance()->setIsServer(true);
bool show_status_menu = false;
bool showEndScreen = false;
Initialize();
Window::GetWindow().GetTimer()->GetTimedMS();
GameLogic::Instance()->setLevelIsLoaded(false);
GameLogic::Instance()->setGameHasStarted(false);
lockTimer.GetTimedM... | 0 |
adfa283342fcddb5dca8dfb3ad215919 | af46fe0d7310b59e242a7fa9b3708ec1 | Scrolls to the given target vertically and horizontally. | class Action:
def scroll_to(self, **kwargs):
self.device(scrollable=True).scroll.to(**kwargs) | 1 |
a1407e8ba7c79a2dd14e871326745792 | 4232e58493ade810ac90d27502d8081c | Cap input values as to not exceed a normalized quantity | void ed_fm_set_command(int command, float value)
{
if (value > 1)
{
float device_id;
float normalized = modf(value, &device_id);
value = normalized * 8.f - 2.f;
}
switch (command)
{
case JoystickRoll:
Helicopter::RollInput = limit(value, -1.0, 1.0);
break;
case JoystickPitch:
Helicopter::PitchInput ... | 1 |
ff0897465ae573ab5c387689ef8cdea5 | e6928b59baa69fcd1497d9eb720c9ee6 | Remove all bulk uploaded images longer than a day old. | class upload
static public function prune_orphan($time = 0)
{
global $db, $images_table, $phpbb_ext_gallery_core_image;
$prunetime = (int) (($time) ? $time : (time() - 1800));
$sql = 'SELECT image_id, image_filename
FROM ' . $images_table . '
WHERE image_status = ' . $phpbb_ext_gallery_core_image::STATUS_O... | 1 |
4faf54d1c0c8e87a2af267ee425f468c | 9cc0fdf5bf59fc6d2d5866ce9e200787 | This method sets the local name. | public class BluetoothIBridgeAdapter
public boolean setLocalName(String name) {
Log.i(TAG, "setLocalName to " + name);
return mAdapter.setName(name);
} | 1 |
090b718461c13e8a3070ca6f125c5355 | 9ee66b6a942830dc2929c259c834cd63 | Makes sure that the types that we certainly want to upkeep are added to our list
of cacheable types. | class FpcCacheContext implements CacheContextInterface
protected static function getAllowedTypes() {
return array_merge(static::$processorStages, [static::QUERY_PLUGIN]);
} | 1 |
cf25eb14dde86023e6968a8da1afa7ce | 23b9c59a21e132e3324fa2f04f75d804 | 停车计费处理 | namespace 停车场项目
[Serializable]
/// <summary>
/// 会员用户类
/// </summary>
public class MemberConsumer : Consumer, Iprint
public override double Charging()
{
DateTime aa =Convert.ToDateTime(DateTime.Now.ToString("yyy年MM月dd日 HH:mm:ss"));
DateTime bb = Convert.ToDateTime(this.InTi... | 1 |
4c1127b9aa4d7875f86c3747ec4bb7bc | 00762777ecd21b0243516c2db37d71e5 | NOTE: false = EOF | function brainfuck(program, input)
function step() {
if (ip >= mem.length) {
return false;
}
switch (program[ip]) {
case '>':
dp += 1;
break;
case '<':
dp -= 1;
break;
case '+':
mem[dp] += 1;
... | 1 |
f9575fc556688e9bfa51e0de66391894 | e61fa37444c2097152dbff7de3896297 | Starts all the components. Switches colors of RGB LED corresponding to the
ADC conversion results.
None
None | uint32_t adc_val = task_adc_update();
task_leds_set_RGB( adc_val*sine_lookup[red_top_index],
adc_val*sine_lookup[green_top_index],
adc_val*sine_lookup[blue_top_index],
adc_val*sine_lookup[red_bottom_index],
adc_val*sine_lookup[green_bottom_index],
adc_val*sine_lookup[blue_bottom_index])... | 1 |
5eb003a3f883c52e490d7ee7f5b2c078 | de511810b1ea02f87627109015f5a155 | Test the separator detection. | p = Parser(testfiles['parsesep'].split("\n"), "testsource", [":", "-"])
root = p.root
self.assertFalse(root.isTerminal())
self.assertEqual(len(root), 3)
self.assertEqual(root[0].token, "element")
self.assert_(root[0].isTerminal())
self.assertFalse(root[1].isTermin... | 1 |
69e2081ae5d53b641032bb435b931d4b | 570609c22103e023c20d64b81cb25866 | An event-handler, fired anytime an error is received via the
connected serial port. | namespace StepMotor
public sealed class StepMotorHandler : IAsyncMotor
private void OnPortErrorReceived(object sender, SerialErrorReceivedEventArgs e)
{
byte[]? buffer = null;
if (_port.BytesToRead > 0)
buffer = new byte[_port.BytesToRead];
while(_response... | 1 |
1f6782d123a1d83d85e8fc26737d2569 | fc7c001ef8c5d3b875ff9e4170422b3c | Program main entry point. | {
utils::CommandLine commandLine(argc, argv);
display_help_if_needed(commandLine);
utils::ConfigFile config(commandLine.argumentValue(CONFIG_FILE));
std::unique_ptr<sensors::OdometryEstimator> estimator = sensors::create_odometry_estimator(commandLine.argumentValue(TYPE, DEFAULT_TYPE),
... | 1 |
95a607f824367f2f8cd3c9ac1bee152f | 5828ddc2d49c291693a94a8cc372d784 | Gibt die aktuelle Klassen Version zurück | class CMForm implements CMClass
public static function Version() {
return "1.0";
} | 1 |
f144e97e8359478ba909a6978ea15e0b | 1a907aa29f321cddd744e2da30397142 | Truncate the given table. This function will disable foreign keys before
operate and enable them after the truncation | protected <T> Truncate<T> truncate(Class<T> clazz) {
final ClassInfoImpl<T> cinfo = getClassInfoImpl(clazz);
org.apache.commons.lang3.Validate.isTrue(
cinfo.supportsTablesAndIndexes(),
"unsupported %s POJO class '%s' for a truncate statement",
cinfo.getEntityAnnotationClass().getSimpleName()... | 0 |
e68b61a9817e2865d446ac9c22cbb26b | 620045992d26674df3a0551d6975b63f | Removes all looped sounds | namespace Smiley.Lib.Services
public class SoundManager
public void StopAllLoopedSounds()
{
foreach (KeyValuePair<Sound, SoundEffectInstance> kvp in _loopedSounds)
{
kvp.Value.Stop();
kvp.Value.Dispose();
}
_loopedSounds.Clear()... | 1 |
832124d39aacc99aa154941fa0553cb0 | 855cf2a40c23540cde86d237e5223a18 | 修改用户收藏表单 | @Log(title = "收藏", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(UCollection uCollection)
{
return toAjax(uCollectionService.updateUCollection(uCollection));
} | 1 |
8cb3d665bf6e0eb654b845b741328175 | 42ee2a6ad33cc60de82971f52b97e1ef | @brief Ping to server and get IP | {
int ret = -1;
char *ptr,*ptr2;
memset(UartSendBuf,0,SENDBUFSIZE);
sprintf(UartSendBuf,"AT+CIFSR");
ret = Esp8266SendCmd(UartSendBuf,"OK");
if(ret == 0)
{
ptr = strstr(UartRecvBuf,"CIFSR:STAIP");
if(ptr != NULL)
{
ptr += sizeof("CIFSR:STAIP");
ptr2 = strstr(ptr,"+CIFSR");
*(ptr + (ptr2-ptr)) = '\... | 0 |
35bb662afbf23d54a8128fc2f7e48ff5 | 30b09e10efaf5d0a30c0f37ebdfa6108 | GET: api/PostVideos | namespace ForFashion.Controllers
public class VideosController : ApiController
public IEnumerable<VideosDto> Get()
{
var result = _videosManager.GetAll();
return result;
} | 0 |
cd4acc1ee9c0126cce3354debd8c6f05 | 94e7fd14e6ed3de624cfc45d96cfc8ad | リーダー信号を送信する。 | Intent intent = new Intent();
intent.putExtra("cmd", CMD_SEND_READER);
intent.putExtra("str", str);
intent.setAction(CMD_ACTION);
sendBroadcast(intent);
} | 1 |
57b11a14e36ffa41e479337e9e9e3cc8 | 67d33457bbc3effa8b455092c058f87d | Finds the max of a list of numbers and returns the value (not the index)
If int_list is empty, returns None. If list is None, raises ValueError | def max_integer(my_list=[]):
if len(my_list) == 0:
return None
num = my_list[0]
for a in my_list:
if num < a:
num = a
return num | 0 |
c849040f437cb4009c24ac33f19ad394 | 8e2f55946a301f34c221e0419330246e | функция возвращает все издательства в алфавитном порядке | {
return collection.OrderBy(ba => ba.Order)
.Select(ba => ba.Author)
.Select(a => new Author { Id = a.Id, Name = a.Name})
.ToList();
} | 0 |
f49c1c5a16347e71c9745899273e728c | 693e2f83750cde8d60c1371478fdab22 | Test that no loops where used in the exercise to recursively find the minimum
of an array. | RecursiveKnapsackSolver.knapsackRecursive(arrayOne, 0, 7);
RecursiveKnapsackSolver.knapsackRecursive(arrayOne, 0, 14);
RecursiveKnapsackSolver.knapsackRecursive(arrayOne, 0, 10);
RecursiveKnapsackSolver.knapsackRecursive(arrayTwo, 0, 6);
RecursiveKnapsackSolver.knapsackRecursive(... | 0 |
6709e24947ec8959c175e802848aaa8f | a87435b712cd31062844e2865d47d451 | Função criada somente para organizar o código e atribuir
o valor para as variaveis declaradas no escopo da classe. | class MinhaClasse(object): #Nome da classe(classe Pai)
#********************************* VARIÁVEIS DE CLASSE ****************************************
def _dif(self):
pass | 0 |
3b1073d85b2cd37f4d132051c9196b0e | 82ccc7f3c8dc8ef2fd9f181140e0f9cc | This function reads an array of bytes from the currently active UDP socket,
while decrementing the remaining bytes available. UDPIsGetReady should be
used before calling this function to specify the currently active socket. | ssize_t tstack_zread(int fd, void **buf)
{
tstack_tcp_pcb_t *pcb;
tstack_socket_t *sock;
uint32_t connIdx, appLen;
rcv_queues_t *rcvQueues;
tstack_pktdesc_t *rcvQueuePtr;
status_t status;
if (!IS_TSTACK_SOCKET(fd) ||
gSockets[fd].state != SOCKET_ST... | 0 |
80730e8c67ceda35521ffbfd99e2d124 | 1ffcbe0c44268b0e2d7a620cebc9d335 | Check if an fsspec file-system is local | def test_fsspec_http_file_system(ray_start_regular_shared, http_server, http_file):
ds = ray.data.read_text(http_file, filesystem=HTTPFileSystem())
assert ds.count() > 0
ds = ray.data.read_text(http_file)
assert ds.count() > 0 | 0 |
0d7466268b819a02c1735299dbbf2269 | d637ce879053ad1cbc9126ecd0701430 | 批量移除c集合的元素,第二个参数:是否采补集 | public boolean removeAll(Collection<?> c) {
Objects.requireNonNull(c);
Object[] arr = c.toArray();
int cTrue = 0;
for (Object item : arr) {
if (remove(item))
cTrue += 1;
}
return cTrue != 0;
} | 0 |
e354c9678e9d15d4cc090f0b9bd4d8fa | a2c9c1da5a211c25c2b5ec012b18946d | Current test number. This is the index number in
maint-test-results, starting with 1.
This value is only present if status is "running". | function Class:getCurrentTestIndex()
return self._results:size()+1
end | 1 |
6ba19e479342b50cce2f0ee029ec20fa | d01a21685218b782c2743aa5b04826f2 | Decorator that remembers the return value of a function call. | with suppress(AttributeError):
result = getattr(args[0], "_{}".format(func.__name__))
if result:
return result
setattr(args[0], "_{}".format(func.__name__), func(*args, **kwargs))
return getattr(args[0], "_{}".format(func.__name__)) | 1 |
07455d6e3cb7327e73de5d7246deb8cc | 1ae2b08ab723550d05c94eb673071f2e | check that ordering of the fields doesn't affect equality | def test_eq_order():
obj1 = USCircuitCaseMeta(
case_id = "X44DV3",
case_name = "Barker v. United States",
title = "Barker v. United States, 198 F.2d 932 (9th Cir. 1952), Court Opinion",
doc_title = "Barker v. United States, 198 F.2d 932 (9th Cir. 1952), Court Opinion",
circui... | 1 |
d8e003d82c5ad35d5d14f5599b0ed526 | d83c0d4d21a331869b94366500bcc3cb | * 隐藏所有玩家准备标示 | function PlaySceneRecord:hidePlayersReadySign()
for i = 1, self.roomChairs do
self.readySigns[i]:setVisible(false)
end
end | 1 |
c26ec820bea25d7d4490b12ef8c2ef27 | 98bd8718ae8f5695f8a8699cd9a747ce | Paints the menu item's background when it's not selected and when it's not hot
(i.e. the mouse isn't over it). | protected void paintText ( final Graphics2D g2d, final JMenuItem menuItem, final FontMetrics fm, final int x, final int y, final int w,
final int h, final boolean selected, final boolean ltr )
{
g2d.setPaint ( menuItem.isEnabled () ? menuItem.getForeground () : disabledFg ... | 0 |
85a931aab3606dd91a74d54b5028c880 | a986547ecd6bca63495a6930482a2f18 | Lists the user's Team Drives. | class DriveController extends Controller
public function index()
{
} | 0 |
24a446f3b7335eb5aa38a8bc50552850 | 3ebe7aa427b24b445c51f5b6e80c9778 | Disables the login button for account self service pages | inputEmail.setEnabled(false);
inputPassword.setEnabled(false);
inputPasswordReenter.setEnabled(false);
inputFirstName.setEnabled(false);
inputLastName.setEnabled(false);
cbAgeConfirmation.setEnabled(false);
cbTermAndConditions.setEnabled(false);
btnSignin.... | 1 |
6581ce1eba5daa9006d919ff70e3cb55 | c42979771af9538d519bba6173c455db | Check if request already exists in canvasser | $curl = mailchimpCurlRequestHelper($requestURL, 'GET', $apiKey);
$curlResult = getCurlResult($curl);
return [
'mailchimp_response' => $curlResult,
'success' => ($curlResult['status'] === 404 || $curlResult['title'] === "Resource Not Found"),
];
} | 0 |
11c96fa10bff9bd4038262720e48b79e | b31b7f309e0a42b26d800b7ac43c8181 | 获取净化器的工作时长
注意此数据只有调用重置方法才会被重置 | public class RFTId0431 extends RecvIdMessage
public int getWorkSeconds ()
{
int workSeconds = getIntFromBuffer(OFF_WORK_SECONDS, LEN_WORK_TIME);
return workSeconds;
} | 1 |
85275f40ef10c42be47fc834a18527b7 | f9298f81bc7c2d12b335353eba80fe84 | The extra vertical space we have to add to clear the bottom of the menu label, in screen pixels. | namespace StardewEcon.View
public class NewsBulletinMenu : IClickableMenu
private class MenuDimensions
private int DividerUpperMargin()
{
return 6 * this.pixelZoom;
} | 0 |
49d2d8456e9bc0a5fb30b8fe663951dd | 3fda6bd532a371a8331495e17bedd283 | Return a DataSource object of the passsed in type
configured with the passed in Java bean properties.
This will actually work with an object that has Java bean
setter methods. | public final class DataSourceConnectionFactory implements ConnectionFactory
public static javax.sql.DataSource loadDataSource(
final DataSource confDataSource, final ClassLoader loader)
throws MappingException {
String className = confDataSource.getClassName();
ClassLoader classLoader =... | 1 |
b1e4c3b56d0dfa74c342107db436a25d | a3e8aeae3be882ddf277245e72c910d6 | 横屏下,显示菜单布局,且5s后自动隐藏 | public class SlidingMenu extends HorizontalScrollView{
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
smoothScrollTo(mMenuWidth,0);
} | 0 |
67dbeed09feee861cf4c1bac7b0e1e9f | b606f256edd4b3f71b8dcea43ff232f2 | Inspect the data members of an object of class GRootDCNavigator. | void DiTauObj::ShowMembers(TMemberInspector &R__insp)
{
TClass *R__cl = ::DiTauObj::IsA();
if (R__cl || R__insp.IsA()) { }
R__insp.Inspect(R__cl, R__insp.GetParent(), "leg1Idx", &leg1Idx);
R__insp.Inspect(R__cl, R__insp.GetParent(), "leg1PdgId", &leg1PdgId);
R__insp.Inspect(R__cl, R__insp.... | 0 |
40af938610560997a045152ce7fcbf20 | 28f1ef70efef46bfa2de7a466256eb1f | 番組選択用のチェックボックスをパネルに追加 | let mrSet = $("<div></div>").addClass("input-group-prepend");
let mrSetJr = $("<div></div>").addClass("input-group-text");
mrSetJr.append($("<input/>").attr("type", "checkbox"));
mrSetJr.children().first().on("click", check);
mrSet.append(mrSetJr);
parent.prepend(mrSet);
} | 1 |
809986175d661ed361a8445daa206fb9 | 17cbf5f0ec765a516d7f9ea1e5fd80ba | 运动员导入按钮 | class PlayerPage(ActivityPage):
#运动员添加按钮
def export_player_button(self):
return self.find_element(By.ID, 'out') | 0 |
6706d798047aa2bc95a00eb025ea24d9 | 7c0ba3ac6690a3e51a318b15def58e50 | Initialization of the death rates vector | {
if (m_currentDay <= 2)
return;
m_deathRate = ((float)m_currentDayDeaths / (float)m_currentDayPopulation);
} | 0 |
3be9361468b53833c09df713ce4b9507 | b8300f83dc45c55133bd19ec846e4617 | Adds two integers, performs an overflow check, and pushes the result onto the evaluation stack. | namespace FluentIL
public static class EmitterArithmeticExtensions
public static IEmitter AddOvf(this IEmitter emitter, ILocal localValue1, ILocal localValue2)
{
return emitter
.LdLoc(localValue1)
.LdLoc(localValue2)
.AddOvf();
} | 1 |
d3c20210d68d356a8fa3b0dbce4fe412 | 7b773eae107006d887d7ad7052e483b9 | 根据regionId更新region的logicClusterId或racks | Region updateRegion(RegionId regionId, String name, Region.Type type,
Annotations annots, List<Set<NodeId>> masterNodeIds); | 0 |
10fc8c2a8d58c7bbd87da686efc5f23e | 71e53da35166fb1d6f3c42b2eaf353bd | Retornar os gêneros ordenados pela descrição | class GeneroController extends Controller
public function index()
{
$generos=Genero::orderBy('id','DESC')->paginate(3);
return view('admin.Genero.index',compact('generos'));
} | 0 |
fa5eb5f26113735131b3980cff892507 | 677ea9873839674f11d25461c34a3475 | Sends a message from the framework to one of its executors. These messages are best
effort; do not expect a framework message to be retransmitted in any reliable fashion. | class ExecutorDriver(object):
def sendFrameworkMessage(self, data): | 1 |
d6eab4a5e02a5b4e25bbf14f81cf2af4 | 641395c90d6269ceca6a18ead178aa69 | メールサーバ情報取得 | $systemDao = new SystemSettingDao($this->dbConnection);
$address = '';
$addrSetting = $systemDao->getFromCacheBySystemCode(ConstSystemSetting::MAIL_TO_ADDRESS);
if (!ValUtil::isEmpty($addrSetting)) {
$address = $addrSetting['system_value'];
}
$name = '';
... | 0 |
c3124b12ef33f919c32665a9ee04a79a | ac1048306624f06ce59ac12a20f3f343 | 将json格式字符串转换为字典集合数组。 | public class GsonUtil
public static final ArrayList<TreeMap<String, Object>> fromJsonListMap(String json) {
ArrayList<TreeMap<String, Object>> mList = new ArrayList<TreeMap<String, Object>>();
JsonArray array = new JsonParser().parse(json).getAsJsonArray();
for(final JsonElement elem : array){
... | 1 |
aba1ce3dc6516c34bc287b4ce5aeaed3 | c470667847cee70c7f1f0254fe212e25 | Camera Callback Function
This is called when the camera has a frame ready.
buffer->data has the pixel values in the chosen encoding (I420). | namespace CIdent.Forms
public partial class frmIndustrialCamera : Form
public void ImageCaptureCallback(CameraHandle hCamera, uint pFrameBuffer, ref tSdkFrameHead pFrameHead, uint pContext)
{
MvApi.CameraImageProcess(hCamera, pFrameBuffer, (IntPtr)((int)m_ImageBuffer&(~0xf)), ref pFrameHead);
... | 1 |
f5f8b681fd1a91b5ffca08a2432f8816 | 5111a23302ba9b0c1db36a9cbe2ba403 | update the bookmarks database to either add or remove the selected item | class EntriesTabFragmentViewModel(
private val repository: EntriesRepository,
readEntriesRepository: ReadEntriesRepository,
val category: Category,
private val tabPosition: Int
) :
suspend fun updateBookmark(
entry: Entry,
bookmarkResult: BookmarkResult?
) = withContext(Dispatchers.D... | 0 |
e37eb7fa5e990a1d3079baf6362ffddb | af99e98d27e6e2236a901a6a30454fa0 | Sokal and Sneath for set | def powerset(S):
return frozenset(map(frozenset, powerlist(S))) | 0 |
fcd8e55e141890af61b65cff131b73fd | 935caede6dc04ba173814a113d2377af | obtem um array de produtos a partir de filtros | class ProductController
public function getListaFiltredProduct()
{
return $this->listaFiltredProduct;
} | 0 |
b522c0a08227e7717a789ae5e43bf2e3 | 97f7ca4b1c5922df83526851079c88e8 | get how many seats are in each train/car/cabin | class SittingCar(object):
def get_number_of_places(self):
return self.get_number_of_rows() * self.get_row_width() | 1 |
8aefb00c125fe02702271d9c47ddc5e3 | 06449d4632f0efc612cf6f7156040992 | Get The face enhancement parameters. | self._SucFaceNum = None
self._SucFaceIds = None
self._RetCode = None
self._SucIndexes = None
self._SucFaceRects = None
self._FaceModelVersion = None
self._RequestId = None | 0 |
0e2dc3af79757c38b527a23da1c93458 | 42de28467fe390bad9dd601367e99207 | Periodo de retorno. | public class LogonAction extends EmentolAction
public void setPeriodo(Periodo periodo) {
this.periodo = periodo;
} | 0 |
0982063d6e304eb8af571a800f179173 | 6609c414062078a1051133a919f93d12 | Getter for <code>storeal.stl_footercustom_reinsurance.id_lang</code>. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProfileEN", namespace = "http://schemas.datacontract.org/2004/07/GoQuo.DP.Entities", propOrder = {
"approvedBy",
"businessPhone",
"cardStatus",
"city",
"companyName",
"country",
"countryCode",
"dateOfBirth",
"defaultCurrency",
... | 0 |
1ff84c4fe728e92a48901f4bd2296c93 | 415db37da14e8c62f8ed8f7f559f6784 | @brief calcule de produit matriciel de deux matrices | {
if(n != w)
{
return -1;
}
for(size_t i = 0 ; i < m ; i++)
{
for(size_t j = 0 ; j < n ; j++)
{
int tmp = 0;
for(size_t k = 0 ; k < w ; k++)
{
tmp += mat1[i * w + k] * mat2[k * n + j];
}
result[i * m + j] = tmp;
}
}
return 0;
} | 1 |
ec2c8e91f98dfe0a58256fc226d46bf6 | 088d71afc1248899f09fc6adf80ca68e | 设置通知栏的大图标 | public class IndexBottomLayout extends LinearLayout
public void setmBigBitmapSrc(Drawable drawable) {
mBigIconView.setImageDrawable(drawable);
} | 1 |
a08ef739804bf7fc470ae48a3c49d33e | 58fce57f6c39f61c97c85f61e52c6335 | Save all stops currently held in memory to a file. | namespace MultiLedController.utils
void StopSaveToFile(); | 0 |
7610c1f81640484e8d4e175259e1908c | 58dc0b76f6b9b205527f3e3e3f9db25b | sets the total number of messages sent so far | public class gvME extends MIDlet implements CommandListener, interCom
public static void setNumNewMsgs(int newMsgCnt)
{
gvME.numNewMsgs = newMsgCnt;
} | 0 |
84065957f15df52254caa8abe11d15ea | 17e6f3dcfc9a75886c1776cffb800a67 | Function Name: VersionHandler
Description : Processes the adslctl version command.
Returns : 0 - success, non-0 - error | void AtCmdHandleVersion(void)
{
uint8_t ver[8];
if (IO_Receive.atcmdlength == AT_CMD_VERSION_LENGTH)
{
uint8_t verstr[16];
ver[3] = transferConfigInfo.app_version;
ver[2] = transferConfigInfo.app_version >> 8;
ver[1] = transferConfigInfo.app_version >> 16;
ver[0] = tr... | 0 |
2908c9efe7265c7386e839a39dbf730a | 041d426427fecf15b1e548d2931c387d | Convenience method for PDO view page to show percentage of samples completed for the current PDO. | public function getPercentageCompletion(); | 1 |
ee81579eb788b0d147d90de6f26e34f4 | 9d60784591211ac5514d80040ac48ca6 | Returns the meta object for the reference '
{@link de.mdelab.sdm.interpreter.core.executionTrace.ActivityNodeExecution#getActivityNode
<em>Activity Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> | EClass getActivityNode(); | 1 |
8ab850c6eac460c3b97bd54c4813f4de | f514a67924b7db555edde6c3b89440b8 | Driver function to regenerate the stratospheric concentration lookup tables for all of the gas records. | {
char orbfn[256] = "grca_int.orb";
int nepo = recNum(orbfn, 0);
double** orb = double2(nepo, 7);
rdTable(orbfn, 0, nepo, 7, orb);
wtTable("grca_read.orb", nepo, 7,orb);
setDefault();
glo_geoC = double2(glo_maxgeo + 1, glo_maxgeo + 1);
glo_geoS = double2(glo_maxgeo + 1, glo_maxgeo + 1);
... | 0 |
e52ff38fb4c39a38b10ee3ade220a5ee | 38d6a0f4af52e62a633195c7c271d1bb | verifica se o caminho do bispo está livre para fazer a movimentacao | int isPathFree(struct chess_game *game, char *move)
{
int x1 = move[0];
int y1 = move[1];
int x2 = move[2];
int y2 = move[3];
int i, j;
for (i = 0; i < CHESS_BOARD; i++)
{
for (j = 0; j < CHESS_BOARD; j++)
{
if ((i == y1 && j == x1) ||
(i == y2 && ... | 1 |
a321bd73cd486d8cfbc8e289ce967e1f | 28ca2e4cac16a31efb821b7c40443a0e | 管理员角色设置 | {
$this->load->model('Safety_model', 'safety');
if(!$this->safety->checkRole(2))
{
echo '0';
exit;
}
$am_id = $this->input->post('am_id');
$am_role = $this->input->post('am_role');
$op = $this->input->post('op');
echo $this->admin->settingRole($am_id, $am_role, $op);
} | 1 |
b74b8d2a60ec4adde34e97633b3e26cd | ae9eff23bf4ba738637ef293a84a7b4d | Basic test with three ranges that do not intersect. | (mi,ma) = computeMaxRange3D(self.im1_1)
self.assertTrue(mi==0)
self.assertTrue(ma==1)
(mi,ma) = computeMaxRange3D(self.im8_1)
self.assertTrue(mi==0)
self.assertTrue(ma==255)
(mi,ma) = computeMaxRange3D(self.im32_1)
self.assertTrue(mi==0)
self.asser... | 0 |
1830ea8dc6c93596aa09be97f2148727 | e0878bb439b61e04ade1a272524797ec | Gets a new RationalVector which is the negative of <em>this</em> RationalVector. | public ExtendedDecimal Negate() {
return Negate(null);
} | 0 |
ac7093552ef59c76010c99a1147d67a9 | a5639afff42bcc4ac2d94ea6ce126fbf | Asynchronously reads an array of 32 bit IEEE floating point numbers (multiple holding registers). | namespace ModbusLib
public class RtuModbusClient : IRtuModbusClient
public float[] ReadFloatArray(ushort startAddress, ushort length)
=> ModbusMaster.ReadFloatArray(RtuSlave.ID, startAddress, length, SwapBytes, SwapWords); | 0 |
0f0d7cd3aa228661d41096cc7d9c6c2c | 3d975a4fa4fb1dfb1b3ef3a0e07b49a1 | 保存并解析油价 | $D_Merchant = D('site\Merchant');
$D_CarCylinder = D('car\CarCylinder');
$_cylinderList = $D_CarCylinder->cylinderList();
$D_Product = D('product\Product');
$_product = $D_Product ->clean_form();
$_pro_str = $_product['type'].','.$_product['pid'];
$D_Property = D(... | 0 |
c8eb70c95d23b64e1624976cafa1978a | bd0d879ef0f9bf05e5eb8c421bf0bafb | 递归方式反转k个一组链表 | {
if (head == nullptr || k == 1)
{
return head;
}
ListNode node(0);
node.next = head;
ListNode *l = head;
ListNode **t = new ListNode* [k];
bool flag = false;
while (l)
{
ListNode* nextGroup = nextKNode(l, k);
if (l == nextGroup)
{
return node.next;
}
else
{
... | 0 |
47fa78512e8888efab883857c93770bc | 3910e7d847a248b4860d868a22767853 | Check if person is moving
If the current position is outside of the last box saved,
so the person is considered in movement. In other words,
person is moving if IoU = 0 | person = Person([], Rectangle(Point(0, 0), Point(0.5, 0.5)), 1)
track = Track(
Person([], Rectangle(Point(0.5, 0.5), Point(1, 1)), 1), 1000000)
computed_iou = self.bbox_tracker._iou(person, track)
self.assertAlmostEqual(computed_iou, 0.0, 6) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.