Insert service data.
769253
protected function _process()
	{
		$this->_msg( 'Processing customer demo data', 0 );

		$context =  $this->_getContext();
		$manager = MShop_Factory::createManager( $context, 'customer' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '=~', 'customer.code', 'demo-' ) );
		$services = $manager->searchItems( $search );

		$manager->deleteItems( array_keys( $services ) );


		if( $context->getConfig()->get( 'setup/default/demo', false ) == true )
		{
			$ds = DIRECTORY_SEPARATOR;
			$path = __DIR__ . $ds . 'data' . $ds . 'demo-customer.php';

			if( ( $data = include( $path ) ) == false ) {
				throw new MShop_Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
			}


			foreach( $data as $entry )
			{
				$item = $manager->createItem();
				$item->setCode( $entry['code'] );
				$item->setLabel( $entry['label'] );
				$item->setBirthday( $entry['birthday'] );
				$item->setPassword( $entry['password'] );
				$item->setStatus( $entry['status'] );
				$item->setDateVerified( $entry['vtime'] );

				$addr = $item->getPaymentAddress();
				$addr->setTitle( $entry['title'] );
				$addr->setSalutation( $entry['salutation'] );
				$addr->setCompany( $entry['company'] );
				$addr->setVatID( $entry['vatid'] );
				$addr->setFirstname( $entry['firstname'] );
				$addr->setLastname( $entry['lastname'] );
				$addr->setAddress1( $entry['address1'] );
				$addr->setAddress2( $entry['address2'] );
				$addr->setAddress3( $entry['address3'] );
				$addr->setPostal( $entry['postal'] );
				$addr->setCity( $entry['city'] );
				$addr->setState( $entry['state'] );
				$addr->setLanguageId( $entry['langid'] );
				$addr->setCountryId( $entry['countryid'] );
				$addr->setTelephone( $entry['telephone'] );
				$addr->setEmail( $entry['email'] );
				$addr->setTelefax( $entry['telefax'] );
				$addr->setWebsite( $entry['website'] );

				$manager->saveItem( $item );
			}

			$this->_status( 'added' );
		}
		else
		{
			$this->_status( 'removed' );
		}
	}
513222
public void insert(final DeviceData deviceData, final DevState argin) {
        DevStateHelper.insert(deviceData.getAny(), argin);
    }
83028
final protected function _loadData()
    {
        if (!$this->isLoaded()) {
            $this->_object_set = new ArrayObject();
            foreach ($this->_getData() as $object) {
                $this->insert($object);
            }
        }
    }
1335489
def insert(self, i, tab_index):
        """"""
        _id = id(self.editor.tabs.widget(tab_index))
        self.history.insert(i, _id)
138977
def append_data(dset, data):
    """"""
    N = data.shape[0] if hasattr(data, 'shape') else 1
    if N == 0:
        return
    oldlen = dset.shape[0]
    newlen = oldlen + N
    dset.resize(newlen, axis=0)
    dset[oldlen:] = data
1028491
def insert(self, index, filename):
        """"""
        base = self._base
        dct = {'__module__': base.__module__, 'filename': filename, '_stack': self}
        cls = type(base.__name__, (base,), dct)

        self._map[cls.filename] = cls
        self._classes.insert(index, cls)
986092
def _insert(self, name, value, timestamp, intervals, **kwargs):
    '''
    
    '''
    if self._value_type in QUOTE_TYPES and not QUOTE_MATCH.match(value):
      value = "'%s'"%(value)

    for interval,config in self._intervals.items():
      timestamps = self._normalize_timestamps(timestamp, intervals, config)
      for tstamp in timestamps:
        self._insert_data(name, value, tstamp, interval, config, **kwargs)
1079051
def add_service(self, service):
        
        if (self.service is None):
            self.service = service
        elif (isinstance(self.service, dict)):
            self.service = [self.service, service]
        else:
            self.service.append(service)
99695
def _insert_data(self, connection, name, value, timestamp, interval, config):
    ''''''
    cursor = connection.cursor()
    try:
      stmt = self._insert_stmt(name, value, timestamp, interval, config)
      if stmt:
        cursor.execute(stmt)
    finally:
      cursor.close()
709712
void insertIntoTable(Session session, Result result) {

        PersistentStore store = session.sessionData.getRowStore(this);
        RowSetNavigator nav   = result.initialiseNavigator();

        while (nav.hasNext()) {
            Object[] data = nav.getNext();
            Object[] newData =
                (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
                    getColumnCount());

            insertData(store, newData);
        }
    }
426184
protected function insertOtherResource()
    {
        $items = $this->package->getNonStorageServices();
        $imported = false;

        foreach ($items as $service => $resources) {
            foreach ($resources as $resourceName => $details) {
                try {
                    $api = $service . '/' . $resourceName;
                    switch ($api) {
                        case 'system/app':
                        case 'system/role':
                        case 'system/service':
                        case 'system/event_script':
                        case 'system/user':
                            // Skip; already imported at this point.
                            break;
                        case $service . '/_table':
                            $imported = $this->insertDbTableResources($service);
                            break;
                        case $service . '/_proc':
                        case $service . '/_func':
                            // Not supported at this time.
                            $this->log('warning', 'Skipping resource ' . $resourceName . '. Not supported.');
                            break;
                        default:
                            $imported = $this->insertGenericResources($service, $resourceName);
                            break;
                    }
                } catch (UnauthorizedException $e) {
                    $this->log(
                        'error',
                        'Failed to insert resources for ' . $service . '/' . $resourceName . '. ' . $e->getMessage()
                    );
                }
            }
        }

        return $imported;
    }
67236
def insert(manager, graph: BELGraph):
    """"""
    to_database(graph, manager=manager, use_tqdm=True)
1245031
def save(self, *args, **kwargs):
        """"""
        data = kwargs.pop('data', {})
        sync = kwargs.pop('sync', True)
        if not self.id and sync:
            self.push_to_server(data)
        super(CustomerProfile, self).save(*args, **kwargs)
1180763
def insert(self, thread):
        """"""
        thread_id = thread['id']
        title = thread['title']
        self.db.threads.new(thread_id, title)

        comments = list(map(self._build_comment, thread['comments']))
        comments.sort(key=lambda comment: comment['id'])
        self.count += len(comments)
        for comment in comments:
            self.db.comments.add(thread_id, comment)
545690
synchronized void insert_data(AttributeValue res, TimeVal when, TimeVal needed)
	{
		ring.insert_data(res, when);
		needed_time = needed;
	}
1366789
def __store_service(self, key, service):
        
        self._future_value.setdefault(key, []).append(service)
770786
public function insertDemoData()
    {
        $testConfig = new TestConfig();
        $testDirectory = $testConfig->getEditionTestsPath($testConfig->getShopEdition());
        $this->getDbHandler()->import($testDirectory . "/Fixtures/testdemodata.sql");
    }