query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
fb30eb87b62063e84671c3f5065c02b0 | ec1cf58fb439670e30bd51f0c87c29d9 | Gets all the enabled 2FA providers for the user or member with the specified key. | namespace Mozlite.Extensions.Identity
Task<IList<string>> GetValidTwoFactorProvidersAsync(TUser user); | 1 |
00092428fd121bc7711c7e8a2371d665 | 1522a61a49d1c8623b2b2bbc9b0104b4 | {HTTP_HEADER}.put_pragma_no_cache | {
GTCX
RTCDT;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLIU(1);
RTGC;
*(EIF_BOOLEAN *)(Current + O10410[dtype-1440]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 1;
*(EIF_BOOLEAN *)(Current + O10345[dtype-1436]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 0;
if ((FUNCTION_CAST(EIF_BOOLEAN, (EIF_REFERENCE)) R10179[dtype-1413])(Current)) {
(FUNC... | 0 |
0a95d20beb7837abf349fc0683ce5d96 | 9390044e4ee2ede5bc99de78e58f1793 | If there is an associated invoice, dont allow this record to be remvoed | class InvoiceController extends Controller
public function destroy($id)
{
$invoice = Invoice::findOrFail($id);
$order = $invoice->order;
$invoice->products()->detach();
$invoice->delete();
if(count($order->invoices) == 0 ){
count($order->challans) == 0 ? $status =... | 0 |
7bbbeb3c6fa20a441fd8ea3ec01226fc | 4d1a8703f131e3a3ca05e741f1c06eef | ------------------------------------------
recupère tous les fils quelle que soit leur génération mais qui n'ont plus de descendants | {
Processo p = new Processo(new BaseProcesso("x", "x", 0), true);
p.insertList(listProcessos.Where(x => x.Father == null).ToList());
List<Processo> lp = new List<Processo>();
lp = p.CloneList();
ListWithOutFather(lp);
return lp.Where(x => x... | 0 |
78825931d168397a1db6e752336cf7af | ab9ac9e3baf9b3af6fecd9fdbc3672bf | 粗略计算文本的宽度和高度(包含padding),用于修正最后的测量宽高 | export class Label extends TextBase{
private measureUsingWidth(w:number):void{
if(this._textChanged){
this._textField.text = this._text;
}
if (this._textFlowChanged) {
this._textField.textFlow = this._textFlow;
}
let padding:num... | 1 |
6e2676eab7af9602f2e8b27dc02144bf | 449bbecbd93d84ac06006868ddc8e9a1 | 同步日志地址 | @Override
public void doSpecificLogReslove() {
List<SpBase> spBaseList = this.getLasDao().findList("from SpBase where spName=?", new Object[] { "SINA" });
if (spBaseList == null || spBaseList.size() <= 0) {
return;
}
SpBase spBase = spBaseList.get(0);
Map<String, String> para = null;
try {
para = My... | 1 |
b996d96751ded04d175d1c78e23eceae | e02bd9de50158e97ac29330b4060dee6 | Invocation d'une m�thode connaissant son nom sur un objet o en lui
passant les bons param�tres | public class ClassUtils
public static Pair<Boolean, Object> runMethodByName(boolean suppressErrors, Object o, String methodName,
Object... args) {
Method m = getMethodForArgs(o.getClass(), methodName, args);
return runMethod(suppressErrors, o, m, args);
... | 1 |
b0e1b27672c94feebcc284e6f422b863 | ee97de757706a9051131a906df9350cb | CSRF注解检测失败时,回调的处理函数 | public class CaptchaValidateFilter extends AccessControlFilter
@Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
request.setAttribute(failureKeyAttribute, "captchaError");
return true;
} | 0 |
0758acd26121da4462213673720b745e | bc9a63ac86292e95522e3867a6ce1af6 | 响应 WidgetHelper 发布的当天十大热门话题 | public List<TopicDto> getTenHotTopics(); | 1 |
96773c0ca06a1d4498cf5fcdd1d7df7f | 021aa489d89c0a7a33a0490c6552ecb2 | Returns the timestamp at which the complete HashTree was rebuilt. | long getReindexCompletionTimestamp(); | 1 |
937517702ac79e99241fdbdec83abf94 | 9274654d7a7033233455187b9c4d5d35 | Go to the next day. | public class DoubleController extends AbstractSimulatorController
@FXML
private void nextOne() { this.simOne.nextDay(); } | 1 |
484c87300d69b978a7f0d9c2db3f7945 | 8c975612b3e01d3e89249c7ff1768a8f | 查询所有的小区名称 | List<String> selectNameAll(); | 1 |
a10e5d1259f1a1649cb85d4368aa3bbf | 825158b2fe6ea7ced7f41e1ec20e2042 | Instances an element given the tag name and attributes | var el = document.createElement(tag);
for (i in args)
el.setAttribute(i, args[i]);
return el;
} | 1 |
00d74ee8393dff7592588e2eb8b73088 | d660178812ed6b71188dee5f6e4eaccc | when r is moving, check whether r is about to touch the "other" | if other.cx + other.r < self.cx:
self.cx -= 20
elif other.cx - other.r > self.cx:
self.cx += 20
if other.cy + other.r < self.cy:
self.cy -= 20
elif other.cy - other.r > self.cy:
self.cy += 20 | 0 |
ee99254428808a6596217af5f12e09db | 7f61448ad6da3ef0f9cb03f40c5be655 | https://stackoverflow.com/a/30703932/2614364 | cases like (1) | 0 |
efe41179b13d52930bfb159eea2df697 | 7437ff9d4ce49446f72126140b37e793 | NewTimestampSort returns a new Sort object with the provided timestamp and the given sort direction | func NewSorting(items ...SortItem) Sorting {
return Sorting(items)
} | 0 |
352368c766911e3e0f87c54c6770497a | 8e37250a7a47d32d43aa8dc2e55f545f | funzione che rimuove i nodi isolati | var temp;
while(nodi[0].sottoElementi){
temp = nodi[0].sottoElementi;
nodi = temp;
}
return nodi[0];
} | 0 |
777568e6c71144ffc70caa959e092b07 | 0ef7d7536b9fedc3df387947d40ec8c6 | Удаляет и возвращает объект с начала очереди.
Ожидает появления нового объекта, когда очередь пуста, пока не истечет таймаут. | namespace MyConcurrentQueue
public class MultiThreadedQueue<T> : IQueue<T>, IEnumerable<T>
public T Pop()
{
T item;
DateTime start = DateTime.Now;
TimeSpan span = TimeSpan.FromMilliseconds(1000);
while (!TryPop(out item))
{
if (Date... | 1 |
aeae87aab187cd9a2b5b53c58fe3598c | 03e28f51a1fd8856458e2b390efb27c8 | Récupère les cases fixes pour vérifier ensuite si les rectangles sont complets | class App():
def getValidCase(self):
playable_coups = []
for l in range(BOARD_SIZE):
for c in range(BOARD_SIZE+(BOARD_SIZE-1)*2):
if valid_input_case(self.board, self.currentPlayerNumber, self.last_play, self.record.getCurrentBoard()[:-1], l, c):
playable_... | 0 |
26cc490e6040043b284bc4851a79e346 | 8078ae7e50ff28380dc9b5b862b7af6a | Computation of a signal's envelopes
Notebook: C1/C1S3_Timbre.ipynb | assert (delta_t is not None) or (fs is not None), "One of `fs` and `delta_t` must be specified."
if (delta_t is None):
delta_t = 1. / fs
x = torch.as_tensor(x).to(device)
analytic = _hilbert(x)
envelope = analytic.norm(dim=-1)[..., :-1]
sub = analytic[..., 1:, :] - analytic[..., :-1, :]
... | 1 |
0afef0e24cbca62a118b6742d104f9c2 | 94645f26752f32927387cebdad994523 | Get archive format mime type | class Config extends AbstractClass
public function getArchiveFormat()
{
return $this->archiveFormat;
} | 0 |
474aed06690f4eeac669b5c4d6ac9f69 | 62f4021270822adc1e9a602d40f41722 | Add the base oai url. | class StockoutController extends ReportFilterHelpers
public function init(){
parent::init();
$burl = Settings::$COUNTRY_BASE_URL;
if (substr($burl, -1) != '/' && substr($burl, -1) != '\\')
$this->baseUrl = $burl . '/';
} | 0 |
df30103c73e12911c90b8cffe89c8281 | 6da6c8b9025cfad9cbbab3d0f6c34ae2 | Sisällön getteri. Palauttaa objektin, tyypitys saajan vastuulla. | public class PegasusAI
public Muodostelma getMuodostelma() {
return this.putoava;
} | 1 |
5a4e39d6cb28b3745ce38be082ac81ee | 4e149513240664afc1c7a820c0084eab | 测试7张牌是否有同花 | hand = [card.Card("spade", 12), card.Card("spade", 10), card.Card(
"spade", 5), card.Card("spade", 2), card.Card("spade", 9)]
result = self.judge.judge(hand)
self.assertTrue(self.judge._is_flush(sorted(hand, key=operator.attrgetter("rank"))))
self.assertEqual(result, 512) | 0 |
ada0d84bb7f31f04153ed34b7f7d3601 | 8cfa5f7209b7ad32e2bf87903c148cf0 | @brief 获取徒手画的起始终止范围 | QPair<QPoint, QPoint> QKinect::getHandsPosition()
{
QPair<QPoint, QPoint> hands;
int width = m_screenSize->width();
for(QList<QPoint> skeleton : getRealSkeletons())
{
if(skeleton.count() >= 20)
{
if(width - skeleton[NUI_SKELETON_POSITION_HEAD].x() < m_screenSize->width() / 2)
hands.first = (width - skele... | 0 |
43a6d1dcb73321830bc3317cf65ae23f | 4148c884462df19c0df893453d3966a9 | Sets the value of the profileRepositiry property. | public void setProfileRegistrar(ProfileRegistrar profileRegistrar); | 0 |
1fdb17bc8f6e8c17bd443e1c22fd3838 | 8b4b0500ab9b2c61b8f4a17c257e14b6 | Navigate to the edit profile page | if(this.world.debug) console.log('navigateToProfilePage');
const myprofile = this.elements.myProfileMenu;
await this.world.helper.waitFor(myprofile);
const el = await this.world.helper.findElement(myprofile);
await el.click();
await this.world.sleep(2000);
await t... | 0 |
a6446069f361c0a5a4a8ab76b58b37c2 | cbd44087c01c2dfffb4f9f22de0a448a | 通过管线,起止里程获取到里面所有的关键点信息。 | public class CheckArrivedTask implements Runnable
public List<KeyPoint> fetchPipeLines(int id, double xmin, double ymin, double xmax, double ymax) {
List<KeyPoint> points = new ArrayList<>();
try {
TaskInfo task = null;
for (TaskInfo info : taskList) {
if (info.ID... | 0 |
516f8ca36de6f357499929fe7c141a86 | 85aed5192dea99657111d0850c0eb2c2 | Returns the ID of the module this function is forwarded to. | abstract class MUSeo_Entity_Base_Metatag extends Zikula_EntityAccess
public function getFunctionOfModule()
{
return $this->functionOfModule;
} | 0 |
bbe1562f625856abc55c6b188db5184c | f460deef32bd2e13bde4a415900f293b | Returns the variable protobuf. | class DistCommon(object):
def _serialize_proto_variable_weights(varibale_weights_dict):
var_weights_req_resp = common_pb2.VariableWeightsReqResp()
for name, mat in varibale_weights_dict.items():
var = var_weights_req_resp.variables.add()
if isinstance(name, Node):
... | 1 |
cbd3aaebe787aa9293e8746b6521650b | 91889e011fff598b910a054069b5eb37 | 返回当前节点到根的句法依存树的关系为COO的路径 | class VerbRelationExtractor:
def find_COO_path(self, node):
path = [node]
while node.father != None and node.rel == 'COO':
path.append(node.father)
node = node.father
return path | 1 |
ace52e0c43847647d7e440e2095c18d2 | 9738e48bedb4bc5b398b85a21cd8d475 | 格式化贷款产品列表 | {
$mobile = isset($data['mobile']) ? $data['mobile'] : '';
$res = [];
if (!empty($data['list'])) {
foreach ($data['list'] as $key => $val) {
$res[$key]['platform_id'] = $val['platform_id'];
$res[$key]['platform_product_id'] = $val['platform_product... | 1 |
17d464256e788600dff74500e37af51c | 4cae31875cdfbb06bf04448d0330e59f | 根据屏幕id获取最近的商品 | let _this = this
let lowprice = parseFloat(_this.data.filterPriceA) || 0
let highprice = parseFloat(_this.data.filterPriceB) || 0
if(lowprice>highprice){
lowprice ^= highprice;
highprice ^= lowprice;
lowprice ^= highprice;
}
let idstrArr = []
let firstLevel = _this.data.firstLevel
for(let i ... | 0 |
6af92a6570768ff522db8385d9edab92 | f3dca285f47889726e9eecb3ee0cadab | Print the human-readable array, now with color! | {
assert(cheri_is_valid(arr));
size_t length = cheri_getlen(arr) / sizeof(int);
printf("Length: %lu \n", length);
bool lastWasNewline = false;
for (size_t ix = 0; ix < length; ix++)
{
printf("%d ", arr[ix]);
lastWasNewline = false;
if (0 == ix % RUN_LENGTH && 0 != ix)
{
printf("\n");
lastWasNewlin... | 0 |
f6e03ad18e1286d73f9bc3e67e064902 | 428200c67a855d70a753d1f5ce860aa0 | Activate Listing | {
$result = DB::transaction(function () use ($id) {
$listing = Listing::lockForUpdate()->find($id);
if (!$listing) {
return [
'statusCode' => 404,
'data' => [
'message' => "Listing not available"
... | 0 |
02d180bf1ef4f39c2a02659f43079197 | ac5e1b2a1c2a4a8b233c3189c88a916a | Get the version of the build for this request. The version is taken from
the projects dependencies configuration unless overriden by the options.
<p/>
Note that this is an unresolved value of the version, and will need to be
resolved if required. | @Nullable
String getVersion(); | 1 |
59bf9e442288d4e2f1dbba0e5bafb9cf | ba91d77aaeeac43c5de50a8e331aba5f | This is an abstract method. It should not be implemented in
this class. | open abstract class AbstractClass
open abstract fun abstractMethod() | 1 |
c48d4e549f65dd8a5ca141e19843f0b9 | 49f7654e6c1bb33d23819f0cb437858a | Read the energy poutput file. | class calEnergyXML(calXML.calXML):
def read(self):
doc = self.getDoc()
engData = numarray.zeros((calConstant.NUM_TEM, calConstant.NUM_ROW, calConstant.NUM_END,
calConstant.NUM_FE, 2), numarray.Float32)
latList = doc.xpath('.//GLAT')
latLen = len(latList)
if l... | 1 |
a9f5ccc49be507bc778691355c24f232 | 04f92a0fc47e3da163707ced4d95aa93 | RETURNS THE HERMITIAN TRANSPOSE (ONLY FOR COMPLEX MATRICES) | {
int r0 = m.GetLength(0), r1;
Complex32[][] H = new Complex32[r0][];
Complex32[] v;
int i, j;
for (i = 0; i < r0; i++)
{
v = m[i];
r1 = v.GetLength(0);
for (j = 0; j < r1; j++)
... | 0 |
e1052e561c33f5c9df76fd5b44153bf1 | 5e179e50a942b637b55c16c826f7c0a1 | determine if conditions for selection are met, and set possibility bool. | namespace SudokuSpice.ConstraintBased
internal bool TrySelectPossibility(Link toSelect); | 1 |
90e499ebdb98bfe5b62ed11571ea24ea | 0dd6148d03b89783f075fb6b0b37209f | Plays one game of IPD between two strategies. | def play(strategy, verbose=False, allow_unavailable_action=True):
game = Game()
state = game.state().copy()
game_over = game.game_over()
experiences = []
while not game_over:
if verbose:
print("Score:", game.score())
game.print_state()
old_state = state
... | 0 |
d7ccece500a87ebbf4abcc4eb71c72ad | 55d7cdc5ac109e11053d7d58178127ea | ループの辺に属するポートを削除する | {
for (var i = 0; i < group.children.length; i++)
{
if (portItem === group.children[i])
{
group.removeChildren(i, i + 1);
return;
}
}
} | 1 |
0363494f0a6685aa0c3afe7eeab9b23e | 58a9e0f22039da3b6aab8ef028e1c7f5 | Google map with animated route. Hardcoded version | path_positions = list(chunks(route[0]['shape'], 2))
maneuvers = {
(man['position']['latitude'], man['position']['longitude']): man['instruction']
for man in route[0]['leg'][0]['maneuver']}
polyline = Polyline(
locations=path_positions,
color=color,
fill=False
... | 0 |
2e886f18f4753fb5fcc3f3cdc86079fb | f04519f50e5724bfdb9d3b26b94e5937 | 生成单位矩阵 | {
if (rows == cols)
{
double[,] res = new double[rows, cols];
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
if (i == j)
res[i, j... | 1 |
e46633cd83e55b36418b1957ddf4b84c | d09f639701799971a7fc3c4363fb457e | Applies, when relevant, a transform to p_login | if src_login is None or len(src_login) == 0:
return None
base_login = src_login.copy()
keep_cols = [
LoginColumns.SRC, EnrichmentColumns.SRC_SUBNET,
EnrichmentColumns.SRC_CLIENT, EnrichmentColumns.SRC_OWNER,
EnrichmentColumns.MACHINE_EARLIEST_DATE,... | 0 |
c5e0944770abadba3669aa34c23c4695 | b5094b5c317c9e670e4dd0815eb29be5 | Sets whether to automatically exit after a command execution or not. | class ServerNotifyResponse extends Response
public function setExitOnResponse($value)
{
$this->exit_on_response = (bool)$value;
} | 1 |
97becca42134ecdc04273dce96a9f477 | 114963e84034b28b9ed7c0b78b2cc383 | Botao para abrir a tela de localizacao dos pacientes. | Intent it = new Intent(getBaseContext(), MapActivity.class);
it.putExtra("Localizacoes", locais);
startActivity(it);
finish();
} | 1 |
9f43258b8bf9f09a27d3729653a50b79 | 5a5c7333f9de323c75b5853b72cdcdee | 指を離したときにページをめくる、または戻す処理をする | public class NoteSelectContentController : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler
public void OnEndDrag(PointerEventData eventData)
{
PageFlick(eventData);
} | 1 |
850df67ecfa02dbc7cb2f8324d880761 | 91328beccd18ff7ebfcc4d3d5ad3d8e8 | Adds the Permission Roles for the specified Report Template Version. | namespace TriTech.InformRMS.Application.Contracts.Administration.Services.Command
[OperationContract]
void AssignRoles(Guid templateId, List<Guid> roleIds); | 1 |
7e8118c313eee82817f2c6c3583499ab | 76f387d03934c58a14cd8a6c5c69019c | 使用single_open操作来打开顺序文件 | static int hello_open(struct inode *inode, struct file *file)
{
return single_open(file, hello_proc_show, NULL);
} | 1 |
5d7d82104a9ebdc9a8a292fc9e1a6879 | 65ee7c84a50a90e281c2b9f5f4e24fb2 | Performs any custom initialization for a newly created SSLSocket
(before the SSL handshake happens).
The default implementation is a no-op, but could be overridden to, e.g.,
call {@link javax.net.ssl.SSLSocket#setEnabledCipherSuites(String[])}. | open class Platform
open fun afterHandshake(sslSocket: SSLSocket) {
} | 0 |
c7fa472e08818ab60d4a3e4f470882ef | 34ff052d7c9469f6597d237ef73003dd | this will hide/show the ability notes section | class Example(QWidget):
def hide_notes(self):
self.list_3.setHidden(not self.list_3.isHidden()) | 1 |
525aafa5a38efc93aac0dfe68a93f92e | d061712b7e2532ddccfec68f50a25b2d | 得到采购订单主表数据 | namespace Hyt.BLL.Procurement
public class PmProcurementBo : BOBase<PmProcurementBo>
public CBPmProcurementOrder GetCBPmProcurementOrder(int SysNo)
{
return IPmProcurementDao.Instance.GetCBPmProcurementOrder(SysNo);
} | 1 |
c4aeabb01ca66b1c7cb42e85f7756f05 | 4c2af6bff3654d334cd3c5a9fc7d114e | 获得指定日期的前一月 | public class DateUtils
public static Date getPreviousMonth(Date d) {
return addMonth(d, -1);
} | 1 |
c8834fec880705f6e199841e456e4839 | 44a56a72f1a3065c24db58761b3dd5a1 | If there are no devices in the map, then return an empty array | list_of_devices = []
if self.all_devices:
list_of_devices = self.all_devices
return list_of_devices | 0 |
7c9236ba7e0f3c0703fb2e0483ab09ba | 87ecd154c14226233f2e2ee9cec851bb | Get a list of module names. | class Mtaube_Requirejs_Block_Scripts extends Mage_Page_Block_Html_Head
public function getModuleNames()
{
return $this->_moduleNames;
} | 1 |
39a28ed4ae058214cde1e903a51a4d4d | c1c5c2a8ad115fbe5e3f2ca5df0f2d14 | 从指定位置开始获取有序集合中分数在指定的最小值 与最大值之间的指定数量的成员集合 闭合区间 | namespace Wolf.Extension.Cache.Redis
public partial class CacheProvider
public async Task<List<SortedSetResponse<string>>> SortedSetRangeByScoreWithScoresAsync(string key, decimal min,
decimal max,
int skip = 0, int count = -1,
bool isDesc = true)
{
if (count ... | 1 |
1fe1098ce1ef18cea98876bb5026b4b6 | 837211e631c8585e3d0e9a061572d803 | Run the test with profiling on and analyse the results. | class TestNode():
def profile_with_perf(self, profile_name: str):
subp = self._start_perf(profile_name)
yield
if subp:
self._stop_perf(profile_name) | 1 |
fb186c36acd28892c881caad7b87c489 | f9bc0d9889724bf1339416d7581b5cf3 | Create Income Statement - Declaração de Rendimentos | {
$assists_month_data = $this->getMonthAssistsData($budget_id, $first_day_of_month, $last_day_of_month, $workers_data);
foreach ($workers_data as $worker_id => &$worker) {
if (!is_int($worker_id)) {
break;
}
if(!isset($worker['VariablesRenta']) || ... | 1 |
83a6cb9462a1384a1706411d96b670ad | 52095501fec0aa0f8297ab0903640134 | 彻底删除一个task并更新数据库,需异步操作 | namespace UnityExtensions
void DeleteAsync(SaveTask task); | 1 |
8e282d0ddcf0bbe7150fd2691e68d628 | b935cea69cbba952767ca8f23fe3988a | Get the values that have changed | {
$changes_to_record = array();
foreach ($this->dirtyData as $key => $value) {
if (!is_array($value)) {
if (!isset($this->originalData[$key]) || $this->originalData[$key] != $this->updatedData[$key]) {
$changes_to_record[$key] = $value;
... | 1 |
0c07036879cbe8f943a44199f7555444 | 709f850c4f9e967be18be0ed8762adb8 | Cancels an order and places a new one of the same type in an atomic transaction | public function cancel($id): Order; | 0 |
86c03a3c7035c97adb3baf9432774d3a | 9d8e99b8865226a392ea651bda5542a4 | 清空所有的box设置 | {
box1_1.Clear();
box1_2.Clear();
box1_3.Clear();
box1_4.Clear();
box1_5.Clear();
box1_6.Clear();
box1_7.Clear();
box1_8.Clear();
box1_9.Clear();
box2_1.Clear();
box2_2.Clear();
... | 1 |
97e9f2a5c40377cc22d4362fb5b759d3 | 508e4833313ca98e29526467b94e2bd7 | Appends a value to the end of the StaticVec without asserting that
its current length is less than `N`.
# Safety
It is up to the caller to ensure that the length of the StaticVec
prior to using this function is less than `N`. Failure to do so will result
in writing to an out-of-bounds memory region. | impl<T, const N: usize> MaybeArray<T, { N }>
pub unsafe fn write(&mut self, offset: usize, value: T) {
ptr::write(self.nth_ptr_mut(offset), value)
} | 0 |
ffaa30295dbe9c1f825d054a290cd20b | 15cbcb1b1dbc5ca077f5ea5f5a0a97aa | Returns the meta object for the attribute '{@link org.eclipse.sample.architectureTool.Class#getName <em>Name</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getMClass_Name(); | 1 |
b1c4f2ce353ae7004fd62085b6a1fca6 | c609698fc3494effe0406541e966f2e4 | Auto-crossfade old ones. If no fade length specified, a very very small fade will be used to avoid pops/clicks. | namespace Animancer.Examples.Basics
[AddComponentMenu(Strings.MenuPrefix + "Examples/Basics - Playing and Fading")]
[HelpURL(Strings.APIDocumentationURL + ".Examples.Basics/PlayingAndFading")]
public sealed class PlayingAndFading : MonoBehaviour //sealed 最终类,不能被继承
public void CrossFade()
{
... | 0 |
e558516199fc045a1bf317437cb2abde | 275ffdefaf8b4bffbe2f4b21d92aecc3 | Return the time zone of the user who is currently logged in. | class User(BaseFolder, SecurityAware):
def get_time_zone(self, default=None, **kwargs):
marker = object()
tz = self._field_storage.get('time_zone', marker)
if tz is marker:
return getUtility(ISettings)['default_timezone']
return tz | 1 |
db056efda3fa87639c7715107ce877ef | 70b1a04b267f980efe568869b08a4349 | Asynchronous batch geocoding | if (TheRGC.length == 0) {
console.log("nothing to batch geocode");
return;
}
let url = ["https://batch.geocoder.ls.hereapi.com/6.2/jobs?",
"apiKey=", API_KEY,
"&mode=retrieveAddresses",
"&action=run",
"&header=true",
"&inDelim=|",
"&outDelim=|... | 1 |
8df8684ecbb3491455fadfee17abe5c4 | 42dd39c43e386175b086345a9a047079 | 设置是否包含子文件夹 | public class DirectoryParser
public void setRecursive(boolean recursive) {
this.recursive = recursive;
} | 1 |
e2fd812a291d9d835541b545a10007a5 | d1a6c8a9696409cbc99331d81a1da192 | 根据用户和时间查询出订单号 | public class FoundationOrderManagerImpl extends BaseManager implements FoundationOrderManager
public List getOrdersByItemTypeAndTime(String userCode) {
return dao.getOrdersByItemTypeAndTime(userCode);
} | 1 |
f55132dbac54128a1afcbb3b653b0eb9 | 6d9957de72ad1f9d543e3580b4db58c4 | Returns whether the value of the '{@link de.uni_stuttgart.iste.cowolf.model.LqnCore.ParaType#getEndValue <em>End Value</em>}' attribute is set.
<!-- begin-user-doc -->
<!-- end-user-doc --> | org.apache.xmlbeans.XmlDouble xgetEndParameter(); | 0 |
e1c0be31bc2ca13af4cd105b2386fed8 | 1b8bd35d219d8a6aa3596ae44eaf74b2 | Creates a dtype (for use in the creation of a recarray) based on the input template | class yanny(OrderedDict):
def dtype(self,structure):
str_dtype_letter = 'U' if six.PY3 else 'S'
dt = list()
dtmap = {'short':'i2', 'int':'i4', 'long':'i8', 'float':'f',
'double':'d' }
for c in self.columns(structure):
typ = self.basetype(structure,c)
i... | 1 |
922f1c6aa9af72593bd7c9860d660a26 | 96cc765c17c3fe10b0e1b85a904b7099 | Обертка для вызова ассинхронного метода с обработкой ошибок | {
try
{
return Task.Run(async () => await operation()).Result;
}
catch (AggregateException ex)
{
throw ex.InnerException;
}
} | 1 |
9ed1ea71c151c2013d000986a58160fc | 7f61448ad6da3ef0f9cb03f40c5be655 | From rigl/mnist_train_eval.py | cases like (1) | 0 |
1cc31b357dceef93d78432c2986c6350 | 5b8f110f0c08a394121bcb2a7c060f70 | Returns something like 'items 5-20 of 200' | {
$range = (($this->dataProvider->getPagination()->getCurrentPage() - 1) * $this->dataProvider->getPagination()->getLimit()) + 1 . '-' . $this->dataProvider->getPagination()->getCurrentPage() * $this->dataProvider->getPagination()->getLimit();
return Tag::tag('div', 'Showing <b>' . $range . '</b> of... | 1 |
a7967a0daaa18f2d2337806e59521eab | d1513393c8889efe060d50eea29ff61c | Part of the iterator API | class Iterator(abc.ABC):
def next(self):
pass | 1 |
1663beca6508a6d51f44fbd25890cd1a | aba887d8af23f64cffc143c77ac902a0 | Set the prix fixe. | class formuleRestaurant
public function setPrixFormule($prixFormule)
{
$this->m_prixFormule = $prixFormule;
} | 1 |
5eadaf056f1314c5ba59ed3060b5ef47 | 13ceab1cdb98945f28a4a2cc1181eb88 | Валідація форми створення коментаря | var namefield = select("input[name='name']");
var mailfield = select("input[name='mail']");
var msgfield = select("textarea[name='comment']");
if (namefield.value == "")
return false;
if (mailfield.value == "")
return false;
if (msgfield.value == "")
return false;
ret... | 1 |
5bfc80fa8278eca5f5ee61a289a6c8ce | 75ccecf9c599a126c0d4a274d7bd689b | has this lease already expired (giving allowing up the fudgeFactor milliseconds for clock skew)? | public class LeaseHandler
public boolean hasExpired(Location location) {
return !this.cacheLeases.containsKey(location)
|| this.cacheLeases.get(location) - (System.currentTimeMillis() / 1000) <= 0;
} | 0 |
034101e2f33ffad6cfc72fa03bad43ee | f0dfac067cf780e51d1a07a8a7012dac | Return the remaining elements of an array after chopping off n elements from the head.
The head means the beginning of the array, or the zeroth index. | function drop(array, n = 1) {
return array.slice(n);
} | 1 |
b88047eaf1b3a7b6c97f4a88e0e33782 | 0ac4fb825fe82b2090f87ae3ad23a127 | If it is a status update message and images are provided, add them. | class SisterViewModel @Inject constructor(
private val sisterRepository: SisterRepository
) : ViewModel()
@WorkerThread
fun postImage(dbMessage: DbMessage) {
ensureWorkThread()
val image = dbMessage.content.jsonToImage()
val isExist = sisterRepository.messageCountById(dbMessage.id) > 0
... | 1 |
1afb3bfd312e817e1c611baf2ec736c9 | a93bf0ce2b4fb8aeb93f5d4ff087de4c | Applies a displacement gate. | def tdg(self, q):
return self._attach(TdgGate(q, self)) | 0 |
d71c46d9464f2d514a519f81a810993e | 5676411f5c936f62d941b0e9395868d9 | Get fkcountryid | class Regions extends \Phalcon\Mvc\Model
public function getCountryId()
{
return $this->country_id;
} | 1 |
b51b22ec45e1aed16f35bad12edab71b | f99fafe42cbd8248b741dda7e00615a3 | Deletes the subscription, ie releases the mobile number in use. | class SubsriptionGateway extends Logger
public function delete($UUID, $reason, $AdminName)
{
$pdo = Logger::connect();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "Update subscription set Deactiv... | 0 |
65fb40eacfa5bc8a44cd21fb82f18226 | 2ef5d697312fb2744472385b83656803 | 判断问答对的问题和答案的(分词词数)是不是都小于MAX_LENGTH | def filter_pair(p):
return len(p[1].split(' ')) < MAX_LENGTH | 0 |
1d4c2240c42848553df41e29ce160066 | 5761336cf0474bd0c8f14f06aea72142 | collect input from first page into named variables, convert to float where needed, scale into correct units where needed... | double ovs,chords,spans,aros,chos,spos,rads ;
double alts,ares ;
alts = alt / lconv ;
chords = chord / lconv ;
spans = span / lconv ;
ares = area /lconv/lconv ;
aros = arold /lconv/lconv ;
chos = chrdold / lconv ;
spos = spnold / lconv ;
ovs = vfsd /... | 1 |
081dbbd9ac81d9e0a666c055494fd5d0 | b4c2ef2f1fe26002fda686c427cc5103 | 重定向到联系人列表 | public void onClick(View v) {
Intent intent = new Intent(Setup3Activity.this, ContactListActivity.class);
startActivityForResult(intent, 0);
} | 1 |
47208401d1f1cef90d81da82f878973f | 32acc7f7f0beb324237e959a832a0fdd | Check whether the supplied alliance needs to be updated or inserted and do so. | function UpdateAllianceIcon(node)
local techID = GameInfo.Technologies[node.Type].Index;
if AllyHasOrIsResearchingTech(techID) then
node.AllianceIcon:SetToolTipString(GetAllianceIconToolTip());
node.AllianceIcon:SetColor(GetAllianceIconColor());
node.Alliance:SetHide(false);
else
node.Alliance:SetHide(true);... | 0 |
34be4fafd7f7662ce46a1d373cd98aec | 8489896c89c0dda81ff8915234ea1e70 | Get an agent requirement of the matching build configuration. | btLocator: String,
agentRequirementLocator: String,
fieldName: String,
extraHeaders: Map<String, String> = jsonHeaders
) : String {
val localQuery: MutableMap<String,List<String>> = HashMap()
val localVariableConfig = Re... | 1 |
c7921c6074546e7e1728518bc6670c8d | 1d3e4240883661c1789d42275cfe01ec | Se limpia toda la tabla contactos | pantalla.delete(*pantalla.get_children())
connect = mysql.connector.connect(
host="localhost", user="root", passwd="", database="agendaapp"
)
conn = connect.cursor()
conn.execute("SELECT * FROM datoscontactos")
i = 0
for dato in conn:
pantalla.insert(
"",
... | 0 |
393059ca187fe8d42dab471d519da555 | 05a2fc7118d95f7f9e007feb6cd1f57c | Store a url part. | $partnerUrl = new PartnerUrl();
$requestData = [];
$requestData['details'] = [];
$requestData['details']['host'] = $partnerHost;
$requestData['details']['url'] = preg_replace('/(http:\/\/)|(https:\/\/)/', '', $url);
$requestData['details']['sku'] = $sku;
$requestD... | 1 |
cb99ca88e71e4e6f4de44ef1b8fc9779 | cdd11f2b0c1f265958a4ebcfcb12dc20 | 配置sudo无密码! | def harden_sshd():
sed('/etc/ssh/sshd_config',
'#PasswordAuthentication yes',
'PasswordAuthentication yes',
use_sudo=True)
sed('/etc/ssh/sshd_config',
'PermitRootLogin yes',
'PermitRootLogin no',
use_sudo=True) | 0 |
d79bf7b2a42e930f554e4d14e405cb97 | 67680b6c44abe6b84b5ead5022ed36d0 | method to hover over cart and checkout | contt = True
while contt:
try:
checkoutBtn = WebDriverWait(driver, 1).until(
EC.presence_of_element_located((By.XPATH, wind[loopnum].checkoutxpath))
)
contt = False
except:
try:
checkoutBtn = WebDriverWait(driver, 1... | 0 |
6d6f1c45e4adfb062d794f1faafaf6fc | 90fb399d2c1a08399c7d985f7e7335d2 | Test null is returned for the invalid resource | public class ResourceDaoTest extends GMSTestCase
public void testGetDefaultStorageResourceForComputeResourceInvalid() {
assertNull(resourceDao.getDefaultStorageResourceForComputeResource("-1"));
} | 1 |
fa4015f61cc00fc0a8757365ad824a76 | 68e795480dd86d87c7480c5be5c99378 | 判断元素list是否存在页面 | public boolean isElementExist(String sName) {
if (this.parseService == null) {
return false;
}
return this.parseService.findElement(sName,false,true).size() > 0;
} | 1 |
0c0813d78e6b47ef67cf1bd084cf689d | 4ec7fcf81c2e763befb8038b0b0e274e | 判断配置信息是否存在,存在返回配置信息,不存在返回null | public class GeneratorUtil
public boolean isConfigExists(String configName) {
String configValue=GeneratorProperties.props.getProperty(configName,"");
if(configValue==null||"".equals(configValue.trim())){
return false;
}
return true;
} | 0 |
59fe66f11a23a7fb4a296c01e2e7ec9b | 416639eea8745e6747fad973f9fc3514 | Allocate memory and initialize empty wavelet tree | void Tailcut::initialisationWavelet (){
;
} | 0 |
ab5003fd19999f565cff8edae86efd66 | db4a42c526991f586a059e8935091df4 | Отмечаем напоминание как выполненное. | namespace zad1
namespace Interfaces
bool MarkAsCompleted(Guid todoId); | 1 |
b33da2474f2918bcbd221e87f3a0bba7 | 414209ce8961f3c4866b0c557e9359e3 | !
Perform a malloc, doing memory filling and overrun detection as necessary. | mem_get(isc_mem_t *ctx, size_t size) {
char *ret;
#if ISC_MEM_CHECKOVERRUN
size += 1;
#endif
ret = (ctx->memalloc)(ctx->arg, size);
if (ret == NULL)
ctx->memalloc_failures++;
#if ISC_MEM_FILL
if (ret != NULL)
memset(ret, 0xbe, size);
#else
# if ISC_MEM_CHECKOVERRUN
if (ret != NULL)
ret[size-1] = 0xbe;
# ... | 1 |
259a7d78c8268fc426889f2698517da0 | 3e54ea9840858b52667c84aa8fe90f45 | Find the barn with the given name | return <Observable<Building>>(
this.http.get(
ApiEndpoints.getUrl(ApiEndpoints.BUILDING_FIND_BY_NAME) + "/" + name
)
);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.