query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1377e6909ff64a90fd5ed7be5b76417d | 74fdfa690164fa207cd9ff1428252820 | Получение списка сущностей запроса для указанного составного поля. | namespace Nettiers.AdventureWorks.Entities
public static class EntityUtil
public static IList GetEntityList(Object entity, String propertyName)
{
Object list = EntityUtil.GetPropertyValue(entity, propertyName);
return GetEntityList(list);
} | 1 |
70064c04503fd99c50250050f87d648c | 6f3369305783f0be3bfb70121eb0d968 | add the the part to the user cart and move to the results page | public partial class Products : System.Web.UI.Page
protected void btnCompleteOrder_Click(object sender, EventArgs e)
{
Response.Redirect("ShoppingCart.aspx");
} | 0 |
867f2f68f305dc7ac0ecdbc34725e18a | 38673782563b5976982a991185fb6a3e | ! Test precession/nutation calculations from Sofa, using Sofa Earth orientation cookbook results. | namespace tudat
namespace unit_tests
BOOST_AUTO_TEST_CASE( testSofaPrecessionNutation )
{
double testJulianDay1 = 2400000.5;
double testJulianDay2 = 54195.500754444444444 * physical_constants::JULIAN_DAY;
double arcSecondToRadian = 4.848136811095359935899141E-6;
for( unsigned int i = 0; i < 2; i++ )
... | 1 |
fa869beee2ad145d0ccbaa8fb98bd7e1 | cfc3facaf98356fcd6b1febbd13c1756 | Tests the thumbnails processor run when nothing has to be downloaded. | class TestBlinkCameraSetup(IsolatedAsyncioTestCase):
async def test_get_thumbnail(self, mock_resp):
self.assertIsNone(await self.camera.get_thumbnail()) | 1 |
e1a4e7be255e7329f75c301c4526badb | d5c34da3b19be18f878b95b4faebdc9e | Test case for getXapiCredential
Retrieves the xAPI credential specified by id `xapiCredentialId`. | namespace Com.RusticiSoftware.Cloud.V2.Api
public partial class XapiApi : IXapiApi
public async System.Threading.Tasks.Task<XapiCredentialSchema> GetXapiCredentialAsync (string xapiCredentialId)
{
ApiResponse<XapiCredentialSchema> localVarResponse = await GetXapiCredentialAsyncWithHttpInfo(xapi... | 1 |
f034b09d98d84e70dc28c0788e1d110a | 553105db7a6c73623b8666bdcca9e8de | Returns the sense key associated with this entry. | public class JPSenseRelation implements Serializable public class Relation implements Serializable
public int getSenseIndex() {
return senseIndex;
} | 0 |
f619f19179c781721b8298e536cbecfd | 6b1c2e024221be86eccdf0faa86dc7f4 | 最后一个点击开始一下局的人,需要重新推送听牌信息 | if G_Data.bReplay then
return
end
local nServerSeat = G_GamePlayer:getServerSeat(1)
if nServerSeat == msg.wChairID then
self.GameCardManager:clearShowEndCard(G_GameDefine.nMaxPlayerCount)
end
self.GameDeskLayer:handleReadyAck(msg)
end | 0 |
e4f11abc8b077f4c3191897b1ef61831 | 201c743974959d119894caac4c806ffd | 州リストイベントハンドラ登録 ---------------------------------------------- | function registEvent() {
cityControlArea.on("mouseenter",cityControlAreaEnter).on("mouseleave",cityControlAreaLeave);
} | 0 |
b41c1c5a1f905624bfcaf6d15ae737f9 | 0e97fe2743f4c84b84d12c5d9c128ce2 | Returns the parameter indices for the provided term index. | class LFIProblem(SemiringProbability, LogicProgram):
def get_weights(self, index):
weight = self._weights[index]
if isinstance(weight, dict):
return list(weight.items())
else:
return [(Term('t'), weight)] | 0 |
20849f91d2c816fbdcf62bb6fcc8c6bb | f61300e1c9773c346010e3e5e81e9f98 | Update all records in dataset. | {
lock (sqlite_lock)
{
foreach (Record record in records)
{
this.UpdateOrInsertRecord(identityId, datasetName, record);
}
}
} | 1 |
49aeb4e3618b79e3c273a8f34c862275 | 26d6e5b06b9733093138f42068b29b0c | 当选择的工程师有号码,显示可以发短信 | var obj = $("#codebtn");
checkPhone();
if(isPhone) {
settime(obj);
$.ajax({
type: "get",
url: URL + '/sms/' + $('#tel').val(),
async: true,
success: function(data) {
console.log(data)
}
});
} else {
$('#tel').focus();
}
} | 0 |
675ce6f6cd2c67e9f3820ebce086ee2c | 88f0adacae20b36de33b2af1abe8ab78 | Returns the meta object for class '{@link ecarules.ParamValue <em>Param Value</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getParam(); | 0 |
dc3ab776598f6f5bcfc4c7d92321fd6b | d94ba7a704f5376449f7b2d579a56ac0 | Return sources needing an update, based on the update_freq/last_update attributes.
updateable can be True/False/None to return Updateable/Not-updateable/Both. | def list_updates(request,*args,**kwargs): | 0 |
02fbbd6dcd70519008b0f179a244522f | 714a2f33a752e9b2467987721253b8f4 | Load configuration from Database | class HardwareInterface
def load_config_from_database
@params.each do |p|
p['value_db'] = @bot_dbaccess.read_parameter_with_default(p['name'], p['default'])
end
end | 1 |
c0e7f0595ba3425b568c577f5b21b735 | e0bd2a5e9864164153feeaaae24f4a43 | Decreases the break time by 1 minute and returns new time | class Person:
#construnctor method that receives an ID and creates a person whose transaction
#takes a random number of minutes between 1 and 15
def dec(self):
self.time-=1 | 0 |
73cc45db09acf5e06f2c1969c275be0e | 50044518128903ea6417d8cfb1aa5ffa | 取Q龄,成功返回Q龄,失败返回-1 | class YouyuanSpider(RedisCrawlSpider):
def get_age(self, response):
age_urls = response.xpath("//dl[@class=\'personal_cen\']/dd/p[@class=\'local\']/text()").extract()
if len(age_urls) > 0:
age = age_urls[0]
else:
age = "0"
age_words = re.split(' ', age)
if... | 0 |
1d8594ac407a2b641802546fee4dee3e | ef0151c883039d3f7a7946eaffcd1da2 | Save the new settings to the options table and then update the db to add
new tables and rebuild the triggers | class moduleManager_tableManager extends mod_controller
public static function post_saveTableConf($p) {
$table = reflex_table::factory($p["tableID"]);
$table->setName($p["data"]["name"]);
$table->saveConf();
} | 0 |
78165bd3ca8bccde93fdba110ca441e8 | 7442b435a9a5563dfba0663ee3eff8a9 | Tests if the line is one edit away. | word = "word"
other = ""
assert utils.edit_dist(word, other) == 4 | 0 |
7ff64fdf81002412114656cd6d61adea | b4815375b1f8a2b6e9d6090504cacd64 | To be written in Q2(e) | def comments_q3():
print('Comments:')
print('Brute-force space is:')
print('Explain here your brute-force design')
return | 0 |
e102a5671a74a9502263cbd39f3aa398 | ef8afb0f547cba78f3c258481a45c764 | Function to generate the packet in hex dump | int j=0;
uint8_t *temp = (uint8_t*)input;
for(int i = 0; i <strlen(temp); i++) {
sprintf((char*)(hexData+j),"%02X", 0xFF & temp[i]);
j+=2;
}
hexData[j+1] = '\0';
} | 1 |
04942a06cb8b6639282065bdd424830c | 6312e1530ece92df963d881b97a96f41 | Abort to home. | msg = Message()
msg.id = CommunicationProtocolIDs.SET_HOME_CMD
msg.ctrl = ControlValues.THREE
msg.params = bytearray()
return self._send_command(msg, wait) | 0 |
f2ae9cb6df7af4f9c53b80dde6610e62 | 8ceb2bd617cb4e2890d9c362eec622f3 | 初始化促销类型分页栏 | private void initPager(){
baobeilistPager=(ViewPager)findViewById(R.id.baobeilistpager);
LayoutInflater inflater=getLayoutInflater();
sumView=inflater.inflate(R.layout.baobeilistpagerlist, null);
salesView=inflater.inflate(R.layout.baobeilistpagerlist, null);
priceView=inflater.inflate(R.layout.baobeilistpag... | 1 |
11f9d8597baa82a7b11e8217d0900d80 | f7e1a4b36bb5b0326ed4499c92dc7537 | A SetField can be saved and restored. | class FieldTester(XBlock):
field_a = Set(scope=Scope.settings)
field_b = Set(scope=Scope.content, default=[1, 2, 3])
field_c = Set(scope=Scope.content, default=[4, 5, 6])
field_d = Set(scope=Scope.settings)
field_tester = FieldTester(MagicMock(), DictFieldData({'field_a': [200], ... | 1 |
5838885c59eaeaf025d4262b8b7517b5 | 6d7086fad56afff9561eff5c8ca2eab3 | Unsets the encryption seed upon form reset. | public void onRandomRngSeed()
{
propertiesFrameview.getSeedSpinner().setEnabled(false);
propertiesFrameview.getSeedSpinnerLabel().setEnabled(false);
propertiesFrameview.getSpecifiedSeedRadio().setSelected(false);
randomSeed = true;
} | 0 |
9e84fd75a9b554f0bb71a8d88601edc0 | 55e2b95507002e3aa76cc3d69f1454c9 | Specifies whether Pepperoni is desired | public Pepperoni createPepperoni(); | 0 |
788ef1e745efa7b04c1e6b658cda641f | df4265dfb672c7e72fe919f5e14eeabe | 遍历树节点,使用回调函数cb进行处理.counts限定节点计数. | int parsing_tree_prefix_traverse(parsing_tree_st *tree_root,
tree_traversal_cb cb_func,
void *cb_data) {
if (tree_root == NULL)
return TREE_TRAVERSE_CONTINUE;
if (cb_func != NULL) {
if (cb_func(tree_root, cb_data) == TREE_TRAVERSE_... | 0 |
5185eb19b92f8283bbe532459e748bbc | dd511a8ea1b1692b91acb604e01c4b67 | 获得指定类的单例对象<br>
对象存在于池中返回,否则创建,每次调用此方法获得的对象为同一个对象<br> | @SuppressWarnings(value = {"unused"})
public final class Singleton
@SuppressWarnings("unchecked")
public static <T> T get(Class<T> clazz, Object... params) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
T obj = (T) pool.get(clazz);
if (null ... | 1 |
1195b622839a0d25b00a2cc30bf868da | 99a07e82b01968dad3ea030e4b413a96 | !
Deletes a component from the model. | ModelComponent::~ModelComponent() = default; | 0 |
eca77d8ed8f5f8508d9eef215c4a65c2 | 325b594503b2f166c4bd25460cd2eced | 1. 统计一个字符串出现频率最高的字母/数字及次数 | char[] chars = str.toCharArray();
Map<String, Integer> map = new HashMap<>();
for (int i = 0; i < chars.length; i++) {
if (Character.isDigit(chars[i])) {
if (map.get("digitNum") != null) {
map.put("digitNum", map.get("digitNum") + 1);
... | 0 |
33cf2f2a34aa5f8bd1b10b8d2900f1c6 | 86e06584b5aaa8d7a22ce4b2f00ee214 | The flask_simpleldap object with the proper initialization ready to be used
The scope for this is class, so we don't create an expensive object for simple tests | self.app.config["AUTH_LDAP_SEARCH"] = "ou=users,o=test"
self.app.config["AUTH_LDAP_BIND_USER"] = "uid=admin,ou=users,o=test"
self.app.config["AUTH_LDAP_BIND_PASSWORD"] = "admin_password"
self.appbuilder = AppBuilder(self.app, self.db.session)
sm = self.appbuilder.sm
self.... | 1 |
6b149c15c258344f86387afbe9a7b9a0 | 2eb5612c792f48cd3c0eb998b57c4362 | makes a copy which will be owned by the bundle,
this way the incoming msg is still available to be used by the caller if needed | cMsgMessage_t *newMsg;
if (vmsg == NULL) return NULL;
if ((newMsg = (cMsgMessage_t *)cMsgCopyMessage(vmsg)) == NULL) {
return NULL;
}
newMsg->info = newMsg->info & ~CMSG_WAS_SENT;
return (void *)newMsg;
} | 1 |
05db00b4398fa2c5523c4a732bffb556 | b688e7293a86b86676ea15d56f970518 | 查询所有的课程表(在架)数据分页的总个数 | public String querycoursesTabAll(String data); | 0 |
0f588506f71d6d70551f48fd821edf2b | 3cdc0d75b5044eb9d26c4bae49c15a53 | 根据酒店ID获取合同列表 | {
$request = $this->request;
$hotelId = $request->param('hotel_id',0);
if(empty($hotelId)){
return getErr('请输入该酒店ID');
}
$conModel = new ContractModel();
$conList = $conModel->where(['hotel_id'=>$hotelId,'date_type'=>'可用','status'=>1])->group('contract_num... | 1 |
33a8798615311619e3077437d0c8a6f5 | 017f1cde2d450d00fb2a1e2f7b60c806 | 根据电力企业id,查询电力企业日运行指标(注:这里并不是只电力企业的最新的日运行指标,因为要考虑到历史数据,所以这里要查询所有用到过的指标) | @Query(value="select i.indu_code, i.index_date,i.idri ,i.weight_type ,i.remark,i.remark, i.corp_count from idri i where i.index_date<=?1 and i.weight_type=?2 and i.indu_code IN('B','C','D','E','F','G','I','K') ",nativeQuery = true)
public List<IdriBean> queryAllIdri(Date endTime, String type); | 0 |
911a3451a917597036d45d31cbc74dde | 214f1b6c55f10661683a0d4850445727 | 获取最新笑话数据 | void loadJokeNewest(int page, int pagesize); | 1 |
630a0eba1f7a4e9f4c0baca156a5b101 | 40d0f9708f35ab56c8a0bb133e6cd156 | Returns a boolean value indicating whether or not there are more elements to iterate over | public final boolean hasMoreElements()
{
return this.index < this.length;
} | 1 |
cd875dd20543d14d906100bce3ffea1b | 488f639d07a2bc0fc932826acec9eba9 | Test that the associated entities are unlinked and deleted when they are dependent | List<GenericValue> values = delegator.findList("TestingNodeMember", null, null, null, null, false);
ArrayList<GenericValue> testings = new ArrayList<GenericValue>();
for (GenericValue nodeMember: values) {
testings.add(nodeMember.getRelatedOne("Testing"));
... | 1 |
30b0505e5d3501ad54c4190e59a69a2e | aebe16b1b47499ddd045cac2b672a46f | 添加PhraseQuery | {
$this->conditionCache[] = ['match_phrase' => [$field => $keyword]];
return $this;
} | 1 |
e42cf70c6d3ac9790e49f9b8bbd37546 | 98ce8b182d968ccc02dcb3b522113fc5 | Returns true, if this process instance contains no audit trail entries to read. | @JsonFilter("logFilter")
public class AuditSource implements EntryPart, Identifiable, Serializable
@Override
public boolean isComplete() {
return complete;
} | 0 |
05b6a842218c94849ad4f33227bb4271 | c1c65ff6433cc5649bdba4998b50f451 | Draws new mythical cards for the player and discards his selected ones | {
Debug.Log("deckcardnumber: " + deckcardnumber + ", maxcardsinhand: " + maxcardsinhand + ", cardsinhand: " + cardsinhand);
if ((deckcardnumber > 0) && (maxcardsinhand > cardsinhand))
{
bool drawn = false;
for ( int i = 0 ; cardinhandSlot[i] == false && drawn == false... | 0 |
cbbd78fee1f9b41aacf1f0abd2c7fcaf | 9a60410752bcc55515d011735c1bbfcc | 睡眠暂停duration秒 | namespace Did.SersLoader.Demo.Controllers.Demo
[SsStationName("demo")]
//[SsStationName("demo2"), SsStationName("demo3")]
//路由前缀,可不指定
[SsRoutePrefix("v1/api")]
public class SampleController
: IApiController
[SsRoute("902/sleep")]
public ApiReturn<int> Sleep(
[SsExamp... | 1 |
d4f6f2b58d8ed5ace34f35a5c8332f8c | 6933657046bdb7c07e7ec6e6a8ed68de | Gets whether a caching entity resolver will be used. | @RequiredArgsConstructor
public class CachingEntitySearchService
private boolean enableCache(final SearchFlags searchFlags) {
return enableCache && (searchFlags == null || !searchFlags.isSkipCache());
} | 1 |
e9fc58d014a177610e2690cbd71c7a67 | dbc9355b7ac39bc660ee89110710b969 | This API is used to query the encryption status of the instance data. | public class KmsAsyncClient
public CompletableFuture<ShowKeyRotationStatusResponse> showKeyRotationStatusAsync(
ShowKeyRotationStatusRequest request) {
return hcClient.asyncInvokeHttp(request, KmsMeta.showKeyRotationStatus);
} | 0 |
e18329e7e327a55ec9cd5755b24effd0 | 35d9dac0a97b32da1111e5036d8452f8 | Reduces the count of an ore by 1 and displays on screen. | public class Home extends Actor
public void CountDec(){
GemCounter--;
} | 0 |
16de869f0870bc717c0cb0f9dccf5e2a | 07061fd16c4a80a31900a3b05191a79c | transform consecutive image entries to image-group entries | namespace ad
void TImageGroupStorage::Set(TResultPtrVector & results, TStatus * pStatus)
{
pStatus->SetProgress(0, 0);
size_t current = 0, total = results.size(), groupId = 0;
Clear();
for(TResultPtrVector::iterator it = results.begin(); it != results.end(); ++it)
{
pStatus->SetProgress(current++, total);... | 1 |
be467677d0719bf9f3a98473d444e3db | fb405e71ca1656df82f8ce8cb6cf7302 | Returns the oldest value of the well known ID for the horizontal
coordinate system of the spatial reference. This ID is used for JSON
serialization. Not public. | namespace Microsoft.Spatial
public class CoordinateSystem
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Wkt", Justification = "This is not hungarian notation, but the widley accepted abreviation")]
public string ToWktId()
{
return WellKno... | 0 |
444bfbf674909c3f19ee87a411325d60 | 08e2ca8c7f703d72b13327257011e814 | Crée la configuration | public function createConfig(); | 1 |
7b7ce47cefeee5efcf94bfcc6e438993 | 838029e255f6dde3ec59b6de03909a45 | Checks paused accounts | $api = $this->get_api();
try {
$api->call( 'account_view', array() );
return true;
} catch ( Thrive_Dash_Api_ActiveCampaign_Exception $e ) {
return $e->getMessage();
} catch ( Exception $e ) {
return $e->getMessage();
}
} | 0 |
c77c31cb90b3dc99ad9779809ade5559 | d5cf1f9e2fa89766ae5840cf1ab28c56 | Checks if there's at least one DQL part defined to the internal parts collection. | abstract class Doctrine_Query_Abstract
protected function _hasDqlQueryPart($queryPartName)
{
return count($this->_dqlParts[$queryPartName]) > 0;
} | 1 |
f5b00c4e9512d7ab6a3b3e52236977f2 | 8ce6f1e29a434d566bb293b487f812bc | Delete a layer after the user confirms it | export class LayerManager
deleteSelectedLayer () {
this.deleteLayer(this.selectedLayer.id);
} | 0 |
5bb571ea7ac8edeec339f39976d14192 | 034e28c7fbf9c8134b10707d9b11d493 | Paths to each source code file in the target to be compiled. | export class CompileModuleXmlTask extends LKPMGulpTask
getSourceFiles(): string[] {
return [
this.moduleTemplatePath,
this.enlistmentTemplatePath
];
} | 1 |
daaa2a6a4dfbb3745db38262d914c1eb | fb8083232baeb70c907ffa0b962671d6 | Chain of `LinearFilter` objects
Because `LinearFilter` objects are not really arrays,
this class keeps track of the order of a series of filters. | class Filter:
def __init__(self,coefs):
self.coefs = coefs
return | 0 |
f77e3627c1ccde625e11a6927230f4d3 | e8f806e2c886333426c795f3574c2184 | Find non whitelisted principals. | class DenySettingsResponse(dict):
def excluded_principals(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "excluded_principals") | 1 |
5a030e694dbdaaf8c1497268d6131d75 | 8cfd31d6f785fc177338397cb8491b32 | Sets mainEntityOfPage. | {
$this->entity = $value;
if ($this->entity !== null)
$this->loadLinkedMenuItems();
} | 0 |
e1c485138205de0847a92716f6306642 | f42dbe0431a16c67406da2ff2fdcd48b | <documentation><description><p>Sets <code>transportId</code> and <code>transportPath</code>, and returns the calling object.</p></description>
<example>$d->setTransport( $t )->edit();</example>
<return-type>Asset</return-type>
<exception>NullAssetException</exception>
</documentation> | public function setPath($path, $pathIsAlreadyDecoded = TRUE); | 0 |
9f45ac80a2eece71f22d12af5cb56eb4 | 1b3ade002fe67cbfac838252329886f1 | Clear scheduled commands/subsystems. | public class Robot extends TimedRobot
@Override
public void testInit()
{
CommandScheduler.getInstance().cancelAll();
} | 1 |
c712225ffd81394fc34b5376e676526f | b32b0285166e4ae7d78bbd4577a0dc26 | Obtains a write locking scope on the object. | namespace Umbraco.Core.Scoping
internal class Scope : IScope2
private void ObtainReadLock(int lockId)
{
Database.SqlContext.SqlSyntax.ReadLock(Database, lockId);
} | 0 |
6dd7b310d315346c216ec906b2f2dac2 | 29074851297ee5769fa826fba02197e8 | @brief Free a BAM DMA channel
This function frees a BAM DMA channel. | {
#ifdef ADI_DEBUG
if (pDMA_DevData->InitState != ADI_DMA_STATE_INITIALIZED) {
return ADI_DMA_ERR_NOT_INITIALIZED;
}
if (chNum >= NUM_DMA_CHANNELSn) {
return ADI_DMA_ERR_INVALID_CHANNEL;
}
#endif
if (pDMA_DevData->ChannelsInUse & (1ul << chNum)) {
ADI_ENTER_CRITICAL_REGION()... | 1 |
b22bc0ba3479ade5b130144b7d8f2b98 | 8dd09325180e0ccbea92fd51f1e1c2e9 | Recebe um tabuleiro e copia este posicao a posicao, devolvendo um tabuleiro igual ao primeiro. | def cria_copia_mapa(m):
p = ()
for paredes in m[1]:
p += (cria_copia_posicao(paredes),)
e1 = ()
for u1 in m[2]:
e1 += (cria_copia_unidade(u1),)
e2 = ()
for u2 in m[3]:
e2 += (cria_copia_unidade(u2),)
return cria_mapa(obter_tamanho(m),p,e1,e2) | 1 |
d3b96fc67918d3fd2a7f27515539c72a | 60bf8c303c1bc89bcf0900c18485778f | 解析ddl文件 | class ModelGenerator
private function parseDDL($ddl)
{
$info = array();
$reg = '/create table (\S+)\s*(?:(?X)\()(.*)(?:\)$|\);$)/isU';
preg_match($reg, $ddl, $result);
$info['tableName'] = preg_replace('/`/', '', $result[1]);
$tableNameSplits = preg_split('/[-_]/', $info['tab... | 1 |
df2e2f597050268a9ffeacc9cc1d1ba2 | 75aa8ea757e54bbea7726d0f83d0803b | 保存经度纬度的处理 | function setPosition(){
var lon = $("#l-lon").text();
var lat = $("#l-lat").text();
$("#longitude").val(lon);
$("#latitude").val(lat);
cancelSave();
} | 0 |
1700e1cae6d57287f8556d2d6f551181 | c97b93dcffd2cd33f7f0fbb21b4df471 | Fetch multiple csgo items using get_item(). | async fn get_multiple() -> () {
let ids = vec![1,2,3];
let cs = rm::character::get_multiple(&ids).await;
match cs {
Ok(chars) => println!("{:?}", chars),
Err(e) => println!("{:?}", e),
}
} | 0 |
50771fad799af1cbe66f90a126b70046 | 6ffb54f1d716d5ccc8c133d9a61330af | Clears an override for a specified experiment as a blocking operation | namespace NFig
public class NFigAdminClient<TTier, TDataCenter>
where TTier : struct
where TDataCenter : struct
public Task<OverridesSnapshot<TTier, TDataCenter>> ClearOverrideAsync(
string settingName,
TDataCenter dataCenter,
string user,
int? subAppI... | 0 |
98f0ee976c92071589be07429510eeb6 | d886e9e69bbd78a5e5435b44d6f0c1c3 | Return all the values in dict format from config file | section_values = {}
sections = self.config.sections()
for section in sections:
options = self.config.options(section)
option_values = {}
for option in options:
value = self.config.get(section, option)
option_values[option] = val... | 1 |
6253d1191194dd02a4fe63634f89d0b9 | e688f1e1fd9e8954c65e9340a3a61f06 | The item indicates whether the entry is a CASP target, a CASD-NMR target,
or similar target participating in methods development experiments. | @Generated("org.rcsb.cif.schema.generator.SchemaGenerator")
public class PdbxDepuiStatusFlags extends DelegatingCategory
public StrColumn getHasSasData() {
return delegate.getColumn("has_sas_data", DelegatingStrColumn::new);
} | 0 |
c2c21f571a68169f6e2e0de241876e93 | 9983a9294223ca89df2029f5ec59ccc5 | insert a row with specified values to a table.
if a cursor is specified, it doesn't commit (expecting that there will be more inserts)
otherwise it commits immediately | def insert(table, values):
return table.insert(**values).execute() | 0 |
80e5a63943ac93c78006336fb37c1a80 | ab92444be2205b432edd56991aff6afe | <input>要素を生成する。 | function createInput(className,placeholder){
var input = document.createElement("input");
input.type = "text";
input.className = className;
input.placeholder = placeholder;
input.autofocus = "autofocus";
input.style.display = "block";
input.style.height = "23px";
return input;
} | 1 |
b4e34afd633a81055bcf0b44e7419ba0 | 256ec93ac3caa9b5d9488bc55c85b5f5 | @brief Resets the rising edge interrupt request pending flag of a given EXTI interrupt. | void resetExternalInterrupt(char interrupt_number){
EXTI->PR|=(1<<interrupt_number);
EXTI->IMR|=(1<<interrupt_number);
} | 1 |
39edcffca464ab80ac5078bcfb87cb99 | f24178a8a6803a324c2ef138050bd8e2 | Test to check if dna is array of strings | class DNA(object):
def is_valid(self):
for s in set(self._dna_string):
if s not in self.dna_nucleotides:
return False
return True | 0 |
421e46fd84d385280d0e0ee1a6a76e0c | 7fa8cf52fa0dbeedb9ba25c0fcd90545 | Returns all Groups in no particular order. | public List<Group> getAllGroups(); | 1 |
7fa2be321ffe63381f3f43205055e88e | 7b48c83ff4c0de3d508b5edca586fe13 | Calculate the time of impact of an object with bounding walls. | static void ballSet_calcImpactTime_ball(LinkedBall* start_lBall, Ball* i_ball) {
if (start_lBall == NULL) return;
LinkedBall* lBall = start_lBall;
Ball* ball;
Ball* p_ball = NULL;
float
time = i_ball->t,
r,
d,
dpx, dpy, dvx, dvy,
dv2;
while (lBall != NULL) {
ball = (Ball*) lBall->data;
lBall =... | 0 |
974a8d7826056440fb209a9cafff69f0 | 2c5340b6dc2713d4a1dbf269f811bd9d | Must reinitialize effect if following configuration changed | void EffectsInt32Effect__ReInit( EffectsInt32Effect _this )
{
EffectsEffect__ReInit( &_this->_Super );
} | 1 |
88c2bab5356cb61c622663bd42897617 | d994a4313ac30a39122c9d5fbe8b6493 | Returns the number of elements in the group. | class Group
public function count(): int
{
return $this->getHandler()->count($this->groupName);
} | 1 |
59c12c2c200c66b085b6ea05a76ad8df | acedbbe61ec75f874b3713dab6c1e467 | Get label alignment when generating field for OOUI. | class InputField
function getLabelPos()
{
if(!isset($this->da["labelpos"])){
$this->setLabelPos();
}
return $this->da["labelpos"];
} | 1 |
f6e4097a94d50d16fe80ede75fd807cf | 647a4976e7051647deea62fb9f9781a2 | @brief Send response data.
This function is used by a target-server to send the SCSI response data to a remote
initiator node. The target-server populates the @c ocs_scsi_cmd_resp_t
argument with scsi status, status qualifier, sense data, and response data, as
needed.
Upon completion, the callback function @c cb is inv... | const void *cmd_buf, size_t cmd_len, void *resp_buf,
size_t resp_len)
{
int ret;
struct qcom_scm_command *cmd;
struct qcom_scm_response *rsp;
size_t alloc_len = sizeof(*cmd) + cmd_len + sizeof(*rsp) + resp_len;
dma_addr_t cmd_phys;
cmd = kzalloc(PAGE_ALIGN(alloc_len), GFP_KERNEL);
if (!cmd)
return -ENO... | 0 |
25090bc604d15712020a470a2bc8edc3 | 0c3a1a91482ff8e883ea1972fbd7a98c | ROL r/m8, imm8 | function LD_R8_N8(this: number, cpu: CPU): number {
const b1 = cpu.read_tick(cpu.pc + 1);
const target: R8 = (this & 0b111000) >> 3;
cpu[target] = b1;
return 2;
} | 0 |
1c501934ba19d2896ede69f7786f8911 | d98a72d9ceb916eed084b94c0bc31493 | Since the actual sigma calculations are tested elsewhere, to prevent this
test from breaking, it only makes sure the function actually completes. | class pair_slj_tests(unittest.TestCase):
def test_set_missing_sigma(self):
slj = azplugins.pair.slj(r_cut=3.0, nlist = self.nl)
slj.pair_coeff.set('A', 'A', epsilon=1.0, delta=1.0)
self.assertRaises(RuntimeError, slj.update_coeffs) | 1 |
ab24e627dfb4a19472522f524676992c | ab4a8824bf01e455cc61da4cef0aa117 | Remote file last-modification time | try:
return os.fstat(fileobj.fileno()).st_mtime
except AttributeError:
raise misctricks.logOldExc(os.error("Not a file: %s"%repr(fileobj))) | 0 |
297967c429e0401e319499bde68c8b70 | d87500e73862d165126b0480dcf8a693 | Add the values with explicit overflow wrapping | {
int sum = x+y;
int fl = __builtin_add_overflow_p (x, y, (__typeof__ ((x) + (y))) 0);
int posOvrFlw = fl && !(x & INT_MIN) && !(y & INT_MIN);
int negOvrFlw = fl && (x & INT_MIN) && (y & INT_MIN);
posOvrFlw && (sum = INT_MAX);
negOvrFlw && (sum = INT_MIN);
return sum;
} | 1 |
28cffaeac6d911755f468916cb2e5935 | a7357323d147b9aa654e93a8e6168dcd | Format timeseries as matrix for NMF or BSS factorization. | X_ = check_dataset(X)
def transpose_or_flatten(ts):
if ts.shape[1] == 1:
return ts.reshape((-1, ))
else:
return ts.transpose()
return [transpose_or_flatten(Xi[:ts_size(Xi)]) for Xi in X_] | 1 |
aecf55dc0c32cc03fa572154319f93ef | 2a5a0bd094670eb0a0f0fb5f54036c0e | 拒绝所有预约申请 | function UIFamilyApplyListPanel:ClickAllNoBtn()
FamilyMgr:RefuseAllFamilyApply();
end | 1 |
bbcde4f8ff2105341ba9b2f8efef95cf | f52fc656a08b31df083447047b5fd1cd | Returns the expected number of selected rows. | @SuppressWarnings("serial")
public class IncorrectResultSetColumnCountException extends DataRetrievalFailureException
public int getExpectedCount() {
return this.expectedCount;
} | 1 |
28c6f773c81dfb8f660ac1bd80c158bb | 14e970c7fb29bb015c4cbe1f91251b97 | Frees resources on the server side when called by RPC stub files. | {
if (_host == null)
{
_logger?.LogInformation("RPC server already stopped");
return;
}
if (_host != null)
{
_host.Dispose();
_host = null;
}
_logger?.LogInformatio... | 1 |
c558da4ff4615249d5f7711ea33f993e | 464fa8d3d573c4f945ba011c6d5efddf | 该函数用来设置该类中包含的SBMEGridPoints类的需要的分层数 | void BT_SetTerrainSplit(unsigned long terrainid,unsigned long Split)
{
BT_Main.CurrentFunction=C_BT_FUNCTION_SETTERRAINSPLIT;
if(BT_Intern_TerrainExist(terrainid))
{
BT_Main.Terrains[terrainid].LODLevel[0].Split=unsigned short(Split);
}else{
BT_Intern_Error(C_BT_ERROR_TERRAINDOESNTEXIST);
return;
}
} | 0 |
7d9614852d5ed94ead2cf0b387414eca | 4e398e05381ca551efe76734db32320f | Get a termTYPEDBYRelationship relationship, which is defines the relationship between a spine attribute and its type. | public IRelationship getRelationshipType(); | 0 |
5900159e3dbdfd7624d595a8b6f6b78a | 302f708316438d9241ad605f9bd5b763 | the string version of monitors
now contains only their name | xrandr_output = sp.Popen("xrandr --listactivemonitors",shell = True, stdout = sp.PIPE).communicate()[0].decode('utf-8').splitlines()
xrandr_output = [re.search(r".*\s+(?P<screen>.*)$",ii).group("screen") for ii in xrandr_output if re.search(r"[0-9]+:.*",ii) is not None]
return(xrandr_output) | 1 |
7534b0f3ca329a040b17466044e02f07 | 0319967bf33d19c4fccd27fd322b4a5a | Returns the list of leader election configuration providers (see {@link #setConfigProviders(List)}). | String[] getInfoProviders(); | 0 |
36527f03395bce37b2c3c6dfaf49020b | 972c8163c5ad5ce5db7a873f334a814f | Directly add a failure to the list | def add_to_fail(link):
_fail_list_lock.acquire()
_fail_list.append(link)
try:
with open(_download_fail_file, 'a') as f:
f.write(link + '\n')
f.flush()
except Exception as e:
logging.error('Error: %s' % e.message)
logging.error(traceback.__all__)
_fail_... | 1 |
c5fae104136d943cd703d106ef46ded2 | fbb9551979d3305e319177b9954dd763 | <para>Obtains access to the debugging information for an image.</para>
<para>
<c>Note</c> This function is provided only for backward compatibility. It does not return reliable information. New applications
should use the SymGetModuleInfo64 and SymLoadModule64 functions.
</para> | IMAGEHLP_MODULE64 module_info;
BOOL getmoduleinfo_rv;
printf("Load Address: %I64x\n", module_base);
memset(&module_info, 0, sizeof(module_info));
module_info.SizeOfStruct = sizeof(module_info);
getmoduleinfo_rv = SymGetModuleInfo64(process, module_base, &module_info);
if (!getmoduleinfo_rv) {
printf(... | 1 |
1bf7713663a4613d97da16cd0ed8b362 | 16e58396f2fb1dd8cc8cffeab3b0b43e | has ESC been pressed? | bool Input::IsEscapePressed() const
{
return (mKeyboardState[DIK_ESCAPE] & 0x80);
} | 1 |
df5abdebf2e5478da118759981c3d087 | eebb1a8e1eb6d092216534fee246d169 | Determines if the stateProv has been modified. | namespace Nettiers.AdventureWorks.Entities
[Serializable]
[DataObject, CLSCompliant(true)]
public abstract partial class StateProvinceBase : EntityBase, IStateProvince, IEntityId<StateProvinceKey>, System.IComparable, System.ICloneable, ICloneableEx, IEditableObject, IComponent, INotifyPropertyChanged
public bool ... | 1 |
ad26730a1f5fdad914d0e2946e8c79fa | a204a7fa45be2a6b71c3e693af383f7a | Allocate a Money object and fill in its fields | Money *makeMoney( int width, int val )
{
Money *this = (Money *)malloc( sizeof( Money ) );
this->print = printMoney;
this->width = width;
this->val = val;
return this;
} | 1 |
20b111fe97a51f7305f9334ec8dfc66e | c94c89f753077e940922f8ebad2261d4 | Rechercher un Livre par code. | public Book findByCode(String bookCode); | 1 |
2ce999aa94085293b5893d5ecc9f25b0 | bcdb9a656c43b111d9cbb6d974dd4c3d | update the state of the "one key patrol" button | class ForestOneKeyRedPoint extends RedPointBaseRule
private _updateState(): void {
this.updateVisible(FogForestModel.getInstance().isCanOneKeyPass());
} | 1 |
08bd3514c856fa9d9ef2098bded05259 | 953a44e8cf2698d459a9e5e8099aed18 | Проверить равны ли два множества между собой. | {
if (set1 == null)
{
throw new ArgumentNullException(nameof(set1));
}
if (set2 == null)
{
throw new ArgumentNullException(nameof(set2));
}
var result = set1._items.All(s => set2._items.Contains(s... | 0 |
34fbc39df65185b679843a3983ba8ba8 | 0affa55ad960949162999a3d6d1ed5ce | display a start button and loads level 1 when clicked | public class ButtonController : MonoBehaviour
public void PlayButton()
{
SceneManager.LoadScene("Level 1");
} | 1 |
872f0331621e66a5658bffa9da1a038f | 2b09317753633f9afda234262227046b | from https://stackoverflow.com/a/39649614 | async function buffer(readable: Readable) {
const chunks = [];
for await (const chunk of readable) {
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
}
return Buffer.concat(chunks);
} | 1 |
a9b43eeeae24c87f747deba7a593b4a9 | 2a36cdbc983d9c6be8584a99cba17673 | xml에 정의한 툴바를 액션바에 세팅 | public class NaviPart extends ViewPart
private void initializeToolBar() {
IToolBarManager toolbarManager = getViewSite().getActionBars()
.getToolBarManager();
} | 0 |
83b02ec98c163c1e4f137a540fdb819a | 68876ca8a1a33b87cb10b7e655768144 | The interpreter contains references to several important objects which we
must mark to avoid freeing accidentally. We mark them here. See lisp_sweep()
to understand when this is called. | g->gray = g->grayagain = nullptr;
g->weak = g->allweak = g->ephemeron = nullptr;
markobject(g, g->mainthread);
markvalue(g, &g->l_registry);
markmt(g);
markbeingfnz(g);
} | 1 |
cc940ef83ded6887e8aca92504c6e8fc | 74a05f73f8bc73917431f02c86cd76c8 | 删除对应myProd的Album | {
$ids = explode('&', $id);
return DB::table('album_artist')
->where('artist_id','=',$ids[0])
->where('album_id','=',$ids[1])
->where('id','=',$ids[2] )
->delete();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.