query_id
string
corpus_id
string
query
string
code
string
label
int64
2b6cbb809112b7e8768c3162ada6c181
84d6b5d0f4d86a0b6b95111806a1846f
Retorna o número de puzzles.
public final class ReferenceConstants static int getPuzzleSize() { return PUZZLE_SIZE; }
0
537f5431090b2519fa5d7627b6e49fd6
6ac9d60a9788cc1b9d93507fb630684a
! \brief Prepare session layer communication \details Checks the following preconditions before setting up the session task:
{ tMcmpMemResult result; result = kMcmpMemResult_Failed; # if defined( MCMP_MEM_MODE_DYNAMIC ) if (kMcmpMemMode_Master == g_Mode) # endif { # if defined( MCMP_MEM_ENABLE_EXCHANGE_BUFFER_SIZE ) if ( (kMcmpMemResult_Ok == g_SizeExchanged) ...
1
b8616e653d0f72b05fdb2915b31a6cf4
8b30b039eb246a20808bb2f009f6df52
Return 204 status code - staff user can delete other user account.
class AccountsTestCase(LiveServerTestCase): def test_super_delete_other(self): self.get_login('a@a.com', 'p') response = self.delete_detail(self.user_two.id) self.assertEqual(response.status_code, 204)
1
a189f90099f9142a617c208c2eb71b57
ff15b90e41a69997dae20743c0d7cfb8
组合框关闭,数据源恢复
namespace CvnMrp.Archive.WinForm public partial class Frm_B_StyleidInfo : ArchivesTemplate private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e) { this.Parm_dtSource.Rows.Clear(); this.tvMain.Nodes.Clear(); LoadData(); }
0
7d4a1d94bf58460e575a3c47f3886d47
8f3a1419b00358275d5d751e5460fe01
This function should compress paths and works as described in lecture. Returns the index of the root of the up-tree in which the parameter element resides.
if(parentID[get_x_coord(idx, w)][get_y_coord(idx, w)] == -1) return idx; return up_trees_find(parentID, w, parentID[get_x_coord(idx, w)][get_y_coord(idx, w)]); }
1
164cecb61c54e4b6c99bfa7a0419f130
0e05199432605204244e0b10ffbfd0bf
users can see the entity if they have the required permission on the specific entity instance
$uniqidEntity = $entity ? $entity : $request->header('entity'); if (!$uniqidEntity) { return false; } $entity = static::getEntityFirst($uniqidEntity, true); if ($entity && $entity->count() > 0) { $entityUser = EntityPerson::findIdPerson($idUser) ...
1
c945e8d21ef10b52b390bd4f44cb7a94
cab9ef762657c95fb8d30fa767106b37
跳转到定区关联客户的页面
@RequestMapping("stat") @Controller public class StatController @RequestMapping("toCustomerAreaStat") public String toCustomerAreaStat(){ return "stat/customerAreaStat"; }
1
b14218e7432c61c2f4dd82c1050e2420
23996b69ffa3009f91df8f9574d0c8e0
Gets choose file script. Used for updating filename in from based on filepicker.
view = self.getView() root = self.getRootPath() selectedSiteName = self.getSelectedSiteName() return root + selectedSiteName + self.PATH_JS + fileName
0
66326b96fc1cb5f185e1a26e02fc3751
912cc5f16dd6e4416cf29878ca99a3b9
increase the length of this vector
namespace variant9123 void numbers_array::IncrementLen() { len++; }
1
0ce8ac074bf3ed3c2a627ac8a1c5544f
51fcf98865e3a88c4ce2315112c3adbf
Cleans up after a print operation by unregistering for events and re-enabling buttons.
namespace System.Windows.Controls [TemplatePart(Name = "PART_ContentHost", Type = typeof(Decorator))] [TemplatePart(Name = "PART_FindToolBarHost", Type = typeof(Decorator))] [ContentProperty("Document")] public class FlowDocumentReader : Control, IAddChild, IJournalState protected virtual void OnPrintCo...
0
e591729c5a2d519d81d849ed7a3c1366
890848fa835ea17eff1e4078cf3dd059
Test that two points are close to each other. (l^\infty norm)
def are_close(m, n): return abs(m - n) < EPSILON
0
9f32fb5b6953223cea4cc29d314c6fee
774bd302b4697b0bad6373d4cfda0cd9
@brief Handles timeout operations from ATTC/ATTS for upper layer.
if (OT_SM_EVENT_FLASH_DETECTED == event) { ++ot_sm_data.burst_count; if ((ot_sm_data.bursts_to_ignore < OT_SM_MAX_BURSTS_TO_IGNORE) && (ot_sm_data.burst_count > ot_sm_data.bursts_to_ignore)) { ot_sm_set_state(OT_SM_STATE_CONFIRMED); } else { ot_sm_data.state_timeout_ms = ot_sm_data...
1
89c254e729982dcd5528b7b91e0d9e1d
4ca99df3ec53c1157c40774103fac8e5
Gets refund_reason
class Refund extends Base public function getDescription() { return $this->_description; }
0
e874d1284ad16824f3ed2fe8bef97f79
e7b5abdbe1cc85d9551b2d6e95c24081
理解帮助:前端传一个生鲜食品(id=1)(一级类目)过来, 这里要返回商品类型为一级类目及其所包含的二,三级类目. 即: Goods.category = 1 [一级类目] Goods.category 的 parent_category = 1 [二级类目, 父类为一级类目] 或 Goods.category 的 parent_category 的 parent_category = 1 [三级类目,父类为一级类目下的二级类目]
@ApiImplicitParams({ @ApiImplicitParam(name = "category_id", value = "分类id,顶级为0", required = true, dataType = "int", paramType = "query"), }) @RequestMapping(value = "/seller/category-child", method = RequestMethod.GET) public List<Category> list(Integer cat_id) { Seller seller = sellerMangager.getSeller(); i...
1
6c08694ddfcf6d2afed4f8286dd8cbc8
9cd8a96b0434ffa4812001563c95c2e2
Converts an `osr.SpatialReference` instance to an EPSG code.
lon = int(np.ceil((x + 180)/6)) if y > 0: code = 326 else: code = 327 epsg = int(str(code)+str(lon)) return epsg
0
d07d8472bc0c3bc1274a8973f57c57f5
332a619703578555221ab2ff201166fc
Stores the ingredient changes information with respect to that ingredient.
HashMap<String, Integer> tempIngredientsNeeded = ingredientsNeeded.get(); Set<String> currentIngredients = tempIngredientsNeeded.keySet(); for (String ingredient : modifications.keySet()) { if (currentIngredients.contains(ingredient)) { int new_value = tempIngredients...
1
02b2732ed854e53535ad15effafba1f1
3759cf07b723ae8c711f2d2aa5a88992
双击查看文档.
namespace HDFSwindow public partial class FormHDFS : Form private void dataGridView1_DoubleClick(object sender, EventArgs e) { var row = this.dataGridView1.CurrentRow; string fileName = row.Cells[_fileNameColIndex].Value.ToString(); string path = this.treeView1.SelectedNo...
1
6f699e6b8868606f167cdd2c6035eace
6a39ae31b982b98b0b3c8d35f4ad19c3
Relate nugget to mod template.
class BoltHolder(cqparts.Part): def mate_nut_top(self, nth=0): return Mate( self, CoordSystem( origin=(nth * 20, self.width / 2, self.height), ), )
0
ad991b4c89873374c9e6a0a7d4d89dd7
6b4d31d182688a00dd95e92d7a8e2ca7
Uncheck Changed Objects
namespace Savchin.Forms.Browsers public partial class AssemblyBrowser : UserControl, IObjectBrowser private void UncheckAllToolStripMenuItemClick(object sender, EventArgs e) { tvObjects.UncheckAllNodes(); }
0
331012a90cb921e55f71ccf6770ed199
84feac6cb50b9a6f681b6b4203c65076
Call this function to make the strip BLUE
def set_blue():
1
9bb17dc4b0887e83b3a264e225745ae7
23cf40133d2a60fa887b0033f549e255
Gets the local interarrival jitter.
class ReceiverReport getJitter() { return this.buffer.readUIntBE(12, 4); }
1
85b4979a484953cef5d7fcc9227fd317
c9991486cde890db74e29805e476a2e2
Save latest pose as we're shutting down.
namespace apex void otf2_listener::on_pre_shutdown(void) { saved_end_timestamp = get_time(); }
0
d439ad24f8db8a757dba5c2ee10096a2
023b868e90d10c3c6eaf1955502ff251
Get the plugin, if found, return the [PluginContainer] of plugin, otherwise return null
public Optional<PluginContainer> fromInstance(Object instance) { checkNotNull(instance, "instance is null!"); if (instance instanceof PluginContainer) { return Optional.of((PluginContainer) instance); } return Optional.ofNullable(this.pluginInstances.get(instance)); }
1
86330a1e0669ed292055a2e97d626bc7
34f8bdad66d3104d31161056255faabb
Makes all neccassary input widgets needed for the Projectile Motion input screen
class InputDialog: def __init__ (self, angle, vel, height): self.win =win = GraphWin("Initial Values", 200, 300) win.setCoords(0,4.5,4,.5) Text(Point(1,1), "Angle").draw(win) self.angle = Entry(Point(3,1), 5).draw(win) self.angle.setText(str(angle)) Text(Point(1,2), "Velocity").draw(win) self.vel = Entry(...
1
af51873652235314153ba7a2018e80ad
0eacf307822cd29314f6ee87cc44459f
Add all players to the players table.
void PlayersTable::add_player() { player_t id = ++this->storage[0]; size_t *data = this->get_ptr( id ); data[0] = static_cast<size_t>( PlayerState::idle ); data[id + 1] = 0; for( size_t i = 0; i < this->max_matches; i++ ) { data[id + i + 2] = 0; } LOG_DBG << "added player " << id <<...
0
aa308d0736520e557e988f0a13d3f492
4a948c168fb9ae135d9f119873d447d1
查询离线作业运行详情 查询离线作业运行详情。 Please refer to HUAWEI cloud API Explorer for details.
try: params = request._serialize() headers = request.headers body = self.call("DescribeTask", params, headers=headers) response = json.loads(body) model = models.DescribeTaskResponse() model._deserialize(response["Response"]) re...
0
9b6d5449c04f94c14d0e211f854036d4
a7487864c66ad3d29f6002563b8cc9d6
Indicates if the payload may be self signed, in which case the public key may not be available until after the payload is processed Only really useful is the payload contains an account-like object.
class Status public function allowsPayload(): bool { return $this->allowsPayload; }
0
1b46ee38e21fccfca0a0e74d50ad0a97
30289cfc136cfd1ffda40078844b72c9
依据支付申请状态判断是否需要变更状态
if (sh_status != null) { mAccountPeriodState = sh_status.getStatus(); switch (sh_status.getStatus()) { case AP_Status_AllowablePay: setApStatus(true, Utils.getString(R.string.you_have_opened_xxx_days_account_paymen...
1
f0ac47d02ffd60d190317af51d239d1c
e474aac8298e1586658f8736ab9fa147
Sets the compiled autoload data
class ComposerScripts public static function postAutoloadDump(Event $event) { require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php'; static::clearCompiled(); }
0
4b66917342fbf674172e4a95948a9df7
c5416404796fd0b5e1778866b0f127fe
function to get static variable welcome
class Index extends \Magento\Framework\View\Element\Template public function getWelcomeText() { return 'Hello World'; }
1
650083c2d21ee4ec19a8deb6d7da7283
ececeb1e9e4a4ba614a6e2eaa2d93e0d
Start recording a new audio.
isRecording = false; currentTrack = audioManager.createRecordedTrack( data.recorded, CHANNEL, PARALLELOGRAM_TAG ); }
0
c3d32251484b3c5248984227467f4288
153d32ad1af231f7699954d625adab5f
返回此方法调用使用的代理.
public class ProxyInvocationHandler implements InvocationHandler public Object getProxy() { return Proxy.newProxyInstance(this.getClass().getClassLoader(), target.getClass().getInterfaces(), this); }
1
d9eab9c5c09794f8dc6eb1fcbcf63792
30b430ecfb4e29806320915146594ec5
根据信息将车的状态改为已删除
public int del(CarInfo carInfo);
1
58f4bb519ca20de9d91ee12a1cefa7aa
2c06d86a328b74ae0dc7f312ce4de1bb
Closest points between two OBBs
void Resolver::CalculateOBBToOBB(CollisionPair &aPair) { OrientedBoundingBox *obb1 = dynamic_cast<OrientedBoundingBox*>(aPair.mShapes[0]); OrientedBoundingBox *obb2 = dynamic_cast<OrientedBoundingBox*>(aPair.mShapes[1]); Transform* obb1Transform = aPair.mBodies[0]->GetOwner()->GET<Transform>(); Transform* obb2T...
1
5ff854c09916e91940859eb7e86ba518
aae5b25fd39d8ebde99492fd8ae84645
获取给服务器发送命令的结果
int onGetNetResult(int cmdFlag, InfoNetParam netParam);
1
e6a01bf8d5f40447c2bef371d7ddf5ae
4aa0ec76bc111b7689d34ad57118db59
Retrieves a list of owned addons for the site in MyYoast.
if ( ! isset( $_GET['install'] ) || $_GET['install'] !== 'true' ) { return; } $this->bust_myyoast_addon_information_cache(); $this->owned_addons = $this->get_owned_addons(); if ( count( $this->owned_addons ) > 0 ) { add_action( 'admin_enqueue_scripts', [ $this, 'show_modal' ] ); } else { add_acti...
1
e9f425fc741297b58da1a2d5ad06f50b
7d83fdbdbdda6d5c85bc95983af5f16b
Respond to changes in plugin name
print "%s is now known as %s." % (oldname, newname) for name, module in self.loaded_plugins.items(): for event in module['events']: if hasattr(event, 'on_nick') and event.on_nick: event(self, oldname, newname)
1
e7732b881a4f2a417b0f54ad14b1f14b
09182324047fa8f1074aad5f60a365ef
This method is called to translate the input name into an appropriate field name for the structure/record. If the name is already used it automatically creates an alternate version for the structure.
abstract class Lms_Item_Abstract protected function _getFieldNameByProperty($property) { static $translator = false; if ($translator === false) { $struct = $this->getStruct(); foreach (array_keys($struct->getColumns()) as $fieldName) { $key = str_replace('_', ...
1
6b0038906b246e98d3fa0aa8a7bab926
f7cdea743e6febba94865bee3493f75e
Ioctls to adjust and verify CRC16s.
{ VAR(uint32,AUTOMATIC) u32TmpCRC32Hash; VAR(uint32,AUTOMATIC) u32ManipulationVar; u32TmpCRC32Hash = Eth_Enet_GetCRC32Hash(pPhysAddrPtr, 6U); if(1U == (u32TmpCRC32Hash >> 31U)) { u32ManipulationVar = REG_READ32(Eth_u32BaseAddr[u8CtrlIdx] + ENET_GAUR_ADDR16); u32ManipulationVar |= ((...
0
4986a9bae2afb5a116e953f8d63b0ed0
e589ab4d5ebfaf97c4162d6cb034b552
虽然没有声明参数列表,但可以传入任意个数,任意类型的参数值
def test_anyargs(): anyargs(1, 2, 3, name='zp', age='100')
1
94c7cd9d3726ee5e27e0b266a4e7f5ef
38638350eb48460c75ef1b5969f168cc
Build the GPIO handler. If a consumer name is provided (which can add more semantic information to other programs trying to find out who holds a line) then it will be used; otherwise, the default is opentrons.
class GpioCtrl(object): def __init__(self, opt): self.opt = opt self.gpio_cfg_path = "%s/etc/raspigpioctrl/" % opt['-r'] self.gpio_pins = {}
0
c46ef75acd0128547cdcb7fe771b08bd
bd19dcb06c6ac6e8f7efc8e5d202824d
도형의 둘레를 리턴한다: 추상 메소드이므로 자식 클래스가 반드시 Overriding 해야함.
public abstract class Shape implements Drawable public abstract double getArea();
0
4e9a709bf463f2778fea47be4b3786e0
1c0bf7600d304f76f3e8ca9102d2be91
Returns the last stack frame, if available.
public ICDIStackFrame getStackFrame() throws CDIException;
1
2e78c5abacbe3e4a54e3bcec62bc3228
f506dd113e5da721bfccecbc013d8920
Apply multiple functions on a column of a dataframe
for key, val in props.items(): if key in data: data[key] = [func(item, val) for item in data[key]] return data
0
e2c5515aa853bea339585d60e4363b2e
385b76cd26fa8c5717810459dfc63a2a
Metodo responsavel por inicializar o dialogo
public class DialogoSelecionarMapa extends javax.swing.JDialog private void initAtributos() { mapaSelecionado = null; nomes = new ArrayList<>(); mapas = new ArrayList<>(); carregarDadosSalvos(); preencherLista(); setTitle("O Manicômio de Zulu"); this.setLocationRe...
1
dc31eb5fe1c940cf313ca3c4e833dad6
799762696ba39e00929e5db95dd75e78
Area del cuadrado
int areaCuadrado (int l) { return l * l; }
1
3c23629c2db196f6cd49296cd79e79df
4618937bf7e3641eb663b9279d6c0c50
读取url上的数据
class helloBiClass(): # 定义入口网站 def getData(self,url): return urllib.request.urlopen(url).read().decode("utf-8", "ignore")
1
9e86090b21b693954bb1368a0280321d
9e9865987ae6edc90477f638d9964488
Initialization routine for the right-click context menu for map buttons.
namespace AirMonitor.Map public static class MapEx public static void MapInitMenu(this IMapProvider map, bool edit) { map.Invoke("map.mapInitMenu", edit); }
1
6c87636b6b68662f7df7097c723d6ca8
17a092fd0cd1ac954a0efc8d72cbf87e
Create a directory on remote SFTP server
public class Client boolean createRemoteDir(String dirName) { SftpATTRS attrs = null; try { channelSftp.mkdir(dirName); attrs = channelSftp.stat(dirName); } catch (Exception e) { err.println("Error creating directory"); } return attrs != null; }
1
2d27b4d25e224da79b94ad3313f38f4c
7a27275942ef66cedcb37a71b1ccdc09
Sets the transparency of the joint.
if ( opX != -1 ) { if ( ( 1 - opX / 100.0f ) == 0 ) { taZY.setTransparencyMode( TransparencyAttributes.NONE ); } else { taZY.setTransparencyMode( TransparencyAttributes.BLENDED ); } taZY.setSrcBlendFunction( TransparencyAttributes.B...
1
354680ebb4b2653890b0faeede67efdc
46382636bb9e898bc3edc774485e81ae
@brief Unlocks the Fast Program Erase Mode.
void EFM_Unlock(void) { M4_EFM->FAPRT = EFM_KEY1; M4_EFM->FAPRT = EFM_KEY2; }
1
1d26fb734efd76813187e7a79668f94b
c7d4ea4507121b87fa731ac6951af952
Updates an existing Bo model. If update is successful, the browser will be redirected to the 'view' page.
{ $model=$this->loadModel($id); if(isset($_POST['ModelBike'])) { $model->attributes=array_map('strtoupper',$_POST['ModelBike']); if($model->save()) $this->redirect(array('view','id'=>$model->id)); } $this->render('update',array( 'model'=>$model, )); }
1
7802fd325dd732ad11b02df62f70af9c
02912d159b22d43cd5b71d6616a715f2
照合済み伝票データを過去データに登録する
namespace DSLG_OCR.CSV class clsMakeCsvfile public void pastDataCancel(int sDen) { DSLGDataSet dts = new DSLGDataSet(); DSLGDataSetTableAdapters.過去データTableAdapter pAdp = new DSLGDataSetTableAdapters.過去データTableAdapter(); pAdp.Fill(dts.過去データ); if (dts.過去データ.Any(...
0
2b02c1065ba49c95fb56088f2f294aec
bf180f10f1fd19dedac0af0624044f80
Spins the fan up, so it can be throttled down
public class Intake_Ring_Drop public void spinUp(){ intakeMotor.setPower(intakeRunSpeed); currentIntakePower = intakeRunSpeed; }
0
c7d6fa1a670ad94601ee992fc8355172
0ae11ef8629ce4e5c9e892e792da0b0a
Prints the cards in the players hands with commas inbetween each of them
for(int i = 0; i < maximumCards; i++){ std::cout << "Player Card Number : " << i << " " << playerHand[i].print() << "\n"; std::cout << "House Card Number : " << i << " " << dealerHand[i].print() << "\n"; } }
0
07a11d868d4b63fa36cefa7788de01f1
48894cb7cc15623df3161507f9dee24c
Method to clean out the include statements
var regex = new RegExp('<\!--(.*)' + prefix + 'include([\\s\\S]*?)-->', 'g'); return content.replace(regex, ''); }
1
dd3f2b53f2e31fd675c59a79d9b292d2
fc7f5351f8493e57ea1931972b1504c0
Connect qvtk-widget and pcl-visualizer.
pcl::PointCloud<pcl::Normal>::ConstPtr normals1, pcl::PointCloud<pcl::Normal>::ConstPtr normals2) { boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer (new pcl::visualization::PCLVisualizer ("3D Viewer")); viewer->initCameraParameters (); int v1(0); viewer->createViewPort(0.0, 0.0, 0.5, 1.0, v1); cout<<v...
0
aac9e2ec04ab312ec0722d5335b64c8a
d1b84b9aaa49b92af65c39282fa7a358
<p>Returns a path to current JVM home folder.</p>
public class Define public static String homeDir() { return homeDir; }
0
dea1ee492dd91638af35fbb437f4ea26
6ee37bf1bccc858a638dd6e9708c732e
VIN码识别接口 对车辆车架上、挡风玻璃上的VIN码进行识别
class OcrClient(AbstractClient): def VinOCR(self, request): try: params = request._serialize() headers = request.headers body = self.call("VinOCR", params, headers=headers) response = json.loads(body) model = models.VinOCRResponse() model._...
1
cf50fd9d28870d2ba1f62ac53e6f492a
6c1e9931cf371695e8adcbda7d93a459
分享商品获得1抵现金
public class CoolShowAction extends CustomAction public int give(int Iid, int uid, int touid) { if ("give".equals(session.getAttribute("ses"))) { session.removeAttribute("ses"); } else { return 4; } Commodity com = getCommodity(Iid); if (com == null || com.getDel() != 0) return 0; UserInfoBean bean...
0
40eb8fa9a6e4270c08a5fd4220c2ed56
39c9fe1ff09553fb7e5c8f940d027c37
Check if a string forms a complete, executable set of commands. For the line-oriented frontend, multi-line code is not executed as soon as it is complete: the users has to enter two line returns. Overridden from the base class (linefrontendbase.py in IPython\frontend to handle a bug with using the '\' symbol in multi-l...
class CommonCmdLine(cmdln.Cmdln): def complete(self, text, state): if state == 0: import readline origline = readline.get_line_buffer() line = origline.lstrip() stripped = len(origline) - len(line) begidx = readline.get_begidx() - stripped ...
0
ecdb86aa1eab015412bba2cb28593da1
61f71d0d25f5b5b7794b2c88c9a5c918
通知に応じたFragmentを起動させるためにデータを取得しActivityを起動する
class SearchHomeAdapterVertical( private val context: FragmentSearchHome, private val itemList: MutableList<SearchHomeItem> ) : RecyclerView.Adapter<SearchHomeAdapterVertical.SearchHomeViewHolderRow>() private fun handleActivityToFragmentChange(bundleTag: String, currentItem: ArrayList<EventDTO>) { val ...
1
6beab3d85196e1fffd92880e673e75f5
02c1649a24bff423ac678e37be240873
長時間のメッセージ表示を行う。
public class MessageBox public static void showLongMessage(Context context, String message) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); }
1
cd274582fb5f0cd3a4265472c47cf582
63148c55583e9217f1175ea8e9744929
上传商品信息Excel方法
public JsonResult UploadGoodsExcel(FormCollection formCtl) { try { HttpPostedFileBase file = Request.Files["dataFile"]; if (file == null) { return Json(new { Result = false, Msg = "请选择要上传的Excel文件" }, JsonRequestB...
1
91433b62e686bc30fd4b4916bfaad408
f5db072198095b252b1adb6702679627
Validation method to check if user has chosen Tables.xml and Reservations.xml files.
if(chosenResources.size() > 2 || chosenResources.size() == 0) return false; if(chosenResources.stream().anyMatch(x -> x.getValue() < 1 || x.getValue() > 3 || x.getKey() == null)) return false; return true; }
0
5a449679e9f4d6962aa34e9b21705a83
4f3f24c883edf9ab1a59f84490d2364f
EASY MODE: Returns a random available square
def easyBot(game): return choice(list(game.remainingCells))
1
92c4f02f4d6f0960079934bf30850dab
7dc4dad4e3344e444dd0dd88f7f77ecf
Retrieve the first available {@link CardDto} (removing it from the list). <p> If there are no available {@link CardDto}s left, this method will return <code>null</code>. if there are no cards left.
if (cards.isEmpty()) { return null; } final int size = cards.size(); return cards.remove(size - 1); }
0
20beef3083644e26be27e724ea3f0be5
13525f9e5f18038e50923437ce8640c2
Get list of images in view format
class ImageController extends Controller public function actionList() { $itemId = Yii::app()->request->getParam('itemId'); $arrImages = array(); $imgFolderPath = Yii::getPathOfAlias('webroot') . DIRECTORY_SEPARATOR . $this->_imageFolder . DIRECTORY_SEPARATOR . $this->_itemsImageFolder . DIRECTOR...
1
c95fec2c84ac80b1906bc84a80e6236c
87201196fdca08a845347863ec78ab37
when something is caught in the AOE of the attack.
void AMeleeWeapon::Prox_Implementation(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult) { if (OtherComp != OtherActor->GetRootComponent()) { return; } if (Swinging && OtherActor != WeaponHolder && !ThingsHit.Contains(OtherActor)) { A...
1
4a5da79c6f3fb0be6a98c309ed472d2c
bb5bec7d86f55d99a0460abe49d40136
Back substitution function, completely serial-based programming.
void backSubst(double **A, double *x, double *b, int N){ int i,j; double sum; for(i=N-1; i>=0; i--){ sum = 0.0; for(j=i+1; j<N; j++) sum += A[i][j]*x[j]; x[i] = (b[i] - sum)/A[i][i]; } }
1
ef0cf087068d8fb6f7c05613acd923ff
a93ef780ecb0d64637cafa73726641ae
! The number of data entries in the model.
class ResultModel(dv.PyDataViewIndexListModel): def GetCount(self): return len(self.data)
1
9f2991808fab1a6de55badfa350e5809
24eb53cef3ac004ef8cf982b234c3165
Get player rankings for a specific location.
namespace OpenDotaDotNet.Endpoints Task<IEnumerable<PlayerHeroRanking>> GetPlayerHeroRankingsAsync(long playerId);
0
70c7cec933a2d52c6f48f8fc02819a85
537fb0315938e50ce93574cdddac7619
Prepares and formats the slack message and returns the correct Slack structure as per https://api.slack.com/incoming-webhooks
if not fixture: return "" return "{date}\t{details}".format( date=FootballDataToSlackMessage.__format_utc_date_for_uk__(fixture.date) or "", details=FootballDataToSlackMessage.__format_fixture_scores__(fixture) or "" )
0
8076976dbadd4026f5c09e21db5b4a54
f7fd28204dee126cc0a116bef92eee1c
Change the players name to [name]. Rely on normal replication code to actually get that information to clients.
public class Player : MonoBehaviour void ChangeName(string s) { GetComponent<NetworkView>().RPC("SetName", RPCMode.AllBuffered, s); }
1
af62e22216a7b31913535b4fccdc2e0e
438063224a8ddc14768c37faeaccb8ca
Remove the wall from mWalls
class Qoridor: def removeTempWall(self, location): self.state.intersections[location.X][location.Y] = BoardElement.EMPTY
0
0fd9598de9709c4906edca265d3ba91a
8d7261a30d3ec5439433c19bd72fd50d
Check that there's not another reservation for same room in same range of time and the same room
public class BookingDB public boolean isAvailable(String roomID, String timeslot){ for(int i = 0; i < bookingsArray.length; i++){ if(roomID.equalsIgnoreCase(bookingsArray[i].getRoomID()) && timeslot.equalsIgnoreCase(bookingsArray[i].getTimeslot())) return false; ...
1
934131cdf3c727c92160aa55ddef04d1
82d9bca0afdc137956d2a860ecb5e01f
获取指定句柄对应的字段信息
class MySQL extends DaoAdapter public function getFields($tableName) { list($tableName) = explode(' ', $tableName); if (strpos($tableName, '.')) { list($dbName, $tableName) = explode('.', $tableName); $sql = 'SHOW COLUMNS FROM `' . $dbName . '`.`' . $tableName . '`'; ...
1
957acf3f4f27f86ab4b1006f277306b2
ea65bf7238b9cfa048f76aec3b252534
获取扩展Claims列表
{ return Seed(nameof(GetClaims), key => { return ContentOptions.InitialClaims.Select(pair => { var claim = new Claim(); claim.Name = pair.Key; claim.Description = pair.Value; claim.PopulateCreation(GetInitialUser...
0
7019da13f992ae28199bf0132045b60c
5b854cf136467e066d1373d2b0131571
Get a word from specified address, adjusted for little endian. Consume 2 cycles.
class WordInterface(DataTypeInterface): def read(self, context, stream, address): low_byte = stream[address] high_byte = stream[(address + 1) % len(stream)] value = low_byte + high_byte * 256 return value, 2
1
2d4b5d4ca6816e47f5cc6ad807dd312a
b039b2a3f99cebbf390eb95e42658186
Remove a reader thread, from the list of threads reporting their quiescent state on a QS variable.
if self._continuousPolling.isReading(reader): self._continuousPolling.removeReader(reader) return self._remove(reader, self._reads, self._writes, self._selectables, EPOLLIN, EPOLLOUT)
0
0ec84e204fdcf561f6022e4205a81bc2
e59814f7e1874a3f9c5ab9bb8063a939
Выбросить исключение, если кэш неисправен.
Cacheable cacheable = (Cacheable) super.get(); if (cacheable != null) { return cacheable; } if (RolapUtil.debugOut != null) { RolapUtil.debugOut.println("CachePool: getCacheableOrFail failed!"); new NullPointerException().printStackTrace(RolapUtil.debugOut); } throw Util.newInternal( ...
1
0ab7f4288d34d6fc22c547496d972daa
64403832b8fbce643e1d9c957dea80d1
Returns a range of all the candidates where companyId = &#63; and groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first resul...
long groupId, long companyId, long parentId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<LegalOrg> orderByComparator, boolean useFinderCache);
1
c2a5c0bfacf58ff59244aa9d4ea84a85
6c33af99bc9d6aea89c3ab4dbdd45d64
Return playerCharacter list's size.
class World(Singleton): def get_characters_count(self): return self._character_counter
0
7eb6af1a113f8b13a17438e367944c54
2e2d5de1cc7746856ffb80f5a28d80eb
Списывает голоса со счета пользователя на счет приложения.
{ self::LoadVotes(); $db = Env::Get()->db->Get('game'); $db->Begin(); try { foreach (self::$_votes as $vote) { $value = Env::Get()->config->Get('mmotop/reward/'.(($vote['type'] == self::TYPE_NORMAL) ? 'normal' : 'sms')); $amount = User_Money_Converting::FromMmotop(1); User_Money_Cash::Facto...
1
38cf0fe97a75523ca726ab62027ddf0e
56f1efb0ec99652cf05cf778a751dc0f
creates a <xsd:simpleType> tag
if (err) throw err simpleType = simpleType+'\t<xs:simpleType name="'+qual+capitaliseFirstLetter(key)+'Type">\n\t\t<xs:restriction base="xs:'+dataType+'">'; for (var value in values) { simpleType = simpleType+'\n\t\t\t<xs:enumeration value="'+values[value]+'"/>'; } simpleType = simpleType...
1
ed1e395ff8e79783130187d0450ab151
23f289b9183a995963b3b403739390b5
Prints information about the last move did in the current match.
{ if (game.getBrs()) { if (game.getCounter() == 1) { SGameScreen.getRCinfo().setText("Bishops & Rooks are switched! Last turn."); } else { SGameScreen.getRCinfo().setText("Bishops & Rooks are switched! Turns left: " + game.getCounter()); } } else if (game.getPS()) { if (game.getC...
0
c2027407971b585554b1b3066ac23f43
c147c94b38b703dbab54d3f8703e7ffb
Checks or unchecks the Quick Notes Report Checkbox
{ try { GenericHelper.WaitUntilElement(By.Id("rdoAssessment")); WebDriver.FindElement(By.Id("rdoAssessment")).Click(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); throw ne...
0
f42db938b4d323d25dad10ffe8d2dcaa
f4cf7e6284b869ab3ec87182123e3776
Maximum number of LSP sync can be sent per interval. Returns: obj(ixnetwork_restpy.multivalue.Multivalue)
try : return self._mss except Exception as e: raise e
0
f38de15027b1340e745073bf50039ada
c71ac359f982d4787ac7e7b31a995bc2
\brief Processes View Scene command
func procViewScene(zclDownMsg common.ZclDownMsg) { globallogger.Log.Infof("[devEUI: %v][procViewScene] start: %+v", zclDownMsg.DevEUI, zclDownMsg) frameHexString, transactionID := zcl.ZCLObj().EncFrameConfigurationToHexString(frame.Configuration{ FrameType: frame.FrameTypeLocal, FrameTypeConfigured: tru...
1
e3a0d6e8d0dc2b4f21020c0a1ff44474
a77b6333f0cc075bc409346ae12f817d
Returns the Log of a specified number (Use Math.Log() instead)
namespace Endahl.CSharpedSql public class Function : ColumnItem public static Function Log(int value) { return new Function(FunctionType.Log, value); }
0
f8c9a7ae6225670b5cdca2d20c2a8061
00f00ce869a7303c85de21d6da987361
# Funciones para Eliminar duplicados en fila/columna y para crear grilla completa de datos
tbl <- tbl[-which(duplicated(tbl[ ,column])), ] tbl <- tbl[!is.na(tbl[ ,column]), ] return(tbl) }
1
9162d47ec483056076538a1c991ab473
92895c94e59e77491c2fef93218ff195
根据网关应用id获取全部环境列表
class EnvM(object): def get_env_list(self, pro_id): env_obj = db.session.query( EM.env_id, EM.env_name, EM.base_url, EM.create_time, UserModel.username ).join(UserModel, UserModel.user_id == EM.creator) data_obj = env_obj.filter(EM.pro_id == pro_id).filter(EM.is_delete == 0).order_by...
1
f4cabca9da428018e26387982d0b1afd
4243f212dd6b05678966041ffa76b1e3
弹出前面的元素
class Window: def slide(self): del self.list[0]
1
7e53e5571f296ad180c95cf5b19fa05c
14a6ffb38bf2d4074e4f398c16a7519e
Takes a list of UpdateExpressions (or just a single UpdateExpression) and compiles it into a single dict containing the necessary keys to send to DynamoDB
Map<String, AttributeValueUpdate> r = new HashMap<String, AttributeValueUpdate>(); for (String attrName : item.keySet()) { if (!attrName.equals(DynamoDBDataSource.hashAttributeName) && !attrName.equals(DynamoDBDataSource.rangeAttributeName)) { AttributeValue val = item.get(attrName); AttributeValueUpdate...
0
55b9535dada0d1e26f33e18f4ed7194c
77b864fa7508eab731a445c6b6fe42b4
根据帖子id创建回复
Map<String, String> map = new HashMap<>(); map.put("content", content); map.put("discussionUser.discussionRelation.id", discussRelationId); String url = Constants.OUTRT_NET + "/m/discussion/post"; addSubscription(OkHttpClientManager.postAsyn(context, url, new ResultCallback<Reply...
1
5ffd9a93843a84a6b2185c8cc85c6637
f7d850bcae8b8fd5911acf7c90cd3cb3
Specify that the field may not be empty.
def field_required(self): validator = Required() self.validators.append(validator) return self
1
4f5c05c357a8c3aacb083469bff290dc
07637c7b989700c8c5b742003ec91840
Gets the y value for the last row of the grid.
{ List<double> list = this.mData[columnNumber]; return list[list.Count - 1]; }
1
814ee1514039c28b7436e993626783d9
34e6677bb23456780efc21e6ae30a530
隐藏输牌标记
public class GameActivity extends AppCompatActivity implements Runnable{ private void hideBtn(){ alpha -= 25; for(int i=0;i<8;i++){ for(int j=0;j<8;j++){ if(mark[i][j]==1){ map[i][j] = -1; im...
1
3756b3c6198d87e627aa2657b32ab03f
20fa52761ec174cd10c91c56e0db5e06
删除上架图书信息(商户)
Session session = null; try { for (int i=0;i<checkout.length;i++) { session = sessionFactory.openSession(); Greatseller greatseller = findgreatsellerbyid(checkout[i]); greatseller.setShelves("1"); session.update(greatseller); session.beginTransaction().commit(); } } catch (Exception e...
0
b09ab3e496488407fbbe0615e7b1fd53
762e466192cb0f1d4560a9b1f90657a4
Returns the node with the id If no node exists with that id, than null is returned
class GraphModel getNodeById(id) { return this.nodes.get(id) || null; }
1