query_id
string
corpus_id
string
query
string
code
string
label
int64
cfa8a72e96fc83871f1787ed4d4b37da
5194879a721f438981e83f6e53437fa2
Mermi menüsündeki ui element lerinin eventlerini dinlenilmesini set eden fonksiyon
class frmMASVM(Ui_frmMASVM): def set_events(self): global ui ui.btnClose.clicked.connect(self.btnClose_click) ui.btnInFile.clicked.connect(self.btnInFile_click) ui.btnOutFile.clicked.connect(self.btnOutFile_click) ui.btnOutModel.clicked.connect(self.btnOutModel_click) ui....
1
45376cac55e055fc76b29703c42dcb9e
ba6a16dfde568f868544bb6cdc2de46c
Compile the end-if statements
class CompilationEngine: def compileIf(self):
0
4a66a067101332cf5333f3047f434e7c
9a09aa539f7a63e153feadd54d0aaa7d
Randomly selects a rectangle region in an image and erases its pixels. 'Random Erasing Data Augmentation' by Zhong et al. See https://arxiv.org/pdf/1708.04896.pdf
class RandomErasing(object): def __init__(self, probability = 0.5, sl = 0.01, sh = 0.05, r1 = 0.5, mean=[0.4914, 0.4822, 0.4465]): self.probability = probability self.mean = mean self.sl = sl self.sh = sh self.r1 = r1
1
f021ddfd17db1c9a1d51cf8af184548d
943161752ffe3fdeceefcf672914a2a6
Set the sort direction for field: ActiveDate (EXTERNAL_ID_ACCT_MAP.active_date)
public class ChargeDistribPercentObjectFilter extends BaseFilter implements Serializable public void setInactiveDateSortDirection (boolean ascending) { this.InactiveDateSortAscending = ascending; }
0
e77656cacdf1e99cc416e8d257730ea7
691fa97b5238fdd200f7207127d3e3d9
트리 모양으로 별을 찍어내는 함수
Scanner makeStar = new Scanner(System.in); System.out.print("줄을 입력하세요: "); int line = makeStar.nextInt(); for(int i=0;i<line;i++) { for (int j = 0; j < i; j++) { System.out.print("*"); } System.out.println(); } makeStar....
0
a97b5688c13ef0f1c90df15f33cbbb10
c69035e2c2ebc2550177e9d50738a05f
Converts Morse code into English
def decode_morse(code): raise NotImplementedError()
1
ff5ff50862b7bb4a4cbcd242a201e154
c6d72730b4a5dedc0ae68d43e3d4b326
System.Boolean WanzyeeStudio.JsonNetUtility_<>c::<FindConverterTypes>b__4_1(System.Type)
{ static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (EqualityComparer_1__cctor_m1409799842_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_0 = Type_GetTypeFromHandle_m432505302(...
0
4d18e43ce890caf5985b1afdecb753b8
6e7f27bd299a8a912d6c167fe1ac3162
This adds a property descriptor for the Positioning feature. <!-- begin-user-doc --> <!-- end-user-doc -->
public class PolarSysRoverPlatformClientItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource protected void addPositionErrorPropertyDescriptor(Object object) { itemPropertyDescript...
1
bb58482fbd7578be56ef2f00a1a013f2
dfa3dcf5cbdf6e178ddd7866180a0255
Show info for all trains
public class DetailsController : MonoBehaviour public void ShowTrainInformation() { trainName.SetText(nameconnectionclicked); trainDate.SetText(actualTrain.Date); trainDepart.SetText(actualTrain.Departure); trainArriv.SetText(actualTrain.Destination); trainTrackArriv.SetText(actu...
0
76e0c863f1adbd0165c5eb9bcce59e80
569f9e136d0e8b413367ab034d47346d
gets the actual nearest neighbour by brute force search
def nearest_neighbor(current_point, visited): min_val = 1000 nn = 0 for i in range(len(current_point)): distance = current_point[i] if distance == float(0): continue elif distance < min_val and visited[i] == "false": min_val = distance nn = i return nn, min_val
1
5d7e31b6d0154a3bfca8e93d76abad77
f3156750ade80c4d1144bc64a9a342e0
Creating the WebApp UI of our project
function App() { return ( <div className="App"> <header className="App-header"> </header> <Router> <Typography className = {styles.navbar}> <div className = {styles.tab} id="home"> <Link to="/signals-web-app/">Home</Link> ...
1
7632eb0eca7761a4ada980d2401a45f5
f0b6e81850c52ad934d4c8bf2c0c6f5e
Find the nearest 'value' from a 'array' and returns the value and its index
def find_nearest(array, value): array = np.asarray(array) near_idx = np.unravel_index((np.abs(array - value)).argmin(), array.shape) near_value = array[near_idx] return near_idx, near_value
1
21dcc0eb48a55204ed710b7227eee277
81c75c1e80b8e22d81514dce11ca7447
查询群总数
class Group_model extends ME_Model{ protected function _all_count($where) { $sql = "SELECT count(id) total FROM {$this ->db ->dbprefix('wx_group')} {$where}"; $rst = $this->db->query($sql)->row_array(); return intval($rst['total']); }
1
7f30fc014600b80e83325667a7b90eda
2d9071a280b90055efeb6ee4bf3ec9ea
Proses Konfirmasi Jaminan
{ $id_surat = $this->input->post('id_surat'); $status = $this->input->post('status'); $where = array('id_surat' => $id_surat); $data = array( 'status' => $status ); $this->m_data->update_data($where, $data, 'data_status'); $this->sendmessage_konfirm2(); redirect('penjamin/list_jaminan'); }
1
ac1669161495a37e784044dc6e2197e8
1a02f2813cd4f1eb0eb91f1ded5492a2
Detect if a commit counts as progress towards a goal.
{ return $this->commits > -1 && $this->complexity > -1; }
0
64297ca2137aa987e54558aed9e36ae1
4c4a00a34b2891cff5b6821387ed2dda
Determine whether there are any vectors stored in this object
class Vector(object): def is_empty(self): return self._size == 0
1
5c1a74a9585ba1909fab69b58f0a3506
9155747e8fd5558022b46abb1cd01948
Creates a character selection button for the user to choose what character they found
var div = $("<div>"); if (index !== 0) { div.attr("class", "character col-md-2 offset-md-1"); } else { div.attr("class", "character col-md-2"); } div.attr("id", index); var buttonContainer = $("<button>"); buttonContainer.attr("type", "button"); buttonContainer.attr("class", "btn btn-default m-3 p...
1
2e31b7842546d3f026fbdf8f2e6e439a
ed83ad50aaab6638e38b648272446c5f
Returns the PackageManager CORBA object.
if (packageManager == null) { packageManager = context.getApplicationContext().getPackageManager(); } return packageManager; }
0
940fbdd654650f9ffc718a7e9e82108e
76d3598ecf68b12e0656c495557743bf
traverse the tree to get characters and frequency values
public class HuffmanCompress private void createFreqTable() throws IOException { freqTable = new HashMap<Character, Integer>(); int charVal; while ((charVal = input.read()) != -1) { Character currChar = (char)charVal; if (freqTable.containsKey(currChar)) { ...
0
df1a5e55ae74256cba0ec26b992d0b94
ce7f5b1c57b1dcfafbed539541d8fc0a
获取某个section中的行视图
console.log('section==',section); return( <TouchableOpacity style={{ backgroundColor:'#f1f2f3', justifyContent: 'center', borderBottomWidth:1, borderBottomColor:'#e8e8e8', pad...
1
283fb07c9b277c4686420551c5a9fdfe
ad86bb219dc24388aa7500bebdfe9770
Reads the background subtraction record from a board
char buff[256]; nfd->ReadLineEx(buff); if (nfd->version >= 4.4) { nfd->ReadRecord(buff, "IIIIIBBBBBBFFFI", &ID, &define_sys, &output_sys, &layer, &color, &permbc[0], &permbc[1], &permbc[2], &permbc[3], &permbc[4], &permbc[5], &x, &y, &z, &node_type); } else { nfd-...
1
5f7c187e49fc0bf5f1f404834294bc3b
b12b158e568931a0b6cfc6b67ae7a71e
Encode a list of strings.
block_strings = [] for block in blocks_args: block_strings.append(self._encode_block_string(block)) return block_strings
0
b49010604a284e43f3a1b77c492789d1
8452e31ecf4d8334bd87f59582a996ee
薪酬审批
@Controller @RequestMapping(value = "approval") public class ApprovalController @ResponseBody @RequestMapping(value = "approvalSalary", produces = "application/json; charset=utf-8") public String approvalSalary(HttpServletRequest request, @RequestParam(value = "srid", required = false) String srid, @RequestPara...
1
4aafeac1ddf88d87dacaee45dfa82c78
3cedc5d7ff24dff317d74d250f49a017
single insertions
cout << "Testing insertion... " << flush; List<double> list1, list2; for (unsigned i = 1; i < 4; i++) { list1.append(i * 11); } list2.insert(0, 0); assert(list2.getSize() == 1); assert(list2.getFirst() == 0); cout << " 0 " << flush; list1.insert(20, 1); assert(list1.getSize() == 4); assert(list1.getFirst()...
1
7afa6f987a7223087f10d7c8f1ee0f9a
5f01f6e2e1a08bfdc95cc270a1ac33fb
Get the md5 value of the filepath specified file
func md5sum(filePath string) string { hash, err := fs.Md5Sum(filePath) log.Check(log.WarnLevel, "Getting md5sum of "+filePath, err) return hash }
1
39ecb665169092dc438dc0e06373b4bb
3be6d6b7b8526930e3ff82478914f24e
将运行完的推荐结果集储存进Mongo
class MongoDB(): def save_to_Mongo(self): try: if self.collection.insert_many(self.result): print('存储到MongoDB成功') except Exception: print('存储到MongoDb失败', self.result)
1
19d0dea783246faae9337106fc5a609b
a848c1ebecb95faee995d77c1eaa3537
执行比较符和与或运算(能比较判断的数据进行比较判断,不能比较判断的原样返回)
public final class DataExperssionFactory public static DataExperssion compare(String name, String oper, String value) { DataExperssion result; log.debug(String.format("method start String[strName:%s],String[strOper:%s],String[strValue:%s]", name, oper, ...
0
09dacbf6f0ee61bb39d2f26c276fd838
fdd16e49109d625d3424b4b38018a0e8
Don't actually delete, just mark as not active, meaning the information for the Individual is available in the future if necessary.
{ var theIndividualId: string = theIndividual.id(); delete this._isAlive[theIndividualId]; this._touched[theIndividualId] = theIndividual; this._toRender[theIndividualId] = theIndividual; }
1
6d9f9bc1c489f131c0978cbbafa73a68
94bd6315c3b41a741c0586b791b77c9e
リスト列のセルで指定したインデックスの項目を選択します。
{ grid.Focus(); if (grid.SelectionUnit != DataGridSelectionUnit.Cell) { DataGridCellInfo info = new DataGridCellInfo(SearchGrid.Items[rIdx], SearchGrid.Columns[cIdx]); SearchGrid.SelectedIndex = rIdx; grid.CurrentCell = info; ...
1
8b9eca8a690121801368149243401b67
b56a4092e9539ff81e5ce7eb79e416cd
Update Campaign view.
{ $model = $this->campaignRepository->find($id); if (empty($model)) { abort(404); } return view('pages.admin.campaigns.edit', [ 'isNew' => false, 'currencyList' => config('locale.currency_code'), 'countries' => $this->count...
1
36a483e91222a9c1c8e839c0d30702e5
e8c2deffdc3271a4a52015fc5582fa50
Gets the state of final cell which this move is about to occupy
public static class LabryntRules public static bool IsFinalState(int cell) { if (cell == 11 || cell == 23 || cell == 35 || cell == 47 || cell == 59 || cell == 71 || cell == 83) return true; else return false; }
1
f93b5d2a66701aaa2ed878cf4d880a0d
a6c1a594f73f3a7862abbd1979e823fb
Transforms a list of tuples to a dictionary
def dict_from_truple(input_list): return { key: (value1, value2) for key, value1, value2 in input_list }
1
f9a35e6d0ecc19024922d4b09389ac9e
878313b5e54e72001090cc1dcaa620f0
make sure that only one iterator is active
{ switch ( m_eActiveIterator ) { case kIter_Ownee: m_xMultiFilter.AddFilter( rxFilter ); return m_xOwneeIterator.SetFilter( m_xMultiFilter ); case kIter_InstanceRecorder: m_pxFilter = &rxFilter; if ( m_pxFilterInterface != NULL ) m_pxFilterInterface->RemoveRef...
0
f2fa88f26ab4b1d3f3ffb8512c16c888
739f60a584d4cf8d65c2a61b36215c94
<pre> Optional. Indicates the reason why the ad has been skipped. </pre> <code>string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
getAdSkippableState() { this.log('getAdSkippableState'); return this.attributes_['skippableState']; }
0
09473871318b0a79259e6beb8435bdbc
f4f8b8557dcf16d6e173e1cff97ed9e0
Metodo para comprobar si un nodo se puede agregar al camino segun su adyacencia
if(orig.esAdyacente(dest)){ longi[0]++; return (true); } Vertice v = this.buscarVertice((T) orig.getInfo()); if(v==null) return (false); v.setVisit(true); for(Object v3: v.getVecinos()){ Vertice vert = (Vertice) v3; ...
1
163a90bad41cebcffe0b20a07cca3b36
be31b0bdf7f613ff039c0b251d9fc5df
Devuelve el texto con la linea actual
class ProcesadorPDF(object): def get_linea_actual(self): return self.lineas_fichero [ self.num_fila ]
1
6cdf0388dc8ac7e38f703988211dcfea
734f37b59a3794f7c3668acf95217faa
Returns a text of all particleEffects to let the user easily view them
public class ParticleEffectSystem : MonoBehaviour public List<ParticleEffectListing> ListAll() { List<ParticleEffectListing> result = new List<ParticleEffectListing>(); foreach (Sojo sojo in sojoSystem.GetAllSojosOfType(SojoType.ParticleEffect)) { result.Add(new ParticleEffectListing(sojo.id, sojo.n...
0
f6fd9a1130d267733e21936c5a01150a
0984a553c3b30358bc2b492d55e2c3a5
Get the provisioning state of a resource group.
class ManagedNetworkGroup(pulumi.CustomResource): def provisioning_state(self) -> pulumi.Output[str]: return pulumi.get(self, "provisioning_state")
1
5d2dba8889123af60164cbfb13358f9d
03b9b23c0f725ff5f31f5109c38f835a
Gets all HTTP GET arguments from the HTTP GET argument collection specified by a variadic amount of predicate handlers.
export class HttpGetArgumentCollection extends HttpArgumentCollection findAllBy( ...predicateHandlers ) { return super.findAllBy( ...predicateHandlers ); }
1
ae736af4041fe5816868318f66e53055
b3464597ecba09070aedc2bed1051fd1
Print scaling factors.
if self.cfg['multiplicative_denoising']: self.gamma_shape = self.cfg['gamma_shape'] self.gamma_scale = 1.0 / self.gamma_shape if self.cfg['gaussian_process_denoising']: self.gp_rescale_factor = self.cfg['gaussian_process_scaling_factor'] self.gp_sample_hei...
0
a38874180c25d8f544ac43f48abd2de4
ffb10e287106c8ae5a553f05812188dd
Sets metallic factor; linear multiplier. Affects roughness channel of `metallicRoughnessTexture`. See {@link getMetallicRoughnessTexture}.
export class Material public get metallic(): number { return PythonInterop.getFloat(this.interop, `${this.accessor}.metallic`) }
0
7834f9438ace0fd9ed0bcb01334b7e68
756b649ee9e7aff4c411efb4e6d66025
클릭하면 랜덤한 데이터를 가지고 옴.
class App extends Component componentDidMount() { this.randomList(); }
0
afa4826d2c5e32b78b061a0f4fc6d796
9cbd91e1ee933f3da51d6a156375a489
Checks if the password needs to be changed for the specified <paramref name="user"/>.
namespace Raven.Identity public class UserStore<TUser, TRole> : IUserStore<TUser>, IUserLoginStore<TUser>, IUserClaimStore<TUser>, IUserRoleStore<TUser>, IUserPasswordStore<TUser>, IUserSecurityStampStore<TUser>, IUserEmailStore<TUser>, IUserLoc...
0
264269d03f26da869e2e33b3a97ff4ed
47eed75dc275344c52396884bc5bf219
Copy text to ttbuf, wordwrapping as necessary.
static void Wordwrap(UBYTE *text) { UBYTE *p; long line,lastsp; line=0; lastsp=-1; Freebuffer(&ttbuf); for(p=text;*p;p++) { if(isspace(*p)) lastsp=ttbuf.length; Addtobuffer(&ttbuf,p,1); if(*p=='\n') { line=ttbuf.length; lastsp=-1; } else if(ttbuf.length-line>7...
1
a3bd1ac084ad6ae97ded6471ef23bb28
d048f46c187a7a5223702f266c6794bd
Tests to see if an enemy is touching the hero, or the floor
public class EnemyController : MonoBehaviour void Update () { notHittingEdge = Physics2D.OverlapCircle(edgeCheck.position, 0.1f, whatIsGround); if (!notHittingEdge) { isMovingRight = !isMovingRight; } if (isMovingRight) { transform.localScale = ...
0
6e5064244bce5c136260876017e0bef0
7bd1dfe80c9f5313cd97b86b4a9d3a7e
This function is for reading objects from txt files. It takes the filename as input and then sends the objects to the according scenario mapping functions.
try (BufferedReader br = new BufferedReader(new FileReader(objectsFile))) { String text; while ((text = br.readLine()) != null) { String[] entity = text.split(","); float x = Float.parseFloat(entity[XCOORD]); float y = Float.parseFloat(entity[YCOORD]); ...
1
0a5696cdb6febdabbc189c20091ddf88
17043202f106d847e3fcfc2445913b7f
Exit a parse tree produced by {@link MocaSqlParser#alter_assembly_drop}.
void exitCreate_assembly(MocaSqlParser.Create_assemblyContext ctx);
0
354f0742e6e623ebff38825bdf3ae0cb
683e781480bfebd54437d5a5e9282236
修改柱状图series配置
var option2 = { title: { x:'230px', y:'10px', text: '柱状图数据展示' }, tooltip: {}, xAxis: {data:xAxis1}, yAxis: {name:"商品数"}, series: [{ name: '商品数', type: 'bar', data: series1, barWidth: 2...
1
cafc8ae5514c9d1796b5bfc4c2333228
bb28b50e8cbb9d7b5459c78132526665
Regresa el objeto '<em><b>Tipo Usuario</b></em>' que corresponde al nombre del elemento definido.
{ synchronized (monitor()) { check_orphaned(); com.bbva.general.entities.TipoCambio target = null; target = (com.bbva.general.entities.TipoCambio)get_store().find_element_user(TIPOCAMBIO$0, i); if (target == null) { throw ne...
0
09f327a51452c2e551b0de5bbf30a3d3
63e142de2d8fcabb0c5cebdd7aefa25a
dada una población, retorna una lista con las partículas asociadas
sumaF = 0 for i in range(len(slot)): sumaF = slot[i] if sumaF >= numA: return poblacion[i]
0
710c9d3cc8fe7c006b438bfa485f0c3e
0e968d270d243d44b1ec16d34ba128c5
Metodo para intercambiar la posicion de un item con el simbolo que se encuentre en su lado derecho item
if (jlistLeft.getSelectedIndex() != -1) { jlistModelRight.addElement(jlistLeft.getSelectedValue()); int i = jlistLeft.getSelectedIndex(); jlistModelLeft.remove(i); jlistLeft.setSelectedIndex(i > 0 ? i - 1 : 0); jlistRight.setSelectedIndex(jlistModelRight.size() - 1); } }
0
43304af474d6107cb422094ca95f8d0a
eb798b3ccae17f646d9053acb7f35455
Check that the insert and backbone are reasonably spaced.
self.sim.reset() self.sim.run(52) d = self.sim.run(600).npview() if False: import matplotlib.pyplot as plt plt.figure() ax = plt.subplot(3, 1, 1) ax.plot(d.time(), d['membrane.V']) ax = plt.subplot(3, 1, 2) ax.plot(d...
0
5ebd7ca034270b2870741fca4c092b0a
485df10e10ebe0fa3373658a67a5400e
获取指定专题的文章
class Topic extends Archive public function getTopicArticle($archiveid=null,$topicid=null,$topiccardid=null,$start=0,$length=0,$state=1) { $where = array( 'b.state' => $state ); if ($archiveid) $where["a.archiveid"] = is_array($archiveid) ? array("in",$archiveid) : $archiveid; if ($topicid) $where["a.topici...
1
458dafcff8bc5ee3390ca007978ac4e3
88e6d5e1131d2c4c6c2ecedcb0c2618d
See if the field is actively set: TrackingIdServ (PAYMENT_TRANS.tracking_id_serv)
{ if (this.Key == null) return true; return this.Key.TrackingIdFetch; }
0
dafb2bdb92db79f743cb6270342b1ccc
c2c8801a31beab300480dc51cb20f987
Starts the chatroom selection screen.
generateStringInputPrompt("New chat", "Enter chat name", "chat #" + (activeChats.size() + 1), this::switchToChat); }
0
fb5e2280b3dc03f957d545823aa1faf9
024809722d32b20a1ab59947bd99c645
添加年度灾害数据:火灾
Observable<BaseResponse> addReservoirFloodSeason(@Header("Authorization") String token, @Query("reservoirId") String reservoirId, @Query("floodYearMonth") String floodYearMonth, ...
0
144f9084593d96864da4d24ed4332287
2940fd72cea7bffd4cf3ae3e11bc18eb
函数功能: 回读TP,8 bit 返回值: 数组data地址,记录了回读的值 参数:
{ unsigned char i; unsigned char dat = 0; for(i = 0;i < 8;i++) { P16Down(); DsDelay(15); P16Up(); P16Output(); DsDelay(1); dat = dat >> 1; char x = 0; x = P16Read(); if(x) { dat |= 0x80; } DsDelay(50); } return dat; }
0
2b45423157ce359b62898545d4316ca4
569eef3fdb7060a8ce99e16c48808849
Validate a GZip Archive file (gzip or gz) Validate a GZip archive file (GZIP or GZ)
class Blister(object): def GzipCheck(filename): GZIP_MAGIC_NUMBER = "1f8b" with open(filename, 'rb') as file_check: return file_check.read(2).hex() == GZIP_MAGIC_NUMBER
1
ccd55ca0b6203c8eeb0f3ac33573fd00
1bb757a68cb50bee554c4526b4f6ee2f
http://nodejs.org/api/buffer.html#buffer_buf_slice_start_end
static evm_val_t evm_module_buffer_class_slice(evm_t *e, evm_val_t *p, int argc, evm_val_t *v) { uint32_t start = 0; uint32_t end = evm_buffer_len(p); if (argc >= 1 && evm_is_integer(v)) { start = evm_2_integer(v); } if (argc >= 2 && evm_is_integer(v + 1)) { end = evm_2_integer(v + 1...
1
5cfc565d40302c0d4c2909107e1e463b
b6d2ae9d6f4e80a04b37889f5c2f5619
Returns the meta object for the '{@link org.opengda.lde.model.ldeexperiment.Cell#getSampleById(java.lang.String) <em>Get Sample By Id</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getInspectionEvaluation_Sample();
0
91b38c8bec86dd3cef95bface2d979aa
51402fd2391c1eb4b588454ef26535ce
Gets a string describing the components of this <see cref="Matrix3x4"/>.
namespace Spark.Math public sealed class Transform : IEquatable<Transform>, IFormattable, ISavable, IDeepCloneable public override string ToString() { return ToString("G", CultureInfo.CurrentCulture); }
0
f307802e83e9dca5dd13dd126313c84f
530f6fbe90d7fca0326b07768030289c
Resets input mappings for players.
void ResetMappings();
1
c7629ad457525c014526b795960d18fa
4605cfdb21a56171e5ca35e0cc5699d8
Sets the country of this CompanyProfile2. Country of company's headquarter. # noqa: E501
class MapiContactPhysicalAddressDto(object): def country_code(self, country_code: str): self._country_code = country_code
0
6fe94103d124824b8e0a2369eccbe11a
914c856e5dee13ee5cced1ddda2bd537
行李运输质量考核预警, 每隔2s时间向队列发送消息
@Service @Transactional public class RiskInsSaleService extends BaseService public void sendMessageQueue(String json) { ResourceBundle bundle = ResourceBundle.getBundle("config.sendMessage", Locale.getDefault()); MQQueueConnectionFactory sendFactory = new MQQueueConnectionFactory(); JMSContext c...
0
0e381eee7f5b14b5f607c28808ead6be
c14bfb68ae3a78e1d406c6837674fa0a
删除一个轮播图ID和URL(根据图片地址删除)
public void deleteCarousel(String id,String url){ try { UploadUtil.deleteFileByAli(url); }catch (Exception e){ e.printStackTrace(); } carouselRepository.deleteCarousel(id); }
1
23ad17f7607281a8aa16f10c018e4b0e
a0d15c4e5fa9e03466b99b15d730cac2
发生动作是否探测到用户
void Navigation::user_detect(string user_name) { if(irobot_->robot_check_user(user_name)) setUserDetection(true); }
1
408d101fb5edd45b259eaa81cfc26c4e
0d5f804251bf2d349d40e964cb3c4879
功能:输出纬度上30-60的中纬度海区测量数据,排除脉冲混叠情况,并输出为图片 目的:来寻找合适的海雾案例
ATL03 = ph_data ATL03.sort_values('dist_ph_along', inplace=True, ignore_index=True) print(ATL03.columns.values) beg_01 = np.min(ATL03['dist_ph_along']) aboveSurface = pd.DataFrame(columns=ATL03.columns.values) seaSurface = pd.DataFrame(columns=ATL03.columns.values) underSurface = pd.DataFram...
0
5003efa4f0039d71c889c46ca517ef99
be25cc7401e55e9b0dedafa07676ef92
直播回复列表
class Replay extends Base public function index() { if (IS_AJAX) { $page = input('page', 1); $limit = input('limit', PAGE_LIST_ROWS); $rule_type = input('rule_type', ''); $search_text = input('search_text', ''); $condition = array( 'site_id' => SITE_ID, 'rule_type' => $rule_type ); $cond...
1
f3464591ce74cd1a188ab5d412d8c2a9
8c972142954b69a635da867f8d92b2b9
@brief Enable timer 2 overflow interrupt Enable timer 2 overflow interrupt
void enableTimer2OverflowInterrupt(void) { TIMSK2 |= 1<<TOIE2; }
1
fad7b680a583755cd548ac43fb68ba30
066eede9c3790d1fd835b8ed3d19cf5b
Scale YUV to ARGB down with bilinear interpolation.
namespace Lennox.LibYuvSharp [SuppressUnmanagedCodeSecurity] public static unsafe class LibYuv [DllImport(_path, SetLastError = true)] public static extern int U420ToARGB(byte* src_y, int src_stride_y, byte* src_u, int src_stride_u, byte* src_v, int src_stride_v,...
0
5cb5c758b2ecd3c347eeb84262c92c4b
94d9bae2834ef8c683b61403f1b91890
function to update gasto
public class GastoDAO public static void update(ObjectId id, String nombre, Double precio, ObjectId idEvento, ObjectId idPagador, List<Participante> deudores) { delete(id); create(nombre, precio, idEvento, idPagador, deudores); }
1
71661da109360a89fc6f61aa3992c900
912ce37456a5e683d9c290344870bc21
日付の文字列(日本時間)をdatetimeオブジェクト(UTC)に変換する
def str_to_date_jp(str_date: str) -> datetime: dts = datetime.strptime(str_date, '%a %b %d %H:%M:%S +0000 %Y') return pytz.utc.localize(dts).astimezone(pytz.timezone('Asia/Tokyo'))
0
afcdd431f8e9eebc5f2bd13015a846bc
4fa590881ca3a4ccd1f9df36327c7912
Checks toner level in cartridge.
{ try { if (instance == null) instance = new SamsungPrint(); string errorMsg = errMsg; System.Windows.Application.Current.Dispatcher.Invoke((Action)delegate { errorMsg = instance.axSSP...
1
ea3eaea84643d3ff98b09a1facc2cdb7
778d4b1f909991e4335c1cf374749993
Align two sequences x and y of equal length and report the score.
seq1 = get_sequence_string(seq1) seq2 = get_sequence_string(seq2) score = align.localxx(seq1, seq2)[0][2] return score
1
72b81189dcd93a61cef7b07cfbbabc82
a35a05ff8e032fbdf19c4720d63983ea
Returns the funct6 of a vector OP-V instruction, a funct6 specifies further specifies what instruction a given OP-V opcode refers to
int Rfunct(int instructionNum) { if(instructionNum==ADD) return ADD_FUNCT; if(instructionNum==SUB)return SUB_FUNCT; if(instructionNum==AND) return AND_FUNCT; if(instructionNum==OR)return OR_FUNCT; if(instructionNum==NOR) return NOR_FUNCT; if(instructionNum==MOVE)return MOVE_FUNCT; if(in...
0
5a796b5d40d40787a2051cd59654b782
92786893633e8dbceb9a4a21860a3f16
Inserts the KBB book values.
{ $("#editBkmkDlg-name").val(bkmk.title); $("#editBkmkDlg-url").val(bkmk.url); $("#editBkmkDlg-labels").val(bkmk.labels); $("#editBkmkDlg-notes").val(bkmk.notes); $("#editBkmkDlg-id").val(bkmk.id); if (bkmk.labels.length > 0) { $("#editBkmkDlg-labels").val(bkmk.labels + ", "); } $("#editBkmkDlg-notes").val(bk...
0
eaf29eccf4df4f9f5c1bf20259c677af
566aed7ca3a5f557caa1d52454722360
Användaren har valt att ta fram lista över övriga användare
{ IList<User> userList = _userManager.GetAll().Where(x=>x.email!=User.Identity.Name).Select(s=>new User { userId=s.userId, email=s.email}).ToList(); ViewBag.userList = userList; return View(); }
1
3bf136e2ff304c5db43cff4dccc84b58
87430a38f866e11344347b4e48b5e4d1
Создает арендатора и контактных лиц.
local select_registar = db.query( 'SELECT * FROM registrars WHERE registrar = ?' ,body.reg )[1] body.obj = 'contact' body.command = 'create' body.regid = select_registar.id local epp, add = format.epp_template( body.command, body.obj ) add.kids = {} add.kids = format.set_objects_name_id( add.kids, body.obj, body...
1
e456636dd23af5accbfb268516cfe823
7eb36c0abaadfe8dc088838204bea0c6
Edit Mode RealEstate Info
class RealestatesController extends Controller public function update(Request $request) { $validator = Validator::make($request->all(), [ 'update_name' => 'required|max:40', 'update_address' => 'max:100', 'update_latitude' => 'max:100', 'update_longitude' => ...
1
51c8f0dc88cd0ed02c2b488d22b4dc33
c4a16b0ab8920573e298152d4a28f16d
勤務シフトの終了を返す
class DispatchV2TechnicianShiftResponse public function getEnd(): \DateTime { return $this->end; }
1
21f1e16aa1253b0f583677ec8c73aa7f
0165446193c11c7d7664fcb1f355e86a
下发取消匹配消息到客户端
*matchCancel({payload}, {call, put}){ console.log('match cancel'); yield call(socket.matchCancel, payload); }
1
0aed2e3d72ecb0e8d6182ce88952e43c
b86978960d0e27c5bfe28928cb490c57
Return true if indexes should be created for the foreign keys.
public function foreignKeyChecks($on=true);
0
e944d33aeb2bdccf4f0dc4b9b0d4d6d4
5c32400dbda168e91be57543fdca1a72
================================================== konstruktor ==================================================
namespace artikel Artikeldialog::Artikeldialog(){ }
1
f11d8abffa72e6f95f35ef2efe120068
9f86b3cec1d30f05b523e2f8d8e5bd46
Tries to create an eForm template in the Microting local DB. Returns that templat's templatId
{ var client = new RestClient($"{_properties.DistributionApi}"); client.AddDefaultHeader("Authorization", $"Bearer {_accessToken}"); var request = new RestRequest("api/v1/TaskTemplates", Method.GET); request.AddQueryParameter("$filter", $"contains(Name,'{templateN...
0
4e72818bece72446b92570eaa3314eb8
30b7a083a8e7e43c85244712bbb39208
Gets the administrator login credentials for the specified container registry.
namespace PlayFab public static partial class MultiplayerAPI public static Task<GetContainerRegistryCredentialsResponse> GetContainerRegistryCredentials( PlayFabAuthenticationContext customAuthContext = null, object customData = null, Dictionary<string, string> extraHeaders = null) { ...
1
025934d15610ca86eee1469228c794a4
d5ade852bd34b7d45e605bc86e010d5a
Check that weights are (probably) being dropped out properly. There's an extremely small chance (p < 1e-86) that this test fails.
with self.test_session() as sess: self.assertAllClose( sess.run(self.value_learning.loss), [2, 2, 2, 2, 1.125, 0.5, 2, 0.5, 0])
0
8bf554f9f83290b86394a23ee196cefc
f61f79f88ac9cfa07a1e5b44a3bcef8b
Returns the first selected item, or null
get selectedItem() { return this.selectionMode !== selectionMode.NONE ? this.items._getFirstSelected() : null; }
1
b01fee811649db415426d8f0904ece29
8287872bc56bed4ae1f9fff32f9254b1
entering story creation mode
public class StoryMode : MonoBehaviour void Start () { }
0
a26b6714f95949dfe61eb8165d1f0e44
acebdaa2778918ee9c01d6e1d05d53d4
Register string types
registerSerialiser(unique_ptr<Serialiser>(new SimpleTypeSerialiser<bool>("bool"))); registerSerialiser(unique_ptr<Serialiser>(new SimpleTypeSerialiser<short int>("short int"))); registerSerialiser(unique_ptr<Serialiser>(new SimpleTypeSerialiser<unsigned short int>("unsigned short int"))); registerSerialiser(uni...
1
576d7781294ec98ec9d01014630356e2
81a73ad5e12462f9827fbaf4a18756c2
function to keep track of feed scheduling
if ( ! wp_next_scheduled( 'import_feed_daily' ) ) { wp_schedule_event( time(), 'daily', 'import_feed_daily' ); } }
1
96615d960f14f37e432e3c7aa7da88c5
d35af1aeda5a219953a60bbd249d8533
@brief Builds preset graph configurations. Not randomized.
class Simulation void configure_graph(const vector<vector<double>> &original_preference_densities) { map<int, VertexData> vertexes; for (int i = 0; i < n; ++i) { vertexes[i] = { 20, i == 0 ? 0 : DISCLAIMER, {}, original_preferen...
0
a71f916d01af239b8f8ff29f024afda3
d05f9ce7efc6d4d53a7489ab492bea87
Called by base class ObservableCollection&lt;T&gt; when an item is to be moved within the list; raises a CollectionChanged event to any listeners.
namespace Bindable.Linq.Transactions internal sealed class Transaction : ITransaction public void LogMoveEvent(object elementMoved, int oldIndex, int newIndex) { elementMoved.ShouldNotBeNull("elementMoved"); oldIndex.ShouldBe(e => (e >= 0), "oldIndex"); newIndex.ShouldBe(...
1
461dfa91a450dd83d3c1c813230e284c
c954be266ca063b21008b4fb32a62c34
Returns the total amount of currency things in circulation at each transaction ID.
{ int count = -1; return GetByCurrencyRateId(transactionManager, _currencyRateId, 0, int.MaxValue, out count); }
0
112f91ae6bbde31804464038ff7034f4
b36cae90ccb73a02ccfd827e2d60f3e1
Returns the service context, which is a summary view of the internal configuration and state data of the message context. This allows implementation of configuration-aware transports, protocol processors, handlers, and other framework extensions, without exposing all implementation detail of the message context.
public final class WF public static ServiceContext getServiceContext() { return services; }
1
6beeefe3f323f1b642871aca7e17a3fe
6c682c624d06236378e68ac83ff9dfa9
Detecting collisions in horizontal directions with raycasts.
[RequireComponent(typeof(BoxCollider2D))] public class BasicMovementController : MonoBehaviour void HitCheckX() { ColliderVertex Vertex = GetColliderVertex(); bool IsGoingRight = MoveDistance.x > 0; Ray2D[] Ray = new Ray2D[HorizontalRaycastNumber]; float rayDistance = Mathf.Abs(MoveD...
1
6f47883a549747529d4017bccf413762
e048cd1717a723b00879d8e3248db30b
===================================================================== hàm xem chi tiết nhật kí ao nuôi getDiaryDetail =====================================================================
{ $hotelfooddailies = DB::table('hotelfooddailies')->where('hotelid', '=', $id)->get();; return view('hotels.show', compact('hotelfooddailies')); }
0
d1779631f6b4d2554fdcbea22381d1bb
98a419e4cbbe406f0a6e7b1bddb06bf7
Sets all resources to specified value
namespace GMBuildCraft public class ResourcesPackets public void SetValue(ResourceEnum resourceEnum, decimal count) { var rs = Resources.FirstOrDefault(r => r.Res == resourceEnum); if (rs == null) return; rs.Clear(); rs.Add(new ResourcePacket(resourceEnum, count)); }
0
d69048efbd44eb9e03322d8978857f41
507eceb658cd3424828169fbf2437ef2
Test la création d'un échiquier
$fen = new Fen("rnbqkbnr\/pppppppp\/8\/8\/8\/8\/PPPPPPPP\/RNBQKBNR w KQkq - 0 1"); $this->assertNotNull($fen->getId()); }
1
21d2b84d741ed9f5d0047f7cc7fb7d09
40a12e492e2936fe0b5789e09db1aa35
find next token in the list and return list from next token onwards
vector<string> QueryPreprocessor::getNextToken(vector<string> queryList) { unsigned int end = 0; vector<string> result; for (unsigned int i = 0; i < queryList.size(); i++) { if (queryList[i].compare("such") == 0 || queryList[i].compare("pattern") == 0 || queryList[i].compare("and") == 0)...
1
60dc98a521210a075e79c48d30e3161e
e0bfae5f0e250cd0038e1c42548e1b20
++ Routine Description: converts from VARIANT guid (i.e. safe array of bytes) to real guid pvarGuid - variant to convert pguid - where to store the result guid Return Value: HRESULT
{ static const char k_rgchHexToASCII[] = "0123456789abcdef"; int i; if (pszGUID == NULL) { return SDL_InvalidParamError("pszGUID"); } if (cbGUID <= 0) { return SDL_InvalidParamError("cbGUID"); } for (i = 0; i < sizeof(guid.data) && i < (cbGUID - 1) / 2; i++) { unsigne...
0