Questions tagged [insertion]

place into or between other items in an enumeration

578 questions
3
votes
3 answers

Inserting into array in order

In simple terms, part of the project I'm working on has me taking an array that is descending in order and adding an element so that it the array remains in order. Initially I thought it would be simple just to add the element into the array and…
crackhamster
  • 81
  • 1
  • 2
  • 8
3
votes
0 answers

QTreeView & QAbstractItemModel & insertRow specifics understanding

I have implemented my QTreeView & QAbstractItemModel according to editabletreemodel example plus the advice here: QTreeView & QAbstractItemModel & insertRow. It works, ok. But there is a difference I do not understand. To make my application work…
Chiffa
  • 31
  • 3
3
votes
4 answers

vb.net - Inserting 1-dimensional arrays into a 2-dimensional array

I'm working on an optimization algorithm and need to store some of the data (generated by the algorithm) in a 2-dimensional array called matrix, where row(i) contains the fitness score and parameter values of optimization vector(i). Dim…
bluebox
  • 555
  • 1
  • 8
  • 19
3
votes
1 answer

Drupal 7 : difference between node insertion / node update

I've created a module to get server informations. So i've created a specific content type.To collect all the data one field is required the hostname. I use the function hook_node_presave() to add information such as CPU, RAM, etc in my node. So when…
BDR
  • 436
  • 2
  • 7
  • 23
3
votes
2 answers

Implementation of a data structure with O(logn) access and O(logn) insertion?

Does anyone know of a data structure where I can access and delete the k-th item in worst case O(logn) and also supports the operation of inserting an item after the k-th item in worst case O(logn)?
3
votes
2 answers

Infinispan cache preserving insertion order

I'm using Infinispan 5.0.1 for my caching needs. The problem I'm having is that I need to get data back from the cache in the same order it was put in the cache. For example: Cache myCache =…
kovica
  • 2,443
  • 3
  • 21
  • 25
3
votes
1 answer

Preorder Binary Search Tree Insertion

A painfully stupid question that I am almost too ashamed to ask. I have been searching for the past 4 hours, tested different algorithms, tried quite a few on paper and still can't get it to work. I will spare you the details of the project…
GCon
  • 1,397
  • 3
  • 16
  • 33
3
votes
2 answers

mysql insert value if it doesn't exist

I'm trying to insert an ingredient to an ingredients table if it doesn't exist. I'm using the following syntax: INSERT INTO ingredient(Name) ( SELECT 'ingName' FROM dummytable WHERE (SELECT count(*) FROM ingredient WHERE Name =…
user429400
  • 3,145
  • 12
  • 49
  • 68
3
votes
6 answers

In C++, is `var << ifstream` the same as `ifstream >> var`?

Is var << ifstream the same as ifstream >> var? As far as I can tell, they should be exactly the same. But it's late and my brain is half-asleep, so I would like a clarification.
Polynomial
  • 27,674
  • 12
  • 80
  • 107
3
votes
1 answer

Overloading insertion and extraction operators for strings

I would like to implement both of these functions so that I would be able to input and output objects of my class. I have gotten the >> operator to work but not so much <<. Here is my code in my .h file: class MyString { public: …
user1363061
  • 105
  • 1
  • 4
  • 12
2
votes
1 answer

Inserting recorded audio(AMR and WAV) file in another file

My Android app records audio in both AMR and WAV format. And my application needs to insert second recorded audio file inside the first one at a position where it is paused. I did it right with WAV files, but the AMR file after insertion is not able…
user1190521
2
votes
1 answer

Creating translator; Need to properly insert from a text file

For my CS class, we've been given an assignment to create an english to spanish translator using the text file from here: http://www.ilovelanguages.com/IDP/files/Spanish.txt So far, I've got the the insertion down, but when I run the program - words…
Janian
  • 21
  • 1
2
votes
0 answers

nopCommerce Bulk Insertion in Import using excel issue with Foreign Key

The Insert statement conflicted with the foreign key 'ProductXXXXX'. The Conflict occurred in Database 'DatabaseName', table "dbo.TableName", column 'ColumnName' The Statement has been terminated. strong text
2
votes
2 answers

Linked list unable to print all elements

I'm trying to print the linked list to which I prompt for user input. This code below is not printing the whole list, only the last element at a time. I don't seem to find the bug. Can you please take a look at it? #include #include…
user13483869
2
votes
6 answers

C++ stream second insertion operator

Is it possible to define a second insertion operator to have two modes of outputting a class? Say e.g. one that outputs all members and one that just outputs some basic unique identifier that is grep-able in a log? If so, is there an operator that…
Cookie
  • 12,004
  • 13
  • 54
  • 83