query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e995b0e49d6105046cfe8e48082f477d | 55f792c316c6abf5efd872627bc81b9e | Check to see if GitHubRepositoryConfigurationFieldMappings property is set | namespace Amazon.Kendra.Model
public partial class BoxConfiguration
internal bool IsSetFileFieldMappings()
{
return this._fileFieldMappings != null && this._fileFieldMappings.Count > 0;
} | 0 |
f4da2a1251d53c8a1b0ef0027a71b978 | b305fb80426bb5c3a5d4e10fcdf03568 | sets the focus to a widget's first child | void UILayer::focus(Widget* widget)
{
d->rootWidget->focusEvent(nullptr);
if(widget)
d->rootWidget->focusEvent(widget);
} | 0 |
2d0d778dc8013617cf61d7559353e48a | 59b4ebc67e0f8c368e3f2c3aa6e6d2fd | retourne l'en-tête de la p-Ième colonne (1-based).<br/>
<br/>
<br/> | String ret = "<col width=\"20%\"/>\n"
+ "<col width=\"50%\"/>\n"
+ "<col width=\"10%\"/>\n"
+ "<col width=\"10%\"/>\n";
return ret;
} | 0 |
73df1be075277c6e6135844f7e1ee3ec | 5f3d0af80ff4d9f712136c10563917f9 | display the complete code listing in the console window | {
Window1 codePopup = new Window1();
codePopup.Show();
popups.Add(codePopup);
codePopup.codeView.Blocks.Clear();
string fileName = (string)testDriverListBox.SelectedItem;
codePopup.codeLabel.Text = "Source code: " + fileName;
sh... | 0 |
fc57c576ecd0a9bcae2076b9e80efeee | c1d20720e1f4e1184b9fa1ed0646a9c1 | Test Supervisor discovered flow is clean up when doing user flow. | self._mock_machine.cleaning_up = True
self._run_normal_start(ret=wrapper.RESULT_SUCCESS)
alarm_args = self._mock_signal.alarm.call_args_lists
for call in alarm_args:
self.assertEqual(call, (0,)) | 1 |
81c4170256b520225da3370f0bd15d0a | d387e7cd97d893b09559468d9c915803 | 改变红包分配方式 | index = None
driver = self.conf.driver
xpath = LC.CASH_REDPACK_MENU["派发模式"]
els = WebDriverWait(driver, TIME_OUT).until(EC.presence_of_all_elements_located((By.XPATH, xpath)))
if index == None:
index = random.randrange(0, len(els))
time.sleep(1)
els[in... | 1 |
a1a1d6ee595399ed993b862d196718cb | db2438ac0509d50ef9b83a62aec0b92d | Calculate the scale transforms that have been applied to this element
and its ancestors, ignoring all other transformations. | public SVGAnimatedTransformList getTransform() {
if (transform == null) {
transform = new SVGAnimatedTransformListImpl(new SVGTransformListImpl(), this);
}
return transform;
} | 0 |
87687dc7257e16bf771751cc3a13cbc0 | 21a9fc6b02ff498f5fece82a7530524d | The Intent the [MviView] emit to convey to the [MviViewModel]
to filter favorite quotes against given query | class MainActivity : DaggerAppCompatActivity(), MviView<MainIntent, MainViewState>
override fun intents(): Observable<MainIntent> = Observable.mergeArray(initialIntent(),
dismissSnackbarIntent(),
getTopFreeIntent(),
getTopGrossingIntent(),
searchIntent()) | 0 |
e3a01e2a4b6e35696e18d962cca25215 | 1d4f7da58840b21408091f918ab59c42 | The URL to an image which can be shown in an "about features" dialog (32x32). | class Agent(pulumi.CustomResource):
def avatar_uri(self) -> pulumi.Output[str]:
return pulumi.get(self, "avatar_uri") | 1 |
d80b79868bf89ac9b016d1078d1f1949 | 92667e623d6ff2871e7492a44c024c88 | Saves the request root. | namespace Aurea.CRM.Core.OfflineStorage
public class UPOfflineRequest : UPSerializable
public int SaveRequestRoot(IDatabase database)
{
if (this.RequestNr < 0)
{
return -1;
}
return this.SaveRequest(database, null, -1);
} | 1 |
10d472c66284b7d2cc5f921b9a3cf962 | 6343ae493ccfe631ecefccf606651744 | FOR DEV STAGE ONLY. SHOWS DEBUG_TOOLBAR TO EVERY VISITOR. | def show_toolbar(request):
return DEBUG | 1 |
1d714b62545923762c501fb6a256e06c | 2a0d68a8a46ee6eedd388c2bada0ba44 | starts the asynctask to load the storylist | public class MainPresenter
public void loadData(){
MyAsyncTask myAsyncTask = new MyAsyncTask();
myAsyncTask.execute();
} | 1 |
a14d1fabef58fad52ec63f6cb28c923d | a4c760aa55e0ce82135b1edd051efdd8 | GetGasFeePolicy returns gas policy from the state | const f = new GetGasLimitsCall(ctx);
f.results = new sc.ImmutableGetGasLimitsResults(wasmlib.newCallResultsProxy(f.func));
return f;
} | 0 |
78b5107e9d5e72b86de9e0b5fc1132ef | f8f2cd518a1385e87994a8b04cdcc6d5 | 返回将字符串转换为它等效的 16 位有符号整数。如果转换失败则返回默认值 | namespace LC
public static class Extensions
public static long ToLongDefault(this string value, long defaultValue)
{
return ToInt64Default(value, defaultValue);
} | 0 |
b9c1c37992f3644002603f6c248e1505 | 3b1fe3898da8aa94b3af5e7b894b4535 | Metodo che controlla se le azioni inserite nel Branch sono compatibili con la struttura del
branch e gestisce di conseguenza lo stato al termine di quest'ultimo. | @Component
public class BranchSpec extends BaseSpec
public void canMerge(final Branch from, final Branch to) {
boolean isValid = true;
if (!isValid(from, Read.class))
isValid = false;
try {
ValidationUtils.mustNotEmpty("toBranch", to.getId());
} catch (SpecMgrException e) {
addError(Br... | 0 |
3557efa3e6601de003169c8e9ba7437a | ccf3bf293de0aff48b2c9017e5f166cd | Get all this project tags from Unity, using the multi-tags system. | {
List<string> validTags = new List<string>();
string[] tags = UnityEditorInternal.InternalEditorUtility.tags;
for (int i = 0; i < tags.Length; i++)
{
string tag = tags[i];
tag = tag.Replace(' ', '_');
if (!string.Is... | 1 |
73b266d7343aef9188feacac21dc0dea | 89de2582635eea00f58d542c9ca56b43 | Reads from the stream, skipping whitespace and comments. | {
var startedAtEndOfStream = true;
try
{
while (Char.IsWhiteSpace(Peek()))
{
ReadChar();
startedAtEndOfStream = false;
}
}
catch (EndOfStreamException)
{
if (startedAtEndOfStream) throw;
}
} | 0 |
0f5d3ee754bce684a3cce1e0817df502 | 6ddfde0799efecbdd8a9d6b43e66b17f | 该函数依赖集的所有属性
Returns:
set: 该函数依赖集的所有属性 | class PossibleValues(object):
def dependencies(self):
depends = self._append_depends.copy()
for other in self._depends:
depends |= other
return depends | 1 |
46fe5916a375c74cd2c498151125e285 | f75b6fa087e26ae9289adbc1c169c8b6 | Handles the upload progress changed event. | {
ProgressChangedEventHandler handler = (ProgressChangedEventHandler)this.Events[progressChangedKey];
if (handler != null)
{
handler(this, e);
}
} | 1 |
deb85ede5ae35d693decae0fcbf48ee7 | 319d6eaf80e30d006830ba06e44d1ed0 | FindMatchStr : to find substrings matching a regex | s := ls.CheckString(1)
sLen := len(s)
pattern := ls.CheckString(2)
init := posRelat(ls.OptInteger(3, 1), sLen)
if init < 1 {
init = 1
} else if init > sLen+1 {
ls.PushNil()
return 1
}
captures := match(s, pattern, init)
if captures == nil {
ls.PushNil()
return 1
} else {
for i := 0; i < len(captu... | 1 |
237f35fcfe6c5633d239675666a3a5e0 | 1db45b8115287f75705fbb1b785d7f94 | 使用Cookie存储验证码,默认使用Session
注意使用Cookie存储验证码时,必须提供长度为16位的加密密钥以对验证码值进行加密解密 | $this->code = Util::create($type, $length);
Store::set($id, $this->code, $ttl);
if (\Core\Env::isPhpUnit()) {
\Yaf\Registry::set('captcha', $this->code);
}
} | 0 |
856d3289dec829f446aefdd6159b97e5 | 57ab5f33670b1c948b2c764e997af40d | encodePrivateKeyToPEM encodes Private Key from RSA to PEM format | buffer := new(bytes.Buffer)
buffer.WriteString("-----BEGIN RSA PRIVATE KEY-----\n")
rawLen := 64
keyLen := len(privateKey)
raws := keyLen / rawLen
temp := keyLen % rawLen
if temp > 0 {
raws++
}
start := 0
end := start + rawLen
for i := 0; i < raws; i++ {
if i == raws-1 {
buffer.WriteString(privateKey[... | 1 |
d8709a093b08bac63450c1b590b1f769 | 732dfeb8b30a7c4c7d1693464b3debb0 | 对数字进行四舍五入 | var n0 = parseInt(n.toFixed(0));
var n1 = parseFloat(n.toFixed(1));
var n2 = parseFloat(n.toFixed(2));
if(n2 == n1){
if(n1 == n0){
return n0;
}
else{
return n1;
}
... | 0 |
4cc37ecc3e5c29b289ff4164f4722c04 | 2ba01eac4e08de32d1540716b700d461 | スキルIDからスキル名を取得するメソッド | {
switch (playerId)
{
case 0:
for( int i = 0; i < saberSkillList.Count; i++)
{
if (saberSkillList[i].SkillID == skillId)
return saberSkillList[i];
}
break;
case 1:
... | 0 |
41b8eecd5b52cf7a3534a4784c55d32e | e6f7f94e33fba675649246e379e5fcda | エミッター数値をコントロールに設定 | public class EmitterSystem extends Object implements Serializable
public EmitterSystem setEmitterIDNumber(byte pEmitterIDNumber)
{
emitterIDNumber = pEmitterIDNumber;
return this;
} | 1 |
2f02816bb25c05a2bab1cb483e1d8f60 | b002c8297810afe249c1710ec5b69737 | Define a common method to determine the timestamp for all MousePoseTrackers. | public abstract class AbstractActivityCollector implements ActivityCollector, AbstractActivityCollectorMBean
protected long getTimestamp() {
return (System.currentTimeMillis());
} | 0 |
021a72cfe7c96293a92523d7a270e250 | a33381e47e62530beacdad657f225d48 | Elimina os caracteres inválidos, indo para o proximo caracter até encontrar um caracter valido | {
char c = getNextCharacter();
while (c != 0 && !isValid(c))
{
c = getNextCharacter();
}
return c;
} | 1 |
fa339f8e7ab5ce8d5519ff4689b0fbf2 | 0f74a1aadd3d29640bc99d8074d9c468 | @brief Get the header of the running image. | PIMAGE_NT_HEADERS exe_get_img_nt_head(struct exe* pe)
{
if (pe == NULL || pe->img_dos_head == NULL)
return NULL;
return MOVE_PTR(PIMAGE_NT_HEADERS, pe->img_dos_head, pe->img_dos_head->e_lfanew);
} | 1 |
1e01114fac05c4691991fed8bb412391 | 63a4dbbbad416091d27f93a772c2ccd2 | Create a deleter for this post detail. | class Delete extends Action
public function __construct(
Context $context,
JsonFactory $jsonFactory,
PostRepository $postRepository
) {
parent::__construct($context);
$this->postRepository = $postRepository;
$this->jsonFactory = $jsonFactory;
} | 1 |
9458348f1c6528cb55093b1b2857d33a | 0e885cfb4217e377019676006c02a3df | Called to set up anything needed after m5.instantiate | public class Instantiate : MonoBehaviour
void Start () {
} | 0 |
e174e24fd1a5a5a96a270784dba90b2a | 9360d4a5b7f2d1da1738b1e57682913e | Display the list of the leave requests of the connected user | {
$conges = Conge::where('user_id', $id)->get();
if ($nf != null){
$nf->markAsRead();
}
return view('myleaves',['leaves'=>$conges]);
} | 1 |
b52eb0d562ded17ea120f2096da738ea | 6d28998d980eda5d50076793dfcc74d4 | Getting a 3 digit number in form of a string | next_number = current + 1
if next_number > 999:
return str(next_number).rjust(6, '0')
return str(next_number).rjust(3, '0') | 1 |
e778877e33a61cc8ab22dd3885ce35ed | b5d4bc7a8722ad77dc3a7f1079db0d1d | 获取所有物料明细信息,db已存在的和新增加的数据分开保存 | setDetailsAllMaterail(state, data) {
state.detailsAllMaterail = data;
} | 0 |
1e0493250460a5ea229d4df4df6c915d | 848d69c22603436ce990543c0558d751 | Adds any event listeners needed for logging. | if (loggingEventHandlersAdded) {
return;
}
loggingEventHandlersAdded = true;
self.addEventListener('message', (e) => {
if (
e.data.stamp === POST_MESSAGE_STAMP &&
e.data.command === POST_MESSAGE_COMMAND_GSI_BUTTON_CLICK
) {
logEvent({
analyticsEvent: A... | 1 |
94a01f8680755938176390a0b30916f0 | b8d73fabb30d2094013e780be603f8f1 | 查询自己及所有子级渠道 | public List<OrgCompany> querySelfAndChilders2(String companyId) {
String companyLevel = "";
OrgCompany company = orgCompanyMapper.queryOrgCompanyById(companyId);
if (company != null) {
companyLevel = company.getCompanyLevelId();
if("0".equals(company.getOrgId())){
... | 1 |
4e6862caec1607c451ad7bf48e63b531 | 2ff6ce26b4b86f238b94eee9219cd2fa | Reduce the volume when ducking - otherwise play at full volume. | namespace Vannatech.CoreAudio.Interfaces
[PreserveSig]
int OnVolumeDuckNotification(
[In] [MarshalAs(UnmanagedType.LPWStr)] string sessionId,
[In] UInt32 activeSessionCount); | 0 |
a0d4f1b50b736ccbf7a8e18df80475a2 | ab733800a01b1c0b6133ac0bc5904310 | 设置 IPv6 地址子网掩码前缀长度 | public class IPaddress
public final void set_prefix_len(int pre) {
prefix_len = pre;
} | 1 |
4c6df4ca03563ff032615036bd5c6454 | 8a0e2a8fc0a0d44decf9646a6072096d | Consulta Folios Internos según parametros de filtro. | namespace IM.BusinessRules.BR
public static class BRReportsByLeadSource
public async static Task<List<RptFoliosInvitationByDateFolio>> GetRptFoliosInvitationByDateFolio(DateTime? dtmStart, DateTime? dtmEnd, string serie, string folioFrom, string folioTo, string leadSources, string PRs)
{
List<RptFoliosInvit... | 1 |
0ea553393f374a42844db096916d851b | 854b2664906c3d8906e875d007d60cf5 | Gets called when user fails to sign up and shows toast. | public class AccountCreationActivity extends AppCompatActivity implements OnClickListener
private void handleLoginFailure() {
Toast toast = Toast.makeText(this, R.string.failed_creation, Toast.LENGTH_SHORT);
toast.show();
Intent intent = new Intent(this, SplashScreenActivity.class);
startActivity(intent... | 1 |
66297a88a03afb061e9222bed326d050 | dfc74c1fafefa8beb97784fe1686120e | turns 1s to 0s, and 0s to 1s | s = ''
for el in inp:
s += "1" if el == "0" else "0"
return s | 1 |
c61d8da71f67049df4ec9adb739fda11 | d89a1b291808297269c047f5234c6f1f | load image paths grouped by label | img_labels = []
img_paths = []
img_dir = "{0}images".format(dir_path[:-6])
for filename in os.listdir(dir_path):
label_path = os.path.join(dir_path, filename)
img_filename = "{0}png".format(filename[:-3])
img_path = os.path.join(img_dir, img_filename)
img_paths.append(img... | 0 |
64a0e098f943343c5030a056b84a7ef4 | c50024355d07ab9fd5552307b7845a50 | update the used disk for the user | class User extends Authenticatable
public function used_disk_space()
{
return $this->songs()->where('uploaded_by', '!=', 'admin')->sum('file_size');
} | 0 |
42fe479148a3c12d065d8a84d153adc6 | f4c84f938f20dea408aebe3bbd3fe632 | Draw the detection circle and point out all the neighbors | function Probe:probeDraw()
love.graphics.setColor(utils.colorToLine(self.number, self.alpha))
love.graphics.circle("fill", self.x, self.y, self.r)
love.graphics.setColor(0,0,0,255)
love.graphics.circle("line", self.x, self.y, self.r)
love.graphics.setColor(255,255,255,255)
end | 0 |
dbb76eedb82b53fb4992292f77f0a85a | 5db63c8bb897113fcf031a3d504dbb62 | Set mention. | class CreativeWork extends Thing
public function mentions($value)
{
$this->setProperty('mentions', $value);
return $this;
} | 1 |
1fadc000f183f88381f472fd5ee5fd71 | 08c8fe43bead7acc4bdd52a568bc9787 | Check link is point-to-point link | class CCheckTnodeInOutlink1(platform.TestCase.CTestCase):
def _do(self):
sqlcmd = '''
select count(*) from
(
select meshcode,sroadno,unnest(array_agg(eroadno)) as eroadno ,
unnest(array_agg(tnodeno)) as tnodeno
from org_hwlane a
join
... | 1 |
c8ab0a772615f7c899379932d05bb166 | 32454dc82d070da085aaf522d64a8afd | Shortcut that returns a list of StockTransactions for this product
stock. | def get_goods_from_product(productid: str) -> List[Stock]:
productid = validator.objectid(productid)
product = functions.Retrieve.byid(productid)
return Stock.objects(product=product) | 0 |
d58a2314c156c44d750a84648bfc51d3 | 8cf8ef7de1f408d11037165ef38c7fe3 | Creates an async unary call continuation with test results. | ClientInterceptorContext<HelloRequest, HelloResponse> context)
{
Task<Metadata> responseHeadersTask = Task.FromResult(TEST_RESPONSE_METADATA);
Task<HelloResponse> responseTask =
TestStreamReader<object>.FromException<HelloResponse>(TEST_EXCEPTION);
... | 1 |
f79c5e312eadf31a40c73e39ed491666 | a328b9098076eb3055fb2fe59fb5f9e9 | Get the required type modules based on the database inputs
for the specified scenario_id. Required modules are the unique set of
generator capacity types in the scenario's portfolio. | c = conn.cursor()
required_capacity_type_modules = \
get_required_capacity_types_from_database(conn, scenario_id)
imported_capacity_type_modules = load_gen_storage_capacity_type_modules(
required_capacity_type_modules)
for op_m in required_capacity_type_modules:
if hasattr(import... | 1 |
d305cf34ce9943ba69fa2be061272693 | bd6b836b637854ca43c41d1beb588db3 | Returns user input from the cli. | class Commander():
def input(self):
pass | 0 |
feaee6399a3ae4059d56f7f64882515b | b3e77a795f361c0549d6eb7955e751a1 | Returns the first control that is an instance of the given class,
or null if no such control exists. | namespace TestAutomationEssentials.CodedUI
public static class CodedUIExtensions
public static TTestControl Find<TTestControl>(this UITestControl parent)
where TTestControl : UITestControl
{
return parent.Find<TTestControl>(null);
} | 1 |
a45ca4343ed107b73a26034e97980944 | 891ed269c0220c6a695f51b1752c0abf | Returns a new object of class '<em>Behavioural Description</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | namespace Myre.Entities
public class EntityDescription
public bool AddBehaviour(Type type, string name = null)
{
return AddBehaviour(new BehaviourData(name, type, null));
} | 0 |
fdb0bbf035b826505721cc3b4084e4b6 | 30f7d6803e0a213bbc81b4e7622ddac3 | Creates an instance of [DeviceParametersBuilders.DeviceParameters] from the [Context]. | class GraphBaseServiceClient
def devices()
return MicrosoftGraph::Devices::DevicesRequestBuilder.new(@path_parameters, @request_adapter)
end | 0 |
88e03e961cebd5831643d30ff8d3064e | 14d2987957b83c5484d61e631b7e0602 | Writes fasta sequence to specified path. | def qfas(l,fname):
with open(fname, 'w') as w:
for r in l:
w.write('>'+r.locus+'\n')
w.write(r.sequence+'\n') | 1 |
42753efc0b87a941ab03344ab15469ec | f4eb4cc7b3b31169776d6af56c53c6bc | 根据车辆Id和迁移类型获取最新的迁移记录
车辆Id
迁移类型 | Map<String, Object> getTrackById(String trackId, String carNumber); | 0 |
a2ecd8002fca6b86081d0e211016dad5 | aa4c3bc17db3c40370d4adff09d797ef | 根据介绍主键ID获取内容主键ID | class TblIntroduceMailMapper extends MapperBase
public function findByPrimarykey($primarykey)
{
$select = $this->select();
$select->where('f_id = ?', $primarykey);
$result = $this->fetchRow($select, ModelTblIntroduceMail);
return $result;
} | 0 |
4187354ff816232dd57bb2051f9319f8 | 5ab9817b6087afb4ce4b0ba83b408e91 | 打开右侧信息页面 | wx.navigateTo({
url: '../../common/info/info',
success: (result) => {
},
fail: () => {},
complete: () => {}
});
} | 1 |
8ae32578a85a8fe54e7b5a4b540794e9 | cb9cce27a6260ae75b1ac6d8befba5ad | 获取全部最新的数据 | @Table("JpushJsonData")
class JpushJsonData
fun getNewestData(): JpushJsonData? {
return null
} | 0 |
4f1249a89aa72e19e7011b3c3efea9eb | 582e73ed5478100e0bafb84af7fc7d75 | Test multi-column assignment from 2d arrays and tuples of 1d arrays | data = np.array([[0,0],[10,0],[0,1]])
params = np.array([[0,1,0,1],[10,1,0,1],[0,1,1,1]])
score = EMFITTER.score(data,params)
assert {0:(0,),1:(1,),2:(2,)}==EMFITTER.assign(score)
score = EMFITTER.score(data,params[[1,2,0]])
assert {0:(1,),1:(2,),2:(0,)}==EMFITTER.assign(score) | 1 |
8ad0b84530daf744ec6caa22964b6503 | cf219ec3426612cfcfa54ddffbfc2af5 | <============================ DEVICE MAKER ==============================> | public class Device
public String getMaker()
{
return this.manufacturer;
} | 1 |
d78494bac417c40db3b0016ecc728ec1 | 498b81fca77737a1abb07970f079f59c | Add a pending user to a trip | createTripForUser(tripBody, user_id) {
return Repository.post('/users/' + user_id + '/trips', tripBody);
} | 0 |
e59735dccb0fc38bba0f226b6613888b | aafec366c6fd795d32ab222d3539375d | Unregister from clipboard chain | namespace QuickGenerator.clipboardring
class frmMonitor : Form, IPressKey
protected override void Dispose(bool disposing)
{
if (isActive)
{
isActive = false;
NativeMethods.ChangeClipboardChain(this.Handle, nextClipboardViewer);
}
... | 1 |
b210f551113d66010227d8c849dae5cd | a37a3e4c5693a5cc06c0330232b948cf | LOAD SLIDE: This function loads a big page image and its description from the array when a relevant thumbnail is clicked | var titles = document.querySelectorAll('h4');
if(titles.length) {
for(var i = 0; i < titles.length; i++) {
var description = titles[i].nextElementSibling;
var imageSrc = description.nextElementSibling.src;
slideContent.push({
... | 0 |
37dc1431198f352c1614b3c17f9ec640 | 52ff47cb6c5d446b30384dee765ec13c | Get Enrollment_Period_Data value | class Internal_Project_ExperienceType extends AbstractStructBase
public function getInternal_Project_Experience_Data()
{
return $this->Internal_Project_Experience_Data;
} | 0 |
56f53499fca2b33a3507f29d2141aaa1 | fdd6c8135f746f56016dae63a9c73e35 | Gets the state of the specified type. | namespace Microsoft.ServiceFabric.Actors.Runtime
Task<T> GetStateAsync<T>(string stateName, CancellationToken cancellationToken = default(CancellationToken)); | 1 |
462ed4d8c8b0d517f6aaa7ce104721de | aa31175839efae0d145e625b1fbc579d | Respond to the "Resume" item selection. | selectedIndex = self.exVideoResumeDialog.GetList().GetFocusedItem()
if 0 == selectedIndex:
if self.referenceItem.GetProperty("timeToResume"):
timeToResumeInSeconds = float(self.referenceItem.GetProperty("timeToResume"))
if 0 != timeToResumeInSeconds:
t = threading.Thread(target=self.seekTo, args=(ti... | 1 |
89b3bc8fc4cd04c11a52a82bc0004ebd | c272cdba6fd1399aa003f236aff712ca | Merge multiple DataBlock objects from the same guppi scan. | def merge_syncd(adv_list, sync_on='ensemble'):
out = multi_sync()
mn = 0
mx = np.inf
ndat = len(adv_list)
if not sync_on == 'straight':
for a in adv_list:
mn = np.max((mn, np.min(getattr(a, sync_on))))
mx = np.min((mx, np.max(getattr(a, sync_on))))
else:
f... | 1 |
f39859cb1330d3b6ba6972c794f57a2e | 81e7ed5d02163c28d1e4f0cf78a83d76 | Copies the properties from the passed native constraint description into this
managed description. | namespace HavokManaged
void StiffSpringConstraintState::NativeToManaged(const vHavokConstraintDesc &nativeDesc)
{
vHavokStiffSpringConstraintDesc const& bsDesc = (vHavokStiffSpringConstraintDesc const&)nativeDesc;
ConstraintStateBase::NativeToManaged(nativeDesc);
} | 1 |
8a0728bf891be7d73bfc571e9ffbeb05 | 4c610763e486a8b769007b9875895c56 | Gets the value of the 'confidence' field | class SentimentsResponseAttributes implements ModelInterface, ArrayAccess
public function getConfidence()
{
return $this->container['confidence'];
} | 1 |
1e074a2d8aabac84d8e290ce2f841557 | 511afb3466f3e3263c46eefb08727c04 | Creates a directory by {@link #createParentDirectories(Path, FileAttribute...) creating all nonexistent parent
directories first}. Unlike the {@link java.nio.file.Files#createDirectory(Path, FileAttribute...)
Files.createDirectory(Path, FileAttribute...)} method, an exception is not thrown if the directory could not be... | public class Sfs
public static SfsPath createDirectories(SfsPath dir, FileAttribute<?>... attrs) throws IOException
{
if(sfsTree.resolvePath(dir) != null)
return dir;
SfsPath returnValue = SfsPath.getSfsPath(Files.createDirectories(dir.getActualPath(), attrs), homePath);
SfsFileI... | 1 |
58e5581aed313beb23bfa8e9fe7d5781 | c16fba6eb8f8eddf6af45b642915093d | 新版首页广告(既之前的首页单双栏位置广告) | class HomeIndex extends Controller
public function advert()
{
$find=model('Advertisement')->field(['id','pic'])->where(['status'=>0,'goodsclass_id'=>0])->order('id desc')->find();
$this->assign('res',$find);
return $this->fetch('web/widgetHtml/advert');
} | 1 |
6049c9031dc7ae044ff5997af5afac96 | fa992e75aec9f318bcbba2895aad2c56 | Registrar uma rota no express. | class App
private routes(): void {
RegisterRoutes(this.express);
} | 1 |
dcd65685f9bd5721ffa7af7b95c7d748 | 26205a86e7b1c9227c75a0f846171e07 | Map the deeplink generator model to deeplink entity. | AppDeeplink apppDeepLink = mapProperties(appDeeplinkPayloadDTO, number, shortUrl, true);
await _appDeeplinkDBContext.AddAsync(apppDeepLink, token);
_appDeeplinkDBContext.SaveChanges();
} | 1 |
8f5c78e2a185585ae694824693fa78f0 | 170c3e01e1715fd2da3d329954eda126 | ジャンケンを実行する関数 | def janken(s1, s2):
if(s1 == s2):
return "draw"
elif((s1 == "P") & (s2 == "C") | (s1 == "G") & (s2 == "P") | (s1 == "C") & (s2 == "G")):
return "lose"
else:
return "win" | 1 |
2f2ec7baef4aebf5e40bcf42f7daeb3e | 86d19c22580874b08e0d31c781ae344c | Data provider with arguments for the test that tests the consumers
__call method. | class ContextCreatorTest extends TestCase
public function testContextCreationDataProvider()
{
return array(
array(
static::CONTEXT_TYPE_SERIALIZE,
'foo',
null,
),
array(
static::CONTEXT_TYPE_SERIALIZE,
... | 0 |
17d0e2b07b876052e8415282c236b55d | afcc58213c5a055fd830e8d6a1b25e39 | Adds debugging messages for objects that failed to save for any reason | from .extract_lines import extract_lines
from .extract_points import extract_points
from .extract_polys import extract_polys
for i, badGeom in enumerate(extract_points(badGeoms, onlyValid = False)):
print(f"ERROR: Writing \"debug{prefix}Point{i:d}.csv\" ...")
with open(f"debug{prefix}Poi... | 0 |
9bf5120ceaba2993b4fe53a4decf507e | e45916c5ccfb8f18934407e1530bd631 | Prices and revenues are handled as integers at the model level, so
part of serialization is converting cents to dollars | class Money
def demongoize(object)
object ? (::BigDecimal.new(object.to_s) / 100) : object
end | 1 |
e8572e83017bd1c6283d958786f8f6f3 | 45f416ce8dc243efcf3e9387faca682e | Reads and parses a USB ('Unsubscribe') request. | ssize_t mqtt_pack_unsubscribe_request(uint8_t *buf, size_t bufsz, uint16_t packet_id, ...) {
va_list args;
const uint8_t *const start = buf;
ssize_t rv;
struct mqtt_fixed_header fixed_header;
unsigned int num_subs = 0;
unsigned int i;
const char *topic[MQTT_UNSUBSCRIBE_REQUEST_MAX_NUM_TOPICS... | 0 |
4baa0582748332a4a56158dcd6c6323e | 878d9a451f788476dc62da51a155278b | Ignore auth messages. | class Profiles(commands.Cog):
async def on_message(self, ctx):
if ctx.author.bot:
return | 1 |
8a487a074f83d78ac84022a763f2a9fe | 1807bed4c8c503d1ef4d0ec93007aa22 | Log out button to take user back to login page from virtual garage page: | public class account extends Fragment
void logOut(Button logoutButton){
logoutButton.setOnClickListener(v -> {
Intent logoutIntent = new Intent(getActivity(),LoginActivity.class);
startActivity(logoutIntent);
Toast.makeText(getActivity(),R.string.logoutToast,Toast.LENGTH_SHOR... | 1 |
bed6767f59113abd2a03d5a3e51e1c05 | 0975b274d0889fabf3ff7e1c1a3c9f37 | saves the changes to the excel sheet when done editing it | class TimeSheet:
def save_time_sheet(self):
self.wb.save(self.fileName) | 1 |
f5cb36cfe6bed514385c9069870edabd | e8c5156b5ad3ec5f914772ee48b2951c | Gets the runtime OID of the model element.
<p>
Contrary to the element OID, runtime element OIDs are guaranteed to be stable over
model versions for model elements of same type and identical fully qualified IDs.
</p>
<p>
The fully qualified ID of a model element consists of the concatenation of the fully
qualified elem... | public OID getOID(); | 1 |
5d9923e6ff474864eb9b29e93ee008f7 | c9c401d06e1d5b003216686ec416e5a0 | 필요한 모든 이항계수를 미리 계산해 둔다. //파스칼 삼각형 조합 !!!! | {
const int N = 1e5;
jc[0] = 1;
for (int i = 1; i <= N; ++i) {
jc[i] = 1LL * jc[i - 1] * i % mod;
}
nc[N] = Pow(jc[N], mod - 2);
for (int i = N - 1; i >= 0; --i) {
nc[i] = 1LL * nc[i + 1] * (i + 1) % mod;
}
for (int i = 0; i <= m; ++i) {
C[i] = Comb(m, i);
}
} | 1 |
1b26884774692ccea57c3e9da1ad46fc | c939726e39f6c0a685184058fcf7d1fa | Swaps the first name and the last name positions. | class Person(Notable, DateRange):
def firstname_last(self):
names = self.authorized_name.split(', ', 1)
return ' '.join(reversed(names)) | 1 |
dcc2c9291a74898acdf4a6eaec858013 | 4ef019e3a085024594658abd0e1d4b49 | Modify the now black and white image from the threshold. First change the white space to green or red,
Then modify the black to be white. Return an image that is green/white or red/white with no other colors present
Doc:
https://stackoverflow.com/questions/3752476/python-pil-replace-a-single-rgba-color | img=Image.new("1",image.size)
draw = ImageDraw.Draw(img)
for y in range(0, image.size[1]):
for x in range(0, image.size[0]):
g = image.getpixel((x, y))
if g > G:
draw.point((x, y), 1)
else:
draw.point((x, y), 0)
return img | 0 |
f80b40e16a969bebca1df22337b19229 | 48cef3b0856da8cc250db56b112f060f | calculates the population of the species in 10 years | public class City
public int computeFuturePopulation(int years) {
double populationAmount = population;
int count = years;
populationAmount = populationAmount * Math.pow(1 + growthRate / 100, count);
return (int) populationAmount;
} | 1 |
153411bb8137258bb35801e41b555da5 | 31aa2beb5963ecca94d1f50c89a2ce24 | 找出铺砖方案 | @RestController
@RequestMapping("/house")
public class HouseController
@RequestMapping("/layout")
public Object selectLayout() {
return houseService.selectLayout();
} | 0 |
eb3256d9fcb6e285ea2615b4123a1280 | 5ab785202dafdcd32f54f51072f6cee2 | ignore - this dataset never changes | public class SimpleIntervalXYDataset2 extends AbstractIntervalXYDataset
implements IntervalXYDataset
public void addChangeListener(DatasetChangeListener listener) {
} | 1 |
b6bb6d12e98354a040df910b47d891fc | 78070b67041e9f53ff515c39fa4c17f9 | Gets the flag that indicates whether or not the exam has been started. | public boolean hasStarted(final long examId) {
return examRepository.findById(examId)
.filter(AuthorizationHelper::examHasStarted)
.isPresent()
;
} | 1 |
4f0c1289d9142595ee4931ff414e6eea | e4597f1ab2dcd934fc687e42aec2754c | Converts the view model property to business object property. | namespace Gorba.Center.Media.Core.DataViewModels
void ToDataModel(IDataViewModel dataViewModel, object dataModel); | 1 |
15139e30e2c50c7341edc935ef23a8dd | b4964fffebade9233f688877fb4c3134 | 설문템플릿 화이트리스트를 조회한다. | @Controller
@RequestMapping("/smstemp")
public class SmsTemplateController extends CSCBaseController
@RequestMapping(value="/listsbwl.htm", method=RequestMethod.GET)
public String listsbwl(Model model) {
return "smstemplate/smsBlackWhiteList.ftl";
} | 0 |
62ca98ba6ae747a8acc6ba23e4bcb944 | c27a0d7cf3f2b87f54c9ffdf34ac02ac | 查询许可证编号是否存在 | int queryLicenceNoIsExist(String licenceNo,String licenceId) throws DaoAccessException; | 1 |
f473533071d3f05b51fa5c51bd9b6481 | 65cd938f8cd5391f05699a8d353364bd | Creates the sets. | {
Schema::create('sets', function (Blueprint $table) {
$table->increments('id_set');
$table->integer('set_num');
$table->integer('reps');
$table->integer('weight');
$table->integer('id_train')->unsigned();
$table->integer('id_ex')->unsi... | 1 |
e63b49648ee2b77ab0b077e354bd52aa | b75dcde94bf70ed923a2dea630203604 | 插入打卡记录评论 | @POST(NetConfigApi.INSERT_COMMENT)
Observable<BaseResponse<Map<String, Integer>>> insertComment(@Body RequestBody body); | 1 |
b9441cb66c7ee4276ba42ddc771ffed9 | b0983bb301d2434a2c5200eff91d021f | Gets a job parameter with the given name, preferentially using the specified parameter section | class IniSectionParameters(object):
def __getattr__(self, name):
if name in list(self._parameters.keys()):
return self._parameters[name][0]
else:
raise_with_traceback(AttributeError("No parameter: %s"%name)) | 0 |
f5a34519c55ee8e0619ce55463f935be | b48ce66e0a07c62c839718be127ac570 | Combine each prediction and the corresponding ground truth as well as input into one image and save as png files. | assert isinstance(results, list), 'results must be a list'
imgfile_prefix = osp.join(imgfile_prefix, 'vis')
if not osp.exists(imgfile_prefix):
os.makedirs(imgfile_prefix)
print_log('\n Start formatting the result')
for id in trange(len(results)):
pred, gt,... | 1 |
0ac53369c1df271f0c52041863848d01 | af26c0da8bbb64274383178763296c3e | 重新整理固定收件人
1. 跑固定收件人迴圈一一跟選擇成員比對
2. 以選擇的成員ID過濾出固定收件人 | class ComposeController extends TuduX_Controller_Base
private function _getReceiver($params, $name, $suffix = '')
{
$ret = array();
if (isset($params[$name . 'idx' . $suffix]) && is_array($params[$name . 'idx' . $suffix])) {
$recIdx = $params[$name . 'idx' . $suffix];
$rec = ... | 0 |
a8af870d2699ee31a55bf902e6416a1b | 700884c2fbfe86c0eba3cee5e2350675 | Provides the target wait time. | Optional<Long> getWaitTime(); | 1 |
786624a9041cb9d5fe98c54f6d80e281 | f257037e85cdbfa3ffd9a8f7be507cad | 获得用户uid的好友列表,每个页面显示9个好友,page从0开始,没有好友返回空数组 | function uc_friend_list($uid, $page, $perpage, $status) {
$args = func_get_args();
return uc_data_request('friend', 'get_list', $args);
} | 1 |
1ff144e86783192397d7a3d7610398fe | b2ca79fff79995119e3b7452e28dfc02 | Returns four 128-bit byte strings that can be used as 128-bit keys | self.host_aes_key = hashlib.sha256(b"host_aes" + shared_secret).digest()
self.card_aes_key = hashlib.sha256(b"card_aes" + shared_secret).digest()
self.host_mac_key = hashlib.sha256(b"host_mac" + shared_secret).digest()
self.card_mac_key = hashlib.sha256(b"card_mac" + shared_secret).diges... | 0 |
5831914563c76ef7c8bb5320e97db7da | 5bd455d03c6047a3daae5c6eee4105d2 | Orders by <code>value()</code>'s lexicographic ordering. | validateArgCount('Query.orderByValue', 0, 0, arguments.length);
this.validateNoPreviousOrderByCall_('Query.orderByValue');
const newParams = this.queryParams_.orderBy(VALUE_INDEX);
Query.validateQueryEndpoints_(newParams);
return new Query(this.repo, this.path, newParams, true);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.