query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f78654264b32fed2ec0b7cbd58afc89e | 8953a69a8e97843d72d3d0487e8eb679 | This test simulates checking out a frozen dataset from Git that has no
overlays written to it, i.e. where the ``.dtool/overlays`` directory is
missing.
See also:
https://github.com/jic-dtool/dtoolcore/issues/3 | filename = "CHANGES.rst"
result = runner.invoke(cli, ["dataset", "create", "dataset"])
assert 0 == result.exit_code, format_result_exception(result) + str(result.stderr_bytes)
result = runner.invoke(
cli,
[
"dataset",
"add",
"dataset",
"-s"... | 0 |
a3be4d1f935d9324edee40485a60ce99 | c8fca6da7aa4d44dadfdc1a3a3dbe7bf | Lazy load image | function lazyImg(curImg) {
if (curImg.isLoad) return;
var tempImg = new Image;
tempImg.onload = function () {
curImg.src = tempImg.src;
tempImg = null;
};
tempImg.src = curImg.getAttribute('data-src');
curImg.isLoad = true;
} | 1 |
c708aa9081a7321e0b78f58b7cd4be2a | 0f1a3a04537536df85f7d1c95bae60b1 | Whether this is a form parameter. | class ProfileItemDao(ElementDao):
def is_parameter(self):
return self.dtype == self.DTYPE.PARAM | 1 |
a5251dec40bd142b4cf4e34a073e41bb | 00fce814fc1483305b87da01e35fd6aa | 将内存数据转换为流 | namespace ZM.Extensions.DataEx
public static class DataExtensions
public static Stream ToStream(this string str, ref long length)
{
using (MemoryStream stream = new MemoryStream())
{
using (StreamWriter writer = new StreamWriter(stream))
{
... | 1 |
d183439682b6bdbdb9901b5a0a9da1c4 | e7461b1325c8a323926bda3ce7b1f542 | 绑定药品网格信息 | namespace HIS_DrugManage.Winform.ViewForm
public partial class FrmOutStoreDetail : BaseFormBusiness, IFrmOutstoreDetail
public void BindDetailsGrid(DataTable inDetails)
{
if (inDetails != null)
{
dgDetails.EndEdit();
if (inDetails.Rows.Count > 0)
... | 1 |
a9c56ccc70a0ad6e06fcaea0107f003d | 6dd6f7074f5fbcde40ed977e63eef2d6 | 杀掉IE进程 | {
Process exeCtrl = Process.GetProcessesByName("wexectrl").Where(p => p.SessionId == Process.GetCurrentProcess().SessionId).FirstOrDefault();
if (exeCtrl != null)
{
exeCtrl.Kill();
}
} | 0 |
bcccc68fd5eb7283995628871c596eb2 | c2aa4414809d08f7cc38775dee89d29c | Funkce zahajujici samotnou precedencni analyzu | int analyse_main() {
genExpr();
return 0;
} | 1 |
e38d06c25c8656b34dc09fea76294137 | bafda826d3a8adf9384d82a4611080fa | CIELAB transformation and using the A-channel | namespace colour
LAB::LAB(XYZ v) {
lightness() = 116.0 * f(v.y / Yn) - 16.0;
astar() = 500.0 * (f(v.x / Xn) - f(v.y / Yn));
bstar() = 200.0 * (f(v.y / Yn) - f(v.z / Zn));
alpha() = v.alpha();
} | 1 |
364d29a66a9feb4b93ce4fba690e43a4 | 9b62a928fb10cd66052fa54c379494de | reset the correct guess back to default | function resetWrongGuesses(){
incorrectGuesses = 0;
} | 0 |
7d9dc97b5fbcadc5b098759a715f953a | 538b00cf9bfcb528b131af514ca24a0a | FUNCTION
DESCRIPTION
register custom handler executed before SSE by APP
APP has to de-register by himself
PARAMETERS
handler [IN] pre launch function
RETURNS
void | {
handler_kernel_t* pHandlerKernel = NULL;
if (!pHandle) {
return -1;
}
pHandlerKernel = (handler_kernel_t*)pHandle;
pHandlerKernel->postReportDataCB = cb;
return 0;
} | 0 |
76ebb7a1a288a5d18ef4e93e6986dcff | 25a8ae44145c2806d70ea6fdc69a52d7 | With no content and allow_empty_first_page=True, 1 is a valid page number | class ModelHandlerTestPaginateData(TestCase):
def test_invalid_paging_1(self):
handler = self.handler
data = User.objects.all()
page = 1000000
self.assertEqual(
handler.paginate_data(data, page),
(data, {}),
) | 0 |
b137c286e6bac90f18de90b42cda2b2e | 8e5c35ee7add40b283f2eb06f57b29cb | Sets <code>value</code> as the attribute value for NationalId. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "insuredInfo",
propOrder = {
"insuredPersonName",
"siArea",
"siID",
"nation",
"idCard",
"securityNum",
"birthday",
"residencyProperty",
"personnelType",
"personalIdentity",
"gender",
"orgCode"
}
)
public class I... | 0 |
b12c33a62158ba75c76bb0c731acb54c | 8d4752abf31de227872e6a0bb12a7081 | 根据有无code判读查询key还是val | String valStr = "";
if (val != null) {
valStr = String.valueOf(val).trim();
}
HttpSession session = ServletActionContext.getRequest().getSession();
if (session != null) {
List codeList = getCodeList(codeType, session);
if (codeList != null) {
for (int i = 0; i < codeList.size(); i++) {
Map c... | 0 |
e7a17b444823ccfa958216814572ecf6 | da99385bcd49e0a3ba6ae8213cca4dce | * --------------------------------------------------------------------------
* function : process column transform option
*
* parms :
* parms - associated parms
*
* returns :
* N/A
* -------------------------------------------------------- | string_len)
{
integer i__1, i__2;
integer i_len(char *, ftnlen);
int s_copy(char *, char *, ftnlen, ftnlen);
integer s_cmp(char *, char *, ftnlen, ftnlen);
extern int convrt_2__(doublereal *, char *, char *,
doublereal *, ftnlen, ftnlen);
integer f, l;
doublereal x;
char dpnum[32];
... | 0 |
aab5c059f33006dd2d66b4c2feb47f4d | c4d6ac0207871e6dd66593c0863f6804 | Verifies member stances from multiple sources are matched. | class UtilTest(unittest.TestCase):
def generate_collect_type_stance_array(self):
stance1 = Stance()
stance1.source_db = db_constants.MEMBERS
stance2 = Stance()
stance1.source_db = db_constants.BILLS
stance3 = Stance()
stance1.source_db = db_constants.GROUPS
return... | 0 |
7ac2200a0d310beebf76134fd757eea9 | 121bbe60e3db5aa2a37d72329bc37c39 | 判断两个字符串是否内容相同,不区分大小写 | public class StrUtils
public static boolean compareIsSameIgnoreCase(String str1, String str2){
if(isEmpty(str1) || isEmpty(str2)){
return false;
}
return str1.trim().equalsIgnoreCase(str2.trim());
} | 1 |
04cb577643ed3bd566b582484e48f278 | b7c391aeb3a96cdc55834c95766e5bca | Try this upload again. | public class MultiImageUploadManager
public void retry() {
uploadAnswerImage();
} | 1 |
3e169e9bebe9403c2cca61a3392baddb | 0341b32413ed86866d9ecef1efdf9e3d | Gets the log of this ability. | String getLog(); | 1 |
8b33a5899e355fab73ea83e11e9a94ef | 87aa4d54c3f09989556aef8c41b91dfa | Filters and/or sorts using at least one encrypted field | public function scopeOrWhereEncrypted($query, $column, $value)
{
return $query->orWhereRaw(db_decrypt_string($column, $value));
} | 1 |
d614d5c10695bc564ed934374ec4931b | b1df0b34e7caac8a2a27a69050a854cc | MakeDefaultMTOShipmentMinimal makes a minimal MTOShipment with default values | m := make(map[string]interface{}, 3)
m["User"] = &model.User{}
m["Pathology Analysis Level"] = &model.PathologyAnalysisLevel{}
m["Analysis Specifications Pool"] = &model.SpecAnalysisPool{}
return m
} | 0 |
5bcf537e2718e196c565cb23edec7721 | e09ae4fdb9cbbb0eabc99f0788946443 | Permite listar registros (inclusive os deletados) | class RegistrosController extends Controller
public function index()
{
return new RegistrosCollection(Registros::where('blacklist',false)->get());
} | 0 |
7d021d7a4e3d913a92c2b13ab6a8fc3d | 7edfd310ec63ac70ac5faaf237183dd9 | Вставка группы импостов
Замещает текущую вставку группой импостов и возвращает её | class Route
public static function mergeWithLastGroup($new)
{
return $instance->mergeWithLastGroup($new);
} | 0 |
02f3d9d16161bef84bfa23d0bea356de | 1d392ee30bc8ce70a9cf6f79b8cf692b | Check that user plan is respected.
Could not do it extending DRF BaseThrottle because we
need to check wether the parameter is found in our
DB and whether already requested in the past before
allowing the request or not. DRF throttling happens
before all this. | class GetAuthTokenTest(ClearCacheMixin, APIRequestTestCase):
def test_user_auth_throttle_ip(self):
data = {}
request = APIRequestFactory().post(self.auth_url, data, REMOTE_ADDR='127.0.0.1')
response = self.view_class.as_view()(request)
self.assertEqual(response.status_code, status.HTTP_4... | 0 |
c88a1ed2d2446b4dee8135f07d4bb7e5 | 21dc02f8c09c9559c4e815f681d9e09d | Scale features into a unit Gaussian. | class UnitSphere(object):
def __call__(self, data):
data.pos -= data.pos.mean(dim=-2)
data.pos /= data.pos.norm(dim=-1).max()
return data | 0 |
16a938c903fa111fa4c2654b05d79eee | 219be04fea84326e6bd754194476a202 | Get the server read connection. | class ClusterDB implements ICusterDB
public function getReadServer() {
return self::$_READ_POOL;
} | 1 |
85565b893dc908df615292bdd6798d9d | 8c8919b81ffa1ec2bd0cc43edd3c7425 | - generator | def genFib():
fibn_1 = 1
fibn_2 = 0
while True:
next = fibn_1 + fibn_2
yield next
fibn_2 = fibn_1
fibn_1 = next | 1 |
40c55e53188edf18c4cb5dc951c917c8 | 682f2ff1691a1802dd7913a654eca50e | Filter the query on the tipo_operacion column
Example usage:
<code>
$query->filterByTipoOperacion('fooValue'); // WHERE tipo_operacion = 'fooValue'
$query->filterByTipoOperacion('%fooValue%'); // WHERE tipo_operacion LIKE '%fooValue%'
</code>
Accepts wildcards (* and % trigger a LIKE) | {
if (null === $comparison) {
if (is_array($tipo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $tipo)) {
$tipo = str_replace('*', '%', $tipo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GrupoPeer::TIPO, $tipo, $comparison);
} | 1 |
5be5a1741e7ef63fe9146e90cffae228 | e3e03650c6806718d4815cbc700f3b2e | Test de la methode add_to_end(valeur) de la classe LinkedList. | class TestSLinkedList(unittest.TestCase):
def test_append_2(self):
myObj = SLinkedList()
myObj.prepend(120)
self.assertEqual(myObj.get_head(), 120)
self.assertEqual(myObj.get_tail(), 120) | 0 |
9d7cee74ea9ab581f0bec19a631ec07a | ba7552619181e3cfa17afef513df9d83 | Returns the value of the '<em><b>Search Algorithm</b></em>' attribute.
<!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
Indicates the type of algorithm Express should use for loading and
accessing the values of the Composite Dimension. The valid values are
HASH, BTREE. <!-- end-model-doc --> | AlgorithmEnum getAlgorithm(); | 1 |
db149d806c3793c3a16d92833cd7d7d6 | 36f1d45a531032c3ea817f369c8bdfab | Returns the meta object for the attribute '{@link CIM15.IEC61970.Informative.InfCustomers.PowerQualityPricing#getPowerFactorMin <em>Power Factor Min</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getEnergyConsumer_PowerA(); | 0 |
950caf4df9135ec21ae0665cf1289997 | fb96e93f00b58d007303ee48f57ad822 | dodaje nowa wystawe do systemu | class Gra:
def dodaj_ture(self):
self.tura = Tura(self.plansza)
self.tury.append(self.tura) | 0 |
e6ad4f7c6b8d379684f6eb75f71e64ef | d7136fb44cf117683ea37add8d7e3b6a | Returns the error code returned by <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724844(v=vs.85).aspx">RegCreateKeyEx</a>
ERROR_SUCCESS (0x0) if succeeded or any of the system <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx">error codes</a> (0-499) | def RegGetKeySecurity(*arg):
return Hook('RegGetKeySecurity', *arg) | 0 |
25023ee1a6985cd33b81d36ab33df3ce | 6287a0554453feffcda75480b74a9259 | Número exibido no componente, caso o mesmo seja maior que 99 o valor exibido será 99+. | class Cnpj(DocumentoIdentificacao):
def __str__(self):
if self.rawValue == None: return str()
x = self.rawValue
if not x.isdigit() or len(x) != 14 or len(set(x)) == 1: return self.rawValue
return '{}.{}.{}/{}-{}'.format(x[:2], x[2:5], x[5:8], x[8:12], x[12:]) | 0 |
f7a301231237258031d3ec6591906909 | 59b98ca4952e9947c93dffd3bcfa5f2b | Points Ginger's head at the cursor whenever the mouse moves. | public class CubeGameManager : MonoBehaviour
void MoveCursorAt(GestureInfo gestureInfo, TrackingInfo trackingInfo, Warning warning)
{
if (warning != Warning.WARNING_HAND_NOT_FOUND && gestureInfo.mano_class == movingManoclass)
{
if (!cursor.activeInHierarchy)
{
cursor.SetActive(true);
}
cursorRectTr... | 0 |
db6cb7b2159a36a223aa25b9a27c68b1 | b95d7380462211a1e2a650206bbe287a | 从缓存中移除已经失效的元素 | namespace Hong.Cache.RuntimeCache
public class MemoryCache<TValue> : Cache<TValue>
void ClearExpiredItem()
{
var removed = 0;
foreach (var item in _datas.Values)
{
if (item.Expired)
{
_datas.TryRemove(item.Key, out Cache... | 1 |
db32430ff22cb0e6a12fb9c9243ad3c7 | f18e4d31827c9d85d8ca3ef56bb24fe6 | gets color for the color map that goes from blue to yellow to red | function getColor(value){
if(value <= 100 && value > 60)
return "#CCFF66";
else if(value <= 60 && value > 30)
return "#FF9900";
else if(value <= 30)
return "#FF0033";
} | 0 |
0e9eafcc5dffe4413a095399e0a08230 | 46f5c4c9f88c10d6b1af0af79649e936 | 将Ab01DO转换为Ab01BO | namespace WebMES.Utils.DataExtend
public static class BDOConverter
public static List<BDOs> ToBDOsModel(DataSet ds)
{
List<BDOs> lstDs = new List<BDOs>();
List<string> lstTbInBdos = new List<string>();
foreach (DataRelation v in ds.Relations)
{
... | 0 |
f5303b500fe4b811cd74de19ac8c5ff1 | 1f4c2feb74965dd6b5641682dbaad22f | 設定ボタンのパネルの表示オフ | public class Buttons : MonoBehaviour
public void OpenSetting()
{
settingPanel.SetActive(true);
homePanel.SetActive(false);
} | 0 |
2a14c67a13eb7c2b4c712774b7a7786c | d94affc3cfe60ce2ca50cd32a7b982d4 | Set users whose affiliation approval is pending | class User
def pending
includes(:follower_statuses)
.where("user_followings.status": User::Following.statuses[:pending])
.references(:user_followings)
end | 1 |
01933113da33b1a49c02ab061999c049 | 574fdca9b118d2868ff352fdff3daaf6 | Function that joins paths.
All paths use / instead of \\ for simplicity. | function JoinPath(...$paths){
$result = "";
foreach ($paths as $value) {
$result .= $value . "/";
}
error_log("[JoinPath] before: " . $result);
$result = str_replace("\\", "/", rtrim($result, "/"));
error_log("[JoinPath] after: " . $result);
return $result;
} | 1 |
27cd7b3673373a14b6ceffb332129fc2 | a3037e7b9e6b1c80d62560e0d6207bfb | * Try to shorten the verbose names in cpuinfo * | void init_pcpu_model_name(void)
{
cpuid(CPUID_EXTEND_FUNCTION_2, (uint32_t *)(boot_cpu_data.model_name),
(uint32_t *)(&boot_cpu_data.model_name[4]), (uint32_t *)(&boot_cpu_data.model_name[8]),
(uint32_t *)(&boot_cpu_data.model_name[12]));
cpuid(CPUID_EXTEND_FUNCTION_3, (uint32_t *)(&boot_cpu_data.model_name[16]),... | 0 |
dd687803f77d0c40e7a294f1bf3ed6d5 | fbc3e03fe9f45fa8f951068d3034fd0b | Création de la liste de carte avec la liste venant de l'API SpringBoot | for(let i = 0; i < data.length; i++) {
let col = document.createElement("div");
col.classList.add("col-12", "col-md-3", "carte");
row.appendChild(col);
let linkCard = document.createElement("a");
linkCard.href = "produit.html?id=" + data[i]._id;
col.appendChild(linkCa... | 1 |
8fa78631530a8e172f2d0c493e49ab01 | ab6477cb1f8d3bec830a763d0144663e | 设置模态窗按下抬起样式 | var dlgClr = 'rgba(209, 211, 212, 0.5)';
var dlgClrHover = 'rgba(209, 211, 212, 1.0)';
$scope.setHoverStyle('quickLoadDlgFrame',
dlgClr,
dlgClrHover);
$scope.setHoverStyle('itemSelectDlgFrame',
dlgClr,
dlgClr... | 0 |
e3ed49c25ec19c96d7f0bc196ed33d38 | 1292f204d9358740c5ddb0e72f5a2e7d | calculate position for apartments img | scrollPos = $(this).scrollTop();
$('#landingSlide').css({'background-position': 'center ' + (200 + (scrollPos/4)) + "px"});
} | 0 |
5539e81f88a40d8055618b916b04fcc9 | 5e13e2ea65e007a3b83651d3dad0e023 | Returns the meta object for the reference '{@link org.eclipse.gmf.examples.mindmap.Relationship#getTarget <em>Target</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getReferenceTarget(); | 1 |
34de1f29426225496039a0e303d1a512 | ea72b4045452c1d876689d81200762ef | 通过BbsColor的id更新BbsColor中的数据,包括null值 | public int updateThemeCssByIid(ThemeCssForm themeCss); | 0 |
209e09464a0fbe6e926698f4204ec723 | 5b87adef1187fef1739734744051325a | Apply NO prediction on images arranged in a 4D array as a batch.
This implies that nb_channels_in == nb_channels_out: dimensions
and contained values are unchanged. | if self.images is None:
new_images = None
else:
new_images = np.asarray(list(None for _ in self.indices))
self.apply_transform(PIL.Image.fromarray, dst=new_images, src=components)
new_data = (new_images, self.labels)
new_batch = ImagesPILBatch(np.arang... | 0 |
7aaecf4771b613d957d79ea548fc69b4 | 1f50a565020f87d4efb90009e20be61b | Dequeue a person and drop them off, play the nice little particle
effect and a sound
Author: Ben Hoffman | {
delayTime = 0;
person temp = riderList.remove(0);
riderList.addLast(temp);
} | 0 |
2e09bc692de90cde4772398371fdb596 | 193e401568c8852257843670df886613 | Creates string with URL part containing GET parameters with one condition for selection | {
$queryParams = "";
foreach ($newCon as $key => $val) {
$selected[$key] = $val;
}
if (count($selected)) {
$queryParams .= "&sl_attr=";
$allVal = "";
foreach ($selected as $key => $val) {
$allVal .= "$key.$val,";
... | 1 |
79011ccf108ed73e3f4c6acb2bfb2fb9 | 21c09040c3a563281c8710a8f62f7ffd | split a dataset string into owner_slug, dataset_slug,
and optional version_number | comma_idx = owner_string.find(',')
name = owner_string[:comma_idx].strip()
address = owner_string[comma_idx + 1:].strip()
return (name, address) | 0 |
d382703a3c423739a96e86689f8b93f5 | 843e45e28bf7871c7e0bd35cc6f32e68 | 网商银行支付申请测试 | {
$encodeStr = 'bank_seq_no=7551102936201603310273064491&interface_version=V3.0&merchant_code=1111110166&' .
'notify_id=5b9b67ecf6be4346ab738dddf9127c62¬ify_type=offline_notify&order_amount=0.01&' .
'order_no=201711140000004830&order_time=2017-11-14+16%3A35%3A06&trade_no=112506059... | 1 |
45f3b6b5d1234b94cd55ae5e97457a4b | 3a82c7cf878d5f41c496031c495bfcc4 | Sorts the event arrays and initializes them. | class WeekView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View(context, attrs, defStyleAttr)
private fun cacheAndSortEvents(events: MutableList<out WeekViewEvent>?) {
if (events != null)
for (event in events)
cacheEvent(event)
... | 1 |
c9d26f3c24e439fd37151c6fc8434c86 | 79dc544f4297ce1005de37795dd796d4 | Only make these states available if Open vSwitch is installed. | if (
this.isOpenshiftCluster() &&
[
OperatingSystem.Flatcar,
OperatingSystem.SLES,
OperatingSystem.ContainerLinux,
OperatingSystem.Ubuntu,
OperatingSystem.RHEL,
].includes(os)
) {
return false;
}
if (this._hasSystemTemplate(NodeProvider.VSP... | 0 |
fb4d67fd5eb12603d8b1b74a17b76266 | 66cfc2de4a9ca4f2dff7cefad3dea87e | Compile a Stan program. | assert isinstance(self.data, dict)
assert 'chain' not in kwargs, '`chain` id is set automatically.'
assert 'data' not in kwargs, '`data` is set in `compile`.'
assert 'random_seed' not in kwargs, '`random_seed` is set in `compile`.'
num_chains = kwargs.pop('num_chains', 1)
... | 1 |
2b3bf5d776aa4fcd80b892994736c137 | 15fc322dfff77d2d7e70d3c5359f1d88 | Возвращает ФИО в сокращенном формате | namespace Sadko_online_app.FolderContact.InfoContact.Components
class ContactBase
public string getShortCorpName()
{
return name;
} | 0 |
3712c4ac1e822607a7619f8ca3f55135 | 4046eedb053c61066871f7eb5fb21ede | Turns the trace mode on for debugging purposes. It will only work
if fDebug (f10) is set. It allows the user to trace through the
logic code as it is executed. | def enableTraceMode(v):
return gp.OPGP_enable_trace_mode(v) | 1 |
9c85895e0c7855656599fef1e6d1f54a | 9ed3ba30a2183e8f4ca324bc46adb381 | Calculates the Flesch-Kincaid Readability Score | {
return Math.Round(((4.71 * ((double)LetterCount / (double)WordCount)) + (0.5 * ((double)WordCount / (double)SentenceCount)) - 21.43), 1);
} | 1 |
04d7067afbfbf38519d3d084676b23eb | a2d0d21410d1b87ebcf9d1dab2fcf461 | Ignore orientation/keyboard change. | namespace Granite
bool FPSCamera::on_joy_button(const JoypadButtonEvent &)
{
ignore_orientation = true;
return false;
} | 1 |
b37514131861817693279d6c21a3bc8c | fd7cce8b54bfd3affb693ea647abcb51 | Update the user interface in response to a search being started. | class ExplorerWidget(QWidget):
def _handle_searching_start(self):
self.start_searching.emit(self.search_edit.text(), self.use_regex.checkState()) | 0 |
304016cd200dc87de88c653c770ddaed | f7b831b884e30adf146b9fe8f19cea17 | Returns the server url without trailing slash, | local url=srv.url_base
if url:sub(-1)=="/" then url=url:sub(1,-2) end
return url
end | 1 |
ab9e50f510258d5e55c72041fff5d576 | 27a05afe906c5ec661b52c6af38c793e | Creates a new action event.
Note: Every keyword argument becoames a public attribute of the event. | obj = cls.__new__(cls)
obj._data = kwargs
obj._events = []
obj._partial = False
obj._track()
return obj | 1 |
876424fae2c95c20009b8a5ea07aa437 | ebd8d040fb8eca7d642f0804a7bacd03 | This is always applicable. A connection to Apigee Edge is required. | namespace RedBear.LogDNA
public class HttpApiClient : IApiClient
public void Connect()
{
} | 0 |
82f022ecea3a6479ebea1b46491300cf | ddc87b84d6c7628736d049c7f28dd878 | AI摸牌 | local actions = {}
for i = 1,8 do
local delay_time = cc.DelayTime:create( 0.3 )
table.insert( actions,delay_time )
local call_send = cc.CallFunc:create( function()
local effect_isOpen = G_GetModel("Model_Sound"):isVoiceOpen()
if effect_isOpen then
audio.playSound("emp3/send.mp3", false)
end
for ... | 0 |
93d6058c8e2001fd65307715d8af2d3b | 447a25816e46c3e192bd192213f96b2e | FUNZIONE CHE COSTRUISCE IL GRAFO NELL'AREA DI DISEGNO | void Costruisci_Muro()
{
glBegin(GL_QUADS);
glNormal3f( 0.0, 0.0, 1.0 );
glTexCoord2f( 0.0f, 1.0 );
glVertex3f( -1.0f, -1.0f, 1.0 );
glTexCoord2f( 1.0, 1.0 );
glVertex3f( 1.0, -1.0, 1.0 );
glTexCoord2f( 1.0, 0.0 );
glVertex3f( 1.0, 1.0, 1.0 );
glTexCoord2f( 0.0, 0.0 );
glVertex3f( -1.0, 1.0, 1.0 ... | 0 |
538df60bdd0956c71b667e9b2a3dc5f6 | 94d75228f55568063cbf7765aa4b3015 | set up IRQ as input | void IRQIntInit(void) {
sim.eport.eppar |= EPPAR_RISING_EDGE;
sim.eport.epddr &= EPDDR_INPUT;
sim.eport.epier |= EPIER_ENABLED;
SetIntc(INTCTRL0, (long)out_irq_pin_isr, IRQVECTOR, INTLVL1, PRILVL1);
} | 1 |
bf51a052d452839c3b75331301451eae | f30b6c7604884b0973bd55081dcd7690 | 返回指向循环链表头的迭代器 | {
iter_t it;
assert(list);
it.curr = (node_t*)&list->end;
return it;
} | 0 |
3b48ec1f9815779d83d7939f90f6e994 | 1983013c7febe1639ffad58b4541e146 | Returns true if {@code number} is a verified number according to this leniency. | public boolean matches(String number) {
return pattern.matcher(number).matches();
} | 1 |
653238633c0d79fb70fc9ff6b4baf68b | f0b68c5ff4b2c69f700995eefcf56b64 | Returns the meta object for the attribute '{@link org.muml.pim.actionlanguage.PositionSelector#getKind <em>Kind</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getRecord_Kind(); | 0 |
9c16518603bb0aa30f233b8857e918c3 | f2a62bb4d5dc3883f6630439c6430be9 | on the alpha switches between the Boot/Diagnostic rom and the basic rom | static void dragon_page_rom(int romswitch)
{
UINT8 *bank;
if (romswitch)
bank = coco_rom;
else
bank = coco_rom + 0x8000;
bas_rom_bank = bank;
setup_memory_map();
} | 1 |
7f05a58f0d5ddf674ca830369604b311 | 0eef41cdcf7a5f70259918308816fe1a | Calculates the scalar speed. | {
return ((Mathf.Abs(speed - lastSpeed)) / (Time.time - lastFrameTime));
} | 0 |
9fea5e7dcab4dd75a629f7b8fe9112be | b823def85efefd19b64e2953b98fa181 | Grab the specified component at a given location. Does NOT constraint rotation which means the handle will pivot about GrabLocation. | {
Part returnPart = SatParts [objIndex];
Vector3 rPartPos = returnPart.RealPart.transform.position;
Quaternion rPartRot = returnPart.RealPart.transform.rotation;
returnPart.RealPart.transform.position = Vector3.SmoothDamp (rPartPos, returnPart.PosBeforeGrab, ref returnPart.PosDampV, 0.1f);
returnPart.R... | 0 |
5ee50355f84d8d8eea7e341805e26d87 | bdc407e5315a7aa86b44585ca63b260e | 用户收藏文件 | class FileController extends ControllerBase
public function collectFileAction()
{
do {
$this->validation->add('file_id', new PresenceOf(array('message'=>'参数缺失:path')));
$messages = $this->validation->validate($this->params);
if (count($messages)) {
foreach... | 1 |
162c8e24059106e00f79abd1128d3b4d | 53b8fe3297e69705b0a3425ae9b84562 | 获取当前登录的机台ID | class LobbyController extends CController
protected function getTerminalID()
{
return Yii::app()->user->getState('terminalID');
} | 1 |
e9ab41e5975e28a4be558a0acce5c7ac | 2967adde952db1dc6fcb6e5e950bc59e | This is an example script to demonstrate the functionality of the MotionTrajectory
to read a yaml file. This script reads in the yaml file creates a trajectory object
and sends the trajectory to the robot. | arg_fmt = argparse.RawDescriptionHelpFormatter
parser = argparse.ArgumentParser(formatter_class=arg_fmt,
description=main.__doc__)
required = parser.add_argument_group('required arguments')
required.add_argument(
'-l', '--limb', required=True, choices=['left'... | 0 |
b0377824f446232b2e5aae2b324454f4 | 0eddde35a87a33146858c7c35b131df7 | Check if given two ips are equal or not. Works for IPv4/v6 | int is_equal(ipaddr_t ip1, ipaddr_t ip2)
{
if (ip1.octet1 == ip2.octet1 && ip1.octet2 == ip2.octet2 && ip1.octet3 == ip2.octet3 && ip1.octet4 == ip2.octet4)
return 1;
return 0;
} | 0 |
ffc7d92a909aba56b77674a67b95ffcc | b81bb5b31df4d4b0337cd41737af20e0 | Obt�m o valor da propriedade keyWord.
possible object is
{@link String } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "",
propOrder = {
"clave",
"nombreEmisor",
"tipoIdentificacionEmisor",
"numeroCedulaEmisor",
"nombreReceptor",
"tipoIdentificacionReceptor",
"numeroCedulaReceptor",
"mensaje",
"detalleMensaje",
"mo... | 0 |
83c90327e951696511068c45555c81eb | 07ac844ebb2709a78b603e005e6911e9 | 获取对应的Dao集合 | public abstract class BaseDao<T>
public AbstractDao getDao(Class<T> clazz) {
if (isExistTable(clazz)) {
return DaoManager.getInstance().getSession().getDao(clazz);
}
return null;
} | 0 |
df86a20cd984f76915bdf20a21f59504 | 4d4407fd81aae5db78f89827284bba40 | 检测关卡结束条件 | function ClsAIBat_53_check_4:checkCondition()
local owner = self:getOwner()
local battleData = getGameData():getBattleDataMt()
return cndBat_53_check_4(self, nil )
end | 0 |
bd16c713340f0bdd4b209e908e70df08 | 24a9406fbce686cc2ad508b5cdb8acb0 | devuelve el valor del precio total de cada artículo de producto basado en precios con descuento | if(producto.equals("Visual Basic 2015")){
return 50;
}else if (producto.equals("Java Fundamentos")){
return 45.50;
}else if (producto.equals("Aplicaciones Web con PHP")){
return 55;
}else if (producto.equals("HTML5 Y CSS3")){
return 35.50;
... | 0 |
b52f61a934ae18fcc6b17554acd5441d | f168158c6e055b006217f77e2d06e694 | Adds a Switch to the OptionSet. | {
$item['type'] = "switch";
$this->_form_items[] = $item;
return $this;
} | 1 |
338a2603992caa88596fe3843b743d8f | 7be2de41405d533b40f6289f324e32f7 | Extracts the IPv4 address from the end of the IPv6 address byte array. | {
var index = offset + this.Position;
var value = BitConverter.ToInt32(this.binary, index);
return IPAddress.HostToNetworkOrder(value);
} | 0 |
80aa40bb9ceecc0819e964d4ba193c72 | 43a80bc96b4dec9d0a6433db710e491a | This function updates the values in the UI for the special registers | public class UserInterface extends JFrame
public void updateRegisters (short PC, byte AC, byte X, byte Y, byte SR, byte SP) {
pcReg.setText(String.valueOf(PC));
accReg.setText(String.valueOf(AC));
xReg.setText(String.valueOf(X));
yReg.setText(String.valueOf(Y));
statusReg.setText(St... | 1 |
5a2674d7ba61d697f9ecd81849e4ed0c | 0e9f479329fa1b2a44f0e7c3e4bc1fcf | 导入值班信息 | if(!empty($_POST)){
$offices = trim($_POST['offices']);
if($offices==""){
$this->error("请粘贴需要导入的处室信息!");
}
$offices = explode("\n",$offices);
for($i=0;$i<count($offices);$i++){
$office[$i] = explode("\t",$offices[$i]);
}
$oldRes=M('office')->order('id ASC')->select();
$olddata=array();
forea... | 0 |
ffa3c5757ddadbeba548d394cdc948e3 | 8ae9775c5f364e024f8a88f1f3cd1548 | d20 | var value=0;
if(str.match(d_match)) {
str = str.toLowerCase().replace("d","");
var rand = Math.ceil(Math.random() * parseInt(str));
return rand;
} else {
str = str.toLowerCase().split("d");
var total = 0;
for(var a=0;a<str[0];a++){
var rand = Math.ceil(Math.random() * parseInt(str[1]... | 1 |
581a33125f776d9b6ca41740a64b18f0 | 7a3e15e2adb9a9ef31967fb988130eb6 | 打开点数据文件 | namespace xxkUI.Controls
public partial class LineInfoPdfCtrl : UserControl
public void OpenFile()
{
this.pdfViewer.LoadDocument(pFilePath);
} | 0 |
3e210871f944f2b45572c5a093d6a563 | 398cdf53512cb62a56c1b4e6fb4d612f | Misst die Laufzeit (in ns) zum Finden eines Elements | start_time = perf_counter_ns()
for i in range(len(intList)):
if intList[i] == num:
index = i
index = -1
return perf_counter_ns() - start_time | 1 |
2e5726649b9bbf75e357a3f4d371beb1 | 41bc47c0e6c99749b32ae6ee57282bad | @brief FMAC Initialization Function | int main(void)
{
HAL_Init();
SystemClock_Config();
BSP_LED_Init(LED2);
MX_GPIO_Init();
MX_DMA_Init();
MX_FMAC_Init();
MX_ADC1_Init();
MX_DAC3_Init();
MX_OPAMP3_Init();
MX_TIM1_Init();
sFmacConfig.InputBaseAddress = INPUT_BUFFER_BASE;
sFmacConfig.InputBufferSize = INPUT_BUFFER_SIZE;
sFmacCon... | 1 |
06451cfc6b7244a9d07f9a97fe7d9957 | 9213f4e03cc6f4197e63a156c73bc4a9 | This function checks the hash from link and checks the validity. If it's valid it shows the form for
changing the password and process the change of password after submit, if not valid it returns the error message | {
$users = new UsersModel();
$results = $users->getPurl($purl);
if(count($results) == 0){
return redirect()->to(site_url('home'));
} else {
$data['user'] = $results[0];
echo view ('users/redefine_password', $data);
}
} | 0 |
c147018c9c453b2e12acddee77e02a9a | 770e0151fcb41396837fcf72c3a0d944 | When set, raise errors during initialization and property setting when
unknown property names are encountered. This is the default. | function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean) {
shouldThrowErrorOnUnknownProperty = shouldThrow;
} | 1 |
c17fe2b8b45bb9f59819b5a032f24fa3 | 829a6b21e8c6cae7a8d6feb44aeabdd9 | Handle XML character data. This static method is passed to the expat XML parser as a
callback function. See the comments in xmlparse.h for the XML_CharacterDataHandler typedef
for the documentation such as it is. | namespace nanosoft
void XMLParser::characterDataCallback(void *user_data, const XML_Char *s, int len)
{
static_cast<XMLParser *>(user_data)->onCharacterData(string(s, len));
} | 1 |
88d6603dd0c1783fed1471b9cad8bea4 | 32cf093665ebcaba9394642f903cf323 | Prints out the Numerical Integration settings | void PrintParameters()
{
cout << " Parameters for this run: " << endl;
cout << " r_min = " << rmin << " r_max = " << rmax << endl;
cout << " Number of divisions: in r = " << NR << endl;
cout << " Grid logarithmic in r " << endl;
cout << " delta r = " << Deltar << endl;
cout << " delta Y = " <<... | 1 |
e17f4ffe5b959379fb0f6afa6bc61e89 | 0ad6ec09627a004b120dd61483c378f9 | makes dictionary and returns random job. | def randJob(total,dict):
if total <= 0:
total = dict.pop("Total") * 10
count=0;
ranInt=random.randrange(0,total);
for item in dict:
count+=dict[item]*10;
if(ranInt<count):
return item; | 1 |
b0ee1f8f7a391a4febe3e8d6ae602849 | 76c4fdba13b2c03bd43d31ab709c201f | ARAÇ PLAKASINA GÖRE ARAMA YAPMAK İÇİN | namespace Online_Store_Management
public partial class Products : System.Web.UI.Page
protected void Arama_Sayfa_Git_Click(object sender, EventArgs e)
{
Response.Redirect("Search.aspx");
} | 0 |
32c9f9d2bb0e297792504c120be27404 | d07aa0f41bd3e3f37845818f7735a717 | View a video and mark it as completed. | video = get_object_or_404(models.Video, pk=video_id)
course = video.lesson.course
course.students += 1
course.save()
return render(request, 'course-play.html', {
'course': course
}) | 0 |
d39fe0d54d56b446663fa7f1e87ec600 | 1eb85e4009660565067c3088c9929f2c | returns the id of a particular request | public class ResourceRequest
public int getId() {
return id;
} | 1 |
ac90861777292a51425a6a72acdd7533 | b66e07d63f31deeb46d6c71fd810866a | 分页查询当前错题集 | {
$pageNumber = $request['pageNumber'];
$pageSize = $request['pageSize'];
$skip = ($pageNumber - 1) * $pageSize;
$userId = $request['userId'];
$subjectId = $request['subjectId'];
$type = $request['type'];
$query = DB::table('examwrong')
->Join('exa... | 1 |
9a882064267a17a8f9b37eb71c9e8fe7 | e376e0c3f12973ad74051e35242a60c1 | Display watermark only if filter TextBox is empty | {
using (Graphics g = Graphics.FromHwnd(base.Handle))
{
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
if (this.Text.Length == 0 &&
!string.IsNullOrEmpty(this._waterText) &&
!this.Focus... | 1 |
515a0cb1620fb16e79815502f4a59c7f | 7ef3ef398704202b67552d9001c3d378 | Selects the square that has been clicked or being used by the solver | public class ChessBoard extends Screen implements MouseListener
public BoardSquare whichSquareClicked(Point p){
int col = (p.x - BORDER_WIDTH)/SQUARE_SIZE;
int row = (p.y - BORDER_WIDTH)/SQUARE_SIZE;
System.out.println(row + ", " + col);
return squares[row][col];
} | 1 |
1c8f48243cb73a0d8a5d17de37783cf7 | 0fd99973c0cc3b799a9b12b1bb3a9dc8 | Constructor, invokes parent's constructor with a value | LessThanV::LessThanV(const LessThanV& f):value(f.value){} | 0 |
ed57c339eeab2c65d892686873b4a2dd | 1af72912c87b1db1713e8328929111d6 | Not any excluded states for TriggerSource attribute in Write access. | namespace JaiGenicamDS_ns
bool JaiGenicamDS::is_TriggerSource_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
return true;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.