503 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
105
views
List-like data structure to prepend in O(1) faster than deque
I'm looking for a Deque like data structure, but it's only responsible for prepending to the start in O(1) time. Since it wouldn't need to append to the end, it would simplify the responsibilities ...
4
votes
7
answers
161
views
Conditionally add characters to beginning of every line in a file
I am attempting to create a bash script that prepends characters to the start of all lines in a markdown file which do not begin with a '#' character.
For example, say we have example.md:
# Title
...
0
votes
1
answer
126
views
Prepend Text in Crispy Forms - Django
I have a form that works generally as expected, but I am trying to prepend some text on one of the fields to make it more user-friendly. In this case, all entries in the "RFP Control Number" ...
1
vote
0
answers
73
views
Select2: "Cannot read properties of undefined" when prepending/unshifting data on scroll up
I'm using Select2 and trying to implement a feature where new data is prepended or unshifted to the dropdown options when the user scrolls up. However, I'm encountering the errors "Cannot read ...
0
votes
0
answers
101
views
Is there a way to know which .user.ini files have been loaded for the currently running php script?
Since the .user.ini per directory php ini files can be used to set the auto_append_file setting, thus prepending each and every php script in the folder with another script, I wanted to know if and ...
0
votes
2
answers
86
views
Prepend string before each character of another string
I have the following code:
$target = "abcwa";
for($w = 0; $w <=strlen($target)-1; $w++)
{
$str = str_split($target[$w],1); //a
$str_ = $str[$w];
echo "w:";$w;...
0
votes
0
answers
56
views
Powershell Prepend Header File to Huge Non-csv Data File Without Creating 3rd File
I have a 2GB pipe-delimited data file. I would like to use PowerShell to prepend a header to the file without creating a third file. Looking at this link, I would like to change
Get-Content inputFile1....
1
vote
1
answer
189
views
Is there a efficient way to prepend a list from items from another list?
Given two list, the goal is to append the items from the 2nd list to the 1st and return the matrix of lists, e.g.
x = [1, 2, 3, 4, 5]
y = [123, 456] # m no. of items
def func(x, y):
return [[i] + ...
0
votes
1
answer
592
views
Go | efficient and readable way to append a slice and send to variadic function
Let's say I have the following pipeline of functions:
func func3(opts ...FunctionObject) {
for _, opt := range opts {
opt()
}
}
func func2(opts ...FunctionObject) {
var functions []...
3
votes
3
answers
149
views
Back-reference when preprend using sed linux command
I'm trying to prepend the first character of "monkey" using this command:
echo monkey | sed -E '/(.)onkey/i 1円'
But when I use it like this, the output shows
1
monkey
I actually hope to ...
1
vote
0
answers
2k
views
Prepend and append slides with swiper.js
I'm trying to set up a swiper slider with a collection of images and then I need to prepend and append three videos at the beginning and three at the end.
I've checked my code a few times, rewrote ...
0
votes
1
answer
232
views
How to use insertBefore and appendChild with a jQuery AJAX server side rendered html result
I basically need to use insertBefore and appendChild with a Server Side rendered HTML page jQuery AJAX result. I get the error: "Failed to execute 'inserBefore' on 'Node': parameter 1 is not of ...
0
votes
0
answers
69
views
Why prepend does trigger once in a loop?
I'm not very good at Javascript, I am trying to make an auto collapsing on overflow menu using Vanilla Js.
I'm happy with what I've managed to do so far. But I have a problem with ```appendChild``` / ...
-2
votes
2
answers
1k
views
Using Javascript Template Literals With The prepend() Method
I have a loop of button elements that are outputted with a while loop from data called from a MySQL database via PHP.
A user can add a button to this list and I want to add the new button and it's ...
1
vote
1
answer
34
views
jQuery prepend() stringifies argument
I have the following code:
sections=$("section");
for(let i=0; i<sections.length; i++){
let sectionTempCode=("<button id='").concat(i.toString()).concat("'>Toggle ...