query_id
string
corpus_id
string
query
string
code
string
label
int64
32b50a417fa782719309ec500372de00
ca385bf6e2e0f743193ca5f87d69ded6
Create a single message of the appropriate JMS message type
namespace Sage.CA.SBS.ERP.Sage300.Core.Azure.Storage.Queue internal class MsmqQueue : IQueue public IQueueMessage CreateMessage(string payload) { return MsmqQueueMessageFactory.Create(payload); }
0
43d3be9347d6f5473ef56bc47424562b
a8c1108213c8a7ecffbc88f97a3cef09
dst中减去字v 直到v为零或者没有借位
void sub(bignum a,const int b) { int i=1; for (a[1]-=b; a[i]<0; a[i+1]+=(a[i]-DEPTH+1)/DEPTH,a[i]-=(a[i]-DEPTH+1)/DEPTH*DEPTH,i++); for (; !a[a[0]]&&a[0]>1; a[0]--); }
0
2c4842ca2d105dd6f0d25e878bf33dba
cf045d7a9dbc34560055add0dee64c0f
Filters to run on the individual columns. See the Vizier website for details.
class Dataset(object): def with_columns(self, includes): import hxl.filters return hxl.filters.ColumnFilter(self, include_tags=includes)
1
f6d00a1dc9399345cdc18a4311d78485
b5746b11c5d915b0e8defa19407e06a0
Set alpha of particles instantly
public class Emitter extends Graphic public ParticleType setAlpha(String name, double start, double finish) { setAlpha(name, start, finish, null); }
0
cb0fc1541194c0d4fd7562369e453695
5695f16926e514064fbbdd591218bd27
Visszatérünk a könyv azon szavainak listájával, amelyek nincsenek benne a szókincsben.
{ $searchUnique = array(); $searchDiff = array(); $stopwordslist = file ( 'lists/stopwords.txt' ); foreach ( $stopwordslist as $value ) { $stopwords[] = rtrim( $value ); } $searchUnique = array_unique( $searchArray ); $searchDiff = array_diff ( $searchUnique , $stopwords ); return $searchDiff; }
1
df653065180fff6359239dd2b449e846
201556d653e6f761f4642b6d4e1780c7
提供精确的加法运算。如果参数为null,则视为0处理
if(a == null || b == null) { return a; } return a.add(b); }
0
0e106abeb1f1fb913700233ceabf2a6d
b9744f5a6a7dc24a638edea4e17f9b7a
performs a random walk from a given point; returns the next (random) point
pointT getRandomDirection(pointT currentPoint, int rows, int cols) { dirT dir = (dirT)randomInteger(North, West); pointT nextDir = currentPoint; switch (dir) { case North: nextDir.row = nextDir.row - 1; break; case South: nextDir.row = nextDir.row + 1; ...
1
807a4286323a82a9e13c4085614c4ccc
900e5e9ad780429e7133fb4c75b13824
Sets whether to mirror the y-axis on the calorimeter display. be mirrored and <code>false</code> that it should not.
public abstract class GLDrawer2D public void setMirror(@IRendererCommon.MirrorMode final int mirror) { GLUtils.setMirror(mMvpMatrix, mirror); }
1
7fc2f8c51955b44a18810b263806ac46
f897b2337365c9e8638b129ff39c4a3a
根据来源类型ID删除来源类型(多条记录)
class CrudController extends Controller public function destroyByIds($ids) { return $this->Type::destroy(explode(',',$ids)); }
1
764b1d5b2716cc7927de9574910af530
e3a864fc2517ca406d6d70cccec3df44
Write registration as updated registration record
namespace HlidacStatu.Api.V2.CoreApi System.Threading.Tasks.Task<ApiResponse<Registration>> ApiV2DatasetyUpdateAsyncWithHttpInfo (Registration data);
1
854c4d2eab27c9d0e96ddd78f8e6ae72
bfd69c538cea9a744fbeb58816fb0ae9
stub implementation (not used in these tests)
public class TestFakeContainersLauncher @BeforeMethod public void setup() @Override public void launchContainer(ContainersLauncherEvent event) { }
1
e43f8584174212f645e816244a88d385
b16fae9e2038b56dc7b62d90e7671ba2
Test if querystring sort column is file modified time.
$Folder = new Folder(TMP . 'test_sort_by_time', true); $file2 = new File($Folder->pwd() . DS . 'file_2.tmp'); $file2->create(); sleep(1); $file1 = new File($Folder->pwd() . DS . 'file_1.tmp'); $file1->create(); $expected = array('file_2.tmp', 'file_1.tmp'); $result = $Folder->find('.*', Folder::SORT_TIM...
1
2f898a85b7523142133d1599b7d9147f
2aef31dae3795abfe773bbf796cfb516
上传issue的附件
public List<Attachment>getAttachments(Issue i);
0
cb41c2787f8a7a038ceceff42d84e598
84dda7509b1a5e2d9d798ee526ea036c
Calculates the centering matrix for the kernel
function makeKernel(kernelSize) { let kernel = new Array(kernelSize); for (var i = 0; i < kernelSize; i++) kernel[i] = new Array(kernelSize); for (var i = 0; i < kernelSize; i++) { kernel[i].fill(1 / (kernelSize * kernelSize)); } return kernel; }
0
a4f19d3015ae6c82c9856a8eb6f8a28a
ed953d022f267d8152b5ce5051e4e1b6
@brief x軸の値域を設定する関数
function domainX(x) { x.domain([35,90]) }
1
984e9a6509a188e3768898fa086cae45
faa2b00c0533b5d001a7eec0550f18ab
Test accessing buy transactions
status_code, response_dict = buy_stock(self.bank_teller_token, self.customer_id, self.stock_id, 20, "2021-3-21") self.assertEqual(403, status_code) self.assertEqual("credit level forbidden", response_dict) status_code, response_dict = buy_stock("wrong token", self.customer_id, self.stock...
1
fcfeb38fcdf8e69fd8a8f8c5b04e84d5
c59ef9867d3c313119137277e0a66e99
根据界面id获得是否显示活动标签
@ResponseBody public String checkShowOpenScreen(HttpServletRequest request,HttpServletResponse response){ JSONObject jo = getDESRequestJson(request); String id = jo.optString("id"); JSONObject resData = new JSONObject(); JSONObject jO = new JSONObject(); if (StringUtils.isNotBlank(id)) { try { Op...
1
87bc5866cd0ca5b13df0838ed6e41e1f
6f2de6592c1782449b5c5426e6a51902
============================================================================ OBTIENE LA INFORMACION DE LA CITA CON EL ID ENVIADO COMO PARAMETRO ============================================================================
const headers = new HttpHeaders().set('Authorization', this.token); return this.httpClient.get(this.url + 'citas/' + id_cita, { headers: headers }); }
1
c423a3c6009b69acc02bdfe1591eba48
64d601b0de6da242c0999bf9c8d93666
Set multiple parameters by name.
class Params(__Base__): def _set_params(self, params: iter[any]) -> None: self.set_params(params, inplace=True)
0
b0a2b01666587f0d9fb70511dc883499
9edc7592021271c3676b1fd9ecdaa6c6
Get worker path relative to the local path.
class RemoteWorkdir(RemotePath): def getpath(self): return RemotePath(self.remote, self)
0
4afe7862e31487e8e429044d3b98df15
6798042667c39751af51c7466778eb9e
Delete the minimap objects in the vector manager.
{ for (iter_cminmaps = index_minimaps.begin(); iter_cminmaps != index_minimaps.end(); ++iter_cminmaps) { delete (*iter_cminmaps); } }
1
0b956da8de547d974025b049acfe95c8
4634956c76a6fdc69280666ec3a85e12
Tests whether any of the patterns in flow1 and flow2 have packets in common
result=0 if pst_nat_type == "ANY-REMOTE-HOST": if flow1 != 0 and flow2 != 0 and flow3 != 0 : result=1 if pst_nat_type == "TARGET-HOST": if flow1 != 0 and flow2 != 0 and flow3 == 0 and flow4 == 0 : result=1 if pst_nat_type == "TARGET-HOST-PORT": if flow1 != 0 and flow2 == 0 and flow3 == 0 and flow4 == 0 ...
0
53b2d45f2fd53b6b3628669361d67967
ff9f2e5a05677c6553f5d71aba07540a
Factory method for panicHandler
func WithPanicHandler(panicHandler func(interface{})) Option { return func(opts *Options) { opts.PanicHandler = panicHandler } }
1
c0aa6e9c649b4b70b58da559d91e1f17
36a76d096baae9e949e372ef7ee23fd2
(Plot) Draw a triangular contour plot.
if ax is None: ax = plt.axes(projection = proj) mesh = plt.tricontourf(x_coord.flatten(), y_coord.flatten(), plot_data.flatten(), levels) for c in mesh.collections: c.set_edgecolor("face") return (ax, mesh)
1
0ad98eabe57053011cc8c6f870741f78
61afeb59bf25c8714e6b526e282e925f
*********************************************************** 获取PLC程序 ***********************************************************
{ if (!_plcSelectName.Equals("")) { plcNameLab.Text = _plcSelectName; _plc = new PLC(F_DataCenter.MDev.IGetDev(_plcSelectName)); PlcLocationLab.Text = _plc.PLCLocat(); PlcStaMaterialLab.Text = _plc.Sta_Material(); ...
0
cd90c10cb5d1ad1b7bb2ad86421ccf26
11bfbbc123b8d2044341b18382f9d230
Create a factory that creates gRPC-web handlers.
namespace Blade.Grpc Task<GrpcChannel> Create<T>() where T : ClientBase;
0
b6283c3aa06a57b1d34cda7090281689
760f2b5954d4fb9571da394d29951fb9
searches given words in a given matrix in all 8 directions
{ int match_count = 0; match_count += find_right(grid, n, word, write_to); match_count += find_left(grid, n, word, write_to); match_count += find_down(grid, n, word, write_to); match_count += find_up(grid, n, word, write_to); if(match_count == 0) { fprintf(write_to,"%s - Not Found\n", word); ...
0
d685476e4e0a11c6771b9e45413103ff
0e98c152fba30546f6eaf6cc7077c2d2
这是一个汽车的类
class Car(): def __init__(self, make, model, year): self.make = make self.model = model self.year = year self.odometer_reading = 0 self.gas = 100
1
96fe75efdb2e4b6a30c10c0052dbd370
6569d1c5a21b6080b36118f796948c41
Prints scripts or data in the body tag on the front end.
$this->_add( 'js_data_hook', true ); $hook = ( is_admin() ? 'admin_footer' : 'wp_footer' ); $this->_add( 'js_data', array( $name, $data ) ); $this->add_action( $hook, '_print_script_data' ); }
1
6af52ed436bac104eb72ed7ceba5530d
fcfe9e2ffccb19cd6871950db4100718
静态函数,没有任何参数
function staticFunction(){ echo '这个就是静态方法'; echo self::happy; }
1
0bf8338a3847f7f1189fc5b7f29276de
2e2b304404705b70d331752c89ec89e2
Тест по сценарию "Поиск вакансий". Описывает работу раздела "Поиск вакансий" (заполнение фильтра, выполнение поиска и открытия вакансии)
{ $I->click('.field-spec-search'); $I->see('Арт-директор', ['css' => '.field-spec-search .nselect__list li[data-val="3"]>span']); $I->click(['css' => '.field-spec-search .nselect__list li[data-val="3"]>span']); $I->seeCurrentUrlEquals('/?gender=2&desired_salary=33000&specialization=3...
1
8dbbec477b4396695b441f6bbefe2b46
60b498810590ef2d41374cb447ebfd88
This method supports the creation of the array that stores cell areas. It differs from _setup_cell_areas_array in that it forces ALL nodes to have a surrounding cell, which is not actually the case for the generic perimeter node (these are unbounded). This is only possible because the grid is a raster. It is not meant ...
single_cell_area = factor*(self.grid.dx**2.0) source_nodes = np.sum(self.area[self.grid.core_nodes] <= single_cell_area) return source_nodes
0
e8fb63c84733a2035d9e5df6c1286d87
edf53fd51dfd1afbb00dacdcddd8e413
ワーシャルフロイド法で連続グラフの各ノード間の距離を求める.
void FloydWarshall(int *graph) { for (int k = 0; k < nodes; k++) { for (int i = 0; i < nodes; i++) { for (int j = 0; j < nodes; j++) { if (graph[i * nodes + j] > graph[i * nodes + k] + graph[k * nodes + j]) { graph[i * nodes + j] = graph[i * nodes + k] + graph[k * nodes + j]; ...
1
64da056231f65785f0fe98498daaa5de
cdb5f083c074fd4f1f9c6b1fc22c9716
wrapSceneUI Method Removes the card on the set to indicate that it has been wrapped
this.wrap.stopAllActions(); let seq = cc.sequence( cc.moveTo(0.05, 0, 10), cc.moveTo(0.05, 0, -10), cc.moveTo(0.1, 0, 0)); this.wrap.runAction(seq); }
0
f33427d38a4da51cd2275243cf239c13
6d422535f8b181c538ce91310cb2c84a
根据QueryBean 查询交警采集的电动车list 分页查
ListInfo list = executor.queryListInfoBeanWithDBName(WyxqBean.class, CommonConstant.DBNAME_SQJW,"queryWyxqPageResultInfo", pageinfo.getOffset(), pageinfo.getPageSize(), bean); return PaginationHelper.wrapPageResultInfo(pageinfo,list); }
1
ab49e0da3291a5f066a6edb0f908d362
1cb224b0d30e60cb2e8bfacc936a2da7
Gets the value of the version property. It is read-only. Tools are not to depend on this property. It is only for reference.
@XmlAccessorType(AccessType.FIELD) @XmlType(name = "", propOrder = { "productId", "version", "name", "supplier" }) @XmlRootElement(name = "Product") public class ProductElement public String getVersion() { return version; }
1
bb072140ea777d6088de00b3508f51c3
2cc22be9ced7f0a70d100b3b29229cbd
Returns the lists of friendly and enemy cross-over positions
cross = {"GC":None, "DC":None} crosses = [] for i in range(len(mashr) - 2): if (mashr[i] - malng[i] < 0) and (mashr[i+1] - malng[i+1] > 0): cross["GC"] = i + 1 elif (mashr[i] - malng[i]) - (mashr[i+1] - malng[i+1]) == 0: if (mashr[i] - malng[i] < 0) and (mashr[i+2] - ...
1
d69cb43928a40fcdd93c1ec2d23b197c
868609c67b752ce90e0556e3d2f2f08f
Opens the tract select menu for chapter two as the current screen and hides the previous screen
void MainWindow::openSubtrack2(){ this->openSubtrack(1); }
0
cef23d1bd18c8a2fedbd7e0dd5e21182
e3e5ee0b041c6d222d962a9fdb12268f
Converts a native parser AST to a managed AST.
public generate ({ast, context}: IFoveaDOMAstGeneratorOptions): IFoveaDOMAstGeneratorGenerateResult { return this.convertFromRawAstToFoveaAst(this.filterRawAst(ast), context); }
1
6f55c023328b7ce41a390c5f72345700
4f98077574efff00d12f7280275d1585
偽のシーケンスバーを表示
function showAll(subSecList) { for (var idx = 0; subSecList[idx] != null; idx++) { var s = subSecList[idx]; reverseCollapsedSection(s[0], s[1]); } posBarUpdate(false); return false; }
0
461f72b4c6a38f154956681ef29b82ea
c07d21177f1db4f5eaa5f87c753f850f
等于查询
class CrudDate extends CrudField public function _searchEqual():array { if ($this->_isAutoField()) { trigger_error('CRUD搜索条件中,自动日期不可参与搜索'); } $type = $this->getType(); return [ 'conditionTpl' => 'conditionDate', 'tpl' => 'searchDate', '...
1
502686c31e37c1fe0a9d041a0b89f3ae
0267b629cb598f258007fdb29f8ba17a
Returns true false based on probability blocked, true false indicating whether cell should be blocked or free
function calcBlock($bChance){ $bChance = $bChance * 100; $wasItBlocked = mt_rand(1,100); if($bChance >= $wasItBlocked){ return 1; }else{ return 0; } }
1
76b5f1551f945e4fcda471440d958d3f
335616e28ca608a655141a3ac48ea8fc
Checks that all elements on page is displayed
public class ItemDetailsPage extends BasePage{ public void assertPageDisplayed(){ onView(withId(R.id.item_details)).check(matches(isDisplayed())); }
0
a7957ae962179718c67e8748efd9b232
fb04c903fb582d3d468cb64396292744
Adds the load options for the shape.
class PlotPropertiesGroup(QGroupBox): def add_load_types(self, load_type: LoadType): if load_type == LoadType.thermal: self.combo_box_loadtype.addItem("Thermal") else: self.combo_box_loadtype.addItem("Combined")
1
4703ab4b7a9b059b9eb5298208b95bf6
b18b34ce39814d5b5f19a54ed3f751b7
Gets all values for specified seriesID in the time range ordered by time
class extractSeriesValuesBySeriesAndMostRecentDate: def GET(self, series_id, connection_string=helper.get_connection_string(os.environ['DATABASE_URL'])): connection = psycopg2.connect(connection_string) self.cursor = connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor) self.cursor.ex...
0
fd37db9bd837ee01962f3d1324c51b3a
a11c42ce3234137a8433724bd72731de
Returns the blueprint node event get any key title
public class EDEDBPerspective extends Perspective implements Observer @Override public String getRBPerspectiveTitleKey() { return "perspective.title"; }
0
899659cedfd47586b0b73f2ec2f6893d
6a6dd42617408de9a42f1b184213cfb9
Adjust the grid spacing if a skew angle is present
class PNEditor(Tkinter.Canvas): def _adjust_grid_offset(self): while self._current_grid_size * self._current_scale < PNEditor._GRID_SIZE / PNEditor._GRID_SIZE_FACTOR + 1: self._current_grid_size *= PNEditor._GRID_SIZE_FACTOR while self._current_grid_size * self._current_scale >= PNEditor._GR...
0
c9fb265df8ae1eb7f469836dbba28d69
d2530b9a38af151eeec792c1a03c5e3a
Returns if \a _b is visible from \a _a on the graph. This is not the same as Physics.Linecast, this function traverses the graph and looks for collisions. \astarpro
{ bool ret = false; float az1 = static_cast<float>(a.z - ((a.iz - a.bz)*0.5)); float az2 = static_cast<float>(a.z + ((a.iz - a.bz)*0.5)); float bz1 = static_cast<float>(b.z - ((b.iz - b.bz)*0.5)); float bz2 = static_cast<float>(b.z + ((b.iz - b.bz)*0.5)); if (az1 < bz2 && bz1 < az2) { ret = true; } if (!ret) ...
0
0f08bf06c16d772dcfe7451431a13d61
6c7d8e8b33e9d330d3a64d39dd13e2c1
批量更新系统消息为已读,
@Service public class MessageServiceImpl implements MessageService public void updateInformToReadingByInformSystemId(int informSystem_id) { messageMapper.updateInformToReadingByInformSystemId(informSystem_id); }
0
27c7f6d4db5545033759efff836b5b41
85823d517cfae0b35729730c16ebeb01
Populate the DefaultNameServiceDependencies object from the given XML configuration. elements
XmlElement element, string name, ParserContext parserContext) { string typeName = GetTypeName(element); string filename = element.GetAttribute(RemotingConfigurerConstants.FilenameAttribute); string useConfigFile = element.GetAttribute(RemotingConfigurerConstants.U...
0
f9d3599d46e0f726673549dc485f5078
5b7019b3a34bdbf7d2850f3a7609010f
Create an empty dict for configlet.
class PeerlessEffectConfig(object): def __init__(self): self.items = {}
1
aed1c73953ccb815b1159d562527ce7f
10306b30601ded828f49a0ec96addd90
Ensure that a few of the common test case properties are included.
public class JobTypeManagerTest @Test public void testCommonPluginProps() throws Exception { final JobTypePluginSet pluginSet = this.manager.getJobTypePluginSet(); final Props props = pluginSet.getCommonPluginJobProps(); System.out.println(props.toString()); assertEquals("commonprop1", props.getString...
1
5208f350dd2bd379722ad1bd9136dcac
fc5254b72c0a5acfb443ae8d2ac5ee54
@brief When we wake, we should check to see if any non-wakeup timeouts have expired.
{ ipl_t ipl = waitq_sleep_prepare(wq); wq->missed_wakeups = 0; int rc = waitq_sleep_timeout_unsafe(wq, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE); waitq_sleep_finish(wq, rc, ipl); }
0
193cf39f9a3e271afa3363cd09af1794
944ccdf60a181239b55e54f81754e124
Calculate a linear trajectory segment
{ EigenSTL::vector_Affine3d line; const Eigen::Vector3d travel = stop - start; const int steps = std::floor(travel.norm() / ds); for (int i = 0; i < steps; ++i) { double ratio = static_cast<float>(i) / steps; Eigen::Vector3d position = start + ratio * travel; Eigen::Affine3d tr; tr = Eigen::Tr...
1
ed687d173d6f827defe1ac378a757f40
eea2fea4f3b48cc0025817b8b99bca57
Handel request to home page from users when they want to see not read complaints#
class complainController extends Controller public function index() { }
0
c4f4484557b26b0e601e05b0a48c373c
4e513338c56a454f8b5e40ac2b525e61
Dispatch IP address from given IP pool in round robin manner
func calcLoadBalancerIP(ipn *net.IPNet) net.IP { nid := ipn.IP.Mask(ipn.Mask) return ip.NextIP(ip.NextIP(nid)) }
0
0ec700440353018988ea6ffb18e673b2
49dd3186f1e5dd9608eb01d00011b663
Get the song from hav but missing from hac. Optionally create the songs on hac
{ if(!is_a($db,"SQLite3")) { trigger_error("Handle passed to function get_deleted_song is not a valid database.",E_USER_ERROR); return false; } $song=false; $statement=$db->prepare("SELECT details,added,count,lastreq FROM oldsongs WHERE id = ?"); if($statement !== false) { $debug=$statement->bin...
0
ced9e38aed8bf76749e0b423c6a2c659
fe21c7c18e2c53c1a43f0ee89e414ae1
生成词汇向量,积累出现的次数
word_vec=zeros(len(vocablist)) for word in inputset: if word in vocablist: word_vec[vocablist.index(word)]+=1 return word_vec
1
41ab0ede82c9f5fc48eef470ee2f9766
e2644bb553ea32da4a2d2072612dcf05
returns array of matching indices
function iterator_methods:indices(...) local arg = pack(...) return iterator(function(self, idx) while true do idx = idx+1 local current = pack(self()) if not current[1] then break end local eq = true for j=1,#current do if current[j] ~= arg[j] then eq = false break e...
0
8ba300b555662ea63303b73e008b8f78
1171d98bfececcf7fd378d5cffad6482
Returns the integer length of the largest chain collision.
int longestChain(HashMap* hm) { int i, max = 0; for (i = 0; i < hm->tableSize; ++i) { if (hm->table[i].size > max) max = hm->table[i].size; } return max; }
1
8b52bdd5d3e761dae7a192b3c67c7a11
fbf1c126d0ca8a2d4b449b9afa643334
Returns the remote contact identifier
class ContactBinding extends BindingAbstract public function getLocalId() { return $this->local_id; }
0
388d29ab02d5dc857271b38b66682087
e14358e5d4731bc5e8f7e79e36b18f75
calculates the qe for the specified input vector Calculates the quantization error of the input vector specified by its name, that is the distance of the given input vector to the winner unit on the som. (it is not clear yet, whether this unit must be the same as the unit this element is mapped onto, or whether during ...
checkVectorDimensions(v.length); double d = 0; Iterator<Entry> it = iterator(); Entry e; while (it.hasNext() && (e = it.next()) != null) { d = Math.max(Math.abs(e.getValue() - v[e.getIndex()]), d); } return d; }
1
bb58c9d0c4b792299daf914b4702022a
7c88fc0e65ac468ade7d48018de4e43b
Gets identifiers of attributes to return for each result. If is null, then all attributes are returned for each result.
public class SearchControls implements Serializable public String[] getReturningAttributes() { return attributesToReturn; }
1
5f65de4b17af2a28cba2a4a25d5cfa8f
7fc7dfae2cf1f0bf2b7db22dfcab5682
Generates curl 3D Clover Noise at a specific point.
float fIntensity = 0.0f, fAmplitude, fFrequency, fTotalAmp = 0.0f; fAmplitude = 1.0f; for (m_uOctave = 0; m_uOctave < m_uOctaves; m_uOctave++) { fFrequency = (float)(0x1 << m_uOctave); fIntensity = fIntensity + InterpolatedNoise3D(x * fFrequency, y * fFrequency, z * fFrequency) * fAmplitude;...
0
e5be4be7ec601c2e82aceec14f5f5bc7
e068977e86e3be5d3e3d33185a0104c0
이미지 매트릭스를 Blue, Green, Red 채널로 각각 분할 후 단일채널을 이용해 히스토그램을 계산한다
h, w, c = image.shape imghist = np.zeros((256, 3), np.uint32) a = np.arange(0, 255) for row in range(h): for col in range(w): b = image[row, col, 0] g = image[row, col, 1] r = image[row, col, 2] imghist[image[row, col, 0], 0] +=1 imghis...
1
1be8ab9ddf6d319874a7f544be6fe587
04d443c516dd8e0990a0d0d679de417f
获得商品的关联文章
class GoodsArticleModel extends Model public function getArticle($goods_id){ return $this->alias('obj')->field('obj.*,a.name as article_name')->join('__ARTICLE__ as a on obj.article_id=a.id')->select(); }
1
24ba2506adfcd6b11fa7d799d1d65b6c
b0cdbd5691a0eac6fecefbe8e1224bda
得到SD卡根目录.
public class SDCardUtil public static String getRootDir(){ return Environment.getRootDirectory().getAbsolutePath(); }
0
352e54e98b33aff42543dac824167113
db92dec7b775b5bcf57ff49c9851c9a3
Deletes all rows from the advert table.
{ global $wpdb; $tableName = $wpdb->prefix . 'advertising_settings_log'; $wpdb->query($wpdb->prepare('TRUNCATE TABLE %s', $tableName)); self::l('Deleted all Logs'); }
0
a85278c485ed47dd337df14b3cfe16c9
af3769efe216b5dddd54be173768579f
inception v3模块 用来减少grid-size
super(SEModule, self).__init__() self.avg_pool = AdaptiveAvgPool2d(1) d = max(channels // reduction, L) self.fc1 = Conv2d(channels, d , kernel_size=1, padding=0, bias=False) self.relu = ReLU(inplace=True) self.fc2 = Conv2d(d , channels, kernel_size=1, padding=0, bias=Fa...
0
906fef1ce02d56645161ea1c2e92e720
b021154f926f243caeaac861b4f522d4
随机找到二维数组中的空白位置
blank_list = [] for i, items in enumerate(t): for j, item in enumerate(items): if item == 0: blank_list.append((i, j)) return blank_list
0
c8d77a3ef591b551fa2c1f3f8b6086d8
0cd3ed0574982ab4c20219ed27235f4a
Restituisce il cessionario/committente della fattura.
public String getInvoiceCustomer();
1
ec4bdbae6fd4c4ceb8f22f76da83492e
639cf13fb8f61914755f43ef99a415df
Validate input from the GET parameters for a valid url It should be called for any parameter passed to an sql query as an url to protect injection attacks
if (isset($_GET['url'])) { return $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL)); } }
1
f2c04461b5917bb358b54c8a3d098624
90e51369d7d5af446c3959da12ba2da5
查询职位权限列表
public class UserInfoActivity extends GaveAuthority public void getJobLists() { JSONObject job = new JSONObject(); try { job.put("authent", tools.getValue(Constants.AUTHENT)); job.put("type", "ROLE_JOB_LIST"); job.put("timeLong", ""); } catch (JSONException e)...
1
15803c1e78a77ab8d3287d7e426c7700
af21e3dd9ab01cbc806728aeea7052d4
Erstellt Kundenrechnung.
namespace ApplicationCore.BuchhaltungKomponente.AccessLayer string ErstelleKundenrechnungPDF(KundenrechnungDTO krDTO, IList<TransportplanSchrittDTO> tpSchritte, GeschaeftspartnerDTO gpDTO, List<string> wege);
1
e6e3b9fdd2369b775cfdac3be4cb2036
8f654ddcb758570da6f5b579dda3506e
Removes an object from the LocalStorage.
class StorageService remove(name) { window.localStorage.removeItem(name); }
1
f473e68158a75ad45e17af3b21abf14e
ef5f538b12e12316bdd8e712eb4c5f64
根据组织ID将当前组织和子组织的管理用户都查询出来
public List<TccEmployee> queryUserListByOrgId(Long orgId) { DetachedCriteria criteria = DetachedCriteria .forClass(TccEmployee.class); criteria.add(Restrictions.eq("enableFlg", EnvironmentVariable.ENABLE)); if (orgId != null && 0L != orgId.longValue()) { List para = new ArrayList(); List<OrganVO> resul...
1
271fdd699d14fe0bcc20551004b8f793
f5cb27eeed9cdbb3cb7b339b908711e2
Show all the given messages. It is a assumed that these messages make up a single chunk and can be inserted together. If not, {@link #showMessage(BaseMessage)} should be called multiple times.
if (messages == null) { return; } for (int msg : messages) { removeMessages(msg); } }
0
8387bac1d25684152d05e8e35b9d15f1
60a6410c403e731113788094dd6e582c
enable the filter group box since these results can be filtered
public partial class Modules_Configuration_Manager_confMngrManageSDPHierarchy : System.Web.UI.Page protected void btnViewFilter_Click(object sender, EventArgs e) { radgrdAllGrouping.Rebind(); }
0
1adf7d5ba6b6b2c41878fce13c3082af
5823caf9b987c633b973911b400e5aa4
renvoie vrai si la chaine passée est un opérateur
def is_operator(elem): s_elem = elem.strip() if s_elem in operators: return True if s_elem in OPERATORS: return True if s_elem in WORD_OPERATORS: return True return False
1
2a22f831f4fa20325ec4b98f330545bd
1608a2247c8d2bb183c0e7b1e8727fb2
Returns a <see cref="GraphicsCard"/>-Array containing information about all mounted graphics cards.
IntPtr properties, uint numberOfDevices, IntPtr[] devices, IntPtr notificationCallback, IntPtr userData, out Result errorCode);
0
338ef8fcead1f287ad47dd2f9d951c10
da5973b25663d0a1ed0a8cf570ffbe10
Callback for when an ARP request has timed out, and we want to consider the destination unreachable. This will purge all packets in the packet queue for the IP address associated with the request.
void arp_drop( void *p) { struct arp_tab *ap; ap = (struct arp_tab *)p; if(ap == NULL) return; stop_timer(&ap->timer); if(ap->next != NULL) ap->next->prev = ap->prev; if(ap->prev != NULL) ap->prev->next = ap->next; else Arp_tab[hash_ip(ap->ip_addr)] = ap->next; if(ap->pending != NULL){ struct ip ip; ...
1
48f3fd21d9f273e4be31800b97e73c62
fb5a3eb8e8b6d64409f9fb3c8732e4b5
查询指定栏目下的子栏目(包括所有递归子栏目) 父栏目,查询根栏目为空
{ string sql = "select * from T_Column where C_ColumnParent=@parent and C_ColumnDelStatus!=1"; SqlParameter[] sp = { new SqlParameter("@parent", parent) }; return SqlHelper.ExecuteDataTable(sql, CommandType.Text, sp); }
0
1448e8e743477b43fd3a51e32058c417
0c68ec2c63b9f9e40e3019e055897708
Opcode $84: STY zp
static void OPC_6502_81 (void) { unsigned char ZPAddr; unsigned Addr; Cycles = 6; ZPAddr = MemReadByte (Regs.PC+1) + Regs.XR; Addr = MemReadZPWord (ZPAddr); MemWriteByte (Addr, Regs.AC); Regs.PC += 2; }
0
373c40c7adf4e7a5757908b06fec79d4
5c1f31685bdc9f716ea417f0cf0019fe
获取分类下指定难度试题数
QuestionDao questionDao = DBHelper.getSingleton().getDaoSession().getQuestionDao(); QueryBuilder queryBuilder = questionDao.queryBuilder(); return queryBuilder.where(QuestionDao.Properties.Difficulty.eq(difficulty)).orderAsc(QuestionDao.Properties.Frontend_question_id).list(); }
0
55185b3a58e93c219f0459f6f7627a9c
616801fb9bfe23992cc5e4f466a606b9
Attempt 1 : Complete search. Try all root to leaf paths. Parent conveys 'root to child' distance to child through an argument. Each node passes that information to its child till we reach leaf node. Let an int variable gmax hold the largest root to 'leaf path'. Initially gmax=0; At leaf node we check if its distance fr...
namespace BraneCloud.Evolution.EC.GP [Serializable] [ECConfiguration("ec.gp.GPNode")] public abstract class GPNode : IGPNodeParent public int PathLength(int nodesearch) { return PathLength(NODESEARCH_ALL, 0); }
0
a09c43a87af134994e0d366762b3342e
190c9f480d996279634276147f2c8379
根据角色id和权限id删除一条信息
public int deleteauth(Long roleid, Long authid) { RoleAndAuthKey pojo = new RoleAndAuthKey(); pojo.setRoleid(roleid); pojo.setAuthid(authid); int i = roleAndAuthMapper.deleteByPrimaryKey(pojo); return i; }
1
77b5c85920b307fc9ed8a6caee5b3c66
4567bcb0c06fe520e22fadc486e06321
将一个位转换为bool
{ return (num >> (pos) & 0x01) == 1; }
1
97ad0a0660dd5de3632ae70bb4f6c2be
3516e0286d20c2f1efd4cbc757cfa09e
display one image
class ImageController extends Controller public function index() { return view('single'); }
0
d93ebc0fa14d4759fe7d5890aef5da02
40c6a2449e2bef13c1ac546d0529b369
Send data to digipots
{ if(Cloud.connected()) { dpDoubleSoil_humidity+=0.1; dpDoubleAir_humidity+=0.1; dpDoubleTemperature+=0.1; dpDoubleIllumination+=0.1; dpIntCO2+=1; Cloud.writeDatapointNumberDouble(DPID_NUMBER_SOIL_HUMIDITY, dpDoubleSoil_humidity); Cloud.writeDatapointNumberDou...
0
1b7636b83ee591afab6d72159f3f0cb8
825c79161d5734d7b5742eef83847bc1
打印大写字母Q
public class q112_Print97 public static void main(String[] args) { int k = 1; for(k=1;k<=97;k++){ System.out.print("*"); } }
0
e6413b98ef98d293021b551addf32a9c
8d27866894864c9ee7f4cff3ec104316
convert the pixel values back to 0-1 range
def pixel_to_01(image): return image / 255.
1
e2406118750712c98e4e1e2feca42b30
636e89b38c5a180e83a7c4e4b3ff5ad8
Returns the minimum number of digits allowed in the integer portion of a number.
public abstract class NumberFormat extends Format public int getMinimumFractionDigits() { return minimumFractionDigits; }
0
4c54a4a8f02028d335ef610f0e9c22e1
aa3ef25ce31695235597cce5694f1052
Changes the amount of the currently selected type of contribution.
class MultiplyEntryForm(npyscreen.ActionFormWithMenus): def change_type(self): self.values_to_tmp() self.parentApp.tmpEntry_change_type = True self.parentApp.setNextForm('EntryChoose') self.parentApp.switchFormNow()
0
d707a550f8220e79ca11f6942b8990eb
a2ba3b957a84fa2b028bb3aa2b344485
发布新的站内消息
class MessageController extends AdminbaseController public function create(){ if(IS_AJAX){ if($data=$this->message_model->create()){ $this->message_model->send_users_id=(int)session('ADMIN_ID'); $title=$this->message_model->title; if($data['receive_mem...
1
4abd2491f5be3fe2cb4c3dc424fe66a8
48eb78a9e65e00d9fb932b0052eccb31
The middle panel on the UI.
mainPanel.setName("IntermediatePanel"); KeyListener keyListener = new ValueEditorKeyListener(); JToolBar toolBar1 = new JToolBar(); toolBar1.setFloatable(false); toolBar1.setRollover(true); toolBar1.add(unboundLToggle); toolBar1.add(closedLToggle); toolBar...
1
8323bd6e4c24768f6cc830d054cba071
8df65459e11a937284e831471a04f223
Returns the value of the '<em><b>SShort Circuit</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>SShort Circuit</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The ...
boolean isSCTP();
0
257c195ddbc6bcdb78bbe622bdad306c
9783640a3e8c3759316fdf45e3e5c84f
根据流程实例ID删除任务实例
boolean deleteProcessInstance(String modelId);
0
d521434b207fd8844b5b9ff4a82a3fed
57167dc4380e71c079abc25f289088e5
Removes rows containing specified text. For example, the extra rows showing totals can be removed by specifying the string "Total
{ for (int row = 0; row < rowCount(); row++) { if (data(index(row, 0)).toString() == tagID) { removeRow(row); } } return submitAll(); }
1
642069c3d8d17819de03d94490ffb863
5a4b5aae668b1d9d29c3ad5893c3525f
缓存用户访客总数,初始化
class BackController extends CommonBaseController private function _init_visitor() { $this->visitor = new \Admin\Visitor\admin_visitor(); }
0
fbc88b909aba8fcad741f301069d57d5
0d4d366019bce5c4e9497e1c6bc4baea
Subclasses must implement this method which will be executed if cron is enabled
abstract class MultiProcCronBase protected function init() {}
0