insert_string(data)

        Insert the resources entries in the string DATA into the
        database.
5868
def insert_string(self, data):
        

        # First split string into lines
        lines = data.split('\n')

        while lines:
            line = lines[0]
            del lines[0]

            # Skip empty line
            if not line:
                continue

            # Skip comments
            if comment_re.match(line):
                continue

            # Handle continued lines
            while line[-1] == '\\':
                if lines:
                    line = line[:-1] + lines[0]
                    del lines[0]
                else:
                    line = line[:-1]
                    break

            # Split line into resource and value
            m = resource_spec_re.match(line)

            # Bad line, just ignore it silently
            if not m:
                continue

            res, value = m.group(1, 2)

            # Convert all escape sequences in value
            splits = value_escape_re.split(value)

            for i in range(1, len(splits), 2):
                s = splits[i]
                if len(s) == 3:
                    splits[i] = chr(int(s, 8))
                elif s == 'n':
                    splits[i] = '\n'

            # strip the last value part to get rid of any
            # unescaped blanks
            splits[-1] = splits[-1].rstrip()

            value = ''.join(splits)

            self.insert(res, value)
1240189
public void insertString( int offset, String str, AttributeSet a ) throws BadLocationException {
        if (str.equals("{"))
            str = addMatchingBrace(offset);
        super.insertString(offset, str, a);
        processChangedLines(offset, str.length());
    }
123336
def insert(self, data):
        
        if not data:
            return
        data = self._compress_by_md5(data)
        # cut the first two place,route to different block by block_num
        name = self.key + str(int(data[0:2], 16) % self.block_num)
        for h in self.hash_function:
            local_hash = h.hash(data)
            self.server.setbit(name, local_hash, 1)
1257791
def adds(self, string):
        
        if isinstance(string, unicode):
            string = string.encode("utf-8")

        self.children.append((STRING, str(string)))
1127610
public int insert(String sql) {
        String msId = msUtils.insert(sql);
        return sqlSession.insert(msId);
    }
842793
function Insert (str, position) {
    if (!this || this.constructor !== SimpleTextOperation) {
      // => function was called without 'new'
      return new Insert(str, position);
    }
    this.str = str;
    this.position = position;
  }
1144819
def insert_text(self, string):
        """
        self.l_buffer.insert_text(string, self.argument_reset)
        self.finalize()
1095111
function SQL(strs) {
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }

  var values = [];
  var text = strs.reduce(function (prev, curr, i) {
    var arg = args[i - 1];
    if (arg instanceof InsertValue) {
      return prev + arg.value + curr;
    } else {
      values.push(arg);
      return prev + '$' + values.length + curr;
    }
  });

  return {
    text: text,
    values: values
  };
}
146147
def insert(self, index, option):
        
        option = str(option)
        self._options.insert(index, option)
        # if this is the first option, set it.
        if len(self._options) == 1:
            self.value = option

        self._refresh_options()
720846
public void insert(final String[] argin) {
	attrval.r_dim.dim_x = argin.length;
	attrval.r_dim.dim_y = 0;
	DevVarStringArrayHelper.insert(attrval.value, argin);
    }
801842
public function insert( $position, $string )
	{
		if( $position<= $this->count() && $position >=0 )
		{
			if( $position < $this->pointer )
				$this->pointer = $this->pointer + strlen( $string );
			$left	= substr( $this->toString(), 0, $position );
			$right	= substr( $this->toString(), $position );
			$this->buffer = $left.$string.$right;
		}
		return $this->toString();
	}
1078420
synchronized void insert_data(Any res, TimeVal when, TimeVal needed)
	{
		ring.insert_data(res,when);
		needed_time = needed;
	}
1200688
protected void initializeSQL_Strings() {
        super.initializeSQL_Strings();

        findProps = "select propid, small, medium, large from " + tableName + "  where id = ? and propid <> ? and appname = ?";

        findAllKeys = "select propid from  " + tableName + "  where id = ? and propid <> id and appname = ?";

//        upSmProp = "update " + tableName + " set small = ?, medium = NULL, large = NULL where id = ? and propid = ? and appname = ?";
//        upMedProp = "update " + tableName + " set small = NULL, medium = ?, large = NULL where id = ? and propid = ? and appname = ?";
//        upLgProp = "update " + tableName + " set small = NULL, medium = NULL, large = ? where id = ? and propid = ? and appname = ?";

        upAnyProp = "update " + tableName + " set small = ?, medium = ?, large = ? where id = ? and propid = ? and appname = ?";
        insAnyProp  = "insert into " + tableName + " (id, propid, small, medium, large, appname) values (?, ?, ?, ?, ?, ?)";

        insNoProp = "insert into " + tableName + " (id, propid, appname, listenercnt, lastaccess, creationtime, maxinactivetime, username) values (?, ?, ?, ?, ?, ?, ?, ?)";
        findProps = "select propid, small, medium, large from " + tableName + " where id = ? and propid <> ? and appname = ? "; //*dbc2.2
    }
708865
def archive_insert_data(self, data_dump):
        '''
        
        '''
        with self.session as session:
            try:
                data = [self.tables.archive(**entry) for entry in data_dump]

                session.add_all(data)
                session.commit()
            except SQLAlchemyError as exc:
                session.rollback()
                print_exc()
                raise IOError(exc)
1285403
def insert(self, **data):
        
        if self.where_clause:
            raise Invalid("Cannot insert with 'where' clause.")
        # Ensure that order is preserved
        data = data.items()
        cmd = "insert into {table} ({attrs}) values ({values})".format(
            table=self.table_name,
            attrs=", ".join(entry[0] for entry in data),
            values=", ".join(["?"] * len(data)),
        )
        handle = Repo.db.execute(cmd, [entry[1] for entry in data])
        # Return the id of the added row
        return handle.lastrowid
706089
def insert(self, data):
        
        return json.loads(self._post('', headers=KVStoreCollectionData.JSON_HEADER, body=data).body.read().decode('utf-8'))
454506
private Instance insertNewProp(final String _key,
                                 final String _value)
    {
        Instance ret = null;
        try {
            final Insert insert = new Insert(DBPropertiesUpdate.TYPE_PROPERTIES);
            insert.add("BundleID", this.bundleInstance);
            insert.add("Key", _key);
            insert.add("Default", _value);
            insert.executeWithoutAccessCheck();
            ret = insert.getInstance();
            insert.close();

        } catch (final EFapsException e) {
            DBPropertiesUpdate.LOG.error("InsertNew(String, String)", e);
        }
        return ret;
    }