Questions tagged [insertion]

place into or between other items in an enumeration

527 questions
64
votes
5 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,115
  • 3
  • 12
  • 14
61
votes
9 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
  • 791
  • 1
  • 10
  • 17
21
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 #…
SFun28
  • 32,209
  • 43
  • 123
  • 233
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,677
  • 6
  • 23
  • 38
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
  • 35,107
  • 16
  • 95
  • 241
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
  • 4,279
  • 3
  • 12
  • 15
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,163
  • 6
  • 21
  • 54
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,778
  • 1
  • 28
  • 45
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
  • 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…
7
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
  • 75
  • 1
  • 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,410
  • 5
  • 21
  • 44
7
votes
1 answer

How to use core data's add & remove (NSSet) accessor methods?

In this test Core Data project, I have a one to many relationship from "Customer" to "Products" and this relationship is named 'products'. Customer's attribute is 'name' and Product's attribute is 'item'. I've subclassed the entities and Xcode has…
kangaroo
  • 105
  • 1
  • 5
7
votes
6 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
  • 385
  • 6
  • 12
1
2 3
35 36