place into or between other items in an enumeration
Questions tagged [insertion]
578 questions
2
votes
1 answer
SQL: insert values in one table if given ID was not found in another (using single query)
I have two tables on MySQL server: T1 and T2. ID is my primary key for T1 and ID is foreign key for T2.
My question is : How could I insert some values in T2 (using single query) if I know the ID related to them (values) but only in case this ID was…

Boris D. Teoharov
- 2,319
- 4
- 30
- 49
2
votes
3 answers
Mysql InnoDB Insertion Speed Too Slow?
I have a InnoDb table in Mysql that needs to handle insertions very quickly (everything else can be as slow as it wants). The table has no relations or indexes an id which is auto incremented and a time stamp.
I ran a script from multiple clients…

nikdeapen
- 1,581
- 3
- 15
- 27
2
votes
3 answers
Java: How to add (somewhere in the middle) multiple elements in a linked list?
adding an element to a linked list is known to be O(1).
However, adding it in position X is O(X)
and if i want to add R elements in this position the total running time would be O(R*X).
but there must be an O(X+R) solution.
And the question is how…

Ahmad Ibrahem
- 97
- 1
- 6
2
votes
2 answers
Code block in a C++ preprocessor macro does not work without braces
The following #define partially works:
#define OUT(x) \
if(x > 0) cout << "Hello "; \
if(x > 1) cout << x+1
OUT(1) << "message"; // OK
if(0) {
OUT(1) << "message"; // OK, nothing printed
}
if(0)
OUT(1) << "message"; // NO,…

Pietro
- 12,086
- 26
- 100
- 193
1
vote
3 answers
Massive insertions from one big table to other related tables
Into:
Currently i have scraped all the data into one PostgreSQL 'Bigtable' table(there are about 1.2M rows). Now i need to split the design into separate tables which all have dependency on the Bigtable. Some of the tables might have subtables. The…

Risto Novik
- 8,199
- 9
- 50
- 66
1
vote
2 answers
Ext JS 4 TextArea - how to set the insertion point?
Is it possible / how do you set the insertion point for an ExtJS 4 Textarea?
I want to insert some text (which I have working), then I want to set the insertion point at a specific length from the beginning of the field:
I am getting the current…

Scott Szretter
- 3,938
- 11
- 57
- 76
1
vote
1 answer
empty function to remove duplicates
I am importing an excel file to DB. For that i am using excel-class reader. Using that i can insert values to DB directly. Here is my code to insert data.
$q="SELECT * FROM leads_info WHERE name='".$rows[1]."' AND home_phone='".$rows[2]."' AND…

NewPHP
- 13
- 2
1
vote
4 answers
how to insert table data from one user to another in different machines in mysql
I want to insert the data into one of the tables of a different user and a different database.
e.g.,
First DB
ip:ip1
user:user1
b:db1
Second DB
ip:ip2
user:user2
db:db2
So, I want to insert one of table's data of first DB into second DB.

user770776
- 11
- 1
1
vote
1 answer
XSLT add node if node does not exist, append child if it does
I have the following XML:
I need to…

sledgehammer
- 13
- 1
- 3
1
vote
2 answers
problem of insert multiple values with WHERE NOT EXISTS
I want to insert multiple records from the form into table named 'user' with the 'items' value submitted from the form do not exist in another table name 'order'. There is only 2 field in the 'order' table that is id and items.
Here is my…

temperance
- 11
- 3
1
vote
1 answer
Huge inserts in package-lock.json
I am new to javascript and just added 2 js code to our appl. One thing I noticed is when I npm install json2csv it inserted more than 10k lines to package-lock.json . My question is that normal? I just dont want to affect other existing codes and…

Gilbert Tuason
- 11
- 2
1
vote
1 answer
How to insert strings into a linked list in java
I am writing a program to add String type data to a circular doubly linked list and to view them in java.
I want to know that how to add Strings to the linked list and how to get the output.
The way I tried gives an error: " The constructor Node()…

Tharisha Perera
- 33
- 1
- 6
1
vote
2 answers
Sorting elements using insertion sort
If I am using insertion sort as shown below and have an array with some elements that are integers and then some that are null - How would I go about sorting that array with the null elements at the end using insertion sort?
For example: [1, 2, 6,…

Dan
- 137
- 2
- 9
1
vote
0 answers
C++ STL List Insertion sort
I'm trying to demonstrate an Insertion sort on a STL list for class I'm in. I'm running into an issue where the second expression of the while loop is never true, so the inner loop doesn't run. Should I be decrementing the iterator in a different…

kfly2fly
- 25
- 4
1
vote
1 answer
C# Roslyn API: Insert Instructions/Methods between each nodes members
I just got into a personal project and I would like to be able to use the Roslyn API to insert instructions / methods between class members (So methods / instructions)
I am currently able to retrieve the different child nodes like here: Namespace>…

0x0000000000000
- 166
- 14