query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8e005ae8dde5c54d1b53f6398c4a3983 | 8b2e5f4a2d907dac1caa4b5ac64542f3 | convert each point in this._polygon from LatLongCoordinate to LatLng,
push the converted point to polygonLatLng so it can be used by Leaflet | function ShapesMap(_map, _deleteButton, _clearButton,_processButton,_exportButton, _toggleDrawingButton,_console)
function getCoordinates(currentPolygon) {
var points = currentPolygon.getPath().getArray();
return points.map(function(point) {
return [point.lng(), point.lat()];
});
} | 0 |
99e9c6a93c273444853aa8721d0f8aa7 | 10bbddbfff29bdfaa6c3aec2dbe2d0e3 | Permet de voir les statistiques d'un étudiant donné | {
$student = Student::findOrFail($id);
$lecture = Lecture::all();
$avg = Grade::where('student_id', '=', $id)->get();
if ($avg->count() == null) {
$avgComponent = 'No grades';
} else {
$avgComponent = $avg->sum('grade') / $avg->count();
}
... | 1 |
d61c68dc74f96bd834d01d832ba13398 | 74fe6055b59b259b82268557f8588aea | !
@brief Initializes wave player and allocates memory for audio buffer | static uint8_t PlayerInit(uint32_t AudioFreq)
{
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, AudioFreq) != 0)
{
return 1;
}
else
{
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_02);
return 0;
}
} | 0 |
8e6d4936c13bb8585507381a8ee8cc04 | eef58a415b29afce66c431d05664f769 | 大切な人を更新する | $brotherthree_family_name,
$brotherthree_sex,
$brotherthree_birthday,
$brotherthree_deathday,
$brotherthree_profession,
... | 1 |
995f6aacdd77e7dc458c6576ef62c005 | c685e27a8c62d2872eacc65a257e70e3 | Return the derivative of the given data. | @Override
public double getDeriv(double pred, double y); | 1 |
97abcc5132faf654970b1d725c4f7566 | a22af09fbb0bdf9592526ca5313e47da | ==============
IN_GetLocalizedKeyName
============== | BSTR FAR* pbstrKey)
{
if (pbstrKey == NULL)
return FALSE;
*pbstrKey = SysAllocString(_szLicString);
return (*pbstrKey != NULL);
} | 0 |
3d1b31ecbe28ac045c9498dd39b495be | 0f96e4f1cfb0c1f5ae174610d834463c | Force client to idle | class PlexClient(MediaPlayerDevice):
def force_idle(self):
self._state = STATE_IDLE
self._session = None
self._clear_media_details() | 1 |
12b4295bf1beaffa219f9d7363df4d69 | ca113514e17c4c45e8484cec59bcbd81 | 当DragLayout的在 布局文件中的结束标签被解析完成会调用; 一般在该方法中可以初始化子View的引用
但是此时还不能获取子View的宽高 | public class BannerView extends RelativeLayout
@Override
protected void onFinishInflate() {
super.onFinishInflate();
} | 1 |
58e27e85248400d31be32fa143d30f54 | ec94a65285a2d3620dd8af76660d8284 | Modifies a query to return only events that do NOT match the tags specified by name | static partial class EventQueryExtension
IEventQuery<TObjectId, TBaseEvent> ExclusiveRange(); | 0 |
e72faf40ffcfdf34c85f6ddf4dafa38e | f09f3e67d29187d20bcf78d10ce482f7 | adds force to the shots so that they move | Vector3 enemyPos = this.transform.position;
Vector3 bulletPos = bulletProperty.transform.position;
Vector3 bulletSpeed = bulletProperty.transform.rigidbody.velocity;
if (bulletSpeed.x!=0 || bulletSpeed.y!=0) {
this.gameObject.rigidbody.AddForce (new Vector3 (enemyPos.x - bulletPos.x, enemyPos.y ... | 0 |
56076d9f1f85143a6820103075a108d2 | df564fef3b58d655ee172e8ef189d4e1 | Method untuk mendapatkan daftar Akademi | if ($this->Application->Cache) {
$dataitem=$this->Application->Cache->get('listaliasprodi');
if (!isset($dataitem[1])) {
$dataitem=$this->getList ("program_studi ps WHERE ps.kjur!=0",array('kjur','nama_ps_alias'),'nama_ps_alias',null,1); ... | 0 |
0bc37bec045e9c044136fc77456e94ac | fbfd3c53d823adb476c33bb76add6c59 | Return a generator of all filter names. | def get_all_filters():
for name in FILTERS:
yield name
for name, _ in find_plugin_filters():
yield name | 1 |
1f7a362db71db0b4491e95aac6026ff1 | 24f0e5e198922eb4596c59dd616305b7 | !
\brief Calculate the bounding scale rectangle of 2 maps | SubmapObj submap_trg;
for(SubmapObj submap_j: submaps_set){
if(std::find(overlaps.begin(), overlaps.end(), submap_j.submap_id_) != overlaps.end()){
submap_trg.submap_pcl_ += submap_j.submap_pcl_;
}
}
return submap_trg;
} | 0 |
fc241ec2cb1ab871f2da4fb8c077aeb9 | f2f42bdb78af95394ab02e9b9355905c | Hàm đổi trạng thái chân của led hiệu nguồn sim808, nếu chân đang ở trạng thái HIGH (1) thì sẽ chuyển sang LOW (0) và ngược lại | {
ledstate = ~ledstate;
if(ledstate) DrvGPIO_ClrBit(E_GPC,12);
else DrvGPIO_SetBit(E_GPC,12);
TIMER0->TISR.TIF =1;
} | 1 |
e0724ae3be8f21cb47fd689f73bf63f7 | 35b9a477a708733b03b46094cd2e9013 | 揽件信息插入action | @RestController
@RequestMapping("/xJinhuo")
public class XJinhuoController
@Transactional
@PostMapping("addJinhuo")
public ResultMsg addJinhuo(String dataJson) {
if(StringUtils.isNotBlank(dataJson)) {
JSONObject jb = JSON.parseObject(dataJson);
if(StringUtils.isNotBlank(jb.getString("JinhuoInfo"))) {
XJin... | 1 |
0445072d409999f4ca69c95d0866e658 | 3ae729ada266f453959359d1fc90edcb | Entry point for the "with" sentence. It tells the annotator instance to enter the annotation process. | void enterAnnotationSupport(FeelParser.AnnotationSupportContext ctx); | 1 |
212659bc60dcd07f5855c9d434b7e1a4 | 4c930cf2a120dbe0c217b0a07b264c71 | 设置粒子宽度 | public class Particle extends com.earthview.world.core.AllocatedObject
public void setDimensions(double width, double height)
{
double widthParamValue = width;
double heightParamValue = height;
setDimensions_Real_Real(this.nativeObject.pointer, widthParamValue, heightParamValue);
} | 1 |
2b5973f800b6d38893fc90fad093ff26 | dce611aa64728f7b7b7e64d171e07b89 | Get whether to ignore the current IP Address | namespace Library.Net.Web
bool WhetherIfIgnoreIp(string ip); | 1 |
5c28659a2fc162d5f3f7c4e7663d1a25 | 380379e50092aa603fbba9f1a75b5cad | Adds a revoked certificate to the CRL. | public static unsafe partial class Windows
[DllImport("crypt32", ExactSpelling = true)]
[SetsLastSystemError]
public static extern BOOL CertAddCRLLinkToStore(HCERTSTORE hCertStore, [NativeTypeName("PCCRL_CONTEXT")] CRL_CONTEXT* pCrlContext, [NativeTypeName("DWORD")] uint dwAddDisposition, [NativeTypeName("PCCRL... | 0 |
63adfa7332b1fa2690190ca77429c486 | e5f8ab135e53f44a5d4c011edf905f99 | Returns whether script is a stake submission transaction. | {
return !(isset($transaction['assetType']))
|| $transaction['assetType'] === '--'
|| $transaction['assetType'] === '';
} | 0 |
15a8f5011dffbc27c59e664123155c7b | 170780e2b36b1ed2b0f9108100009b2d | Test the magic getter. | class EntityTest extends \PHPUnit_Framework_TestCase
public function testMagicGetMethod()
{
$value = $this->entity->getFoo();
$this->assertTrue($value === 'bar');
} | 1 |
05890c669a31906e6a70654763a954f5 | cada35041b4de023e22ae66bc17007c5 | 檢查使用者上傳的Excel版本,依版本選擇對應的連線字串 | namespace CableStayedBridge
namespace Miscellaneous
public class AdoForExcel
public static OleDbConnection ConnectToExcel(string ExcelWorkbookPath)
{
string strConn = string.Empty;
if (ExcelWorkbookPath.EndsWith("xls"))
{
strCon... | 1 |
dd427f0688812dbd587aef340d9cc387 | 5af13deaef9239d626cdabb151e0dba0 | !
ASYNC_IF_GetEventMask
Return the current asynchronous events mask | namespace BlackBerry.DebugEngine
sealed class AD7StepCompletedEvent : IDebugEvent2, IDebugStepCompleteEvent2
public int GetAttributes(out uint pdwAttributes)
{
pdwAttributes = (uint)(enum_EVENTATTRIBUTES.EVENT_ASYNC_STOP);
return VSConstants.S_OK;
} | 0 |
f743bb2b0a62ee58118926bc52809ba7 | 8ef0ae9ab1991859e4d4f914d76b66de | <p>获取单链表的有效节点个数</p>
<p>如果是带头节点的链表,不统计头节点</p> | public class SingleLinkedList
public static int getSize(SingleLinkedListNode headNode) {
if (headNode == null) {
throw new RuntimeException("请传入非空头节点");
}
if (headNode.next == null) {
return 0;
}
int size = 0;
SingleLinkedListNode curNode = headNod... | 1 |
28fa2eb1dea54e20b73557b598572a08 | da5adf36155f6b150c717f04a50c4dbe | Convert RGB to nearest colour in the 256 colour range | class GraphicsWindow(PyMsbWindow):
def GetColorFromRGB(self, r, g, b):
def f(n):
return ((abs(int(n)) % 256) + 256) % 256 | 0 |
f72f67db78690f7e2929954b72b54c50 | f4754838ecc51010ae1d237a24271022 | text2html | function text2html(text: string): string {
return text.replace(/(&| |"|\<|\>)/g, (name) => _text2html_dict[name])
} | 1 |
22d7b04c2e5ec05985bd3d8587a78a51 | 5567c7dea2c46fc5013b9d9a3d3de1dd | * Reposition the primary navigation menu | function ready(){
d3.selectAll('#Content')
.moveToBack()
.on('click', function() {
lastClick = thisClick
thisClick = event.target.id
secondaryMenuLoad()
d3.selectAll("#Content rect").each(function() {
currentID = d3.select(this).attr('i... | 1 |
6533c3beabcbaf776e4d14a068c79129 | 33dd84725b908226a143af328ecedd5d | We use the lucene highlight library to highlight text. For example if we search for "banana", and it apprears once in a longtext
we need a few words before and after to display the search results, like: "... sweet yellow <b>banana</b>s are ..." | function search_highlight($text, $search_terms, $hl_class = 'hl')
{
if ( ! is_array($search_terms))
{
$search_terms = explode(' ', $search_terms);
}
foreach ($search_terms as $term)
{
$text = preg_replace('/\b(' . preg_quote($term) . ')\b/i', '<span class="' . $hl_class . '">\1</span>', $text);
}
return $tex... | 0 |
d5e9186201122e21560400cf9293f872 | 8f2fb0fd8ebe0978a1ae4f28e726aaaa | Produce and play speech. | class TalkBack:
def sl(self, txt, before, after):
rospy.sleep(before)
self.voice = rospy.get_param("~voice", "voice_don_diphone")
self.soundhandle.say(txt, self.voice)
rospy.loginfo(txt)
rospy.sleep(after) | 1 |
8bd9217d2424ffb80aa0ed7547e66b4f | 7b1ec9e8188c1dab13cc2e5b28772ef2 | Determines if this moves like a starfighter. | match self {
HardyHeron |
LucidLynx |
PrecisePangolin |
TrustyTahr |
XenialXerus |
BionicBeaver => true,
_ => false,
}
} | 0 |
1a524e10ed4194d59df72fcd1c630aa8 | 219e070a835b4e5af368ac2e4c22df2c | provides access to app engine to application clients in a managed server environment. | class ManageApp extends Avesta_Console_App
public function aeAction() {
$config = Avesta::registry('config');
if(!isset($config->appengine->name)) throw new Exception('You must be appengine integrated to proxy manage commands');
Avesta_Console::$verbose = false;
$args = array_slice($_SER... | 1 |
8baf137113cb8bd7b63ac92b4005b094 | 9bbae276e316f34429c1feaff2f3705b | 測試使用者刪除購物車失敗 | shoppingCartFacade := shopping.NewShoppingCartFacade()
shoppingCartFacade.Add(testUser, shopping.CartItem{ProductID: 1, Count: 2})
err := shoppingCartFacade.Remove(testUser, shopping.CartItem{ProductID: 1, Count: 2})
assert.NoError(t, err)
shoppingCart := shoppingCartFacade.GetAllItems(testUser)
assert.Empty(t, s... | 0 |
801837437da2adb73622c0d738f66f6f | 219a2f937458344ab5ec6d47eb6323ff | Get accessor for persistent attribute: armario_dedicado | public java.lang.String getDir_armario_dedicado(); | 1 |
bd368a6e76a8fc480b44ffc049e6210c | 56261f09fdcbe83792bc857afa96e8a9 | Calcule le montant de la remise | if (alcoolemie < 0.8) {
return 'Minorée : 90 € / Forfaitaire : 135 € / Majorée : 375 €';
} else {
return '4500 €';
}
} | 0 |
55b2ecac8b4891d4df56f99f11099a87 | eb2549d741071faa5975e38300dcc04c | Récupère la classe associé au modèle BDD considéré. | class AchatManager extends AbstractManager
public function getClass()
{
return "AppBundle\Entity\Achat";
} | 1 |
c4eb0f3318f4eb52d0a8e3d62fadca4b | c5dbf6fd526deac481d7de1fb00f8927 | Для конфигурации и списка параметров выводит суммарную эффективность запуска алгоритма на них | now = time.time()
self.sb.main_algorithm()
print("Working time:", time.time() - now)
print("Users number:", self.sb.users_number)
print("Tasks number:", len(self.sb.tasks)) | 0 |
9640ef45c1cd07944a6f2898fa81d319 | b1148897c7908cfe0c30b586fabde1e6 | returnes true if has any stored permissions | function userService($q, $resource, $log, tokenService)
function _userHasAnyPermission(){
return _authenticated && _user.permissions;
} | 1 |
56df52368ef5a6b582d3449962b82fc8 | 89e92b393373fdc6dc4266f57f211a97 | Returns a list of ASN1ObjectIdentifier objects representing the OIDs of the
extensions contained in this holder's CRL. | namespace Opc.Ua
public partial class CertificateIdentifierCollection : ICloneable, ICertificateStore
public List<X509CRL> EnumerateCRLs()
{
return new List<X509CRL>();
} | 0 |
1b316adb62a44eddb4eef2fd9a6a25ed | 862536a150e3997be3d8b0a674400f31 | Find index where element is either ">" or ">>" | {
Uint32 spot_s = cDT_s.toString().find('*');
Uint32 spot_f = this->toString().find('*');
if (spot_s == PEG_NOT_FOUND && spot_f == PEG_NOT_FOUND) {
return PEG_NOT_FOUND;
}
else if (spot_f == PEG_NOT_FOUND) {
return spot_s;
}
else if (spot_s == PEG_NOT_FOUND) {
... | 0 |
6199352f96e9e0c3300865b390dac78d | 398b9fea1f4630d01fe6b88fd22fa691 | \
Set current state of XBee device to 'active'. | mpl_status_t MPL_SetActive(mpl_handle_t *handle)
{
uint8_t regValue = 0U;
status_t status = MPL_ReadReg(handle, MPL_CTRL_REG1, ®Value, 1);
if (kStatus_Success != status)
{
return kStatus_MPL_ProtocolError;
}
else
{
regValue |= (1 << MPL_SBYB_SHIFT);
status = MPL_Wr... | 1 |
ec2e447df59a79056c5bedbce2fa1723 | 20420e6afc83483eaabc6b32c7bd9818 | Obtiene el valor de la propiedad fechaCargaDatos.
possible object is
{@link XMLGregorianCalendar } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"beneficiario"
})
@XmlRootElement(name = "Cabecera")
public class Cabecera
public XMLGregorianCalendar getFechaGene() {
return fechaGene;
} | 0 |
665b3e484009b010a37ee6f46dcd047d | 0a6457c68c433f1d8a1048bcdb260786 | Blur limit, maximum CoC radius | export class CompositorNodeDefocus
public get blur_max(): number {
return PythonInterop.getFloat(this.interop, `${this.accessor}.blur_max`)
} | 1 |
3a749e03bf6bc01f22c142802b4f730e | c97080d071d696e6bce0163bed0bd9cb | Can be used by applications to immediately check validity of entered mnemonic words for wallet recovery. | MangoWallet mangoWallet = queryMnemonicCodeWallet(mnemonic);
if (mangoWallet == null) {
return false;
}
return true;
} | 1 |
492af62415445a6c75bf4b1d215e1cd3 | 51bfceeb10b60b4694aa58364e66a226 | Modifies the existing job instance in the database. Also saves job input parameters. | namespace YellowJacket.Dashboard.Services
public class JobInstanceService : IJobInstanceService
public async Task<JobInstanceModel> Update(JobInstanceModel model)
{
return _mapper.Map<JobInstanceEntity, JobInstanceModel>(
await _jobInstanceRepository.Update(
_... | 1 |
60f794eed26f2efc9f6caf455337cc42 | 80998fbb81eabd672338077dfbb34817 | Returns the meta object for the containment reference '{@link org.xtext.example.mydsl.myAtl.LetExpCS#getIn <em>In</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getInExpression(); | 1 |
c59838c17792fc569706883a8e525f3a | 6e1f2ce3e0ad482eb9455bbe0ff4c57b | Returns current word we are playing with (we build this word on every turn by
adding 1 symbol at a time by user and computer) | class TypingChallengeService
currentWord () {
return this.challengeWordArray[this.currentWordIndex]
} | 1 |
84cdbe0cd28ac23f14b472198368d8b0 | 62677d7a3b971a07a86b188bee96bcef | Checks if the user agent matches a disallowed one. | {
preg_match('/' . implode('|', $this->agents) . '/i', $this->request->getServerValue('HTTP_USER_AGENT'), $matches);
return count($matches) > 0;
} | 0 |
e6750928666a7b2f764b09000b754825 | c0f4eec3feb22b13bb42239b391b7bdd | 获取三十天前日期 | public class DateUtil
public static long get3dDateTimes(){
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -3);
return calendar.getTimeInMillis();
} | 0 |
0994026ca2e79dc1ba025b3a0c593fc5 | 92a7b6e6fdec2716404716ebe4368935 | 下单前的连续三个行为动作的统计比例 | def get_action_ratio(df_actions, n_seconds=None):
if n_seconds is not None:
df_last_action_time = df_actions[['userid', 'actionTime']].groupby('userid').tail(1).copy()
df_last_action_time.rename(columns={'actionTime': 'last_actionTime'}, inplace=True)
df_actions = pd.merge(df_actions, df_l... | 0 |
637cde968231665b380b1c8213f9cb04 | 369bdbd5b63b1a3b957e1e66aee79f0a | Check if item name contains which type of item it is | {
int type=itemdb_type(nameid);
switch (type) {
case IT_WEAPON:
case IT_ARMOR:
case IT_AMMO:
return 1;
default:
return 0;
}
} | 1 |
4e709f88f98fd2ab01d010101a2773ac | 360fd5542099b39b19108cee89c415b1 | 获取会员安全信息 | public class probuf
public static Result getSecurity(String userID) throws JsonGenerationException, JsonMappingException, IOException{
String url = "/3/user/security/get";
String userid = userID;
String ct = String.valueOf(System.currentTimeMillis());
String version =... | 1 |
b3392f980030e54260db465a6a33f79d | fb5b5d82038df89938f95a8b30b99dc2 | 切片扩容 | var s1arr [3]int = [3]int{1, 2, 3}
var s1 []int = s1arr[0:1]
for i := 0; i < len(s1); i++ {
fmt.Println(s1[i])
}
fmt.Println("切片扩容")
s1 = s1[0:len(s1arr)]
for i := 0; i < len(s1); i++ {
fmt.Println(s1[i])
}
fmt.Println("======")
var s2 []int64 = []int64{1, 2, 3, 4}
for i := 0; i < len(s2); i++ {
fmt.Pr... | 1 |
7b64aeff50326e32e10e4bc6c1009d75 | 1450a17b86652adea9e9767cb1867f3d | Gets the raw spare byte1. | @Deprecated
public byte getReserved1()
{
return ( byte )reserved1.getValue(field_4_flags);
} | 1 |
7810eab3e7d4d36de470435dad8ace73 | c3ffba9988dae8f85cf86fe86bc3dcbc | Returns the tableViewer. | public class LayersViewPart extends ViewPart implements IAdaptable, ISelectionListener, IScreenDisposeListener
private TableViewer getTableViewer() {
return tableViewer;
} | 1 |
1a391a602e88106b7be5881c81aedd7e | bfc40f55f6756dcc5ae604182d2d88a8 | Create an instance of {@link AddConcertTicketType } | @XmlRegistry
public class ObjectFactory
public FlightTicketInterest createFlightTicketInterest() {
return new FlightTicketInterest();
} | 0 |
e239693e86768c618c7f30712d81c07b | 2e62ebd9af09ad931c1d02a442179f01 | Gets the car factory id. | CarFactory getCarFactory(); | 0 |
1489f0132131ab6f8685fdf67af142f8 | a99060e9e82cb9379daab9a30287236a | 查询单条工作时间配置信息 | @Service
@Transactional
public class WorkTimeServiceImpl implements IWorkTimeService{
@Override
public List<WorkTime> selectWorkTimeList(WorkTime workTime)
{
return workTimeMapper.selectWorkTimeList(workTime);
} | 0 |
c2c0e59ade7b02f149be5e44a38a3364 | 2b90cc17a33a896775d168df2264a3d0 | # 很多用户的git邮箱和名字不是公司邮箱,这里做个映射。 | global $field_dictionary;
$result = [];
if( preg_match('/((@qq.com)|(@163.com)|(@126.com))$/', $field_values['email']) === 1 ){
return [];
}
foreach($field_values as $key => $val){
if( isset($field_dictionary[$key]) ){
$result[]= [
'id' => $field_dictionary[$key],
'value' => $val
];
}
}
retur... | 0 |
40601b3f7e1b24a0ef6d625f47d60dfc | 1bcdba396fe200b0e05c9c4c16c5083a | Update the best performance of a particle neighborhood | public class Pso1
public void updateBest() {
obestz = bestz;
for(int k=0; k < SWARM_SIZE; k++) {
double x = particles[k][0];
double y = particles[k][1];
double z = getFitness(x, y);
if(z < bestz) {
bestz = z;
bestxy[0] = x;
... | 1 |
142e32ce6e1a4163e3502b675770408f | fd58b4b8e156ba0eb02d82e30aa6b603 | Failure reported from a test runner. | class VerboseListener extends \lang\Object implements TestListener
public function testFailed(\unittest\TestFailure $failure) {
$this->out->write('F');
} | 1 |
ee6fdf7c15e00d2131d4b75c9d597682 | bacbf0c7e4d911f1210184c025ac8cdc | prepare the retransmittable files. Return: indication if files should be retransmitted. | MAGIC_ASSERT(tcp);
for (uint32_t seq = begin; seq < end; ++seq) {
Packet *packet = g_hash_table_lookup(tcp->retransmit.queue,
GINT_TO_POINTER(seq));
if (packet != NULL) {
tcp->retransmit.queueLength -= packet_getPayloadSize(packet);
... | 0 |
bf96eebdd299a47b5c5f4bdd61d6b645 | fdcae70fb82df26889d62c29a9abfb58 | Returns environment related model. | self.env_model = env_model
self.b_env_model = True
if (self.b_swarm_controller):
self.swarm_controller.set_env_model( self.env_model ) | 0 |
417db68420666d9a9a8dff10caa2ca0d | 25b9c5d240b3202d548adbf16b4eeef0 | 接收小米推送消息,此消息会在小米通知栏消息点击时触发 | public class XiaomiPushBroadcastReceiver extends PushMessageReceiver
@Override
public void onNotificationMessageClicked(Context context, MiPushMessage message) {
} | 1 |
578d1b28d88889d5fa4b8b598cc12583 | da4a84d7611c33478db59fc62bc957cd | Bad list for variable domain -- duplicate elements | def dup(l):
return not (len(set(l)) == len(l)) | 1 |
9c556a898eb3c6158fea4b2890bfa79b | 96d5120bbb6414fdea05cabf4cff5e18 | 生成未完成流程活动实例的待处理用户. | if (processInstanceVo.getEndTime() == null) {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
.processInstanceId(processInstanceVo.getProcessInstanceId()).singleResult();
if (processInstance.isSuspended()) {
processInstanc... | 1 |
9a6fb0bdc632e2bc114e6d4f89d27f4d | ee0c6b4d2d00c3620d933d3908c8e71a | Sets marker if product of this type should be excluded from discount calculation. | class QuoteProduct
public function setProductsDiscountType($productsDiscountType){
$this->productsDiscountType = $productsDiscountType;
} | 0 |
7505b76d4eb3a5ca58e2eb73f54ef460 | 4f4724b6674b7de96809a555e33af518 | Initialize Q table with 0s | def q_table_initialize():
return np.zeros((25, 4)) | 1 |
05448b219da32a58442fe3de77cc8d6a | f06ad66b505419dfaa620000db54806a | Sends return object to repo layer to add to database | public void returnObject(T log); | 0 |
782274f607749b92e3fc3d628eda52c6 | c14818115f7f64d10e044ec7475c425d | Returns an option whether to throw API exceptions or not. | class SDK
public function getThrowsExceptions() : bool {
return $this->throwsExceptions;
} | 1 |
05740814af0ea157654020da30a26e2e | c88899ffbf53f6f9dcf2670caa12d731 | Enables ball sensor interrupt | GIMSK |= (1<<PCIE);
PCMSK |= (1<<PCINT1);
PORTB |= (1<<PINB1);
} | 1 |
8e7f0aae333a8fce3d3be1d1f92f7978 | 64b7a82b0d7997f6c84d5abcfd5354b2 | set the query for discussion search | const searchQuery = {
pipeline: this.pipeline,
limit: this.limit,
sort: this.sort,
includeOpeningPost: this.includeOpeningPost,
votePublicKey: this.votePublicKey,
moderatorKeys: this.moderatorKeys
};
this.setFrom(searchQuery... | 1 |
e2767efbb01d998729e8f23a8244e491 | 11c61f67f4214f4307f0f8aab9fc0d2a | Make the matrix symmetric by copying the upper triangular part to the
lower triangular part. | triu = ary(triu).flatten()
indices = ary(np.triu_indices_from(mat, k=1)).T
if inplace:
for ij, ord in zip(indices, triu):
i,j = ij
mat[i,j] = ord
mat[j,i] = ord
return mat
else:
matcopy = mat.copy()
for ij, ord in zip(indices, triu):
... | 1 |
0299ba81d569cfff1b6e713859da80bf | 7d3a5cb535ecb19c276b2e04187a2342 | (1): City.all()\n(2): City.count()\n(3): City.show(<id>)\n
(4): City.destroy(<id>)\n | class HBNBCommand(cmd.Cmd):
def do_classes(self, arg):
print("BaseModel / User / Place / State / City / Amenity / Review") | 0 |
ecb0d4e59df682b5251aa2c9da778b6f | 444c99c0e8955a0feac3ef5da9fd240c | Validate buyable status of product in extracted product data | if (!productDetail) return false;
var productSummary = productDetail.productSummary;
return (productDetail.imageUrl1 && productDetail.mobileDescription &&
productSummary.productOriginId && productSummary.warehouseId && typeof productSummary.salePrice === 'number');
} | 1 |
a8d6cf5ef7cfdf1b8fcf98091c94355c | 2b4f1c610f2d95a2544e133c590cf107 | 异步返回JsonResult | public @ResponseBody Callable<JSONObject> asyncJson() {
return () -> JsonUtil.getSucJson();
} | 1 |
711e0845485598872d0a7d81e315b742 | 991097a9b222985a85a0e0a351b2d6f1 | ################# Filtering E-Genes from E-Genes x S-Genes Matrix ################# | FilterSNP <- function(gwas_result,fine_mapping){
idx_cut <- NULL
start <- fine_mapping$start
end <- fine_mapping$end
CHR <- fine_mapping$CHR
for(i in 1:nrow(fine_mapping)){
print(i)
chr_temp <- CHR[i]
start_temp <- start[i]
end_temp <- end[i]
idx <- which(gwas_result$CHR==chr_temp&gwas_res... | 0 |
c894ad5b820857679bdef93fd46adab0 | 0a60d33910f448950db4f17f14603c27 | returns the number of non empty clusters | for (int nCluster = 0; nCluster < opt.max; nCluster++) {
if (clusterList[nCluster].size == 0) return nCluster;
}
return 0;
} | 0 |
4833898da6a09fc0c8f006eb83fb0c77 | 2db3f3f10af8f7c78fbb4cbb6d283b93 | Opens a dialog where the user should specify the filename and
loads the game.
Called from OpenAction.
Returns no status as this game is stopped. | class LoadGamePrompt(Popup):
def import_game(self):
FileChooserPrompt(
self.import_game_from_file,
multiselect=False
).open() | 1 |
8ba011a411665ae80373499b4db34b34 | 3daad00c24147bc4a613492f44a1afda | モデルのパスとテクスチャのパスから合成パスを得る | public class GameUtils
[DoNotToLua]
public static string GetCombinePath(string path1, string path2, params string[] path3)
{
StringBuilder back = new StringBuilder();
back.Append(path1);
back.Append(ABPathHelper.Separator);
back.Append(path2);
if (path3 != null)
{... | 1 |
b851cad0a8af2d25b86c7c007df4aac4 | a786f0c01796cbcadf3f705b05c91d3e | Passed an angle returns the robot laser sector corresponding to it | function getSector(a: number, s = 8) {
return Math.floor(s * (0.5 + ((a / (Math.PI * 2)) % s)))
} | 1 |
ed2d450e9f610fb3e138ff8f887e05cf | abda8b038bdab1afd881cb76a79bc504 | Called then the resident component switch to IDLE state, i.e. after #handleResidentEndedState() returns OR it the task is
aborted | void stateIdle(void)
{
} | 1 |
d05d2a909dfc79cdec0e7b7dea0ae285 | 97157a4d847fc5b5c715beb437bdd848 | método que permite interactuar con el menú, clic en expedientes, clic en revisar expedientes. | @Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
Bundle args = new Bundle();
args.putString("CODE",codigo);
args.putString("NAME",nombre);
boolean Fragmenttransaction = false;
Fragment fragmento = null;
if (id =... | 0 |
b59bee37cad048731e1c6f0b3bed65fa | a1654a8364055e0d348fef23687a4d95 | Update a backup | @javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/alloydb/v1alpha/service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class AlloyDBAdminGrpc
default void updateBackup(
com.google.cloud.alloydb.v1alpha.UpdateBackupRequest request,
io.... | 1 |
414bab92529cf7fed3e630fb48bde7bd | 16c183622ec7d35a5ff6f3012399f4c4 | Recupera Chave do pedido. Utilizado para identificar um pedido no gateway | abstract class Gateway
public function getPK() {
return $this->pk;
} | 1 |
933ef3b991d1ee03dff8542c35f1720e | 69dc7f02f6a24a254f441dbfb870b8b1 | Returns a view of the last positions. The first position is the current
position, then in temporal order. | public class Positions<T extends HasPosition>
public Collection<T> list() {
ArrayList<T> copy = new ArrayList<>(positions);
return copy;
} | 0 |
cd21d88db57c473acff2f4cca9031029 | af2929033865c948312982baff0ea11d | initialize the /dev/console and (if available) /dev/aux devices. | tty_t *tp;
{
console_t *cons;
phys_bytes vid_base;
u16_t bios_columns, bios_crtbase, bios_fontlines;
u8_t bios_rows;
int line;
unsigned page_size;
line = tp - &tty_table[0];
if (line >= nr_cons) return;
cons = &cons_table[line];
cons->c_tty = tp;
tp->tty_priv = cons;
kb_init(tp);
tp->tty_devwr... | 0 |
c18ccd7be8206751dcc847ef228d1d97 | 19a03bcd0d901035d50505b160b89b74 | 显示海运上传页面 | @Controller
@Scope("request")
public class ExpressAction extends BaseAction
public String ship() {
return SUCCESS;
} | 0 |
2ca4dda8e222e16ad2c3018ff86b6054 | 3f8a21821992c92fdb813b41427120f7 | 检查公司编号的唯一性 | @Service
public class CompanyServiceImpl implements CompanyService{
public boolean verifyComNo(Integer comNo){
return comNo==null?false:true;
} | 0 |
0f12070bd3af125f74b823abab7a3a28 | cad08adbc986afd64e2cbdbe096d70e6 | Сортировка точек по углу поворота | namespace HW2
class Program
static List<Point> SortPoints(List<Point> points, Point q)
{
return points.OrderBy(x => Angle(x, q)).ToList();
} | 1 |
61518bc39ceacbca1ffd247aee837e77 | 88d47480db3a3e6bc7713c56b148c47e | Is the item in source newer than in destination | class BackupNode(object):
def modified_contents(self):
source_mod_t = stat(self.source_item).st_mtime
if not exists(self.dest_item):
return True
elif source_mod_t > stat(self.dest_item).st_mtime:
return True
else:
return False | 1 |
a2d6c923f9360643a5979c5248c73416 | 13c26eba534f749379d2fee03187f02e | 查询指定申请单总的还款记录数 | public int manualRepaymentCountAll(Map<String, Object> conditions); | 1 |
828596f6e0c851a7504cd3e81d3aaffd | 4aa38e7f8f6f3fc4de97b28384a17c66 | @brief Test recoverable errors using mock broker error injections
and code coverage checks. | startAllBrokers();
sendReceive("local.test.1", true, "Consumer.a.local.test.>", false, 1, 1);
sendReceive("global.test.1", true, "Consumer.a.global.test.>", false, 1, 1);
destroyAllBrokers();
} | 0 |
513fb6971995adf2c9b3b96ff3cd4432 | 27d52bed3029b6d142cf8ff49aad9a72 | This method amplifies the rate of change of x. | public class SocietyBar : MonoBehaviour
public void increaseRateOfChange(float toAdd)
{
this.rateOfChange += toAdd;
} | 1 |
cc1f88eb4f110908b4dfef3c7155b3f0 | 796588863467e580eee1f4f2c110d813 | 把路径补足到最大时间点 | def completeDF(df,dateVar="log_day",addVar="premium_cur"):
dateCol = df[dateVar]
minDate,maxDate = min(dateCol), max(dateCol)
if (maxDate-minDate).days+1 == len(dateCol):
return df
else:
timeLine = np.arange(minDate, maxDate+np.timedelta64(1, "D"),
dtype='dat... | 1 |
5b96e79174264c70d2631cd7b762243f | 9fd79826237bd864782107493bc9b404 | satellite number to satellite id ----------------------------------------------- | if radar_name == 'ABBE':
radar_num = '07005'
elif radar_name == 'AJAC':
radar_num = '07760'
elif radar_name == 'ALER':
radar_num = '07774'
elif radar_name == 'TROY':
radar_num = '07168'
elif radar_name == 'AVES':
radar_num = '07083'
elif radar_na... | 0 |
53a37df97effcdfc0d91d02a20e4f54f | b0103372fdb1000bd98be72509e43f7e | Removing the history | class HistoryController extends Controller
public function destroy($id)
{
$history = History::find($id);
if (file_exists('uploads/history/'.$history->image))
{
unlink('uploads/history/'.$history->image);
}
$history->delete();
return redirect()->back()->wit... | 1 |
39ad314ab50313571dcc6766d4a2925d | 2992df04851bec357ad33c121d64d239 | Save simulation parameters | boost::property_tree::ptree pt;
pt.put( "Global.EndCondition", gEndCondition);
pt.put( "Global.Number_burst", gNumber_burst);
pt.put( "Global.Simulation_start_time", gSimulation_start_time);
pt.put( "Reactor.Beta", gBeta);
pt.put( "Reactor.L", gL);
pt.put( "Reactor.LamdaS", gLamdaS);
pt.... | 1 |
f34debf7b2ad16d4fc66557ead87c555 | 4f60675a0a778256f4a7bdfc8026e3fc | <query>
Search the Fedora Account System usernames, full names, and email
addresses for a match. | def search(substring, include_deleted, include_pending, include_external, include_system, **criteria):
assert set(criteria.viewkeys()) == {'first_name', 'last_name', 'email', 'affiliation'}
criteria = {k: v for k, v in criteria.viewitems() if v is not None}
res = search_users(exact=(not substring), include_... | 1 |
9b316e48dbc289022ea1a126257ebcb1 | 854c464a6ad8c905a79add9c0ce86662 | Altera o valor do estado em Municipio | class MunicipalityController extends Controller
public function update(Request $request, $id)
{
$municipality = Municipality::find($id);
$this->validate($request, [
'name' => ['required', 'max:100'],
'code' => ['required', 'max:10', 'unique:municipalities,code,'.$municipality... | 1 |
531e99315ff1a2476f6c0073fa40885b | 445d8741192159647fecb39c3cf5c04e | CHECA SI EXITE REGISTO DEL PARTICIPANTE EN LA TABLA DE CONTEOS | {
$q = $this->db->get_where('participantes', array('id' => $id), 1);
if ($q->num_rows() > 0) {
return $q->row();
}
return FALSE;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.