Data dodania Pytanie
2017-06-19 15:06 Laravel 5.4 Saving an array of input to a belongsto model »
<input type="text" name="subcat[0]"> <input type="text" name="subcat[1]"> <input type="text" name="subcat[2]"> <input ...
(2) odpowiedzi
2017-06-19 13:06 Reduce not removing correct array item »
Edit 1 Shortened the code to removeContentNew(i) { var contents = this.state.templateContent; contents.splice(i, 1); this.setState({ t...
(2) odpowiedzi
2017-06-19 07:06 What is the C++ equivalent of Python's "in" operator? »
What is the C++ way of checking if an element is contained in an array/list, similar to what the in operator does in Python? if x in arr: print "...
(6) odpowiedzi
2017-06-18 18:06 Iterating over array to use data-attribute to style elements, but only getting last value in the array »
Objective I'm trying to style a series of divs .table__color where the width of the div is equal to the value of a data-attribute from an array of ....
(1) odpowiedzi
2017-06-18 03:06 Breakdown function map and reduce -JS »
I am dealing with a function here: function transformEmployeeData(array) { return array.map(function(data) { return data.reduce(function(a, b) ...
(1) odpowiedzi
2017-06-18 01:06 Checking whether an Array[A] is sorted? »
While working through a problem found in 'Functional Programming in Scala': Implement isSorted, which checks whether an Array[A] is sorted accordi...
(1) odpowiedzi
2017-06-17 22:06 Javascript Nested Array Return Even Numbers »
I am trying to write a function that prints only the even numbers from a nested array. Here is my attempt and it keeps returning "undefined". functi...
(4) odpowiedzi
2017-06-16 13:06 Malloc vs New for Primitives »
I understand the benefits of using new against malloc in C++. But for specific cases such as primitive data types (non array) - int, float etc, is it ...
(4) odpowiedzi
2017-06-16 02:06 How best to manage an array of optionals in Swift? »
I'm looking to manage an array of optionals and to achieve the following behavior: Initialize with nil to some constant size (going to use generic ty...
(1) odpowiedzi
2017-06-15 23:06 JSON Element order Validation in POSTMAN payload »
With POSTMAN, I'm getting a JSON payload return. I need to verify that the first time PoiId is returned that the value is 1234 and the 2nd instance o...
(1) odpowiedzi
2017-06-15 16:06 How to get the sum of two elements in a list of Arrays in Scala »
Hello and thanks in advance for taking the time reading this. I am writing a piece of code in Scala to read a data file, and produce a couple of aggr...
(2) odpowiedzi
2017-06-15 16:06 How to show keys instead values of an associative array on Laravel »
I´m new on Laravel and I´m trying to display on a select the keys instead the values of an associative array... Could you help me? The array I´m ...
(4) odpowiedzi
2017-06-15 09:06 Search multiple array value and count the search result »
I have a bunch of array data from $search and $data variable like this: $data = array( array(1, 2, 3), array(1, 2, 3, 4, 7, 13) ); $search =...
(3) odpowiedzi
2017-06-14 14:06 Python - easy way to "comparison" map one array to another »
I have an array a = [1, 2, 3, 4, 5, 6] and b = [1, 3, 5] and I'd like to map a such that for every element in a that's between an element in b it will...
(2) odpowiedzi
2017-06-14 08:06 multidimensional array store each list array inside another array »
I have nested multidimensional arrays that may be 2 or 3 levels deep. Inside it I may or may not have list arrray. I need to loop over the array: Arr...
(2) odpowiedzi
2017-06-14 01:06 ordering a "window" of a multidimensional array »
I'm new to R and this is my first question (apologies if the question is posed wrongly). I would like to change the order of the rows accordingly to...
(1) odpowiedzi
2017-06-13 17:06 Adding Hashes from an array »
I am trying to create an array/hash from an array of multiple hashes with same keys and an average of values. My array: [{:amount=>897500, :gross_...
(4) odpowiedzi
2017-06-13 12:06 Add Dictionaries Keys Values to Array [JavaScript] »
Here is a sample of my data structure in JavaScript: var list = [{"username":"admin1"}, {"username":"admin2"}, {"username":"admin3"}, {"username":"a...
(2) odpowiedzi
2017-06-13 11:06 Sinatra: Array from JSON into HTML table »
I am new to coding. I work on a project where I get the details from JSON, so created arrays. I want to put the details into an HTML table. Arrays a...
(1) odpowiedzi
2017-06-13 00:06 Swift: Labels not showing up »
I am trying to make labels defined by an array in Swift but when I try to do this and I run the app, they just don't show up. My code for the view con...
(1) odpowiedzi
2017-06-12 17:06 Why is processing an array for the second time slower? »
This simple C code first creates an array of 0xFFFFFF elements and then passes it two times, measuring how much time each pass takes: #include <ct...
(1) odpowiedzi
2017-06-12 15:06 create time steps array in ruby on rails in 30 or 60 minute increments »
I am creating a simple appointment keeper in Rails 4, and I need to create an array of times for the user to choose between a min/max. The user can a...
(1) odpowiedzi
2017-06-12 11:06 Join 2 echoes and separate with coma - implode, array »
I've got 2 variables. First is coming from the taxonomy and outputs the taxonomy term and the second outputs the custom field: $address_city = get_c...
(1) odpowiedzi
2017-06-12 04:06 Rails 5 form for submitting array passed as string »
I have a serialized Array field in my model called :cords, and part of my form looks like so: <%= form_for @group do |f| %> .... <p&...
(1) odpowiedzi
2017-06-11 20:06 Why is Arrays.copyOf 2 times faster than System.arraycopy for small arrays? »
I was recently playing with some benchmarks and found very interesting results that I can't explain right now. Here is the benchmark: @BenchmarkMode(...
(1) odpowiedzi
2017-06-11 19:06 Does using std::get on std::array give better performance? »
The Standard Library class template std::array<T, N> has both a member accessor function constexpr const T& operator[]( size_type n ) const...
(2) odpowiedzi
2017-06-11 19:06 Laravel Validate Array of Inputs »
I have a form: <input type="text" name="name[1]"> <input type="text" name="name[2]"> <input type="text" name="name[3]"> <input t...
(1) odpowiedzi
2017-06-11 16:06 Swift 4 Cannot invoke 'index' with an argument list of type »
I have a problem with calling the array method index(of:). MyClass inherits from UIViewController and conforms to the MyDelegate protocol. //self.vie...
(1) odpowiedzi
2017-06-11 03:06 Low performance in non-sequential iteration over int Array in JAVA »
I have the following function: public void scanText(char[] T){ int q=0; for(int i=0;i<T.length;i++){ q = transFunc[preCompRow[q]+T...
(1) odpowiedzi
2017-06-10 22:06 Loop through array, assign each value to an element attribute in Javascript / Jquery »
I have an array: 'imageIds': imageIds = ["778", "779", "780", "781", "782"]; I want to find all elements of class .preview-image on the page, of w...
(3) odpowiedzi
2017-06-10 20:06 How to remove duplicate in array »
i want to show bandwith usage permonth, and there are 2 users who both logged in on june here is my code : <?php foreach ($data as $row): ...
(1) odpowiedzi
2017-06-10 19:06 Array has length on Chrome Console but not when .length is called »
I've encountered a somewhat weird behavior. I have an object array that returns a length of 0. However, if I log the array in the console the length m...
(3) odpowiedzi
2017-06-10 18:06 Responsive img in a jquery array »
I found an image array created with jquery. I'm trying to get the imgs in the array to be responsive. The ultimate goal is to have them play nice with...
(1) odpowiedzi
2017-06-10 14:06 ng-repeat a quantity inside array »
I have an array called $scope.ticket_array: $scope.ticket_array = [{"type":"men junior", "quantity":"3"}]; How can I use ng-repeat to repeat 3 time...
(1) odpowiedzi
2017-06-10 11:06 Array data issue Laravel »
I have an array issue in here and I'm spending a lot of time with. I get a list of array like this form array:4 [ 0 => array:20 [▼ "id" =>...
(2) odpowiedzi