query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
2ffec3cc242f74f8f6ad2fb30beb40cc | d2d33b3f7336d385c1db40d2da7ca5db | Searches through child objects in a one-to-many relationship. | let query = new RxAVQuery(targetClassName);
query.relatedTo(this, key);
return query.find();
} | 1 |
fbf8d1b9d0c8fadaf9baebe6073e36a6 | 10e4b2537ac0da51d9a2c6a17f4aebb7 | 주어진 날짜 기준의 요일을 1~7값으로 리턴.
1 : SUNDAY, 2 : MONDAY, 3 : TUESDAY, 4 : WEDNESDAY, 5 : THURSDAY, 6 : FRIDAY, 7 : SATURDAY | Calendar cal = GregorianCalendar.getInstance();
cal.setTime(date);
return cal.get(Calendar.DAY_OF_WEEK) - 1;
} | 0 |
06ba7d6d0078b89bd7b4153684e9cdbe | 3a7db0d8b7fedfcd52ce200b40ecee53 | No per VA invalidate on Kepler, redirect to invalidate all. | pub fn invalidate_tlb_all() {
unsafe {
llvm_asm!(
"dsb ishst
tlbi vmalle1is
dsb ish
isb"
:::: "volatile"
);
}
} | 1 |
7b005231639dbeed463451d5ee3ac61e | b0cea8eeeb5abd2496a21b03102bf68a | 获取多媒体文件 - 后缀(包含.) | class Attach
public function getMedia($params)
{
return $this->serv->postSDK(self::GET_MEDIA_URL, $params, 'generateApiUrlA');
} | 1 |
c897d649e23f60decb131320478977b0 | 77adecfb68aae3c8f5ac88ad29d87742 | Creates new monitoring configuration for the specified extension 2.0 | {
ApiResponse<ExtensionMonitoringConfigurationsList> localVarResponse = ExtensionMonitoringConfigurationsWithHttpInfo(extensionName, nextPageKey, pageSize, version, active);
return localVarResponse.Data;
} | 0 |
ef098342d5878b7b7bf3173bec77c37f | 661db5b829b05cffd361850009e8d987 | # Creates data with conversion rates at two time points
# Requires exchange rates with the same base | tb <- merge(t1, t2, by='TSindex', all.y = T) %>% replace_na(list(VALUE.x = 0)) %>% mutate(VALUE = VALUE.x/VALUE.y) %>% select(TSindex, VALUE)
return(as.tibble(tb))
} | 1 |
5a0ab4ef1f95b70ad67fde8ee40f3b88 | 4132ee6ac0417f8b64224c13390f6853 | 展示未知来源安装 | private fun startInstallPermissionSettingActivity(context: Context?) {
if (context == null) {
return
}
val intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES)
intent.setData(Uri.fromParts("package", context.getPackageName(), null))
(context as Activity).st... | 1 |
f67ffb3e58065824ab731caeae80210f | 3fd0f5d0253f6d1380918c317e54a00f | 取得済の動画と動画一覧を比較して差分を返す | class DropboxSynchronizer
diffFileLib(oriFileLib, chgFileLib) {
const diff = {
added: {
pptx: [],
docx: [],
pdf: [],
},
modified: {
pptx: [],
docx: [],
pdf: [],
},
deleted: {
pptx: [],
docx: [],
pdf: [],
},
... | 0 |
40440bb374966d04a7a6e2c2314e7d3a | aa0e44ab0d8f44bb853eac78b070c331 | Checks if a data collector has been added | class DataCollectorInterface
isEnabled() {
throw new LogicError('You must implement DataCollectorInterface.isEnabled.');
} | 0 |
fc33da4edb93f05dd41657f3e6c5bc59 | 745b4541193cd9eaf42ba27690616c90 | Clear the current list and add new planning periods to it | class MotorPhonemePrograms:
def addPlan(self, targets):
self.__plan += targets
self.__advance() | 0 |
4e8a87d3d6431f0c125ee21402d5d82c | 09b986e7ebf9124d90f4dbfc7e4c2030 | 主キー列の値を指定して個別配信メールキューを削除します。 | void delete(Long mailQueueId); | 1 |
370890a397102f7e75c0b56cd146b597 | 0cd856f55f64bfa21a9bc89c6d955b9b | 批量删商品的种类 | @UpdateProvider(type = Provider.class, method = "batchDeleteProdcategory")
public int batchDeleteProdcategory(List<Integer> ids); | 1 |
568d135fb0bed0e2dfb15dd5c5faa64a | 51b2bb5759328669eb3e4ae215f922a9 | Should be called when the player enters a Tile so that the graphics can be adjusted. | {
if (tileGameObjectInScene != null)
{
switch (ownerType)
{
case TILE_OWNER_TYPE.CURRENT_PLAYER:
tileGameObjectInScene.GetComponent<MeshRenderer>().material.color = TILE_DEFAULT_OWNED;
tileCenter.SetActive(true);
... | 1 |
061d21ee0531318d96f2503531b61e0d | 155fdf610091d472b5456affd18e305b | <code>
<![CDATA[
senses ::= ( NIL | "(" ( NAME | <full-sense> )+ ")" )
]]>
</code>
If NIL is given, an empty list is returned. | if (pos == POS.ALL) {
return LightImmutableList.copyOf(uniq(merge(lookupWordSenses(someString, POS.NOUN), lookupWordSenses(someString, POS.VERB), lookupWordSenses(someString, POS.ADJ), lookupWordSenses(someString, POS.ADV))));
} else {
return doLookupWordSenses(someString, pos);
... | 0 |
0b0452f1969459c72f5f1958a29d5377 | 6fba17db74eaedad668367254c07b351 | Function for compensating the change in focus caused by x-y movement. | if(x_change-500.0f/zoom_camera<-500)
x_change=-500+500.0f/zoom_camera;
else if(x_change+500.0f/zoom_camera>500)
x_change=500-500.0f/zoom_camera;
if(y_change-350.0f/zoom_camera<-350)
y_change=-350+350.0f/zoom_camera;
else if(y_change+350.0f/zoom_camera>350)
y_change=350-35... | 1 |
99c38c064a651cf346969362101a0aa7 | 6bda2b261d38c3373d2cd5e62599b20b | Initiates the asynchronous execution of the CreateProfileJob operation. | public SyncPoller<PollResult<ProfileInner>, ProfileInner> beginCreateOrUpdate(
String profileName, String resourceGroupName, ProfileInner parameters, Context context) {
return this.beginCreateOrUpdateAsync(profileName, resourceGroupName, parameters, context).getSyncPoller();
} | 1 |
49bb476665d3f091d420cba01074fe7c | 87d12ae51e690363ecd57ec5863da4a3 | Process event log file and insert records into db | def process_log_file(cur, filepath):
df = pd.read_json(filepath, lines=True)
filtered_ts_values = df[["ts"]].values
ts_data = []
for x in filtered_ts_values:
interim_data = []
t = pd.Timestamp(x[0]/1000.0, unit='s', tz='US/Pacific')
interim_data.append(t)
interim_data.app... | 1 |
236b443f31930685afa2264bf15e6ca3 | 2f5a774b9dbfa9d6f7ee86d448e91f3b | slot called when user modifies the color tolerance line edit text. It will update the slider
to match the new entry. | ColorSelect *this = (ColorSelect *) slider;
this->color.r = round(this->sliderR->value);
$((View *) this, updateBindings);
} | 0 |
5e465546bf663d311e3c77ca9346b2a4 | b6e42a56fb65d414560f26aed979de22 | 生成地图数组 | {
mapHolder = new GameObject("Map").transform;
positionList.Clear();
for (int x = 2; x < cols - 2; x++)
{
for (int y = 2; y < rows - 2; y++)
{
positionList.Add(new Vector2(x, y));
}
}
Vector2 pos = ... | 0 |
70b6e10f0a9aeec00b7ac6b91ca6d2cd | 7ffea3d4246eff7fd43ca17a94abe169 | When a unit is hit, this tells the current location and all
surrounding locations that they are on fire | {
boolean test=false;
if(smoke)
{
if(north==null||north.passage_Wall())
{
if(g.board[x-1][y].fire)
{
g.board[x][y].setSmoke(false);
g.board[x][y].setFire(true);
test=true;
}
}
if(east==null||east.passage_Wall())
{
if(g.board[x][y+1].fire)
{
g.board[x][y].set... | 0 |
2e7d191b68ad97a9d871981e189d2651 | cddbfc7246c1f2d3e18a9047c244355a | 计算间隔毫秒 | if (begin == null || end == null) {
return 0;
}
int milliSeconds = 0;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Date sdate = sdf.parse(begin);
Date edate = sdf.parse(end);
long times = edate.getTime() - sdate.getTime();
milliSeconds = (int) times;
} catch (Pars... | 1 |
f95df9763d999d32f2a13c4ecf3964d8 | 0ef11a4047719238d3748117884c34bb | Gets rows from the datasource based on the PointBalanceDetail_PK index. | {
int count = -1;
return GetByID(transactionManager, _iD, start, pageLength, out count);
} | 1 |
0d5c42c207db0ae82e3049ca3682f10d | f58b0911c89e6fc5f3fc71b90a5bdbec | 房间编号 | public Integer getRoomNumber(); | 1 |
f600f6376a7af1312e847fabd19b5619 | 0c7ed13aadc75dd7e45f7c31c6d32ce4 | Cette fonction permet de recupérer l'emplacement d'un fichier texte
ouvert à l'aide de l'interface graphique | namespace Cryptogram
public partial class Form_Cryptogram : Form
private void ObtenirCheminFichierTexte(out string cheminFichierClair)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Only Text Files (*.txt)|*.txt";
ofd.Multiselect = false; ... | 1 |
5ae3c6fdc805d51e1e753d141aa07878 | e95e150d67981e574306ee4cb184085b | Private function called after changing auto-encode checkbox. | response = messagebox.askokcancel(
"Stop encoding?",
"The encoding is still running!\n Do you want to stop it?\n \
All files which are not encoded yet will not be encoded!")
if response:
if self.cmd is not None:
self.cancelEncoding = True
... | 0 |
d4c9d3fa12997e2c8931a5acbb499be6 | 8df44db9dc84733db63544ab1801d946 | url是否需要统计 | abstract class BaseFragment : Fragment()
open fun needStatistics(): Boolean {
return true
} | 0 |
6b862cf3d5750a2747c4fb4626792242 | a91e0b5b8a2a96b3fa8efb0f06461c9c | 获取下次开赛剩余时间 | function SeasonsProxy:getRemainTimeOfOpenNextWorld()
local time = self:getRemainTime(self._remainTimeOfOpenNextWorldKey)
return time
end | 1 |
5721bab7b1710dd1e6b6735fde5a7c61 | 5067d6f877a0b5f7778b8e5a1a21be6b | onCTSDisable This method is called when the CTS changes from enabled to
disabled | {
FUNCTION_ENTRY("onCTSDisable");
m_callback.onPTTReleased();
try
{
CORBA_CALL( m_radioSession,
ceaseTX,
( m_sessionID.c_str() ) );
}
catch (...)
{
LOG(SourceInfo, TA_Base_Core::DebugUtil::GenericLog, TA_Base_Core::DebugUtil::DebugError,
"Error requesting ceaseTX... | 1 |
2ba5fd0ae29c04463ba86d3bee952df4 | 136ab9b28bb52f7d0251c39e9c7e27eb | 生成私钥,传入 公钥 和 欧拉函数φ(n)。 | class PAEKS : BasicScheme
override fun keyGen(param: Param): KeyPair {
val sk = param.Zr.newRandomElement()
val pk = param.g.duplicate().powZn(sk)
return KeyPair(sk, pk)
} | 0 |
e5b6cf730070fa3159b3ddfcc68f84fa | 3086f7bc49145791493437f5eb27f1e5 | Resolves the list of URIs into a list of {@link Endpoint} instances | public abstract class BackendService<BackendConfigurationType extends BackendConfiguration> implements Service
public abstract CompletableFuture<List<EndpointModel>> fetchEndpoints(String pattern); | 0 |
20771648c6ba43a7e9011fedf13c6d06 | 6060e0d8c95b2edf68ee0215ca88a083 | チェイン数を1に初期化 | public class ChainManager : MonoBehaviour
public void ResetChainNum() {
this.CurrentChainProp = 1;
this.ChainText.text = "Chain " + this.CurrentChainProp;
} | 1 |
d8836c34ab45e95bb2f6a7ded8c7bbbe | 0c57fa2bfcc8d1164141d3163bb1adfd | Decides which type of note hit function to call | {
if (trackedNotes.Count > 0)
{
NoteObject noteObject = trackedNotes.Peek();
if (noteObject.hitOffset > -6800)
{
trackedNotes.Dequeue();
int hitLevel = noteObject.IsNoteHittable();
if (hitLevel > 0)
... | 1 |
8a3e4846a06a4eb00c06d2e24932e933 | a085a35b55f1470c268bd4eabb8c672d | Returns an evolved population from the current population. | newPopulation = Population(population.size(), population.getIndividual(0).getChromosomeLength())
for populationIndex in range(population.size()):
individual = population.getFittest(populationIndex)
if populationIndex >= self.elitismCount:
for geneIndex in range(in... | 1 |
bc0755eb6e9291eb838e514ad22ab89a | 7d1ba28e6458909e7c5ff813c6c095e6 | Convert geometry to XYZ-formatted string | namespace Atma.Math
public string ToString(string sep, string format) => ((x.ToString(format) + sep + y.ToString(format)) + sep + (z.ToString(format) + sep + w.ToString(format))); | 0 |
9e41113730805e7a87a3b9f579d532af | 2cba274f679ce14703fa0ac21ce1d5c5 | 截取字符串的指定部分,索引超出时返回原字符串,不报异常 | String str = "零壹学堂,计算机编程工程师的摇篮";
str = str.substring(5, 10);
System.out.println("str从索引5到10之间截取的子字符串为:" + str);
} | 0 |
860a2a49013b328b5641b31d6f9e1769 | 6dfe63b16d61e5b14919eaf580640356 | # статистика по работе модераторов | $registry = Registry::getInstance();
$query = $registry->db->prepare("SELECT SUBSTRING(self,12) as self, COUNT(*) as `count` FROM `counter` WHERE referer != '' && (date BETWEEN :start_date AND :end_date) GROUP by self ORDER BY `count` DESC");
$query->bindParam(":start_date", $start_date, PDO::P... | 0 |
8a56cac2e5776668b73a69a3861982df | bf7e444cf581cae506b2f56f33d0617f | Locates the PEI Core entry point address. | namespace Binarysharp.MemoryManagement.Native
public class ManagedPeb : RemotePointer
public static IntPtr FindPeb(SafeMemoryHandle processHandle)
{
return MemoryCore.NtQueryInformationProcess(processHandle).PebBaseAddress;
} | 0 |
3d05b46dac613d916d339a425a9f589b | 191c30d234aef8265f0fe65ef95823db | renderFile renders a file from a source path into the destination path given a rendering context | def render_file(context, group, source, dest):
loader = FileSystemLoader(searchpath=TEMPLATE_BASE_DIR)
env = Environment(
loader=loader, trim_blocks=True, lstrip_blocks=True, keep_trailing_newline=True
)
source_file = group + "/" + source
env.globals.update(zip=zip)
template = env.get_te... | 1 |
9e46309a3077e2cad4add15ac93f6a24 | 1172a30508e85b0a0397377fa76b4df2 | Getter om films op te halen aan de hand van het IMDB tt-nummer | class Movietheatre:
def getFilm(self, filmID):
return self.film_table.tableRetrieve(filmID) | 0 |
08163b96307fa9057119dfc623de5bfe | 6e614235e207798819c46f8f54dc3c1c | get platform special code | String getPlatformCode(); | 1 |
6ce8ce9f7c95f30f43380695e25117f9 | 57c57f8ba3e8c0c652da4f18d79df8bf | Calculates the feedrate in inches per minute | double Shooter::calcRPM(units::inch_t dist)
{
double FWSetRPM = std::clamp(dist.to<double>() * kDIST_RPM_RATIO,0.0,kMAX_FW_RPM);
debug(FWSetRPMDebug = FWSetRPM);
return FWSetRPM;
} | 0 |
59a4e525e9333cc8a60fec0fc0abc286 | 71214a01a0046a541e36cca8970c55ab | Description This function check the specified service class(es) can be find in
the received SDP database
Returns BOOLEAN TRUE - found
FALSE - not found | javacall_result javacall_mms_is_service_available(void) {
return JAVACALL_OK;
} | 0 |
f01c85e74c697543d155dfeed8e70023 | ad4b3d3418b8c4dd72a2e133cc5b54ec | make fresh decks if cards get low. | global max_cards_on_board, score
if max_cards_on_board + 3 <= ABS_MAX_CARDS_ON_BOARD and len(deck) > 0:
max_cards_on_board += 3
if len(possible_sets) > 0:
score -= 2
deal_cards() | 0 |
07007e4508e9af9d66d5a5a729be517c | 65f5cae47760fe19d45fd4006ba50a37 | Dimensionar Secciones | e.preventDefault()
$(window).scrollTop(0);
let seccion = $(e.target).html()
if (seccion === "Bimba biocosmética" || seccion === "Inicio"){
seccion = "Inicio";
$("header").removeClass("menuNavegacion");
$("header i").removeClass("text-dark");
$(".navbar-toggler").addClass(... | 0 |
a4a793944b68a0a6a9a1e8db31f2d70e | 546bda4cc5e44357707956300469c613 | Sanity check. Make sure that visitor classes use the right names. | class DefinitionFinderTest(unittest.TestCase):
def assertNames(self, actual, *, variables=None, functions=None,
classes=None):
actual_vars, actual_funcs, actual_classes = visitor.split_namespace(actual)
self.assertLists(actual_vars, actual_funcs, actual_classes,
variables,... | 1 |
048529d1278f68dca29aa769d40c66f7 | 81f2045a58d4398decc690a630cef4b5 | Ignore unknown event payloads. | class Callbacks(object):
async def event_unknown(self, room: MatrixRoom, event: UnknownEvent):
if event.sender == self.client.user:
return
if event.type == "m.reaction":
await self.plugin_loader.run_hooks(self.client, event.type, room, event) | 0 |
4961df99c212b2df09db52fc2c2b8933 | 9d0e56acde6ec17d1da0dfc78cb99a94 | 根据机场代码 返回 航班属于国内 还是国际线路 | {
$http = new EasyHttp();
$detail = $http->request('http://jwgl-cuit-edu-cn.webvpn.cuit.edu.cn:8118/eams/stdDetail.action', array(
'method' => 'GET',
'timeout' => 5,
'redirection' => 0,
'httpversion' => '1.0',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT... | 0 |
4d2a142a87679a60d4b1a1f452382fcb | 3717ebd8e33e69b8230eac28fc95dcb7 | Given a pointer to element e in the set, finds a SetElement in the set
that has the next smaller key, and returns a pointer to it, or null if
e is the minimum element. | public E higher(E e) {
acquireReadLocks();
try {
E ret = null;
for (Set<E> shard : shards) {
E other = ((NavigableSet<E>) shard).higher(e);
if (ret == null || (other != null && comp.compare(other, ret) < 0)) {
ret = other;
}
}
... | 0 |
7d0646b125e70503e428e2f38c628cd1 | a444ba3d3ca822fb990a7ff394cb48df | Replaces the database at the given path with the contents of the given sql string | namespace Camera.Utils
public class DatabaseConnector : IDisposable
public void UpdateDatabase(string path)
{
_service.UpdateDatabase(path);
} | 0 |
9e670c456e049e2f01e00aa167ee2f83 | 82e21e7d4152f3462c8845efd2bc5f52 | When generating samples from a larger MDP, if each sample is marked by the state from which it comes, the following function clusters the samples depending on states from which they were generated. | class ExplicitDFA(DFA):
def uniformSampler(self, orderedStates):
self.computeCounts(orderedStates)
return (lambda : self.sample()) | 0 |
9ba83271034e4b8ae014e41e907e1f6d | 7dcc1a3f0176979e87c0fa8ee9d341fb | !
指定された番号の行へのポインタを返す | {
assert(m_ptr_mysql != nullptr);
assert(m_ptr_res != nullptr);
assert(m_row != nullptr);
assert(n < mysql_num_fields(m_ptr_res));
return std::make_shared<std::vector<char>>(m_row[n], m_row[n] + this->data_size(n));
} | 0 |
8b3461c4b4c50630c6fe5391c7b63526 | d0ce029060f3d9c2e74c7fce3ac5cf69 | Exits the store screen and opens the main menu screen | public class MainMenuController
@FXML
void StoreView(ActionEvent event) {
main.showStorePage();
} | 0 |
4d0521e313457bc177271dda469db970 | 9215689ff878d9f3b32f651d2bb716f9 | Decorate cache backend with additional functionality | def init_app(app):
app.teardown_appcontext(close_cache)
app.cli.add_command(init_cache_command) | 0 |
7f2bf7d35245b49cb6827073c369bdff | 945db360503c34539bd278627459ddb7 | Lower clamping threshold that indicates the fluid speed where cells start to emit particles (lower values result in generally more particles) | export class FluidDomainSettings
public get sndparticle_tau_max_wc(): number {
return PythonInterop.getFloat(this.interop, `${this.accessor}.sndparticle_tau_max_wc`)
} | 0 |
15c7f89f3f97df88f495eca55cfff699 | 275a4dd97cfa4e2fe2a6f40daf6775a3 | compute nnz in each row | def numba_array2d_nnz(ary, width, height):
nnz = 0
for line in range(height):
for col in range(width):
if ary[line,col] != 0:
nnz = nnz + 1
return nnz | 0 |
668e07b1ac458ce150127829e7bec3f9 | c7e5efb33d2d373da558906c16d7e1db | 获取给定成员相关联的分数在一个有序集合。 | namespace Easy.Common.Cache.Redis
public partial class RedisCache : IEasyCache
public async Task<double?> GetSortedSetScoreAsync(string key, string memberValue, int db = 0)
{
if (string.IsNullOrWhiteSpace(key) || string.IsNullOrWhiteSpace(memberValue))
{
return null;
... | 1 |
0297a1a5aaf4c9fe277e530ab2c41b26 | 33828b3cfc74ecfd4f23cac49709d536 | Specifies the user-friendly name that should be used for this connection
pool. This name may be used in debugging to help identify the purpose of
this connection pool. It will also be assigned to all connections
associated with this connection pool.
this connection pool. | public class JndiDataSource
public void setPoolName(String poolName) {
this.poolName = poolName;
} | 1 |
6607662733da7f557de90d92a8635311 | 8590a02301c5349d05496061fe5bfb83 | Returns deep copy of Linked List | class LinkedList:
def Copy(self):
return copy.deepcopy(self) | 1 |
d47d7bdad0b375c121635227180d5c9c | 1ebb846ce05819f27b13bc6c7e105ff3 | Tests that function works correctly for missense variant in ENIGMA CI domain with de novo acceptor score, no de novo donor | boundaries = "enigma"
self.variant["Gene_Symbol"] = "BRCA2"
self.variant["Reference_Sequence"] = "NM_000059.3"
self.variant["Chr"] = "13"
self.variant["Hg38_Start"] = "32398528"
self.variant["Hg38_End"] = "32398528"
self.variant["Pos"] = "32398528"
self.va... | 1 |
3444b7301d9aa6a23f5fa430d6d62fdd | cb94bdc1a24203511fe846b3858e6a81 | Handles the FormClosed event of the GameForm control. | namespace RaceGame
public partial class RaceGame : Form
private void gameClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
} | 1 |
7256a4d9921cce42496c7d9207d0bbdc | 064d63aeac8569001354f2002e4cc3c9 | Return string with encoded opening tag. | abstract class ODTStateElement
abstract public function getOpeningTag (); | 0 |
7fbf0d5914a7c757e8d07c8151820347 | 93d8feb4427ef7e463964491e40b09a3 | Return people within the given age range. | result = obj.data_in_range('Person', 'date_of_birth', lower, upper)
result_sorted = sorted(result, key=lambda x: x.date_of_birth)
r = Result(
((p.title, p.firstname, p.lastname,
datetime.strptime(p.date_of_birth, "%Y-%m-%dT%H:%M:%S.%fZ").date())
for p in result_sorted))
r.disp... | 0 |
d3af4728c273cd50166a6ab0ded8170f | 89f363ffb9d03ce4934b19a1f09992f2 | Determine background music based on current phase | function audio:determine_partition()
local tod = self:get_time_of_day()
if tod == "dawn" then
self:play_dawn()
elseif tod == "dusk" then
self:play_dusk()
elseif tod == "night" then
self:play_night()
elseif tod == "" or tod == "midday_" then
self:play_intro()
end
end | 1 |
b34c729693ef57e93d354eb426eeb988 | 140a94e649d167540b3f4b86f7100508 | Redirige a la vista de agregar una nueva operacion | class OperacionController extends Controller
public function create()
{
$cliente=Cliente::lists('razonsocial','id');
return view('operaciones.opcreate',compact('cliente'));
} | 1 |
e8c43ce5a93ca364ab1f3aa047abd634 | b1012e9f3395443ff42b36a2908a80a5 | 处理一个数组,使其支持性array[-1]的访问 | let handler = {
get(target, propKey, receiver) {
let index = Number(propKey);
if (index < 0) {
propKey = String(target.length + index);
}
return Reflect.get(target, propKey, receiver);
}
};
let target = [];
target.push(...elements);
return new Proxy(target, handler);
} | 1 |
52b88d5fb504be1a3a932d8ed566c4fe | 709fd24af75ef0c49a3bc3f247e0c1ed | don't save on autosave | class Halo1ThemeController
public function savePost($post_id){
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
if(!$screen = get_current_screen())
return;
if($screen->id == 'page' && $screen->post_type == 'page'
|| ... | 1 |
a78fa9d9a642cf4dafb400281479b7a6 | 111c4b7b2a27d7f5a709b7c1209e75ce | 给定一个视频列表,补上视频的圈内统计信息。每个视频的圈子取视频在其中观看次数最多的那一个。 | $arrReturn = array();
$arrCookieCircleIds = Model_Data_Recommend::getSessionCircles($this->sessionId, 0, 9);
$arrTmpRecommendMembers = array();
foreach($arrCookieCircleIds as $tmpCid) {
$initScore = 25;
$arrTmpRecommendMembers = Model_Data_Recommend::getCircleVideos($tmpCid, 0, 19, true);
if($arrTmpRec... | 0 |
615cf39e355fda928c50e8d360d73edc | 7959a436409817977bb3c991fe5bfd85 | 方法3:建容量为k的小堆,遍历nums插入小堆中,如果小堆已满,则判断要入堆的元素和堆顶元素的大小关系。若待入堆元素的值大于堆顶元素,则出堆顶元素,入新值,否则,遍历下一个元素。 | PriorityQueue<Integer> minHeap = new PriorityQueue<>(k);
Arrays.stream(nums).boxed().forEach(num -> {
if (minHeap.size() < k) {
minHeap.offer(num);
return;
}
if (num > minHeap.peek()) {
minHeap.poll();
mi... | 1 |
e65d2d55175d1fe19c380a99b5463e09 | b89635771eeb6c9d3fa180b88e22a622 | Construct the instance, and create the precompiled
regular expression for the macro arguments. | class MarkdownNext
function __construct () {
$this->prepareItalicsAndBold();
$this->nested_brackets_re =
str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth).
str_repeat('\])*', $this->nested_brackets_depth);
$this->nested_url_parenthesis_re =
str_repeat('(?>[^()\s]+|\(', $this->nested_url_parent... | 1 |
1d36905b088096900114396df68a27ea | 0c71a6d224901c939f42a6a013330f0a | Reset the user's study deck | public class CardDeck
public void stopStudying(){
studying = false;
} | 0 |
803f3a23bda64cccbb3a7ef609ac121a | ac38f1d542d96319bd99cd9e7cd48b08 | Renders a break line in HTML. | class THtmlWriter extends TApplicationComponent implements ITextWriter
public function writeBreak()
{
$this->_writer->write('<br/>');
} | 1 |
75e0b9743c856fb39457d7d1f5afaf2e | 9833717bf2864845284827e6bd615b7f | 查找所有游戏区配置 (map格式 key<worldId>) | public class CacheManager
public Map<Integer, LhjGameConfigDTO> getGameInfo(){
return gameInfo;
} | 1 |
d260c8dd57699b2cda5e764d645a2958 | 87ab9ecacd7c821c452b353bdf676a2d | Creates a new version comparator object, based on $version. | class VersionComparator
public function __construct($version)
{
General::ensureType([
'version' => ['var' => $version, 'type' => 'string'],
]);
$this->base = $version;
} | 1 |
fff3391f95e74f0fb87dafed8f8561c4 | 39c019a034d2a076c25b0fd30fc2f23f | Gets the recent meetings most recent first. | if self.object_id:
url = self.build_url(
self._endpoints.get('recent').format(id=self.object_id))
else:
url = self.build_url(self._endpoints.get('recent_default'))
return self._base_get_list(url, limit=limit, query=query,
... | 1 |
92e450e19ad895c27949f072620a2447 | 150734d6397c5d462bdb4a5e1903339e | gets all key/values from the active section available in
given config store which is unavailable.
it should raise an error. | class ConfigStore(DeltaObject):
def get_sections(self):
raise NotImplementedError() | 0 |
ff31ec164cfd5f58113471c72ce6fe23 | 178e6509de0e208aab979e1b362a5607 | Derive the ID for a credential definition. | namespace Hyperledger.Aries.Features.IssueCredential
Task<string> LookupCredentialDefinitionAsync(IAgentContext agentContext, string definitionId); | 0 |
d8842d53a347675a23b42ada86f04b3a | bafc011b2824f0c55c17a5304efe1cef | Keep-alive for the shorter of 20 seconds or what the server
specifies. | namespace BToolkit.P2PNetwork
public class TCPServer
public class Session
public void KeepAlive()
{
aliveTimer = P2PConfig.Instance.HeartbeatInterval + 2;
} | 0 |
2f6d640439acc1701ea9080f3244b427 | 6e77a2d1232c1fb0d554f08b7ffa1265 | Send a "Start the file transfer package" to the remote connection. | static void SendStartReq (void)
{
uint8* payload = NULL;
uint16 byteIndex = 0;
DEBUG_LOG("UpgradePeer: Start REQ\n");
payload = PanicUnlessMalloc(UPGRADE_PEER_PACKET_HEADER);
byteIndex += ByteUtilsSet1Byte(payload, byteIndex, UPGRADE_PEER_START_REQ);
byteIndex += ByteUtilsSet2Bytes(payload, byte... | 1 |
b3973e21f3f79ad90f3b062c191525c2 | eb3d2c16b9c39bff0a7065f8f52e9077 | Редактирование рассылки | function action_edit($data)
{
$data['id'] = isset($data['id']) ? intval($data['id']) : 0;
if (is_request_post()) {
$data = sysmail_validate($data, 'edit');
if (!form_has_error()) {
sysmail_save($data['sysmail']);
return redirect('sysmail.php');
}
} else if ($data['id']) {
$data['sysmail'] = sysmail_get... | 1 |
34bb8abf58bb19aa5c1019ebd15d1243 | 60dbc908476f071b5aae393c730b7b0d | 慢慢调小音量,可渐变 | for(i=1;i>0; i-= .01){
sleep(10) ;
x.volume=i ;
}
x.pause()
} | 1 |
1a7dd507d5b8bf0bfbf2805a64a7b3f6 | 89ada7376ab076a97207f48ba4b3582e | 取得公演場次資料 | {
$showTimes = Cache::remember('showTimes', now()->addMinutes(120), function() {
return ShowTime::get();
});
return response()->json(['status'=> 'success', 'data'=> new ShowTimeCollection($showTimes)], 201);
} | 1 |
c00508f97e0c0446759d03eb2d004d95 | a71476f82345f4dcc1b68bafac0bc3c1 | Runs on the plugins_loaded WordPress action, as long as the plugin is not (yet) going to abort all other operations (e.g. due to missing requirements) | class BaseClass
public function on_wp_loaded() {
} | 0 |
fca6f939434c30f0db83336c6f9c9ce8 | 09e3f9229820de8ac2335b1bbbf87724 | Reads the typed data virtual. | int WriteTypedDataPhysical(
[In] ulong Offset,
[In] ulong Module,
[In] uint TypeId,
[In] IntPtr Buffer,
[In] uint BufferSize,
[Out] out uint BytesWritten); | 0 |
5a625a5f193dbf9260a840ace30b9a5f | f6fdfca79d20945fc5628a59e33562f9 | Sets the fraction settings. | {
if (multiplier >= 4.0 || multiplier < 0.0)
throw new ArgumentOutOfRangeException(nameof(multiplier));
multiplier = Math.Round(multiplier * 512.0);
if (multiplier >= 4.0 * 512.0)
{
integer = 3;
fraction = 511;
... | 1 |
f6bb6b72c2dd89b5b9e5f5c600e30e09 | 4a601491d21cce9a1bf8934f11900ce9 | execute commands to render all bspheres | namespace Poc1.PlanarReflectionTest
public partial class Form1 : Form
private void RenderSpheres( IRenderContext context )
{
m_Technique.Apply
(
context,
delegate
{
Graphics.Draw.Sphere( Graphics.Surfaces.Blue, new Point3( 0, 10, 0 ), 4, 40, 40 );
Graphics.Draw.Sphere( Graphics.Surfaces.W... | 1 |
c1d5620755ea615639411e8f3d6d6920 | b7dcbf206d704fbf7d7a1b7fc4da6322 | 解绑队列
该API用于在增强型跨源中解绑已绑定的队列。
Please refer to HUAWEI cloud API Explorer for details. | class DliClient extends Client
public function disassociateConnectionQueue($request)
{
return $this->disassociateConnectionQueueWithHttpInfo($request);
} | 1 |
82be4c9e67d322fd41e32c36a6e99956 | e49b5e2d5f712d71112629de83456987 | metodo che setta la lista di contratti associati ad un dipendente | public class UserProfileViewModelImpl extends AbstractViewModel implements UserProfileViewModel
@Override
public void setUserContracts(final List<Contract> contracts) {
this.userContracts = contracts;
} | 1 |
16bf8176592448a80c66e67d11044fbc | c113e19c555680c1d2b06fab389bbf37 | listenin başına yeni görev (node) ekleyen method | int list::addtask(char task[])
{
node *temp = head[1];
head[1] = new node;
head[1]->info = NULL;
head[1]->tasks = new organizer;
head[1]->tasks->task = new char[strlen(task)+1];
strcpy(head[1]->tasks->task, task);
head[1]->next = temp;
return 1;
} | 1 |
64316448db75bd3445090b4789d99a32 | 7ff3b7be9abdc51c7138174b7afff521 | Disables unit. | class CoolMasterNetUnitMock:
async def turn_off(self) -> CoolMasterNetUnitMock:
self._attributes["is_on"] = False
return CoolMasterNetUnitMock(self.unit_id, self._attributes) | 1 |
ae6d92eea17ae0c5f25415eb50f9c5a2 | dd4062e4c34093e2ab93886843ca7237 | Initialize the EnOcean temperature sensor device. | class NefitThermostat(ClimateDevice):
def __init__(self, client, config):
self._client = client
self.config = config
self.watch_events = ['/ecus/rrc/uiStatus']
self._unit_of_measurement = TEMP_CELSIUS
self._data = {}
self._hvac_modes = [HVAC_MODE_HEAT] | 0 |
779b3fc0ffb2f56828d51c7e7f22b98f | 86b120ede8fdfa6f8d563900fbcbcddd | Used for calling a stored procedure n MySQL | namespace DeltaHRMS.Repository.CommonFunctions
public class Common : BasePage
public void CallAStoredProcedure(string storeProcedureName)
{
try
{
MySqlConnection connection = new MySqlConnection();
connection.ConnectionString = SQLDATABASECONNECTION;
... | 1 |
453568f83b981ee01b04253a218b836b | 744ca02522ffba205df6bd376d1cc736 | convert meters to pixels | Point PhysicsHelper::meter2Pixel(const Point& pt)
{
return Point(pt.x * pixelsPerMeter(), pt.y * pixelsPerMeter());
} | 1 |
86f6c3b499dc33d042071485463fda84 | 5937460df0318e2a0651db7b60a7a035 | Wrapper thread for all the handlers. Does all the init and
cleanups | class Handler(threading.Thread):
# Handles the agent connections
def __init__(self, agent, agent_address, qnum):
threading.Thread.__init__(self)
self.agent = agent
self.agent_address = agent_address
self.ip = agent_address[0]
self.port = agent_address[1]
self.q = qnum | 0 |
a0763dc81f539813b1ef1e443e9469a0 | 8c16b6bfe21033d8da1125a86b1c850d | Calculate a semi-major axis for an orbit with the specified orbital period (in seconds) | double n = satElset.getMeanMotion() * ((2 * Math.PI) / 86400.0);
double a = Math.pow(EarthConstants.GM_oplus / Math.pow(n, 2), 1 / 3.0) / EarthConstants.R_oplus;
return a;
} | 0 |
ab37a205e650671017c077b5576a41ed | fc535b0adea5fe830960f0da01b1340f | #获取图象最小的边长 | {
$points=$this->getArrPoints();
$min_dist=false;
$cnt_points=count($points);
for($i=0;$i<$cnt_points;$i++)
{
$dist_x=$points[$i]['x']-$points[($i+1)%$cnt_points]['x'];
$dist_y=$points[$i]['y']-$points[($i+1)%$cnt_points]['y'];
$dist=sqrt($dist_x*$dist_x+$dist_y*$dist_y);
if($min_dist) $min_dist=... | 1 |
441d0249f419b5e329f651e8bf9d85bd | 534540785ccb27e84e06935bdfa7f2cf | Collect a single dataset from a list of source files into a final
output file. | output_file_count = 1
data_dumper = self.data_dumper_class(
output_filename, **self.data_dumper_settings
)
if file_list[0].endswith("root"):
import uproot
filetype = "root"
else:
filetype = "simtel"
for filename in file_list... | 1 |
bea9c9c37f8aaeef828230c2dec50df1 | 54090bacb3d62a0dc590c931477837b4 | The target azure VM Name. | class SqlVirtualMachineArgs:
def sql_virtual_machine_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "sql_virtual_machine_name") | 1 |
016fa57cfab6295427994ecd58bd9f3c | cbec3a5ebe8f4e18c4793925147f993f | 绑定全局事件 | export default class VipCtrl extends BaseCtrl
protected defineGlobalEvents() {
this.g_events = {};
} | 0 |
d9a3e705353d6965b6eae598ad4ce1ee | 621f1f11c9de2f82d42bdc2878f1e9af | <p>Enable swipe items.</p>
You should attach {@link ItemTouchHelper} which construct with to the Recycler when you enable this. | @JvmStatic
fun enableDragSwipe(helper: DragSwipeHelper, recyclerView: RecyclerView) = helper.itemTouchHelper.attachToRecyclerView(recyclerView) | 1 |
ff8364a9629687be7fe7cbb6d6940afa | 784aa3534a6cd2f0d5df5c7990d23118 | <pre>
1. 개요 : 부서 검색 팝업 메인
2. 처리내용 : 부서 검색 팝업 페이지를 반환한다.
</pre> | public List<EgovMap> selectEmpLyrListPopup(SearchVO searchVO); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.