query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f208c677537f4f6ae2768384620b1102 | f6c28912e9c6be84f2fc1f9574bf6a0a | Get the parameters of this line in gradient-intercept form. | return {
xi: -(bY - aY),
yi: bX - aX,
xi_prime: bY - aY,
yi_prime: -(bX - aX)
};
} | 0 |
8f95faf0bfac023acf9233c84383f131 | bbb23e12ec5a2e9df6d581f5de5c2c7a | @brief Close a GPT Timer Channel for Input Capture. Implements input_capture_api_t::close.
Clears Timer settings, disables interrupts, and clears internal driver data. | {
fsp_err_t err = FSP_SUCCESS;
err = R_GPT_Close(&g_timer_ctrl);
if (FSP_SUCCESS != err)
{
APP_ERR_PRINT("\r\n R_SSI_Close API Failed \r\n");
}
} | 1 |
b99aa96b826ca3fe12d30bf00dfb03bd | e3d50e855d384928375d87b56c0eec7e | 檢查字符串是否需要顯示兩行 | if (str.search(/[\s]{2,}/g) != -1)
return false;
else
return true;
} | 0 |
fba18c044db3649486bcc1b6ce13bec3 | e715558ba12532ac1f2280cadb2c1375 | Returns a range of all the legal ds rels where docId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting... | @Component(service = LegalDSRelPersistence.class)
public class LegalDSRelPersistenceImpl
extends BasePersistenceImpl<LegalDSRel> implements LegalDSRelPersistence
@Override
public List<LegalDSRel> findByDoc(long docId, int start, int end) {
return findByDoc(docId, start, end, null);
} | 1 |
e9a06f75fa2ca62ea7e540a40b61077b | fe9c6ee1eacb136b606acfdc8975cc3b | Returns the meta object for class '
{@link de.mdelab.sdm.interpreter.core.executionTrace.StoryPatternLinkExecution
<em>Story Pattern Link Execution</em>}'. <!-- begin-user-doc --> <!--
end-user-doc -->
'. | EClass getStoryPatternLinkExecution(); | 1 |
821b2911032f487526e4ab55b1c37832 | 67b557f5a3644ee73d93aa26f057658d | 是否显示模版图片 | public class ClassifyView extends BaseView<List<Category>>
public void setFlagShowImgs(boolean flagShowImgs) {
this.flagShowImgs = flagShowImgs;
} | 1 |
77725623cade2a14d44210d0c238ccdd | 78f9e87172d781e3cbc12c486566749f | Controller for city events routes | [Route("[controller]")]
public async Task<IActionResult> Get([FromQuery]string city, [FromQuery]string state)
{
List<Event> allEvents = null;
if (city != null && state == null)
{
allEvents = await context.Event.Include(e => e.Organization).Then... | 1 |
22f1c514e089ef8bbae4edf93819cdc9 | 0ba12a0b4a3643dc6094ce72a61255a9 | Testa se é lançada exceção caso envie um dado nulo. | public class AgenciaTest
@Test
public void nao_deve_aceitar_valor_nulo_no_numero() {
agencia.setNumero(null);
assertTrue(procuraAlgumErro(agencia));
} | 0 |
c5035832e46c118550dd0d4854c4d8b2 | ee940c7fb049a07caad6c8eb199dbb71 | Method to get the no of components so that we can differentiate b/w a mixture and single component | class DensityHeader:
def DataComponents(self):
__noComponents = 1
if self.fileType in densityDataComponents:
__noComponents = densityDataComponents[self.fileType]
return __noComponents | 1 |
6606c1499d1c6231bca39a26ffc73ef2 | 8146acea686b4a201e33d58bde02a718 | 用户预约球赛 | $brand_id = $input_arr['brand_id'];
$venue_id = $input_arr['venue_id'];
$schedule_id = $input_arr['schedule_id'];
$course_id = $input_arr['course_id'];
$start_time = $input_arr['start_time'];
$number = 1;
$date = $input_arr['date'];
$os = $input_arr['os'];
$m_id = $input_arr['m... | 1 |
0249ee422570d00f460190cf12d65a29 | 4669f8d28dac1c80ae271c67d5c1e830 | make the app run on fullscreen | int main() {
ofAppGLFWWindow win;
win.setMultiDisplayFullscreen(true);
ofSetupOpenGL(&win, 1280, 720, OF_FULLSCREEN);
ofRunApp(new ofApp());
} | 1 |
7e3da285a23ae7133ad2c2c0e867760c | 9b52389662b72d834301d1a5e61b9a0a | Attempts to interpret this instance as List(UInt64). | {
TypeCode code = GetTypeCode(value);
if (code == TypeCode.UInt64)
{
result = (ulong) value;
return true;
}
else if (code == TypeCode.String)
return ulong.TryParse((string) value, NumberStyles.Any, Cultu... | 0 |
ff9784db8cb1a338ae921f5115648e6c | 53d9c2fe698855576ff5f6f585a26999 | Computa el precio total del camion (cajones*precio) de un archivo | def leer_camion(file_name):
return parse_interable(file_name, types=[str, int, float]) | 0 |
2d2c2ecc8aeef1f47160d7ba81e6ca8b | 4de96f188fcea567e89eec43658af4d9 | POST: AdminMenu/Create | public ActionResult Create(MenuViewModel MenuViewModel)
{
try
{
MenuSubSubServices.Create(MenuViewModel);
return RedirectToAction("Index");
}
catch
{
return View();
}
} | 1 |
e34a320d8e706eef781b9e434e491086 | 4939f041498882389b3d9d57e4df338d | funtion - make reports for sales by payment method | class Reports extends Secure_area
function summary_sales($start_date,$end_date,$sale_type,$export_excel=0,$location='default')
{
$loca = urldecode($this->input->get('loc'));
if ($loca) $location=$loca;
$_data['view']='reports/tabular';
$_data['export_excel']=$export_excel;
$rangeDays = $this->range_days($sta... | 0 |
4dc449be42da68fa6d35297ebde9893a | cd7378084b10af511211275ae423fde4 | Returns a data for remote command execution (data using another application services). | class ConnectorBase implements Connector
public getRemoteData(model:MonitorModel):void {
throw {
name: 'Error',
message: ConnectorBase.MESSAGE
};
} | 0 |
f1a0510efc973860ed1452c5c08fd1bc | 711a2fd4aec225b81069217dbaa6df7f | функция, която сортира вектора в нарастващ ред | {
for(int i = 0; i < v.size() - 1; i++)
for(int j = v.size() - 1; j > i; j--)
if(v[j-1] > v[j])
swap(v[j-1], v[j]);
} | 1 |
ca02af3f60a3d30dcec22584cde7567b | b9a8a071ba890d92f332bb6c4cc60ce0 | 得到mobj里的所有文本 | namespace WeTest.U3DAutomation
class UGUIHelper : UIBase
public List<string> GetInChildrenTexts(GameObject obj)
{
List<string> txtNames = new List<string>();
try
{
if (obj == null)
return txtNames;
Text[] txts = obj.GetC... | 1 |
4370324ffdc4cbfa094f048b9b980e95 | 882f66a79eb5106f50b018c6f50459f5 | ConfigをDOMにセットする | class SOYCMS_Info_Plugin{
function config_page($message){
include(dirname(__FILE__)."/config.php");
$form = SOY2HTMLFactory::createInstance("SOYCMSInfoConfigPage");
$form->setPluginObj($this);
$form->execute();
return $form->getObject();
} | 0 |
56609f83f8794cfc5f4c43446363a3fb | e117bf83ffa8493524503fdabb10033a | Javascript入力チェックエラー時のメッセージを返す | var errors = control.errors;
var msg: string = '';
for (var k in errors) {
if (errors.hasOwnProperty(k)) {
switch (k) {
case 'required':
msg = '必須入力です。';
break;
case 'maxlength':
msg = errors[k].requiredLength + '文字以下で入力してください。';
... | 1 |
59b1a028285173bee8e07f779b54d305 | 707545cb8b7c88559639e6e7b8977853 | 加载每日必应一图 | function EveryDayOneWord() {
$.ajax({
type: "POST",
url: 'https://api.hibai.cn/api/index/index',
dataType: 'json',
data: { "TransCode": "030111", "OpenId": "123456789", "Body": "" },
success: function (result) {
$(".widget-sentence-content").append("<h4>" + result... | 0 |
cf3ddba6cc4c9a6c9d4859d8a0316825 | 2e7041ff3365535eb29496b14a61dd7c | Checks if training is done | class BaseStudent
public function getTrainingDone()
{
return $this->TrainingDone;
} | 0 |
1e11a08ed671daadb2abc83217414110 | f713ff1d31e90244d56e4322841c75fb | 读取职业表 | if self._occupation_hierarchy is None:
self._occupation_hierarchy = self.read_csv(self.dir + 'ESCO_occupational_hierarchy/ESCO_occupational_hierarchy.csv')
return self._occupation_hierarchy | 1 |
19af18fbf73c37336acc6cb2821c1030 | 72ac160ceb6c6d31987ad318c95213ed | Get metadata Get SAML metadata from the server. SAML must be configured properly. ##### Permissions No permission required. | self, body: str, transport_options: Optional[transport.TransportSettings] = None
) -> models.SamlMetadataParseResult:
response = self.post(
f"/fetch_and_parse_saml_idp_metadata",
models.SamlMetadataParseResult,
body=body,
transport_options=transport_op... | 1 |
f47f86568a4fd8e0b4ec1090657f1560 | 013f9f2ce732e9b5fea7f7ce4690d782 | If the time is between sunrise and sunset, we can read out the controller | {
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10,GPIO_PIN_SET);
RTC_get_Time_and_Date();
if((red<=1000) && (green<=1000) && (blue<=1000))
{
if(sunrise_timer!=myTime.Seconds)
{
red=red+50;
green=green+16;
blue=blue+2;
FLbrightness=FLbrightness+50;
set_FL(FLbrightness);
set_RGB(red,green,blue);
sunrise... | 0 |
9d37f234d3cc148a841fc03d1c865221 | 2f153fd816ae848dd963126ea834fe12 | Parse progress from the log file. | raw = defaultdict(dict)
re_line = re.compile(r'^\[(.*?)\] VERBOSE\[(\d+)\] (\w+\.c): (.+)')
re_out_init = re.compile(r'-- Executing \[\d{5,}@from-internal:1\].*')
re_out_user = re.compile(r'.*?"AMPUSER=(\d{4})".*')
re_out_cid = re.compile(r'.*?"USEROUTCID=(\d+)".*')
re_out_ans = re.compile(r'.*?... | 1 |
5c20c1e692c2ad5a70274ea86de992d8 | a8708e6b3cb10dd21aec6bd719bf40b8 | Перемещение всех точек на указаннное растояние | {
for (int i = 0; i < Points.Count; i++)
{
Vector2 p = Points[i];
Points[i] = new Vector2(p.X + x, p.Y + y);
}
} | 1 |
3f492f1398525a75110d9e5b7fa04502 | 7d2258ff89a71f33659f61817ae826e5 | 功能:'.'不能出现在字典键值中,因此将ip,cname,邮箱等的'.'进行处理 | func formatEmail(email string) (mail string) {
letter := string([]rune(email))
for _, l := range letter {
if string(l) == "." {
mail += "_"
} else {
mail += string(l)
}
}
return mail
} | 1 |
01586b94ed0a849d40e2d189f7bb718b | 74b3453424622774a7d542dfff8f34f9 | 重载除法运算符 | BigInt operator/(const BigInt& lhs, const BigInt& rhs)
{
BigInt tmp(lhs);
tmp /= rhs;
return tmp;
} | 1 |
f7fb6716973b724a210d9ae0f38c3c47 | debd897df25b0a2e4b24f94a2e595f5e | Asyncronously inserts the scraped data of an inmate into the mongodb. | class ZipCodeSearch(object):
def _writesearchtomongo(self, search):
scraper_db = self.mongoclient.scraper
search_collection = scraper_db.search
search_collection.insert_one(search) | 0 |
4b861426fa81a21ee75a7c1f8f23247e | 6ad7b3ea63db09b48e0334e87da3b4ac | Initiates the asynchronous execution of the ListResourceSetResources operation. | namespace Amazon.CodeGuruReviewer
IAsyncResult BeginListTagsForResource(ListTagsForResourceRequest request, AsyncCallback callback, object state); | 0 |
671e32f5794a3f77a85846853a46d101 | 296322d90db5ad44e43cd24a055d91ab | Adds and then Squares the numbers | def squared_sum(a, b)
x = (a + b)
return x ** 2
end | 1 |
fb85c2b5046eb9b5dd5fba441fbefd06 | 38b39f6b6b7a3e3405a9eb3e3659c660 | Finds the longest sequence of zeroes in a
binary string derived from an integer | public class BinaryGap
public int Solution(int N) {
int[] binaryInt = Preprocess(Integer.toBinaryString(N));
int len = binaryInt.length;
ArrayList<Integer> binaryGaps = new ArrayList<>();
for(int i=len-1; i>=0; i--) {
if(binaryInt[i] == 1) {
if(flag) {
binaryGaps.add(zeroCounter);
zeroCounter =... | 1 |
a2e2a8224b5e38fb38841ec95225ff9e | e269a016d3650998b1d15f43f87e697d | Движение корабля вниз | class Battlecruiser(pygame.sprite.Sprite):
def down(self):
self.dy = self.speed
self.direction = self.get_direction() | 1 |
e2b7b1d7ca27fde99c4c15fda393f824 | 34e8688e609a8330dd9ed1064610ea85 | Determine the records that are in the cache but not in the data that needs to replace the cache content.
These records will need removing from the cache since they are not part of the data received, and do not need updating. | $sourceFiles = $this->getFolderContent($this->sourceStorage, $path);
$targetFiles = $this->getFolderContent($this->targetStorage, $path);
$targetCacheFolderData = $this->targetStorage->getCache()->getFolderContents($path);
return array_filter($sourceFiles, function ($file) use ($targetFiles, $path, $targetCache... | 1 |
4e540538d12561b25a579f7ee5942a36 | 62e6e910da8e8ed6c39027e3d4e0cf95 | 随机产生父代基因 | {
double[] p1 = ParentList[0].DNA;
double[] p2 = ParentList[1].DNA;
int[] cutPoint = MakeCutPoint(Common.MyRandom.Next(1, p1.Length), 0, p1.Length);
Array.Resize(ref cutPoint, cutPoint.Length + 1);
cutPoint[cutPoint.Length - 1] = p1.Length;
... | 0 |
29875a6a430829ed2d374b904585d90b | 30fd62e48faaf9e4d8653ead4eeef57a | 转院数据统计表 | @Slf4j
@Controller
public class PersonalCenterController
@RequestMapping("hospitalizationDataInfo")
public String hospitalizationDataInfo(){
return "home/view/hospitalizationDataInfo";
} | 0 |
335876c09373e008407a03dbda86de0b | 530a1bc27151c423caaf9492fb1d4062 | Link media to a post | if ( isset( $GLOBALS['wp_post_media'][ $meta_key ] ) ) {
$GLOBALS['wp_post_media'][ $meta_key ]->post_media_input_html( $post_id );
}
} | 0 |
aea71b55916e47638b16d38783340796 | 8ac4d43bb50807efb1e5ad1b8f26c8c9 | Convenience method when framework name is seame as the realm ID | public boolean registerSepiaFramework(); | 0 |
02d6cdd1524ed48daa1e544ffc4df937 | 4e97f95372b9d408864db5d8c92b006c | We initialize all member variables. In general, this sets the values to 0,
<nl><md WiaEventNotifier::m_ulSig> is set to be WiaEventNotifier_UNINIT_SIG.
<nl><md WiaEventNotifier::m_cRef> is set to be 1. | :
m_pLogger(pLogger),
m_pParameterInstances (pParameterInstances),
m_pSignalHandler (pSignalHandler),
m_sLogSubSystem ("ui"),
m_sContextUUID (AMCCommon::CUtils::normalizeUUIDString (sContextUUID)),
m_sSenderUUID (AMCCommon::CUtils::normalizeUUIDString(sSenderUUID))
{
if (pL... | 0 |
b34553c2e267a0f78cc5ab3eabe135b4 | d0fd238d29d42ad0863717b739265af9 | Supports dictionary-like retrieval, with square brackets []
key is course info, which is a (dept, id) tuple. | class LuffySchool(BaseModel):
def courses(self):
return self.__courses | 0 |
f573604b2b8cecaf78ebfbb5b84c5a6c | 1c4c2244c8a4d9d1276ad5192af472f8 | 分页获得设备权限记录列表 | public List<CssdEquipments> getRecordsByPaging(String appCode,PagingModel model) {
if (StringUtils.isNotNull(model)) {
model.setPageIndex((model.getPageIndex()-1)*model.getPageSize());
return cssdEquipmentsMapper.getRecordsByPaging(appCode,model);
}
return null;
} | 1 |
87d5a01496021b2b4f23cfe7aec6cd2d | f00c8c3616725806e9c6ce5bbbd111fa | Gets the extra_tokens of this PassportPDFPassport. # noqa: E501 | allowed_values = ["asc", "desc"]
if self.local_vars_configuration.client_side_validation and supplementary not in allowed_values:
raise ValueError(
"Invalid value for `supplementary` ({0}), must be one of {1}"
.format(supplementary, allowed_values)
... | 0 |
73574ac36476b2acc91b22ba96049440 | 4f60d9824db1d3721cbcb18aebe9d53d | 2-dim version of `range_1d_nb`. | def drange(v0, v1, d):
assert v0 < v1, str((v0, v1, d))
return range(int(v0)//d, int(v1+d)//d) | 0 |
9b3684e83ef141db367a01dadb952f04 | 19efba5f8cd10ea6dd37d568d023fcb6 | buscas las escuelas y las muestra en el combobox | public class RegistrarPlanDeEstudios extends javax.swing.JFrame
public void llenarCbxEscuelas() {
PlanDeEstudioDAO dao = new PlanDeEstudioDAO();
cbxEscuelas.setModel(dao.llenarComboBox());
} | 1 |
c8597f312aac847ff894d8e1de18feaa | 4491a775e78a97e0874c96d6d7ef03b6 | Destructive multiply | namespace surreals
Surreal &Surreal::operator*=(Surreal const &other) {
Surreal tempSub = *this * other;
this->left = tempSub.left;
this->right = tempSub.right;
return *this;
} | 1 |
23e50f458a8e90cbdb3b0f7d254b7e1e | f2f5fd84ed5b6841abee2f3ecf60e882 | @brief SFMTによる乱数系列を初期化します | {
register uint32_t j, jm1;
state[0] = s;
#if UINT32_MAX > MT32_RM
state[0] &= MT32_RM;
#endif
for (jm1 = 0, j = 1; j < MT32_NN; j = (jm1 = j) + 1) {
state[j] = (UINT32_C(1812433253) * (state[jm1] ^ (state[jm1] >> 30)) + j);
#if UINT32_MAX > MT32_RM
state[j] &= MT32_RM;
#endif
}
left =... | 1 |
f8b34cfc4f9e0fff0769d8d75b02a8d0 | 69b0672dfa5aa60bfa068d9f1fc664db | Get the maximum number of redirects to follow during HTTP operations | class System_Http
public function getMaxRedirects()
{
return $this->_maxRedirects;
} | 1 |
45f152d2f963efb3c26e9193301356a6 | 915d365f60e65abe9a80d9c21a7a83c3 | Adds a rotation schedule to the secret. | {
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling RecordingApi->PutRecordingkeysRotationschedule");
var localVarPath = "/api/v2/recording/recordingkeys/rotationschedule";
var localVarPathParams = new Dictionary<Str... | 1 |
ed7d37843786b220d442dc909a3c12f7 | 25bf09156b84e9ff4c7b9e703dd5eecc | For each dimension, finds the minimum sample value | def dim_zero_min(x: Tensor) -> Tensor:
return torch.min(x, dim=0).values | 0 |
0a2266d8714bcb6f866106b6dfabf8a4 | 153d78bfec2bb0c254c6888f0b7356a3 | Sends a logging message containing
location (channel), and ID of the message deleted | public void sendDeleteMessage(String objectId, ObjectType objectType); | 0 |
4cb468769ef493732ddb557b2305defc | 44b40bce96250a96db11ab1c4fcfacfe | Performance characteristic: probability that query is lost because of buffer is full | double getBufferHitRatio(); | 0 |
fe9d0b800a718c16260c8df458d5a3f3 | aa4fcad559df4d0c6b4402fb39a700f8 | High Resolution TIMER1E
HRTIMER1E global initialization for high resolution time base usage | mach_timebase_info_data_t timeBaseInfo;
mach_timebase_info( &timeBaseInfo );
assert( timeBaseInfo.denom == 1 );
assert( timeBaseInfo.numer == 1 );
_initAT = UpTime();
_startAT = _initAT;
_hrtInitialized = true;
_hrtFirstHyperperiod = true;
} | 1 |
c12549af503bbd372bf19b5bb070a39a | 6ed8c1407969ec4fba391c7864a336c8 | Create an entity for this test.
<p>
This is a static method, as tests for other entities might also need it,
if they test an entity which requires the current entity. | @RunWith(SpringRunner.class)
@SpringBootTest(classes = CpdaimlerApp.class)
@Ignore
public class CarResourceIntTest
public static Car createEntity(EntityManager em) {
Car car = new Car()
.model(DEFAULT_MODEL)
.status(DEFAULT_STATUS);
return car;
} | 1 |
b00077b1d9ae3260456d63d85e824a04 | 6b5b77f0e3ce7126c6ad2736133d7b41 | Adiciona uma nova linha na janela de conversa de saida de cliente | String msgOut = "";
try {
DataOutputStream dos = dos = new DataOutputStream(s.getOutputStream());;
Document doc = msgArea.getDocument();
msgOut = msgText.getText().trim();
doc.insertString(doc.getLength(), "\nClient: " +msgOut, null);
dos.write... | 1 |
a596345413152bb156b72de4b97a22c8 | ade0a59b79c5452233298dd60a4d8879 | Create new order delivery with all goods. | class DeliveryService
public static function createDeliveryOrder($data)
{
return DeliverOrder::create($data);
} | 1 |
b97343152e0434606add6c77eeaf8c9d | bc039dc465fd8ce838bfd2ed099fced1 | last-applied-configuration should not be copied from the SecretDef to the Secret | public void testDuplicateConfiguration() throws Exception
{
final HawkServerConfiguration configuration = new HawkServerConfiguration.Builder()
.timestampSkew(123L)
... | 0 |
5e86082e9f5967128f8937ceae6ff12d | ef716f3a32bac1f73f8c7175dd656b7b | Provides the identities of all concept-level frames of which
the instance-level frame is a direct instance. | List<VerbFrame> getVerbFrames(); | 0 |
13d785afada466a57de05d5d0265d166 | 1e0a1ce00cd4b63a9a94bc37b90dc73a | Computes the population covariance matrix.
Feature matrix should contain rows as samples and columns as features | X_mean = torch.mean(X, dim=0)
X_mean_matrix = torch.outer(X_mean, X_mean)
X_corr_matrix = torch.matmul(torch.transpose(X, 0, 1), X)/X.size(0)
cov = X_corr_matrix - X_mean_matrix
return cov | 1 |
0f282f3c48d548e0630898ad36bb5836 | 144246f46ac726558e22576ccca79ed5 | Preloads the resources used by the Dialogue System to avoid delays caused by lazy loading. | void LoadResources(); | 1 |
8baa9e1ca426fa58238e066e6696b355 | b666813bf0607f26f08157a6824da946 | set no limit for the number of entries (default behavior) | @SuppressWarnings("rawtypes")
public final class Table
public Table addLimit(int limit) {
return addLimit(limit, false);
} | 0 |
503ca3e79cf65e5ae664b958ee13cc00 | 25757ac562de9b0e6d7f0ad61a4c9f6c | Check that an element name and attribute name match the expected values.
The expected values are passed as an array reference of string pointers
provided as the userData argument; the first is the expected
element name, and the second is the expected attribute name. | inline namespace
bool elem_name_is(const TiXmlElement *elem, const char *name) noexcept {
if(strcmp(name, elem->Value())) {
std::cerr << "Parser: bad element type: expected '" << name << "', but got '" << elem->Value() << "'\n";
return false;
} else return true;
} | 0 |
2426dedebe3a507446ae52e35e831a98 | f142b66a55edef7aa935fbff3a2eae6e | Atualiza a vaga no banco | if self.api.payload is None:
return make_response(jsonify({'erro': 'conteudo invalido'}), 406)
return dao().update(self.api.payload) | 1 |
f440842d91f189f74b76677c96996bbe | 51f0c11329701feb59b58f75de8c654c | Advance linear scan iterator | static void ht_iterator_scan_adv(ht_iterator *it)
{
if (it->cur_block != NULL)
{
it->cur_block = it->cur_block->next_chain;
if (it->cur_block != NULL)
{
it->still_valid = BCMOS_TRUE;
return;
}
else
{
it->cur_idx++;
}
... | 1 |
9507c3fdb10a3e6ea34f3d815e7d9a58 | 21c4ec3b828d20e89692c2a1eb8aa26d | Displays job interview questions for student via AJAX | class JobInterviewsController extends Controller
public function index()
{
$user_id = Auth::id();
$searchQuery = isset($_GET['search'])?trim($_GET['search']):"";
$where = ['status'=>1,'user_id'=>$user_id];
if(!empty($searchQuery)){
$where = [
['test_tit... | 0 |
35743922e21501458441116353f6b8fe | 4a87d7c69db72003bb47960d4d1cb486 | Parses the INI file and generates the rule list, adding default=false
if no default is specified for that role (deny by default). | class AclConfigurator(object):
def _create_rules(self, instance):
for role_name, rule_list in self.rules.items():
self._create_rules_for_role(instance, role_name, rule_list) | 0 |
803c23dbf5a059ec781c89ea944be451 | 4cc14014343d96ad5fd0d41f7b65cf52 | Changes colors of the blocks that indicate progress through the form | function updateColors() {
var dailyBlocks = $("textarea");
dailyBlocks.each(function(index){
idOfEl = parseInt($(this).attr("id"));
$(this).removeClass("past");
$(this).removeClass("present");
$(this).removeClass("future");
if(idOfEl < currentHour){
$(this).ad... | 1 |
1e05858ef781587d732ee81ddd33f35f | b6ed1cbb07843984fdba93792579db72 | Funkcja obsługująca naciśnięcie przycisku Graj od początku. | namespace GuziecCheckers
public partial class Kalibracja : Page
private void button_Click(object sender, System.Windows.RoutedEventArgs e)
{
try
{
t.Abort();
Rozgrywka rozrywka = new Rozgrywka();
NavigationService nav = NavigationServic... | 1 |
177f91f522960ec4dce22f32f55c06cb | bd1084f03bb97d6d3b54575b2bde8927 | Whether the parameters of the functional code may be analysed. | public class CommonModel implements CommonConstants, ClassDefinition, StationDefinition, SimulationDefinition, BlockingRegionDefinition
public boolean isParametricAnalysisEnabled() {
return parametricAnalysisEnabled;
} | 1 |
6d18c0dad8572c27f389adbb916046a5 | 9e3983e003171310fe82988c27eb120c | Get the to date summary. | orders = Order.object.filter(time_of_order__date=datetime.date.today())
serializer = OrderSummarySerializer(orders, many=True)
return Response(serializer.data, status=status.HTTP_200_OK) | 1 |
5ba2aa82a5c5f824352a1de61cb637de | 0030594b3896a36cd4e54072373323ba | Creates a new <see cref="AdGroupCriterion"/> configured for an
<code>ADD</code> operation. | namespace Manychois.GoogleApis.AdWords.v201609
Task<AdGroupCriterionPage> QueryAsync(string query); | 0 |
00c8fa9bdad95383c3937638eacf2a1f | c23e0e91ee9e025a69278849cd8a8817 | A simple forever loop over a queue, executing the actions in it | namespace Djs.Tools.CovidGraphs.Data
public class ThreadManager
protected class ThreadWrap : IDisposable
private void _RunActionsQueue()
{
while (!__End)
{
ActionInfo actionInfo = _DequeueActionLock();
if (actionInfo == null... | 1 |
ca7c7e75bb56c96580bc04f26d394d9d | eeb81d4ae7b298f62a92217b94dfa116 | 给账本创建默认分类 | String[] categoryName = {"交通", "主餐", "水果", "零食", "通讯", "生活用品", "工资", "借入", "收款", "还款", "借出", "转账"};
int[] categoryType = {0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 3};
CategoryDao mCategoryDao = daoSession.getCategoryDao();
for (int i = 0; i < categoryName.length; i++) {
Category cate... | 1 |
4d96232cf09b702dc886b7079810526f | d255a2c49ecb02f5fcc7d7dc70e5a2b0 | Gets the clip inspector with access to the specified ClipControl. | {
ScriptControlDescriptor descriptor = new ScriptControlDescriptor("TimelineScheduler.TimelineSchedulerControl", this.ClientID);
yield return descriptor;
} | 0 |
991a4782792ce8a77698fa0fa5df9161 | 3b926d0d19fed80e019f58dc462755ad | Sets the number of used interrupts and finalizes the GIC init explicitly. | {
volatile uint32_t *irqEnClrAddr = (uint32_t *) M4_IRQ_EN_CLR_START;
intrNum -= M4_NUM_NVIC_INTERNAL;
while ((intrNum > 32U) && (irqEnClrAddr < (uint32_t *) M4_IRQ_EN_CLR_END))
{
intrNum -= 32U;
irqEnClrAddr++;
}
*(volatile uint32_t *) (irqEnClrAddr) = ((uint32_t) 1 << intrNum);... | 0 |
09936e002c7e604fb6081c4d85ffe5bf | 9d5f28bbffa81f2c11808d990783520b | Adds a new company. Returns id of the added company. | @RestController
@RequestMapping("/api/v1/company")
class CompanyController @Autowired constructor(private val companyService: CompanyService)
@PreAuthorize("hasRole('ADMIN')")
@PostMapping
fun create(@RequestBody @Valid registerCompany: RegisterCompany): ResponseEntity<IdDto> =
ResponseEntity.ok(IdDto(c... | 1 |
a80cf65373ddd332c7b93879ef126f62 | d69144cfe68b5d84a5f36feaa5ebd05a | Transform indoor eCO2 values to IAQ points. | if 0 <= co_val < 3:
iaqi = cal_linear(0, 50, 0, 3, co_val)
elif 3 <= co_val < 5:
iaqi = cal_linear(50, 100, 2, 4, co_val)
elif 76 <= co_val < 116:
iaqi = cal_linear(100, 150, 75, 115, co_val)
else:
pass
return iaqi | 1 |
19bb01a99b3286e494ab00065189423b | 0ebabd7e2397bce6140ee025419d33a5 | 找到链表倒数第k个结点的位置 双指针 | public class FindKthToTail
public ListNode FindKthToTail(ListNode head,int k) {
if(head==null||k<=0){
return null;
}
ListNode fast=head;
ListNode slow=head;
for(int i=1;i<k;i++){
if(fast.next!=null){
fast=fast.next;
}else{
... | 1 |
ad2adea6b3ccc3871d2c71837893a74e | 944e955c5694a593144e6f3753a934a4 | Return a random RGB color using datatype specified. | static cv::Scalar randomColor(cv::RNG& rng)
{
int icolor = (unsigned)rng;
return cv::Scalar(icolor&0xFF, (icolor>>8)&0xFF, (icolor>>16)&0xFF);
} | 1 |
0eb6c11d179844165131903ee4b2c16f | 1d5c716e03a0e336ed6a3039b2670c14 | function to use with scipy.optimize | def brute_optimize(func_to_call,true_values,error=None,loss=objective_l2,
brute_dict=dict()):
objective = lambda *args: loss(func_to_call,true_values,*args,error=error)
return _prh_brute(objective,**brute_dict) | 0 |
0eca7d9d4bd8005de0ba69ccf2c005b8 | 9379327a80da4c216826a174c61b48d2 | Sort each individual bucket | {
vector<float> *b = (vector<float> *)buckets;
for (int i = 0; i < NUM_BUCKETS / 2; i++)
sort(b[i].begin(), b[i].end());
return NULL;
} | 1 |
aea9b83ac6b687e6fa19c4ea14c76399 | dbdc956008f958deb926f97718f081ae | 外部リンク契約フラグを設定します。 | public class ProjectContractApplyBean implements Serializable
public void setIsFrameContract(String isFrameContract) {
this.isFrameContract = isFrameContract;
} | 1 |
4a4e00f4b861778732f5f640aeaabc4c | 7f61448ad6da3ef0f9cb03f40c5be655 | + 1 is to display a header row | cases like (1) | 0 |
917aef362b421f2284063281cbd9f945 | 43135a30b9035a7aa008d7502ab38ccd | Get the list of users attending a talk | class ModuleTalk extends Module
public function GetUsersTalk($sTalkId, $aActive=array())
{
if (!is_array($aActive)) {
$aActive = array($aActive);
}
$data=$this->oMapper->GetUsersTalk($sTalkId, $aActive);
return $this->User_GetUsersAdditionalData($data);
} | 1 |
8d8d3c9959dedb77391abbd23f4260f5 | 8056397714980f880d77344b6eb8f0cf | # Ref: http://en.wikipedia.org/wiki/Rosenbrock_function, http://www.it.lut.fi/ip/evo/functions/node5.html | def rosenbrock(x):
f = 0.0
for i in range(len(x)-1):
f += 100.0*(x[i+1] - x[i]**2)**2 + (1 - x[i])**2
return f | 1 |
aec62fca53291d8a75d330edc1e4a79e | 3e7e4a597c7389ebc99217557db64335 | Metodo que analiza recursivamente si una secuencia pertenece a un AFD
partiendo desde un nodo dado | if((*visitedStates) == NULL){
(*visitedStates) = intArrayInit(10);
}
DFA* current = head;
intArrayAdd((*visitedStates),head->state);
transition* currentTransition;
for(int i = 0; i < current->transitions->used; i++){
currentTransition = current->transitions->array[i];
if(... | 1 |
0133868be5faee4f38a2f28563af58c2 | fadf6f2ce6d8aa671fbd2f5594d255f8 | Keep on generating random points until we find one we haven't tried to
attack before | x_rand = sample_state(grid)
while grid[int(x_rand[0]), int(x_rand[1])] == 1:
x_rand = sample_state(grid)
return x_rand | 0 |
d83e360ee05eb67c3fb77bf8ac6f4ac7 | 399f616528dbb7595c2307e8b3d54979 | Grab a statistics snapshot from multiple test servers. | class TestMonitor:
def test_push_statistics(self, farm: Farm, context: dict, cloud: Cloud, servers: dict, testenv):
roles = {}
CONF.feature.platform = Platform('gce')
CONF.feature.branch = 'master'
for dist in ('ubuntu1604', 'centos7', 'win2012'):
roles[dist] = lib_farm.add_r... | 1 |
a6c536f568715fc9eb11b5aafe3c9b6c | d0c64b09811ca836fe64e4f81f7f4338 | Refund student eDollar | class StudentRefundController extends Controller
public function destroy(RemoveStudentRefund $request)
{
$studentRefund = StudentRefund::findOrfail($request->id);
$studentRefund->delete();
return ezReturnSuccessMessage('Refund removed successfully');
} | 0 |
46ea354dd0c920bcd04f3ff71819fa0e | 6577d3255990b83d146f1b8015dcba97 | Add number of seconds second to the time represenetation | public class Timer
public void AddTime ( float seconds)
{
timer+=seconds;
} | 1 |
d7a0ea66b91382f2ae416696c267015a | 2e265500b28b2ad8f6bdc275e4b5fffc | Imprime el árbol en posorden, primero el subárbol izquierdo, luego el
subárbol derecho, y por últio la raiz | public class ArbolRojiNegro<T> extends ArbolBinarioBusqueda<T>{
@Override
public void imprime(){
this.imprimeRN((NodoRN<T>) getRaiz());
} | 0 |
34ae7353cb2534b797d5635ebbd4d965 | 993ceeb0735c3f19e82ea464cb0dd852 | Makes sure with different images, different results are outputted | input_csv = create_input_file('original-dogs.jpg', 'original-dogs.png')
with open(input_csv) as csvfile:
process_input_csv(csvfile)
pathA = pathlib.Path(__file__).parent.absolute() / 'expected_results' /'expected_results_diff_extn.csv'
pathB = pathlib.Path(__file__).parent.absolute() / 'results.csv'
result = ... | 0 |
3a18bf59ccea2efcc1e8b9e75d3e2759 | ffb22b9170f3c7364fc4651d3ebdfc91 | 根据条件查询满足条件的(订单商品关系附件参数信息)记录数 | long count(RelationCaseParamsDto condition); | 1 |
20c491b8bb90e1372d2f9c9bcd1ffc12 | ec45718fbfbfae905758bc81a25d1254 | 设置打印重复左侧列 | export class ExportTemplate extends ibas.BOSimple<ExportTemplate> implements IExportTemplate
get repetitionHeaderLeft(): number {
return this.getProperty<number>(ExportTemplate.PROPERTY_REPETITIONHEADERLEFT_NAME);
} | 0 |
075a58e5b0eaae7e508d515b47247aa2 | a8344aac8f41ccd849d17027d276d7d2 | Removes the software from black list. | class AgentsPlatformEngine:
def remove_from_blacklist(self, service_name: str) -> None:
self._blacklist.remove(service_name) | 1 |
52d6397e12f7dee948286f38d7965f44 | ca755289b9cf8eb0d4834f6e1525c3d7 | ! \brief Returns the assetId of the Asset that should be opened in the StateMachine Editor. | class SceneAsset
GetInstanceID() {} | 0 |
715ecec1204b74e068ab719677cbcadd | 2677e5773831433a78740997cf47c4d2 | 在椭圆曲线中为连加 | if e == 0 {
return p;
}
let mut point = p;
for _ in 1..=e {
point = Self::triple(&point, curve);
}
point
} | 0 |
e07f773f20029c93697dd5af9b8f7578 | 22b0eacaea39b3911fe4c53331c8b830 | Destroys all sub modules. | ISPC::Control::~Control()
{
clearModules();
} | 1 |
943f7bb4018e962cef1ed491fd33cc38 | a0eb25dbaed73fdffc051899f372362f | 获取所有的日期格式化 | class UtilityService
public function getDateFormatList()
{
return $this->dateFormatList;
} | 1 |
a44943b204568cd37c91ebfaf1ef08b6 | d8da3a2b713000903f444b9f38ae89fc | クラス間相性補正値を取得する | {
var cor = GetCorrection(Type_e.Agility) - 1;
if (_isInitialSR) cor /= 2;
return 1 + cor;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.