place into or between other items in an enumeration
Questions tagged [insertion]
578 questions
76
votes
6 answers
Python MySQLdb issues (TypeError: %d format: a number is required, not str)
I am trying to do the following insert operation:
cursor.execute("""
insert into tree (id,parent_id,level,description,code,start,end)
values (%d,%d,%d,%s,%s,%f,%f)
""",…

user721975
- 1,257
- 3
- 13
- 14
72
votes
11 answers
Transfer data between databases with PostgreSQL
I need to transfer some data from another database. The old database is called paw1.moviesDB and the new database is paw1. The schema of each table are the following.
Awards (name of the table)(new DB)
Id [PK] Serial Award
Nominations…

Nicopuri
- 901
- 2
- 11
- 17
26
votes
2 answers
Adding named item to named list - guaranteed to append to end of list?
When adding a named item to a list, is it guaranteed that the item will be added to the end of the list? In practice it appears to be the case, but not sure if this is a dangerous assumption?
test = list()
test[[ "one" ]] = 1
test[[ "two" ]] = 2 #…

Suraj
- 35,905
- 47
- 139
- 250
17
votes
3 answers
Does hibernate preserve the order of a LinkedHashSet and if so, how?
Does hibernate preserve the order of a LinkedHashSet and if so, how? In case this depends on the type of database, I'd like to know this for PostgreSQL.
Background:
I know what a LinkedHashSet is for, and the reason I'm asking this is because I'm…

Erik Stens
- 1,779
- 6
- 25
- 40
13
votes
2 answers
Proper Way to Insert Strings to a SQLAlchemy Unicode Column
I have a SQLAlchemy model with a Unicode column. I sometimes insert unicode values to it (u'Value'), but also sometimes insert ASCII strings. What is the best way to go about this? When I insert ASCII strings with special characters I get this…

Raiders
- 181
- 2
- 7
9
votes
1 answer
How are iomanip functions Implemented?
Some of the standard iomanip functions take take a parameter.
I'd like to know how this is accomplished, for instance, can I do something similar with a function? That's really the solution that I needed for this answer, but I couldn't figure out…

Jonathan Mee
- 37,899
- 23
- 129
- 288
9
votes
5 answers
python-docx insertion point
I am not sure if I've been missing anything obvious, but I have not found anything documented about how one would go to insert Word elements (tables, for example) at some specific place in a document?
I am loading an existing MS Word .docx document…

Apteryx
- 5,822
- 3
- 16
- 18
9
votes
3 answers
excel 2010/2013 insert rows is very slow
I am finding inserting rows in table structures or in normal cells - manually or otherwise - very very slow. Like it takes more than 10 mins to insert 7 rows in a table (containing literal strings only) or in adjacent cells, in a sheet with no…

Cool Blue
- 6,438
- 6
- 29
- 68
9
votes
7 answers
Efficient Data Structure for Insertion
I'm looking for a data structure (array-like) that allows fast (faster than O(N)) arbitrary insertion of values into the structure. The data structure must be able to print out its elements in the way they were inserted. This is similar to something…

Peter
- 415
- 7
- 13
8
votes
2 answers
Insertion sort analysis and summation notation
I am trying to understand the worst case analysis of Insertion sort and I have a problem with the math involved on slide 21 (ppt).
I understand the first formula:
But these I'm struggling with:
Why is there a - 1 at the end?
Also, I don't…

Nikhil
- 85
- 1
- 3
7
votes
2 answers
MVC Ajax.BeginForm Replace strange behaviour
In a partial view, I am using MVCs Ajax.Beginform like followed:
@using (Ajax.BeginForm("Action", "Controller,
new AjaxOptions
{
…

iappwebdev
- 5,880
- 1
- 30
- 47
7
votes
1 answer
How to initialize a TreeMap with pre-sorted data?
My app uses a TreeMap to keep data sorted and have log(n) lookups & inserts. This works great in the general case while the app is running, but when the app first starts, I need to initialize the TreeMap with several million longs that I get in…

Yevgeniy Brikman
- 8,711
- 6
- 46
- 60
7
votes
4 answers
Slow insert speed in Postgresql memory tablespace
I have a requirement where I need to store the records at rate of 10,000 records/sec into a database (with indexing on a few fields). Number of columns in one record is 25. I am doing a batch insert of 100,000 records in one transaction block. To…

Prashant
- 165
- 1
- 1
- 6
7
votes
2 answers
How to remove substring from suffix tree?
I reviewed a lot of literature, but I dont found any information about deleting or insertion substrings into suffix tree. There are only Ukkonen's or McCreight's algorithms for building tree.
The poorest way is to rebuild tree after deleting or…

user2386656
- 71
- 3
7
votes
3 answers
Passing an Object to Overloaded Operator
Somebody gave me a a program having an error yesterday. Working in MVS 2010, I found the problem and an alternative for it as well. The problem was the overloaded insertion operator the class. Its prototype was as follows...
void matrix :: operator…

Coding Mash
- 3,338
- 5
- 24
- 45