query_id
string
corpus_id
string
query
string
code
string
label
int64
7b12741954af63475530f1627722a091
febfc5fbdc0df8ac1f132e49cd72d86f
GET /budget-items : get all the under budget budgetItems.
class BudgetController async all({ response, auth }) { const query = await Budget.with('user') .with('expenses') .setVisible(['_id', 'limit', 'created_at']) .where('current', false) .where('user_id', auth.user._id) .sort({ created_at: -1 }) ...
0
13355380dd3a72f9e12e8294569488f3
03826eb7262d6f9d68051c929d42401b
verif que les boutons ne sortent pas de la div
if(etatDiv01 == false){ moiMeme.className="divNoire"; etatDiv01 = true; }else{ moiMeme.className="myDiv" etatDiv01 = false; } }
0
6020531b3807c08c8650c21d999c9172
8671c772dcd5885d843215896ddd2607
Return 0, 1 or 2 if `a` is below, equal to, or above `b`.
if a > b: return 1 elif a == b: return 0 else: return -1
0
2dc0d01809f9bd253730cc325f996847
f6e95f56ee07f4134d066ec4fb322b5d
通过传入Lambda,获取并设置游戏服务器名称(延迟获取,或需要等待容器启动后才能获取到参数的,可以使用这种方式)
public class GameServerRegisterAdaptor<S, M> implements IGameServerRegister<S, M> public GameServerRegisterAdaptor<S, M> setServerNameByLambda(Supplier<String> supplier) { serverNameSupplier.setSupplier(supplier); return self(); }
1
a0a80c11f2a728856fc4f10ba20a62b6
6d318a0fd47a98b18ec316ce25312bfc
ストーリーボードを終了させ、指定したストーリーボードに動作を切り替えます。 このメソッドは遅延実行されます。
namespace Ragnarok.Presentation.Extra [ContentProperty("Children")] public class Scenario : DependencyObject public void Stop() { }
0
f1a40a6ae2d745062465bfbe4f159435
2040f4768aa725f3c90fbbd2fd4369a5
Returns the meta object for the reference '{@link epo2.PurchaseOrder#getCustomer <em>Customer</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
@ApiModel(description = "Epurse entity representation") public class Epurse @ApiModelProperty(value = "Customer reference for this epurse") @JsonProperty("customer") public EntityInfo getCustomer() { return customer; }
0
35a8917b930278cf1a86e359b805b75b
06ffbfdb51dbcdd9b788da0fb01a1b01
클라이언트DB에 채팅 데이터 저장하는 함수
{ $user = $_SESSION['name']; $this->DB_conn->query("insert into chatting (room_id, name, contents) VALUES ($id, '$user','$contents')"); }
1
1e15f81ce8ad2e27b6a5a7252bbc7259
db703c72e61743e00580a05a255579ce
调用父类的toString()方法
public class AdminService @Override public String toString() { return super.toString(); }
1
0538d8153c39e7508bc0094d9939b1a4
c2d0bcd78114846399a55a31ea5f628b
a) Function to reverse string
def reversestring(s): if len(s) == 0: return s else: return s[::-1]
1
054f5ad60afb76670639ac76604d7fa9
95d537cd1ed3f7b58ad6dea77a1b83dd
根据实体名清空编辑界面对应内容
el.scriptName.value = "" el.scriptDes.value = "" el.isUpdate.value = null el.isUpdateKey.value = "" editor.obj.setValue("") }
1
83430902941b06a267f28b75bdffa6ef
b29910f8a9a0f1a6d7f1ed12ec65b23d
Draw aircraft vector lines ("projected track lines" or "PTL")
Scalar black = Scalar(0, 0, 0); int size = 10; for (int i = 0; i < projected.size(); i++) circle(vid_frame, projected[i], 3, black, -1); line(vid_frame, projected[0], projected[1], black, size); line(vid_frame, projected[2], projected[3], black, size); line(vid_frame, projected[0], proje...
1
9f9d8e6aaed2e40175dc4e2edba778b2
df393ae0280ddecb24e9ad8385e4c6dc
Returns the value located at the end of a property tree string of format 'parentA.parentB.childProp'.
LinkedList<String> path = new LinkedList<String>(propertiesOnThePath); String lastProperty = path.removeLast(); HashMap<String, Object> objectMap = (HashMap<String, Object>) sourcemap; Object result = ""; while (!path.isEmpty()) { String property = path.poll(); if (!objectMap.containsKey(property)) { ...
1
2c28613f87aab740df72ce8c8cd46e3c
3deaa035f7a8b7ba6f320d0997de1562
base URL for the IdentityX server
class BadgrBackend(BadgeBackend): def _base_url(self): return f"{settings.BADGR_BASE_URL}/v2/issuers/{settings.BADGR_ISSUER_SLUG}"
0
2e9131e716c435a9e72cda372d127c72
9a0dc1eedb8066488ec90945f3fd390b
4. Написать метод, принимающий на вход два числа, и проверяющий, что их сумма лежит в пределах от 10 до 20(включительно), если да – вернуть true, в противном случае – false; (для точности примем, что входные параметры целочисленные)
{ int a; cout << "\nВведите a\n"; cin >> a; if (a >= 10 && a <= 99 && a % 2 == 0) cout << "\nВерно"; else cout << "\nНеверно"; }
0
52ad803932384a5b967e2b2f275bc367
2021d7972324639e4eea6bf990fa1304
リボンが読み込まれたとき呼び出されます。
{ foreach (var part in new[] { "ForearmL", "ForearmR", "HandL", "HandR", "SleeveR", "Finger" }) { SetArmorPart(part, sprites); } Initialize(); }
0
04a17df59cfb8ed7e36e6bafd266d58f
bdf0cb337243c54d2905ca0229670341
时间戳转换为yyyy-MM-dd HH:mm:ss 格式日期
public class StringUtil public static String timestampToDateStr(Long timestamp) { String date = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date( timestamp * 1000)); return date; }
1
5471c933ce99ee878f15794ba606bf10
11356b44cb5baa54ec138e8dab137a69
VO 패턴을 Map으로 변환
if (voName == null) { return null; } return tableMap.get(voName); }
0
5733b9e96da35f67c3f481b6cf18e8fd
036003fad0e475467abe480f0813e3a7
"О программе"
{ QMessageBox::about( this, app_header, "<body>" "Программа <b>BaseEdit</b> <br/><br/> " "Версия: " + ProgramInformation::version() + "<br><br>" "ЗАО \"Инкоммет\" <br><br>" "<table border=0 cellpadding=1 cellspacing=1> " ...
1
94126ed005ad5c7b0b17d434ae0eb82c
789ddc14ada1b64582fa853bfe30dee2
获取默认发布结束时间
@Table(name = "tb_pref") public class TbPref public Date getEndTime() { return endTime; }
0
31d278d6d99efd56f3dac098689f9de1
a045a9ab0c5b46077ad3781a4624e0eb
Método que calcula o valor do Benefício Mensal Simulado do Benefício de risco por Pensão por morte.
{ decimal remuneracaoFinal = CalculaRemuneracaoFinalCrescimentoBianual(); decimal contribuicaoPrevidenciariaPREVES = (CalculaRemuneracaoFinalCrescimentoBianual() - GetIndiceRgps()) * Convert.ToDecimal(0.085); decimal contribuicaoPrevidenciariaIPAJM = GetIndiceRgps() * Convert...
0
8d40be1e927efe75ff11a073f7de4a7b
6641853b8ebe003685c04dcbbdd7a5e4
Gets the path to be followed giving the minimum distance.
namespace SharpFightingEngine.Fighters.Algorithms.PathFinders IPosition GetPath(IPosition current, IPosition desired, IBattlefield battlefield);
1
f528685fbc466a33352f972a04d12110
c748045c93dd35e55240d5d76497b5d8
Process any pending changes
namespace System.Windows.Data public class CollectionView : DispatcherObject, ICollectionView, INotifyPropertyChanged protected void ProcessPendingChanges() { lock(_changeLog.SyncRoot) { ProcessChangeLog(_changeLog, true); _changeLog.Clear(); ...
1
28fae200a889dece5d586f61c8d32a2b
751aae4432da0e0933c5330488d9e1fd
修改标高区域记录
namespace CBSS.IBS.Contract bool Update(IBS_AreaSchRelation AreaInfo);
1
b2cb73d0c28ba28d3594cee0c98f0d99
0468d5d54e64d1befb5879fb7152467b
Checks to see if the value is less than zero.
function validateLessThanZero (obj) { return obj < 0; }
1
012785df45e552218eea1d896669c23c
5548d776a884bb2380138cbb9109a615
右侧课程详情页UI转换为可以打开课程的状态
courseopen_vp.isUserInputEnabled=false courseopen_vp.adapter=object :FragmentStateAdapter(this){ override fun getItemCount(): Int=2 override fun createFragment(position: Int): Fragment { return when(position){ 0->CourseNodes() ...
0
92253b9fbc32b3a4d4120b8fbbb0f343
2f92dc4ebe5bcaeb46aeec90cb5fc39c
Creates a new program counter out of a physical address. This is only useful for CPU (remember, virtual ones) designers.
class ROM: def _translate(self, address: int) -> int: if self.type == ROMType.LoROM: pc = ((address & 0x7F0000) >> 1) | (address & 0x7FFF) elif self.type == ROMType.ExLoROM: if address & 0x800000: pc = ((address & 0x7F0000) >> 1) | (address & 0x7FFF) e...
1
4d40b10e2250b700a183d188d011e41c
343e2106b60036c3ac7a86fb9d23344f
Import collected data from Activity Tables
class EloquaB2CDataReader(DataReader): def get_activity_data(self, str_act_type=None, start_date=None, end_date=None): if str_act_type == None or start_date == None or end_date == None: raise Exception('Please provide valid values for {} and {} and {} and {}' .format('bul...
1
745807ddbea3426d8ac99091dc43ea56
c9df9cd50367ca75d91188b4854d56be
Sets the -t switch (Saxon's show timing info). Disabled by default.
void enableTiming(boolean flag);
1
d388a83fcc8754c156d1cc6275289d68
e05cf76868e48e90294fad51c2835195
Checks the socket for data, and returns True if there are messages ready to be processed.
class FaucetEventClient(): def has_data(self): read, dummy_write, dummy_error = select.select([self.sock], [], [], 0) return read
1
296a2668c757b125498d5ef943d01622
ce3623f230d4bdb4ee23806846e17d5c
把获取video thumb photo 回调插入列表,统一请处理请求回调
console.log(res); const { photoList = [] } = _this.data; photoList.push({ ...file, url: serverRes + "/" + res.data, fileName: res.data }); _this.setData({ photoList }); }
1
d1f36269c43f34888cebe03c6851c47d
e9c9733e5fc987f164630ea8ff736c4a
Returns true if port exists.
namespace KR_network class PhysicalLayer public static Boolean isActivePort(String portName) { List<String> portsAvailable = searchPorts(); if (portsAvailable.Contains(portName)) return true; return false; }
1
52c15a4bea00ed3a3e03155f73abc248
42fa4926d917415007016c407a12da41
一場投球紀錄 屬於 一場比賽
{ DB::transaction(function () use ($updatedId, $playerId, $batter) { DB::table('record_batter')->insert([ 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s'), 'updated_id' => $updatedId, 'player_id' ...
0
ac6e587bb941fa953edabe109465e1f4
198b29abd228d9c82278b7e1acb28a72
Simulate a truncated Normal random variable
def truncated_normal(size, threshold=1): return truncnorm.rvs(-threshold, threshold, size=size)
1
bcd4ec27c4300a5893748355c7d9b7f8
9ae4477942be414d130b6408ff235874
Filter the query on the userimportUserForecastProcessedFlag column Example usage: <code> $query->filterByuserimportUserForecastProcessedFlag('fooValue'); // WHERE userimportUserForecastProcessedFlag = 'fooValue' $query->filterByuserimportUserForecastProcessedFlag('%fooValue%'); // WHERE userimportUserForecastProcesse...
{ if ($user instanceof \User) { return $this ->addUsingAlias(MileageTableMap::COL_MODIFIED, $user->getEmail(), $comparison); } elseif ($user instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } ...
0
bfa7a627132f9f760294a27790b65f92
92294c0815c1d33241054ed11e12287f
Check if $value is a string where the length is between $min and $max.
if(!is_string($value)) { $this -> fail++; $this -> failStatus[$label] = VALIDATE_IS_STRING; return(false); } if($min <> null && strlen($value) < $min) { $this -> fail++; $this -> failStatus[$label] = VALIDATE_IS_STRING_MIN; return(false); } if($max <> null && strlen($value) > $max) { $thi...
1
cd2e5b4a80e231964a331160b795832d
c6e799a20e8a65e0593d07893bd2d73d
Returns true if input was released. Only checks positive input.
impl<K: Hash + Eq + Copy> InputResource<K> pub fn is_down(&self, input: &K) -> bool { self.0 .get(input) .filter(|state| **state != InputState::Released) .is_some() }
0
300b418abb64843292338da1b00209eb
7e54fcc373471b9877d716abea2d258b
if true, the current selection is cancelled after an action is performed with it
class SelectCoords extends Activity doCancel() { this.cancelable = true; }
0
05fe5e16084429f75c0b00d32b64f225
74d9a757f377eed0903fac8fa4d53255
Notify children when the parent is edited
public void changed() { super.changed(); SensorResource parent = (SensorResource) this.getParent(); parent.changed(); }
0
cd9fe3addf976144b158b0f57ce9d816
53a197a251eeb59f81874f72dcf22735
METHODS *************************************************************************************************** * NAME : IsBussinessInfoPageDisplayed * DESCRIPTION : Check if Bussiness info page displayed or not * CREATED RELEASE : 1708 * LAST MODIFIED IN : * AUTHOR : Sagar Ruikar * INPUT PARAMS : * RETURN...
boolean bstatus; bstatus = isElementDisplayed(edit_Name, true); Reporter.log(bstatus, "Main Category Name text field displayed ", "Main Category Name text field not displayed"); bstatus = isElementDisplayed(select_AssOrder, true); Reporter.log(bstatus, "Assigned order drop down displayed", "Assigned ...
0
9bfc4c59cb8071216391e1b3e8e0e920
b88f201d4358eb77b8f5d71ce3db2327
1. Rewrite current doc's imgs, css, and script URLs to be absolute before we duplicate. This ensures no broken links when viewing the duplicate.
class Module_Spider extends BaseModule public function imgs2Absolute($content, $feedUrl) { preg_match_all("/\<img.*?src\=\"(.*?)\"[^>]*>/i", $content, $match); foreach ($match[1] as $src){ $content = str_ireplace($src, $this->toAbsolute($src, $feedUrl), $content); } return $content; }
1
690e685643d36dc1955cdb148d7a10c7
b6fde96c44152eb023df51d97448f264
Create the disjunction of the given nodes.
class IFilterSpecificationVisitor(ISpecificationVisitor): def _disjunction_op(spec, *expressions):
1
f9cca281a4e457b7710403f39294b259
ce647776a1296f10c1f9af03eeabfa2c
A temperature dependent KT to Joule conversion
from FluidProperties.GasProperty import k_Justi k = k_Justi(T0) result = T0 + T0 * (pow(pik, (k - 1) / k) - 1) / (etak * tau) return result
0
504c49162892571694afee0d72c7d2ff
d2575f15cbe03926f677913e1af5004d
处理融泽订单号,如果融泽没传订单号,则系统生成
class mWebservice extends Model public function gen_order_no($order_id){ $this->loadModel('mOrder'); return $this->mOrder->generateOrderNum($order_id); }
0
4f23f290001ded760d7783653210bb6f
2a8079dc459e4ff61b90fc16d1b6088a
跳转登录页面的服务指南
@Controller public class Index @RequestMapping("tenant_guide") public String tenant_guide(HttpServletRequest request) { return "tenant_guide"; }
0
cf37ac43640059b88877fcfba51cf112
80391a29cfacc0cea8dc9aab9151221c
Encrypt all properties that marked with the [Encrypt] attribute. This method encrypt only the properties of the calling model object
{ if (Disposed) { throw new ObjectDisposedException(_OBJECT_NAME); } Dictionary<string, byte[]> crypted = new Dictionary<string,byte[]>(); crypted.Add(_ATTRIBUTE_NAME, _EncryptBuffer(_CompileBuffer(attributes))); return _Mes...
0
06784842fc8fd83cbfdf2564aa9eeefe
6e229f7573185c0cec8b310d10248a04
set GPIO14 as output to trigger hw reset circuit
{ GPIO_SET_MUX_MODE(P16CFG, GPIO_MUX_GPIO); GPIO_ENABLE_OUTPUT(P1TRIS, GPIO_PIN_6); P16 = 0 ; }
0
669280f7748de29942c8abe80ecec193
45df063ef3227d4cd3fda5f312e23701
得到收件箱后缀名跟负责人的一一对应关系 主要用于跑CRM模块来自 site inbox模块的数据 此模块数据的跑到CRM后的负责人根据收件箱的品牌官网对应到某个负责人
class WebMail_Model_Mail function updateSortByUserMail($folder){ $socket = new WebMail_Model_Socket(PANDORA_SOCKET_LOCK); $socket->lock($this->path); $dir = $this->path."/tmp/classify/".$folder."/"; if(!file_exists($this->path."/tmp/classify"))mkdir($this->path."/tmp/classify"); if(!file_exists($this->path."/...
0
d4096a3ac5aac3c8a85215b47a140109
1f246eb8e404b2ffae383bfc93d2bd63
获取hotelRoomTypeId属性的值。
namespace iPow.Service.Union.Service int GetHotelTypeId(string str);
0
f7e47cbb147dc1ed940a252394b61a2a
7f73d155edd2cd10eb68d2f3e42d5717
Should return the text of the checkbox (e.g. subelements should be deleted, too). If null is returned, no checkbox is shown at all.
@BeanTag(name = "checkboxControl", parent = "Uif-CheckboxControl") public class CheckboxControl extends ControlBase implements ValueConfiguredControl @BeanTagAttribute public String getCheckboxLabel() { return checkboxLabel; }
1
9d501ef9c02289d523a7dc62e7af1903
a750612cb81c302105aee082f70228a9
# plots a convex hull around a field of points in a plot. Used for NMDS plots
{ min.x = min(data[,x]) max.x = max(data[,x]) min.y = min(data[,y]) max.y = max(data[,y]) plot(data[,x], data[,y], xlim = c(min.x,max.x), ylim = c(min.y,max.y), main="",ylab=y, xlab=x, col=1, pch=19) for (i in 1:k) { subdata <- subset(data, cluster == i) points(subdata[,x],subdata[,y],col=i+1,pch=19...
0
ac198f43041f15d34ae080b2b6322802
92162f6803fb07d67ee0b7b7d9e19f6c
通过IFA ID查询IFA关联的代理商
@Service("ifafirmFundService") //@Transactional public class IfaFirmFundServiceImpl extends BaseService implements IfaFirmFundService public List<IfafirmDistributor> getIfaFirmDistributorByifaFirmid(String ifafirmId) { if(StringUtils.isBlank(ifafirmId)){ return null; } String hql = " from IfafirmDistributor r ...
1
59a4eae5c93747f21834a07febc5dae9
539925d0ef6cd684aae6fa9f7ac4511f
sets toggle state of menu objects. if menu is currently open, hitting button again will turn it off.
namespace PicView internal static class ToggleMenus internal static void Toggle_open_menu(object sender, RoutedEventArgs e) { FileMenuOpen = !FileMenuOpen; if (ImageSettingsMenuOpen) { ImageSettingsMenuOpen = false; } if (QuickSetti...
1
7233423451195c46bb952ae677472e1d
0fee9fd1d1b07cb367d67c55d3d9e7ed
@brief Defines touch event data.
{ INPUT_MANAGER->zPrev_Touched = INPUT_MANAGER->zTouched; INPUT_MANAGER->zTouched = event->m_Pressed != 0; INPUT_MANAGER->zX_Pos = event->m_x; INPUT_MANAGER->zY_Pos = event->m_y; }
1
d43c927ab6fd28941f973053802400fd
c04265fe3d686b98b0725d709699dd09
列举在线推理服务组
def ListGroup(): request = CommonRequest() request.set_method("POST") request.set_domain("face.cn-shanghai.aliyuncs.com") request.set_version("2018-12-03") request.set_action_name("ListGroup") request.set_accept_format('json') response = client.get_response(request) response_str = str(...
1
5e99a7e67464f655e64483e613e513ef
4380bc21a8f7338c5825058b01492a29
interrupt handler for external gate signal input from synthesizer.
void Sample_timer_interrupt(void) { gSpeakerOut.PlayNextValue(); }
0
e3536050852bcf257ee8da6440d5a500
efaa9491e6b82a1ff5fd9f9a4fe9eef6
Gets the persistent and optional attributes of a device during setup. Returns: Dictionary of persistent attributes and dictionary of optional attributes.
class GazooDeviceBase(primary_device_base.PrimaryDeviceBase): def get_persistent_properties(self): names = self.get_persistent_property_names() return self._get_properties(names)
0
a35be78b65f65bd77d2da48381be9370
89a9f745018ee6d7bb944b0da5dc5745
判断数据集合无效,即对象为null或大小不大于零
namespace Knowyou.S3.CommonDefine public static class Extension public static bool IsNullOrEmpty(this DataSet ds) { bool isNullOrEmpty = false; if (null == ds || 0 >= ds.Tables.Count) { isNullOrEmpty = true; } return isNullOrEmpty; ...
1
6aa3ad35c46631c8461a909c0cc6f83c
ac510151fa3609b25cb140c8bb691467
extend region size around a detected region
{ r.x += cvRound(r.width * 0.1); r.width = cvRound(r.width * 0.8); r.y += cvRound(r.height * 0.07); r.height = cvRound(r.height * 0.8); }
0
566453e94546f93aee5c90e0a6ccd3c4
d3bc2907f46f9eec792b2c4af531a1c7
配置一个写数据源
@Configuration public class DatasourceConfig @Bean @ConfigurationProperties(prefix = "mydatasource.read") public DataSource readDataSource(){ return DruidDataSourceBuilder.create().build(); }
0
8a25c5c95272818c66c0c43b0a77e55d
e200c4d87553705ef7f40d9d26f40025
Initializes the converter to output URIs with the given target prefix. Subclasses can throw ValueError if the supplied target prefix is not supported.
class ReConverter(BaseConverter): def __init__(self, url_map, regex): super().__init__(url_map) self.regex = regex
0
9146544fe5e84fdc319f6fd62b124f04
7d23321a61484a0463649dc1bfb4aded
缓存配资需求信息
public class AutoCreateCtrl extends BaseController{ private static void addBidInfoToFlash(long userId, String userName, double amount, double apr, int period, int repayment_type, int invest_period, String name,String projectname, String description, int lock_deadline) { t_bid bid = new t_bid(); bid.user_id = userId...
1
4ba45e01a536f9c6f5a92bed6c38a591
678452c2ea11fe157d4392033e77ba0c
Sets the visible width of the `Track` instances.
self._max = max(0, mx) if self._max: self._step_width = Helper.len(str(self._max)) else: self._step_width = 4
0
4b6ca6e9b86c8709d04fd695a426cdff
ab628ab267ee4446414b693558d11a29
根据 g4 文件生成 ANTLR 的文件
public class JackCompiler private static void generateXmlFile(File jackFile) { try { JackTokenizer tokenizer = new JackTokenizer(jackFile); String outputFilename = "my" + jackFile.getName().replace(".jack", ".xml"); File outputFile = new File(jackFile.getParentFile(), outputFilename); CompilationEngine co...
0
d5f40b97552e7ef214a6fd452851d97c
5809004d666ec6143716d7db8423869f
Receive the next data word.
Uint16 USB_GetWordData() { Uint16 retVal; while (g_UsbRxBuffer == 0) {;} retVal = *g_UsbRxBuffer++; g_UsbRxPacketLength -= 2; if (g_UsbRxPacketLength == 0) { g_UsbRxBuffer = 0; if (g_UsbRxDataLength == 0) AckEp0(USB_END_DATA); else AckEp0(USB_MORE_DATA); } return retVal; }
1
5673554ad2ef2222af00a36a16bde5e0
e487287ae2d1f74363a14f1dded5729b
设置是否展示扫描结果到界面(默认为展示)
export default class ScanResultPage extends Component constructor(props) { super(props); this.state = { viewAppear: false, }; }
0
289eeae4086367de6769e1d5fdd7b8ee
ae5d03d7d58cd9b10cfa7d5836584c99
callback for PDE manager finished receiving tile information
void LandCoverTilePatchCallback::release(const TileKey& key) { }
0
f517b2e9e7fc30b75a617a93e11e4a9b
9d48f58f0aefd3107651f8896f5fdd02
该函数作为目标函数的装饰器用来标识目标函数是否需要检测服务器状态
def connector(func): def wrapper(*args,**kwargs): if not hasattr(args[0],'_check_connect'): return None if not hasattr(args[0], 'close'): return None if not args[0]._check_connect(): return None try: return func(*args,**kwargs) except: print(format_exc()) ...
1
689b8297edb6310724fc8815388f6f38
627a9dea3cbeb86a5b5e48b029bd0b33
Lowercase version of source type name.
class TypecastNotFound(Documented, KeyError): def destination_name_lower(self): return self.destination_name.lower()
0
c2b1d309b1f53353c459ad1fbaecd1aa
854af1f3e19256d8926a69b0e8fa2884
设置礼宾车价格等信息
function setPayDom(arr){ var ordertype=arr["ordertype"]?arr["ordertype"]:0; var orderid=arr["orderid"]?arr["orderid"]:""; var status=arr["status"]?arr["status"]:6; var isdriverid=arr["driverid"]?arr["driverid"]:0; if(isdriverid!=0){ var carno=arr["carno"]?arr["carno"]:""; var days=ar...
0
5669781706144e5171e3c0db5f4da284
2624bcb7cb2249d13ba41a4584754157
This function unpacks the SLQSAutoConnect response message to a user-provided response structure.
static S16 cmUnpkRguSapSta ( RlcRguSapSta *mkSap, Buffer *mBuf ) { CMCHKUNPK(cmUnpkSuId, &mkSap->suId, mBuf); CMCHKUNPK(cmUnpkState, &mkSap->state, mBuf); return ROK; }
0
fdc81248f29197b20c0ee5463b5b4617
c1774e785dc25d3b3cb8d5c961681904
腿部动作处理发送事件处理函数
def axis_event(event): if event.axis == PAD_AXIS['LINE_ARM_BACK_FORTH']: act_line_arm_forth_back(event.value) elif event.axis == PAD_AXIS['LINE_ARM_UP_DOWN']: act_line_arm_up_down(event.value)
0
ae6228e97a89992f837cfcc2e51d1597
dc9a4d6f3e5c34bb55cd428a6bbb3c53
Delete a category and its sub categories
class addressbook_bo extends addressbook_so function delete_category($data) { $drop_subs = ($data['drop_subs'] && !$data['modify_subs']); if($drop_subs) { $cats = new categories('', 'addressbook'); $cat_ids = $cats->return_all_children($data['cat_id']); } else { $cat_ids = array($data['cat_id']); ...
1
82b9984ef8cbd33507d795fe20c57328
676b393ea83124c2e41e582adeaa79a9
Set up a perfectly valid download completion intent, and expect it to fail because the download token hasn't been written.
csv = 'any.csv' creds_file = self.tempfile token_file = 'non-existing-file' creds = gdata_lib.Creds() self.mox.StubOutWithMock(ups, 'PrepareCreds') self.mox.StubOutWithMock(ups, 'LoadTable') self.mox.StubOutWithMock(mps, 'FinalizeTable') self.mox.StubOutWithMock(ups.Uploader, 'Upload') ...
0
fa960325896101dc390e485559619dee
f649f93c939fea2efdc014d5fd33683f
将邮箱中对应用户的信件提取出来
global driver index = 1 time.sleep(0.5) html = driver.page_source soup = BeautifulSoup(html, 'html.parser') WebDriverWait(driver, 10) \ .until(EC.presence_of_element_located((By.CSS_SELECTOR, ".mailList > li"))) mails = soup.select(".mailList > li") while (mails is None or mails ...
1
a307a545b157602a645e359d8afea3cc
65accdb56eca09ae0d2b49f8f4a207ff
Creates a vector with unsigned integer components.
const elements: number[] = []; do { elements.push(0); } while (--n); return Vector.create(elements); }
0
bf18bd60b7008d385eb4131806426b34
11f6d7a12e2b0c01308d7afc92ed9a60
Calculate the gradient of the logistic cost function with the given coefficients.
class LR: def _logistic_log_gradient(self, x, y, beta): return reduce(vector_add, [ self._logistic_log_gradient_i(x_i, j_i, beta) for x_i, j_i in zip(x, y) ])
1
e1c576e7787cb109d94fb31f7429d272
7d5ffec745545836a1df0a58f6d5e5ed
This function is called once at start up ----------------------------------
public class MainFunctions : MonoBehaviour void Start () { }
1
1dadb1834ab76d51896291f427e80c59
e09fac2bad98e133271f43c8bdf8f2e1
Open the json file and parse the results from the network scan.
def parse_output(path): new_scan = ScanData() with path.open() as path_fh: for line in path_fh.readlines(): line = line.strip() match = re.search(r'Host: (\S+) \(([^)]*)\).*Status: Up', line) if match is not None: addr = match.group(1) ...
0
e40be71689d4cac216d323509c70a192
cd47090db91d5f658a432158479de1df
ตรวจสอบรูป
{ $check['miniature'] = end(explode("/", $check['miniature'])); $ext = ""; if (!empty($check)) { $value = $check['miniature']; $ext = explode(".", $value); $ext = $ext[1]; } if (($ext == "jpg" || $ext == "jpeg" || $ext =...
1
d26a2c4f47714d20918a9a4859b1eb43
4143dbe395d1ac5f1e1350647be99136
退回问卷
$where['status'] = 6; $data = array('editFlag' => NULL, 'status' => 5); D('Queslog')->where($where)->save($data); D('Question')->where($where)->save(array('status' => 5)); }
1
a5c95b86291ea299fcbe64458ed12702
26a96419e8c87d18bbbacd12a13913d4
Laravel
{ $ta = new TenantApplication(); $ta->loadFromParent($this->getLaravel()); $ta->useAppPath($ta->basePath().'/Tenant'); $this->setLaravel($ta); parent::handle(); }
1
432f562c7c989fb098ea9864bdadbfc9
0d9cc0ed5f2162b0162755fba7921d69
Returns an array of order IDs: [01234, 02345, ...]
class Horsebrands_Rewrites_Model_Checkout_Type_Multishipping extends Mage_Checkout_Model_Type_Multishipping public function getOrderIds($asAssoc = false) { $idsAssoc = Mage::getSingleton('core/session')->getOrderIds(); return $asAssoc ? $idsAssoc : array_keys($idsAssoc); }
1
1a4cf05fc09ec9020adea057a90d7631
4ceb8e9f18dd910b6827354c8d624ff2
예약 상태 변경 기능
@Repository public class BookingDAOimpl implements BookingDAO @Override public void bookingStatus(int userId, int status) { template.update("booking.end"); if(status == 1){ template.update("booking.accept", userId); }else if(status == 2){ template.update("booking.deny", userId); } }
1
360828437219a91edc7de193d9334d26
7f921b3b2a7f0f2d59ada3e5efb51048
Return the leader unit for the array of units.
bool UnitGroup::HaveLeader() const { for(const UnitGroup::Entry& entry : entries) { if(entry.isLeader) return true; } return false; }
0
f408e4afe15c488313236686bf9159d8
4cba0494fc7e2770232e1ae2b92821a1
原文icon点击事件
function ShouhuStarItem:on_click_icon_con(g) local tipstr = "" if self.myData.has_act == false then tipstr=string.format(ShouhuManager.Instance.model.sh_lang.SH_STAR_ITEM_TIPS_WORD_UNACT,tostring(self.myData.act_lev)) else if self.myData.pos ==1 then tipstr = ShouhuManager.Insta...
1
f04f68cf32051ae47d760ebb7c1d3974
bf40087be72bbf29468c652b07a2bda4
updates quantity of books in stock
class Products public function updateInStock ($id, $qty) { $db = new connect(); $query = "update products set product_in_stock = '$qty' where product_id = '$id'"; $db -> exec($query); }
1
65bbd90fe69331f13035d9c371bba97d
087478ec692046459b3e86be936594b7
Evaluates the number of pages for the page size and row count specified in the object properties.
if (pcount <= 0 || psize <= 0) this.ptotalpages = 0; else { if (pcount == psize) this.ptotalpages = 1; else if (pcount % psize == 0) this.ptotalpages = pcount / psize; else this.ptotalpages = pcount / psize + 1; } }
1
3cccb802ca216a323936607b3fc3d71f
a6f8f98f86f56104db1cc54fa66bce99
获取指定key的值的字符串子串(键不存在,返回空字符串)
namespace RedisLibrary public class RedisClientHelp public RedisValue GetStringKey(string key) { return db.StringGet(key); }
0
22f729c1cfc85aec9f326d3969d8a401
95d8cefa07143722237771228c346f57
Function name: MPU6050(); Function prototype: MPU6050(); Return type: N/A Sets the address assuming A0 is low.
MS5803::MS5803() { MS5803(MS5803_DEFAULT_ADDRESS);}
0
3cec10597db3a7a5f29178e99feb2c9a
f44774f0c2b74c0a59b4fde75c4d7930
This records a translated assembly. There may be multiple assemblies translated for a given type library.
{ TraceUtil.WriteLineInfo(this, "TypeLib - RecordTranslatedAssy: " + (assy != null ? assy.CodeBase : "null")); if (assy != null) { MarkConverted(); SetAssemblyPointer(assy); if (!_searchMode) { AssemblySupport.AddAssy(assy, this); } } if (!_searchMode) { RememberMe();...
1
21a50e42e268ae808643cd72a8a1e3d1
bfb0890fd463214780aff4fdd8de4f2a
Merges an existing violation list into this list.
class ConstraintViolationListInterface addAll(otherList) { }
1
40619dcc345d31f9a50b87232b10d7d3
2784ba37723b6af158a700bd0fd11013
Sets the value of the idSubject property.
public class DocumentSubject public void setId_DocumentSubject(int id_DocumentSubject) { this.id_DocumentSubject = id_DocumentSubject; }
0
9fb38c4e20983b17d3f8a8c8f0f1fde6
5e7cc101074ec3c25d799d1fadf31873
DockInsidePlotAreaProperty changed call back function
{ ClipGeometry.Rect = new Rect(0.0, 0.0, e.NewSize.Width, e.NewSize.Height); if (PlotArea != null) { PlotArea.Width = e.NewSize.Width; PlotArea.Height = e.NewSize.Height; Refresh(); } }
0
15c327ab784358d108a01fd810753c95
5a7239d09b8ee6079bda1c4211f38ecc
获取指定页面下图集名称和链接
def getPicNameandLink(self, url): html = self.getHtml(url) if html: soup = self.bfs(html) else: utils.log("链接:" + url + " 请求失败" + "网页:") utils.log(str(html)) return None soup = self.bfs(html) meun = [] total = 1 link_list = soup.find("div", class_="pic").find_...
1
4c63f34d317fbabb773bcf8a985e876d
09c85450c27b0480515116b5dee76384
노선_정보(TN_ROUTE_INFO)을 등록한다.
def api_insert(): json_routeInfo = dict() with open("routeInfo.json","r") as rt_json: json_routeInfo = json.load(rt_json) url = "http://openapi.tago.go.kr/openapi/service/BusRouteInfoInqireService/getRouteAcctoThrghSttnList?serviceKey=PgdnR4cgw6WwmfyR7rqzzBcJPu3rx3LPtinOu4hHP5B9o2oiJ6alrNDnOvcqdBmUQ...
1
e40ff0b87f10f0086f67b21b101018ba
aafa343977d39e113d13e25c5f8ab25b
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Setup Fade ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
time_left = FADE_DURATION; this->fade_in = fade_in; this->on_end = on_end; }
1
fd3b9fc8be816104738c596cc6814c87
0e1509589f9db4652d1919a5bcfa8cf2
Find out top 20 hubs and authorities
def answer_seven(): hubs, auth = nx.hits(G2) return hubs['realclearpolitics.com'], auth['realclearpolitics.com']
0
1e6f6a77df7d5e7b93fbc21399a13944
7682f471bf92f17ed45afdc6d769ed53
Whether the response code is not a code in question
class RequestHandler protected function isUnknownResponse($responseEnvelop) { return in_array($responseEnvelop->getStatusCode(), self::$RESPONSE_STATUS_UNKNOWN); }
1
26a7e4644e193c61455d9c33f9448673
4dcf4777206c883d2911db2ff136fdc9
@brief 현재 선택된 키를 바꾼다.
int keyInt = 0; try{ keyInt = int.Parse(key.KeyChar.ToString()); }catch(Exception e){} if(currentSelectNum == null) currentSelectNum = 0; if((key.Key == ConsoleKey.UpArrow || key.Key == ConsoleKey.LeftArrow) && currentSelectNum != 0){ currentSelectNum--; } else if((key.Key == ConsoleKe...
1
7c8e8949ca755b503f1a62a7da3b05c8
24c28b57bc7034f5dbad45c00e51b692
Функция расчёта углов атаки и скольжения, а также преобразование осей связанной системы координат
angles = [0., 0.] c = sqrt(position[0]**2 + position[1]**2) angles[1] = cfg.elbowZero - acos(((cfg.upperArmLen**2 + cfg.lowerArmLen**2) - c**2)/(2 * cfg.upperArmLen * cfg.lowerArmLen)) angles[0] = cfg.shoulderZero - asin(cfg.lowerArmLen/c * sin(angles[1])) + atan(position[0]/position[1]) return angl...
0