query_id
string
corpus_id
string
query
string
code
string
label
int64
ba9eed002f4c5fd4919f062b8714d518
93da8fbf9e026e6b21365ffe071ea40b
<--- removes leading new line chars
func strSlices(str string) []string { strSlices := strings.Split(str, "\n") strSlices = strSlices[:len(strSlices)-1] return strSlices }
0
f1225c9dff3e4f3c080bdeb9b6d3d20d
87a422ac8b8ff98c01249725501ab170
Extracts data from 'str' and converts it to a vector of 'cellContents_type' elements. Ignores spaces.
class Analyser vector<Element> splitstr(string str) { inputstr = str; strlength = str.length(); wordmaxlen = 0; vector<Element> vec; size_t i, j, epos; Element e; for (i = 0, j = 0; i < str.length(); i++) { if (str[i] == '.') { continue; } if (!isdigit(str[i])) { if (i - j > 0) { ...
0
704b347074b14e01a07d83855f2694a3
7f3752c3d8a024bc35dff6ccb6a761f9
Metodo que inicializa el player y todos sus parametros especificos POSICION, FRECUENCIA, DURACION, EFECTO Y TIMER
void FinalEfecto (fsm_t* this) { piLock(PLAYER_FLAGS_KEY); flags_player &= ~FLAG_PLAYER_END; piUnlock(PLAYER_FLAGS_KEY); TipoPlayer *p_player; p_player = (TipoPlayer*)(this->user_data); p_player->posicion_nota_actual=0; p_player->frecuencia_nota_actual=p_player->p_efecto->frecuencias[p_player->posicion_nota_...
0
8643fdf27437bb17101299a43ef60c39
5ea6e375fc9c10ff3dd0747b1e19c7c8
The inner (non-parallel) computation of an SRU.
def f(cur_x_times_one_minus_f, cur_f, cur_state): res = cur_f * cur_state + cur_x_times_one_minus_f return res, res return base.Fn('InnerSRUCell', f, n_out=2)
1
4df8aa8286b85e42b5d19ee5c40417ae
c11af7abc81495d71b74f51a0ccd1752
A test that a diagonal line won't be drawn for invalid coordinates
function testInvalidCoordinates() { getNorth() .itsNumericValue() .then((northVal) => { getSouth().clear().type(`${northVal}`).blur() cy.wait(10) getSouth().itsNumericValue().should('be.lt', northVal) }) getEast() .itsNumericValue() .then((eastVal) => { getWest() ...
0
44b55c1ff420e28a6a133a51bcc7738b
389fed4bc599311b7b1b73d00fb2474a
判断当前日期是否是一周的第一天
public class DateUtils extends org.apache.commons.lang3.time.DateUtils public static Boolean firstDayOfYearIsMonday(String day) { if (StringUtils.isNotEmpty(day)) { String year = day.substring(0, 4) + "0101"; Calendar calendar = Calendar.getInstance(); calendar.setTime(parseD...
0
57e11fdcff471a5eeb357bfac626b381
4ee928c37c30e81a3c9d0171543ca1f7
캘린더 이름에 대응하는 캘린더 ID를 리턴
resultList = [] page_token = None while True: cal_list = service.calendarList().list(pageToken=page_token).execute() for calendar_list_entry in cal_list['items']: if calendar_list_entry['summary'] == cal_name: resultList.append(calendar_list_entry['id']) p...
1
ff5a92d097c0d5e99542508ccb1ee8af
75cb1082184ce28ec44f8f070e23908a
复制变化的文件到单独的目录
def myCopyType_Files(serveProject): type_file = 'sourceimages' serFileName = os.path.join(serveProject, type_file) allfiles = mc.ls(type='file') folderType = [] if allfiles: for eachfile in allfiles: try: texFileName = mc.getAttr('%s.fileTextureName' % eachfile) ...
1
a70a0ed58a5c1e3aca16f75217b1994b
9e996c1b94e41c9c9b5223e6d76b4001
Compute the voxelwise mean of a Nifti 4D file. This is the numerator of the first term of the SFS expression.
def create_mean_volumes(unweighted_volumes_fname, out_fname): fslmaths = get_fsl_command('fslmaths') bash_command = fslmaths + ' {0} -Tmean {1}'.format(unweighted_volumes_fname, out_fname) subprocess.call(bash_command.split())
1
bd394437649e9ef3be9efd700aab8955
5abddbfc5adc94979cd19aa3e64ad795
Get 1D map depending on pt and flavour
_th = astLib.astCoords.calcAngSepDeg( self.clusters[icl].ra, self.clusters[icl].dec, self.px_ra, self.px_dec ) _r = self.da(self.clusters[icl].z) * np.tan(_th*np.pi/180.) / rescale shp = self.map_template.data.shape maps = [] if maptype == 'tsz' or maptype == 'both': ...
0
c41feb4b88d27321da02f84cf6ce6779
db3ac336ad06216ec186e8fd7a41503d
r"""Returns all edge attributes stored in the graph store.
class Graph(ABC): def get_edge_attrs(self, s, t): return self.get_edge(s, t)
0
a17b3ef1acfc3558da89477e4da8c6bc
df93ca75dbf9a45c83283c922ad22cbe
Alternate constructor based on a serie instance only
ApplicationPacket::ApplicationPacket(string &serie){ packet_hdr_serie *hdr = (packet_hdr_serie*) serie.data(); service = hdr->service; size = hdr->size; const char* packet_payload = serie.data() + HeaderSize(); payload = string(packet_payload, size-HeaderSize()); }
1
a6678637bb7d84ae4c06af7631892a5b
a3fe61a82d1d288eadbd663f8e6cef69
Returns the count of cost share transactions bypassed
group_cep = cep.groupby('group') df = pd.DataFrame(index= group_cep.indices) df['threshold'] = (group_cep['Identified'].sum() / group_cep['Enrollment'].sum()) * MULTIPLIER df['meal'] = group_cep['meal'].sum() df['applied_threshold'] = df['threshold'] df.loc[df['a...
0
cda92f3ca156e865af7def1ee359a518
e7e704e7641238664acfece30a3c3b67
Indica al generador de dominios que debe utilizar dominios falsos generados automáticamente.
public function setIsNotGenerator();
0
92864680c233311b3c59762e10533095
74b1027addeadbf730f176c6de265dbf
Send POST request for a report with AWQL and returns Response object.
class MWSConnection(AWSQueryConnection): def request_report(self, path, response, **kw): return self.post_request(path, kw, response)
1
7ac42e904da041f2db8b7ba5d9f68931
240cf45ca408e39a0b836d704d84a991
在测量结束后,立刻设置下拉标准高度为View的高度
if (event.action == MotionEvent.ACTION_DOWN) { mTargetView = findTargetView(this, event.rawX, event.rawY) if (mTargetView != null) { removeExtraHeight() calculateMaxRadius(mTargetView!!) invalidate() } } }
0
e416cbd2c1f5089833c1fb77c64dd1f1
5022a8f4f918f232948917c9415bcbdf
Re-dimensionalize any set of trajectories.
{ for (vector<vector<VectorR3>>::iterator it = trajectory.begin(); it < trajectory.end(); ++it) { for (vector<VectorR3>::iterator v = (*it).begin(); v < (*it).end(); ++v) { (*v).x /= scale.x; (*v).y /= scale.y; (*v).z /= scale.z; } } double x = trajectory[0][0].x - translate.x; doub...
1
190c95365fa7d38478597d8db8f5ad83
aaa71792287200c719225133ecba81d4
회원의포인트 상황을 보는 메서드
Point memberPoint = null; Connection con = getConnection(); PointDAO pointDAO = PointDAO.getInstance(); pointDAO.setConnection(con); memberPoint = pointDAO.selectMemberPoint(user_id); close(con); return memberPoint; }
1
ae731492905dacc852e06275231c03a1
12f0307732cd68586dd320dd9191c692
Gets (as xml) the "HorizontalAccuracy" element
org.apache.xmlbeans.XmlString xgetHorizontalAccuracy();
1
c49757757c8a27836dfa521d5f274bb0
e2e9de29459734cb4f0f3b050059b574
判断当前圈子是否在有管理权限的圈子之内
class Circle{ public static function is_circle_admin($user_id,$circle_id){ if(!$user_id) return false; return CircleRelate::isset(array( 'user_id'=>$user_id, 'circle_id'=>$circle_id, 'circle_role'=>'admin' )); }
1
096ed6cab3c07ad07614960a356761c8
f0f4e4c0e5c415a1746ab07942630e96
Deletes the instances pointed to by the given query (specified by the query string). /resource/?field=value
class SolrClient public function deleteByQuery($query) { }
1
6986ceb700acaa779281fdcff35f1d49
62406ccc9de6168ddcb6f6afa0c6d2a9
Calculate control variables related to engine on/off state
cmd = Command( 0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_DO_ENGINE_CONTROL, 0, 0, start_engine, cold_start, height_delay, 0, 0, 0, 0) return cmd
0
0ea695a5e4ff7f9a67c5aeb1d67b1fb8
e38e6c45dc02345eb5f3c75a366a9db0
记录IOS设备信息
class ILog private function getIosMessage(){ $iosMess=array(); $pattern = "/([\w\W]+?) \(([\w\W]+?); ([\w\W]+?); ([\w\W]+?)\)/i"; preg_match_all($pattern, $_SERVER["HTTP_USER_AGENT"], $matches); if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $iosMess['ipAddr'] = trim($_SERVER['HTTP_X_FORWARDED_FOR']); ...
1
0f7bc4430b8249dc11ab8e8521c75251
39415cda174248ecb9b31a0366eec8de
Método para animar cada letra
contador++; if (contador==4){ if(indice<animacao.length-1) { indice++; } else { indice=1; } setImage(animacao[indice]); contador=0; } }
0
51f91dcd7f3cd63f034e9295ddbd0403
4e178c29ce44a354ab0039dd40b82141
编辑求助内容
$info = $this->getPost(array('id','title','content')); $info = $this->_cookData($info); $result = Gou_Service_Help::update($info, intval($info['id'])); if (!$result) $this->output(-1, '操作失败'); $this->output(0, '操作成功'); }
1
dd9a6b26b666541ab17fd011e7bafdea
9fa123b4d5b409f43de1c1fda8373513
Construct source, target pairs from cluster
targetClusters := make([]workv1alpha2.TargetCluster, len(state.candidates)) for i, cluster := range state.candidates { targetClusters[i] = workv1alpha2.TargetCluster{Name: cluster.Name, Replicas: state.spec.Replicas} } return targetClusters, nil }
0
d4ea3d6bd6a932cab25f422265c3a982
378724ddcdf4b81d3f8a8ef91060fac9
Invokes supers implementation to uninstall any of its state. This will also reset the <code>LayoutManager</code> of the <code>JRootPane</code>. If a <code>Component</code> has been added to the <code>JRootPane</code> to render the window decoration style, this method will remove it. Similarly, this will revert the Bord...
@SuppressWarnings("serial") // Same-version serialization only public class MetalRootPaneUI extends BasicRootPaneUI private void uninstallClientDecorations(JRootPane root) { uninstallBorder(root); uninstallWindowListeners(root); setTitlePane(root, null); uninstallLayout(root); in...
1
b9ffc887b2660def5f831e725575e87c
22cbbd9c006a3577e016a9d1e669afbd
List all VirtualNetworkSites
namespace Elastacloud.AzureManagement.Fluent.Clients.Interfaces List<VirtualNetworkSite> GetAvailableVirtualNetworks();
1
1ccfc1dd77c23fd3da55a0248781de14
416e04eea57a5d16144348db479b8b88
List of properties that must be filled for the given shape.
class Service(object): def required_properties(self): return set(p for p in self.property_definitions if p.mandatory and not p.default)
1
a8ed35992c14e26add05d0f08cd4fe43
4160678e0c621f81c849167d6471ba50
remove and element; throw EmptyStackException when stack is empty
T pop() throws StackEmptyException;
1
ddc793051c8a1f543d87318bcfa08345
ef35907cc2b05b2fc9952e42efd786ee
Get geometry column name, fall back to 'geometry
class HanaGeometryColumns(models.Model): def geom_col_name(cls): return 'column_name'
0
4c339ccde0e5b55b35260c9ec49bd030
7753860c6d676ffa10e787b167c36d29
Cleanups the reference lines.
{ ModelCurve modelCurve=doc.GetElement(new ElementId(339205)) as ModelCurve; using (SubTransaction str=new SubTransaction(doc)) { str.Start(); modelCurve.ChangeToReferenceLine(); str.Commit(); } }
0
9b9d46eeb8b919dc907f36873c7e577f
65a37722aa0d585fde6a25fb8dc7edb3
Set number of characters to mask from left.
public class MaskingSetting public int getCharactersMaskRight() { return charactersMaskRight; }
0
7b2b85a96189dc8833be7a1cb13f251a
21f70ed12869e614d9aa8e7d96aaeb80
Sets the id in the array of a list object. Does not persist.
class DataListDecorator extends DataList public function setByIDList($idList) { $this->dataList->setByIDList($idList); }
1
6258a6577e75b2eab29099f6d34fbda2
093fd2f083b31da5312c54b767d76c34
自动分配等候室,并更新led主屏幕,更新等候室屏幕
function AllotTable(roomaddr, tableId, nextHand) print(os.date("%Y/%m/%d %H:%M:%S ") .. "AllotTable()", "roomaddr = " .. roomaddr .. ", tableid = " .. tableId, "nextHand ="..nextHand) local addr, tableid, seatNum, amount, status, level = rCtr.tc.Call("getPlayerInfo", rCtr.selfaddr) print("addr, tableid, sea...
0
b62077c2b9bec55828fb88d45ed23f32
f3d30b2f21e6f2a8a6d3a7f4167b5941
Calculates the standard error of each of the regression coefficients.
namespace SolarWinds.Workshops.MachineLearning.Classification public class MetricStatistics private static double CalculateSlopeStandardError(double[] array, double slope, double yIntercept) { var sum = 0.0; var n = array.Length; for (int i = 0; i < array.Length; i++) ...
0
4c497c5649bae879a33606e6eefd77e7
2387f5e9960d445bb9abfcb2791513f7
Returns the current modulation.
logging.debug(__name__ + ' : get Modulation state') response = self._visainstrument.ask('MODL?') if response == '0': return 'OFF' if response == '1': return 'ON'
1
b320cd49e9137f6d92ef1e47d2699704
b1eafd6e3b3e8be702267b551614827b
Compute preferred bucket for the given pointer This is modelled after hashWord in the Haskell RTS.
{ uint64_t seed = key; int b = -1; int j = 0; do { b = j; double r = lcg_next(&seed); j = floor( (b + 1)/r ); } while(j < num_buckets); return b; }
1
1e3811b8bad27dd468783165bcb06f7d
b9e144e435c341fa6d6d769e1bfb75ac
插值查找(递归实现)
if (left > right|| findVal < arr[0] || findVal > arr[arr.length - 1]){ return -1; } int mid = left + (right - left) * (findVal - arr[left])/(arr[right] - arr[left]); int midValue = arr[mid]; if (findVal > midValue){ return insertValueSearch(arr, mid + 1, r...
1
0befe99487222d2baa080ce12ece839e
494aec7b30875ed5746310e637be782c
Transforma o código assembly em linguagem de máquina e o coloca na memória
namespace Vaquita4android.vm public class Machine public void load(string assembly) { program = parseAssembly(assembly); memory = new Memory(dynamicMemoryIndex); register = new List<object>(); mainStack = new Stack<object>(); callStack = new Stack<...
1
47841cb31be524ad3c78f760db66461e
5b79d163674aa5d3cd71fdc2311b0d77
This method sorts the monsters by atk
namespace Summons.Engine public class MonsterManager public void Draw(GraphicsDevice graphics) { monsterCollection.Sort((a, b) => a.Y.CompareTo(b.Y)); foreach (Monster monster in monsterCollection) { monster.Draw(graphics); } }
0
d55fde54e987e040d3875046f1dc7f31
06891c35e8795df155f6201a75f3adba
searches the given column of the chart for the given name of the stand and returns the y value of it
for Index in range(0,len(self.NameScoreDictionary)): if self.NameScoreDictionary[Index] == ColumnName: return Index
0
521fda7a8f0c85e471f89e359e8f7f5b
8215e3a7bf5e77e37a608195d1dc1461
Convert a vlen value to a string, by using tostring function for base type
{ TValue *o = L->base+arg-1; cTValue *mo; lua_assert(o < L->top); if (LJ_LIKELY(tvisstr(o))) return strV(o); if (retry != 2 && !tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) { copyTV(L, L->top++, mo); copyTV(L, L->top++, o); lua_call(L, 1, 1); copyTV(L, L->base+arg-1, --L->top); r...
1
4af9aeb1692564c71a00e6868d8cc16b
34f11bffbc1ca3e8ece9ad02cf697ec7
! Updates the defined slot, creating/removing buttons as necessary
if os.path.exists(shelf_path): shelf_name = cls.get_shelf_name(shelf_path) if pm.shelfLayout(shelf_name, ex=True): buttons = pm.shelfLayout(shelf_name, query=True, childArray=True) if buttons: print 'Deleting pre-existing buttons' ...
1
6eadd792088e96adff8d27a5d4941230
f9fa8833e7cdbf15cf9002a3df98fe74
#spits out function to pass to optim
h_optim = function(nparam, optim_tries, fn, gn, ...) { bestval = -Inf for(i in 1:optim_tries) { temp = optim(rnorm(n = nparam), fn = fn, gr = gn, control = list(fnscale = -1), method = "BFGS", ...) if (temp$value < 0) { if (temp$value > bestval) { bestval = temp$value; best = temp } ...
0
25daad9424e6ea29285d7d658a1b98d2
228e88d650443f444ae1e35b3e5f5837
Integral of the cube (`~astropy.units.Quantity`). The returned quantity has dimension of the data in the cube times solid angle times energy.
def unit_cube(dim=3, num_intervals=1): return functools.reduce(tensor_product, dim * (line_segment(0.0, 1.0, intervals=num_intervals),))
0
ca05aaa5ba393e83db9478c31de36b09
873b670afc35a0895dc62b9554347869
Returns a copy of self reverse sorted
namespace LangExt public static partial class Seq public static Seq<T> RevSort<T>(this ISeq<T> self) { return new EnumerableSeq<T>(StdEnumerable.OrderByDescending(self, x => x)); }
1
29615a219451b759f338f5943846ef27
fe5be9c3e17591617859c563b374df0a
Uses a lazy load method.
class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Generic\LoadingStrategyInterface public function __get($propertyName) { $realInstance = $this->_loadRealInstance(); return $realInstance->{$propertyName}; }
1
d3b794488e88c199530c685d016bf860
ad39db1c120aa04f23dbdd6425cd65b4
Clear session cookies
document.cookie = "my-session=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;" window.location = '/'; }
1
f60786e427d2f585cdaf386297b05907
5af7111278ff89117e91d97552c93656
gets random edge from working list, removes that edge from list
void RandomSelectEdge(vector<vector<int>>& graph, int& index_u, int& index_v) { index_u = rand() % graph.size(); int tmp_v = (rand() % (graph[index_u].size() - 1)) + 1; for (size_t i = 0; i < graph.size(); ++i) if (graph[i][0] == graph[index_u][tmp_v]) { index_v = i; break; ...
0
0acf0e309c7381d12305e8a77b7a7104
ddeeaca0554e6ef182303e9e524233cc
Prepares a vector in the following format: [0.1, 0.2, 0.3, ...] for use with NumPy multiplication.
v = DenseVector(v) new_array = list([float(x) for x in v]) return new_array
1
ab2c112d882f9185578f6cebd07cdfd0
814252acef2412645c14983bfeb22095
Check if value is a tz/KT address
if str(value).upper() == '__EXCEPTION__': return False try: if str(value).strip() == '': return False value = str(value).strip() isoparse(value) pattern = '[0-9]{4}((-[0-9]{2})|(-?W[0-9]{2}))$' match = re.match(patte...
0
e7cc05b1df31d64bc63b3a68992dbdce
8e05f68a6e0053e5e88243f7c2bc26fb
查看坐标点的区域配置
for ((_, ziyuandaiInfo) in resZoneProtoCache.resZoneProtoMap) { val codX = ziyuandaiInfo.coordinateX val codX2 = ziyuandaiInfo.coordinateX2 val codY = ziyuandaiInfo.coordinateY val codY2 = ziyuandaiInfo.coordinateY2 val xInRange = ((x >= codX) && (x <=...
1
3fca720a670f1a602dbad4087ad92b1b
37c0ac87886c991b479b6f17f29832a8
Determines if a <see cref="Rectangle"/> is contained inside of this instance of <see cref="Rectangle"/>
namespace Engine.FarMath public bool Contains(FarRectangle value) { return X <= value.X && (value.X + value.Width) <= (X + Width) && Y <= value.Y && (value.Y + value.Height) <= (Y + Height); }
1
99406d55d06195eb4d17a34c0bac7346
52c8fc5144db983bdcef9f63c2c02a49
Exit a parse tree produced by {@link CorgiParser#expressionList}.
public function exitExpressionList(Context\ExpressionListContext $context) : void;
1
b333cf4689f507b5d589a1cb51cf6cfd
9f0d9e26af4344751b07e2329ace14c4
AMR initialization
VOICE_PLAYBACK_MIX_MODE_t mixMode, AUDIO_SAMPLING_RATE_t samplingRate, UInt32 speechMode, UInt32 dataRateSelection, UInt32 numFramesPerInterrupt) { UInt16 output_buf_select = 0; vp_shared_mem->shared_WB_AMR_Ctrl_state = (output_buf_select << 11) | (speechMo...
1
5cfcc8ae388e20f903c8aeddc724bbce
ad0dc98cc1518dff49219adf2dc85a65
Dumps the cache of humidity values
def dump_cache_data(): datahandling.dump_pickle('metasmokeCacheData.p', {'cache': MetasmokeCache._cache, 'expiries': MetasmokeCache._expiries})
0
4d8821e733c692700678a36039dc38d9
9b058c11dab7c6f740e16b1c3a5e1283
获取登陆mole庄园的的url,不需要用户密码
fun getMcConnectUrl(): String { try { val mcProcessor = DoKitManager.getModuleProcessor(DoKitModule.MODULE_MC) val map = mcProcessor?.proceed(mapOf("action" to "dokit_mc_connect_url")) val url = map?.get("url") as String return url } catch (e: Exception) {...
1
20f64c4eafb60229cfa1507839c89eda
a3ee26e7a809bb024366d3314cd17c25
Bu metod ile developera iş ataması yapılırken, mevcut iş yükü ve verilecek işin seviyesine göre işi yapıp yapamayacağı belirlenir.
public class Developer public void changeActivity() { if (activity instanceof Sleeping) { setActivity(new Training()); } else if (activity instanceof Training) { setActivity(new Coding()); } else if (activity instanceof Coding) { setActivity(new Reading()...
0
0ac5d6e779660a8ba5e20789751a48d3
1de1942254789fc02e0a2c8a922885ec
用户点赞记录删除
class CommentService extends AbsService public function delZanRecord($uid, $id) { $entry = $this->getDoctrine()->getRepository('AppBundle:PioneerparkCommentZanrecord') ->findOneBy([ 'commentid' => $id, 'uid' => $uid ]); if ($entry) { ...
1
e6eb128d05583430c1094495dad492b5
c833d6360414a83477828a53d1933cca
Returns TRUE if the entity is new or FALSE if the entity is already persisted
namespace BootFX.Common.Entities bool IsNew(object entity);
1
6451141a9e18394522895fc3cd3d10c5
57305618627b38895c4b7e3b0faab95c
Tests that the circuit-breaker reports itself as "OPEN" if set as forced-open
DynamicProperty<Boolean> circuitBreakerForceClosed();
0
3f4a1a07e8337b1baa571a490e28b3b6
52e0b4d05a613209238866ffce22d907
Función que recibe una matriz y devuelve una lista con los promedios de cada fila
function getPromFila(mat) { let result = Array(); let suma_fila = 0; let x = 0; let y = 0; let prom = 0; while (x < mat.length) { let row = mat[x]; y = 0; suma_fila = 0; while (y < row.length) { suma_fila += ...
1
1cc05c08148cbcc03cb5257a0fbced70
669e63c7ed7c8d73c8a455f3c6acb4a0
关闭空调事件
room_id = int(self.lcd_room_id.value()) user.air_off(services,air_subs,room_id,air_monitor) air_subs[room_id-1].serve_time=0 air_subs[room_id-1].wait_time=0 air_subs[room_id-1].tem=25 air_subs[room_id-1].windmode=1 self.tem_set.setText(str(air_subs[room_id - 1].te...
1
a58c2985e01139de1cbe9c15186cfe43
c114ccd236d0cb1424171787d28d6ea1
Close JMS Senders resources, as a good practise this needs to be invoked before shutting down the Broker. Otherwise errors will be thrown from Error Listeners.
public class ConnectorMessageManager public void closeJms() { if(managerSenderReply!=null){try{managerSenderReply.close();managerSenderReply=null;}catch(JMSException e){}} if(managerSenderSession!=null){try{managerSenderSession.close();managerSenderSession=null;}catch(JMSException e){}} }
1
8d00000c081f7cb116223a3bef4c6737
b1cec4f841185b9512589961f798c336
Returns the aspect ratio of a contour (ratio of width to height)
class Preprocessing: def get_aspect(self, x, y): y_min = min(y) y_max = max(y) x_max = max(x) x_min = min(x) height = math.sqrt((y_max - y_min) ** 2) width = math.sqrt((x_max - x_min) ** 2) if height == 0: height = 1 ar = abs(width / height) ...
1
4b361a74d4228d366a3deb10ddee738c
da03368d9775a9c5c42380ed59a1b133
Set the Axis2 client stub.
if (verbose) System.out.println("Creating stub ..."); service = new MediatorService(); port = service.getMediatorPort(); if (wsURL != null) { if (verbose) System.out.println("Setting endpoint address ..."); BindingProvider bindingProvid...
1
382677377381e96e714465fe54302de2
293c0f3c26ba8a76ed44ce8c4d9f4b06
Runs on the start of Enemy's Turn. Runs once per turn.
System.out.println(); System.out.println("Enemy turn! "); setMinotaurusCoord(getNewCoord("enemy","X"), getNewCoord("enemy","Y")); if (!isMinotaurusDead()) setIsMinotaurusDead(getNewData("hasKey")); if (!isLoose()) setIsLoose(getNewData("isLoose")); }
1
3bab6f0b96710ee3b6e15385f7846eea
8eadeb1a9403a1a25bc95c7b82191185
입력한 이름과 동일한 항목의 phoneNum을 수정
if(count==0) {System.out.println("등록된 연락처가 없습니다. 연락처를 등록해주세요.");} else { Scanner scanner=new Scanner(System.in); System.out.println("수정할 연락처 인덱스 번호(0~4) : "); int index=scanner.nextInt(); contactlist[index].setName(scanner.next()); contactlist[index].setPhonenum(scanner.next()); contactlist[index].setEmai...
0
1bca095dd893c5bdab5122ae6dec6709
5b3d4838ae5019a93db570280cdd7f68
Not output for OCLC at this time.
class Document(Object, WithPowerReports, WithBatchOperations, briefcases.BriefcaseContent, WithSharing): def GetOLCRelevantAttributes(self): return []
1
79c72fe403e4712ce4124cba6bc322b0
e2d25247cc74b71335cf8b2971e6fb2e
*验证内容是否为中文、字母、数字格式,不能有特殊字符*/
var tem = $("#" + id).val().trim(); if (tem.length != 0) { var reg = /^[\u0391-\uFFE5]+$/; if (!reg.test(tem)) { $("#sp_" + id).html("您输入的中文格式不正确!"); return false; } else { $("#sp_" + id).html($("#sp_" + id).html().replace("您输入的中文格式不正确!", ""));...
0
a1952e1f3ef732e27ec01cdbd745919e
4d7ac27d6c185a078642a1a3aaf40d25
获取需要开标的定期产品
productBasicInfodf = pb.getAllProductBasicInfo(dbCntInfo) if productBasicInfodf.empty: print("表中无正在上市的数据,提前正常结束!") return finanalWorkDate = pb.getTodayDate() curHour = time.localtime().tm_hour if curHour < 17: finanalWorkDate = pb.getYesterday() destTable = "producttraded...
0
93c242f54b3d659b1ea9ac4d2fa7bef3
0df577a1ee9cd62e6d3ab45d2e7be13c
欢迎界面设计——检查欢迎界面设计功能
void Welcom() { int n = 0; system("clear"); FacePlate(); scanf("%d", &n); switch (n) { case 1:GamePlay();break; case 2:Explation(); break; case 3:Regulation(); break; case 4:exit(0); break; } }
1
c30e5a9c5dea28bd8ce689a9585ab218
3811a887984d843b1dc3a2a2951de7f7
The Laravel session must be re-loaded before each test, otherwise the session state is retained across multiple tests.
abstract class AbstractTest extends TestCase protected function tearDown(): void { app(Session::class)->invalidate(); Routes::reset(); Kernel::reset(); }
1
72b657890670221ae50e113ca1c59be9
64d1f1134a5b52fb66b3165f0af3488e
! Returns the number of scrolls (frames) per second. This is the frame rate which will be used when the scroller is in the AutoScrolling state. The default value for Maemo 5 is \c 20. \sa setScrollsPerSecond()
void Background::setScrollSpeed(int scrollSpeed) { m_scrollSpeed = scrollSpeed; }
0
3b81f53b91116b13c2af0687753b09fd
bc781706bca575e4e400d9fd69d0a23f
Nim.available_actions(piles) takes a state (`piles` list) as input and returns all of the available actions `(i, j)` in that state. Action `(i, j)` represents the action of removing `j` items from pile `i` (where piles are 0-indexed).
action_lst = [] n = state.N for j in range(n): idx = 0 while idx < n and state.board[idx*n+j] != 0: idx += 1 if idx < n: action_lst.append((j, idx)) return action_lst
0
cf9b1b82e94dac4db9c47ddea7ebd3b2
c8760962912d6a8b5b14344024a5e490
If the step string is empty then this is probably not a recipe, throw an error
if (typeof stepGroup.stepGroupName !== 'string' || stepGroup.stepGroupName === '') { throw new Error (`ERROR_INVALID_RECIPE: Missing string value for 'stepGroupName' in ` +`one of your 'recipeStepGroup' definitions ` +`(type provided: ${typeof stepGroup.stepGroupNa...
1
d7a46f6bfae51f16a7b1d08bfbdff77a
fea2b9cf355fc8afa05d6d3e8a866473
通过缓存获取系统编号清单
namespace BPMS.References public partial class BPMSServiceRef public DataTable PubGetSystemList() { string rlt = _proxy.PubGetSystemList(); return ZipHelper.DecompressDataTable(rlt); }
0
5d7187bada479bce3b3b3af2cd2b4a70
09b2afd8ee38beaefbdfb0fc35863430
Called when a craftr module is being imported before it is executed to initialize its contents.
public abstract class AnnotationModule : ScriptableObject public abstract void PreExport();
0
9dca3a891b37a552055a130285cff9bd
ee5dc2cc412eeafae70f205e4d4fa242
Gets the About Us link found in the footer
public function getAbout();
0
bb84dc92f2155e0b848747b39ffc7a70
24374acaf1eda76a31348d9717eaeef0
ファイルを元にシステム管理情報を作成します。
path = os.path.join(self.path_to_scan, name) temp_path = (path + self.__lftp_temp_file_suffix) if self.__lftp_temp_file_suffix else None if os.path.exists(path): pass elif temp_path and os.path.isfile(temp_path): path = temp_path else: raise Sy...
1
e056b1657feff004bc116180a51bea58
ff67c283cda5054402e6e51069588fe6
@brief Set the high pass filter
int32_t LSM6DSO_GYRO_Set_Filter_Mode(LSM6DSO_Object_t *pObj, uint8_t LowHighPassFlag, uint8_t FilterMode) { if (LowHighPassFlag == 0) { if (lsm6dso_gy_filter_lp1_set(&(pObj->Ctx), 1) != LSM6DSO_OK) { return LSM6DSO_ERROR; } if (lsm6dso_gy_lp1_bandwidth_set(&(pObj->Ctx), (lsm6dso_ftype_t)Filter...
1
73198eac977c5a787597535f7b4d548e
2cba1c78cc350cfa7d4fce35279547fe
修改云服务器 修改云服务器信息,目前支持修改云服务器名称及描述和hostname。 Please refer to HUAWEI cloud API Explorer for details.
const options = { method: "POST", url: "/v1/{project_id}/cloudservers/delete", contentType: "application/json;charset=UTF-8", queryParams: {}, pathParams: {}, headers: {}, data: {} }; ...
0
266d4a95012060dca7f4c6515b53b1ab
4023e551baad839a8955552a6ac392ca
获取环保标准数据的总页数
namespace AIO.xaml.Dialog public partial class StandardRepositoryWindow : Window private void GetPageInfo(string sql) { if (!_IsCalcPage) return; DataTable dtbl = SqlHelper.GetDataTable("", "", out errMsg, "Select Count(ID) AS PageSun From FoodStandard Where " + (sql.Length == 0 ? "1...
1
3b496a33b5844754775b26938ff95310
144511df2ebeb23fe16f61ed07e3b845
對齊底座
namespace Warfare public class Prototype : MonoBehaviour public void AlignBase() { transform.GetChild(0).localPosition = -centre + new Vector3(0, 0.5f * size.y, 0); for (int i = 1; i < transform.childCount; i++) { transform.GetChild(i).localPosition = Vect...
1
028262a2e27b268585abc04fb5fdc938
c2b1b4858e7dfdb66a4d73da08909ecd
Show all fields and fieldsets
for(var int = 0; int < 6; int++) { $("#fieldset"+int+"s").css("display","none"); $("#fieldset"+int).css("display","block"); $("#divFieldset"+int).css("margin-bottom","0px"); $("#submitdiv"+int).hide(); } }
0
1b0eae538d8d8517d661e275d0f24fcd
f7f09b1dae051d5922bc2d4c3c26d1e2
绑定ListView的适配器
public class MainActivity extends Activity private void setAdapter() { if (mListBeans != null && mListBeans.size() > 0) { mAdapter = new MyAdapter(); listView.setAdapter(mAdapter); } }
1
807ee334e894d9694aa6d85db4926c88
8b97749203eaab6a7b4662ceae20d099
Gets a string containing the current language initials.
namespace HelloWorldWebApp.Services string GetInitialsOfTeam();
0
bfde752d3b9416161a87f8d8e181e7bd
dd70b708298bdd69851f758df1fccf45
Load image data from disc.
function common.load_imagedata(filepath) local filehandle, err = io.open(filepath, "rb") if err then error(err, 0) end local filecontent = filehandle:read("*a") filehandle:close() return love.image.newImageData( love.filesystem.newFileData(filecontent, 'img', 'file')) end
1
884fe5274d090b7b23467b0995c3b902
2ea418a71cdb18a955e478f9aa456567
Solve a matrix recovery problem based on the given constraints and an initial guess.
class BaseIPM(object, metaclass=ABCMeta): def solve(self, *args, **kwargs):
0
b093d99eebef69fc502aa3f292eeba6f
23324543450df1f6efa987e45e5025bf
返回税种,从数据字典中读取
public class Apl0004s03Entity extends PageBaseEntity public String getTaxType() { return taxType; }
0
851af9ff3684e0bf0375f991f9cd7749
e5f5abc758afec6dbbdc960a7b44398b
中序遍历-->即按 lChild-->node-->rChild(先“左子节点”,然后“自身节点”,最后“右子节点”)的顺序来递归遍历
class BinaryTree void InOrder(TreeNode& node){ if(node.m_lChild){ InOrder(*(node.m_lChild)); } cout<<node.getValue()<<", "; if(node.m_rChild){ InOrder(*(node.m_rChild)); } }
1
56717b43e2c8b5226d61e3fa18cc38f4
58788972da46c752c5d35ddf1ef050e6
Deletes every existing variable by clearing the "vars" folder from "resources".
class e_vars extends e_object public function emptyVars() { $this->removeData(); return $this; }
0
1c592ed3e590e43fb14c80efa96fd2fb
6258b3c1aa39db4b3fd2f05120d2a1b8
Configure the component so that every dependent component or call to Resolve() gets the same, shared instance.
namespace System.IoC Continue AsSingleton();
1
d27b58f95bec815c08c0d451629b4c80
e75f9ec997d1cae7d50232fc38e6c606
Create from data in a Traversable instance.
final public static function fromTraversable(\Traversable $traversable): Map { return new TraversableMap($traversable); }
1
eb9b2dede6526f39793150ab73cfa7c0
8310146f8afdce3e9162bffb0000228b
Метод вытаскивает из армии одного юнита и удаляет его из армии
class Army public function getRandomUnit() { if (!empty($this->activeUnits[array_rand($this->getActiveUnits())])) { return $this->activeUnits[array_rand($this->getActiveUnits())]; } }
0
042298ebd3e9b44b3f7abc3ace5a9556
f8de1813cfbfa5b3936d433d221a2f80
convert a Panel x coordinate to a raw x value.
public class ChannelRouter extends JPanel{ public int colX(int col) { return colWidth/2 + colWidth * col; }
0
e3ce5d3415dd3a26a8c5c8fe19d4a386
24502f6ba878c4189c44f70165dffaa1
PE3 chip select for accelerometer
{ switch (chip) { case DRV8873_CHIP: DRV8873_CS = 1; break; case EXTSPI2_CHIP: EXTSPI2_CS = 1; break; } }
0
5357ec98d3b19be9bc85b2ea5f926f6c
f627489eeaf90692dfc6b9911e17b831
заполняет форму для неавторизованных пользователей
function refillForm() { $login = ""; $password = ""; $error = ""; if(isset($_SESSION["logInError"])) { $error = $_SESSION["logInError"]; unset($_SESSION["logInError"]); } if(isset($_SESSION["login"])) { $login = $_SESSION["login"]; unset($_SESSION["login"]...
1
d0b250aff32e03542e8f19d4b5e8289d
b12b8fc80e7dfc5d7ed375375c6585f6
function to create the randomly generated compliments
void comGen (string com[][4], string compran[]) { for (int i=0;i<4;i++) { int index=rand()%4; int row=rand()%2; compran[i]=com[row][index]; cout<<compran[i]<<" "; } }
1