query_id
string
corpus_id
string
query
string
code
string
label
int64
eed4124f16c481e400fec9323979817a
0c437d1c395102248b1e35a3fa949f18
Gets the value of the typeAttestVariantStaapladserMaksimum property. possible object is {@link Long }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TypeAttestVariantStrukturType", propOrder = { "typeAttestVariantNummer", "typeAttestVariantSiddepladserMinimum", "typeAttestVariantSiddepladserMaksimum", "typeAttestVariantEgenVaegt", "typeAttestVariantKoereklarVaegtMaksimum", "typeAt...
1
f9ec886b30a50262c32d3fc6c359e50a
da87c344f4634741985e67a4dd5adecd
If a therms page is set render the checkbox
function _onClickTermsButton(event) { event.preventDefault(); $('.termsCopy').toggle(); new $.TrackingManager({'type':'click','prop4':_offerID + '_na_TC_View'}); }
0
b60ac8ae5b0deec504b190d224fae5b9
ca76d7c6bb210c5d5c7aec5a51449a98
Publish data for transmission (ready to leave the device)
let deviceData = { acceleration: { x: accelerationX, y: accelerationY, z: accelerationZ, time: accelerationTime }, gyroscope: { x: gyroscopeX, y: gyroscopeY, z: gyroscopeZ, time: gyroscopeTime }, geolocation: { lat...
1
e264c1f1fb99643805ae335de067d880
d52b391bc13d725774ac23075b092581
ウィンドウをスライドする
public class UIController : MonoBehaviour private IEnumerator MoveWindowTo(float starty, float endy, bool closeAfter = false) { windowLeaving = true; Vector2 startPos = new Vector2(0.0f, starty); Vector2 endPos = new Vector2(0.0f, endy); float moveTime = 0.0f; while (moveTime...
1
463f8164b14285f2bdeda6003759acb2
87bbc9cc67403b13ab24bbac579a3eee
Function for making saliency map described in Itti's 1998 paper.
model.eval() X = X.clone().detach().requires_grad_(True) saliency = None yhat = model.forward(X) score = torch.gather(yhat, dim=1, index=y.view(-1, 1)) score.backward(gradient=torch.ones_like(score)) saliency = torch.max(torch.abs(X.grad), dim=1)[0] return saliency
0
fb2cfda99422cc571fede9b265040055
eb2257203c1b22c93e933725326ebec9
Add a column descriptor to this table descriptor. column_desc - Descriptor of column to add. Can be PartitionKey, ClusteringColumn, DataColumn, List, Set, or Map.
Alter addColumn(String columnName, String dataType, String columnDefinition);
0
030e9caaefce3461900825f7cc917c92
540cdccd40bbe370444b373a72e9ebd8
根据温度(K)和露点温度(K)计算相对湿度(%) inputs:
if relative_humidity is None and dew_temperature is None: relative_humidity = 0 t = temperature T = 273.15 + t p = pressure A = 1.2378847e-5 B = -1.9121316e-2 C = 33.93711047 D = -6.3431645e3 a_ = 1.00062 b_ = 3.14e-8 y_ = 5.6e-7 if not dew_temperature is None: ...
1
3c129fd4c1e6aa627ee5187bdd786bbf
5b01bebe2a2db0a13441dbf66dd97f2d
Делает записи о скрытии визуального редактора для некоторых полей
{ $fields->youtube->hidden = !$this->type || $this->type == 'image'; $fields->image->hidden = $this->type == 'youtube'; $fields->href->hidden = $this->type == 'youtube'; $fields->is_new_window->hidden = $this->type == 'youtube'; }
1
5d524b12cb3d3768c366a83256c20039
76bf1841313c31684687c1a9e4daddc0
Функция забирает данные из фида, парсит их и валидирует. В несколько потоков.
date_queue = create_date_queue(start_date, end_date) parsed_data = [] dw_threads = [] for i in range(4): dw = DownloadWorker('dw_thread ' + str(i), date_queue, parsed_data) print('created {}'.format(dw.name)) dw_threads.append(dw) for thread in dw_threads: thread.star...
1
1f81e5739c86627f2796f45aaeda8cdb
5ea4267ef51ba370d0666ff0b06fca21
Obtiene el valor de la propiedad numeroTicket. possible object is {@link String }
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NUMEROTARJETA$0, 0); return target; } }
0
06ced6df86cbafff83cad1a3ff6c444f
9957bf88104ffb2ba6802451c8dc30ba
This helper function runs a predefined RegEx against the supplied markup document text to help with identifying the tags in the document.
namespace CS419_FinalProject class Tokenizer public static MatchCollection TokenizeDoc(string content, string regex) { return Regex.Matches(content, @regex, RegexOptions.IgnoreCase); }
1
07a60269acc4cf993318d04dd91edd47
0be263b9aee50e264ce6c02d7ed08c7b
Finds the character that has been clicked on and opens panel
namespace LevelDesigner public partial class Form1 : Form private void atlasPanel_Click(object sender, EventArgs e) { foreach (PictureBox p in atlasMap) { if (sender == p) { clickedTexture = new Bitmap(p.Image); ...
0
43aafdeda9724b2dbf3a650ad4a84bfb
730743640ee77ce688d3824fc95da930
Callback for SHTP app-specific advertisement tags
{ BYTE *tags = &pkt->data[0]; if (code == PPPOE_CODE_PADI || code == PPPOE_CODE_PADR) { WORD srv_len = 0; *(WORD*) tags = PPPOE_TAG_SERVICE_NAME; tags += 2; if (cfg.service_name[0]) { srv_len = strlen (cfg.service_name); srv_len = min (srv_len, sizeof(pkt->data)-2-PPPOE_TAG_HDR_SIZ...
0
8b13a2767a96b948ed313667ad978e97
215fc2f85cdd3b5b2855f882e1d207f3
tests a bug that returned "TypeError: 'NoneType' object is not iterable"
class TestLab1(unittest.TestCase): def test_max_list_iter_list_nonetype(self): tlist = None with self.assertRaises(ValueError): max_list_iter(tlist)
1
a048a469d63dfbac286af7c46ca149e0
2d176a7e9340579746502356507a669d
Проверка количества загруженных элементов
public class GadgetSearchPage extends MainMarketPage public void quantityCheck(){ $$(fitGadget).shouldHaveSize(quantityOfGadgetsOnPage); }
1
ed4acc6f79a71a3480dc740fa6f72276
67bb3b7339b582a1f008a7994132ecff
Checks for value result.
check_result( VALUE self ) { Check_Type( self, T_DATA ); if ( !IsResult(self) ) { rb_raise( rb_eTypeError, "wrong argument type %s (expected an OpenLDAP::Result)", rb_obj_classname( self ) ); } return DATA_PTR( self ); }
1
a04eca04ca2211ee6a67d954714d6c19
66fd29ca86074890854378c653c262cb
Really massive boss for the final level.
class Boss(Enemy): def __init__(self, name: str="Anon", HP: int=50): super(Boss, self).__init__(name, HP)
0
b8a85db1d637c61cb1126a734344604d
1200bb03bb815b25b6623f2c33646a75
Notified of a new walk direction.
public class SprintProxy : IInputProxyToggle, IDynamicProxy, IAnalogInputObserver public void Update(Vector2 direction) { _WalkInput = direction; DirectionCheck(); }
1
307487f12320a12a5590dfe4d3a644b5
d1b5873e6314872ddab9df7c929d57e3
图像错切
public class TokenDemo public static void moderationDistortionCorrect(String token, Bitmap bitmap, Callback callback) throws Exception { String url = ServiceAccessBuilder.getCurrentEndpoint(projectName) + "/v1.0/moderation/image/distortion-correct"; Map<String, String> headers = new HashMap<String, Stri...
1
f444d9d4724012732272c32151a6c2d0
0b4f59d057725889095d257a800302f0
Return true if board has been won or is a draw
char iSym = getSymbol(bCross); if(mBoardDim == mGameDim) return hasFull(iSym); return hasWon(iSym, (i, j) -> i * mBoardDim +j) || hasWon(iSym, (i, j) -> j * mBoardDim +i) || hasWonDiagonal(iSym, (i) -> i * mBoardDim +i) || hasWonDiagona...
1
bd44e99e05e9c331504ebd98fbfdf498
34ec5202e3689d2c97a937c81fb907dd
Cria uma instância vazia, para não dar erro de referência
public class GruposDoUsuario{ public static GruposDoUsuario create(){ GruposDoUsuario grupos=new GruposDoUsuario(); grupos.setGrupos(new ArrayList<GruposDoUsuario>()); return grupos; }
1
741d245a6d3825e6920b427f8b98816d
414c5f111693acad49e30827fa0b4a47
Test that when empty lists are returned, no exceptions are raised and an empty list is returned
def test_empty_lists(): for _, _ in list_to_batches([], 1): assert False
0
a9bfaa2393d057a483b86cde182c94ba
9a4d2d05b6392986c1f95f33dc99bb62
Get the greatest key less than or equal to the given key, raises KeyError if there is no such key.
class BST(object): def floor(self, key): x = self._floor(self.root, key) if x is None: return None return x.key
0
cbabfcf1ae1a98ba6bff6a4b3f897067
210461fa5e37c34ee69ee7432d14ae1d
Updates the order the categories are in
class faqCentre public function rebuildCatSequence() { $seq = 0; $q = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT `id` FROM `" . DB_PREFIX . "categories` WHERE `subcat` = '0' ORDER BY IF(`orderBy`>0,`orderBy`,9999)"); while ($CT = mysqli_fetch_object($q)) { $n = (++$seq); mysqli_query($GL...
1
a60f7e6fbe72ea4df562b8d1f931e35d
5af6ca83a69141420e237eafad381f89
查询所有歌曲总数
public class SongManager public long queryAllAlbumrNum(){ return mSongDBHelp.queryAllAlbumrNum(); }
0
0be43bebc26f65d3b1b8e9390f286da0
346635a5678df5569d406039f30f719e
更新平台可售和下架的产品sku 和库存 -全量更新-奢品
class baison_api_model extends abstract_multi_curl public function update_platform_product_delisting_multi($params = array(), $fields = array()) { $this->reinit_params(); foreach ((array)$params as $_key=>$_value) { $this->reqArr[$_key] = $_value; if (isset($_value['ptsp_id'])) { $this->reqArr[$_key]['num...
0
e78161a348c72519ffb13cc854df9da9
3f2af98152c0c817ba68f2f9a92c73ea
根据商品id查数量
@WebServlet(name = "GoodsOutServlet",urlPatterns = "/goodsOut") public class GoodsOutServlet extends BaseServlet public void selectNumById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Integer id= Integer.parseInt(request.getParameter("id")); System.out...
1
9011886ad7f1c2eeacce5b1b81131521
47b65fcc2592ff6ec48582094bd7cacc
根据老师ID获取老师该老师所有信息
TeacherVO getInfo(int teacherId);
1
a6199ee16ffde34f8efdca9d01cffdcb
9ae5efc5dbe67ce7099b18674ae94d6d
Adjusts the user-supplied p-value, from a test with sample size n, to a new p-value, as if from a test with sample size n_ (called n* in the paper).
class TestMixin(BaseEstimator): def _receive_pval(self, p): self.pval_adj_ = p[0]
0
8b60ff2c4efa3eecc92457e06d0e6166
3739b05b8835ef1626f88e4af27c54cc
Esta funcion sirve para listar los proyectores
def getProjectorList(): return _PROJECTOR_LIST
1
01200c7210746cc5a9917002d8d5ccec
42c5e2acc9318eb1d4e31025b8b611d0
Get a date/time range given by the rfc formatted parameters and limited to the given max range
class DateTimeBoundaries(object): def __call__(self, from_dt=None, to_dt=None): dtdict = self.extract_regex(from_dt) if from_dt: from_dt = self.parse_dt(dtdict) else: from_dt = self.start dtdict = self.extract_regex(to_dt) if to_dt: to_dt = se...
1
151ae912781cb54d53946f4c6ce003d7
e770323631c0f1db85c42e2b77074da0
<H3>トリム.</H3> <PRE> 先頭と最後の空白は削除する。 <br> </PRE> 対象文字列
public class ParsableString implements CharSequence, Serializable public ParsableString trim () { for ( ; _startIndex < _maxIndex; _startIndex++) { final char dch=_data[_startIndex]; if (!isEmptyChar(dch)) break; } for ( ; _maxIndex > _start...
1
d5fa6cf8471017e1752e11f34f7550f8
4bb17c9aff4d262e69fe11d0757fd58b
This method needs to be called if the reference to the {@link ObservableList} changes. <p> It sends notifications to all attached {@link InvalidationListener InvalidationListeners}, {@link ChangeListener ChangeListeners}, and {@link ListChangeListener ListChangeListeners}. <p> This method needs to be called, if the val...
public class ExpenditureList implements ReadOnlyExpenditureList protected void indicateModified() { invalidationListenerManager.callListeners(this); }
1
f87a081914cb66b4bf1a6267baf6c703
8e72adf9c1dca55fab63dc3d80332333
Сохранение ошибок работы в базу данных
namespace SystimeDataAcces.DataAccess public class WorkOrderLoadErrorLogSystime public Boolean SaveWorkOrderError(WorkOrderLoadErrorLog workOrderErrorEntity, String userModify) { if (workOrderErrorEntity != null) { Boolean isUpdate = false; using (Sys...
1
9ae21f698dae69d6a41da6cd12a6c3cc
6667d896f48202dddca60cda4f28dcab
Ejecuta la operacion de cerrar sesion en el WS, elimina las cookies y vuelve al inicio.
function cerrarSesion(){ $("#contIncSesion").remove(); return false; }
0
66b0c465700b74555d20c37ac05fd116
06099500a1bcf474a171f62e035a5aa6
Generates an etag for the given document.
namespace Bloggine internal static class BlogUtils public static string GenerateETag(string name, DateTime date) { var encoding = new UTF8Encoding(); using (var crypto = MD5.Create()) { var str = name + date.ToString("yyyy-MM-dd HH:mm:ss"); ...
1
0a0abf8477462e0c6a7393723fe00220
d4b04677a9f6f722c00d162e082deb7f
指定医療機関IDにてPVデータ登録を行う
String fid = pvt.getFacilityId(); PatientModel patient = pvt.getPatientModel(); pvt.setFacilityId(fid); patient.setFacilityId(fid); StringBuilder sb = new StringBuilder(); sb.append(pvt.getDeptName()).append(","); sb.append(pvt.getDeptCode()).append(","); ...
1
3f8cac0ac1956bf88709a3e1d6e340d8
8b3b0a089f8f7ae6b7e777cf04571b09
Check whether this RN should be on this SN. Recommend a fix if re-enabled. Assumes that the checker has been constructed with the most up to date topology and params. If SN remote config params are loaded with saveSNRemoteParams, assume that's also up to date.
for build in builds: snvr = nvr2shared_nvr(build['nvr']) if snvr == nvr: return True return False
0
b4a71666dfc276d4d597b9180b65de88
295e3393644f99bdece89eda401ce276
Return namespace with adapter-specific command classes
class QueryHttpCommandAdapter implements HttpCommandAdapter public function getCommandNamespace(): string { return Query::class; }
1
7d63731db8cfe61749a848de3635e166
7716512d0ca3bd02428105562bf88284
对source字符串进行去空格,包括中间的空格
public class StringUtils public static String Trim(String source){ return lTrim(rTrim(source)); }
0
7fcfac38a92a3bcc07cda6ae4a672a26
35ec68082f0550105c05022547a2c6c7
设置 TransferImage 初始位置信息
@SuppressLint({ "HandlerLeak", "ResourceAsColor" }) public class EditPictureActivity extends BaseActivity implements OnTouchListener, OnClickListener, OnItemClickListener private void initPicLocation(Bitmap mPicBitmap, Bitmap mMaskBitmap) { int PicW = mPicBitmap.getWidth(); int PicH = mPicBitmap.getHeight(); ...
1
f3b0fb2c21ec5b3e6d4717b7500e403d
412f53055fd36748dadcd0eecdd01c60
Determines the result type of this unary operation right now a unary op will never change the inner type so this function is trivial
namespace funcexp erydbSystemCatalog::ColType Func_char::operationType(FunctionParm& fp, erydbSystemCatalog::ColType& resultType) { return fp[0]->data()->resultType(); }
1
807900f72f25bf48daea2b3a50c00a8a
1c2b62a4b4e5886a56b0fd55d890af6c
Determine if the coordinates <code>(x, y)</code> describe a unit vector
int diff = x - y; int over_pos = x >= 0 && y < 0 && diff < 0; int over_neg = x < 0 && y >= 0 && diff > 0; return (!over_pos && !over_neg); }
0
a0dbaa28a8e413d9c15339ea41a5dcb7
62324427e7153a184f6e8a780518805d
Return all available control shapes
def get_shapes(): return ["circle", "square", "triangle", "ellipse", "pentagon"]
1
58e8fa2ad1cce8329b4e028ec9518cb0
eac4af136125badb7769576164e9ada8
Check if there is any transition between two states
class ORM_StateMachine extends ORM public function can_transition($state_to, $state_from = NULL) { return $this->_statemachine->can_transition($state_to, $state_from); }
1
52a1978871d410e96c816e6fcadd4169
3266231c0cfe897fc7a5e0fbe52f1675
根据barcode获取产品id
class taoguaninventory_mdl_inventory extends dbeav_model{ function getProductbybarcode($branch_id, $barcode){ $sql = "SELECT p.product_id,p.name,p.spec_info,p.bn FROM sdb_ome_products p WHERE p.barcode='$barcode'"; $row = $this->db->selectrow($sql); if ($row){ return $row; }...
1
cca19df7484c499af93b468a3c79597d
8aa5b3ec7e1a55bea58e8d4d50e19dab
通过起始和结束城镇id及指定区域id列表中,获得城镇路径的表格信息
function GuoZhanServerDataManager:GetPathList(startRow, startCol, destRow, destCol) local start = {row = startRow, col = startCol} local dest = {row = destRow, col = destCol} AStar:init(self._WorldMapData, start, dest, false) local path = AStar:searchPath() local newPathList = nil if path ~= ni...
0
8a9ee172539a978bf9fa7115cc69e168
c9012185d3dd517b851b1ffe37034885
パネル上の全ての部品のステータスを0にする。
{ if(Panels == null) { return; } for(int i=0; i<Panels.Length; i++) { Image image; image = Panels[i].GetComponent<Image>(); if(image) { image.color = PanelsDefaultColor[i]; } } }
0
e76748b31452b00830fd38f849244baf
c7e4e9b73883051c0643f8b688df56ec
Verify an email address it valid. Used in actionCreate.
{ if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $emailaddress, $check)) { if ( checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY") ) { return "valid"; } else { return "invalid-mx"; } } else { return "invalid-form"; ...
1
a3e1705822c72257bff31fe7b896da3d
e304e5ecf4496e7abb07f696347f5b1c
获取被标记的任务Id
{ $sql = $this->_bindTable('SELECT `task_ids` FROM %s WHERE `uid` = ?'); return $this->getConnection()->createStatement($sql)->getValue([$uid]); }
1
a98cc4aac13ebfe9d695a558a9c118f7
b45ffdff42d5a528f77ea4a8b765cfe7
@brief 设置过期时间,默认3秒
PlayerHB::PlayerHB() { m_iExpireTime = 3600; }
0
4ecdb4ce150093399fa4ca2351902e03
47e8b8aa6a4dd5d52df301618cda6ee2
Habilito el menú en esta pantalla cuando salgo
export class HomePage ionViewWillEnter() { this.menuCtrl.enable(true); }
0
58c2263a97caba4c31e893bc5c7ccad0
cabb4052e89a7acf26ef1138814df5b8
将对象转换成UInt64数据类型
{ var result = defaultValue; if (obj != null && obj.ContainsKey(key)) { object val = obj[key]; if (val is ulong) { result = (ulong)val; } else if (val is string) ...
1
6da1720e59facf76d732f0fd0e354cae
d319790f05e246a5c37e52f086bbb560
method untuk melakukan pemesanan kembali yang menghubungkan dari activity sekarang ke LoginActivity
public class AddRiwayatKesehatan extends Fragment private void setButtonListener() @Override public void onClick(View v) { getActivity().getSupportFragmentManager().popBackStack(); }
0
8321197b97a895d7ba4a29719eeb10a8
5ebbaddfa0811e2da09ef93325db00db
@brief This function handles FSMC interrupt request.
{ if (__HAL_SD_SDMMC_GET_FLAG(hsd, SDMMC_IT_DATAEND)) { __HAL_SD_SDMMC_CLEAR_FLAG(hsd, SDMMC_IT_DATAEND); hsd->SdTransferCplt = 1; hsd->SdTransferErr = SD_OK; HAL_SD_XferCpltCallback(hsd); } else if (__HAL_SD_SDMMC_GET_FLAG(hsd, SDMMC_IT_DCRCFAIL)) { __HAL_SD_SDMMC_CLEAR_FLAG(hsd,...
0
1f46da65213690adff8a932168944483
a801c1541085a9a85b59a72466e2e152
Validates if a mosaic supply change action is valid.
namespace io.nem1.sdk.Model.Transactions public class SupplyChangeTransaction : Transaction public static SupplyChangeTransaction CreateDecrease(NetworkType.Types network, Deadline deadline, ulong fee, ulong delta, MosaicId mosaicId) { return new SupplyChangeTransaction(network, 1, deadline, fee...
0
517bf133e87e4319a46dc4bb644bdc8c
17faca520b01378a9223ad624529ee58
従業員の詳細ページにフォワードする.
class EmployeeController extends Controller public function show(User $employee) { return view('admin.employee.detail', compact('employee')); }
1
42e3bd2923755afc5f47a15c0c8ec2d1
8a3746f205d5cd0b1422e16df101358a
将弹性IP的PTR记录恢复为默认值 将弹性IP的PTR记录恢复为默认值 Please refer to HUAWEI cloud API Explorer for details.
const options = ParamCreater().copyInstance(copyInstanceRequest); options['responseHeaders'] = ['']; return this.hcClient.sendRequest(options); }
0
fa82e147235cc58502fb5f0c58a244bf
b728ec8184f82dd875c250a37b761633
删除指定广告位的某个图片
class AdService extends BaseService public function delAdPosition($id) { $id = intval($id); if ($id < 1) return false; return $this->_getAdPositionDao()->delete($id); }
0
b6c0d090320c80ec1b05d130b53edf6c
3db3208b7230d3867aede84e44452920
根据网络服务条件得到网络服务集
namespace Org.Limingnihao.Api.Util public class NetworkUtil public static List<NetworkVO> GetNetworkList(NetworkInterfaceType type, OperationalStatus status) { List<NetworkVO> list = new List<NetworkVO>(); NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); ...
1
9a895107ce5fa30b27c601c117e694f9
c26924121325b0148f8bedb1eca33922
The fraction of new lines added by this contributor in this language which are comments. Note that Ohloh does not track the net lines of current code attributable to an specific individual. This statistic merely sums over all new lines added, and does not consider whether the added lines were later removed by this cont...
public float getCommentRatio();
1
64e8ef9a122b44b49c829ba88216dd59
b34a21ded4435fbd9d7eae835f355276
Retrieve a specific fax from our system
class FaxController extends Controller public function GetFaxDetailRN() { $CorpNum = '1234567890'; $RequestNum = ''; $UserID = 'testkorea'; try { $result = $this->PopbillFax->GetFaxDetailRN($CorpNum, $RequestNum, $UserID); } catch (PopbillException $pe) { ...
1
62c94c6b8bde3c9ef6414eeaec915a16
73063755d5e133166aa5faa9cd7475b0
Tkinter-specific key-press event
class TimelinesBuffer(ScrollableWidgetWrap): def keypress(self, size, key): return key
0
f4ed7b96fd09ff8075426ee4f6698b4f
78d9ae28b3d15010fe106b2cf3c556e6
This function is called by a timer interval. The function tries to send a messages from the queue. If message was successfully send then this function will be called back to send next message. If message queue contains more than one message then the connection will kept open. The message POST is asyncroniously when the...
class ConnectMixin: def __send_loop(self): pass
0
c18af77e19689cd50d593edcc6838181
f64b37caf8dccb76cde299321cff326a
Creates the basic salt and pepper noise data transformer
def salt_n_pepper(amount=0.01, salt_vs_pepper=0.5, seperate_channels=False): return lambda imgs: __salt_n_pepper(imgs, amount, salt_vs_pepper, seperate_channels)
1
363bbcc0f9b4ab29d375f9de300eb195
f39a0a2bb97bb8c3c588d6db6fd73036
使用 匿名函数替换lambda表达式,且使用return后,return的只是该匿名函数
func anonymous() func() int { i := 1 fmt.Println(i) r := func() int { return 5 } return r }
1
57d0ca680b15fab1f281e5fc73f1dc13
48c8464a9d555e23083a21874da770a9
100% 本质是找最长二进制首部
class Solution int maxConsecutiveOnes(int x) { int ans = 0; while(x) { x = x&(x<<1); ans++; } return ans; }
0
ca4a8b2bc317e4ae65a887dcb790ca5f
365a27cbea302919d528881e4fceb106
功能:病名信息录入中【修改】按钮功能 说明:【修改】功能必须是对具体项有效,也就是必须是有编号的项
{ if (IsAdd) { IsAdd = false; input_save.IsEnabled = false; input_cancel.IsEnabled = false; input_jbzmbh.Text = ""; input_jbzmmc.Text = ""; input_zf.Text = ""; input_bz.Text = ...
1
68cc53cb7e6a3db5d1235674fb099fec
ca1b4b5711bc4a656ccd44851a58af1c
Get impediment data as a list suitable to passing to model.
{ $data = [ 'id' => $this->id, 'name' => $this->name, 'code' => $this->code, 'detail' => AlternativeDetail::collection($this->details) ]; if ($request->criteria) { $data['comparisons'] = AlternativeComparison::collection( ...
0
32330ac039595633b4d8db858bfd5ef3
aab3d3f4a5da12592e678211e35444c9
Return supported features for this camera.
class SecuritySpyCamera(SecuritySpyEntity, Camera): def supported_features(self): return self._supported_features
1
c7d3ec1782625f85c395bb45b4839f9d
05db539eeac42803c0f044fbfee133f7
Возвращает массив ответов проиндексированный ID'шниками запросов.
abstract class AbstractPanel public function getQueryIds() { return $this->queryIds; }
0
fde886e2a6a7cde82f851059cf00f591
3a1183769a6423963a1e97c70ecbf909
Check to see if DomainEndpoint property is set
namespace Amazon.MediaStore.Model public partial class Container internal bool IsSetEndpoint() { return this._endpoint != null; }
0
7de8fea0f0b4b03dc661988e38d94e25
66cb64a63f5ee5b7356caa5dbe7ed78b
Write performer details to the standard output stream
public class Application public void displayPerformers() { for (Performer performer : taskManager.getPerformers()) { System.out.println(); System.out.println(" Код: " + performer.getId()); System.out.println(" Имя: " + performer.getFirstName()); System.o...
1
d4fafb83c257574858ded620780ba9bc
1b84aa78a789a8c42011c7d2164ae9d7
1深拷贝
local target={} for k,v in pairs(obj) do if (type(v)=="table") then target[k] = DeepCopy(v) else target[k] = v end end return target end
1
ec65b6a9d10b65f4cc150833bca0104c
ab671c0c7de744b4d317d5e8264eedf7
Function runs command to add ppa and then an upgrade
def upgrade_pkgs(): execute("upgrade_pkgs_node", env.host_string)
0
d9ae2d7c64c521263d8099f97a1c35aa
614d90710862a31cd4bc093eef0b8882
Get the tags for a locationFootprint. Get all existing locationFootprint tags.
namespace Infoplus.Api System.Threading.Tasks.Task AddLocationFootprintTagAsync (int? locationFootprintId, string locationFootprintTag);
0
b5d79ea133477c51c0af84f2e9fbdb97
795c2962ffd93fc25c07a451d75aa4b2
The text of the help if it exists. Null otherwise.
com.google.protobuf.ByteString getHelpTextBytes();
0
153134b6b8ec7e27981cea16dd9a1211
56f0400d429291f79a8ed169ae4b9b35
是否异常组合
{ if (Com_Array::is_good_arr($combination_data)) { $is_change = false; foreach ($combination_data as $keys => $val) { if ($val['state'] == 0 && $change_data[$keys][0] > 0) { return FALSE; } if ($val['state'] > 0 && $change_data[$keys][0] == 0) { return FALSE; } ...
1
2304f490e450a00cca7360db30230816
b4df2b6a94f8b0e0d7887ef33640522f
重写hMSet方法,
class Redis public function hMset($key,$value) { if(!is_array($value)) return false; return $this->redis->hMset($key,$value); }
1
d9c01d13fed580ee1b5a71196fd2b697
6ab383374d998683a99b5f70fa8a73a5
Sortowanie po typie materiału (zakładka materiał).
class s6yUtilsFinder public function sortByType() { $this->_sort = 'type'; return $this; }
1
87f354a03d06920a593b0617be637fad
7f61448ad6da3ef0f9cb03f40c5be655
AboutController
cases like (1)
0
adccc3ba38f4871a0e42bb86d94e20f5
7e6fefc3489b4a055b54f18dff150eb0
Initialize PhysX
PhysXPhysicsManager::~PhysXPhysicsManager() { if(physXSDK != NULL) { physXSDK->release(); } }
0
7f33246303e2e127f1366d4be7f07874
ffce9e6fc0113cdd58ab25efaf0c8d86
Test that gaussian states match after gate teleportation
initial_state = QuantumCircuit(2) evolution_problem = TimeEvolutionProblem(operator, 1, initial_state) trotter_qrte = TrotterQRTE() evolution_result = trotter_qrte.evolve(evolution_problem) np.testing.assert_array_almost_equal( Statevector.from_instruction(evolution_r...
0
65c714d648a552957e2c4c9af601367a
7cc4589ef899008ee4ca761afa2c12b6
@brief : pause the sensor
void CeleX5::pauseSensor() { enterCFGMode(); }
1
dc7c61788d6cb1e23118872eb4253e77
a190d35a4340281dbf9f9ce8eda3fc4a
Get exercises for this group
class Exercises: # Initialize exercises class def exercises_of_group(self, group): return [ex.name for ex in self.ex_list if ex.group == group]
1
1495de81256ead10292d8638536a64f7
dd3ac6fe8963af2b9f7c4be1da950464
Это деструктор
{ print " Уничтожение " . $this -> name; }
0
f294dc2d0c0a832dc795e5833e900671
9292866b0de4e7c70b45249b9c41f513
测试根据角色编号查找对应的权限
public void testFindPermissions() { Set<String> permissions=new HashSet<String>(); List<Long> roleIds = new ArrayList<Long>(); roleIds.add(1l); roleIds.add(2l); permissions=roleService1.findPermissions(roleIds); Assert.assertNotNull(permissions); Assert.assertNotEquals(0,permissions.size()); Set<String...
1
85e30fbe0b4633c3ebbdbbc23cc53a68
4dd4755f7a680fb32a31bf06132f8db6
Returns allowable values of dataCollectionType.
class CreateClusterReqV11 implements ModelInterface, ArrayAccess public function getLogCollectionAllowableValues() { return [ self::LOG_COLLECTION_0, self::LOG_COLLECTION_1, ]; }
0
cef1991cb34031e58241568da6000f5f
19f30e7ee2f8e328d140999af1eaedc5
Xpad是平行X方向的读出条, X方向为长方向(对应Geom是Z为长方向) Ypad是平行Y方向的读出条,Y方向为长方形(对应Geom是Y为长方向)
self.PAD_parseXOffset = 163*self.PAD_scaleRatio self.PAD_parseYOffset = 163*self.PAD_scaleRatio self.PAD_parseStartPosY = display.contentCenterY end
0
6d9b1f21f9694c425fbf9e79e5fff67a
9a6c766e4d5c423bb2801c7b995122aa
if connection is successful, set light to green
global connected connected = True print("INFO: Connected with result code "+str(rc)) client.subscribe([("sensornet/env/home/living/temperature", 0), ("sensornet/env/home/living/humidity", 0), ("sensornet/command/ao", 0)])
0
c9650df28869c86fac9563cf3225891b
3818bb3caaa5a29c614c6dcd7e1d9b1f
Unrolls an array of packed values into a friendly object structure
{ $decoder = $data instanceof DopDecode ? $data : new DopDecode($data); $data_arr = $decoder->unpack($mask_key); if ($decoder->getErrorCode()) { return false; } $this->arrayUnpack($data_arr); return true; }
1
a486eb1c0a0cb0dd594f8d3b4c4fda00
b3b0645cff729629df3b33ccc3b66b66
Return a list of source lines and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of the lines corresponding to the object and the line number indicates where in the original source file the first line of...
def sage_getsourcelines(obj, is_binary=False): try: return obj._sage_src_lines_() except (AttributeError, TypeError): pass if isclassinstance(obj): obj=obj.__class__ d = inspect.getdoc(obj) pos = _extract_embedded_position(d) if pos is None: return inspect.getsour...
1
56bfa23ac1aa494cc2b63207ed5b2b58
e02a9555dcb4a9c154cbfd7ced069570
设置是否显示列脚
if (visible) { foot.setVisibility(VISIBLE); } else { foot.setVisibility(INVISIBLE); } }
1
56bae7db87d32c1a5ef4a7914729472f
e93ca60d0e704fc9899023594ad25dae
游戏进行难度,决定使用多少种方块颜色及基础掉落速度等
if(gameDifficulty == 1){ } else if(gameDifficulty ==2){ rockRate = 3.5; rockLength = 15; logRate = 5; logLength = 15; dropRate = 2; dropLength = 6; puddleRate = 2; puddleLength = 8; } else if(gameDifficulty ==3){ ro...
0
808da123311b8bd92a58644b8ca38180
364153319975c2e8ae772a99f738c044
Test case for create_namespaced_role
class TestCoreV1Api(unittest.TestCase): def test_create_namespaced_limit_range(self): pass
0
127b88f3d9ff5b61c12bc582c9da006b
636fa8347864f5d4affedbe950b6b381
Reconcile the slot status with the slot report.
let previousNodes; if (this.m_slotElementsAssignedNodes.has(slot)) { previousNodes = this.m_slotElementsAssignedNodes.get(slot); } else { previousNodes = []; } const newNodes = slot.assignedNodes({ flatten: true }); this.m_slotElementsAssig...
1
19320231eca894df4df395a4bc9925ce
e51078892c1cb2324870946fce68d9b8
Function to get \f$a_{ij}\f$ and \f$c_{ij}\f$ coefficients of the Runge-Kutta 5th step.
struct matrixM *dU, struct matrixM *Cu, struct matrixM *Du, struct matrixM *wW, struct matrixM *wNW, struct matrixM *wN, struct matrixM *wNE, struct matrixM *wE, struct matrixM *wSE, struct matrixM *wS, struct matrixM *wSW, struct mparam Mparam, float *cp, float *dp, int nco...
0
84d108050fada320a125aa051a6fa7cf
ce27c40e1ce70dda55ad59f03fb47a05
## we perform thinning - downsampling data to match the spike counts distributions
decimate<-function(m,fact,thresh) { m<-m[1:(floor(dim(m)[1]/fact)*fact),1:(floor(dim(m)[2]/fact)*fact)] d1<-dim(m)[1] d2<-dim(m)[2] i1<-seq(from=1,by=fact,to=dim(m)[1]) i2<-seq(from=1,by=fact,to=dim(m)[2]) m[is.na(m)]<-0 res<-matrix(0,d1/fact,d2/fact) for (c1 in 0:(fact-1)) { for (c2 in 0:(fact-1)...
1
b8968a9eae18b9d7c3a5a2b0b8c5549b
6bed9c690400977932d3b5dd7ed75405
Constructs a new pear task.
{ parent::__construct(); $this->properties['cliTool'] = null; $this->properties['executable'] = null; $this->properties['pearBinaryDir'] = null; $this->cliTool = $this->getCliToolName(); }
1
a68d3baaad55aaa2f919ed2e0260d087
16408184faada3b6cf28382b1ef5eb4f
Déplacement vers le haut => Si on peut déplacer l'entité, alors on met a jours son x et son y
public class ExampleEntity public void moveUp() { if(inBounds(rect.getX(),rect.getY()-CHAR_SIZE)) { rect.setY(rect.getY()-CHAR_SIZE); } }
1