query_id
string
corpus_id
string
query
string
code
string
label
int64
c5500c4745be27ab39df9fec236f4b7b
f6817e4452c48c27207205a3fc481981
Handler for multiply command - attempts to analyze arguments and perform multiplication of two matrices, asks view to present the results the the user.
class MatrixProcessor: def __multiply_other(self): first_matrix = MatrixConsoleAdapter.input_matrix(1) second_matrix = MatrixConsoleAdapter.input_matrix(2) result_matrix = first_matrix.multiply_other(second_matrix) MatrixConsoleAdapter.print_result(result_matrix) self.processorSt...
1
060d04c4cf3b30a570f19bc523e3556d
49495a3c86218c2cadae73d3e8b1cb0a
The client handle owns the peer state storing its address in the data field, so we free it here.
static void closeCb(struct uv_handle_s *handle) { struct conn *c = handle->data; if (c->handshake.address.base != NULL) { raft_free(c->handshake.address.base); } raft_free(c->tcp); raft_free(c); }
1
acda4b8e2791b1a1bb0613b139dce38e
06d799706190bd2f98d2e0fd45f51dc4
Gets a line that's this line merged with another line that aligns with this one and connects or overlaps with it.
{ return new Line(_a, _b + dx + dy, _c); }
0
968b8751ba6ea78f8e9b31643a9b5cf9
b1ce13e7403f3df644a805e63c080c3e
If the DeltacloudVM API server error response contain backtrace from server,then make this backtrace available as part of this exception backtrace
class ExecError def backtrace cause&.backtrace || super end
1
96adc5e22c1028888ebb4a78ea6de801
12fc1b5b854db7577a4cfc7c2c74c9b4
Creates the total external contacts count.
class ContactsMemcacheDummy public function getTotalContactsMade() { }
0
eaeafe162a1234cf7cccccb69a2be9af
78a0b39b1a9a3b1eeba984e56989498a
Getter for <code>storeal.stl_stock_mvt.id_stock_mvt_reason</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.6.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class StlStockMvtRecord extends UpdatableRecordImpl<StlStockMvtRecord> implements Record15<ULong, UInteger, UInteger, UInteger, UInteger...
0
4d6a00de1ef3afddb09e4afaa0923bb3
e1afd239b7fc41ba3dc37d7fee9003ed
Get specified clone path (corresponds to ``-p`` CLI flag).
class Repository(Artifact, ActivityObject): def clone_url(self, category, username=''): tpl = string.Template( tg.config.get('scm.host.%s.%s' % (category, self.tool))) return tpl.substitute(dict(username=username, path=self.url_path + self.name))
0
f5fc2ab96d6350778599845ff54c507c
9c137f41f72dbf310d93bf8afcde56bd
Devuelve el color del relleno secundario.
public class TextList extends InteractiveSurface public final short getSecondaryColor() { return _color2; }
1
09da3d1ee59b8a5986230eb0ec2d96b1
0412dcffd016bad1aecadb95285b9f70
Find unique model/physics groups
class InteractionsTable(object): def groups(self): return sorted(list(set([i.group for i in self.interactions])))
1
274336c196a1804c0dc268bbbe8c7165
9a9868a2fae97fb2bfac27e700094ff0
Test the prefix-meta command.
def setup_keybindings(cli): from prompt_toolkit.key_binding.bindings.named_commands import prefix_meta from prompt_toolkit.filters import ViInsertMode cli.application.key_bindings_registry.add_binding('j', 'j', filter=ViInsertMode())(prefix_meta) result, cli = _feed_cli_with_input( ...
1
860fd8adeba336bf58ab9e85200560bc
175f82c6a5a135c7b92e698171fe0d63
从一个对象中取出指定的字段形成一个新对象
{ foreach (var d in this.propertyList) { PropertyInfo propertyInfo = tempObj.GetType().GetProperty(d.Key); if (propertyInfo != null) propertyInfo.SetValue(tempObj, Convert.ChangeType(d.Value[0], propertyInfo.PropertyType), null); ...
0
dda8b7074c11fd8491351e63b4bd216c
20c9806cb0b8b94ba24a3a4645eb07cb
Executes the create card command with the provided arguments.
class Gateway extends AbstractGateway public function createCard(array $parameters = array()) { return $this->createRequest('\Omnipay\MES\Message\CreateCardRequest', $parameters); }
1
7fb1826722d520a8f09b91ebbc66b9be
7f9f68511f77909225c9134444c4b1c5
int hc12Radio::getResponse( void ) read the response of the attached smart-TFT into _ioBuffer returns the amount if characters read or an error code
{ if(size > MAX_IOBUFFER || size == 0) return -1; u32 eflags; u32 completed; _local_irq_save(eflags); if(condev->f_req->f_req_state == REQ_FREE) { set_cursor(condev); condev->f_req->f_req_state = REQ_BUSY; condev->f_req->f_req_orgsize = size; condev->f_req->f_req...
1
a46aef9b8a3f9633a4670a0f5cd49385
51052ae8355a93bb153c7c7381ef25d1
============================= a.读取日志 =============================
class LogsService extends BaseService async readLog(path) { const res = fs.readFileSync(path.join('app/logs', path), 'utf8'); return res; }
1
38b596ba36189497f84cc50a775fc52c
ae32deca3ce7fc78500d11e5b41edae5
减去时区时间,得到0时区的时间
@Component("roleRoomInOutStatisticTimer") public class RoleRoomInOutStatisticTimer private Date getNowDayZeroTime(Date date){ Calendar instance = Calendar.getInstance(); instance.setTime(date); int hour = instance.get(Calendar.HOUR_OF_DAY); int minute = instance.get(Calendar.MINUTE); int second = instance.ge...
0
8c745615a801a8a9fd010bbe4df543b6
f4003287c8a3276d9622aa6981ea1727
计算kulc
real = ta.CDLHIKKAKE(self.open, self.high, self.low, self.close) attr_name = "CDLHIKKAKE_talib" attr_value = real return real
0
9e3b54c020d905a678200b3de80a2196
367d8dfd0b8846ff79e4b7e782905c98
仅限命令行运行
$argv=$_SERVER['argv']; if(strpos($_SERVER['PHP_SELF'], DS)!==false){ $argv[0]=$_SERVER['PHP_SELF']; }else{ $argv[0]=START_PATH.DS.$_SERVER['PHP_SELF']; } Command::setArgv($argv); Command::analysis(); if(!isset(Command::$_cmd_list[Command::...
1
fff89d63a1139c4a9b38221063e5781d
c74799ab83e8a437340e1f2c10aeaabf
Checks, if all filters apply and returns the filter, that was failing. <code>null</code>, if all filters apply
assert fSelectedFilter != null : "Filter has null value."; return fSelectedFilter; }
0
d66c6b2ebbc5457a3610c8b612fedd0b
32e18f3e49698553542d72f564f0e265
inputs: coordinates: a list of (x, y) tupples representing the location of geometrical estimations returns: the max distance between two coordinates
def farthest_distance(points):
1
1ba35176f6876bec870308e43bb3d7bb
5710a4391230c8ff5a8f9036dfee169b
Sets a new availabilityStatus Used to specify an availability status for the room rate.
public void setIsAvailble(boolean isAvailable);
1
7364dff6b29c9f377bf5b0b0d4c224ac
91a03e2a78c276d6a8047f6c7686910b
Returns the diagnostics profile of an Azure virtual machine. <p> Enabling diagnostic features in a virtual machine enable you to easily diagnose and recover virtual machine from boot failures.
@ServiceMethod(returns = ReturnType.SINGLE) DiagnoseVirtualNetworkResultInner diagnoseVirtualNetwork(String resourceGroupName, String clusterName);
0
74654be7a9e48dc83acf78488a2aba81
3b7e9b1433b8ebc00735e22ec3d35e6d
获取指定的实体对象数据,带有查询条件,指定开始位置和结束位置
public class JpaDao public <T> List<T> query(Class<T> entityClass, Map<String, Object> queryConditions, int start, int count) { ParameterAssertor.isNotNull(entityClass, "实体类entityClass不能为空。"); ParameterAssertor.isTrue(start >= 0, "起始位置start不能小于0。"); ParameterAssertor.isTrue(count > 0, "记录数count不...
1
05a6e96d6f07147e87ecacde1180e59d
8560f407835a50c95a489fe08ceabab4
Convert dd.mm.yyyy -> sql
class HTML public static function mysqlToGerman($date) { return implode('.', array_reverse(explode('-', $date))); }
0
0bc0965e491fc392f6ba7216e1cd27a3
d467cc3b1a6aa5f31d4996298f04789a
Show/hide the facets editor
function toggleFilters(bool) { if (bool === true) { body.appendChild(filtersPanel); } else { filtersWrap.appendChild(filtersPanel); } Util.toggleClass(page, 'ons-u-d-no', bool); Util.toggleClass(filtersPanel, 'ons-adv-filter__panel--is-visible', bool); Util.toggleClas...
1
a102ddd68cb032b4550d65f1d2de6c08
19f4de02399779e1d1590605d9a11d72
fill vector with really exported functions - in this case s1, s2 and s3
addlibfunc(sc, st, "len", &lib_len); addlibfunc(sc, st, "cons", &lib_cons); addlibfunc(sc, st, "append", &lib_append); addlibfunc(sc, st, "head", &lib_head); addlibfunc(sc, st, "tail", &lib_tail); addlibfunc(sc, st, "init", &lib_listinit); addlibfunc(sc, st, "last", &lib_last); addlibfun...
0
a60cba6093a79d0a9f6f70dba75f3f94
a81b148dbccb6eb1866afa8308465a2c
! Enable or disable Voice Activity Detection. Enabled by default.
{ adc_reg_t * ADCx; CHECK_PARAM(IS_ADC_PERIPH(adcID)); ADCx = (adc_reg_t *)(adcAddr[adcID]); ADCx->VOICE_DET.BF.DET_EN = cmd; }
1
d46d58cb03c3fef4cbaa445cdbc140ff
3c82dbb2d6d6c409d1a0e2990101f265
checks a variables and if not matching, defaults to a given value
if varVal then return varVal end log(string.format(" ** WARNING: %s not specified, assuming %s\n", varNm, tostring(default))) return default end
1
8176779d4505249540cff3653ef96803
e2bdedecc23e40d1b5bfa22d01faaabc
Search for prompts by prompt word.
namere = self.prompterBox(promptString="Enter your query.") if namere == "": return self.server.send(bytes("FIND;" + namere, CODE)) result = [] i = 0 while True: inbound = decode(self.server.recv(BUFSIZE), CODE) if not inbound: self...
1
93813065569b395e6e00374a1c43a04f
e144c45767ae6d4309a4ee15072bea8a
Changement de la limite de vitesse
void Moteur::changerVitesse (uint8_t vitesseD, uint8_t vitesseG) { OCR1A = vitesseD; OCR1B = vitesseG; }
1
84ff0a78bb40cd8c65f606e1199b18d1
115da2031c690974f4c5c9cf84acd870
проверка и подтверждение логина и пароля в базе
function logopass($login, $pass, $truepass){ if(!$login || $truepass != $pass){ if(isset($_SESSION['error_auth'])){ $_SESSION['error_auth']++; } else { $_SESSION['error_auth'] = 1; } return false; } return true; }
0
84c1cf167ab7ab40da08202823abf048
7db590be47e446e90e3b6b90df38ddad
Handle the IsRequired field property change event.
{ base.SetRequiredProperties(); var isVisualMode = ((Domain.Shared.IExtendedEntity)_obj).Params.ContainsKey(Sungero.Docflow.PublicConstants.OfficialDocument.IsVisualModeParamName); _obj.State.Properties.Subject.IsRequired = isVisualMode; _obj.State.Properties.Counterparty.IsRequired = isVisu...
0
39fc13fd2961a9b663bfda9df647b162
3208a576cddce7cd08c99b692445bbc1
Memcached-backed cache implementation. Compatible with AWS ElastiCache when using their memcached interface.
class RedisCache(StrictRedisCache): def __init__(self, name, ttl=None, **kwargs): super(RedisCache, self).__init__(name, ttl=ttl)
0
007a46adbcb55459175e3b8395a608f4
03d227f132a79de4c400d5b4f98069f8
Go to the previous photo in the list of photos
export class PhotoModalComponent previous() { this.activeIndex--; }
1
13d41468fad527441020c35b36864f1e
af5e6974ae2d61db001521975c952453
The time in milliseconds that will elapse after the cursor advances before the cursor will be advanced to the next item in the list.
namespace Kendo.Mvc.UI.Fluent public class MobileScrollViewBuilder: WidgetBuilderBase<MobileScrollView, MobileScrollViewBuilder>, IHideObjectMembers public MobileScrollViewBuilder Duration(int value) { container.Duration = value; return this; }
1
773c64b7b1b8ac7146e01bc752d725d6
e21abed64269b1f1f75e04f56671e59c
校验表单录入的信息项<br> 主要是校验必录信息项
if("1".equals(form.getVisitObjType())) { if(CherryChecker.isNullOrEmpty(form.getVisitObjJson())) { this.addFieldError("visitObjJson", getText("ECM00009",new String[]{getText("PMB00085")})); } } else if("2".equals(form.getVisitObjType())) { if(CherryChecker.isNullOrEmpty(form.getVisitObjCode())) { t...
1
e1db91cd3db18dbbc6cf1f6676d4548c
edfd053821a86b5642915f1040f5c7b2
課題 ユニティちゃんが通り過ぎて画面外に出たアイテムを直ちに破棄するメソッド
public class ItemDestroy : MonoBehaviour void Update () { transform.position = new Vector3(0, transform.position.y, unitychan.transform.position.z - distance); }
0
477e745062c73d3e7f19ddf738bd3367
169fd13377d3e9ce85a9ad0dc92f7390
Checks to see if the user is connected to the IM server
public class GroupMeIMConnection extends AbstractIMConnection @Override public boolean isConnected() { return polling.isPolling(); }
1
eeb6ea39224ae1e146c6e69ce40abcde
ccc962eba9640d990193c6135be44373
获取drawername属性的值。 possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NavaidComponentType", propOrder = { "serialNumber", "name", "inspectionDate", "legacyControlNumber", "isDeleted", "decommissionedDate", "commissionedDate", "reconfigurationDate", "temporaryMobileIndicator", "dopplerIndicator"...
0
e55519ffba6bfe27fb7a1f4789887a32
1b0a38d8670ff9271be45d54d5de8093
On selection of module we populate functions of that selected module
global $path_to_root; $module_relative_path = '/modules/' . $this->module_name . '/'; switch($app->id) { case 'AP': $app->add_rapp_function(0, _('Requisitions Entries'), $module_relative_path.'requisitions.php', 'SA_REQUISITIONS', MENU_TRANSACTION); $app->add_rapp_function(0, _('Requisitions Alloc...
1
3dcb6f78b6be52426a3bb9679a884a50
75ab85b6776d58dc02ba72f9f18c9676
文本可点击,有点击事件
class Window(QWidget): # 主窗口和公共数据 def text_signal(self, text): self.reptile_button.setEnabled(len(text) > 0)
0
653ed82ae1c5b4ced832ea7b9c87b313
ef0eaf34f14c61c0ffc9381a5beeac1e
使freemarker支持shiro标签
public FreeMarkerConfigurer freeMarkerConfigurer() { FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer(); ReflectionUtils.doWithMethods(FreeMarkerConfigurer.class, new MethodCallback() { @Override public void doWith(Method method) throws IllegalArgumentException, IllegalAccessExcep...
0
3cfd66ec0fabdcaf1f24d8e139976eeb
f7634f06742aabbf58078d1c3cea032c
Fetch of list of integers with primes flagged using Sieve of Erotosthenes method
def sieve(max_num): flags = [True] * (max_num + 1) flags[0] = flags[1] = False curr_prime = 2 while True: propagate_prime(flags, curr_prime) curr_prime = get_next_prime(flags, curr_prime) if curr_prime is None: break return [i for i in range(max_num + 1) if flags[...
1
d1ff699ac0820a4469298577571d4e68
bfbe6b47f45126a951ea4a31aaa12ec2
decides, whether an pixel without region exists
alpha_values = list(set([pixel[ALPHA] for pixel in pixels])) if len(alpha_values) == 1: return False return True
0
fbc3b64e929832f2035c1cb6e834ea86
148d31825e2d4b82dd5c5c4bcb98bbd6
Returns the width in pixels of a single board piece.
public class Map implements Serializable, Iterable<Location> public double getHexPixelWidth() { return BoardHex.getHexPixelWidth(); }
1
df284722749fab831e3e57f4762c4f27
6eaa18fb7e2fb1910cf49f4628f5a97f
Show to client list of dishes
{ $date = Carbon::now(); $dishes = DB::table('dishes')->where('Menu_id', $id)->get(); return view('orders.show')->with('dishes', $dishes); }
1
9870f82e4759bd05299f5a32a630c3a2
9172601dfe893d67fb50aee5e89035be
根据日期 和 时间 生成DateTime对象
{ return new DateTime(current.Year, current.Month, current.Day, hour, minute, second, millisecond); }
1
e3218270e635fe501ca2c0641377f315
6919d47d3636e629dfdb578408217c49
Do nothing when a root node is clicked, there are no parents
public class MultiValueChildrenNodeTransformer extends BasicTransformer<PropertysetItem> protected void handleRootitemAndParent(JcrNodeAdapter rootItem) { }
1
0cbdfc95766eacb746fe9fb94f97a97a
36a6c7431d121ddb2c67879b3b846818
:Description: Load the database username/password from file
if not os.path.exists(file): open(file, 'w').close() else: with open(file, 'r') as f: dictUsr = {} for line in f.readlines(): if line != '\n' : usr = line.split(':')[0] pwd = line.split(':')[1] st...
1
1e56b6b0e2ee9cf51e2583fd3b2f6076
a7b2c51daa64aa8f9ebbf0d5d550e7c8
验证所有输入,其中有:所输入的内容符合要求,两次输入的密码一致,随机验证码输入正确
function checkInput2(){ if(unameFlag&&pwdFlag&&repwdFlag&&mobileFlag&&imgCodeFlag&&acpFlag){ return true; }else{ return false; } }
1
a2eb56d8e14d03f1e1c42503c93d6d95
db74e3a213451d63cea4575137aabaff
Delete posts by ids.
class PostsController extends Controller public function bulkDestroy(DestroyPost $request) : Response { DB::transaction(function () use ($request){ collect($request->data['ids']) ->chunk(1000) ->each(function($bulkChunk){ Post::whereIn('id', $b...
1
fdecae9a49002840dc1adbc4d227ab6c
6668aacb3230a9bfa27b3ab7e42bef32
https://math.stackexchange.com/a/2250212
def inverse_sum_of_range(sum): return (math.sqrt(8*sum+1)-1)/2
1
d1b92f311b68b52b8288e2e9c42ff291
a5a493dc0d92d18f0e0f1e3a8e15d325
Getting a mapsquare from its pixel cordinates in world space and converting it to a map square location in the array
namespace RobotRampage static class TileMap static public int GetSquareByPixelY(int pixelY) { return pixelY / TileHeight; }
1
592a9264186e3a630fbb2bab1dee06fa
ebb4a9f1621b30414924f1af42dc9f7e
Action when user clicks on continue button, continue recording the current record
class Screen_welcome(Frame): def continue_clicked(self): self.call_on_selected()
0
5f712a127ddad0a3a2f2ae69cf9d1b1d
52fa9aaa9197648a89ab35986a73b1e7
保存文档 如果文档存在则更新相关字段,不存在则插入
@Service public class BasDocumentService extends BaseService @Transactional public void saveBasDocument(BasDocument basDocument) { if(null != basDocument) { String docId = basDocument.getDocId(); if(StringUtils.isBlank(docId)) { docId = GenerateSequenceUtil.generateSequenceNo(); basDocument.setDo...
1
8d0c7af354b49c13595172fbb6f97a82
996c1c6fb897f495fcca4d10f2943b89
Gets the fee amount to display on upgrading for the promo code when upgrading to the given type
{ $purchase = NULL; foreach ( \IPS\nexus\extensions\nexus\Item\Subscription::getPurchases( $member, $package->id ) as $row ) { if ( $row->active and ! $row->cancelled ) { $purchase = $row; break; } } if ( $purchase === NULL ) { return NULL; } try { $currency = $purchase->origin...
1
94b048ad7f7a77110e026f3cfb2f64e6
9e43b84bbbe329529f33daec7b9d1095
Returns the checker piece that the opponent is playing with.
def check_opponent(poss): if poss == "[W]": return "[B]" else: return "[W]"
1
2f137930dec1dfc3d90fc9c89897014b
0ccbce07608190724ff00c1bee689b61
Converting FWHM to standard deviation.
def FWHM_s(FWHM): return FWHM/(2*np.sqrt(2*np.log(2)))
1
349b203281dc9ea8f4d664ad8be7922e
c2377488544d0f7dd881b94e3eb3d0c7
Muestra todos los examenes
class ExamenesController extends Controller public function index(request $request) { $rol = $request["rol"]; $id_user = $request["id_user"]; if ($this->VerifyLogin($request["id_user"],$request["token"])){ $valuations = examenes::select("examenes.*","examenes.clinic as id_cli...
1
0f6bd7f259c12d79b1bd37ed1474213e
a52098ed5719eec1432dacc3230f1190
pausing the mouse view when activity is paused
public class GraphActivity extends AppCompatActivity @Override protected void onPause(){ super.onPause(); progress.dismiss(); mRunning = false; }
0
a11538ad8daa0da1e5ca4e2546a81c3c
bf1249308392780756aa55f54294dbb2
Convert a full path name to a relative one, for output.
if logger.verbose: return os.path.abspath(path) else: path = os.path.relpath(path) if path.startswith(os.curdir + os.sep): path = path[len(os.curdir + os.sep):] return path
1
96b2d95056cd92160bdd25cfc1a12e73
c448ed98391d69e4a0db214e0ae65987
{WEL_BITMAP_INFO_HEADER}.set_y_pels_per_meter
void F1403_17112 (EIF_REFERENCE Current, EIF_POINTER arg1, EIF_INTEGER_32 arg2) { GTCX cwel_bitmapinfoheader_set_ypelspermeter((arg1), (arg2)); }
1
eaffa8c92c32bd1b9604701309f79d9d
badb86485a1eebdacdcad9439aff14cb
Gets who owns this cell
class Cell: def player(self): return "empty" if (self.empty) else self.__owner
1
bfb01bcc939378ba1fa14f855df0be9d
2c30316fab79bbdbf057d218eade3b1a
@brief Do complex number division.
void complex_div(long double _Complex *num, long double _Complex op) { *num /= op; }
1
2c64c436cd291dced4a83c28c5f79567
7a7aee75e48f23ee069fb046692f0f18
Generate an enumeration of a dictionary's keys.
{ foreach( var pair in this.dictionary ) yield return pair.Key; }
1
0672b0ff72281e5516d3ddee039b9cbf
122f40c74b553136cee194453dcb881b
GET /dictionary_accesses GET /dictionary_accesses.json
@inspections = Inspection.accessible_by(current_ability, :read) respond_to do |format| format.html format.xml { render :xml => @inspections } format.json { render :json => @inspections } end end
0
532d02558b79764d0655205a76828307
339fd5b5591c8ec333b347549364fd23
получение всех подписок пользователя
class SQLighter: def get_subscriber(self, user_id): with self.connection: self.cursor.execute('SELECT * FROM subscriptions WHERE user_id = (%s)', (user_id,)) return self.cursor.fetchall()
1
21c11b0316f98900b14e048a689d3b8f
0477e78aab15a3746f8615544a127858
FUNCTION TO CHECK WHEN THE ENTER BUTTON OF THE KEYBOARD HAS BEEN CLICKED
for event in user_input: if event.type == pygame.KEYUP and event.key is pygame.K_2: return True return False
0
e3f7b5361d0d7186b0e15a80b7c2cf92
a7ff6bc2f71433c842257e1a9a8c0f89
Return the 'salaryCurrency' Property value
class Employees extends \HumanRelation\Entities\Employees implements \Doctrine\ORM\Proxy\Proxy public function getSalary() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSalary', array()); return parent::getSalary(); }
0
016e5f8e1c8402ed8bda049cf1145701
0af55a970297bee35bb760f17ef54dd6
삭제하고자 하는 데이터의 PK값을 매개변수로 전달받고 1개의 데이터를 삭제한다.
@Repository public class TaskRepository public int deleteOne(int id) throws DataAccessException{ int rowNumber = jdbc.update(SQL_DELETE_ONE,id); return rowNumber; }
1
997981c363eccf6ae2024f34fe209016
60c6bd6bfa73b13f275ff8423b2a7dee
Generate a track id.
class TrackId public static function salt($trackId) { return substr(md5($trackId . substr($trackId, substr($trackId, -1, 1))), 2, 5); }
0
7eea84d6d94d5a5427c5b3426cb7f855
8a6d56d49306d8c40a2f34292cf1aca6
determine number of aliens that fit into a row
def get_alien_rows(ai_settings, alien_height, ship_height): available_space_y = (ai_settings.screen_height - (3 * alien_height) - ship_height) row_number = int(available_space_y / (2 * alien_height)) return row_number
0
4613c9165f9dee54c62da98338c6eb8c
de41d1fd769e1064e1eab0d9e80a6348
Set galleryAltText
class ImageMessage setAltText(altText) { this['altText'] = altText; }
0
ba3bd1218bde2577bd1725e1fc523443
98e0f8589c25483444e1ea38bdcfb7b4
GET: Films/Create
{ ViewBag.MovieId = new SelectList(db.Movies, "MovieId", "Title"); return View(); }
1
af6ac8b39aeac59c685a0c0c7329c3d9
056be2863ef0baa8d6082e7b387b52a8
Update the module listener meta data map.
fun addOnMetadataUpdateListener(onMetaDataUpdateListener: OnMetadataUpdateListener) { onMetaDataUpdateListeners.add(onMetaDataUpdateListener) }
0
6b8577466a9db343ba83ddb581e474c0
cda21b74841f7df9763b74f3fd4c7849
List accesses (asynchronously) Returns all registered accesses for the authenticated user. Confidential information like the PIN will not be returned.
export class AccessResourcesV1Api extends runtime.BaseAPI async listAccessResources(requestParameters: ListAccessResourcesRequest): Promise<V1ListAccessResourcesResponse> { const response = await this.listAccessResourcesRaw(requestParameters); return await response.value(); }
1
772b4b6f6c558dfa59e45bf7193de98a
e598b88d24d1e7bf146df01dd743c9e9
Upload videos to youtube and cache the resulting array of video id/data
class PrsoGformsYoutubeApi extends PrsoGformsYoutubeFunctions private function init_youtube_uploads( $validated_attachments ) { $returned_video_data = $this->youtube_api_process_videos( $validated_attachments ); $returned_video_data = $this->youtube_api_cache_video_id( $returned_video_data ); return $returned_vid...
1
ed415bc9e768a2133d9e0fbbba268847
8faaf09fcdb7c97d1a5ae699e8c921fc
Assigne le rendu de la vue au corps de la réponse de la requête.
class Response public function view(string $name, array $params = []): self { $this->body = new View($name, $params); return $this; }
1
552f30ecbc7c0ecb5db346d25bc5c60e
3b65cfc09dbe482531dcbf1ee23bc1d8
Flattens list with sublists. Note: Is NOT recursive.
def flatten(lofl): if list_of_lists(lofl): return [item for sublist in lofl for item in sublist] elif type(lofl) == dict: return lofl.values()
1
a67412114b1ca52b40ef45ea994eb74e
9b20d2a36c6801ececd5c7b6fb675d17
Renders the most basic "boiler" template, which contains a Google Analytics tracking code if configured to in the admin.
$response = new Response(); $response->setPrivate(); $user = $this->getRepository()->getCurrentUser(); if( empty( $user ) ) { return $response; } $analyticsService = $this->get( 'gaz_analytics.tracking_information' ); $userDetails = $analyticsService->...
1
502cd47bc3a20518b9dc84235ba377d5
5f8dc61681b89cba73e57b56d01a102a
if "USE_EXISTING_RUNTIME=true", will not create or update an runtime for testing.
class PositiveTest(ScenarioTest): def test_integration_runtime_update(self): self.cmd('az datafactory integration-runtime update ' '--factory-name "myFactory" ' '--name "myIntegrationRuntime" ' '--resource-group "myResourceGroup" ' '--auto-upda...
0
52279e45e9c78978918ea5186a28315b
305fb47b618f6101688e323d8b7a2d03
检查identity是否唯一
var exists = await _store.ExistsAsync( t => t.Id != identityResource.Id && t.Uri == identityResource.Uri && t.Type == ResourceType.Identity ); return exists == false; }
1
6584c0466722d3d34bfc124228e7b738
b595bc9d297c9535efd741876efc07b6
Clears all keys. This method will invoke <see cref="IOwnerCache{TKey,TOwner,TValue}.Remove"/> with all current keys --- so that each key is handled by handlers as it is removed.
public class ValueCache<TKey, TValue> where TKey : notnull public void Clear() => _dictionary.Clear();
0
610dc9a37735cfa7a98e749c80ef1170
27e31c3745fa82453e5dfbbd6c85e5ac
Se encarga de inicializar los TextField de la vista con los valores del modelo
{ switch (fvPla_Doc.CurrentMode) { case FormViewMode.Insert: break; case FormViewMode.Edit: ((TextBox)fvPla_Doc.FindControl("Per_Personal_Id_ContrataTextBox")).Text = Scope.Per_Personal_Id; ((TextBox)fvPla_Doc.FindControl("Per_P...
1
9a4d0064d429b1bcb5b093b2c3204767
65dddde50b4879a6d78c4896572fd8d7
売り上げの計算
function calc() { for(var n = 1; n <= 22; n++) { var sco = 0; for(var i = 1; i <= 6; i++) { check(n, i); erase0(n, i); sco += (document.ArcheryRec["r_" + n + "_" + i].value) - 0; } document.ArcheryRec["subtotal_" + n].value = sco; if(document.ArcheryRec["subtotal_" + n].value <= ...
0
638162c9d3fa06b51971104b4a0445f0
f66dbf8a034d64406c7ccd47eb68884c
@description: 将相应的物体放入工厂中 @param {string} 物体名称 @param {GameObject} 物体 @return: null
public class PoolManager : MonoBehaviour public void SetPoolObject(string path, GameObject go) { if (!dic.ContainsKey(path)) { List<GameObject> list = new List<GameObject>(); list.Add(go); dic.Add(path, list); } else { dic[path]...
1
10c3b04d1b1c2a8d6c8149d8f3e0bac9
c5cd3219b0aa0ec030d795cfed222d03
告訴Activity, 目前顯示的Fragment是哪一個
public class Activity_stud extends AppCompatActivity implements FragmentDrawer.FragmentDrawerListener{ @Override public void onDrawerItemSelected(View view, int position) { displayView(position); }
0
2d139c8b0a2db61472f1ba5b1ab01e96
2597e42f223a8f9d6561611850d81ac0
====================================================================// Load Events from APCU Cache
class eventValidator extends val public function eventLoadNew() { $eventAPI = $this->factory('eventAPI'); $this->eventAPI = $eventAPI; }
0
5ac567a7bb54ee488a5531e35a4cafbf
075e4789e0f94831df8926982c23c2fe
================================================================ DEBUG mode only. Formated dump of a general type. ================================================================
$dump = ""; $pad = ''; $indent = ' '; if (($LVL == 0) && $PRE) { if ($DSPLY == 1) {$DSPLY='display: inline-block; ';} elseif ($DSPLY == 2) {$DSPLY='float: left;'; } elseif ($DSPLY == 3) {$DSPLY='float: right;';} else {$DSPLY='';} $dump .= '<pre style="'.$DSPLY.' font-family: courier; border...
1
792bdbbe7c3d5a885ac2e62eb5712670
60a0d26634d36f98bcd6de0774d26096
Returns model based on model_path as app_label.model_name
if model._meta.app_label not in self.apps: return self.default_base elif model._meta.app_label in self.apps: return model._meta.app_label else: return None
0
ce2a30f9a4b2aadec3682928cf6eac56
8ed1ac7e5e8eacc6fecedd2f456a8a2b
iterates through all tables in cfg, tests that they physically exist
self.missing = list(self._tables.keys()) while self.missing: cont = False for table_name in self.missing: missed = [r["table"] for r in self[table_name].fk if r["table"] in self.missing] if not missed or missed == [table_name]: ...
0
732e3a7c0d56e269153bea70cff0610c
5032c631916eabdf61bdbd495a95bb36
获取群未读消息数
function unread_count(data) { return fetch({ url: cnode + '/api/v1/message/count', method: 'GET', data }) }
1
eda87295c170138b3bc16ef9b43b34d4
8be4e93f63f3f1392d4aa207bd8876fd
获取多个分片中的其中二个分片来计算md5
void getmd5(FILE *fp) { rewind(fp); A = 0x67452301, B = 0xefcdab89, C = 0x98badcfe, D = 0x10325476; flen[1] = len / 0x20000000; flen[0] = (len % 0x20000000) * 8; memset(x, 0, 64); fread(&x, 4, 16, fp); for (int i = 0; i < len / 64; i++) { md5(); memset(x, 0, 64); fread(&x, 4, 16, fp); } ((cha...
0
dd79e08b44208e756fab73a66f47f3a6
0cab3e0f93d1aed89978f564f36011f8
Returns the result of interpreting the object as an instance of '<em>Bucket Access</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public class BankSystemSwitch<T> extends Switch<T> @Override public T defaultCase(EObject object) { return null; }
1
a5b6bd7edd89beb8534fff11146adae8
6630d87a7c551138147a650d628acfc4
呼び出し元ページを取得する。 呼び出し元ページがカートではない場合は呼び出し元ページとしてセッションに保持する。
class Auth public static function getReturnToPage() { return $_SESSION['return_to'] ?? '/'; }
0
c49cf395b7b027b912f66484147b0fc7
a6ce2213a79938863987edb84c45e027
unselect_all: This function deactivates all the toggle buttons in the list
def DisableAll(): TL['state'] = DISABLED TM['state'] = DISABLED TR['state'] = DISABLED ML['state'] = DISABLED MM['state'] = DISABLED MR['state'] = DISABLED BL['state'] = DISABLED BM['state'] = DISABLED BR['state'] = DISABLED
1
10016f6c038dae145d3599d6e5c3e15a
0d69a13acc454260be8bf2ca601b8ed2
Gets bounding frustum.
std::vector<double> frustum(6); double left = m_min_range * (m_projection_matrix(0, 2) - m_image_width) / m_projection_matrix(0, 0); double right = m_min_range * (m_image_width - m_projection_matrix(0, 2)) / m_projection_matrix(0, 0); double top = m_min_range * (m_projection_matrix(1, 2) - m_image_heigh...
1
4eeded656ffa794e8f11b54e91ec3453
770ce4913f469db01619b143f97b20e1
检查是否需要隐藏此触发器NPC对话
{ if (TaskData.task_state == TaskState.CanDo) { if (npc_id == TbDataTask.AcceptNpcId) return true; } else if (TaskData.task_state == TaskState.Doing) { if (npc_id == TbDataTaskDialogue.NpcId) return true; } ...
1
69772f019a7885286910e8c7b15843a0
6fe1029dcede5d7fd48229b9bbf2edaf
Gets the utility value of this entry.
class CheckersState(search_engine.TwoPlayerGameState): def get_utility_value(self): return self.__board.get_utility_value()
1
03847277eed806d8d62ce408e3417cd5
22d134c3a86153180a436ce2ceec3561
Sets the 运单签收结果Entity.
public class VTSWaybillSignResultEntity extends BaseEntity public void setArriveTime(Date arriveTime) { this.arriveTime = arriveTime; }
0
01a44c334894a5459a0e2779b2379b58
cb287604eba0237348cf72a9c97b973c
Returns the minimum required Dynamix version
public function minPHPVersion();
0