query_id
string
corpus_id
string
query
string
code
string
label
int64
f8232d11d4526249efe098c713f603db
7a96863e1b5aacadc0e2a7066425e046
Checks for any Trias, Tesseras, or wins. Adds the repective counts of any of those to be announced. Uses recursion to move in any or all directions from a point and check whether it is a valid condition.
int vertical = 1; int horizontal = 1; if(x > -1 && x < sizeX && y > -1 && y < sizeY) { Candy initial = board.get(x).get(y); vertical += checkRowRecursive(x, y+1, 0, 1, 0, initial, board); vertical += checkRowRecursive(x, y-1, 0, -1, 0, initial, board); ...
1
090bcf1dd7d0afcf7c5f44191456f59a
8dfd6f659074aea105b858dc9c5d8713
Executes a command in the root shell. Devices must be rooted to use.
public class HLAccessbilityService extends AccessibilityService public void execShell(String command) { if (command == null) { return; } DataOutputStream os = null; try { Process process = runtime.exec("su"); os = new DataOutputStream(process.getOutput...
1
9351097898c6a77dd70747ef1b85978b
4f3cb013a628a14b8f7bd75572efab2d
sort function for qsort: integers descending order
int sort_descending_order(const void *low, const void *high) { const int *a = (const int *) low; const int *b = (const int *) high; return *b - *a; }
1
5d06418f3e0fdc426e43d06c51e66b19
a8252671868b55445c523686bce93cff
Fake set of MWS credentials
list( $id, $secret ) = $this->get_fake_site_credentials(); $this->use_fake_credentials( $id, $secret ); return array( $id, $secret ); }
1
0c4111eeff3ca92c5996d42f892f6ec3
cf8621c510c78e10948ac6f6b38fb89f
! \brief Ensure we can allocate material requests correctly.
char testdata[4 * (sizeof(dataChunk) + 10) + sizeof(globalDataStorage)] = { 0 }; CU_ASSERT_EQUAL_FATAL( brp_malloc_init_1(testdata, 4 * (sizeof(dataChunk) + 10) + sizeof(globalDataStorage), 0), 0); char *ptr = NULL; char *ptr_2 = NULL; char *ptr_last = NULL; int index = 0; int number = 4; for (i...
1
a0737b38ff42c643de0a06f6dc6d58a0
53d116a955e75a2051a50dc4c30f1734
Returns the value of the global variable DI_f_3.
@Entity @Table(name = "PP_METT") @NamedQuery(name = "PpMett.findAll", query = "SELECT p FROM PpMett p") public class PpMett implements Serializable public String getVarfis3() { return this.varfis3; }
0
725c2ea9cff89e6c5bf6bced50667e9e
0a4290c9ec570c6a47eac8155a5d74c9
获取指定用户且大于等于指定成绩按照创建时间排序获取指定范围的用户考试信息
public List<ExamHistory> getUserExamHistByUserId(@Param("userId") int userId, @Param("array") int[] typeIdList, @Param("page") Page<ExamHistory> page);
0
14a6702d4ca7afea3d971f4e225b5256
7d1b61fbfa2f817ec183221dbc3694df
从文件读取客户航班信息
namespace Control public class CustomerController public void GetCustomersFromFile(string path) { engine = new FileHelperEngine<MappingCustomer>(); records = engine.ReadFileAsList(path); }
0
2e86c49467eb696874f1b0cfb7d80fda
d34f76f0d7d89b82d1cb41fb9f2573e1
Process UART output via DMA
{ NVIC_InitTypeDef NVIC_InitStructure; RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2, ENABLE); DMA_InitStructureShare.DMA_PeripheralBaseAddr = (uint32_t)&UART_TYPE->DR; DMA_InitStructureShare.DMA_Memory0BaseAddr = (uint32_t)dmaBuffer; DMA_InitStructureShare.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructu...
1
c80e4196855de350f71c3f662c520f69
d869cbd5452d084e9488b9a92eeb428f
表单置为可编辑
editTemplateHandle (form) { form.component.disabled = true }
0
8e64c2286b78665e6c8a94262c53ad72
d9cb90b40c3f4321d5b87eeab21149d7
This function is used to scale the pixel values of images to the interval [0,1]
def scale01(img): return (img - np.min(img))/(np.max(img) - np.min(img))
1
59adbfda30629ff0d2f10b968dbb5321
b78b7da68bdcf299971097202a3f7b13
Returns tasks in initialize phase.
static int task_init(void) { iterate(&init_task); return 0; }
0
4129f1891f63c93283b62cce5789087b
e44e7b807dbb5168c8f9e58bf965de0b
Returns the length of this Vector.
public class F256Vector public int getLength() { return len; }
1
6955d8f403a21513b5c44851e703d6b4
cad477ae4b0e19cdf682ccad39711196
Sets the city of this ResponseGeocodingProperties.
void setCity(String value);
1
b6a55b3b168e7aa30c9c0afa95685bb7
76deeb84d23e9cf12f6011786f3dd22d
Gets ith "display-name" element
public class ElementsMessageActivity public TextView getNameTextView(int index){ nameTextView = (TextView) solo.getView("name", index); return nameTextView; }
0
c8979be326c2331d9276d930dedbea66
96a98c7cffa51faecddc73bff6fc116f
Maps a point in window coordinates to frame coordinates.
Rectangle rect = mapCoords.intersection(mapRect); float x = (p.x - rect.x + hscrollValue * hscrollFactor) / zoomFactor; float y = (p.y - rect.y + hscrollValue * hscrollFactor) / zoomFactor; return new Point((int)x, (int)y); }
1
64a47fe7b9ad90c22c64b57ad2205489
c7ed21e2bd780f760885c52258abfdee
Returns stripped class name. Keyword Arguments: name - name being converted.
name=name.strip() result="" if not len(name)>0: return result result+=name.replace('OBJECT_TYPE_','').title().replace('_','') result=U.unCapitalize(result); return result
1
8b2fcfba59ab6376b0999cf700531459
fb8dd8b8d21b3c7b8f6f976a568242cd
Turn Autoseek ON or OFF Autoseek is used by the unobtrusive Upload/Download methods to automatically find the resume position.
public function SetAutoSave($AutoSave);
0
530039eaea9e238350f7a3175a9c175b
2cd4af338b9567325008a925111a791a
This overriden method is responsible for responding to the mouse pointer hovering over the enabled components of the GUI, which are the 8 random mystery pieces for the players to pick.
public void mouseClicked(MouseEvent e) { if (rollOverPic != null) { if (isSelectionValid(currPieceSelected, i, j)) { bBoard[i][j].setIcon( new ImageIcon(rollOverPic.getScaledInstance(110, 110, java.awt.Image.SCALE_SMOOTH))); if (currPieceSelected.equals("HFox")) { bBoard[i][j - 1].setI...
0
16901b46d6fa0a55c578d46f402862ef
84f743fbd9ef4d72c500662dfc702f12
given the upper line and the cinfo, calculate the vertical difference of upper boundary w.r.t. the vertical center, with respect to the width of the current char.
{ int y; int dif; int al; if (s->ap >= 256) return s->yu; y = s->yl >> 6; dif = s->yu - y; al = s->ap >> 2; if (dif > 0) y += (dif*al) >> 6; else if (dif < 0) y += (dif*al + 0x3F) >> 6; return y; }
0
95c3baaa99d80dffbd75b48e76f9ff8e
62d62ff6b5f241dc3d5d05bb58c4e179
Get text from the README.rst
def getreadme(): with open('README.rst', encoding='UTF-8') as readme_file: return readme_file.read()
1
aa939a692caf5a70237d6cc09a7faa16
b67853f4c111b942dcd0f2ecb9eb8c8f
Sum all corresponding elements
class Array def sum self.inject(:+) end
0
bd6a1ef1bb8565c369306e3260dbba82
84c98348a3c168516096d3a482eb6fe0
Sets the SelectedItem property.
namespace Framework.UI.Controls public static class TreeViewAttached private static void SetSelectedItems(DependencyObject dependencyObject, IList value) { dependencyObject.SetValue(SelectedItemsPropertyKey, value); }
0
f7b2e81cda5a6cfcc8c97011b602d689
08ebd2d498b4e135295e0182cb8ea251
生成基于Cox-Ingersoll-Ross(1985)平方根扩散模型生成数据
from numpy.random import randn R = np.sqrt(dt)*np.random.randn(M,Nt+1) R[:,0] = 0 X = np.cumsum(R,axis=1) Xm = np.mean(X,axis=0) Xv = np.var(X,axis=0) return X,Xm,Xv
0
016ee9bdd9f5ebf3e333424353e07e9b
472849509874b8327993890a69dc6c18
Returns the number of neighbors per node.
class SymmetricGraphVectorSpace(GraphVectorSpace.GraphVectorSpace): def get_n(self): pass
0
35adc165d5e84bf879d53bf7adacd000
7f48f6f3ee5e65b6de8fc52040b333c3
\fn OnStart \brief Sets up what event to listen to for level/scene switching.
public class DisableOnNewScene : MonoBehaviour void Start () { EventManager.StartListening ("PassToPlatformScene", disableItself); EventManager.StartListening ("GameOverScreen", disableItself); }
1
63e21424ec00fb5e0d832278a2851703
65bcc57465fe7f904e04fe236aa2a511
Sets the Pause button to normal. It can be clicked again.
{ PauseButton.enabled = true; PauseButton.gameObject.SetActive(true); gameObject.SetActive(false); enabled = false; Time.timeScale = 1; }
1
aef40220e4e21023f679bfa51910b0ca
4742ae94bdea6375ada84e65d0cc0b19
设置产品数量功能
class Detail setNum() { var $numNode = $("#num"); var $lessNode = $("#less"); var $moreNode = $("#more"); $moreNode.on('click', (e) => { var num = parseInt($numNode.val()); $numNode.val(++num); ...
1
436c5bc6a733b844ef101240d6b836a2
07338bde326111bd139b6fc7dc6dd306
validates that the value points to an executable file
namespace Xamarin.Android.Prepare abstract class OS : AppObject protected abstract string AssertIsExecutable (string fullPath);
1
49af7bf5f5105f7bcc7a59596cad0317
10320f7eace35410fef5fae60e86ce6f
calculates distance to target
dx = self.x - target.x dy = self.y - target.y dsquared = dx*dx + dy*dy result = dsquared**0.5 return result
1
8dce00b90cf58454dd4c015fe6b0949e
e78215ed62f740960c3f9c5b59430e96
Zet de duur van het filmpje. Deze komt binnen in een specifiek formaat, maar wordt hier omgevormd naar seconden.
class Movie(Media): def __len__(self): return round(self.movie_length / 1000 / 60)
0
64a064103ad5e16037c9dc3782c8844a
059d7a12a102891fd6d86224fc51cfab
A string that is not printed in tracebacks
class Maybe(object): def get_traceback(self): return self.trace
0
f981d97274c537666b56e0c9444e78f6
9f97e4a8da99b0652547891fe25f4cd6
Has to be called by all static methods to ensure the table exists. Creates the table with the provided column-settings of the child-class
verifyWritable(); boolean created = false; DataColumnConstraintsDao dao = getDataColumnConstraintsDao(); try { if (!dao.isTableExists()) { created = geoPackage.getTableCreator() .createDataColumnConstraints() > 0; if (created) { getOrCreate(); } } } catch (SQLException e) { thr...
1
71e0859041b33299d02dd52cf47b1bab
5eaae09d31b8bae3e6dc384117178569
查询项目下每个版本下是否有Bug信息
public List queryVersoinByProjectId(Long projectId) throws DBException;
0
2ebc9886558b79ae13bd208c5519a4c3
5529a341a4b42772e6ec978ed49657d6
Check if [`Sig`]nal is present in [`SigSet`]
impl<T: Component> SparseSet<T> pub fn contains(&self, entity: EntityId) -> bool { self.index_of(entity).is_some() }
0
dd98916151a21f5f15ba940ab1ef9589
c92dcd25db8131bcd2328a5a7e048305
========================================================== = Python Interfaces (Abstract method) = ==========================================================
class Base(object): def __call__(self, *arg, **kw): raise AbstractMethodException
1
6a4d5836f65c86c2f54e5904fce53991
b54cc78688cc17e9baecfc3912c84ecc
Custom value object for opening times without seconds.
unsigned int secs, bool am_val): hours{hrs}, minutes{mins}, seconds{secs}, am{am_val}{ }
0
738e320b8b755412a1e98c153cec403d
48565bdca16c3509c31d25f224c4d5f5
Pytest fixture for exporting the :class:`~backend.python_interface.AltInterface` instance. Context manager is responsible for both setup and teardown (thanks to ``yield`` keyword).
temp_loc = pathlib.Path(temp_loc).resolve() temp_loc.mkdir(exist_ok=exist_ok) prev_loc = self.loc self.loc = temp_loc yield self self.loc = prev_loc
1
67ff73776bf03b7065afc77148e00d70
5f8ea3d097c1e0158eb7aa234b8c4d0b
更新剩余输入字数
var length=document.getElementById("talk").value.length; var number=parseInt(50-length); var span=document.getElementById("wordNumber"); span.innerHTML=number+"/50"; if(number<=0){ document.getElementById("talk").value=document.getElementById("talk").value.substring(0,100); } }
1
9c84d330da7e205d14ac99e3b7904f07
ee09f66a3144e899fb2d78afd0dddfb2
Присоединение второстепенных трип_транспортов к основному
class TripTransport extends \yii\db\ActiveRecord public function joinTripTransports($aSecondTripTransports) { $aSecondOrders = Order::find() ->where(['IN', 'fact_trip_transport_id', ArrayHelper::map($aSecondTripTransports, 'id', 'id')]) ->all(); if(count($aSecondOrders) > 0) { Order::resetOrders(ArrayHelpe...
0
c13beafaef90032b37778a0fd3d1ac2d
adc5a39491a4a24933d57b2339b584e3
根据筛选条件获取数据记录集合:含分页排序(多个排序字段:字符串)
namespace JX.Application IList<T> GetListBySortColumn(int startRowIndexId, int maxNumberRows, string Sorts, string Filter, out int Total);
1
b413d56576892ed433d5595143a04279
1678fe6fc83c58e6784ba1d53541ff93
Create code of start and end line of method header.
class CodeGen_PECL_Element_Method extends CodeGen_PECL_Element_Function function methodEntry() { $code = ""; $arginfo = (count($this->params)>1) ? ($this->getFullName()."_args") : "NULL"; if ($this->isAbstract || $this->isInterface) { $code.= "ZEND_FENTRY({$this->name}, NULL,...
1
d0eb1c8a71ac76885caaac6bc01ed342
2218bef67926a4d1c809a7acdf30e3b9
function to split a row into seperate words by space and comma
unsigned long curr = 0; unsigned long i = curr; vector<string> result; while(curr < line.size()) { while(line[curr] != ',' && curr < line.size()) ++curr; result.push_back(line.substr(i, curr - i)); ++curr; i = curr; } return result; }
0
17eb2b77ad33bfca6645a764292666df
f5233ea566f72c76e24f48e14690ddc1
Связь с производителем
{ return $this->hasOne(Manufacture::className(), ['id' => 'manufacture_id'])->viaTable('tbl_catman', ['id' => 'catman_id']); }
1
79cc1ea7e4b4803b49ea66e23c15005a
b7a412a159d37f6ce93d8e412ad98108
Remove hop-by-hop headers from a header dictionary.
hop_by_hop = ('connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade') for k in hop_by_hop: del headers[k] if 'Accept-Encoding' in headers: ae = headers['Accept-Encoding'] filtered_encodings = [...
1
69b065956da488f458a33c3e9e708beb
14aeb2cd579b40289fd6404ad2d40f4c
Method to download a CV
class DownloadController extends AbstractPageController public function downloadCvAction() { $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $fileName = $this->getRequest()->getParams()['file']; $fileLoc = 'var/cv_uploads/'; $fullPa...
1
df66f786e6a69f014c59bbb45e0e6b6e
fb8b5ae04637c70249a189a0f90a0fa1
check, whether BPEL project wsdl-operation is in ESB service
public class SoapUtil public static boolean checkWSWorkingByName(String serviceName) { boolean flag = true; if (serviceName != null) { String working = getSOAPVarvalue(serviceName + Constants.SUFFIX_WORKING); if (working != null) { flag = Constants.WORKING.equalsIgnoreCase(working); } } retur...
0
f051e2894c62394c19d9785c850fa611
d03c4b48c8b73cbc5a741912d9a8e556
Test that the variable names are automatically deduced from the first available stream.
r_data = { "IndexedRepos": ["http://acme.com/{SUBDIR}"], "webservice_entry_point": "http://acme.com/eggs/{PLATFORM}/" } s = textwrap.dedent("""\ IndexedRepos = [ "http://acme.com/{SUBDIR}", ] webservice_entry_point = "http://acme.com/eg...
0
cd23f4c47231a68bf9824fe84cfb8a49
050941e1ed3d50267343e88d3de23683
Checks if copy action is available.
{ IInstancingContext instancingContext = m_contextRegistry.GetActiveContext<IInstancingContext>(); return instancingContext != null && instancingContext.CanCopy(); }
1
3299afaebf4eaf4e4b97900e7e8f1f59
00b54347bd14398e6b91faef0921cfc6
fonction permettant la mise à jour des paramètres généraux de la homePage
{ $parametre = Parametre::where('user_id', Auth::user()->id)->first(); return view('auth.parametre.interface', ['user' => Auth::user(), 'parametre'=>$parametre]); }
0
58eac2735aabbdbbfb49b08d40ef4437
23d39a86798ab789d112797f7314b59c
<p> Creates a launch configuration. </p> <p> If you exceed your maximum limit of launch configurations, the call fails. To query this limit, call the <a>DescribeAccountLimits</a> API. For information about updating this limit, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-quotas.ht...
namespace Amazon.Drs CreateLaunchConfigurationTemplateResponse CreateLaunchConfigurationTemplate(CreateLaunchConfigurationTemplateRequest request);
1
503312a2f957fab35f2bac2c3cf979ff
7d859fb3a1947b0c142b26315cfc1c1a
Gets the number of active group messages
if ( ! bp_is_active( 'activity' ) ) { return 0; } global $bp,$wpdb; $total_updates = $wpdb->get_var( "SELECT COUNT(*) FROM {$bp->activity->table_name} WHERE component = 'groups' AND item_id = '$group_id' "); return $total_updates; }
1
e0220ed56ec12de7ff0df5108731bd2e
4a9a7e204eea9f7cabf4e51990f14417
Insert into front of list
void List::enqueue_front(int input) { Node* new_node = new Node(input); Node* next_node; if(head == nullptr) { head = new_node; tail = new_node; } else { next_node = head; new_node->p_next = next_node; next_node->p_prev = new_node; head = new_n...
1
6d2f2bb0b08de0f9635d80c66f9ae682
159ae8f864ab05028c7afb8b689523ac
Clears the internal map of vports to test port locations
void stats_vport_clear(unsigned vportid) { int i; for (i = 0; i < RTE_MAX_LCORE; i++) { struct vport_lcore_statistics *s = &vport_stats[vportid]->stats[i]; s->rx = 0; s->rx_drop = 0; s->tx = 0; s->tx_drop = 0; s->overrun = 0; } }
0
0f21294ffa1abb1f5b14f01ac5144c73
beb6db3e34725b448275ba94c2f37016
Creates a division combinator.
{ return function ($x) use ($y) { $divideBy = static::divide($x); return $divideBy($y); }; }
1
71eba3fbccba5800241dcb62ba42c2ac
aa29741fa271e250617e3456ea382aac
Represents the leading icon color for a menu item, depending on its [enabled] state.
{ if (IsMidPoint) return IsSelected ? Color.DeepPink : Color.Orange; return IsSelected ? Color.Red : Color.White; }
0
b1070aebae40efd98b8432fad109695f
392190616854877934f2830e6feca9d8
Initializes necessary drivers for the AVR, some drivers are already set in the TinyTimber kernel
{ system_init(); tinygl_init (500); pacer_init (500); navswitch_init (); ir_uart_init(); button_init(); }
1
ef003c1f0e42af45956e195433d9d8d9
8d72e17e15c80a09dbf9645393c72e99
Obtiene una matriz con la activacion de cada capa.
int size = 0; for (final FeedforwardLayer layer : network.getLayers()) { if (layer.hasMatrix()) { size += layer.getMatrixSize(); } } final Double result[] = new Double[size]; int index = 0; for (final FeedforwardLayer layer : network.getLayers()) { if (layer.getNext() != null) { final Doubl...
0
d49db43c1eecee9502e5c2d0b18fb6e4
54fe1838aaeb448dbe3e6eb49d6917c7
Returns a new object of class '<em>Hospital Admission Medications Section Entries Optional</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
ImmunizationsSectionEntriesOptional createImmunizationsSectionEntriesOptional();
0
c249d0974e1015ed7fd7a4e0e425093d
5dc33f67dc1b2f41bb820dde2f5ea4d6
'a'-'z'
impl Ascii pub fn is_alphabetic(&self) -> bool { (self.chr >= 0x41 && self.chr <= 0x5A) || (self.chr >= 0x61 && self.chr <= 0x7A) }
1
c4b4638f985bbed0098ab5f54d2ca6e8
fa001c6cdb8a9773a3273967648714e8
Returns orders which have not been processed.
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE transaction_processed = 0"); if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) return $result->fetch_all(MYSQLI_ASSOC); return $this->sqlError('E0050'); }
1
8f768faa305922ec09c469d82783057b
36e4e56598d02d146488cb1232d59853
Callback function for mouse selection. This is the callback function used by the method queryAABB to select a physics body at the current mouse location.
public boolean onPick(double[] intersectPoint);
1
a363484e2c3595f4744d6a052a26f42b
f813d00fc0a5e5e6873f378eadb5ba32
删除所有融资项目及其相关的信息
try{ List<GlBankGuaranteemoney> list = glBankGuaranteemoneyDao.getbyprojId(projectId); if(list!=null&&list.size()!=0){ for(GlBankGuaranteemoney glBankGuaranteemoney:list){ glBankGuaranteemoneyDao.remove(glBankGuaranteemoney); } } List<GlAccountRecord> listRecord = glAccountRecordDao.getbyproj...
1
5f2be00069ae13fb538db411222cbce3
e31ea1a641c5833b26eebea23d1b43c5
获取x轴敌人数量
public class command : MonoBehaviour public int GetEnemyCount() { return enemy.transform.childCount; }
0
fd3d3b6ec3c2faccc687c68668dd4250
68db59adaad8a2f87e70a010dd1e5c23
getMarca Método que obtiene la marca del objeto Reactivo
public Marca getMarca() { Long __key = this.marcaId; if (marca__resolvedKey == null || !marca__resolvedKey.equals(__key)) { final DaoSession daoSession = this.daoSession; if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); ...
1
76e23463f52b26ee6578457654a27923
4ada235562f7b0391e196776877f6466
Clear highlighted text in all pages that make up the current document
while (node = document.body.querySelector(HIGHLIGHT_TAG + '.' + HIGHLIGHT_CLASS)) { node.outerHTML = node.innerHTML; } while (node = document.body.querySelector(HIGHLIGHT_TAG + '.' + SELECTED_CLASS)) { node.outerHTML = node.innerHTML; } }
1
e2c54f5e0b4c31a393dd4b030f4ae724
7f244e17fa1bdcaa8474c401670ea35b
GetCertPool gets a cert pool for the given CA or CAFile.
bytes, err := ioutil.ReadFile(certFile) if err != nil { return nil, errors.WithStack(err) } cert, err := ParseFromPEM(bytes) if err != nil { return nil, errors.WithStack(err) } return cert, nil }
0
d1fd5d7fa17daa40884363d7fe4147e5
705c33e5bace859b1da0c44f3e517027
@brief Sets signal handler for SIGINT and SIGTERM
struct sigaction sa = { .sa_handler = ctrl_c_handler, }; sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); }
1
212742079d9b1bf5b0f7a1c060443bb1
5bc54e43abed4ccc24ad9044aa9ac319
(根据初始阵营)选择初始卡组
class TTAResourceManager : ResourceManager() fun getStartDeck(config: TTAConfig, player: TTAPlayer): List<TTACard> { return config.versions.map(this::getGroup).map { it.startCards[player.position] }.map { BgUtils.cloneList(it) }.fold(emptyList(), this::replaceAddCards) }
1
6900468fe24ca0f1b0ee13e003ad679a
df86a2e506f6c514c15f82af77e662ce
Verifica se o caracter do texto está presente no padrão
public class Fonetica protected Boolean IsPronome(String pTexto) { ConexaoMySql cn = new ConexaoMySql(); Boolean retorno=false; String strSQL = "select cleasing_pronome from cleasing_pronome"; try{ ResultSet rs = cn.retornarResultSet(strSQL); while(rs.next()){...
0
796425792dafae04f63662c8163b39c7
e3bf0cf252ce9095a4f096bfa334e094
Helper routine to form the IDS SL900A AccessFifo Read command
buffer = bytearray(26 + len(cmd)) self.handSingle[0:4] = buffer[0:4] tmp = struct.pack('>i',(len(buffer)-8)) buffer[4:8] = tmp buffer[11] = 0x02 buffer[16] = self.ICF buffer[17] = self.RSV buffer[18] = self.GCT buffer[19] = self.DNA buffer[...
1
dec858a79715018d56441b24d387c21b
27a66195efa90469e710c09b58e3f107
根据景点ID,网站名,页面编号,页面大小获取该景点在驴妈妈网站上的评论并分页显示
class Ctrip: #Ctrip类初始化 def getCommentInfoResponse(self, PageIndex): url = "http://m.ctrip.com/restapi/soa2/13444/json/GetCommentListAndHotTagList" data = {"CommentResultInfoEntity": {"BusinessId": self.sight_id, "BusinessType": 11, "PoiI...
0
9621149b61c3b789fccf9194e617fa48
cbd43d1c600255fac3647eba5422e1ca
Gets ORCs in the selection, if any.
public IOr getOr();
0
2468604e11584b078a3f2669ba1a8c5e
0c1f45118b5293e0b4ba144bb3a0fd8a
The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".
public class Condition extends AbstractModel{ public void setAlarmNotifyPeriod(Long AlarmNotifyPeriod) { this.AlarmNotifyPeriod = AlarmNotifyPeriod; }
0
594c880176f858efa4ec6d80b77e628f
4113b761e6f02c3d56187ded46f6c045
显示为列表样式
public class MediaPickerFragment extends HiddenBasePickerFragment @Override public void showGridMode() { getGridView().setVisibility(View.VISIBLE); getListView().setVisibility(View.GONE); mAdapter = new MediaGridAdapter(getActivity(), objs, mAction); getGridView().setAdapter(mAdapter); ...
0
58277de02322665faf18a60d08d63c25
b06c48af10b8123a3222d49df910692c
e.g. 24-Jan-2018
str = strings.Split(str, "T")[0] if strings.Index(str, "--") == 0 { switch strings.Count(str, "-") { case 2: return "--0102", nil case 3: return "--01-02", nil } } else if strings.Contains(str, "W") { return "", NewParseError(str, "Cannot parse week numbers") } else if s, _ := strconv.Atoi(str); s...
0
550008ca99f6a48ffc5db69d51a3ea1d
a07999599c3a3c39941e7c3945da9ad7
clean doubly linked list
void clean(list *l) { node *tmp = NULL; while (l->head->next) { tmp = l->head; l->head = l->head->next; free(tmp); } free(l->head); }
0
adb8337c297bde5953265ffee26ec14c
24540f7e34e735d81bdf8b0adae777ab
Sets the link type of an adapter the "link type" determines how the driver will encode the packets captured from the network. Aircap supports two link types: - \ref AIRPCAP_LT_802_11, to capture 802.11 frames (including control frames) without any power information. Look at the "Capture_no_radio" example application i...
static void ip_arp_intf_lower_layer_type_set (IpT_Interface_Info* intf_ptr, OpT_Int64 lower_layer_address) { FIN (ip_arp_intf_lower_layer_type_set (intf_ptr, lower_layer_address)); if ((intf_ptr != OPC_NIL) && (intf_ptr->phys_intf_info_ptr != OPC_NIL)) intf_ptr->phys_intf_info_ptr->lower_layer_addr = lower_layer_a...
0
b7d8f9f5441ed564c5f9ae1c68be933f
3cb8ccc20c7cdf446b9068cf1dec6408
Returns a boost of the search result.
namespace MongoDB.Labs.Search public sealed class ScoreDefinitionBuilder<TDocument> public ScoreDefinition<TDocument> Boost(double value) { return new BoostValueScoreDefinition<TDocument>(value); }
1
eaba824803b29582a5e059337c5497ad
7a834e04c614bba20f1a586f26d8b1b1
Invocata dal dialog API key, quando viene inserita una nuova key valida.
var devkey = document.getElementById("devkey").value; if (devkey.length > 0) { try { var localSettings = Windows.Storage.ApplicationData.current.localSettings; localSettings.values["devkey"] = devkey; } catch (err) { } ...
1
b05a502f944665b17d283c9a1fd58ec2
9fffcd143474cc62451376698a3b1546
Get the messenger RNA features
bondEnergyMatrixRNARNA = np.array([[-3.9, 2, -3.5, -6.82, -2.3, 6, -11.4, -0.3, -3.1, -10.48, -3.5, -3.21, -9.38, 4.6, -8.81, -1.7], [-9.1, -5.6, -5.6, -10.44, -5.7, -3.4, -13.39, -2.7, -8.2, -10.64, -9.2, -5.61, -10.48, -5.3, -12.11, -8.6], ...
0
948e9971ca19ab458df8d31494db3508
37dbccde8919e82c6d637267e8fd07a5
Start the server and wait for completion using the unthreaded listener. Useful for tracking down locking and synchronization bugs.
namespace Engine.Network public sealed class AsyncServer : MarshalByRefObject, IDisposable [SecurityCritical] public void Start(int serverPort, int p2pServicePort, bool usingIPv6) { ThrowIfDisposed(); if (isServerRunning) return; if (!Connection.TcpPortIsAvailable(serverPort)...
0
2a651740a332ddd4f1d530e060a4382b
caf04be627778d2cb8a9ebb5623f2e40
Returns the current object as string. If value is null or DBNull, returns String.Empty.
public override string? ToString() { if (_value is null) { return "<None>"; } return !HasValue ? "<None>" : _value.ToString(); }
0
e9d92694cb72276a8ddc48426bd7b125
6e575bb09e6a1f25de3736dd762cb368
生成图书快捷搜索按钮
namespace FineAdmin.Web public static class MyExtHtmlLabel public static HtmlString SearchBtnHtml(this HtmlHelper helper, string title = "搜索", string _class = "") { return new HtmlString(string.Format(@"<button class='layui-btn {1}' lay-submit='' lay-filter='search'> ...
1
b341db7d740e8d4e9ec31a25eb997b4f
77e7e55bfdb87d602f4b9fd8fdb41acf
Returns a new object of class '<em>Column Text Object</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
ColumnTextObject createColumnTextObject();
1
f59b5fd0ddeb5be2ac996dc2b5cba7aa
89856690a851eea5993bf529086fb82d
Load the Monaco editor object.
export default class Monaco constructor( protected verbosity: Verbosity = 0, protected groupName: string | null = null, protected colors?: ColorConfig ) {}
0
b22053c68789e013c70568032b90e1d3
6f8448720a6a660da38203551ea85f89
Save a query string to SharedPreferences
public class MainActivity extends BaseActivity implements MainView @Override public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putString(SAVED_QUERY, mQuery); super.onSaveInstanceState(savedInstanceState); }
0
abe1e52bbe87446b5decdf4f8d07594a
d5716ab15b792e9f34fb2944d6ce0612
Encode the commands to a DisMod database so they can be passed to the command line.
def get_send_cmds_m(cmds): cmds_len = reduce(lambda a, b: len(a) + len(b), cmds) return b':M' + pack('>i', cmds_len) + reduce(lambda a, b: a + b, cmds)
1
b79d12669b6f8350c3c795c9581b9fad
7f798bb7382de4c6bda2810411407734
Takes stamp of some PDF document page, and writes page numbers in format " current / total " on this page.
A = "A=" + pdf_path B = "B=" + pdf_to_insert_path output_temp = tempfile.mktemp(suffix=".pdf") if page_number == 1: upper_bound = "A" + str(page_number + 1) + "-end" args = [PDFTK_PATH, A, B, "cat", "B", upper_bound, "output", output_temp] elif page_numb...
0
c9e58c51f810eeacc3fda4045b77893b
36c8838b6b2e51a4635ed025c40683e5
Saves a new NII file after processing
def ni_save(f_path, ni_data, ni_affine): import nibabel nimg = nibabel.Nifti1Image(ni_data, ni_affine) nibabel.save(nimg, f_path)
1
d60e91a59cd821ec6cb252e2a92ec20f
b20274205d85b29c80bbc892a024da68
| Purge database ready for new information | | NB Only used for storeall |
INT _reentrant DBClean(INT MediaIndex) { INT RetCode = DB_ERROR_NONE; if (MediaIndex >= DB_MAX_DATABASE_STORES) { return(DB_ERROR_MEDIA); } SetDatabaseFileNames(MediaIndex); Fremove(ststore_dat); if (Fremove(ststore_dat) != FILE_NOT_FOUND) { RetCode = DB_ERROR_CRITICAL; ...
1
4a84a7acbb4ca6160f055a19ed368be0
74a2e83847eaebcb729eb25e1443c6ea
Метод, порождающий таблицы (если их не было в схеме) по конфигурации.
for table in self.TABLES: try: params = ', '.join([f"{key} {value[0]}" for key, value in table.FIELDS.items()]) sql = f"CREATE TABLE {table.TABLE_NAME} ({params})" self.cursor.execute(sql) except sqlite3.OperationalError: pa...
1
93b4824799a7e38f40d8db64a6ff21f2
18224e7d74263cb53c0997ec4510b207
Возвращает дату завершения теста
class Passage public function getTimeFinish() { return $this->timeData['date_finish']; }
1
3ad808e316b01c184554a4fad4c60909
3d02c6cf01f4629f6706671186feb9ff
Convert the entire paragraph with correct grammar as specified in the grammar file
let modifiedTranscript; switch(speechRecognition.lang) { case 'en-US': case 'en-GB': modifiedTranscript = replaceEnglishWordWithEmoji(transcript) break; case 'de-DE': modifiedTranscript = replaceGermanWordWithEmoji(transcript) break; ...
0
00ec4cb71d6f83d6c3adb0d7593a261a
afb61ba1fc6393cbebe30af412d6f745
Alloc の項目を有効にするかどうかを指定します.
internal abstract bool IsAllocated(int pageIndex);
0
eb6e0ba74d67ea128f9e340850f70b1a
770618befbfb9158f9e2b3be2569e378
This is a convenience method that allows direct modification of the value of the record's vUserRoleSummary_.PwdExp field.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Subject", propOrder = { "readOnly", "expirationTime", "resultCode", "saml", "samlType", "daysToPwdExp", "domainId", "ssoToken", "groups", "roles", "userId", "principal", "principals" }) public clas...
0
01b1f44f871af4a59683534e94e09e31
96c593b15fdf942f16c42a1f1f4917f9
Returns a list of scan names (not full paths) of available preprocessed MOVIE task scan resources.
dir_list = glob.glob( self.subject_resources_dir_fullpath(subject_info) + '/*' + self.FUNCTIONAL_SCAN_MARKER + '*' + self.FIX_PROCESSED_SUFFIX) return_dir_list = [] for path in dir_list: tokens = self._get_scan_name_from_path(path).split('_') if le...
0
04026f987a778512ea80bf5cf6550d9c
fab9ba10acb12d875298c19e97b66ee4
@brief Get NEG Totalize value.
public BigDecimal getVTA_SLT_N();
0
97be061682f49fec251f4c8e644f8005
ef823bb7d35f7bf20677ef884b9dca2f
Extension function to delete the named destination by parsing the embedded type prefix.
Task<HttpResponseMessage> DropTypeAsync(string typeName, CancellationToken cancellationToken = default);
0
2d84a8817a2c1a5f33e33750afdde58f
42e339e7c42763136d874bb314945bfc
Converts an array of bytes to an array of ushort
namespace IndustrialNetwork.Modbus.DataType public class DWord public static UInt32[] ToArray(byte[] bytes) { UInt32[] values = new UInt32[bytes.Length / 4]; int counter = 0; for (int cnt = 0; cnt < bytes.Length / 4; cnt++) values[cnt] = FromByteArray(new ...
0