query_id
string
corpus_id
string
query
string
code
string
label
int64
fcea07278fe4d2ed279b8d082a8c7fe1
c645a5da5fbf783d4ad55f47df60e576
Return facilitied ordered according to their network priority.
class TypeElectronicAddressHistory extends TypeKeyTaggedElement public function getPriorityOrder() { return $this->PriorityOrder; }
0
340b822a5ca5dbe0c375bfc481d0d422
996fca17be80f6a3ce8bb24bbcce806f
Gets the filtered dependencies auxiliary.
@ManagedBean @ViewScoped public class CatalogDependenciesMB extends CommonCatalogMB<Catdep> implements Serializable public void setFilteredDependenciesAuxiliary(List<Catdaa> filteredDependenciesAuxiliary) { this.filteredDependenciesAuxiliary = filteredDependenciesAuxiliary; }
0
bb33f1c0a99fd3bcd475402f25a3033c
d496f68659c1768ac6ebbdd9fd214e9e
关闭指纹模块
Log.d(TAG, "fingerprintOff"); if (-1 == JNIHW.ioctlHW(JNIHW.CMD_CLOSE_FINGERPRINT_POWER)) { Log.e(TAG, "fingerprintOff: fingerprint off failed = " + name); } }
1
8e6837414a26a61fef24dbaf78d19013
d1c3fa7d866003adf3f82524d4391ba5
! \brief Enables or disables Camera Zoom. True to enable camera zoom, false to disable.
impl RaylibHandle pub fn set_camera_smooth_zoom_control(&self, sz_key: u32) { unsafe { rl::SetCameraSmoothZoomControl(sz_key as i32); } }
0
c41edd14c871d7bd5029ea6c58ae89b9
23a07656f31b63e9fc0cb10aa73b7a7d
Gets a set of actors info from their names.
{ List<Actor> actors = new ArrayList<Actor>(); name = "%" + name + "%"; try { PreparedStatement selectActorsByName = JDBCHelper.getSelectActorsByName(); selectActorsByName.setString(1, name); try (ResultSet rs = selectActorsByName.executeQuery()) { while (rs.next()) { actors.add(new Acto...
1
a0e074a9be160912c0960591aaa3d0a8
0896077fa3e495e94911e3b0604bdce1
获得日志的标签前缀 日志的类型,测试日志还是普通日志
{ $time = date('Y-m-d G:i:s'); switch ($log_level) { case self::FATAL: return $time . ' - FATAL - '; break; case self::ERROR: return $time . ' - ERROR - '; break; case self::WARN: retu...
1
3cbe63cc9195ce32a2c627d9769cd6ef
6fe6e9a66d45bf9db30e2d759a13c0ea
药品生产企业列表解析
@RestController @RequestMapping("/batch/install") @Slf4j public class BatchInstallRecords public List<MedicineFrom> standardParseMedicine(String str) { List<MedicineFrom> list = new ArrayList<>(); String[] strs = str.split(";"); for(String medicine : strs) { if(!StringUtils.isEmpty(medicine) && medicine.contai...
0
548bcb873f83844453eb7bd016406e12
ae5ce70c2332f0aed67678f29b20dbc0
Save the scraped links in an excel file.
class FaceBookCrawler: def save_to_xlsx(self): df = pd.DataFrame({ 'p_time': self.p_time, 'p_content': self.p_content, 'p_links': self.p_links, }) df.to_excel(self.util.get_output_filepath(self.name), encoding="utf-8")
1
e28c1817ae3e390d129b349684b2c0ea
f4f08aecab71c56f889e5c9b1adef3b0
年份箭头点击事件
namespace Ext.picker [JsType(JsMode.Prototype, Export=false, OmitOptionalParameters=true)] public partial class Month : Ext.Component private void onYearClick(object target, bool isDouble){}
1
8cff6e1bd2df27720cca7547b8475ae5
abd12edb0033e124228ee4d154a3f122
視野角を設定します。単位は degree です。
namespace Com.Latipium.Defaults.Graphics public class GraphicsModule : AbstractLatipiumModule, LatipiumLoader [LatipiumMethod("FoV")] public double FoV(double val = 180) { if ( val < 180 ) { Viewport.FoV = val; } return Viewport.FoV; }
1
fd323257df6f19de8204214c09e76bfc
1cd8451560279d44578681c28114e510
Displays lake and lowers its opacity
void CloudsVisualSystemBallDroppings::showPanel(){ displayAlpha = 512; }
0
1533b2c0e8df5c593ca719de7e7a8379
02a6959ead74b566ef5fa1a985b17d75
Clear <weight> value
namespace UI.Common.Controls.RadarDisplay public class RadarDiagram : BaseView public void clearWeights() { int max = polygonImage.getEdgeCount(); for (int i = 0; i < max; i++) setValue(i, 0, true); }
1
1c9d7aa24636f910d7fbe5f5db9838b0
2634861bbf9aef7f145841684be1aac7
Return source data lines that are not empty after comments have been removed.
if self._comment_lines is None: self._walk() return [file.comment_lines for file in self.source_files]
0
032dd197c8d54fb633b8012672904cb7
be1cb1c4446dab3cece40e86efd73ecf
to convert the IP address to xxx.xxx.xxx.xxx readable format
{ char *ipstr = (char *)malloc(17 * sizeof(char)); unsigned int ip_temp_numbr = 24, ip_int_index[4]; for (int j = 0; j < 4; j++) { ip_int_index[j] = (ip >> ip_temp_numbr) & 0xFF; ip_temp_numbr -= 8; } sprintf(ipstr, "%d.%d.%d.%d", ip_int_index[0], ip_int_index[1], ip_int_index[2]...
1
e371f969fbe26639b612d3e93d8a2b3e
c21dc068ab38992c2c14ee8632d8ac92
Get the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
class GetVirtualMachineResult: def virtual_machine_scale_set(self) -> Optional['outputs.SubResourceResponse']: return pulumi.get(self, "virtual_machine_scale_set")
0
b6f8cda5466f80cbd1c45b1727be1e66
a863afea52f83a8b5f51ddbed43e89f7
Get good folder.
folders = [os.path.join(folder, name) for name in os.listdir(folder) if os.path.isdir(os.path.join(folder, name))] folders = natsort.natsorted(folders, reverse=True) if len(folders) == 0: logging.error("You don't have any model folder. I suggest you " "have a loo...
1
9d4c9b2281a4b975ed592fcfbe1a3f99
78fae5a173ead855bf39ef134c250059
Returns the location of offer.
class Notification extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity public function getOffer() { return $this->offer; }
0
1d7895bad87079e953fdfaa245977853
c83058e328d9854e662d0d7ecbfd47d7
Загрузить пакеты ресурсов со звуковыми эффектами. Предназначен для вызова после инициализации
public static final void init() { for ( Sound sound : values() ) { sound.loadBytes(); } }
1
00b6c31215c7db155fb9483583258372
ebe7ae032b73ab4375b73d59197e1118
Método que obtiene una gaveta de la base de datos
{ if ($this->existe($id)) { $this->db->where('id_gal', $id); $consulta = $this->db->get('galerias_imagenes'); if ($consulta->num_rows() == 1) return $consulta->row('casa_gal'); } }
0
d1d7782fe0caf726fd1e3a7b10e02e7f
c10e355683cdb69e63167a1b595c7626
ターゲットqubitにかかる部分のゲートの文字列表現を描くメソッド
class Operation(DifferentiableUnitary): def get_qasm(self) -> str: if isinstance(self.gate, FrozenParameterGate): full_params = self.gate.get_full_params(self.params) else: full_params = self.params return '{}({}) q[{}];\n'.format( self.gate.get_qasm_name(), ...
1
13e0e4974da9b17c1efe4ffd802f1de2
da5449167e4bd300e16e3e34cf0af504
Price of the gasoline in US dollars.
class Config: def gas_price_wei(self): return self.__gas_price_wei
0
a54738699a626295375f09d06a413705
3a37f9a6fc5aaf2fe87d3b5b7a7aa083
Test case for nationalfootballleagueseasons_id_get Get a single NationalFootballLeagueSeason by its id
class TestSoccerLeagueSeasonApi(unittest.TestCase): def test_soccerleagueseasons_id_get(self): pass
0
16e315d387473aa9e98dfa99a313c445
c72a1168b66483c3d0f1e3cbba98caff
Метод отмены изменения по снимку из истории
namespace Модуль_13_ДЗ.ViewModels public class ClientsViewModel : ObservableObject, ITransactable, IDataErrorInfo, IEditableObject public void CancelEdit() { FirstName = OrigClient.FirstName; SecondName = OrigClient.SecondName; Surname = OrigClient.Surname; ...
1
3044f675c328331bfcbb564301b63acb
baccfa667b489cb216b53392ac546dac
Delete all the managed histograms
class BaseEstimator(object): def flush_hists(self): for h in self.hist_store.values(): if h: h.Delete() self.hist_store = {}
1
50fcca8f4e2b658ce3dcc5139ed6d607
db8887c42fa9c293f1952f3e042f07a6
Returns the value of the '<em><b>Left Node</b></em>' containment reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>Left Node</em>' reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
String getLeft();
1
479a86162c03800f8817dceec976309a
f60db837cd2eb8c8b250cbae0eaec106
Function to provide compilation compatibility between older code and newer style.
static std::string GenCompatHeader() { std::string str; if( glConfig2.shadingLanguageVersion <= 120 ) { str += "float smoothstep(float edge0, float edge1, float x) { float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3.0 - 2.0 * t); }\n"; } return str; }
1
b15bbc867a4edf7a0fc8bd9dc8adbe55
e6d70946e89bc103a8d4b6eafd1c76fd
Prevent users from swiping cells that aren't the first
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { if (viewHolder.getAdapterPosition() == 0) { return 0; } return super.getMovementFlags(recyclerView, viewHolder); }
1
5f6ccf70692a11727cec5b105686ecaf
19fc386964cacd0ea12749d610bf07fb
验证集合A是否不含集合B中的任意元素
if(A.length == 0 || B.length == 0){ return false; } for(String oneB:B){ for(String oneA:A){ if(oneB.equals(oneA)){ return false; } } } return true; }
1
80d98ab64777ef8a08db20bfdf6e8fe5
038af392653b4d826ea9904b367b9ccd
Extension Method do HttpActionExecutedContext para manipular o context quando há uma exceção e retornar um ExceptionPayload customizado, informando ao client o que houve de errado.
{ var exceptionContext = new ExceptionContext(actionContext, new ApiExecuteException(actionContext, exception)); FastTcpCommon.SetRemoteException(this, exceptionContext); var exceptionHandled = false; this.OnException(actionContext.Packet, exception, out exception...
0
c451317ed25ed09d74ede4ec124236a9
8af986ee1523c4380801f99b7a3c24dd
Create an instance of {@link BasicInfo }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "pos", "success", "warnings", "profiles", "hotelStays", "roomStays", "services", "areas", "criteria", "currencyConversions", "rebatePrograms", "tpaExtensions", "errors" }) @XmlRootElement(name = "...
0
c285d3eba5ddeab9d880816c8c407082
be386c1434439680bcaddd44df29981d
Sets value for Pet.Name property.
public class TestSubject implements Serializable public void setPetName(String petName) { this.petName = petName; }
1
625f7dc54314a1b19ad2a53d818af9f0
c70bbc26d76914a2e792b004680aa423
Shows the parts of the UI that were hidden
namespace DigiTrailApp [Activity(Label = "DigiTrail", LaunchMode = LaunchMode.SingleInstance, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.Locale, ScreenOrientation = ScreenOrientation.Portrait, Theme = "@style/DigiTrailTheme")] public class MainActivity : AppC...
1
8fac1308d4072aad60f1b3b1b74dbdac
0c7e0af439cb2f4a51dcc90987f9b97c
パース操作の一回以上の繰り返しを行うパーサーを構築します。
{ if (f() is NullObjectOfParser) { return _nullObject; } else { return Many(f); } }
1
9376d1e653fc78c41bcab904b0341d54
f896083bb6763f2daeffd91769e28b01
提交还车数据
public class CarReportConditionActivity extends BaseActivity private void comitTarkCarData() { PopWindowHelper.getInstance().confirm(mContext, new PopWindowListener() { @Override public void confirm() { if(mPicId.size() != MAX_PIC && mPathList.si...
0
26965c9a4405990b5312dc2c1f977442
b77af4ff5d2bb5cf17154a51c8a4921d
Creates a new Street entity.
{ if ($this->numberOfStreet !== $numberOfStreet) { $this->numberOfStreet = isset($numberOfStreet) ? $numberOfStreet : ''; } }
0
559150acf25390497bff3cc032e28d7d
5cae463e78e30dd53f35dcbaf0cf66dd
打印一个customer对象,根据id
@ResponseBody public Customer findOne(){ Customer result = repository.findOne(1L); if(result!=null){ System.out.println(result.toString()); } System.out.println("-------------------------------------------"); return result; }
1
f20997ad38d3cdf55fbad0b516cc267a
917c6e170baaa2bffec553853477ddec
Show agents filter applied snack bar
public void showFilterAppliedSnackBar() { this.snackbar = Snackbar.make( snackBarAnchor, R.string.text_filters_applied, Snackbar.LENGTH_LONG); snackbar.show(); }
1
2582f8f863af5c33404d446437cb8384
6f0babb531aa063cb49e05ac4747e53c
0부터 255까지 각 값이 몇 번 나오는지 세는 함수
int n = 0; int x; int arr[10001] = {0}; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%d", &x); (arr[x])++; } for(int i = 1; i <= 10000; i++) { for(int j = 1; j <= arr[i]; j++) { printf("%d\n", i); } } return 0; }
0
21b3bc9a80afa4b87cd3cbada8ddde24
eeb6c1ecff69e9bf236c4b46c32206cb
Returns the next [Instant] that is aligned with the given [interval].
class TimeInterval public TimeInterval next(@NotNull Duration duration) { LocalDateTime nextEventStart = LocalDateTime.now(); LocalDateTime nextEventEnd = nextEventStart.plus(duration); TimeInterval interval = new TimeInterval(nextEventStart, nextEventEnd); if (check(interval)) { ...
0
a7174590ea59c83b54dcd365ab79689f
15540f4b60d8571ff9c7d2d07b0b0f01
Sample from the specified :term:`QUBO`.
values = tuple(bqm.vartype.value) def _itersample(): for __ in range(num_reads): sample = {v: choice(values) for v in bqm.linear} energy = bqm.energy(sample) yield sample, energy samples, energies = zip(*_itersample()) return Sa...
1
838647dea41eaa5edb42465b1e24060e
161a56c7f2e678887ebf1abcb5f49f00
初始化item宽和高
if(imageWidth == 0 || imageHeight == 0){ imageWidth = AndroidUtils.convertToPix(mContext, G_ITEM_WIDTH); imageHeight = AndroidUtils.convertToPix(mContext, G_ITEM_HEIGHT); } }
1
01016db28b349f5685db0394ba4660ec
46885e5327762a34e4d860332109d7c7
根据医院ID查询app医院名称
String queryHName(Integer id);
1
728d98e1181ee08dd14a1542fb12e30e
ef985959c4c1c092515a87f026f143fd
Get the element at the current position in the map
class Map implements Iterator, Countable final function current() { $value_array = array_values( $this->_map_item_array ); $current = $value_array[ $this->_current_pointer ]->value; $res = $current; return $res; }
1
551f756ca008b015305e053ff42bc3ce
e1682a58516213441bd57831f05abc39
如果这个事件不为空,则每次帧更新的时候都运行这个事件里的所有委托
public class GarenEvent : MonoBehaviour void Update () { }
0
45976bfe93f83b442854b15d056eb590
78fc34b79f59a87c1cfe4b0d0209323b
US 0007 - Ser capaz de realizar a ação de “Deixar de seguir” (parar de seguir) um determinado vendedor.
class Database: async def im_at_work_seller(self, user_id, status): await self.pool.execute( f"""UPDATE sellers SET seller_status={status} WHERE seller_telegram_id = {user_id}""")
0
13ecf48f99a8607d4b58348965bce305
8b8e2dc9aaa831abaa2eb0385d7cd59e
Invoked when an error is encounter during face detection.
public class FaceAuth void onError(Exception e);
1
ed7070af3c004340a6a194f582c193ea
60830143d4f42b750224c94c73658b10
Extractes the default value from a default value spec of the form "'some value'::character varying" or "'2000-01-01'::date".
class OracleManager extends DBManager public function getDefaultFromDefinition($fieldDef) { $type = $this->getFieldType($fieldDef); if ($this->isTextType($type) && isset($fieldDef['default'])) { return " DEFAULT rawtohex({$this->quoted($fieldDef['default'])})"; } return p...
0
056513d73e3173ee414dfffe7e0ddaed
08f6cb913fd7bd4d169fe12841a96705
根据安装位置筛选设备信息
$queryString = "select a.id,device_name,model,theNum,owner,status,borrower,old_dev,borrow_time,hdexport,phone_Cores,phone_resolution,path,device_id from devices a left join dev_imgs b on a.id=b.device_id"; $queryString = $queryString.' where a.id != ""'; if($plateform == "all"){ }else{ $queryString = $queryS...
0
e2955e01c1e330b8219c8789a1dea4e0
1ba8e39492e584f17612283d3228f99f
获得第一条结果的一维数组
class DBmysql extends CURD public function getOne() { $rs = $this->rs->fetch_assoc(); return !empty($rs) ? $rs : []; }
1
b419740df2a23276bc64aa59fec32a39
9d10641383d1ea7671888c3ed58ebd1c
Animates the dash-array of a line layer to make it appear to flow.
var segment = this.tick ? '_' : '-'; var rainbowified = this.rainbowify(segment); for (var index = 0; index < this.numberOfLines; index++) { var trajectory = this.trajectories[index]; if (trajectory.length >= this.trajectoryWidthMax) { trajectory.shift(); } trajectory.push(ra...
0
b882fb5eb17e5a550d5d11c2eda70344
ff5147bf20cd8afc9f78646e7beadbe9
updateAP() calculates and updates the pokemon's AP. It does this by setting the pokemon's AP to its baseAP multiplied by its level.
void Fight::setExperience(){ myPlayer->getCurrentPokemon()->calcEXP(myEnemy->getCurrentPokemon()->getLevel()); myPlayer->getCurrentPokemon()->updateEV_A(myEnemy->getCurrentPokemon()->getBaseA()); myPlayer->getCurrentPokemon()->updateEV_D(myEnemy->getCurrentPokemon()->getBaseD()); myPlayer->getCurrentPokemon()-...
0
301d1f447fb692ad54bdf97b1721241c
29db64e0174c1a9bd87e053e71153c2e
Retrieves the TrainingStressScore field Units: tss
namespace Dynastream.Fit public class RecordMesg : Mesg public float? GetGrade() { return (float?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField); }
0
c4bba28c17d289a38246b899a6cc1fb9
8974763c4139c864f35319e38c82ae69
Helper function to get the time difference between two <time.h> timespec structs in nanoseconds
time_diff(const struct timespec *ts1, const struct timespec *ts2) { uint64_t usec_diff = 0; int64_t nsec_diff; assert(ts1->tv_sec <= ts2->tv_sec); usec_diff += (ts2->tv_sec - ts1->tv_sec) * 1000000; nsec_diff = ts2->tv_nsec - ts1->tv_nsec; usec_diff += nsec_diff ? nsec_diff / 1000 : 0; retur...
0
b7a25e8f093dd1b1a59254499e0a1152
195e3c1a4aae5656f0c6a36a516a3ae3
returns dateCheckedOut
class Resource public function getDateChecked() { return $this->dateChecked; }
0
b347cddaa02b38ba0769b099b636a75d
17732dcf1f89a00af216a29bcfe3656d
@brief 设置好友项被选中时的背景图
currentState = state; if (currentState == STATU_INVITATION) { currentBg = focusInvita; } else { switch (currentState) { case User.RELATIONSHIP_USER_BE_ATTENTION: case User.RELATIONSHIP_NULL: currentBg = focusNull; break; case User.RELATIONSHIP_ATTENTION: currentBg = focusAlready; br...
1
7d0817e9141695fce86ac753023df96a
1d3d8e41d6b175830874f85e113dc97e
In addition to the magic done by the super constructor, store the accepted path.
class Has def initialize(path) super(path) end
0
88b4d9614ebe59ad9f701d5c0a83219b
8d0e3cd15c4d631b95f5fae4b9b30b68
Updates the socket client_id if valid.
message = websocket.Message( socket=socket, payload={"messageType": "client_id", "value": "abcd1234"} ) websocket.handle_client_id_message(message) assert socket.client_id == "abcd1234"
1
5b8815612849d4a74984b2eea3280fa1
b693dc1a7ec2df1c05839d080db9a3b9
Returns an OpenLayers style instance for polygons due to given config.
return (feature, resolution) => { var resAdjust = 150 * resolution; var rotation = feature.get('rotation'); var croquisObjectStyle = croquisObject.getStyle(); if (rotation !== undefined) { var extent = feature.getGeometry().getExtent(); var coordinates = featu...
0
86bd38767dcc44f180e4b4c0b6e8e379
16fd7299ab206a72f1732c8ff81eb0f0
Method that returns a game names on the server.
public class PlayerStatus public String getGameName() { return gameName; }
0
5b74af869cf506584da5f0efd7e4e4a3
a3173dd97be60b54673d735e0f60b433
Test Web notifier with admin interface enabled (default options)
class CartInterfaceTest extends BaseDBTest public function testNotifyOrderWithForAdmin() { $form = new Form(3); $form->email = 'test@test.org, [79990000000@sms.test.org], [+79990000000]'; $form->commit(); $order = new Order([ 'id' => 1, 'uid' => 1, ...
1
f378653685214e7213722dfaf1584795
012a51e8188dfd098e11d260789d03bc
Determines the minecraft_server.jar version. Returns null if the version could not be determined
final String bukkitVer = Bukkit.getBukkitVersion().trim(); final String mcVer = bukkitVer.split("-")[0]; return mcVer; }
0
3aa59af06b798e1c56f90668b8588fa9
241a746e48aa1c995cf897e519994fc9
Delete Service Worker Caches
function main() { Promise.all([ unregisterServiceWorker(), clearCache() ]); }
1
b4897eb6559a9cfe016b96ad5208fe80
5be0a5f4fceebee7c82ed15583559a5b
Returns begins at.
class HttpErrorRangeParametersArgs: def begin(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "begin")
1
d3bfdac42c26b224a85c0e97f009a096
938a2e612bd62367e72313072c963a4a
Find maxima and minima for input data.
max_peaks = [] min_peaks = [] dump = [] x_axis, y_axis = _datacheck_peakdetect(x_axis, y_axis) length = len(y_axis) if lookahead < 1: raise ValueError, "Lookahead must be '1' or above in value" if not (np.isscalar(delta) and delta >= 0): raise ValueError, "delta must be a ...
1
3f82288e1167287756f7d3e745fe0f6a
4f12aefd847edb2ea400cfec63a3ee33
Create HTML table from JS array
var tr = document.createElement('tr'); var cells = valueArray.map(cellGenerator); cells.forEach(tr.appendChild.bind(tr)); return tr; }
1
756d8b6f342975b6cd2e09321d0b3182
0f527ef19bf8cedfb58159677e48adf7
Gets the display name of the author.
@PublicApi public class ChangeHistory implements WithId public String getFullName() { return getAuthorDisplayName(); }
1
4605a3686b2faf3492e4daac77652dc0
707bf4bc034eebb72469af37f1237491
Lắng nghe thay đổi từ nhà bếp
{ char[] readBuffer=null; if (SerialPortConfig.KitchenPort.IsOpen) { try { if (SerialPortConfig.KitchenPort.BytesToRead != 0) { readBuffer=new char[SerialPortConfig.KitchenPort.Byt...
1
4d6144fe61218cf60a692d85763986b4
f60e6b1f9d318e4166ddc4fe36e50937
Show route from context place to vicinity place.
namespace MyHitchhikingSpots.Tools public static class WP8Tool public static void ShowRouteTo(GeoCoordinate coord) { try { DirectionsRouteDestinationTask routeTo = new DirectionsRouteDestinationTask(); routeTo.Destination = coord; route...
1
1ea23633a315a1141513eaadb873befa
4cd44e3e97716e641ad21fb1ee6ac857
Scans the I²C bus, returning a list of devices.
class OneWireBus: def search(self):
0
101aaef276216aed478fd03cb37da3b4
f2ca832e872796d6881f3e723642c7dd
Удаление директории и файлов
class ControllerModuleExchange1c extends Controller private function cleanDir($root, $self = false) { $dir = dir($root); while ($file = $dir->read()) { if ($file == '.' || $file == '..') continue; if (file_exists($root . $file)) { if (is_file($root . $file)) { unlink($root . $file); continue; } if (is...
1
90bf4b09e0174f2e44a5d146f28acf8d
0e169489d0861acdd8cb4fd3cf78220b
Возвращает признак "ожидаемости" для делегатов целевого события.
public boolean isExpectDelay();
1
7a6dc966af14466d8b936b2f74f6f9d1
a68ad4874d06f59a925725bbb16365ed
Timer2 Overflow Interrupt Vector, called every 1ms
ISR(TIMER1_OVF_vect){ T1Ovs2++; }
0
8b0973d9e118ef80e3580b04e5266c1e
a3c3b44b5b8178b22928aef5f03e1511
Sets the localized title of this marketing event in the language, and sets the default locale.
public void setTitleMap( Map<java.util.Locale, String> titleMap, java.util.Locale defaultLocale) { _notification.setTitleMap(titleMap, defaultLocale); }
1
03f66bf3e25f61885352cf2fbc4648ba
1ff04dd9a34200ee3860dc56cb7fb488
MOVE IMAGES ANIMATION
function animalsMove() { document.getElementById("spottedOwlImg").style.animation = "loadMove1 4s"; document.getElementById("graySquirrelImg").style.animation = "loadMove2 3s"; document.getElementById("buffaloImg").style.animation = "loadMove3 5s"; document.getElementById("westernLizardImg").style.animation = "...
1
e8ca438be3a4d1fad8578087e824ebca
5a00cd64b9c607179658f3e4136422be
Initializes an Ethernet PHY chip (Micrel KSZ8081RNA)
int32_t regv, tout; CLKPWR_ConfigPPWR (CLKPWR_PCONP_PCENET, ENABLE); LPC_EMAC->MAC1 = EMAC_MAC1_RES_TX | EMAC_MAC1_RES_MCS_TX | EMAC_MAC1_RES_RX | EMAC_MAC1_RES_MCS_RX | EMAC_MAC1_SIM_RES | EMAC_MAC1_SOFT_RES; LPC_EMAC->Command = EMAC_CR_REG_RES | EMAC_CR_TX_RES | EMAC_CR_RX_RES | ...
1
1b93d521a5cce7dc46a68763f41ff96e
2cd5a7e7a73955e755ad180d700cfc6a
test whether or not this node has exportable geometry
class BaseRobot(SceneNode, DynamicsMixin, ABC, Generic[LinkType]): def hasgeometry(self): return self._hasgeometry
1
35fc45d88a96126b48b749f64fb7ee23
08679fb25f84795e6df4fefafafd2b09
지정가 매도
class Kiwoom(QAxWidget): def buy_stock_at_specified_price(self, pred_company): self.past_portfolio_stock_dict = self.portfolio_stock_dict.copy() self.portfolio_stock_dict.clear() count = max(3, len(pred_company)) use_money = int(self.use_money / count) for code in pred_company: ...
0
2e5ca3ee26d2ef14a9498f4e037d947f
f3ccf8a5c3fcbccd4f6bf4009e46c13a
Returns an <code>Evaluation</code> that includes metadata as well as the current status of the <code>Evaluation</code>.
public IEvaluationContext createContextSnapshot(boolean includeSelection);
0
81aaf4d4415c723f78baec3f20f5bd03
fbc24d6034509d1d8778ea4fcbb7bf40
平均ステップ数, 平均時間が設定されているかチェックする.
{ $start_At = strtotime($this->start_At); $stop_At = strtotime($this->stop_At); if ($stop_At === $start_At || $stop_At < $start_At) { $this->addError($this->stop_At, Yii::t('app', 'end time error')); } if ($this->step <= 0) { $this->addError($this->s...
0
c17374cb2a6d3642cb52e56ebe0f46a0
51b4f2e6888cfe9c93564f2145ff930e
Сохранение точки на карте
{ pnt.id = id.toInt(); pnt.lat = lat; pnt.lng = lng; marker_pmnu->exec(QCursor::pos()); }
0
6203fa9cfb01819055a14c6c06a77edc
5344091222e95ef5ff89328f1396f4b6
获取最后一次成功执行的sla行为
if (acts.size() > 0) { return acts.get(acts.size() - 1); } else { return null; } }
1
9d30a11e40f9114256f34d760f223630
25611db3d1e2994c51c6af534d481b55
在可迭代对象中,根据条件查找单个元素
class IterableHelper: def find_single(iterable, condition): for item in iterable: if condition(item): return item
1
ed22b622260225b2d3bb7809a5bd5657
b09812d93429034a9e3523d44f3f5e82
Q.3 - Libération de la mémoire de l'objet scs~
if (s) { if (s->L) { if (s->L->p) c_free(s->L->p); if (s->L->i) c_free(s->L->i); if (s->L->x) c_free(s->L->x); c_free(s->L); } if (s->P) c_free(s->P); if (s->Dinv) c_free(s->Dinv); if (s->bp) c_free(s->...
1
16f391eacd4bb64030b18839aaa47b6a
0d10f2cb82596d6b9399628e38412c86
验证用户是否有参数wantedDbpermis指定的数据库权限。若用户有指定的权限,granted被设置为true。参数availDbpermis包含这个用户可用的唯一权限
@Stateless public class UsersPercistenceBean public boolean userHavePermission(UserLogon logon, String permission) throws CarabiException { final CarabiUser user = logon.getUser(); return userHavePermission(user, permission); }
0
6dd17297bf1ed405b8a97a1a4d16bc49
8199cc317b68125bb0fffc1217750104
保存上传的文件(md文档或zip包)
@ResponseBody public JsonResult saveTheFile(HttpServletRequest request) { JsonResult jsonResult = new JsonResult(); CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext()); if(multipartResolver.isMultipart(request)){ ...
1
3c2c291357262516eea5ed1cd6def296
13199b4d416e480d20f20df0aaf2860b
数组是否可以分为两半
int sum = 0; for (int i = 0;i<A.length;i++){ sum += A [i]; } if (sum%3 != 0){ return false; } int left = 0; int right = A.length-1; int leftsum = A[left]; int rightsum =A[right]; ...
0
67d3a2a61ae1e584d78b1b1c6b55f68f
8b8383a91226775dd9b8108e61acf790
Check to see that passing in an index that is equal to or greater than the array size throws the correct exception.
[TestMethod] public void TestMethod3() { AssertThrows<IndexOutOfRangeException>(() => { var numbers = new int[] { 1, 2, 3 }; var result = numbers[3]; }); }
1
57aa4026d3b18b1669b33a0644c215be
64b3c8950f69a216773393f5e00ece4c
通过for循环生成10个线程
def main(): for item in range(10): thread = MyThread("执行线程 - %s" % item, 1) thread.start()
1
49219c4688be3cbf035aa718c4d01d4a
020e116e542271a84c36822ab46c7c51
Searches for a file within the currently selected directory, and all child directories.
{ Regex re = Utilities.ConvertWildcardsToRegEx(searchPattern); List<string> results = new List<string>(); DoSearch(results, path, re, searchOption == SearchOption.AllDirectories, false, true); return results.ToArray(); }
1
f17f6a780cbb4a0e11a04e6caae0ca51
a6b8d776cb12aa3e4e6ca05cd917a71f
Completely disable the cache. The cache is first synced, then voided, then disabled. There is no way to enable it again. This is generally used at shutdown.
public class IN3 public boolean cacheClear() { return (boolean) sendRPCasObject(CACHE_CLEAR, new Object[] {}); }
0
b0600b32b4eefb957b7b926902436e3a
2c47f25f1d5c39062f04937ad35c8d4d
Returns the boolean state of agb_accepted
class GroupRequest(bo): def get_is_accepted(self): return self._is_accepted
0
1611a3a0c7d1d954864114460db29e02
3ead9426e9ad6676be0843bc19e67c82
Gets a scipy implementation of the finite differences matrix.
def forward_diff_matrix(n): data = [] i = [] j = [] for k in range(n - 1): i.append(k) j.append(k) data.append(-1) i.append(k) j.append(k+1) data.append(1) return sparse.coo_matrix((data, (i, j)), shape=(n, n)).tocsr()
1
7b9ca410c2bacc208a2ea9e36b862d79
502d5485c36b4ed1d716edb0af2250b9
Only close the menu if the focus has moved to something outside of this component.
const { target, type } = e; if (!target.closest) return; const element = getCurrentOpenDropdown(); const parent = element && element.parentNode; const self = element && element[dropdownComponent]; const menu = self && self.menu; const hasData = target.closest(dropdownSelector) !== null; const isForm = ...
1
398a5d210ae74e033d664637c353a95a
7a859812b92a5be9df06f0468640ef7c
Generate a matrix filled with random 0's, -1's or 1's.
var result = matrix_create(output_layer, input_layer); double epsilon_init = 0.12; Random random = (seed == -1) ? new Random() : new Random(seed); for (int row = 0; row < result.Length; row++) for (int col = 0; col < result[0].Length; col++) result[row][col] = random.NextDouble() * 2 * epsilon_init...
0
d6be0c2a4adc005a4c3d28025252cb9c
a17900b004436943907641d3f0995e37
Gets a column by index from this <see cref="Matrix3"/> instance.
{ switch (index) { case 0: return new LVector3(true,this.m00, this.m10, this.m20); case 1: return new LVector3(true,this.m01, this.m11, this.m21); case 2: return new LVector3(true,...
1
4d0f4c9cbe0994511393024737fa9b5a
b5f3c2c941dc1235a7d67e0248ea1446
Call the type filter dialog
class ConnectionTypes(tk.Frame): def open_connection_type_filter(self): FilterConnectionTypes(self.app)
1
96f799b7e6363c20dd5af2bc8e66e151
de4c1205ad46d369bdc7076fc71e00f4
如果说新创建的类的名字是Model,那直接返回不做修改
public class UpdatePlugin extends PluginAdapter @Override public boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) { return super.modelFieldGenerated(field, topLevelClass, introspec...
0
3871271f7c482418fb716c08264a44e9
b62147016e52c28d41bf0f4139945d56
Logs when the like request was rejected.
class ShowRequest(RequestHandler): def _rejectRequest(self): self.data.request_entity.status = 'rejected' self.data.request_entity.put()
0
63eaa68dd3e5e67d5c52b00690df3130
83342a5fe9d567031c80912dc5c925e1
<p>返回默认提示信息的失败消息</p>
StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("<xml>").append("<return_code><![CDATA[FAIL]]></return_code>") .append("<return_msg><![CDATA[ERROR]]></return_msg>").append("</xml>"); return stringBuffer.toString(); }
1
2b3d28a84ba7a212df5bede11f0e8304
8462fac32ee8a4f563a01dabb453f008
creates the copy of a matrix with n rows and p columns
{ m = q.m; Mat = new double* [q.m]; for (int i = 0; i < q.m; i++) { Mat[i] = new double[q.m]; } for (int i = 0; i < q.m; i++) { for (int j = 0; j < q.m; j++) { Mat[i][j] = q.Mat[i][j]; } } }
0