Questions tagged [append]

To append is to join or add on to the end of something.

Append is an operation usually defined on 1D data structures (e.g., , , , , etc.).
The append operation adds an element to the end of the data structure, consequently, increasing its size by one.

11138 questions
24
votes
5 answers

How can I store HashMap> inside a list?

My hashmap stores the string as key and arraylist as the values. Now, I need to embed this into a list. That is, it will be of the following form: List>> These are the declarations I have used: Map
user2376600
  • 245
  • 1
  • 3
  • 10
24
votes
5 answers

Append a space with jQuery

I'm trying to append a space using jQuery. Neither of these samples work: $("#mySelector").append($(" ")); $("#mySelector").append($(" ")); Any ideas?
Joel Harris
  • 1,966
  • 3
  • 20
  • 32
23
votes
5 answers

Repeatedly appending to a large list (Python 2.6.6)

I have a project where I am reading in ASCII values from a microcontroller through a serial port (looks like this : AA FF BA 11 43 CF etc) The input is coming in quickly (38 two character sets / second). I'm taking this input and appending it to a…
Michael
  • 233
  • 1
  • 2
  • 4
23
votes
4 answers

How to append to a text field in t-sql SQL Server 2005

What is the best way to append to a text field using t-sql in Sql Server 2005? With a varchar I would do this. update tablename set fieldname = fieldname + 'appended string' But this doesn't work with a text field.
Paul D. Eden
  • 19,939
  • 18
  • 59
  • 63
23
votes
6 answers

Is it possible to append an element to a JavaScript nodeList?

I'm generating content dynamically, so I'm often ending up with documentFragments which I'm querying using querySelectorAll or querySelector returning a nodeList of elements inside my documentFragment. From time to time I would like to add an item…
frequent
  • 27,643
  • 59
  • 181
  • 333
23
votes
4 answers

How to concatenate PHP variable name?

I have a PHP for loop: for ($counter=0,$counter<=67,$counter++){ echo $counter; $check="some value"; } What I am trying to achieve is use the for loop variable and append it to the name of another variable. Bascially, I want the PHP output to be…
Smudger
  • 10,451
  • 29
  • 104
  • 179
22
votes
3 answers

Append element after another element using lxml

I have the following HTML markup
something goes here

some contents

To fix some CSS issue, I want to append a div tag
Tu Hoang
  • 4,622
  • 13
  • 35
  • 48
22
votes
3 answers

Why does foo.append(bar) affect all elements in a list of lists?

I create a list of lists and want to append items to the individual lists, but when I try to append to one of the lists (a[0].append(2)), the item gets added to all lists. a = [] b =…
litturt
  • 393
  • 3
  • 8
22
votes
3 answers

Android append text file

I am tring to record the wake time and sleep time from a dialog picker to a text file like this, but the call to the method commitToFile2 doesn't append the text file "savedData.txt." I know this code is very very dirty. I'm new to Java so any…
dell116
  • 5,835
  • 9
  • 52
  • 70
22
votes
3 answers

How can I do an atomic write/append in C#, or how do I get files opened with the FILE_APPEND_DATA flag?

Under most Unixes and Posix conforming operating systems performing an open() operating system call with the O_APPEND indicates to the OS that writes are to be atomic append and write operations. With this behavior,for local filesystems when you do…
Cameron
  • 2,903
  • 1
  • 30
  • 31
22
votes
1 answer

How to use the function numpy.append

I have a problem using the function numpy.append. I wrote the following function as part of a larger piece of code, however, my error is reproduced in the folowing: data = [ [ '3.5', '3', '0', '0', '15', '6', '441',…
mm_
  • 1,566
  • 2
  • 18
  • 37
21
votes
3 answers

how to append an element between two elements

I have a List
  • list item One
  • list item two
  • list item three
  • list item four
  • list item…
A. Rehman Javed
  • 309
  • 2
  • 4
  • 10
21
votes
4 answers

jQuery: appendTo parent

I can't seem to get the appendTo to work. What do I do wrong? $('div:nth-child(2n) img').appendTo(parent); Current markup:

Hey

curly_brackets
  • 5,491
  • 15
  • 58
  • 102
21
votes
3 answers

Can somebody give a snippet of "append if not exists" method in swift array?

Because I use this routine a lot, can somebody create an extension method of Swift array which will detect whether if the data that is going to be appended already exists, then it's not appended? I know that it's only a matter of few code like…
Chen Li Yong
  • 5,459
  • 8
  • 58
  • 124
21
votes
4 answers

android append '...' at the end textview

I have a View to that I need to add some text. The used View is:
Labeeb Panampullan
  • 34,521
  • 28
  • 94
  • 112