586 questions
0
votes
0
answers
75
views
How do I properly insert 3 into my nested list tree?
I am working on a program that is supposed to build a tree using nested lists in Racket. I believe I am very close, but I am stuck on one section of my insertion testing process.
The syntax for my ...
0
votes
1
answer
57
views
Conditional insertions in VS Code snippet transformations
I want to create a VS Code snippet for Markdown files. The snippet should take the name of the file (e.g.: 12.3-Test_me.md) and transform it to something like Test Me with neither the leading numbers ...
1
vote
1
answer
122
views
Debugging an erroneous AVL tree 'insert' operation
I am attempting to create an AVL tree data structure which can handle duplicate element keys. I have based my insertion algorithm on the following: https://www.sanfoundry.com/c-program-implement-avl-...
0
votes
1
answer
609
views
Optimizing Data Insertion Efficiency in Milvus Collections: Addressing Delays with Minimal Data Sets
When inserting minimal data into the Milvus collection, a significant amount of time is consumed, and the reason for this delay is not apparent. Could you kindly provide recommendations for resolving ...
0
votes
2
answers
729
views
How can I insert a given element in an array in C?
Here is the output to the code, the element actually gets inserted in the desired position but the initial value at that particular position in not translated to the next memory block, instead gets ...
-4
votes
1
answer
76
views
Linked list insertion not working for 0th index [duplicate]
I have wrote a c program for linked list, and a function to insert a node at an index.
When calling the function for index 0, The head pointer doesn't seem to be updating in the main function even ...
0
votes
0
answers
72
views
upload million rows in postgresql (nodejs) hosted in GCP
We are trying to create an app in GCP using postgresql as backend and nodejs/angular for application side . As part of our requirement we need to be able to upload files of around 1 million records ...
1
vote
1
answer
248
views
How to repeat last substitution of Insert Mode in VIM?
Consider I changed a word to "Next" (cwNextESC). After this I do, say, change till semi-colon (cf;). At this point, I want the previous substitution (Next) to be inserted here. Is this a way ...
0
votes
1
answer
56
views
Insert latest 3 records from a huge table(40 million records) which has data from different years
I have data like below.. This is just a sample data gear wise but having more than 10 million records a year which we can insert into another table from this below table at a shot
Id name date
--------...
-1
votes
1
answer
197
views
Getting correct output match from insertion code
I am having trouble getting the test case strings in iter_position_reverse to pass. I am not sure what I have to change in order to fix this
This is the iterrative_insertion code:
def ...
-1
votes
1
answer
91
views
AttributeError: 'LinkedList' object has no attribute 'insert_head'
I tried to insert elements in head in a single linkedlist
I don't understand what is wrong with my code. it says:
AttributeError: 'LinkedList' object has no attribute 'insert_head'
Here is my code:
...
0
votes
2
answers
224
views
Insertion in Array
I am writing a code to insert an element in an array. The expected output is that the element gets inserted in the input index by shifting the elements on the right side.
I am trying to print the ...
0
votes
1
answer
76
views
Adding Rows to Pandas Dataframe where for all values below the max value of a Column [duplicate]
Let's consider the dataframe below -
df = pd.DataFrame({"names": ["foo", "boo", "coo","coo"],"time": [1,4,2,3],"values": [20,10,...
0
votes
1
answer
53
views
Tracking user's insertion mark within two different texts simultaneously, excluding certain signs
My problem is a logical one rather than one pertaining to code directly. I'm having problems planning out what should happen exactly step by step. (I'm writing a program to create palindromic pairs of ...
0
votes
0
answers
71
views
Trying to Insert data into DB with IF statement and foreach loop
This insertion code is for assigning "Subjects to the Class". My controller is ok, web.php is ok, and I have cross-checked my model and database table. But I don't know why this code is not ...
-1
votes
1
answer
51
views
According to my teacher the outer for loop repeats once in this algorithm . why?
This is the pseudocode for insertion sort. According to my teacher the for loop repeats once. Can someone explain why?
for i<-2,n do
aux<-v [i]
j<-i-1
while aux<v [j] AND j&...
-1
votes
1
answer
20
views
why i have to pass newBst.root as argument to implement the preorder traversal method?
i am facing problem while implementing the preorder traversal , if i use newBst.root then it gives me expected output but while i donot use it then the output donot show expected result it throughs an ...
0
votes
0
answers
89
views
Can't get insertion sort from 'The introdaction to algorithms 2nd edition'
INSERTION-SORT(A)
1 for j <- 2 to length[A]
2 do key <- A[j]
3 //Insert A[j] into the sorted sequence A[1 □ j - 1].
4 i <- j - 1
5 while i > 0 and A[i] &...
0
votes
2
answers
129
views
why loop is not iterating intended number of times?
printf("Enter position : ");
scanf("%d", &pos);
printf("Enter element : ");
scanf("%d", &element);
for ( i = 4; i >= (pos-1); i--)
...
0
votes
0
answers
116
views
Move semantics performance test
I wrote this code to test the performance of move constructor, comparing to STL vector. Created 2 classes LargeType uses the vector container from the Standard Template Library (STL). On the other ...
0
votes
2
answers
47
views
How to solve this issue in pl/sql
How to create a trigger which interdicts insertion of symbols and space in a certain column and after insertion just to have only the upper letters
for example:
insert into tale xxx values '"&...
0
votes
2
answers
65
views
Problems inserting element at the tail of a list JAVA
My assignment is implementing a linkedList as a queue. I'm having a problem adding elements at the tail of the list. I get no Exception but the problem is that when adding a element, the list still is ...
-2
votes
1
answer
43
views
A recursive insertion method with a logic error
I wrote a recursive insertion method that inserts a number in a list of ascending numbers and reserves the list order. It's simple and it works, the problem is that it doesn't return the right list ...
0
votes
0
answers
297
views
Inserting date format in phpmyadmin
When I try to insert a row in a table in phpmyadmin, that has a date column with the format 'yyyy-mm-dd', it will show up like this:'0000-00-00'. What should I do?
First, I wanted to change the date ...
0
votes
1
answer
120
views
I am trying to write a code for AVL insertion
I am aware that there are certain methods to create an AVL tree online. However, I am trying to do it with a different method. The problem that I am facing is that I can not spot where does it goes ...
0
votes
0
answers
109
views
Splay Tree insertion time efficiency with different input cases
So I used the same splaytree used in geeksforgeeks and did some experiment with it:
code: https://www.geeksforgeeks.org/insertion-in-splay-tree/?ref=rp
vers.1
#include <ctime>
// the ...
-1
votes
1
answer
150
views
how to add a new field with a given condition in mongo db?
I wanted to insert a new field to all the documents in my collection named 'students' where the age is >19..but I am getting an error.
I run the following command:-
my_db> db.students.updateMany(...
0
votes
0
answers
28
views
write a program that calculates the number of comparisons in binary insertion sorting?
I would like to know how I can write a program to calculate the number of comparison in binary insertion sorting
I tried to code the binary insertion program below, but I would like to know how I can ...
-1
votes
1
answer
189
views
how to insert into the list at the next odd index position
I have written the python code below to create a database:
list = ["a","b","c","d","e"]
while(True):
print("1/insert")
print("2/...
0
votes
1
answer
677
views
How to insert data into a binary tree in level order?
As the title suggests, I am currently trying to construct a binary tree wherein user inputs are inserted in in-level order. Almost all of the tutorials and implementations in Java that I've read uses ...
0
votes
1
answer
82
views
When should I decrement a variable inside of a bracket and when should I do it outside?
I was implementing a version of insertion sort when I noticed my function did not work properly if implemented the following way. This version is supposed to sort the elements as they are copied into ...
0
votes
1
answer
150
views
inserting node at the beginning of a circular linked list using void function
I m trying to insert a node at the beginning of a circular linked list using a void function.
When i pass pointer to pointer head in the function because i have to change the head itself, it is ...
-1
votes
1
answer
475
views
Can't insert a node at the beginning of a linked list using a void function
I m trying to insert a newNode at the beginning of a linked list in C language. I have tried other methods such as returing the newNode from the insertAtBeginnning function and then setting the head ...
0
votes
0
answers
27
views
Java LinkedList speed advantage [duplicate]
Was trying to figure out the real speed advantage of LinkedList in different cases. As it is said in the lecture - LinkedList is way faster while adding new item in the beginning/middle.
But my ...
-1
votes
1
answer
41
views
I am trying to insert value in linked list but in output it is showing only first insertion
In this I am trying to insert values in empty linked list initially and then adding element after that .
function insert is inserting element in linked list .
display function is displaying linked ...
2
votes
0
answers
53
views
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 ...
0
votes
0
answers
27
views
How to write a program to delete an element in an array using C language? [duplicate]
I have written a C program to delete an element an element in an array.The element get deleted as per the output of the program. The problem is that the next element near to the deleted element get ...
0
votes
2
answers
203
views
Incrementing and decrementing index in insertion sort
In the code below, I am not sure what the i -= 1 is doing. I know it's decrementing the index by 1 each time it runs through the for loop but exactly how is that helping to sort?
def insertionSort(ls):...
0
votes
0
answers
490
views
Inserting into Remote Db via Dblink
I'm trying to insert into remote DB via this query
The query works fine When I only select these columns but when I'm trying to insert with a 30-day interval condition it shows that an error in syntax
...
-2
votes
1
answer
346
views
OpenCv showing error while resizing written image
def face_cropped(img):
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces = face_classifier.detectMultiScale(gray,1.3,5)
#scaling factor = 1.3
...
2
votes
2
answers
189
views
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 ...
0
votes
1
answer
180
views
Why is the variable value not getting updated when changed inside void function? [duplicate]
In this array insertion code, the value of usedsize does not get updated when I increment it inside the void insert function. I want to know why that keeps happening and why the value of arr[i] gets ...
0
votes
1
answer
319
views
Unexpected null value after adding node to the end of linked list
This is the code to insert a node at the end of a LinkedList. I have first created a head node. Then enter the values in list. After this, I created an end node and tried to linked it with the last ...
-3
votes
2
answers
247
views
Linked List insertion using for loop in separate function
I am learning how to program in C++, and have looked at linked lists. I have found many code snippets to get me started.
The code I am playing with is from studytonight. I understand how to insert ...
0
votes
0
answers
154
views
The key in my B-Tree is not sorted, what's wrong?
I have implemented my B-Tree starting to this struct:
#include <stdbool.h> //(bool).
#include <stdio.h>
#include <stdlib.h> //( rand, srand).
#include <string.h> // (strcmp)
...
1
vote
1
answer
2k
views
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 ...
-4
votes
1
answer
114
views
Incrementing at j even though it doesn't meet the condition [closed]
public class sorting {
public static void sort(int arr[]) {
int n = arr.length;
int count = 0;
int tempArr [] = arr.clone();
// One by one move boundary of ...
1
vote
1
answer
2k
views
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 ...
1
vote
2
answers
166
views
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 ...
0
votes
0
answers
100
views
How to Retrieve value generated by javascript in php for insertion in database
<div class='col'>
<h5 class='text-right' id='gtotal'>
</h5>
</div>
<script>
var gt=0;
var iprice=document.getElementsByClassName('iprice');
var ...