query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
33cf2f2a34aa5f8bd1b10b8d2900f1c6 | bc70ba4c3dedb892b3f2692de3d8784c | The flask_simpleldap object with the proper initialization ready to be used
The scope for this is class, so we don't create an expensive object for simple tests | self._schema_dn_cache = {}
self._schema_cache = {}
self._audit_context = ldap0.cidict.CIDict()
try:
self.l.flush_cache()
except AttributeError:
pass | 0 |
6b149c15c258344f86387afbe9a7b9a0 | 8ab36aaf047af1635be55f64b3946bda | makes a copy which will be owned by the bundle,
this way the incoming msg is still available to be used by the caller if needed | impl<T: 'static> Clone for AsyncReceiver<T>
fn clone(&self) -> AsyncReceiver<T> {
AsyncReceiver {
rx: self.rx.clone(),
waker: self.waker.clone(),
}
} | 1 |
c02db022d714374bc14f20fa5f71f84a | bf13326b737574e087d88ed1527f27e2 | affichage de la page edition d'un client | $em = $this->getDoctrine()->getManager();
$client = $em->getRepository(Client::class)->findOneBy(array('id' => $idClient));
$form = $this->createForm(new ClientType($this->getDoctrine()->getManager()), $client, array(
'action' => $this->generateUrl('mcm_client_query'),
's... | 1 |
0f588506f71d6d70551f48fd821edf2b | bf95da952b57762a8ef8cec310414bd5 | 根据酒店ID获取合同列表 | class ReimbursementController extends BaseController{
public function get_hotelcontract(){
$h_id = I("get.h_id");
$result=array('code'=>0,'message'=>'获取失败');
$hotelContracts = M("HotelContract")->field('id,name')->where(array('h_id'=>$h_id))->select();
if($hotelContracts) {
$... | 1 |
33a8798615311619e3077437d0c8a6f5 | 142c0131013fd09000da40d1e913c93d | 根据电力企业id,查询电力企业日运行指标(注:这里并不是只电力企业的最新的日运行指标,因为要考虑到历史数据,所以这里要查询所有用到过的指标) | public List queryMeterByLpId(Integer lpId)throws DataAccessException; | 0 |
911a3451a917597036d45d31cbc74dde | 43b377112ade638d928483cbb9e237eb | 获取最新笑话数据 | var page=parseInt(Math.random()*1000);
var time=1470008031+parseInt(Math.random()*10000000);
time=time.toString().substr(0,10);
console.log(time);
var params={
sort:'asc',
time:time,
page:page,
pagesize:1,
key:'f3ddf260c... | 1 |
630a0eba1f7a4e9f4c0baca156a5b101 | 55ae8fcf3f36768149dd4b9fe142f308 | Returns a boolean value indicating whether or not there are more elements to iterate over | namespace Fornax.Net.Analysis.Tokenization
[Serializable, ProtoContract]
public sealed class BiasTokenizer : Tokenizer, ITokenizer
public override bool HasMoreElements()
{
return tokenizer.HasMoreElements();
} | 1 |
cd875dd20543d14d906100bce3ffea1b | 079ba2084ac3ae9f4a23da4f65e905c5 | Test that the associated entities are unlinked and deleted when they are dependent | {
$mockOne = $this->getMockBuilder('Cake\ORM\Association\BelongsTo')
->setConstructorArgs([''])
->getMock();
$mockTwo = $this->getMockBuilder('Cake\ORM\Association\HasMany')
->setConstructorArgs([''])
->getMock();
$entity = new Entity();
... | 1 |
30b0505e5d3501ad54c4190e59a69a2e | 9776214034e99c93e8d91cf5df905924 | 添加PhraseQuery | {
$q = $criteria['q'] ?? null;
if (true === empty($q)) {
return new Query();
}
$queryString = new QueryString();
$queryString->setFields(['title']);
$queryString->setQuery($q);
$bool = new BoolQuery();
$bool->addShould($queryString);
... | 0 |
e42cf70c6d3ac9790e49f9b8bbd37546 | cd195cac2ff65439b1811578c4e6b6f7 | Returns true, if this process instance contains no audit trail entries to read. | boolean containsNullValues(final long processDefinitionId) throws SBonitaReadException; | 0 |
05b6a842218c94849ad4f33227bb4271 | 3c8c35204760e6f81bca9e3d6b94cae2 | Draws new mythical cards for the player and discards his selected ones | for it in range(2):
for i in range(0, 16, 4):
k = i // 4
for j in range(0, 4):
self.player_cards[k][j + 5 + it * 4] = self.draw_card_from_deck() | 0 |
cbbd78fee1f9b41aacf1f0abd2c7fcaf | 924ada5af0df73203e0cbdaf62e4529a | 睡眠暂停duration秒 | def Sleep(duration_sec):
time.sleep(duration_sec) | 1 |
d4f6f2b58d8ed5ace34f35a5c8332f8c | 96fcf37bae0c0d71c09a91214633977b | Gets whether a caching entity resolver will be used. | protected function isCachable(): bool
{
return static::USING_CACHE;
} | 1 |
144fd26ad6bcd75ebb9458ca54e080a0 | c0b61a90363f79d1aea54c53bfd418a2 | Parse the configuration file 'config.toml', and establish a connection to DB | if config == nil {
config = &tomlConfig{
MQTT: mqtt{},
Forwarder: forwarder{},
Band: band{},
Device: device{MType: lorawan.UnconfirmedDataUp},
GW: gateway{},
DR: dataRate{},
RXInfo: rxInfo{},
RawPayload: rawPayload{MaxExecTime: defaultMaxExecTime},... | 1 |
e18329e7e327a55ec9cd5755b24effd0 | c11205e7ab9f72c1ab38cd6ff0890a0d | Reduces the count of an ore by 1 and displays on screen. | for i = 1, 16 do
turtle.select(i)
d = turtle.getItemDetail(i)
if d then
if d.name == worthless_ore then
turtle.drop(d.count - 1)
else
turtle.drop()
end
end
end
end | 0 |
16de869f0870bc717c0cb0f9dccf5e2a | 860fc1ffa37a50ac33aee8c3027eb3d1 | transform consecutive image entries to image-group entries | def group_images(image_paths):
image_dict = {}
for image_path in image_paths:
image_name = image_path.split("/")[-1]
sequence_number = int(image_name.split("_")[1])
image_dict[sequence_number] = image_dict.get(sequence_number, []) + [image_path]
return image_dict | 1 |
be467677d0719bf9f3a98473d444e3db | f1dd917933b3afabf546fc4686c372b1 | Returns the oldest value of the well known ID for the horizontal
coordinate system of the spatial reference. This ID is used for JSON
serialization. Not public. | Integer SRID(); | 0 |
444bfbf674909c3f19ee87a411325d60 | 826ca7647f17ef90489e68a35b6ac6d7 | Crée la configuration | class CreationFichierConf:
def __init__(self, entree, sortie, taille, doctype, config, rotation):
self.fichier_conf = str(local + "/conf.ini").replace("\\", "/")
self.entree = entree
self.sortie = sortie
self.taille = taille
self.doctype = doctype
self.config = config
... | 1 |
7b7ce47cefeee5efcf94bfcc6e438993 | a81e82bf00c29191f07091fabc9db11d | Checks paused accounts | class AccountChargebee extends AdminModel implements AccountChargebeeContract
protected function isPausable(): bool
{
return $this->isActive() || $this->isNonRenewing();
} | 0 |
c77c31cb90b3dc99ad9779809ade5559 | 15d812c6f59e973d8fa9c93cea0a9647 | Checks if there's at least one DQL part defined to the internal parts collection. | abstract class BasicSelectionBase implements BasicSelection
public function hasClauses() {
return $this->where
->hasClauses();
} | 1 |
f5b00c4e9512d7ab6a3b3e52236977f2 | 2068c390f9bda541a1fd569a08a5e5bf | Delete a layer after the user confirms it | function saveLayer(){
drawDelete.save();
drawDelete.disable();
$(".deleteSave").hide();
} | 0 |
5bb571ea7ac8edeec339f39976d14192 | 3b16f2c1fd1770a513a5eaa50097dda9 | Paths to each source code file in the target to be compiled. | public SourceFile[] getSourceFiles(); | 1 |
daaa2a6a4dfbb3745db38262d914c1eb | c71cd115916008967b03a279dcc253d7 | Chain of `LinearFilter` objects
Because `LinearFilter` objects are not really arrays,
this class keeps track of the order of a series of filters. | class FilterProcessor(ImageProcessor):
def __init__(self, behavior):
super(FilterProcessor, self).__init__(behavior)
self._kernels = utils.Kernels().kernels_list | 0 |
f77e3627c1ccde625e11a6927230f4d3 | 9c44f8081f12ab7d84203a92213a09b4 | Find non whitelisted principals. | for principal in principalRegistry.getPrincipals(''):
if IGroupAwarePrincipal.providedBy(principal):
continue
yield principal.id, principal.title | 0 |
5a030e694dbdaaf8c1497268d6131d75 | e9ddae8428c534a08e2f4213604a0ff7 | Sets mainEntityOfPage. | class ReservationPackage extends Reservation
public function getMainEntityOfPage()
{
return $this->mainEntityOfPage;
} | 0 |
5d0447913634c5b1279ec8b85db3c571 | 2eea394136b97b8d2c8d57cc4f9f81aa | Indikuje ci sa maju spracovane parametre zahadzovat alebo sa ma generovat
instrukcia I_PUSH. | if (inst.OpCode.StackBehaviourPush == StackBehaviour.Varpush) {
var operand = inst.Operand as MethodReference;
if (operand != null) {
return operand.ReturnType != targetModule.TypeSystem.Void;
}
throw new NotSupportedException("I'm not sure for which this one would happen anymore, so here, fix m... | 1 |
9f45ac80a2eece71f22d12af5cb56eb4 | 8886957ffcc93f445c662d6810844767 | Clear scheduled commands/subsystems. | public class Robot extends TimedRobot
@Override
public void testInit()
{
CommandScheduler.getInstance().cancelAll();
} | 1 |
c712225ffd81394fc34b5376e676526f | 502f9b7e705f5f2795b882f0873641e7 | Obtains a write locking scope on the object. | namespace MySpace.Common.HelperObjects
public class MsReaderWriterLock : IDisposable
public IDisposable ReadScope()
{
bool succeeded;
try
{
} finally
{
_lock.EnterReadLock();
succeeded = (Thread.CurrentThread.ThreadState & ThreadState.AbortRequested)
!= ThreadState.AbortRequested;
if ... | 0 |
6dd7b310d315346c216ec906b2f2dac2 | f1b2882239368356cbcb08839df94ee7 | @brief Free a BAM DMA channel
This function frees a BAM DMA channel. | static int fsl_dma_hw_free(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_dma_private *dma_private = runtime->private_data;
if (dma_private) {
struct ccsr_dma_channel __iomem *dma_channel;
dma_channel = dma_private->dma_channel;
out_be32(&dma_channel->mr... | 1 |
b22bc0ba3479ade5b130144b7d8f2b98 | 8f77d7362fbca72b529c4b8a1e0d1ef2 | Recebe um tabuleiro e copia este posicao a posicao, devolvendo um tabuleiro igual ao primeiro. | def cria_copia_tabuleiro(t):
return t.copy() | 1 |
d3b96fc67918d3fd2a7f27515539c72a | dd744f1e39a0565ec478a72d194dd192 | 解析ddl文件 | try {
XmlPullParser pullParser = Xml.newPullParser();
InputStream inputStream = OpenDroidYuanUtil.context.getAssets().open("open_droid.xml");
pullParser.setInput(inputStream, "utf-8");
int type = pullParser.getEventType();
String tagName = null;
while(type != XmlPullParser.END_DOCUMENT) {
if(typ... | 1 |
1e49568943d4de2b939d2775ce1efc29 | 041c11ac9983c544ada2f12c0e2bd86a | The entry view action for the project tasks page. | class ProjectTasksController extends Controller
public function index($project_id)
{
$project = Project::with('tasks.users','milestones.tasks.users')->findOrFail($project_id);
return view('admin.app.projects.tasks.index', compact('project'));
} | 1 |
1700e1cae6d57287f8556d2d6f551181 | c8fa955855b0d6adef0a21c20208cd04 | Fetch multiple csgo items using get_item(). | def get_items():
return __simple_get_all("pretty_items", Item) | 0 |
105096bbe3f963552ff193a2e6d340ad | f64f075ca877fa30a2d544b8ab91e33f | Get the current meta sliders | $sliders = array();
$args = array(
'post_type' => 'fl-test-slider',
'post_status' => 'publish',
'orderby' => $sort_key,
'suppress_filters' => 1,
'order' => 'ASC',
'posts_per_page' => -1
);
$args = apply_filters( 'fl... | 1 |
98f0ee976c92071589be07429510eeb6 | dcc1e54bbbc329bfa4d0bdd5f3ae06d4 | Return all the values in dict format from config file | dic = {}
for conf in self.GetAll():
dic[conf.name] = conf.GetValue()
return dic | 1 |
6253d1191194dd02a4fe63634f89d0b9 | d3302313836bbb220e2d9cc7e812b5e8 | The item indicates whether the entry is a CASP target, a CASD-NMR target,
or similar target participating in methods development experiments. | @XmlRootElement(name = "chemicalEvent")
public class ChemicalEventConverter
public void setChTargets(String value) {
entity.setChTargets(value);
} | 0 |
50e24f7976604b2ff354c4700fe2b6d1 | 44f853d27c1f2a483c05a66c10b3281d | Extracts results of FlowNode.getFlow(). | class Canvas(object):
def _recurse_flows(process_group_id='root'):
from nipyapi.swagger_client import ProcessGroupFlowEntity, FlowDTO
from nipyapi.swagger_client import ProcessGroupEntity, LabelEntity
from nipyapi.swagger_client import FunnelEntity
def _walk_flow(node):
if is... | 1 |
80e5a63943ac93c78006336fb37c1a80 | 30b1af42eb96c308ecc03957c8660b2a | <input>要素を生成する。 | var input = document.createElement('input');
input.setAttribute('type', 'text');
input.setAttribute('id', 'job' + id);
input.setAttribute('size', '20');
return input;
} | 1 |
b4e34afd633a81055bcf0b44e7419ba0 | de12500bd852aeff2ace2a1de3a6e98b | @brief Resets the rising edge interrupt request pending flag of a given EXTI interrupt. | if (EXTI->PR & ( 1 << pinNumber )) {
EXTI->PR |= ( 1 << pinNumber);
}
} | 1 |
39edcffca464ab80ac5078bcfb87cb99 | 790ee47c6edbeadaf3bbd3504ff1756f | Test to check if dna is array of strings | def check_DNA (dna_seq):
seq=dna_seq.upper()
dna_count=seq.count("A")+seq.count("T")+seq.count("C")+seq.count("G")
if len(seq) == dna_count:
return True
else:
return False | 0 |
421e46fd84d385280d0e0ee1a6a76e0c | 28bbc6f4f7a51d2d729edbf30e4f9e1a | Returns all Groups in no particular order. | List<Group> get(); | 1 |
7fa2be321ffe63381f3f43205055e88e | a5eb1dccbd1c8aeea2af121463cc2144 | Calculate the time of impact of an object with bounding walls. | {
int closestIndex = -1;
Vector2D normalVector = Vector2D.Vec2DNormalize(Velocity);
Vector2D intersectionPoint = new Vector2D(), collisionPoint = new Vector2D();
double distToIntersection = double.MaxValue;
for (int wallIndex = 0; wallIndex < walls.Cou... | 0 |
974a8d7826056440fb209a9cafff69f0 | d8308de2c8c233505f10da48127ef8ca | Must reinitialize effect if following configuration changed | namespace Urho3D
void ParticleEmitter::HandleEffectReloadFinished(StringHash eventType, VariantMap& eventData)
{
Reset();
ApplyEffect();
} | 1 |
88c2bab5356cb61c622663bd42897617 | 95f8d4bf0e79fae1ee30ad6d164c1651 | Returns the number of elements in the group. | func GroupSize(gh uintptr) int {
size := C.op2_group_size(C.OPGroup(unsafe.Pointer(gh)))
return int(size)
} | 1 |
59c12c2c200c66b085b6ea05a76ad8df | 182f7dc246e6f3e66846e09fe5ac5665 | Get label alignment when generating field for OOUI. | class Search extends Element
public function labelAlign($labelAlign)
{
$this->labelAlign = $labelAlign;
return $this;
} | 0 |
f6e4097a94d50d16fe80ede75fd807cf | 21d082fe82d3c8acf4da8f3c78774318 | @brief Send response data.
This function is used by a target-server to send the SCSI response data to a remote
initiator node. The target-server populates the @c ocs_scsi_cmd_resp_t
argument with scsi status, status qualifier, sense data, and response data, as
needed.
Upon completion, the callback function @c cb is inv... | mptscsih_qcmd(struct scsi_cmnd *SCpnt)
{
MPT_SCSI_HOST *hd;
MPT_FRAME_HDR *mf;
SCSIIORequest_t *pScsiReq;
VirtDevice *vdevice = SCpnt->device->hostdata;
u32 datalen;
u32 scsictl;
u32 scsidir;
u32 cmd_len;
int my_idx;
int ii;
MPT_ADAPTER *ioc;
hd = shost_priv(SCpnt->device->host);
ioc = hd->ioc;
... | 0 |
25090bc604d15712020a470a2bc8edc3 | 1f0d82c47b28ded8a277969ac1e5fc6a | ROL r/m8, imm8 | namespace CPU
void LD_r8_r8()
{
auto dst_reg_idx = (opcode - 0x40) >> 3;
auto src_reg_idx = opcode & 7;
SetReg8(dst_reg_idx, GetReg8(src_reg_idx));
} | 0 |
1c501934ba19d2896ede69f7786f8911 | 6a4e6606cc48591ae3d74e55c70abdf4 | Since the actual sigma calculations are tested elsewhere, to prevent this
test from breaking, it only makes sure the function actually completes. | bool testlaguerreunit_test_silent()
{
bool result;
result = testlaguerrecalculate(true);
return result;
} | 1 |
3c5dd107f07dfd2c992490d813295fbc | ea90f8b48ea3780c95a43f3650ef8957 | Получить поддерево с корнем n указанного узла дерева. | class tree implements itree, ijson, iarray
public function getChildrenTree($nId = 0)
{
$arrChildren = [];
foreach ($this->arrMap as $nChild => $nParent) {
if ($nParent == $nId) {
$arrChildren[$nChild] = $this->getChildrenTree($nChild);
}
}
retu... | 1 |
297967c429e0401e319499bde68c8b70 | 1fef385a9e3a4a61549e505dcdaccce7 | Add the values with explicit overflow wrapping | function i64add(x0, x1, y) {
var carry = 4294967295 - y < x0 ? 1 : 0;
return [(x0+y) & 0xffffffff, x1+carry];
} | 1 |
28cffaeac6d911755f468916cb2e5935 | 4b33ccbcfa1b721dfd3b4859c7bdc4f1 | Format timeseries as matrix for NMF or BSS factorization. | out_mat = np.asarray(out_data)
if self.target_per_timestep:
out_mat = np.matlib.repmat(np.asarray(out_mat), 1,
self._data['num_time_steps'])
return out_mat | 1 |
aecf55dc0c32cc03fa572154319f93ef | c9c68f19a08aaa193d59277669b6562f | 拒绝所有预约申请 | public class AttendanceDAO
public void rejectAll(int meetingId){
this.session=HibernateUtil.getSessionFactory().openSession();
Transaction tx=session.beginTransaction();
String hql="Update "+Attendance.class.getName()+" e set e.status=0 Where e.meeting.meetingId=:meetingId and e.status=2";
... | 1 |
bbcde4f8ff2105341ba9b2f8efef95cf | 9e08f485f039ab5a71f53a40782ce264 | Returns the expected number of selected rows. | namespace Gecko
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
uint GetSelectedRowCountAttribute(); | 1 |
28c6f773c81dfb8f660ac1bd80c158bb | 775627fe11e2febb605d340d4df2459f | Frees resources on the server side when called by RPC stub files. | {
if (!disposedValue)
{
if (disposing)
{
}
OnTerminatedEvent();
if (_stub != IntPtr.Zero)
Interop.LibRPCPort.Stub.Destroy(_stub);
_stub = IntPtr.Zero;
dispo... | 1 |
c558da4ff4615249d5f7711ea33f993e | f64d063bd6a3e35d71ef492a3736a7eb | 该函数用来设置该类中包含的SBMEGridPoints类的需要的分层数 | void SBMEGridPoints::ComputeLinesRelation(void)
{
int m_iPointNumPerLayer;
int m_iLineNum = 0;
int indexTmp[2];
for (int i = 0; i < m_iLayer / 2; i++)
{
m_iPointNumPerLayer = (i == 0) ? 1 : 6 * i;
for (int j = 0; j < m_iPointNumPerLayer; j++)
{
if (0 == i)
... | 0 |
7d9614852d5ed94ead2cf0b387414eca | bca1acef7678adaf74f0bb2b517386bc | Get a termTYPEDBYRelationship relationship, which is defines the relationship between a spine attribute and its type. | def relatedTermBySyntax():
return | 0 |
5900159e3dbdfd7624d595a8b6f6b78a | e0f44650d6a2a4dbdfdf4689b7d6210e | the string version of monitors
now contains only their name | class Monitor():
def listMonitors(self):
return self.monitorList | 0 |
7534b0f3ca329a040b17466044e02f07 | 496ed649a10dd6eb927362c6d3b9dd08 | Returns the list of leader election configuration providers (see {@link #setConfigProviders(List)}). | public class CredentialManagerImpl implements CredentialManager,
Observable<KeystoreChangedEvent>
public List<TrustConfirmationProvider> getTrustConfirmationProviders() {
return trustConfirmationProviders;
} | 0 |
36527f03395bce37b2c3c6dfaf49020b | b711e5006413aaa01b9c5a7fa94aca7f | Directly add a failure to the list | class Node:
def add_failure(self):
self.total += 1 | 0 |
c5fae104136d943cd703d106ef46ded2 | 66be67f09f6689f5837aac77cebf404c | <para>Obtains access to the debugging information for an image.</para>
<para>
<c>Note</c> This function is provided only for backward compatibility. It does not return reliable information. New applications
should use the SymGetModuleInfo64 and SymLoadModule64 functions.
</para> | ModuleID moduleId,
LPCBYTE *ppBaseLoadAddress,
ULONG cchName,
ULONG *pcchName,
WCHAR szName[],
AssemblyID *pAssemblyId)
{
if (moduleId == NULL)
return (E_INVALIDARG);
return g_pProfToEEInterface->GetModuleInfo(moduleId, ppBaseLoadAddress,
cchName, pcchName, szName, pAssemblyId);
} | 0 |
1bf7713663a4613d97da16cd0ed8b362 | 61d590aa8ea15e32c0985500c802fc20 | has ESC been pressed? | {
if (GetAsyncKeyState(VK_ESCAPE))
{
paused = true;
return true;
}
return false;
} | 1 |
df5abdebf2e5478da118759981c3d087 | 7a0b511faefb8d2f0ec3f40ab8297c80 | Determines if the stateProv has been modified. | namespace SPA.Interfaces
bool IsModified(Variable var, Statement stat); | 0 |
ad26730a1f5fdad914d0e2946e8c79fa | 28adada8c1463117aa03aa9b0921866a | Allocate a Money object and fill in its fields | create_money(int amount)
{
char buf[MAX_STRING_LENGTH];
OBJ_DATA *obj;
if (amount <= 0) {
char buf[MAX_STRING_LENGTH];
sprintf(buf, "create_money: %d provided as amount.", amount);
monitor_chan(buf, MONITOR_OBJ);
bugf("Create_money: zer... | 1 |
20b111fe97a51f7305f9334ec8dfc66e | a150d716f519e197d35518f41d9c0030 | Rechercher un Livre par code. | @Stateless(name = "BookManager")
@TransactionAttribute(TransactionAttributeType.MANDATORY)
@LocalBean //facultatif
public class BookManagerServiceBean
public Book findBookById(Long bookId) {
Book book = em.find(Book.class, bookId);
return book;
} | 1 |
2ce999aa94085293b5893d5ecc9f25b0 | 9e28e879a382993c66b7b520af4a478b | update the state of the "one key patrol" button | if($act_val == 0){
$newact_val = 1;
}else{
$newact_val = 0;
}
$query = "UPDATE ktkey set key_is_act='$newact_val' where key_id='$key_id' ";
$result = mysqli_query($conn, $query);
if(!$result){
echo "Update Failed" . mysqli_error($conn);
exit;
}
} | 1 |
f168276cea019b345b6874432cfb41a6 | cd61176682ebcb50058b74dcb7c32785 | Get the DN of the identified entry relative to the base LDAP path, e.g.
as returned by {@link DirContextOperations#getDn()}.
use {@link #getRelativeName()} instead. | class Entry extends AttributeSet
function getDn (){
return dn_of_rdn($this->getBase(), $this->getRdn());
} | 1 |
34fbc39df65185b679843a3983ba8ba8 | 0c1bda9e33333bd04b1a3646b8fc3493 | display a start button and loads level 1 when clicked | public class StartGame : MonoBehaviour
void OnMouseDown() {
Application.LoadLevel ("scene1");
} | 1 |
872f0331621e66a5658bffa9da1a038f | 6e807cf424d723bc440547ca0af8f05f | from https://stackoverflow.com/a/39649614 | def stdout_redirected(to=os.devnull):
fd = sys.stdout.fileno()
def _redirect_stdout(to):
os.dup2(to.fileno(), fd)
with os.fdopen(os.dup(fd), 'w') as old_stdout:
with open(to, 'w') as file:
_redirect_stdout(to=file)
try:
yield
finally:
_redirect_stdout(to=old_stdout) | 1 |
a2e480d534556a351fbafa375bd8cd45 | cdf26ba778c2b3b8e83012f813bad43e | Toggle between showing either the admin actions or the lesson content actions | function toggleControls(n){
switch(n){
case "on":
ge("courseReview").style.display = "none";
ge("clearLink").style.display = "inline";
ge("displayLink").style.display = "none";
ge("addNew").style.display = "inline";
break;
case "off":
ge("courseReview").style.display = "block";
ge("c... | 1 |
83b02ec98c163c1e4f137a540fdb819a | bb78f6e1641c728f74e03107efd5f29f | The interpreter contains references to several important objects which we
must mark to avoid freeing accidentally. We mark them here. See lisp_sweep()
to understand when this is called. | GCobj *o;
while ((o = gcref(p)) != NULL) {
makewhite(g, o);
setage(o, G_NEW);
if (o->gch.gct == ~LJ_TTHREAD)
whitelist(g, gco2th(o)->openupval);
setgcrefr(p, o->gch.nextgc);
}
} | 1 |
e2b0f15d0f4abd2237e20abba17aa4dc | 14e0b632d86254050300fb3baee57e33 | Get verifiable annotations <br />
获取可验证注解 | namespace CosmosStack.Validation.Objects
IEnumerable<IVerifiable> GetVerifiableAnnotations(
bool excludeFlagAnnotation = false); | 1 |
c00b888cd4108a856c296fdf458e0df3 | 6500b31d56092ec4236229755593a6ae | When the enter key is pressed on the input, add a new input
to the collection. | function onInputChange(event) {
if (input.value.length > 0 && (event.which == 13 || event.keyCode == 13))
if (input.value) {
addInput();
}
} | 1 |
10ef571925ce420deab400b953d38a04 | 9a5adb8a1e9e149d368d8d679631c683 | 启动activity,选择模式为单选 | public class ImageSelector
public ImageSelector singleChoice(){
pic_mode = ImageSelectActivity.MODE_SINGLE;
return this;
} | 1 |
29655cf4fa7b0d6f537b22eb4a4b3cf7 | 080756777fb96e57c7b2f1bd08db7c5c | 格式化时间,将秒转化为时分秒 | function formatSeconds(value, d) {
var secondTime = parseInt(value || 0);
var minuteTime = 0;
var hourTime = 0;
if (secondTime > 60) {
minuteTime = parseInt(secondTime / 60);
secondTime = parseInt(secondTime % 60);
if (minuteTime > 60) {
hourTime = parseInt(minuteTime... | 1 |
f22c71e14ae26308c5049d02bfc843fa | 84fe7891d471ff8a5ad8379cc2649b81 | 物理量フィールド名称のCGNS:FlowSolution名称を取得する. | {
int index_dfi_field, index_field;
int num_fields = 0;
char cgns_name[33], field_name[33];
DataType_t cgns_datatype;
UdmDataType_t field_datatype;
GridLocation_t cgns_location;
UdmGridLocation_t grid_location;
UdmSize_t field_size = 0;
cgsize_t range_min, range_max;
std::string ... | 1 |
a767144dc604e0430d2fa7fc12815383 | ebc454a0aafad7b4f66913909f81ee23 | Gets the enrichment status for a given metric. Enrichment status is described by the service as the process
of detecting which data points of an ingested set of data can be classified as anomalies. Each status represents
a single data source ingestion. | public class MetricURI implements MetricURIMBean
@Override
public byte[] getMetricStatus() {
return metricStatus;
} | 0 |
6a0e1394eac9aac58c611cffa72803dc | e645da52bc002542deaa697bfa54991a | A service is deletable if there is no Machine using it. | if (Admin::is_purchases($service->id)) {
throw new Exception('Trying to delete service with purchases. id = ' . $service->id);
}
$serviceid = $service->id;
ORM::forTable('limits')->where('serviceid', $serviceid)->delete_many();
ORM::forTable('priceband')->where('servi... | 0 |
4b1b0e74be576147ed421d554dcc56a7 | 49d5c1d6ced0c5ff85689c993abafc52 | grab html and store it as text file named doi_[current time] | def browseLocal(webpageText, filename):
import webbrowser, os.path
strToFile(webpageText, filename) | 0 |
9375f2a9e3ff6e0a34df269f4cc868f8 | 927270fc35e18f07e8894f42bf947dd8 | Shows list of users | class UserController_old extends \BaseController
public function index()
{
return View::make('user.list');
} | 1 |
426e78ca737dcda11237b3edaff92a8c | 49ff9bc7e5e37e1d11fdfe44d6e9eafa | 添加连接时的初始化sql。可以添加多次,在初次连接时使用,比如指定编码或者默认scheme等 | public abstract class AbstractDataImportor extends AbstractDataImpExp implements DataImportor{
public void addPrepareSql(String prepareSql) {
if (LangUtils.isNotEmpty(prepareSql)) {
this.prepareSqls.add(prepareSql);
}
} | 1 |
4a1e281406facfe87077647b677d1014 | 78fb453c35c9dbbcf1758bb180a279a4 | Funcion que obtiene y devuelve todos los tipos de propiedades inmobiliarias sin repetirlos | mySet = set()
for material in self.data:
for prop in self.data[material]:
mySet.add(prop)
return list(mySet) | 1 |
302d7f62d4679687cf694f01ddae0ad5 | 19b009f3f9115dfe437b3999c6099313 | 获取相应key的float值, 不存在或转化失败则返回0 | {
if (floatDic.ContainsKey(key))
{
return floatDic[key];
}
return 0;
} | 1 |
1bc8604cf094bd1e625e3ae8ac5170b6 | 92da9393d95916615143ca7dff3f0ac9 | 发布终端软件 | ssh
.execCommand('sh deploy.sh', { cwd: '/project' })
.then(function (result) {
if (!result.stderr) {
console.log('发布成功!')
delZip()
process.exit(0)
}
})
.catch(err => {
console.error(err)
process.exit(0)
})
} | 1 |
03c475afeb475e971e0ad1c4ca9649a6 | 5f69ff4d01787f5254eb81953f0675a7 | 根据产品名称模糊查找 | List<Product> fuzzySearchProductByName(String productName); | 1 |
de7d3f2d04d4edd9b606f48175287c4a | 167b53227b4769bda7a395cd9028d42a | @brief 显示退出游戏弹窗 | public class AppUtils
public static void showExitConfirmDialog(final Activity context, final DialogInterface.OnClickListener listener){
context.runOnUiThread(new Runnable() {
@Override
public void run() {
new AlertDialog.Builder(context).setTitle("是否退出游戏?")
... | 1 |
6e3f027722b2c794eee1ad6bbf5a2365 | 63aed0f743798e411f635f8a24862618 | Creates a panel for selecting multiple items | public class IplantAnnouncementConfigDefaultAppearance implements IplantAnnouncementConfig.IplantAnnouncementConfigAppearance
String panelMultiple(); | 0 |
7413d8c2ed8ba981efb143ac6c19feaf | ae3bcff906cf0fa6107a49e392a7cb75 | 区切り線を出力します。 | class PHP2_System_Console_Console implements PHP2_System_Console_IConsole
public function writeDelimiterLine($delimChar = '-', $lineLength = null)
{
$this->writeln('---------- ---------- ---------- ---------- ---------- ---------- ----------');
} | 1 |
9ab9de2ec9d6a3ead6e816ce3336d9bb | 89e497dbbe0a294d56c68c852f7c78ce | 创建CDN资源URL地址 | final class Utils
public static function cdnAsset(string $path)
{
$base = config('app.cdn') ?: config('app.url');
$file = ltrim($path, '/');
return "{$base}/{$file}";
} | 1 |
29fcc290acb6c27dd84610b5a4123e1d | ac3f7ac149c7dcac210b77a3251f4cc4 | Loads a tab-delimited file into a database table | MySqlBulkLoader bl = new MySqlBulkLoader(this._connection);
bl.TableName = tableName;
bl.FieldTerminator = fieldTerminator;
bl.LineTerminator = lineTerminator;
bl.FileName = filename;
bl.NumberOfLinesToSkip = linesToSkip;
try {
return bl.Load();
}
catch {
... | 1 |
40cb6c26fa8973ec42b1c609a495b242 | 0115e6734e0dd109f04658050c5ac6bb | Move right by one step.. | namespace Tetris.GameLogic
public class GameUniverse
public void StepRight()
{
if (Check(currentBlock, BlockX + 1, BlockY))
blockX++;
} | 1 |
390df7bc48fd7de70b580586af355347 | 7104826f8fba31f16b5a9e5f88f68259 | загрузка всех новостей c БД (оффлайн работа) | {
foreach (RssStruct rss in ListRssChannel)
{
try
{
using (var sqlConn = new SqlConnection(_stringConnection))
{
SqlCommand sqlCmd = new SqlCommand();
sqlCmd.CommandTex... | 1 |
00278df7352076471d25fc424be5b74f | 32afed79a4a4a236b01420cce932e324 | Makes the dialog window visible. | public abstract class SliderDialog extends JDialog implements ChangeListener, ActionListener
public void showDialog()
{
TEXT_FIELD.selectAll();
this.setVisible(true);
} | 1 |
5eccd2a3d9dff6cde30b0c223d5cd8f3 | 2a5043a53a1bb927a622e5cef861f643 | Reads the content of the object onto the buffer with objid = objid.
Return value: Success --> #of bytes written
Failure --> -1 | {
struct object *obj = get_object_by_id(objid, objfs);
if (obj == NULL || objid < 2)
return -1;
u32 offcheck = offset;
u32 sizecheck = size;
dprintf("Doing read size = %d\n", size);
char buffer[BLOCK_SIZE];
while(sizecheck) {
if (find_read_cached(objfs, obj, buffer, ((sizecheck > (BLOCK_SIZE)) ? ... | 1 |
156de32b5c30804053c5cbd1cad255d6 | 7dee90b25c39d075f1d14e921d8339de | Initiates a shutdown in which preexisting and new calls are cancelled. | namespace Sourcemod
public partial class SourceMod
public static void Call_Cancel() { throw new NotImplementedException(); } | 0 |
c8fbb675a8fdca0286b177ffe99e0b32 | 3830e041ed605dc965bdce43371cf540 | Retrieve the reviewer's rating for the given movie. | public class DataManager
public short getRating(int userId, int movieId) {
for (UserRating userRating : data.get(movieId)) {
if (userRating.getUserId() == userId) {
return userRating.getRating();
}
}
throw new java.util.NoSuchElementException();
} | 1 |
407ceb393811438fcd0c536bdc41a5b9 | c0d4afd9f08f3d4347e42d6c948a0418 | When click happened in the SVG display (outside any SVG item), clear
the selection. | this.canvasDom.addEventListener('mousedown', (event) => {
if (event.target.nodeName === 'svg') {
graph.setSelected(null);
}
})
} | 1 |
c7ecc10031501a168ad796a67ab8c52e | f41d18b36cccd07b46a00886951d0843 | throw error 可以执行finally | function foo(){
try{
return 1
}
finally{
return 2
}
} | 0 |
4c1dfac25085044e3cfed62d4b58662d | 440ff820f7730aceec639c785b5afe86 | Called when a 'partition closing' event is triggered. | {
var handler = OnDataPartitionPhraseChanged;
if( handler != null )
handler( null, e );
} | 0 |
a3cd45708f19942ba3c003485afc21a1 | 7275db8f3b351a50ee7360d8ca7d1a6b | Lock list of specified parameters on the node. | self, node_id: Optional[int] = None, node_name: Optional[str] = None, **kwargs
) -> Dict[int, Any]:
raise NotImplementedError | 0 |
4c9b0b34391fe350f0a1ceb233fb6751 | af47e2da979b1244d454f33d39c2950c | ___VISUAL__ | def text_visualize(name, ratio) :
index=int(ratio*10)
to_print=[]
for i in range(0,10) :
if (i==index) :
to_print.append("X")
else :
to_print.append("#")
to_print= ''.join(to_print)
print("{}\t".format(to_print), name) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.