Store a single appointment
18975
async def _storeAppt(self, appt):
        '''  '''
        await self._hivedict.set(appt.iden, appt.pack())
995304
def store(self, deferred_result):
        
        self._counter += 1
        self._stored[self._counter] = deferred_result
        return self._counter
427295
def insert(cls, jobs_data, queue=None, statuses_no_storage=None, return_jobs=True, w=None, j=None):
        

        now = datetime.datetime.utcnow()
        for data in jobs_data:
            if data["status"] == "started":
                data["datestarted"] = now

        no_storage = (statuses_no_storage is not None) and ("started" in statuses_no_storage)
        if no_storage and return_jobs:
            for data in jobs_data:
                data["_id"] = ObjectId()  # Give the job a temporary ID
        else:
            inserted = context.connections.mongodb_jobs.mrq_jobs.insert(
                jobs_data,
                manipulate=True,
                w=w,
                j=j
            )

        if return_jobs:
            jobs = []
            for data in jobs_data:
                job = cls(data["_id"], queue=queue)
                job.set_data(data)
                job.statuses_no_storage = statuses_no_storage
                job.stored = (not no_storage)
                if data["status"] == "started":
                    job.datestarted = data["datestarted"]
                jobs.append(job)

            return jobs
        else:
            return inserted
910256
def store(
            self, type, nick, time, fmt=None, code=None, filename=None,
            mime=None, data=None, makeshort=True):
        
        uid = str(uuid.uuid4())
        shortid = short_key() if makeshort else None

        paste = assign_params(self.build_paste, locals())()
        self._store(uid, paste, data)
        if nick:
            self._storeLog(nick, time, uid)
        return uid, shortid
949168
synchronized void storeUninstallTimestamp() {

        if (!this.belowMemThreshold()) {
            getConfigLogger().verbose("There is not enough space left on the device to store data, data discarded");
            return ;
        }
        final String tableName = Table.UNINSTALL_TS.getName();

        try {
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            final ContentValues cv = new ContentValues();
            cv.put(KEY_CREATED_AT, System.currentTimeMillis());
            db.insert(tableName, null, cv);
        } catch (final SQLiteException e) {
            getConfigLogger().verbose("Error adding data to table " + tableName + " Recreating DB");
            dbHelper.deleteDatabase();
        } finally {
            dbHelper.close();
        }

    }
336817
function Store(name, handler, id) {
    this.setId(id);
    this.__name = name;
    this.__handler = handler;

    /**
     * The session attributes.
     *
     * @var {Object}
     * @protected
     */
    this.__attributes = {};

    /**
     * Session store started status.
     *
     * @var {Boolean}
     */
    this.__started = false;
}
845020
def __store_record(self, record):
		
		if isinstance(record, WSimpleTrackerStorage.Record) is False:
			raise TypeError('Invalid record type was')
		limit = self.record_limit()
		if limit is not None and len(self.__registry) >= limit:
			self.__registry.pop(0)
		self.__registry.append(record)
405877
private function _store() {
		// Flushes the buffers
		$output = ob_get_flush();

		\wp_cache_add( $this->key, $output, $this->group, $this->expires );
	}
494246
def balance(self):
        """"""
        if len(self.records) > len(self._shapes):
            self.null()
        elif len(self.records) < len(self._shapes):
            self.record()
838767
function buildOptions(slot, appointmentType, date, bookingMap) {
    const dayStrings = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
    if (slot === 'AppointmentType') {
        return [
            { text: 'cleaning (30 min)', value: 'cleaning' },
            { text: 'root canal (60 min)', value: 'root canal' },
            { text: 'whitening (30 min)', value: 'whitening' },
        ];
    } else if (slot === 'Date') {
        // Return the next five weekdays.
        const options = [];
        const potentialDate = new Date();
        while (options.length < 5) {
            potentialDate.setDate(potentialDate.getDate() + 1);
            if (potentialDate.getDay() > 0 && potentialDate.getDay() < 6) {
                options.push({ text: `${potentialDate.getMonth() + 1}-${potentialDate.getDate()} (${dayStrings[potentialDate.getDay()]})`,
                    value: potentialDate.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) });
            }
        }
        return options;
    } else if (slot === 'Time') {
        // Return the availabilities on the given date.
        if (!appointmentType || !date) {
            return null;
        }
        let availabilities = bookingMap[`${date}`];
        if (!availabilities) {
            return null;
        }
        availabilities = getAvailabilitiesForDuration(getDuration(appointmentType), availabilities);
        if (availabilities.length === 0) {
            return null;
        }
        const options = [];
        for (let i = 0; i < Math.min(availabilities.length, 5); i++) {
            options.push({ text: buildTimeOutputString(availabilities[i]), value: buildTimeOutputString(availabilities[i]) });
        }
        return options;
    }
}
746796
def session_preparation(self):
        """"""
        self.set_base_prompt()
        cmd = self.RETURN + "rows 0" + self.RETURN
        self.disable_paging(command=cmd)
752784
def store_value(self, name, value):
        """"""
        self.spine.send_command("storeSetting", self.group, name, value)
1213127
def store_many(self, sql, values):
        """"""
        cursor = self.get_cursor()
        cursor.executemany(sql, values)
        self.conn.commit()
682662
function storeFixture() {

  		// Avoid overwriting user-defined values
  		if (hasOwn.call(config, "fixture")) {
  			return;
  		}

  		var fixture = document.getElementById("qunit-fixture");
  		if (fixture) {
  			config.fixture = fixture.innerHTML;
  		}
  	}
1147295
function storeProcessedResponse(ack, from)
  {
    var timeout = setTimeout(function()
    {
      processedResponses.remove(ack, from);
    },
    duplicates_timeout);

    processedResponses.set(timeout, ack, from);
  }
16719
def manage_schedule(self, tag, data):
        '''
        
        '''
        func = data.get('func', None)
        name = data.get('name', None)
        schedule = data.get('schedule', None)
        where = data.get('where', None)
        persist = data.get('persist', None)

        funcs = {'delete': ('delete_job', (name, persist)),
                 'add': ('add_job', (schedule, persist)),
                 'modify': ('modify_job',
                            (name, schedule, persist)),
                 'enable': ('enable_schedule', ()),
                 'disable': ('disable_schedule', ()),
                 'enable_job': ('enable_job', (name, persist)),
                 'disable_job': ('disable_job', (name, persist)),
                 'postpone_job': ('postpone_job', (name, data)),
                 'skip_job': ('skip_job', (name, data)),
                 'reload': ('reload', (schedule,)),
                 'list': ('list', (where,)),
                 'save_schedule': ('save_schedule', ()),
                 'get_next_fire_time': ('get_next_fire_time',
                                        (name,))}

        # Call the appropriate schedule function
        try:
            alias, params = funcs.get(func)
            getattr(self.schedule, alias)(*params)
        except TypeError:
            log.error('Function "%s" is unavailable in salt.utils.scheduler',
                      func)
560028
def store(self, val, addr):
        
        self.irsb_c.store(addr.rdt, val.rdt)