query_id
string
corpus_id
string
query
string
code
string
label
int64
e40e9b9818615438940f45b7b8f8939a
a8aa6ff80c2ef40aa4b01e6d14dfa029
计算分组的订单满足率。
{ foreach ($groupOrderProducts as $product_id => &$groupOrderProduct) { if (!isset($orderProductDiscount[$product_id]) || $orderProductDiscount[$product_id] == 0) { continue; } $discount = $orderProductDiscount[$product_id]; $productMoney = $gr...
0
4ef62f1bcf3b16859a027f00aa15bacc
d9a52cd747b0eb00f76065094922df40
取得段落中的下一行,包括一个段落中以及跨页的段落中的下一行
var nsp = getNextPInPage(p) if (nsp == null) { var nextpaper = getPage(p) != null ? getPage(p).nextSibling : null; if (nextpaper != null) { nsp = getFirstPDiv(nextpaper); } } return nsp; }
1
ebf80b5509a5976e4d11290acb449f16
19be82a088eb45dffa4daf2f94b56e1c
앱을 실행시켰을 때 배경사진을 띄워줌
class WelcomeActivity : Activity(){ override fun onResume() { super.onResume() background.setBackgroundResource(android.R.color.white) }
0
7f63f3282891c40f0429b78ad06a9db3
d43c5ac6cd2b68300cf6ceb4a76e3d5b
Modify when an event should be run.
namespace TSC.Core.Projections IWhen<TReadModel> When<TEvent>(Action<TEvent, IDictionary<string, object>, TReadModel> handler);
1
b620d300ed518a3c07fb7358c46c45c0
514c981bffa5f8b9a0554e2b156fd8fb
This function adds the items price.
public class CashRegister public void addItem(double itemPrice) { a.add(itemPrice); }
1
c1f7a2e1da4715489f6ddc1f935dbf74
0ddd14a48e88492ecf9457e903b574ad
sorts lits of lists by value of second item in each sublist
def sort_tuples_y(list): list.sort(key = lambda x: x[1]) return list
1
72f46bd5fa12540bcbbbdef8b1c9fa2e
160343b6b9cfa9a3f6110107f4ac6ad3
Primera parte del cambio de formato de ICS a JSON
return new Promise((resolve, reject) => { var img = data.grafica; var img2 = data.grafica2; img = img.replace(/ /g, '+'); img2 = img2.replace(/ /g, '+'); var dat = { "tipo": data.tipo, "beneficiario": data.beneficiario, "cedula": data.cedula, "provincia": data.provincia, ...
0
04a4132012b19d2bfb733dc7739edf93
ed03d212b90d64e15ad9f8418b83d423
TEMP test routine. Vibration will eventually be handled via the device effects system
{ unsigned char ucControlRegVal; short sTemValue; TC72Configure(TC72_MODE_ONESHOT); ucControlRegVal = TC72ControlRegValGet(); TestAssert((0x15 == ucControlRegVal), "TC72 API error!"); sTemValue = TC72TemperRead(); PrintN(sTemValue); TestIOPut('\n'); TestIOPut('\r'); }
1
51a113e723082b65640e65cb1cc5c8b2
2edcd6007349bb593b65a2f823e68047
Проверяет доступность автоначисления и устанавливает блокировку в случае достижения лимита
public class AdministrativeUser extends ClientUser public void incompleteTransaction(ClientUser a){ if(!a.getIsFrozen()){ a.setFrozen(tm.getIncompleteTransaction(a) > a.getIncompleteTransactionLimit()); } }
1
58e60707bebad1cd2fd0bacfd343049a
3513d2f2b963fc1944a3919530c16277
初始化出牌规则
public class MahjongGameCacheBean private void initEffectivePai(String mahjongRule) { if (MahjongConstant.GUOBIAO.equals(mahjongRule)) { deck = new int[144]; effectivePai = MahjongConstant.GUOBIAO_PAI; effectiveCode = MahjongConstant.GUOBIAO_PAI_CODE; } else if (Mahjo...
1
2cda3a7787586b626f55472889344d99
27a931518cc134f72077ed5e16dd2d5e
Get the output adapter class name
public class Extension public String getAdaptorClassName() { return this.AdaptorClassName; }
1
a22511e811ed6160a265022e764a18bc
39e751b57c277e5dc3ac816a732330ae
Check if this shim is properly configured.
if (!config.getBuildProvider().getClass().isAssignableFrom(StubBuildProvider.class)) { return false; } for (IDeviceConfiguration deviceConfig : config.getDeviceConfig()) { if (!deviceConfig .getBuildProvider() .getClass() ...
1
b908478227be1a9e65a0be2e44fe2638
807ee843f48ee4d30ce4430cc879008d
gradually reduce velocity in either positive or negative direction based on whether we were previously moving right or left.
if (x_v > -10) { x_v -= acceleration; } }
0
a0ea00501c345b0b8dde0e53d68fee05
c16cfa5bf93034c4cd5a63bf72933e7f
BallSetクラスの初期化
class BallWorld: def __init__(self,blist): self.balls = blist
0
c803c2a315a18d89d40414afdedbb83a
720c1fad3b7872470740a59d33caf742
Creates an application. You can optionally specify an Id for the application, if not provided one will be generated. Attributes: application_id: (Optional) The Id to use for the application. If not provided a secure random UUID will be generated. request: The request object that contains all of the information used to ...
namespace io.fusionauth Task<ClientResponse<ApplicationResponse>> CreateApplicationAsync(Guid? applicationId, ApplicationRequest request);
1
ed538a3befb5365789c45e3c1c4c2400
b8d5a3f401a9bbd9e7c31b50901dd15e
Returns the zero element in this ring.
public final class ModLongRing implements ModularRingFactory<ModLong> public ModLong getZERO() { return new ModLong(this, 0L); }
1
ab2a45d3bbca0f464c02ead387ee839c
dee2745618d9126450015368a58aba4f
<p>处理对象,防止为空,以默认值替代
public class ObjectKit public static <T> T defaultIfEmpty(final String text, Supplier<? extends T> handle, final T defaultValue) { if (StringKit.isNotEmpty(text)) { return handle.get(); } return defaultValue; }
1
5ed9be88064d4cafd8774367fd4c7a70
b2e736b2c1f63c958fa34f3c5ea5ed78
# Designing Filter For Improving Representation of genoplot (Removing Repeat Regions in Query and Subject)
filter_repdat_3<-function(repdat,col,filters){ subrepdat<-subset(repdat,clonotype%in%filters) return(subrepdat) }
0
aa96a273486a46506f2bf4fd732d3845
1af299e9795e71d508780b70f553bc7f
如果剩下两屏文字,则自动加载下一页
class qsbk(object): # 初始化方法,定义变量 def load_page(self): if self.enable == True: if len(self.stories) < 2: pageStories = self.get_page_items(self.page) if pageStories: self.stories.append(pageStories) self.page += 1
0
4b57277891d5b6de48243e98dcbf88e6
647b88bf62ec825bcfd81e7c14767bf6
Defines the routes used to support CMS Blue Button 2.0 integration
class AngularizeEndpoints extends WP_REST_Controller public function register_routes() { $version = '1'; $namespace = 'angularize/v' . $version; $base = 'route'; $files = 'files'; register_rest_route( $namespace, '/', array( 'methods' => WP_REST_Server::READABLE, 'callback' ...
0
a93559667565faeb6272898e121cfcdd
b0c49b1c014ede75068cbac3dc0dde17
Removes modify loop event listeners.
export class LookAt removeEvents() { this.firstElement.removeEventListener('keydown', this.loopEvent); this.lastElement.removeEventListener('keydown', this.loopEvent); }
1
6a77eb8bbb4ff011b83cfd1b8676dacf
cb24638f3b16d576b66d4d81b24edb31
The preferred format is jpeg, since the image server uses it by default.
class AttachedImage def resized_content_type "image/jpeg" end
1
d486d916dc69cd1a500f44f4c01b3f9a
f903d1c65af57c03aecc867db33d2940
Test for the ability to repair too many ambiguous genes in a genome.
gdata = PDPData( self.name, self.testgroups.str, self.testseqfiles.stitchfile, self.testseqfiles.filtered_seqfile, self.testdatafiles.features, self.testdatafiles.primers, self.testdatafiles.primersearch, self.testda...
1
fda1e21ed0b0cf982b48aea3c87bc310
bf43908f872c6091f1ffa6bedc45805f
return nearest bead colour to the r,g,b value specified
namespace picToMCF public class ConvertFile private int findClosestWoolColor(ref byte r, ref byte g, ref byte b) { int closestIdx = 0; int closestDist = 3 * 255 * 255 ; for (int i = 0; i < WOOLCOLOR_TABLE.GetLength(0); i++) { byte tr = WOOLCOLOR_TABLE[i,0], tg = ...
1
83c0cdc11c01077e86e7a2051ec3ad75
be463f0b769d4ee5f46491891ce88484
Get the titles of fact cards.
List<String> titles();
1
b4eb5f8830440894776d896260994b95
b5dfcbd8f1dad266da39568092701faa
returns value at the specified offset, in the frameNumberth frame. frameNumber starts from 0
namespace MovementDetection.Pipeline public class BufferedFrame public float GetValue(int x, int y) { return frame[x, y]; }
0
a48e79dcf4cab1364235c3d75d71c71a
9720316d23ec9315713019cabd83d765
! @brief Sends the packet received back to the PC, with the acknowledgment bit set.
static inline void sendacknowledgement(uint8_t *macaddr1) { mac_t grundframe = {}; int pcapstatus; uint8_t sendpacket[SENDPACKETSIZEMAX]; grundframe.type = MAC_TYPE_CTRL; grundframe.subtype = MAC_ST_ACK; grundframe.duration = 0; memcpy(grundframe.addr1.addr, macaddr1, 6); memcpy(sendpacket, hdradiotap, HDRRT_SIZE); mem...
1
00fd4d51ef09fa1783669f1c82a2b799
346ca505afada3a0992d20fb89642369
=========================================================================== DESCRIPTION This function computes the Rx switch points for the set of calibrated channels (ARFCNs). It places the switch points in an internal buffer to reduce the run-time overhead. By adding them to RF_SIGMA_DELTA_MAX_dB, dBfs Min/Max gain ...
void rfgsm_core_nv_init(rfm_device_enum_type rfm_dev) { rfgsm_nv_precompute_rx_switch_points(rfm_dev); rfgsm_nv_precompute_enh_rx_switch_points(rfm_dev); if ( TRUE == rfgsm_core_get_device_tx_capability(rfm_dev)) { rfgsm_nv_precompute_tx_gain_ranges_info(rfm_dev); rfgsm_nv_init_amam_ampm_table( rfm_dev,...
1
fcacbd5137c363a5b85f18d34816646d
bbe9c2f7814b74c77cf1bd8e9cd4c217
Enable or disable the given list of devices.
[Route("api/device/{id}/enabled")] [SwaggerResponse(HttpStatusCode.OK, Type = typeof(Device))] [SwaggerResponse(HttpStatusCode.BadRequest)] [SwaggerResponse(HttpStatusCode.NotFound)] public async Task<IHttpActionResult> Enabled(string id, bool enabled, string reason = null) ...
0
3c81795fc806dfd8e9032f398d2d4cb7
42841edb5e16c19620586518bf3ae518
**장바구니에 있는 모든 상품 리스트를 가져오는 모듈**//
class Item public function itemList() { $contents = NULL; $div_s = "<div class='itemList'>"; $numberOfItem = count($_SESSION['itemList']); for($i = 0; $i < $numberOfItem; $i++) { $contents .= "<div class='item'>"; $contents .= "<a href='{$this->showProduct}{$_SESSION['itemList']...
1
159eea9973cacdbfd59f22a7b92bdf75
305f1656cff4eb18dd033e9cda032caa
Open kernel namelist and core image files and initialize libkvm
static void process_kernel_cmdline() { import_kernel_cmdline(false, import_kernel_nv); if (qemu[0]) import_kernel_cmdline(true, import_kernel_nv); }
0
9f353472b4be8242ae7e1824f9c21add
82493e4a33265faf4cb0eecfd46627ba
Wyświetla listę województw.
function lista_drzavljanstava() { $category_query = query("SELECT d_id, d_title FROM drzavljanstva ORDER BY d_title ASC"); confirm($category_query); while($row = fetch_array($category_query)) { $d_id = $row['d_id']; $d_title = $row['d_title']; echo ' <tr> <td>'.htmlentities($row["d_title...
0
e858f58df95ce2114cc22c1219a37c00
b6ced2c05cfe91661f179467071f19ba
检测是否存在USB存储设备
public class USBCheckUtil public static boolean isUdiskExist(String usbPath) { Logutil.d(TAG, "isUdiskExist()..."); if(null == usbPath){ return false; } if(usbPath.endsWith(PATH_A)){ usbPath = PATH_A; }else if(usbPath.endsWith(PATH_B)){ usbPath...
1
a3d99d3e4e841a897d9a0db33227ecce
9e43c39ccd24df096ae314011933ce1b
Sets the control point of a quadratic Bezier curve.
interface IControlPoint<T> fun setControlPoint(controlPoint: T)
1
5100494045635bd24680d0402b8f7802
bce2c5bcbfff23695d74a72b74bff690
This test ensures that a nonexistent contact cannot be retrieved
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = UnitTestConfig.class) public class ContactDaoUnitTest @Test(expected = RuntimeException.class) public void deleteNonExistentContact() { Long id = new Random().longs(10000L, Long.MAX_VALUE).findAny().getAsLong(); contactDao.delet...
0
7c1280b390c8569c3872101ecc2014f5
7e12234ba7b50d138c82e616085b778e
https://hackage.haskell.org/package/base-4.9.0.0/docs/src/Data.OldList.html#groupBy
def group(list_): return Grouper(list_).group()
0
89bde08c7ce0f3d3f2e83ca739782c5c
fcfef7a38cace55d759d482439ddcb9e
Get number of datasets in Mongo DB
async def do_count(db: AsyncIOMotorClient, databaseName=settings.MONGO_DB, collection=settings.MONGO_TABLE): n = await db[databaseName][collection].count_documents({}) print('%s documents in collection' % n) return n
1
2fc8830d06ece7e69205a0d9b55aac7d
9b7c28752e0650b65cdf382812df4400
根据ID增加标签
$model->where([$str => $id])->delete(); for($i=0; $i < count($data); $i++) { $tag = $model->create([ $str => $id, 'tag_id' => $data[$i] ]); if (empty($tag)) abort(404, 'TAG标签添加失败'); } }
1
cdac44e063e9ed05617f422b044f7e34
508bd59029abcf9cd8338a02155fdbcb
清除用户贵族信息
clear_vip_info(state) { state.vip_info = {} }
1
00f808edfaa8cfe66937d2166c184f9a
83d7f8095380977bea35b528db4c8f66
Given a EUGene row, create a war game for it and run to completion.
au_ge, key_words = process_and_almost_bag(row_dict) bow = make_bow(au_ge, key_words) return {'au_ge':au_ge, 'key_words':key_words, 'bow':bow }
0
605898711c17a66638bb0b22462e65e0
9b4e6d86fa9b9f7065d5128e736e75bb
Gets the probability threshold for cutting off arcs when building a linear division graph (LDG).
public class LMedSRobustSinglePoint3DTriangulator extends RobustSinglePoint3DTriangulator public double getStopThreshold() { return mStopThreshold; }
0
fb0ddf509da5c6903c32cf4a06bf767d
8d3e810c5a3052b01792d51f1fd5f158
Function to extract a random quote from the Random Famous Quotes API
response = requests.get("https://zenquotes.io/api/random") json_data = json.loads(response.text) quote = json_data[0]['q'] + " -" + json_data[0]['a'] return(quote)
1
c371f752a4b386bda6bacc9e09b18562
ba8b674d9c5993d63b0c5aed15cc7dd9
Returns the current value for the MongoDB connection object.
public final class MongoConnection public Mongo getConnection() { return m; }
1
ed862c5474b0d4e6ef8ca0942972abed
48400d8ecacd4e4cca2475e880a68b3c
divide a single list, l, into sublists of size n
def split_list(l, n): for idx in range(0, len(l), n): yield l[idx:idx + n]
1
5226a8c20072f282c63c4239460ed854
9f78d136360f99f474af11a485001534
Set new teletext page to retrieve.
class TV(object): def teletext_jump(self, opt=100): return self._send_command('teletext_jump', opt)
1
86b9abc3e57ae6e465882475bdab4661
8a32cb181491317ed2c981a502b8d702
Función para llenar el TableView con los datos que el usuario indique
Tbuscar.setDisable(true); progTabla.setVisible(true); llenarTablaSuscriptores lts = new llenarTablaSuscriptores(); lts.addEventHandler((WorkerStateEvent.WORKER_STATE_SUCCEEDED), (WorkerStateEvent e)->{ ObservableList<TablaSuscriptores> items = lts.getValue(); tablaUsuario...
1
32f68e7cb57db9d372fae46fd51b1f7f
e4392d1ad881ff4f79517d5e8e32696a
Lấy Danh Sách Tên Tỉnh Theo Mã Tỉnh
{ string sSQL; try { sSQL = "SELECT STATE_NAME FROM TBWC_STATE WHERE STATE_CODE ='" + StateCode + "'"; oHelper.SQLString = sSQL; return oHelper.GetDataSet(); } catch (Exception ex) { ...
1
9fa8c24f15c12d84550f10cd296b68c5
90265ec2986e5038565ffe0d5908a56e
Determines whether box1 is contained in box2.
{ return ( box1.rt.y < box2.lb.y || box1.rt.x < box2.lb.x || box1.lb.y > box2.rt.y || box1.lb.x > box2.rt.x ) ? false: true; }
0
d32c843ddb8cece560b9680cc5f9cbd0
d969cbe4bd920cbaccf25a332a3bce5f
根据pid集合查询多个资源
List<SystemResources> getResourceByPid(Integer pid, Integer roleId, Integer scope);
0
4fee4e260d3384991c24c6f04c6deb92
10f786f8e861209b21ecb3034056f70a
根据指定主键获取一条数据库记录,t_group_order
GroupOrder selectByPrimaryKey(Integer id);
1
86fc694e2c21ddc4e336e6e865d52500
27f1d1e121c5caad1f63249a8f45859f
Cancel all IRPs currently on the queue
QueueIRPToThread( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ) { PDEVICE_EXTENSION devExt; NTSTATUS status; PIO_STACK_LOCATION irpSp; DEBUGOUTCYPHERDRV(DEBUGLEV_ENTER, ("QueueIrpToThread\n")); devExt = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension; status = STATUS_PEN...
0
10f4d7c035c6d0eb3224cfe698fe201c
a0333adeb1ebc0359dba4db0f440d943
Creates a new commenter with the specified e-mail address
var href = "mailto:" + $scope.username + $scope.atSign + "gmail" + $scope.emailSuffix + "?subject=Comment%20on%20the%20IMVUConversionTool&body=message%20goes%20here"; document.location = href; }
0
35247ada81b56b55416bd2addf127df1
b020d3cd7a8f7232aa4e0b03afbe4c6b
We can add properties or override properties but not delete yet.
try { print(typeof Date.prototype.getYear); print(Date.prototype.getYear = 123); } catch (e) { print(e.name); } print(typeof Date.prototype.getYear); try { var err = new Error('aiee'); print(typeof err.lineNumber); err.lineNumber = true; } catch ...
1
b8e7ac73b0badc34256a1dbd4a4e12be
6886e8a3fa9d7a9d6b36d6fb4377ced8
Enrol a user in courses by shortnames Returns array of result data
public function course(int $user_id, int $periods_id, array $class_id = [], array $course_id = [], array $business_type = [], array $dest_type = []) : array;
0
21d7ac7226403109d02b2577292de703
a5332026fad660c74b13e724a1b52a14
Tests the clear journal method of the journaled list.
journal = Journal() monkeypatch.setattr(rpy_code, 'journal', journal, raising=False) glossary_add('test_entry') assert journal.new_entries() == 1 glossary_read('Test') assert journal.new_entries() == 0 glossary_add('test_entry') assert journal.new_entries() == 0 assert len(journal.gl...
0
fd12938a800f2e976379ecefae7d2acd
bc32d566d41c0cfc842e1bb7d514f8d0
Korkeus-getteri.
public class Sudoku public int getKoko() { return kentta.getKoko(); }
0
67ef66386e1ecba3a892d045f3073cd8
ca2d54d730b7a4f26c9953205104973a
TextBox que contiene el texto de la solicitud.
public class Ejercicio2TextField public Panel getPanel() { return panelTexto; }
0
f8d3f117225a1962a6f5ddc588bec67d
c238679bdbcb41a71c4b3b21865cbaf2
Notifies the command is undoing.
namespace NanoByte.Common.Undo public class PropertyChangedCommand : PreExecutedCommand protected override void OnUndo() => _property.SetValue(_target, _oldValue);
0
7d27fb0abf264d6f907efa500ab16315
7ee18719440e64a478f6595cdf284774
Tests if a retry happens when port is bound.
public class TCPNIOTransport extends NIOTransport @Override public TCPNIOServerConnection bind(final String host, final PortRange portRange, final int backlog) throws IOException { IOException ioException; final int lower = portRange.getLower(); final int range = portRange.getUpp...
1
16d927157613204a9a7f4572413a2626
45bb3078d699cbe6c31efce4f304777a
Initialize game category button once its been unlocked
{ for(int i = 0; i < levelButtons.Length; i++) { levelButtons[i].interactable = isUnlocked[i]; } }
0
a24f18913693cb71aae5bcbe945c128c
4d8f33c95848448fe3da8beea96abc25
Fire the bullet when the mouse is clicked
{ if (Input.GetMouseButtonDown(0)) { GameObject tempBullet = Instantiate(_bulletPrefab, _firePoint.transform.position, _firePoint.transform.rotation); tempBullet.GetComponentInChildren<Rigidbody>().AddForce(_firePoint.transform.forward * _defaultSpeed); ScoreManag...
1
1ba00288a54f5ee505d4feab78aa8100
a1959b4fb6d7345314e8f9da5353e62e
8-bit unsigned image copy.
{ if ((x >= _iwidth) || (y >= _iheight) || (w == 0) || (h == 0) || !_created) return; if ((x + w < 0) || (y + h < 0)) return; if (data == nullptr) return; int32_t nbytes = (w >> 1) + (w & 1); int32_t i0 = 0, j0 = 0; for (int32_t i = y; i < y + h; i++) { j0 = 0...
1
90dcd6a4fb000b4d55f5fbf9d92eecbe
52544431a56bf62eba4217bb00824b46
when selecting the standard option for ability scores both the label and the ability score points will vanish
document.getElementsByClassName("addScores")[0].style.display = "none"; document.getElementsByClassName("contentItems")[0].style.visibility = "visible"; document.getElementById("errScoreMsg").innerHTML = ""; var curButton = document.getElementById("enterScoreButton"); curButton.setAttribute('onclick...
0
7e80e3c8ec511a35fd6064ce34e9ef1d
6fba17db74eaedad668367254c07b351
Assigna un valor al limit de l'eix x de la càmara per evitar que es pugui donar la volta sencera.
if(x_change-500.0f/zoom_camera<-500) x_change=-500+500.0f/zoom_camera; else if(x_change+500.0f/zoom_camera>500) x_change=500-500.0f/zoom_camera; if(y_change-350.0f/zoom_camera<-350) y_change=-350+350.0f/zoom_camera; else if(y_change+350.0f/zoom_camera>350) y_change=350-35...
1
6f030fc4d52074b29ccdc6c1056d305a
8c5e0410765be35edcb3eddee4002e2a
selects last n elements.
namespace SMEAppHouse.Core.CodeKits.Extensions public static class LinqExt public static IEnumerable<T> TakeLast<T>(IEnumerable<T> source, int N) { var enumerable = source as T[] ?? source.ToArray(); return enumerable.Skip(Math.Max(0, enumerable.Count() - N)); }
1
94742db5a412741b576755fe37380d01
85b24b438a0f2814791d0f72bb0931b3
Returns the number of seconds since the program began execution.
{ time_t now; static time_t then = 0; double value; if ( then == 0 ) { then = time ( 0 ); } now = time ( 0 ); value = ( double ) ( now - then ); return value; }
1
dcf5fb2fd9b7d28a82d9be9656e21c64
fe00d1d557d8dedfc4bc387769d1d40a
Adds an entry to the `login_fails` table.
class LoginController extends AbstractController public static function store_auth_attempt(array $info): void { $additional_info = null; if ($info['additional_info']) { $additional_info = json_encode($info['additional_info']); } if (!$info['successful']) { $ac...
0
fca5ba55aecaf87505ff90314c5db583
42d034636353abe398c124968a24d1db
Возвращает внешний идентификатор зеркала домена, соответствующий внутреннему идентификатору
class xmlExporter implements iXmlExporter private function determineExternalEntityId($internalId, $table) { $sourceIdBinder = $this->getEntitySourceIdBinder(); $externalId = $sourceIdBinder->getExternalId($internalId, $table); if (!$externalId) { $externalId = $internalId; $sourceIdBinder->defineRelati...
1
41880f824dd226b610533fd6d4989c39
18d33da7da37367ae09c3ef4bec6fc75
Test allowing authorized users
class NoteTest extends TestCase public function testAllowAuthorizedEdit() { $user = User::factory()->create(); $note = Note::factory()->state([ 'user_id' => $user->id, ])->create(); $this->actingAs($user) ->get(route('note.edit', $note)) ->assert...
1
4ad90ad5233c550b903146eaad743c3e
aadad5926978780f9bf77b0d0fae87b3
A JPG image is loaded from the disk. ImageIO's read() method returns a BufferedImage, which is Swing's important class for manipulating images.
try (InputStream in = FileIO.INSTANCE.getInputStream(path)) { Image img = new Image(in); return img; } catch (IOException e) { throw new RuntimeException(e); } }
0
19dc99a2a66ace23d5b5405d39f47629
c814e1ce34a322436a4dd5b3043be722
Returns true if the process does not violate any limitation of ML4.
boolean isSatisfiable() throws TimeoutException;
0
88a662fd76b2ba6ca3d3122cbd23e9db
92137e27e8040d170f8ff2c58cd14083
Récupérer les parties gagnées d'un utilisateur.
class ChessBoard public function getUsersPlaying($games_uid) { try { $this->prp_getUsersPlaying->bindParam(':games_uid', $games_uid, PDO::PARAM_STR); $isok = $this->prp_getUsersPlaying->execute(); return ($isok) ? $this->prp_getUsersPlaying-> fetch(PDO::FETCH_ASSOC) : a...
0
f73b7dacd4d5d4bf35530c4dad74622b
38d97be680e1cdeb14d8d838e91d03c6
Calculation crack growth rate.
def growth(L): res = np.diff(L).mean() res = percent(res) return res
0
4b1a7f95ad8062b2fb7f683f92a5aa50
1435e69436c142388a03530fd99091cf
天猫查询接口,用于查询订单
map<string, string>::iterator it; if(m_topup_info->qs_info.coopId.empty()){ MakeErrReplay(LAKE_PARAM_ERR, SORDER_FAILED, response); TP_WRITE_LOG(m_topup_info, "\t(TmallQuery) no coopId %s", LAKE_PARAM_ERR); return 1; } if(m_topup_info->qs_info.tbOrderNo.empty()){ MakeErrR...
1
c19b44dddddaa55c740d93217a599257
c525c18d9b7d14d1463f36f24eae0a86
Disable hardware switching
void hardware_disable() { pinMode(5, INPUT_PULLUP); pinMode(7, INPUT_PULLUP); pinMode(8, INPUT_PULLUP); pinMode(9, INPUT_PULLUP); pinMode(A0, INPUT_PULLUP); pinMode(A6, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); ACSR |= (1 << ACD); power_twi_disable(); power_timer1_disable(...
1
7e96b68991304d4f8b3e009a3c95ae0e
b2e57217afeca04afeca8be831238f7b
Should the synchronization upload the content of the outbox to the server? Typically true.
public class PluginExecutor implements TextMessageListener, SyncPluginExecutor public boolean isSyncUsers() { return syncUsers; }
0
b4c8a3c8e59a6794c921f8640ea663bf
310dd54f217f53c6f6543b70900f52fc
DrawingPanel_MouseClick: sets missile destination from user click
void PlayState::MousePress(int nButton, int nMouseState, int nXPos, int nYPos) { if (nButton == GLUT_LEFT_BUTTON) { if ( (nXPos > 0) && (nYPos > 0) ) { m_pPlayer->SetDestination(nXPos, nYPos); } } if (nButton == GLUT_RIGHT_BUTTON) { AttemptToFireBomb(); } GameState::MousePress(nButton, nMou...
1
3c23472cf4b6cac2f7c3835984281c58
3bbdeffeed2e5b26c0a995373f6622c8
Устанавливает функцию для обработки события при пропадании устройства
public class MessageWorker implements Runnable public void setOnDisconnect(IOnEvent onDisconnect) { this.onDisconnect = onDisconnect; }
1
14d2baa2382bb3357c17157576ec8744
843713434529df18cbb8f02eab5e0ea3
Возвращает номер задания из адресной строки
var param = window.location.href.match('/?.*' + name + '=([0-9]*?)(&|$)'); if(param === null) return undefined; else return param[1]; }
1
f5f7ddb7214b1e33724830061cd14e21
c30643aeca9c268720d9f9527b8d687c
Load all lecture of a course.
class LessonController extends Controller public function index($course) { $course = Course::where('id', $course) ->orWhere('slug', $course) ->firstOrFail(); $lessons = Lesson::courseLessons($course); return response()->json($lessons,200); ...
1
b136f518307aa2ab4707981fc16e57d0
305681df4a8afec24eb5e170ccc3b706
Check that auth returns false with no credential
test.Before() s := test.StartHttp(func(r component.Router) { ctrl.InitEndPoints(r, test.CouchBaseAddr, "", test.Secret) }) defer s.Close() body, _ := json.Marshal(ctrl.AuthReq{Login: "leroy.jenkins", Pwd: "test"}) res, err := test.DoReq(s.URL+"/login", "POST", bytes.NewBuffer(body)) if err != nil { t.Error("...
0
0700bc3243ef7dabf6d0b0da8273ec4f
3d185a5519a47c0fba3f2cf6e5c6d2ab
当单击清空时,将用户名和用户代码清空,以及加载对照表
public partial class Login : System.Web.UI.Page protected void ImageButton2_Click(object sender, ImageClickEventArgs e) { txtName.Text = ""; txtPassword.Text = ""; txtcode.Text = ""; txtName.Focus(); }
0
df08e2505b5241524aa18300b36d9dbd
cb48492273319061b253d58716a45de8
Before every iteration, check if the iteration should exit
class SimpleController(Controller): def should_continue(self): self.iterations_done += 1 return self.iteration_amount >= self.iterations_done
1
5deab18a8414a5a013ded0e6f3e1e6ed
1f164fde12cc8f2e722f85f83b12c364
Sets the Agents position from a new maze position. Updates the screen position accordingly.
this.maze = maze; goalPositionRow = goalRow; goalPositionColumn = goalColumn; redraw(); }
0
b860373a660c1861bc8472d53f41d7f5
d3c315cde9530c8814f8192bce0424c6
Get up limit stocks.
class Instrument implements ArrayAccess public function getLimitUpPrice() { return $this->limit_up_price; }
0
2be00d6b3f8e637cfac62569a1849e25
c6bd549f75cf715e20dc3ce00dba1f9f
A test case for dipole fit algorithm. Test the dipole fitting algorithm on two dipoles within an image with simulated noise.
np.random.seed(1) t = np.linspace(0,3,200) r = np.linspace(1,5,100) P = dd_gauss(r,[3,0.08]) K = dipolarkernel(t,r) V = K@P + whitegaussnoise(t,0.01) fit = fitregmodel(V,K,r,'tikhonov','aic') assert ovl(P,fit.P) > 0.95
1
86deab834063311e36979cdf3fa1ebaa
9a3c42f6d8b04bff4666556e96606835
Test that the spectrum can be interpolated to new wavelengths
sp = spectrum.interpolate_spectral_element(self.fname_ramp, 6480) w = sp.waveset[:100:10] np.testing.assert_allclose( w.value, [3499.99902344, 5686, 5736, 5786, 5836, 5886, 5936, 5986, 6036, 6086]) np.testing.assert_allclose( sp(w).value, ...
1
67e260df088dd47dd712f489bfbd5cdd
8e57618129901b9810f1425ea7118ba8
根据栏目类别和否决类别编码查询栏目不更新配置
@Controller @RequestMapping("cmsColumn") public class CmsColumnController @ResponseBody @RequestMapping(value="findPHColumnTypeByColumn") public void findPHColumnTypeByColumn(@RequestParam String platformId, @RequestParam String hospitalId, @RequestParam String columnTypeId,HttpServletResponse response) { Revers...
0
172c38456966f74395759578e7f0ca0f
81d1dcef1168b99520fdea769a8c562d
单句与匹配句子list做相似度计算,返回相似度分值最高的一个
px = {} for i in lst: question = seg_sentence(i) str_data = cal_similiar(question,sen) for k,v in str_data.items(): px[i] = v tupl_data = sorted(px.items(),key=lambda x:x[1], reverse=True) for item in tupl_data: if item[1] > 0.3: retu...
1
e7d0704ab3f6584d82de51ca5f3136fd
f9b17af62bbe080a1f9d49b1848241c6
metodo di supporto per ottenere una copia della mappa
namespace MapGenerator public class MapManager public char[,] GetMap() { return (char[,])_grid.Clone(); }
1
254015fc94750b9f6a8373a44e3877a9
59d0f9c23f5d1b56c8bece484b9837d2
Llista per pantalla la informació completa dels usuaris de l’aplicatiu, incloent la informació dels seus posts.
{ $res = Post::join('users', 'post.id_user', '=', 'users.id')->select('post.*', 'users.name')->get(); return view('index')->with("res", $res); }
1
f6f21443c9e7009aa9c7ff35617819cd
48cded2467a9ede6b780bb812064414f
Returns default roles config
public function getDefaultRoles(): array;
1
0cd0a217530fdc9b8654213e12a9608c
ce55ceaed239423d661a2e1535ede6a7
Update the Laser Information in LaserTable
public class levelController : MonoBehaviour public void updateLaserInfo(){ laserCycles++; newColor = true; }
0
4236137ec1235f2f189ca73114486b7a
f2d4b3d5757f64825b6dd65f563d51a5
Return the pk of the choice by default.
class ClassifierTermChooserBlock(blocks.FieldBlock): def get_prep_value(self, value): if isinstance(value, self.target_model): return value.pk return value
1
eefc8eed5cec727fb1923318140738a1
fba78788b89b410372e73997a7d88b36
生成订单DisplayID
{ var ids = db.domain_PurchaseOrders.Select(s => s.ID); int id; if (ids.Count() > 0) { id = ids.Max(); } else { id = 0; } string now = DateTime.Now.ToString("yyyy-MM-dd"); ...
1
5a101b9c0780f39fbf6d490f46a8b200
b30bc91911a1ff3f48efb7e8d8dd82da
해당 바다의 평균 수온 구하는 함수
{ double sum = 0.0; for( int i = 0; i < MAX_DAY; i++) sum += v[i]; return sum / MAX_DAY; }
1
6e57b4c0827841ee47a570a45576f6f3
7c9e6d513dedb9723523dcd5cb84e46d
Test setting the object visible or hide.
p = Prop() obj = p._vtk_obj obj.SetEdgeVisibility(1) self.assertEqual(p.edge_visibility, 1) obj.SetOpacity(0.5) self.assertEqual(p.opacity, 0.5) obj.SetRepresentationToPoints() self.assertEqual(p.representation, 'points') val = (1.0, 1.0, 0.0) ...
0
69ced0e797e843c7b465fa5d13133753
b1b93d0966c6381a556688103ab8a1fa
The sequences of actions and states that lead to each state.
Table<String, String, Set<T>> getTransitions();
0
6f135c21bb895ec3207751daeb04808f
85d54771a222c9fc010bdf07e58d8cca
获取空托盘数量
namespace Frxs.Erp.ServiceCenter.Order.IDAL int? GetWaitPickingNum(int shelfAreaID);
0
3bdf2d3d75216939cc24c05eaa09b3ae
f8f761f9b8cf9528997614f64add9dfc
Convert list of text into list of padded id vectors
def text_to_vector(sentences, vocabulary): x_text = [clean_str(sent) for sent in sentences] x_text = [s.split(" ") for s in x_text] sentences_padded = pad_sentences(x_text) x, y = build_input_data(sentences_padded, [], vocabulary) return x
1