query_id
string
corpus_id
string
query
string
code
string
label
int64
de3fc6b01ee7fa2c14e2b0eea89f46c0
765ac83d20dcc90f0722fceab7d37ae8
allows only valid input
public class StaffPanel extends JPanel private boolean isValidInput(String theInput) { boolean result = false; try { int val = Integer.parseInt(theInput); if (val > 0) { result = true; } } catch (Exception e) { result = false; } return result; }
1
440f859a943418743f5d5d979bf75bce
88599d81d1693eaf53d0baeda0240782
this function will create a weapons struct to pass to sendfireweapon wtype is WEAPON_XX lvl can be 0-3 shrap_b 0, 1 indicates if the weapon has bouncing shrapnal shraplvl 0-3 shrap 0-31 alternate can be 0, 1 if firing bombs 0 for bombs 1 for mines if firing bullets 0 for single gun 1 for multifire
local cfg = getConfig("alienWeaponCfg") if not wid or not cfg.weaponList[wid] then return false end if self.isGetWeapon(wid) then local propCfg = cfg.levelStreng[cfg.weaponList[wid].color] local fid = cfg.weaponList[wid].fragment if not self.addFragment(fid, ...
0
4f2855ac4b82f93514aa43c6de2057e9
d9a7f4e89d0f20b03c966636cb6676bf
{@code DELETE /m-gacha-rendition-extra-cutins/:id} : delete the "id" mGachaRenditionExtraCutin.
public String deleteYugioh(@RequestParam(name = "id") final long id) { yugiohOkugawaService.deleteYugiohOkugawaById(id); return "redirect:/yugiohokugawa?result=delete&id=" + id; }
0
ae505a6b1cd658ed62ce3bd3cd1f31f1
c200743291c152a7682f30c3e0a5cfd2
返回0:未收藏 | 返回1:收藏
{ if ($uid) { $arr = Yii::$app->db->createCommand("select qid,id from {{%collection}} where uid=" . $uid)->queryOne(); $collection = explode(',', $arr['qid']); if (in_array($qid, $collection)) { $collection = 1; } else { $collec...
1
aad7449b58114f380639bdfee6e3ee96
671dabe5576ece148eb76d2f6da9e8e5
Read a file and store each line to a vector
void fileRead(vector<string> &v, ifstream &fin) { string line; while (getline(fin, line)) { v.push_back(line); } }
1
d61aa14ad5e073078e3458cef626420f
7e09bd7c602395e4fc57c205dc8b2a05
注意这里是一个集合也就是多张图片
def load_picture(path): img = np.zeros((10, 300, 450, 3)) for i in range(10): img[i, :, :, :] = matplotlib.image.imread(path + str(i + 1) + '.jpg') return img
1
501c1dbc0228669cce9bb7584d171021
d903033bde7f485c8fed3916b1f92b96
将字符串解析为双精度浮点数,失败时返回默认值0
public class MathUtil public static double parseDouble(String value) { return parseDouble(value, 0); }
1
23b67361ecd72c924c13e1c1c13c45d8
e503171956f542dd528cbdbce52a797b
## 用于判断当前Rect对象与传入的矩形是否相交
function rectInRect(r1,r2){ return r1.left>=r2.left && r1.top>=r2.top && r1.left+r1.width<=r2.left+r2.width && r1.top+r1.height<=r2.top+r2.height; }
0
6ba0ca973edda5d77d95790d776390b1
17b7cf56341c032386b93897903f3dd8
通过请求的endpoint寻找路由函数的meta信息
{ if (isset(self::$pathMatch[$uri])) { $tmp=self::$pathMatch[$uri]; return ['method'=>$tmp['method'], 'callback'=>$tmp['callback']]; } else { return []; } }
1
c47b794c2ba8b0d84a4e11fb404a3f22
cd24fecbb1515bc5241f3f5167b22b4e
Calculates the covariance-function specific parts of the expression for the predictive mean and covariance of the gradient of the GP estimate.
void HeteroGP::query( void ) { Ksn = FGP.calc_cov( FGP.get_query() , FGP.get_eval() ); Gsn = FGP.calc_cov( NGP.get_query() , NGP.get_eval() ); kss = FGP.calc_diag( FGP.get_query() ); gss = NGP.calc_diag( NGP.get_query() ); mf1 = FGP.calc_mean( FGP.get_query() ) + Ksn * alpha; mf2 = hyps.head(1)(...
1
36dab9fe4dfe4afb0daceeb5c7f45a96
1dbcb7e20fa557c5f9dadd184c7dfaba
Load facial points and estimate and perturb face rectangle
img = self.img facerects = cascade.detectMultiScale(img, scaleFactor=1.2, minNeighbors=2, minSize=(50, 50)) self.facerects = facerects
0
e6f048d05b932493f091b8019a0edfac
daf755edbe1be9142fcb778341488e8c
Format replication database data.
return Promise.all( Object.entries(localDBs).map(([dbName, db]) => { const serverDbURL = getServerDbUrl(dbServerUrl, userName, dbName); return replicate(serverDbURL, db, { skip_setup: true }); }) ); }
0
6c88b2021d26a62db8fb58beb33748d5
d8a630b0ff66f7efddc35f130522f7a3
根据属性查询,不存在创建对象
Object value) { Assert.hasText(propertyName,"属性不能为空"); Object res = createCriteria(entityClass, Restrictions.eq(propertyName, value)).uniqueResult(); return (T) res; }
0
f68efa1d08d6dd55425b5821daf25940
4083793f23e3c9bf192fab262961aaba
success case:
func TestData_Scan_Success(t *testing.T) { r := require.New(t) m := Data{} r.NoError(m.Scan([]byte(`{"foo": "bar"}`))) var v string ok, err := m.Get("foo", &v) r.True(ok) r.NoError(err) r.Equal("bar", v) }
1
9c414f8d6bf50598cf01d02580b07f5a
b97e2d51bc17c9b62cdb9f6fcecb9975
Deletes all attacks for the given filter object.
for(var i = 0; i < attacks.length; i++) { if (attacks[i].checkCollision() || attacks[i].target.health <= 0) { attacks.splice(i, 1); i--; } } }
0
d622edc30939ebb68b31ca1148158650
241ae8951edbbbeabab5e38ae4645069
Handles the <see cref="CustomValidator.ServerValidate"/> event of the <see cref="SaveLeadRequirementValidator"/> control.
{ ITargetResponse targetResponse = BindingSource.Current as ITargetResponse; if (!IsLead) { if (lueContact.Text.Trim().Length == 0) throw new ValidationException(GetLocalResourceObject("error_NoContact.Text").ToString()); } else { ...
0
6a5f277ca596e81d7dbbf7bca6e9d138
ec4ed94ef3e5cb10febe64e6f405116a
根据完整的类名寻找相应的图数据库结点
@Service public class InteractiveGraphService public GraphNodeModel queryNode(String cql, String dbId) { LOGGER.info("查询neo4j数据,查询语句:" + cql); Dao<Object> neo4jDao = DaoFactory.create(Object.class); neo4jDao.setDataSource("csxneo4j"); GraphNodeModel graph = new GraphNodeModel(); try { List<Object> results ...
1
c82236ac2fe9be47a3f296eb99b88012
53f2cb9e26eb6260c8a8eec2b4742004
Returns whether the TOC item should be represented as open when showing the TOC. This is not a functional behaviour, but a visualisation hint of the item. Regardless of this state, the item can be expanded and collapsed freely when represented in a TOC view of a PDF viewer.
public class OPFItem public boolean isNav() { return nav; }
0
09a4f45958ce821739fad9a0418148e8
e6d8dc6414f43eba3cf755c991eabcb6
Returns true if the cell is an edge.
namespace DualGraph2d{ public class Cell public bool IsOpenEdge(){ if(ghostSpheres>0) return true; else return false; }
0
998596fd07960279d657dd31b08b649a
023d1f716bcbd3fb731bb0d676f5e458
When the logout button is clicked by the user, the functionality is handled here. The session cookie at the client browser is destroyed, the session attributes are removed and the session itself is invalidated.
String result = null; HttpServletRequest httpServletRequest = getHttpServletRequest(); try { httpServletRequest.logout(); result = "index.xhtml"; } catch (ServletException e) { LOG.error("ServletException", e); this.state = configurationProperties.getStateMessage(LOGOUT_STATE_FAILED); } return...
1
5acb6f90810fb8ba7936e321b2f378b2
26cb6e1cb7e66f3c7b49d9b69781a887
Returns log(𝟷+𝑥).
final class Module extends Data\Module implements IReal\Module public static function log1p(IReal\Type $x) : IDouble\Type { return IDouble\Type::box(log1p($x->unbox())); }
1
068ff84bf1e4a3164eb22177b843b464
82df7d624b2dc717e9b654ae01b422ca
Find index of tree containing the smallest item in the priority queue. The priority queue must not be empty.
public class C23BinomialQueue<AnyType extends Comparable<? super AnyType>> private int findMinIndex(){ int i; int minIndex; for(i=0; theTrees[i] == null; i++); for(minIndex=i; i<theTrees.length; i++){ if(theTrees[i]!=null && theTrees[i].element.compareTo(theTrees[minIndex].el...
1
f0125216974b148981d9e14ef0bc4c8e
c4b5c58e08085af1248244a85e157898
Returns the meta object for the reference '{@link org.csu.idl.idlmm.ForwardDef#getDefinition <em>Definition</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getDefinitionElement();
1
60e4295e15256c32a2f8791bff247b83
d5b1c02ff638eb44fbbbc3abb39225b9
# http://www2.cs.uregina.ca/~dbd/cs831/notes/lift_chart/lift_chart.html
topicwords2<-function(Tmodel, t, size=25){ LIFT<-(exp(Tmodel$beta[[1]][[1]][t,])/colMeans(exp(Tmodel$beta[[1]][[1]]))) topictable<-data.frame(Tmodel$vocab, LIFT) colnames(topictable)<-c("ngram name", paste("Lift of topic", t)) rownames(topictable)<-NULL return(topictable[order(topictable[,2], decreasing=T)[1:...
1
555374cc2b19bbf40f4233018796b70e
7d9a2a2d343d058124b74dce8c0bced3
Check that method will get CLI session in the config mode and return response from the device
exit_code, stdout, stderr = execute_helper.send_mbl_cli_command( ["get-pelion-status"], TestProvisionMbl.dut_addr ) assert ( "Your device is not correctly configured for Pelion Device " "Management." in stderr )
0
f913d097bf1606348f9db459193c4c8a
e51bb7d799ab1ec15f22e3f76c6cd0ec
获取当前用户文章默认类别ID,不过不存在则创建
{ BlogTypesBLL blogType = new BlogTypesBLL(); var r = blogType.GetList(t => t.TypeName == typename); if (r.Count() >= 1) { int id=-1; r.ToList().ForEach(w => { if (w.UserId == GetUserId(userName))...
1
44f08578028c2b3f5402f1f71c5372a0
898b3cbd13f7e3fede9e4a18bc88fd0f
Fraction to Recurring Decimal
ans = "" q = n // d rem = n % d ans += str(q) if rem == 0: return ans else: ans += "." dictt = {} while rem != 0: if rem not in dictt: dictt[rem] = len(ans) rem = rem * 10 q = rem // d rem = rem % d ans =...
1
6bd35422caac5b711242b3a71430b7bd
abac1454c124c61cf1b8163ae06e6fd7
UnPauses the logic
void UnPause();
1
d6d2bb29e3ad15f279304babda4333fc
408dc2bcb5c038e20a033345bb591917
Post a response to an existing thread.
def reply() -> Response: return Response( text="this is a thread", channel=command.channel, original_ts=command.timestamp )
1
b701378c60ac415706f010303695e172
bca0e0b2cd1599ad89e9194ccb6ee658
Returns the number of spaces a tab would occupy at the current cursor position
int getTabWidth();
1
43c6e8ea8fb1602394514a55e6f5e3ad
dbd2196f41db12076bff35c4514f7c72
extract index and dataframe from pickle files to resume from last checkpoint
_prefix = '%s/%s'%(DIR, prefix) _istart = None _model = None _dmodel = None _err = None try: with open('%s/checkpoint.txt'%(_prefix), 'r') as f: _istart = int(f.readline()) fname = '%s/checkpoint.%d.pytorch'%(_prefix, _istart) log ('Checkpoint:', fname) ...
0
98b0773d4e06f9708f26b43935a17387
7889f2aae946bb7edcb04b27b57e944b
Ladet die Kontakdaten aus dem in der GUI hinterlegten Pfad
QFile file(path); if(file.open(QIODevice::ReadOnly)){ QTextStream in(&file); in.setCodec("utf-8"); ui->lineEdit_path->setText(file.fileName()); while(!in.atEnd()) { Person p; in>>p.name>>p.number; personArray.push_back(p); } ...
1
c7817acf894acf8d1152b69893a52025
b728443d34af6d174ad01427a15c630b
将收件人列表信息整理成其id的数组
public class CsrMailBiz private List getAddress(LMultiData users) throws UnsupportedEncodingException { List address = new ArrayList(); int receiptUsersCount = users.getDataCount("user_id"); for(int i=0; i< receiptUsersCount; i++) { LData detailUser = users.getLData(i); address.add( new InternetAddress(d...
0
81cfeba640371df59c65f8f4ad7e2e9e
9f85cf81fc9a8c39e51776fd6960bd48
Add features based on existing features, only relates to transactions (like transaction month).
def add_features(df): df['flight_dist_sig'] = df['FlightDistance']/df['FlightDistanceError'] df['NEW_FD_SUMP']=df['FlightDistance']/(df['p0_p']+df['p1_p']+df['p2_p']) df['NEW5_lt']=df['LifeTime']*(df['p0_IP']+df['p1_IP']+df['p2_IP'])/3 df['p_track_Chi2Dof_MAX'] = df.loc[:, ['p0_track_Chi2Dof', 'p1_trac...
0
36b0ee18120116e0ff3d103a7d1adaf0
9f00de592655604ac9eab92a9decb6ce
Called when the camera has finished animating at the end of the scene.
[RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(NavMeshAgent))] [RequireComponent(typeof(FieldOfView))] public abstract class BaseDungeonEnemy : MonoBehaviour, ICollideable public void AnimationEnd(){}
0
c1278ef604b8db6e9402a252529466a7
5f0fbde10c964b997f5c582264622f55
Set the event time in epoch millis.
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) public class TrackedEvent extends ObjectBase public void setTimestamp(Long timestamp) { this.timestamp = timestamp; }
1
9f5e3fb2856acad438d056aaa70f7800
171783f0916447f0bdeb1296217d16c7
使用队列进行广度优先搜索, 分别记录每一个叶子节点的路径和, 如果某个叶子节点的路径sum和 target相同,则结束; 如果没有相同的, 那么就是不存在
def binaryTreePathSum(self, root, target): self.result = [] self.helper(root,[],target,0) return self.result
0
3b21949dddf74c8e3a70e16bbafb6d5a
5edd3618f25707b8a9cde41ed4c8a691
Parses a ping time response.
{ if (string.IsNullOrWhiteSpace(json)) throw new ArgumentNullException(nameof(json)); PingReply PingInfo = JsonSerializer.Deserialize<PingReply>(json, jsonSerializerOptions); PingInfo.Json = json; return PingInfo; }
1
96b8eb8a9a16dd0b06879cc1039ff596
3f04bb4c18147ec3d651a328cd3d7921
See https://www.lua.org/manual/5.3/manual.html#pdf-debug.setuservalue
assert(L != NULL); printf("%c %s = %s\n", start_char, lua_tostring(L, -2), to_lua_string(L)); }
0
a734ad7fd489fbae15c4214c3ae1f4b3
fac0da6b1e42a5bf1cbd804ce3cfa43e
MAC Address - dot
assert IsMac(mac) words = str(netaddr.EUI(mac)).split('-') macDotDecimal = '' for word in words: macDotDecimal += '.' + str(int(word, 16)) return macDotDecimal
1
8cc64c43944821830861e988f05dbda9
746f533106e5c1dbd60456e31997487e
Realiza la consulta para traer el Indicador
namespace Ecopetrol.SGMP.Web.Services.MERAK public class ComponenteMerak : IComponenteMerak public string GetIndicatorValue(PeepAccess.eIndicators RequestedIndicator) { return new PeepAccess().GetIndicatorValue(RequestedIndicator); }
1
7f9f5fda6edfe753ac2f5b72fe1ab10a
1bfab6c56732776a3536be7562755082
Test case for search_survey_question_response # noqa: E501
class TestDefaultApi(unittest.TestCase): def test_update_survey_response(self): pass
0
639d1fd8fa224d5b5f97e070af25dcd4
b888678d3a8e434702a9727d9c29ff65
Get the name of the first member with the specified value
for (int n = 0; name_priority[n]; n++) { DEBUG(name_priority[n]); for (int i = 0; i < name_cnt; i++) { DEBUG(names[i]); if (strstr(names[i], name_priority[n])) return names[i]; } } return names[0]; }
0
9e58f958c53eea97cb4fb56bdbcc2907
1d5198b1596fc710ccd94adf95ef795e
Step to next search result.
void nextSearch();
1
1c5cdd14da91f7f51ae557baf9d760e5
4a605e128047a5ea58d451f64219d96b
完全平方检查
public class JSP0050 public static boolean checkSquareNumber(double n) { if ((int) Math.sqrt(n) * (int) Math.sqrt(n) == n) { return true; } else { return false; } }
1
e2a897a5c9ee95297f01906b360cf2ea
4eb492342babf65ed6ec479bca7ea8ff
Gets the created by mobile.
{ return !empty($this->createdByProfile) ? (!empty($this->createdByProfile->name) ? $this->createdByProfile->name : $this->createdBy->username) : ''; }
0
e6185169d65515af526c5e99a3afff8e
22d5403c3df23077558ee04dd233949a
gets application developer email
class MailService public function getDevelEmail() { return $this->develEmail; }
1
a70eb1d39c4f71a73b7fa45114e545f9
17dc0970211f60e40dc290275d9c1eba
Test function to create an (n x n) matrix with random entries.
def testmatrix(nx=100): a = numpy.arange(nx*nx) a = a.reshape((nx,nx)) return a
0
9316a7155a7328ff368d6be54d359347
945d99d2668dc7168a9f3ae4b6f919a8
Performs migration of data from $current_version (the current installed version) to the given file set version
$command_definitions = $this->get_upgrade_commands(); $final_result = new Toolset_Result_Set(); foreach ( $command_definitions as $command_definition ) { if ( ! $command_definition->should_run( $from_version, $to_version ) ) { continue; } if( $this->get_executed_commands()->was_executed( $command_def...
1
0e7ede9eee34b686dedc54f52ba0a93d
ec0433f8add6449b7184ea92a06206b4
Check if it is allowed to copy folders.
{ $.PercServiceUtils.makeJsonRequest( $.perc_paths.SITE_COPY_VALIDATE_FOLDERS, $.PercServiceUtils.TYPE_POST, false, function(status, result) { if (status === $.PercServiceUtils.STATUS_SUCCESS) { callback($.PercServiceUtils.STATUS_SUCCESS, result.data);...
1
1bd3acdcfa0d8ab10d525d7a3869971b
7157e305bc9bc109edcf23a50596b97a
Pogledam imam li novih poruka. Ako da, reagiram na njih.
while True: print("\nWaiting for new messages...") start = len(self.get_messages()) while len(self.get_messages()) == start: sleep(1) print("New message arrived!") self.get_messages()[0].open_web()
1
ceec02f7646f4f62a6db04542e03919f
42c4cb4213dd898542405ddc3fb2b785
mp_item_plntg_m 총 갯수를 조회한다.
List selectMpItemPlntgMList(MpItemPlntgMDefaultVO searchVO) throws Exception;
0
4e80e51abd780d4e06c104368851242e
3c26d4d7cffb5e0ce4d15627f75bbe45
2-byte length
class kalcmd_bluecore_msg_header(kalcmd_msg_header): def length(self): return 2
1
93a7baf1cf673310df2d3b055b6a27c4
4657356be247a3fccb1277ed3bff0430
this class represents the set of git repositories which are specified in the build_specification.xml file.
self.name = None self.xml = None self.compute = None self.frontend = None self.repo_path = repo_path self.logger = logging.getLogger(self.__module__)
0
5dff4bb7538b9bcebf6a5b74614c6284
8cd8c6c1f9737808cdb0769ec29561dc
Removes the non alphanumeric chars.
namespace HelperSharp public static class StringExtensions public static string RemoveNonAlphanumeric(this string source) { return Regex.Replace(source, "[^0-9A-Za-záàãâäéèêëíìîïóòõôöúùûüñ]*", String.Empty); }
1
5b05986f3a732b503732fdaa5859409b
12c794a16dabff8bb7bf32e45187f843
@brief Command used to write a sin wav to the DAC.
{ uint32_t count = ((uint32_t)ms*1000)/25; uint16_t counter = 25; uint32_t i; timer_reset(); for(i=0; i<count; i++) { DAC_SetChannel2Data(DAC_Align_12b_R, sine_samples[sine_samples_index]); while(abs_diff(counter,timer_get_value())<25) {} counter+=25; sine_samples...
1
daca943cca3ae2e1aa1f080180ba2bfb
04a5fee144f3c18258a16ea1efc7696d
Show details of a Marathon pod.
check.str_param(job_name, 'job_name') check.str_param(namespace, 'namespace') wait_for_job_success(job_name, namespace=namespace) pod_names = get_pod_names_in_job(job_name, namespace) assert len(pod_names) == 1 pod_name = pod_names[0] return retrieve_pod_logs(pod_name, namespace=namespace)
0
c9a1d454b5a94f71704613b9ea39bd6b
01bfcffcf8992cfd02af29a3201c4ee1
Receiving the status of all connectors and lines.
class DAQClient(ComponentName): def list_connector_states(self): return self.__client.xmlrpc.listConnectorStates()
1
43ade7342bf79e048ff3c5e02add9587
02a81c3195e38dd67273fe2bf17ef6ca
短信发送结束后处理(退回发送失败的部分余额)
class smsSingleSendQueueProcessor extends BaseQueueProcessor private function _send_sms_end($act_id,$node_id,$send_end_type='0', &$send_record_data=null){ if($send_record_data==null){ $send_record_data = Factory::getData('smsSendRecord', true); } $send_record_data->send_end_update_balance($act_id...
1
221ebd45ce1b56fc77dd315e4117b973
65fa95c3a2073d7a4c29fc88e954c71b
Ajoute un mois aux données du jeu et appelle les fonctions nécessaire pour mettre à jour les données
{ if (currentmonth == 12) { currentmonth = 1; currentyear += 1; } else { currentmonth += 1; } UpdateCalendar(); }
1
f12980437b0cdcacc4ac9322b8fab959
808856d4e9a52f24111275451cd4ceae
set up the guis for each scene
class MyScene (Scene): def setup(self): self.set_colors() self.make_list() self.make_buttons() self.set_sounds() self.set_modes() self.make_menu()
1
5c177347941c307f6ddaab39d54e8d2d
7f61448ad6da3ef0f9cb03f40c5be655
input should be array
cases like (1)
0
04619b9769cd1b53764f821d11c50f8c
8370d98a20b2b6a35a7ed30ded8c8def
Get the {@link Paint} used to draw lines. Will instantiate and a new default instance if it is currently null. To run whether or not line paint has been set, use {@link #hasLinePaint()}.
AbstractEscherOptRecord opt = getEscherOptRecord(); EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINESTYLE); return (prop == null) ? LineCompound.SINGLE : LineCompound.fromNativeId(prop.getPropertyValue()); }
0
ea9225c1a189e79f88784284b949d625
af141b674f15ece74563c540ba9e192c
搜索培训信息
try { Map<String, Object> params = new HashMap<String, Object>(); String courseName = getRequestParameter("courseName"); if (StringUtils.isNotEmpty(courseName)) { params.put("courseName," + SearchCondition.ANYLIKE, courseName); } Pager pager = new Pager(); if(null == pager.getOrderField() || ""....
1
3e88c2a20f6df1e2f5d9c331a85b3a0a
9faa827c857656bae7d43cfd895b7b36
@brief Destructor: deletes also all objects in the output and input queue
Output::~Output() { }
0
1185a8737a16f06b2e164fa38c2181d8
e99391245af95f5a01ef4c4567c21070
Implementation of LINFlexD16 error handler named in startup code.
IRQ_HANDLER(SPC5_LINFLEX19_ERR_HANDLER) { IRQ_PROLOGUE(); LinflexD20.err_lincallback(LinflexD20.device); IRQ_EPILOGUE(); }
0
6be0481f0709b4ae43695d716a370cdc
365552a78033ac21f6b23abe38bd7d52
Warps the input image according to the homography transform and embeds the result into a canvas large enough to fit the next adjacent image prior to blending/stitching.
xy_src_list, xy_ref_list, im_list, canvas_height, canvas_width, num_iter, tol): assert isinstance(xy_src_list, list) assert isinstance(xy_ref_list, list) assert isinstance(im_list, list) assert isinstance(canvas_height, int) assert isinstance(canvas_width, int) assert isinstance(...
1
e664fa0c9a4d9ac140fcb78328adbc86
d434aa3508b2e02ebad3600d172b9578
output depth map mean / stdDev normalization
color_mean = 0.18877631 depth_mean = 0.00509261 color_std = 0.07276466 depth_std = 0.00903967 image[:, :, :3] = (image[:, :, :3] / 255 - color_mean) / color_std image[:, :, 3:] = (image[:, :, 3:] - depth_mean) / depth_std return image
1
811103e6b93155bf3dc836bd2332f32f
f78d6f49349df0b7f38554b2e7b5d870
BOM needs to be added to UTF-8 encoded csv file to make it easier to read by Excel.
class CSV public function enable_bom() { $this->bom_enabled = true; return $this; }
1
f324ff36827d3b68329bada9994c2e83
df47408753c184c2edc65193c463fff8
Setter de los creditos del cliente. //
class Centralisateur public function setCreditClient(?float $creditClient): Centralisateur { $this->creditClient = $creditClient; return $this; }
1
51c156f8feda43822a671c09ad41bc7b
db1d22184a2696b0ef55d7e2fcd19406
Danh sách thuê bao người dùng
{ $bq = $this->em->createQueryBuilder(); if ($user->getLoaiUser() == 4) { $bq->select('nguoinopthue') ->from('Application\Entity\nguoinopthue', 'nguoinopthue') ->join('nguoinopthue.usernnts', 'usernnts') ->where("usernnts.user = ?1") ...
1
3de3d8d8dc23d3fdd40333150187d30c
ebead244d42c1d166ca31b55dbb72186
打开仙尊充值界面
public class TwoChargeWnd : SubWnd void Recharge(GameObject _go) { GameCenter.uIMng.SwitchToUI(GUIType.RECHARGE); }
1
3e28c01e9294cc70ee4c95558e05c0a9
caf16f0e97621978a57db624f82f7f25
Järjestää listan syntymäaika_järjestykseen
this.#items = this.#items.sort((a, b) => a.dateTime - b.dateTime); return this; }
1
b3e6cae9b89e5fc46c5e94347b87d494
b753376498a22469ab39885c3dcbc160
设置人员介绍
@Module({ dynamic: true, store, name: "user"}) class User extends VuexModule implements UserDTO private SET_INTRODUCTION(introduction: string) { this.introduction = introduction; }
1
950fdd30a501083b52e2ea956cdd4748
60e707942281f5021c08051d932a0c96
This method returns true if the color sensor has detected the black boundary line.
if (mColorSensor.getBrightness() >= mThreshold) { return true; } else { return false; } }
0
b84ecc364d9f6b2f2693317a806898ee
0eb1d0c4ac867c06ce407f2f93cfec74
Display the specified Moon.
class SolarplanetController extends Controller public function show($id) { }
0
aa14599dc3fdfa9cc81a7c3c247b77b9
0fa1c9fd5b7efa53781622bb8e5d40df
NOTICE
void cmd_crypt_notice(const char *data, SERVER_REC * server, WI_ITEM_REC * item) { char bf_dest[1000] = "", *msg; const char *target; void *free_arg = NULL; char *marked; if (data == NULL || (strlen(data) < 3)) goto notice_error; if (!cmd_get_params(data, &free_arg, 1, &target)) ...
1
87f1016f164181a56b1d1b0d442dd41f
99c5cf003b1ae95fe8aa0829758d4011
Writes a set of entries to the writer, which provides efficiency benefits over writing each entry individually. It also ensures that the either all of the entries are written or in the case of an error, no entries are written. Setting a value to NULL, will remove the entry.
{ foreach (var e in _entries) { p.BeginTask(1.0f / (float)_entries.Count); e.Write(file); p.EndTask(); } _size = (uint)_entries.Count * NefsHeaderPt2Entry.SIZE; }
0
65bacbfebf7fcd2dd115ab1b11a1803e
5056c29fd951b984afcd9a2d377c4cea
Create the Residual Neural Network
return nn.Sequential( nn.Conv2d(in_channels=1, out_channels=d1, kernel_size=5, padding=2), nn.ReLU(), Residual(d1), nn.MaxPool2d(2), Residual(d1), nn.BatchNorm2d(d1), nn.Conv2d(d1, d2, 3, padding=1), ...
1
d1cc61a83a5e03f1d8985dde723e5048
cb999804f9ad1a2473b76e5619f6f3e2
Returns all rows from the sessions table that match the criteria 'hostname = :hostname'.
public function searchSessions(SearchSessionsRequest $request, $timeout = false);
0
50df362ab17a7e61d537dff86d7fd72f
e80bf1cd1a424a45a89ed9663d594034
Method returns all configuration tuples contained by this {@link Settings} instance. These tuples were given to the constructor.
public class VariantT extends DerivedT public List<TupleT> getTuples() { return tuples; }
0
64d06de98c299da8bb26b56e849edda2
42816d688f45137e781df95436037f18
Scroll을 내리면 다음 10명의 Friends 리스트를 불러옴
export default class friends extends Component _onEndReached() { if (this.state.showFoot != 0) { return; } if ((pageNo != 1) && (pageNo >= totalPage)) { return; } else { pageNo++; } this.setState({showFoot: 2}); this.fetchData(p...
1
3de154349889bfabb2b1f593c3b4005f
93a314d80ab002766ff83d5d6e4780af
Create a dummy ledger-file to act as the device-under-test.
class PocketCassy(object): def __init__(self, devnode="/dev/ldusb0"): self.__fd = os.open(devnode, os.O_RDWR) self.__cmd = binascii.unhexlify("0319030F00000000")
0
a39b8db9fd8f81d62f8778e59182cc1e
832fed6734171d17be69db7f89cadfcf
가변인자로 전달된 데이터의 누적합과 누적곱을 계산하여 리턴하시오
def sum_and_product(x, y): return (x + y), (x * y)
0
ffd18f41718b18777f0ec8529e5949eb
84e74debc0c40dbd27c107c010e5ea40
Ring constructor: single element
{ parent::__construct($oSpec, $oElement); $a = array(); foreach($oElement as $child) $a[] = $child; if(count($a) != 1) throw new _Extruct_SpecError("Vector element must have exactly 1 child element."); $this->Value = $oSpec->MakeNode($a[0]); }
1
b1c96d773941816114409d3bdb54ed56
4928f1251ec93d9ad387ae83eafffa0a
Get the number of tuples that would be returned via findTuples.
int getTupleLength();
0
bdc93b87b9444aebd5af4f5d26f3157d
7f61448ad6da3ef0f9cb03f40c5be655
won't change caller's object
cases like (1)
0
c4ea6ba98fdba71ba5445f2440ccb29d
243b0a47c42666375441928c067984af
A new tag start ("<") is matched, generate new node and attach it as child for its parent
class XmlParser function _tagOpen($parser, $node_name, $attrs) { $obj->node_name = strtolower($node_name); $obj->attrs = $this->_arrToObj($attrs); array_push($this->output, $obj); }
0
2b7583e216bcfb601ebfeefc4c62167a
0bac756629b4c142f972da763000fb58
打印ASCII的Goodbye,用于程序结尾。(来源:http://www.network-science.de/ascii/ :Font: big Reflection: no
void print_goodbye(void) { printf(" _ _\n"); printf(" __ _ ___ ___ __| | |__ _ _ ___\n"); printf(" / _` |/ _ \\ / _ \\ / _` | '_ \\| | | |/ _ \\\n"); printf("| (_| | (_) | (_) | (_| | |_) | |_| | __/\n"); printf(" \\__, |\\___/ \\___/ \\__,_|_.__/ \\__, |\\___|\n"); printf(" |___/...
1
d29595f161823d3c067ed212465e6eff
3c126ec8073229cc377fc26872316fa6
This method is used to calculate the radius of the point.
namespace BeePathfinder class Corrdinates private int FindRadius(int number) { double count = 0; double i = 1; while (true) { count = (3 * Math.Pow(i, 2) - 3 * i + 1); i++; if (count > number) ...
1
58832cdf5913bc791562db9ec2a330f1
723de9a301bd8d119b657a8765577230
FUNCTION : krui_getUnitOutput PURPOSE : NOTES : Function has no effect on the current unit. RETURNS : Returns the output value of the unit. UPDATE :
FlintType krui_getUnitOutput(int UnitNo) { if KERNEL_STANDARD return( kr_getUnitValues( UnitNo, SEL_UNIT_OUT ) ); else { #ifdef MASPAR_KERNEL return( krff_getUnitValues( UnitNo, SEL_UNIT_OUT ) ); #else KernelErrorCode = KRERR_NO_MASPAR_KERNEL; return( 0.0 ); #endif } }
1
f245b42e8b88179bc293b0303b118d0c
ec6c489fc8391853ea4221dc3f43c0bd
复制网络爬虫文件夹
function fcopy(from, to) assert(type(from)=="string" and from~="", 'fcopy 参数 1 异常') assert(type(to)=="string" and to~="", 'fcopy 参数 2 异常') os.execute('cp -rf '..sh_escape(from).." "..sh_escape(to)) end
1
459e972931ae875263a4d467fc29d257
998bae1f063ae623281eca2dec9d8213
create a mapping from the label number (some number between 1 and 102) and the actual flower name.
def read_labels(): imageLabelAssociation = {} with open('../../../trainLabels.csv', 'r') as csvfile: reader = csv.reader(csvfile) for row in reader: imageLabelAssociation[row[0] + '.jpeg'] = row[1] return imageLabelAssociation
0
f65b1ab3ab7783c79067a1896a35ec4f
ec0b843f30ff44539eaea5f287172f1a
show buttons for updating and creating new workflow
$(".role-form-button").show(); if (type === "add") { $(".button-form-add").show(); $(".button-form-update").hide(); } else { $(".button-form-update").show(); $(".button-form-add").hide(); } }
1
76ebf9611bde2fe98f76ab779baa3a7a
98c8d1b56a1a8884ec91006394730148
Clicking on the Clear button or opening initial display allows to initialize the input area. <BR>
public class DefineReportDataRetrievalBusiness extends DefineReportDataRetrieval implements WMSConstants public void btn_Clear_Click(ActionEvent e) throws Exception { setInistView(); }
1
5621f6cfa0e7ca95bc4d1d75f2964b17
082bc5536dd5d443a42f4d6770be8d10
@brief Perform a periodic application task. This function gets called every five seconds (SBP_PERIODIC_EVT_PERIOD). In this example, the value of the third characteristic in the MultimeterGATTProfile service is retrieved from the profile, and then copied into the value of the the fourth characteristic.
static void simple_periodic_timeout(sl_simple_timer_t *handle, void *data) { uint32_t adcValueIntmV, adcValueFramV; (void)&handle; (void)&data; adcValueIntmV = (uint32_t) (bg22GlucoseValue * 1000); adcValueFramV = (uint32_t) ((bg22GlucoseValue * 1000 - adcValueIntmV) * 1000); ...
0
93cd34e692d4ccd02fa48977a792c1c6
ff317c0cff85947e671bab47143d13a5
Function created to remove apostrophes from product names to prevent errors on PostGreSQL insert statements
class DB function cleanCityName(&$cityName) { $cityName = str_replace('\'', '\'\'', $cityName); }
0
356e34c3e70329b645cbfd2a2a48447d
47d32800d4bcfea4ac01aa8447d3158d
Send OTP message to the number
var phone = $mobileInput.val(); var token = getCaptchaToken(); var deviceId = getDeviceId() || ""; var extraData = $.extend({}, cfg.getExtraData() || {}); otpImgSuite.trySendOTP(phone, token, deviceId, extraData); }
1
1f389cb662eb3100294a2359d196befc
ba4f93e4af2c852a7bd67740c4fc2210
Save comment to order history
class MaxVision_Customoptionsedit_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController protected function _addStatusHistoryComment() { $this->_getOrderItem()->getOrder() ->addStatusHistoryComment($this->__('Updated Custom Options')) ->save(); return $this; }
1
eef55c04cd327ebfe47f012f92da3a1c
160dfc2ac8f0af9cc248709465509816
This will configure a message to be processed by a series of message consumers in a defined order.
namespace Monaco.Configuration IEndpointConfiguration ConfigureMessageConsumerHandlingChain(Func<HandlerConfiguration, HandlerConfiguration> configuration);
1