query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a23d0eaf3114c796b62060d619d7eb3a | 1facb3152e6975c3af3735cf07f12138 | set all date pickers to today's date | void MainWindow::setDates() {
ui->dateEdit->setDate(QDate::currentDate());
ui->fromDateEdit->setDate(QDate::currentDate());
ui->ToDateEdit->setDate(QDate::currentDate());
ui->dateEdit_2->setDate(QDate::currentDate());
} | 1 |
66567bb113e22aebbc3b5f37eabb0ec0 | af15bd332bc7ee37dca6f25778d24d6e | PLAN-RUL | def p_rule(p):
p[0] = ast.RuleNode(p[1],p[3],p[5]) | 0 |
de8c0144dfaf10fc0dbd11ed815a5683 | c295f2b1b02d58195bd6b8fc0d829b1a | checks if next state (to_state) is the given state | public boolean hasToState(edu.uci.isr.xarch.instance.IXMLLink toStateToCheck); | 1 |
d2a03ebbbb7bd94129b6bbe52f67a8ab | 6e074dccb4c81834ba2f0e1bb6158e2b | 启动了四个线程,分别执行各自的操作 | public class JavaThreads
public static void main(String[] args)
{
for (int i = 0; i < 4; i++)
{
CreateThread t = new CreateThread();
t.start();
}
} | 1 |
8ce976d00ce85bdaf6c9d288d8bfa49d | 2f6dcd1797f884b093a68691c09c181a | Test resonance structure generation for aromatic species with lone pair resonance | class ResonanceTest(unittest.TestCase):
def test_styryl2(self):
mol_list = generate_resonance_structures(Molecule(smiles="C=C=C1C=C[CH]C=C1"))
self.assertEqual(len(mol_list), 3) | 1 |
e8fcad4eb7adbb36a82250a368789472 | 511bef00933736f5f0710aac468dbaa6 | Trigger Update of Live Data | class StudyBurstActivity : AppCompatActivity(), StudyBurstAdapterListener
private fun refreshLiveData() {
viewModelObserver?.let {
studyBurstViewModel.liveData().removeObservers(this)
studyBurstViewModel.refreshLiveData(this).observe(this, it)
}
} | 1 |
6894e31da2f939d2a5e48d9da889aa3d | 2a3f89a8a5f9691f169dc95edd97b9d1 | Returns the name of the main wiki. In non-virtual mode there is only one wiki called <i>xwiki</i>. In virtual
mode, the main wiki stores information about all the other virtual wikis. | String getWiki(); | 1 |
a0c63356e77ea7685c34e00065dc8d0a | 7c7c15a477b02dc3068ac3af59215a54 | Talep için geçerli olan doğrulama kurallarını alın | class Student extends \yii\db\ActiveRecord
public function rules()
{
return [
[['kitapadi'], 'required'],
[['sinif'], 'integer'],
[['created_at', 'updated_at'], 'safe'],
[['bolumadi', 'kitapadi'], 'string', 'max' => 255],
];
} | 1 |
4d92f354b1ba4848b2086dce666a7ec8 | 3e3726b1a694d88ba472d6f176b09caa | Returns a list of courses for a given subject | $qb = $this->createQueryBuilder('c')
->innerJoin('c.studentSessions','s','WITH','s.student = :student')
->where('c.semester = :semester')
->setParameter('student', $student)
->setParameter('semester', $semester)
->orderBy('c.dept, c.courseNum, c.sectio... | 0 |
b7009b6a21109de0c0dabce327dd7b1b | d02d34b2d71c7e2e79e40a3710bcfe38 | Invalid two-octet sequence | raw = bytes((0x06, 0x10, 0x02, 0x07, 0x00, 0x010))
with pytest.raises(CouldNotParseKNXIP):
KNXIPFrame.from_knx(raw) | 1 |
4145ff075dbe604a286342b1a120a87e | d03d1ee2f59037e9127620be10a47ecc | 信託註記土地所有部例外資料快取剩餘時間 | @Entity
@Table(name = "T_C2_SAPS_730_CZ")
public class Saps73000101RvslChckng implements java.io.Serializable
@Column(name = "ERRTTLNB")
public String getErrTtlNb() {
return errTtlNb;
} | 0 |
149f0d85379feb9c56229f7da2b059f3 | 7d14bbf16fcd485bc0b71fbddac53459 | Saves bad channels and bad segments to a predefined path. | levels =((16,10,1,10,0), (16,10,3,10,0), (16,10,3,10,1), (20,15,3,15,1), (20,15,5,15,2), (20,15,5,15,3),
(30,20,10,30,4))
save_levels(levels, "sonar_evil")
return | 0 |
c975466677889bdea36f5765e04de5d4 | f06ee3c9ecb519c986540967b3aee78d | Call forward_mode; discard value, only keep the derivative. | class FuncWithIncorrectForward(chainer.FunctionNode):
def backward(self, *args, **kwargs):
assert False | 0 |
bbbede1c676a499c2cdd5cb83151a23a | 5b36edaecd18cb28603f4326d0a4bc99 | set the colour of a button to indicate the currently selected draw mode | {
int song = R.drawable.notes;
int artist = R.drawable.microphone;
int album = R.drawable.record;
int genre = R.drawable.book;
switch( mode )
{
case SONG:
song = R.drawable.notes_select;
break;
case ARTIST:
artist = R.drawable.microphone_select;
break;
case ALBUM:
album = R.drawable.re... | 1 |
b93cf40bcf74907114d83e2f7ef349cb | 8d348d91c5df6777df336022622ba566 | Assign last selected types by giving the desired types to be used. | namespace DeCurtis.Insight.Presenters
public class TeamPresenter : PresenterBase
public TeamPresenter AssignUserTypes(IList<LookupItem> userTypesList)
{
this.userTypes = userTypesList;
return this;
} | 1 |
a1e0edb1424a10ebf4cfe87c74a30659 | 5541e644e9a0f01efb496e05e351f720 | Net price change on the day. | @OldElementName("deltix.qsrv.hf.pub.TradeMessage")
@SchemaElement(
name = "com.epam.deltix.qsrv.test.messages.TradeMessage",
title = "Trade Message"
)
public class TradeMessage extends MarketMessage
@SchemaElement
public double getNetPriceChange() {
return netPriceChange;
} | 1 |
f54b137571aab215a91656a0ce535715 | 134feb7fd217012434b8af04cadde305 | Normalize the temperature per the scaling of the governing equations. | class RK_EOS():
def reduced_tempertaure(self, T, Tc):
return c2k(T) / Tc | 1 |
009d18d27e243ca72acdc1fadaf63553 | 2a37d806a31085f51936382a9a8a038b | 获取所需要的学校ID列表,入学年列表,已有ID全集 | Map<String, Object> returnMap = new HashMap<String, Object>();
SchoolTeachCircleOrg stco = new SchoolTeachCircleOrg();
stco.setSchoolYear(schoolYear);
stco.setOrgId(orgId);
List<Integer> states = new ArrayList<Integer>();
states.add(SchoolTeachCircleOrg.YI_TONG_YI);
states.add(SchoolTeachCir... | 0 |
3aa29bdac7410db27450867265f5b4f2 | 18a5f5f709e80c41b43fb995a7398d58 | fetch non available products | {
$query = "SELECT $this->product_tbl.id, $this->product_tbl.name, $this->product_tbl.price, $this->product_tbl.number, $this->product_tbl.image FROM $this->product_tbl WHERE $this->product_tbl.id NOT IN (SELECT id FROM $this->product_hot_tbl)";
$result = $this->db->select($query);
$response = array();
if ($re... | 1 |
1457effc5e36c22d805ec1a07717f897 | 1db2514a679fabe89bbe52b5c53f7046 | 根据书籍id查询图书的书评的总量 | public int findbookCommentNumberDao(String bookId); | 1 |
29a266c01cc8742a3d2b59b1270f2a38 | a47bb9e364ff86b00a79ae5fb3c73cbf | Affiche toutes les villes et les connections entre elles | {
int i=0;
while(i!=NbNode)
{
printf ("%d-%d ", Ville->noeud,Ville->suivant->noeud);
Ville=Ville->suivant;
i++;
}
printf("\n");
} | 1 |
1d68325b1c034b68aded04c65ee5d49b | 3bbb30bca89ad93a9e19bc12c8daaf55 | Removes an element from the DOM tree entirely. | function removeNode(e) {
scrubNode(e);
e.parentNode.removeChild(e);
} | 1 |
68c8bb3ff3feda7057c30ab084189bac | 0aa449cc24f089db089181b35f2c2756 | 获取临时授权凭证 | namespace share.Model
public class QQOAuth
public static string GetTempToken()
{
string myrandomnum = oauthnonce();
string unixtime = GenerateTimeStamp();
string token_parameter = "oauth_consumer_key=" + appid + "&oauth_nonce=" + myrandomnum + "&oauth_signature_method=HM... | 1 |
8033d831892ec658f8f7230e886e7539 | 31d3b4529c1b8a50152be1e10d1ffe0e | Returns the best metric value so far.
Returns | class ValidationCallback(object):
def get_best_score(self):
if self.save_on_minimum:
return self._best_score
else:
return -self._best_score | 1 |
a40682aca1730883b010f319bfecc3fd | 45db3defbbbac3a2f0652e4df1a23f39 | Sets last image that will be sent to the Decoder.
with appropriate error code and message | void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb)
{
decoder->close_cb = close_cb;
} | 0 |
3869ec9738f5eed061ab0b18951180e7 | 3bb1e7efeade081162be0cea5805cec1 | Replaces the Operand child. | namespace retdec namespace llvmir2hll
void CastExpr::setOperand(ShPtr<Expression> newOp) {
PRECONDITION_NON_NULL(newOp);
op->removeObserver(shared_from_this());
newOp->addObserver(shared_from_this());
op = newOp;
} | 1 |
0980538b1791d794649a69ec7d8be3a6 | 0cfe65fe3cf3fa88b28a0d87016bd553 | 分配座位号 | $('.myclass').each(function () {
var data = {
tableId: $(this).children('td').eq(0).find('input').val(),
locationId: $(this).children('td').eq(1).find('input').val(),
department: $(this).children('td').eq(2).find('input').val(),
name: $(this).children('td').eq... | 1 |
76e9e9bc681eac39a82214a12744827b | 9301ccaaa7e83a04c73cac7c5f24473a | 境外项目轮播,原生js | var siteSlide = $('#j-siteSlide')
siteSlide.roundabout({
shape: 'lazySusan',
tilt: 0,
bearing: 0.0,
autoplay: true,
autoplayDuration: 3000,
autoplayPauseOnHover: true,
responsive: true,
minScale: 0.7,
maxScale: 1,
margin: 1.2,
clickToFocusCallbac... | 0 |
02f869e953c9fa8fc9cbab0fc9073e9d | 7b1e053e3f335f2c440d6648168bb171 | Hide all canvas items with the specified tag. | {
foreach (GameObject[] scriptHostObjectArray in TaggedObjects.TaggedObjectGlobals.scriptHostObjects)
{
foreach (GameObject scriptHostObject in scriptHostObjectArray)
{
scriptHostObject.SetActive(false);
}
}
... | 0 |
f35f71dcc616ecc6b3181fdff5007f42 | 74758a9cf63c89277bd8eb705236fd46 | Stops the timer when recording is finished | namespace InfiniteRechargeMetrics.Pages.MatchPages
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MasterRecordMatchPage : TabbedPage
public void StopClockTimer()
{
clockTimer.Stop();
Device.BeginInvokeOnMainThread(() => Title = "Recording Finished");
... | 1 |
a875ecb59ef66dcaec5666f321457b67 | 2dca8db3ca9f150c16917837b0b35805 | Sets the updated_date of this DayContext. | void setDateUpdate( java.util.Date value ); | 1 |
f7abb6e53ac431ade9ea4ae2300ee7d0 | 3fc44d4039cbe83baeca05d772b8c4e0 | Indicates whether the current securable object can be unshared. | export class Sharing
public isShared(): boolean { return false; } | 0 |
29c3e76c81902add7548b888687eb91c | bb769c3f29e81d75d419de6ca662fcd5 | get the user guess and save to guessSet[] | {
using namespace std;
string guessInput = "";
cout << "Enter your guess: ";
getline(cin, guessInput);
repeatGuess(guessInput);
return guessInput;
} | 0 |
4eb6bb2c0fd9340bd91bf5bc9ecd9962 | da6ec61c4ea6298f0fd0733c0e05e66c | 刷新职称列表 | export class ShowPeopleComponent implements OnInit
refreshPeopleSkillList(item){
this.service.getPeopleSkillsList(item).subscribe(data=>{
this.SkillList=data;
});
this.selectedSkill=["ignore"];
} | 0 |
84e27c05ff30054068d1c11c80815ac1 | fb58f88c7d9dce7f5a36cb7d358fd827 | Este método intenta eliminar un objeto de la Base de datos, en caso de
error deja todo como estaba. | public class Persistence
public boolean delete(Object object) throws ValidationException{
boolean closeConn = false;
if (!connectionManager.isConnected()){
connectionManager.connect();
closeConn = true;
}
boolean endSession = false;
if (!connectionManager.inSession()){
connectionManager.beginSession(... | 1 |
0087cf77152e48594309bd4af63445ef | a18dd009df22c092a546489c1ef4fe40 | navigate to the storage management page | class PageNavigator(BaseUI):
def nav_object_storage_page(self):
self.choose_expanded_mode(mode=True, locator=self.page_nav["Storage"])
self.do_click(locator=self.page_nav["object_storage_page"], timeout=90)
self.page_has_loaded(retries=15)
from ocs_ci.ocs.ui.page_objects.object_service i... | 1 |
1c287ab365889777fb367e313d107186 | 1d891746b063cde8be9ccb041c80d3ff | 条件查询单位对应的所有角色 | namespace cPos.Service
public class RoleService : BaseService
public IList<RoleModel> GetRoleListByUnitId(LoggingSessionInfo loggingSessionInfo, string unitId)
{
Hashtable _ht = new Hashtable();
_ht.Add("UnitId", unitId);
_ht.Add("CustomerId", loggingSessionInfo.CurrentLo... | 1 |
428bd1dbb768a728c627742835a1b043 | cda065d82c5801f2250d31cebc00991f | Tarkistaa merkkijonon kieleen kuulumisen NFA:ssa, eli tekee syvyyshaun
autoimaatissa. | RegExAutomaton left = null;
RegExAutomaton last = null;
if (regEx == null || regEx.isEmpty()) {
return new RegExAutomaton(null);
}
if (regEx.startsWith(")") || regEx.startsWith("*") || regEx.startsWith("+"))
throw new IllegalArgumentException();
int pos = 0;
while (pos < regEx.length()) {
char cu... | 0 |
4eba353eebcec76b03be1cebf04a306c | 3acae245e881844b9edd1788783626b9 | Verificar se é o nó final | namespace Proyecto
public class IAMoral
public bool isFinalNode()
{
return indexNode == nodes.Count - 1;
} | 1 |
75a0e627f288648d27a346241313a160 | 17694f4751e4e5d679ffece09f032146 | 精确匹配,不支持2014-13-33 | @RestController
public class ArtPriceRowController extends BaseController
private boolean matchingDateFormat(String time) {
Pattern pattern = Pattern.compile("\\d{4}(\\-)\\d{1,2}\\1\\d{1,2}$");
return pattern.matcher(time).matches();
} | 1 |
ac81206999b66c16792991cba2c70d79 | a3101a880b866b40d73995acd9325145 | Sets the state modified flag to false after it has been saved to disk | void CPartDoc::SetSaved(BOOL bNewValue)
{
SetModifiedFlag(!bNewValue);
} | 1 |
f6bf506266b39c1b3e9989a3bde952bf | e0b2603e5baf242fa048b8adc50d8466 | retourner tous les elements d'un tableau sauf le premier | public function initial($array) {
return array_slice($array , 0 , count($array) -1 );
} | 0 |
45dadeaaf2ece095e993ece851ed9c74 | b2dc304a1a0a284f3a370f2e8e52433b | Funcion que comprueba que el borrado se ha ejecutado de forma satisfactoria | FileUtils io = (FileUtils) new FileUtils().execute("BORRAR");
try{
io.get();
}catch(Exception e){
Log.d("Error", "Error. El main Thread ha esperado demasiado");
}
} | 0 |
87e00236d07ac10c16306edc0bb721b4 | dc5d061f56ec8142f3a945c3b975f2c8 | Description:
Use scapy's api to get list of packets from a pcap file | def test():
with open(sys.argv[1], 'rb') as f:
pcap = dpkt.pcap.Reader(f)
print_packets(pcap) | 0 |
abf340dd4873b1242a15d803ac6b7f4c | 90fcf4875a80c00e2813b6c9274fde1a | Get the "user" part of the supplied email. | at := strings.Index(email, "@")
if at == -1 {
return email
} else if at == 0 {
return email[1:]
}
return email[:at]
} | 1 |
9ec96c3d357b5ea44695709d9d25820c | 2f5195514538ed9b320a915b5edc1757 | Populates the list of times. Duplicate time values are removed. | times = [];
var startTime = Number($("#start-time option:selected").attr("option-value"));
var endTime = Number($("#end-time option:selected").attr("option-value"));
for(let thisTime = startTime; thisTime < endTime; thisTime++) {
times.push(new time(thisTime));
}
} | 0 |
9adbffaabcd887a93fd124fb5d13184a | bb3fac6bef8bd59affd36d0b42f13d10 | 判断目标操作结果是否存在成功结果,'或'关系 | if(operatorList.size()==0)return true;
Boolean returnVal = (Boolean)operatorList.get(0).get("result");
if(operatorList.size()==1){
return returnVal;
}
int size = operatorList.size();
for(int k=1;k<size;k++){
Map<String,Object> resultMap=operatorList.get(k);
String operator = resultMap.get("operat... | 1 |
22baf9d0b5c5bb13eceb148569b579f5 | a2e33ae061aebf95a2c5b49c0ee8cb55 | 将dir.txt的内容恢复到邻接表 | void read(){
struct stat statue;
int fd = open(data_file, O_RDONLY);
fstat(fd, &statue);
int size = statue.st_size;
char* start = (char*)mmap(NULL, statue.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
char* curr = start;
uint32_t from, to, amount, number = 0;;
uint8_t state = 0;
char ch;... | 1 |
08247933349d8d8167ca496a39ab2dc1 | 27be295ac9de1a7e5b9d18b69be212da | we don't want a context message to be appended, so we just return
an empty string | class GloveKB(KnowledgeBase):
def _extract_relevant_context(self, sent, base_word):
return '' | 1 |
f91e6836ae54cbc073f58974e9f46dc0 | 4ab5c9717f2afdafff2442ba14d01193 | 페이징을 통해 이전 채팅 데이터를 서버에 요청하는 메소드 | @RequiresApi(api = Build.VERSION_CODES.M)
public class ChatRoomActivity extends Fragment
private void fetchChatThread(int requestCount) {
String endPoint = EndPoints.CHAT_THREAD.replace("_ID_", chatRoomId);
Log.e(TAG, "endPoint: " + endPoint);
String endpoint1 = endPoint.replace("_PAGECOUNT_", S... | 1 |
a1dfc48b4bbe30328720d307c7487cc9 | 300ad798f56c57951f7b4ea750ecacc5 | Returns all the data needed for the report lines
(account info plus debit/credit/balance in the selected period
and the full year) | class fi_acc(osv.osv):
def get_amount(self,cr,uid,id,period_id,context=None):
result ={
'year_start':0.00,
'year_debit':0.00,
'year_credit':0.00,
'period_start':0.00,
'period_debit':0.00,
'period_credit':0.00,
'period_end'... | 1 |
c8d9dfc7bc31baef131b8e0ce906314b | 1b55693c9f7a40bff1cc6b97522f78b3 | if today is a Sunday, today; otherwise, the next Sunday | func getDateLastSunday() (date time.Time) {
t := time.Now()
td := getTuesday(t).Add(12 * time.Hour)
if t.Before(td) {
date = getSunday(t.AddDate(0, 0, -14))
} else {
date = getSunday(t.AddDate(0, 0, -7))
}
return
} | 0 |
4873fc232429e8e2e059e63b03e4d891 | daecabb2222b76930fbbde3867b162ae | Sends a request with no body | function sendNoParamRequest(node, onComplete){
let url = apiUrl + node;
$.ajax({
type: "POST",
url: url,
success: function(apiReturn){
onComplete(JSON.parse(apiReturn));
}
});
} | 1 |
325f0e027a5304fbec7456094ec02cf9 | 41f0a5a90265da35dfbd67438dc78e27 | Gets order_fee_adjustment_list. | class OrderItem
public function getAdjustmentResults()
{
return $this->adjustmentResults;
} | 0 |
465d7030c979f2442584a548b538917c | 1402601a798a8c4ae7f3093a2ddbcfd6 | Generate field of triangles with size corresponding
to the values of the pixels | assert width_resolution > 1 and height_resolution > 1
num_triangles = 2 * (width_resolution - 1) * (height_resolution - 1)
triangles = np.empty((num_triangles, 3), dtype=int)
idx = 0
for i in range(height_resolution - 1):
for j in range(width_resolution - 1):
triangles[idx][0] = ... | 1 |
f5fe95b988266f579362a9d45ab25f82 | 56454c9a2c7d096848f73bcafe0bc4d8 | Identifies the package with the nearest delivery address and delivers it. This operation happens
in linear O(n) time, where n is the number of packages on board. Auxiliary space complexity is O(1). | def run_delivery():
def update_delivery_status(truck: Truck):
if(len(truck.package_list) > 0):
truck.package_list[0].status = "Delivered at " + current_time | 0 |
87b7639e29f5109574b04f45cb793664 | d245784a9f74b79d2f1bcd9cac70bde8 | On clicking a customer, the table is populated with their appointments | selectedContact = ContactScheduleCombo.getValue();
try {
AppointmentsTableView.setItems(Schedule.getContactSchedule(selectedContact));
} catch (SQLException s) {
s.printStackTrace();
}
} | 1 |
c1ca77988bd027ed64dfc3a35440bac0 | e56483a7d768cbd0eaa304f1f5a823dc | Sanitation filter for Gravatar Hovercard setting | {
$avatar = preg_replace('/.*\/avatar\/(.*)\?s=([\d]+)&.*/', '<img src="/wp-content/themes/landinetwork/img/admin-logo.png" class="avatar avatar-$2" height="$2" width="$2">', $avatar);
return $avatar;
} | 0 |
19dd2b2574e49030a0a5b34c97b5d929 | 340b28babddf67dd88fabfde22da5d4f | *******************************
SPAWN OBJECTS
*******************************
-----------------------------------------
Spawns a tile at the appropriate location
Returns the tile that it spawned | void spawnTile(); | 0 |
01bc1fddee6ff95b93f7ed71bc052c32 | d581c4c49ad8b41959d2661e12ef23c7 | Error creating a text search parser with a bad map | void testParser_59(CuTest *tc)
{
char command[] = "SELECT f2.idontexist, 7 * f1.id + f2.price FROM fruit_stock_1 f1, fruit_stock_2 f2 WHERE f1.id = f2.id";
int size = 3000;
unsigned char segment[size];
db_query_mm_t mm;
init_query_mm(&mm, segment, size);
db_op_base_t *rootp = parse(command, &mm);
CuAssertTrue(tc... | 0 |
4a16591acfacc1d496036b9be14c6b52 | 4c6eda7face1bed23471a90f631e830d | Сохраняет выбранный адрес либо создает новый
и перенаправляет на этап выбора способа доставки | class CartController extends \yii\web\Controller
public function actionNewAddress()
{
if(!Yii::$app->user->isGuest && !Yii::$app->cart->getIsEmpty() && Yii::$app->request->post('Addresses'))
{
$model = new Addresses();
if($model->load(Yii::$app->request->post()) && $model->sa... | 1 |
cdc1e60bd7980a0e900ff598fa159526 | b11a5f0946a14931ccca21fa7bf230ea | 根据状态选择时间片函数 | killState.activeTimeId = $('input[name=' + name + ']:checked').val();
var week = $('#week'),
selectTime = $('#selectTime');
var startUpTime = $('#startUpTime'),
fixedStartUpTime = $('#fixedStartUpTime')
if (killState.activeTimeId === '1') {
week.hide();
selectTime.hide()... | 1 |
e085c0180c9a4d09343e0cc84963c096 | 2f84bd846641b05ba7388101a146448a | Reinitializes all the controls based on current <see cref="TaskDefinition"/> values. | namespace Microsoft.Win32.TaskScheduler
void ReinitializeControls(); | 1 |
44a459d9bdcf756e06cef5c648998f13 | d87a577fe8537a3a914acb96c934199a | Something external to this file is assumed to call this
before the XAListOperation class is used. | __db_xa_complete(handle, retval, rmid, flags)
int *handle, *retval, rmid;
long flags;
{
COMPQUIET(handle, NULL);
COMPQUIET(retval, NULL);
COMPQUIET(rmid, 0);
COMPQUIET(flags, 0);
return (XAER_INVAL);
} | 0 |
1fac4cd4797b6d486d8893375f1db6e2 | 057a7885af47068f5bfed65c9515fc44 | Barebones initializer to declare relevant variables. | def initialize(context):
context.stock_traded = symbol('ZUMZ')
set_benchmark(symbol('ZUMZ'))
context.invested = False
context.leverage = 1.0
context.short = False
schedule_function(my_rebalance, date_rules.every_day(), time_rules.market_open(hours=1))
schedule_function(my_record_vars, date_r... | 1 |
a154b09fa1a533880d70cdf512c5da35 | d7f68c5f60354ed235d925a45c9417bb | Loads the feature for the given frame. | class VideoObjectsFeaturesHandler(FeaturesHandler):
def parse_features(self, frame_number):
return self._parse_features(frame_number) | 1 |
52e5e29319ae5d8fca3dfa5ebbd6a3e2 | df1510f2a4fec0ffb9ca72ceaa481315 | Returns the installed modpacks | class ModPacksController extends Controller
public function browseModPacks()
{
$mod_pack_info = ModPacksModel::getAllModPacks();
return view('browse.modpacks_index')->with(['mod_pack_info' => $mod_pack_info, 'base_path' => url()]);
} | 0 |
7f142bd3f841a805f90af666f44979b8 | fb3d72ac25ec749f0a3c957f9334d9f6 | Устанавливает порядковый номер недели. | class CalendarView
public function setFirstWeekday($firstWeekday)
{
if ($firstWeekday===0 || $firstWeekday===1) {
$this->firstWeekDay = $firstWeekday;
return true;
}
return false;
} | 0 |
70eb7336c30fa816b04b51c4fdc56666 | 8fd9feb256f8b0358d05b350aa3338d0 | function to extract operand (extended format) | uint64_t get_operand(CPU *cpu, cpu_size size) {
cpu_union r = read_memory(cpu, cpu->regs[cur].u8, size);
cpu->regs[cur].u8 += (1 << (size - 1));
switch (size) {
case w1:
return r.u1;
case w2:
return ((r.u2 & 0xff00) >> 8)
| ((r.u2 & 0x00ff) << 8);
case w4:
r... | 1 |
c6c065234847295ad0e0e64db142d056 | 8c5377957af45f4c8d9c0a7404b17e04 | Konvertiert den übergebenen Befehl GetSpeed und extrahiert den Parameter des Befehls. | {
try
{
if (param.Length > 2)
if (param[1] == "-data")
return param[2];
else
return string.Empty;
else
return string.Empty;
}
... | 0 |
f6680ee43941837150317a09181f7ff9 | 921a8685d97a14d10e2f38a221f30816 | Verify that the time is encoded. | with mock.patch.object(self.client, "send_and_recv", autospec=True) as sar:
sar.return_value = bytearray(b'\x00\x00\x17\xc8\x2f\x00\xac\x0f')
seconds = self.client.time_date()
sar.assert_called_with(bytearray(b'\x01\x46\x00\x00\x00\x00\x00\x00\x07\x9d'))
self.asse... | 1 |
c4fa6a754dd80f4c890d64316db89ed1 | 30348b129423be2addbf2c9c22a9be3f | <para>This function checks if there is a message handler registered for the message ID.</para> | bool GuardConnector::unregisterMessageHandler(DWORD moduleId)
{
Assert(moduleId >= 0 && moduleId < MSG_MODULEID_MAXID);
if (moduleId >= 0 && moduleId < MSG_MODULEID_MAXID)
{
if (m_MsgHandlers[moduleId] == NULL)
WarningLn("GuardConnector unregisterMessageHandler check moduleId("<<moduleId<<") already unregistere... | 0 |
661e159551aa5c4e6a3fb360ddd1cbe8 | 65d5ab1d6d63b0c18dc022e1cd049c04 | 发送升级心法的请求 | {
C2S_REQUEST_LEVELUP_DAN msg = SingleInstanceCache.GetInstanceByType<C2S_REQUEST_LEVELUP_DAN>();
msg.protocolID = (ushort)KC2S_Protocol.c2s_request_levelup_dan;
msg.uid = m_PlayerInfo.Uid;
NetworkManager.Instance.SendToGameServer(msg);
} | 1 |
ae4e94204999036f7ff24c32bce81e3a | 52fc2ed208c158b926596d89938f1f17 | Wait until the selected replica DB has caught up to the master.
This allows us to use the replica DB for things that were committed in a
previous part of this batch process. | class BaseSlavedStoreTestCase(unittest.TestCase):
def replicate(self):
d = self.replication_handler.await_replication()
self.streamer.on_notifier_poke()
return d | 1 |
d71de9dea784d7ad7a0b0323cdfb1ee2 | a9232cd86a126409b63b666aa90c85e2 | Функция совершает переход по ссылке перехода для каждого баннера и отдает генератор, содержащий списки редиректов. | def get_transitions_location(url_location):
import requests
rs = requests.get(url_location)
from bs4 import BeautifulSoup
root = BeautifulSoup(rs.content, 'lxml')
transitions = list()
table_transitions = root.select_one('table.pi-horizontal-group')
if not table_transitions or 'Переходы:' not... | 0 |
de0221600007705ed4eaef27b1fc9541 | b20b8c5846f81c7cfe958090d67d9a2f | Gets audio file contents from the session or database | {
if ($this->posting['filelocal'])
{
$audio = THIS_URL . "/audio/" . rawurlencode($this->posting['audio_file']);
}
else
{
$audio = $this->posting['audio_file'];
}
return $audio;
} | 0 |
335afd5a6b730f5c7386cd32f06c929b | fbe862659c2f98a22a6323957ac92075 | obtener un arreglo con los bits de un string de ASCII | result = []
for c in s:
result = result + convert_to_bits(ord(c), 8)
return result | 1 |
4db73dadcb455dfaf7d255ee202e20e4 | 738f147e222b7fa5f9c871fbb8beed97 | Solves a maze with a given type of algorithm. | if (method.equals("dfs")) {
solveDFSMaze();
} else if (method.equals("bfs")) {
solveBFSMaze();
} else if (method.equals("random")) {
solveRandomMaze();
}
} | 1 |
9a2da5637c66ea4d94b697e2b369ec6b | 0a28264e39e7bc71085f0288d7b390fe | Pick game object closest to specified position. | function ClosestGameObjectPosition(gameObjectID) end | 0 |
729bdb7b0c5e01eea16713ef58903f42 | db50a2684110facd7c5c9379bc37472c | ref="DrawFigsE" | class CascadeWindow():
def FigDraw(self):
self.Refreshax() | 0 |
0aca7ab2b991b3aba7f02b32b4caa47d | bb4ff37282eab0d7ad44c54839bddd3d | Sort constraints.
so that get_fingerprint will return the same value deterministically
for the same set of constraints. | fp = self.tools.new_fingerprint()
fp.add_text(str(self.spec))
for dep_name, dep_input in sorted(self.input._params.items()):
fp.add_text(dep_name)
fp.add_text(dep_input.input_fingerprint)
return fp.get() | 1 |
0cca2db03a0dd4222f5559801785320e | 94b6701381c49f10890c7470ad9ae19b | Checks if client wants to go to Stage 2 | public void SecondStageStatement (Player player , Board board , int create); | 0 |
5d4a7ec57d09c5d7279fb99173a003a6 | 377986906924746807c3affa0fc668f0 | 根据订单编号查找订单信息测试 | {
$in=array();
$client = new \SoapClient(config('config.zs_url'),array('encoding'=>'utf-8'));
$m['username']=7223;
$m['pwd']='737a51608fb3297de8b5189cd64fcc3e';
$m['ddbh']='WSCG000081';
$mm=json_encode($m);
$res = $client->findOrderHt(array('in0'=>$mm));
$result=json_decode($res->out,true);
... | 1 |
16854c153f296631ad8161074b068c97 | fa97383cd51e52b3e03a666334adff4a | Loads the config right into appropriate container | class IbrowsRestExtension extends Extension
public function load(array $configs, ContainerBuilder $container)
{
$configuration = $this->processConfiguration(new Configuration(), $configs);
$container->setParameter('ibrows_rest.config.resource_path_prefixes', $configuration['resources']['path_prefixe... | 1 |
e50384d5d64eb5a004c8c4c7d7fcaa7c | 3766702597b1cfffce2218d17890e3ae | 判断是否是nexus手机 | if (navigator.userAgent.match("UA/")) {
var UAS = navigator.userAgent.split("UA/")[1].split("&"),
ver = '';
for (var i = 0; i < UAS.length; i++) {
if (UAS[i].split('=')[0] == 'ver') {
ver = UAS[i].split('=')[1];
}
}
if ((/android/... | 0 |
92fae7341617468f536059499526d14c | 8416d86091b6a2d624e04a2140dd1526 | Might be stringified | match bm.payload_view::<str>() {
Some(Ok(s)) => MessagePayload(String::from(s)),
Some(Err(e)) => MessagePayload(format!("{:?}", e)),
None => MessagePayload(String::from("")),
}
} | 1 |
25f9addb697cf7b8e65a7b57606f5e0c | 76288b1646d28448a34bfd1eeb19fa4d | Handler for Component -> Effects -> Lens Flare. | namespace Chromatics.Layers
public class DutyFinderBellProcessor : LayerProcessor
public override void Process(IMappingLayer layer)
{
var effectSettings = RGBController.GetEffectsSettings();
if (MappingLayers.IsPreview()) return;
DutyFinderBellEffectModel model;
... | 0 |
0d220c306b7e5c7fb0c933dca33683b8 | 35d847d5e0c0fb653ec476858296b9ce | 查询用户关注的所有动态id | @Select("select touid from users_relationship where fromuid = #{fromuid}")
List<Integer> getMyFollowIds(@Param("fromuid") Integer fromuid); | 0 |
80d07ac1c25e2ea31891cefc50fc26bf | 24d23ede04cd6bf81b01f887ee3f8b66 | Ask user to choose an opponent. | class Controller:
def select_opponent_type(self):
opponent_type = input("Choose your opponent: \n 1. Player2 \n 2. Bot \n 3. AI \n ")
if opponent_type == "1":
self.type_player = "Player 2"
elif opponent_type == "2":
self.type_player = "Bot"
elif opponent_type ==... | 1 |
de02835cf3b0882232f676e7c281edad | b2a100657f00bd452965d22d1097ac03 | 0 to 99 | function randomCount () {
return Math.floor(Math.random() * 900000) + 10;
} | 0 |
e8b3a0f8632ee576aa0ec17ecdd081d7 | e382387ebbd306faca1c4763e278d330 | 待收账加载 | $.post(
"ajax/receive_table_data",
{
"randomnumber":Math.random()+""
},
function( returnedString )
{
var data = returnedString;
var jsonObj = eval("("+data+")");
$('#receivables_table').datagrid('loadData',jsonObj.receive_table_data);
}
);
} | 1 |
d9486cecc1a6473e383c1ffe2491cb8a | 872b4fe3ca1be0674a3a72ef2c221092 | Sets the target qubit for this controlled operation. | class QC(object):
def cz(self, c, t):
if c>=self.size: raise ValueError('Control does not exist.')
if t>=self.size: raise ValueError('Target does not exist.')
if c==t: raise ValueError('Control and Target cannot be the same.')
if t<c: t,c = c,t
for i in range(2**(self.size-2)):
... | 0 |
65c134c65d4581b4a7d8b6a750d62404 | 612a5bdba8f36030f6a3a5460f21c726 | Display a listing of the school events. | {
$events = event::orderBy('created_at', 'asc')->get();
$teacher = teacher::where('email', '=', Auth::user()->email)->first();
$designations = teacher_designation::all();
return view('admin.event.eventlist', compact('events', 'teacher', 'designations'));
} | 1 |
66c1b335f4a61da67a0ba59a07f6b9c3 | e002b75beac9c97a5ed64c05209e6c0b | SCF (0x37):
Set the carry flag. | help = """
Flip current carry flag.
Syntax: cfc
"""
cmd = command.split()
if len(cmd) != 0:
if cmd[0] == "help":
print(help)
return
print("[-] error: command doesn't take any arguments.")
print("")
print(help)
return
modify_eflags("CF") | 0 |
3a5dee173512add9af5ba03c3eb5a998 | f4e87d5d9509357856af5abd52286db1 | Carrega referencia de array para a pilha de operandos | void iload(Frame *curr_frame) {
curr_frame->pc++;
u1 index = curr_frame->method_code.code[curr_frame->pc++];
if (DEBUG) std::cout << "iload index " << (int)index << std::endl;
curr_frame->push_operand(curr_frame->local_variables_array.at((int)index));
if (DEBUG) std::cout << "iload\n";
} | 1 |
adfd7bfd22eb79c89b7d640bcc4487a1 | cd8275beaff1e598f4b982e8626efe7b | *******************************************************************
Nom : AddProfPresence
But : Insert la présence d'un prof à un cours dans la base de données
******************************************************************* | $query = "INSERT INTO " . $this->table_name .
" SET institution=:institution, coursename=:coursename, startyear=:startyear, endyear=:endyear, startmonth=:startmonth, endmonth=:endmonth ";
$stmt = $this->conn->prepare($query);
$this->institution=htmlspecialchars(strip_tags($this->instit... | 0 |
6b0680e85f46763c1201b1cf9229969b | 4df0b7b6c8de3dddab7790d2bb944e82 | Проверка все ли аргументы перечислены в докстринге. | def verify_arguments(*argument_descriptions: str) -> None:
if len(sys.argv) - 1 != len(argument_descriptions):
separated_argument_descriptions = [
'<' + description + '>' for description in argument_descriptions]
print('Usage:', sys.argv[0], *separated_argument_descriptions)
sys.... | 1 |
d43670ed90cfd83202f62811d260b446 | 81988a8b16b3818aaebd39a19a1784b5 | Verify that corresponding records are displayed in call list view when clicking the pagination control link in call list view. | public void Calls_27809_execute() throws Exception {
VoodooUtils.voodoo.log.info("Running " + testName + "...");
sugar.navbar.navToAdminTools();
VoodooUtils.focusFrame("bwc-frame");
sugar.admin.adminTools.getControl("studio").click();
VoodooUtils.waitForReady();
new VoodooControl("a", "id", "studiolink_Cal... | 0 |
ec4b24770811ed89c147074b9a25814f | 416e7d09dc0f31d7e33b279b748d89df | Removes the ith "Score" element | public class Student
public void removeScore(int pos)
{
scores.remove(pos);
} | 1 |
22fca931b4aab5386568e93d86db1c6e | 8b45dd902a62c7b30a0c93f993e7c2cf | Constructs a Term from the given token string. | def parse(string):
parser_instance.clear()
return parser_instance.parseTerm(string) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.