Questions tagged as 'slice'

3
answers

Lists within lists: even slicing, there is connection between lists

I am studying lists and behavior occurs that I do not understand. I know that when I link one list to another, a connection between them is created. And that when I use slicing a list, I create a copy of the list (no connection between them,...
asked by 04.11.2018 / 23:19
1
answer

Slag capacity in Golang

A slice can vary with need, and you can add items to it, right? You can view the size and its capacity ( len and cap , respectively). On the tour by Go, there is a "lesson" from append , it first creates a slice null and...
asked by 12.12.2017 / 20:49
2
answers

How to remove the position of an array with jquery

I'm trying to remove a position from the array with slice, from what I saw until I can only get the position of this array, how would I get value? Because the position of the array changes a lot in each situation, I'm trying this way: if($j('#...
asked by 30.01.2018 / 13:18
1
answer

I always want to delete the first index with each click of a button. How do I do?

Given what I've tried: <html> <body> <script> var nome = ['1', '2', '3', '4', '5', '6', '7', '8', '9']; var remover = nome.slice(0); function shuffle(array) { return (Math.round(Math.random()) - 1);...
asked by 18.03.2017 / 16:50
1
answer

How to Clone Array

I'm wandering about a means of getting all elements of the array in question back, all over again. See this my source code below: Code <html> <body> <button onclick="next()">APAGAR</button> </body...
asked by 18.03.2017 / 20:32
2
answers

Separate data from a txt file

I have a relatively large data file, which I removed from a point marking machine, however it comes as follows: 00003000527005792012635570932000219305130720170713 00003000527005792012635570932000219305130720170713 I would like to separate t...
asked by 12.01.2018 / 13:31
0
answers

Slice () Jquery + loop php ("load more comments")

I have the following problem, I have created a method to load more content or the famous Load More . I used slice() in jquery with loadcomentid to make the application, however when I put a query in the php bank inside the slice s...
asked by 02.01.2019 / 17:49