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
30
votes
9 answers

Appending string to Matlab array

How do I append a string to a Matlab array column wise? Here is a small code snippet of what I am trying to do: for_loop filename = 'string'; name=[name; filename] end
Name
  • 303
  • 1
  • 3
  • 4
30
votes
6 answers

Nesting 'WITH' statements in Python

It turns out that "with" is a funny word to search for on the internet. Does anyone knows what the deal is with nesting with statements in python? I've been tracking down a very slippery bug in a script I've been writing and I suspect that it's…
Zefira
  • 4,329
  • 3
  • 25
  • 31
30
votes
5 answers

Handle click event for appended elements in jQuery

I have generated few elements in my page using following method. For example, $("#button"+caption).click(function(){ var firstDisplay = '
30
votes
3 answers

Appending a new line in a file(log file) in c++

I have a logging functionality and in this I have got log files. Now every time I run the program I want that previously written file should not get deleted and should be appended with the current data (what ever is there in the log file) Just to…
gandhigcpp
  • 587
  • 3
  • 8
  • 16
29
votes
4 answers

Adding elements to python generators

Is it possible to append elements to a python generator? I'm currently trying to get all images from a set of disorganized folders and write them to a new directory. To get the files, I'm using os.walk() which returns a list of image files in a…
Francisco
  • 375
  • 2
  • 5
  • 9
29
votes
6 answers

How can I find same values in a list and group together a new list?

From this list: N = [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5] I'm trying to create: L = [[1],[2,2],[3,3,3],[4,4,4,4],[5,5,5,5,5]] Any value which is found to be the same is grouped into it's own sublist. Here is my attempt so far, I'm thinking I should use…
Siii
  • 483
  • 1
  • 5
  • 10
29
votes
2 answers

How do I append lists in Prolog?

How do I append lists in Prolog? I've searched on the Internet and I found this (from http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_7.html) append([X|Y],Z,[X|W]) :- append(Y,Z,W). append([],X,X). So it gets the Z by removing the…
Zik
  • 1,556
  • 7
  • 22
  • 31
28
votes
3 answers

Using didSet and private(set) on Swift Array

I'm working on a swift project and I have a couple of arrays. In one of my arrays, I do not want the client to be able to mutate it without using one of my specially-defined methods. On the other hand, I want the getter to be accessible. My…
raoul
  • 463
  • 1
  • 6
  • 10
27
votes
10 answers

Append a param onto the current URL

I'd like to have a little easter egg button in the corner of a project site. When clicked, it just drops a string onto the current url and reloads the page. So if I'm on: http://test.com/projects/view/134 The button is clicked Page reload…
Fuego DeBassi
  • 2,967
  • 6
  • 29
  • 37
27
votes
3 answers

Append NSString to NSURL?

I have an NSURL, a file path, and I want to add an NSString to the end of it (the file name) how can I do this? But after this is don't I want the entire thing to be an NSURL. Thanks.
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
27
votes
2 answers

Does Jquery append() behave asynchronously?

I've seen a number of posts (append supposedly immediate) with conflicting accepted answers on this. We're using JQuery 1.4 (http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js) and append() seems to be asynchronous, such…
RSG
  • 7,013
  • 6
  • 36
  • 51
27
votes
3 answers

Append and Slide together jQuery

I have this append method which I made to add more input boxes until there is 10 of them which will disable into making more. i = 0; $('#add-link').click(function() { if(i < 9) { $('.insert-links').append('
27
votes
4 answers

What is a DList?

I tried googling for this but all I got were stories about minor celebrities. Given the lack of documentation, what is a DList?
oxbow_lakes
  • 133,303
  • 56
  • 317
  • 449
27
votes
9 answers

Append before last child

I have a div with the ID wrapper, and I am using .append() to insert some content at the end of that div, like this: $("#wrapper").append('
Some stuff
'); However, I also want the option to…
Boxiom
  • 2,245
  • 6
  • 40
  • 51
27
votes
4 answers

How merge two objects array in angularjs?

I want to append following object array with existing one in angulajs for implementing load more feature. ie,appending AJAX response with existing one each time. I have one variable, $scope.actions which contains following JSON data, { …
Muhammed Shihab
  • 319
  • 1
  • 4
  • 6