Data dodania Pytanie
2017-01-09 16:01 Angular Array of objects, when splicing by index it always removes last element »
I have some controllers like this: app.controller("zipController", function($scope, $http, $rootScope, $timeout) { $scope.zipCodes = []; $scope.a...
(3) odpowiedzi
2017-01-09 01:01 Ruby -- Adding the values of sub arrays in an array by their key »
So I know how to add all the values in an array. Example, the sum of [1,2,3,4]... [1,2,3,4].inject(&:+) #=> 10 However, I have an array o...
(4) odpowiedzi
2017-01-08 22:01 Check whether array is in another array, but in order and elements can repeat »
So I need to check whether an array contains elements of another array but in the same order. Both arrays are sorted and the elements can be duplicate...
(3) odpowiedzi
2017-01-08 20:01 How do I query posts and use the 'orderby' attribute to order posts in loop according to date 'meta_value'? »
I am creating a website for a theatre company, and I am creating an index of all past, current, and future productions. I would like the index to 'ord...
(1) odpowiedzi
2017-01-08 15:01 How to create a Set from Array and remove original items in JavaScript »
I have an Array with duplicate values. I want to create a Set to get the distinct values of that array and remove or create a new Array that will hav...
(6) odpowiedzi
2017-01-07 14:01 Rails Form Check Box or select Array value for multiple arrays »
I'm maintaining a Rails 3.2.22.5 legacy app and creating a form to send messages internally to users (in this case they are called medics). Here is w...
(1) odpowiedzi
2017-01-07 13:01 Faster way to see if a huge list of strings is contained within another string »
I have a list of around 300k common words stored in an array. So, 1 element of the array = 1 word. On the other side, I have a huge list of strings t...
(3) odpowiedzi
2017-01-07 11:01 An efficient way to convert List<Integer> to int[] ( array ) without iteration »
public static int[] convertListToArray(List<Integer> listResult) { int[] result = new int[listResult.size()]; int i= 0; ...
(2) odpowiedzi
2017-01-07 09:01 Sort an array of integers into odd, then even »
I have a problem I found on an algorithm forum elsewhere. I have an array with random numbers (for example, [5, 2, 7, 9, 2, 3, 8, 4]) which should be...
(10) odpowiedzi
2017-01-07 08:01 Find duplicate Numbers repeated more than once C# »
How do we find duplicates number in int array repeated more than two times. One of the example I have is as below public static void main() { ...
(5) odpowiedzi
2017-01-07 07:01 Two dimensional array in Twig »
I have satellite images stored in a mysql database. The table has attributes latitude,longitude. I want to send them to the twig and display as a map,...
(1) odpowiedzi
2017-01-07 07:01 Append to array in [String: Any] dictionary structure »
Assembling a data payload passed to GRMustache.swift for rendering mustache templates, I'm in a scenario where I need to append data to an array previ...
(3) odpowiedzi
2017-01-06 23:01 Python: Find largest array index along a specific dimension which is greater than a threshold »
Lets say I have a 4-D numpy array (ex: np.rand((x,y,z,t))) of data with dimensions corresponding to X,Y,Z, and time. For each X and Y point, and at e...
(2) odpowiedzi
2017-01-06 14:01 Normalize missing value inside an array of objects with nodejs »
I have this data scenario: var data = [ { 'name': 'social-button', 'group': null }, { 'name': 'social-button', 'group': null }, { 'name'...
(3) odpowiedzi
2017-01-06 10:01 can't access object laravel 5.3 »
I am using laravle 5.3 mailables for sending emails.I want to pass data to view via with method. I have create a mailable MytestMail.php <?php n...
(2) odpowiedzi
2017-01-05 16:01 How to join array of optional integers to string? »
Given [Int?], need to build string from it. This code snippet works let optionalInt1: Int? = 1 let optionalInt2: Int? = nil let unwrapp...
(5) odpowiedzi
2017-01-05 16:01 How to split a Ruby array into subarrays of unequal size using a delimiter »
I have the following array: arr = [0, 1, 1, 2, 3, 1, 0, 0, 1] Without changing the order of the values, I need to subdivide arr into smaller arrays...
(2) odpowiedzi
2017-01-05 11:01 PostgreSQL json(b) - Convert string to array & update field »
I have a jsonb field in PostgreSQL with the following content: { "object": { "urls": "A;B;C" } } What I want to do is update the value of urls insid...
(1) odpowiedzi
2017-01-05 07:01 remove duplicates values from array »
I have an array which looks like- Array ( [0] => stdClass Object ( [post_date] => 2017-01-04 14:28:00 ) [1] => st...
(1) odpowiedzi
2017-01-04 23:01 Getting and displaying all files in a folder as links on the home page of my sinatra app »
I'm making a wiki in Sinatra and I have the following code, which works, it just strikes me as a little bit clunky. I'm trying to get all the wiki ent...
(1) odpowiedzi
2017-01-04 20:01 Manually change order of a JavaScript array »
I am looking for a JavaScript/Jquery solution is re-ordering an array based on manual changes. I have an existing array consisting of different group...
(0) odpowiedzi
2017-01-04 02:01 AngularJS checkbox not working properly »
I am creating a simple angularJs application for my own learning purpose. I have attached the code snippets below. I have two JSON data. One represe...
(1) odpowiedzi
2017-01-04 00:01 Add elements of two arrays in Swift without appending together »
Is there a neat way to add two arrays in Swift: IE I would like let arrayA: [Float] = [1,2,3,4] let arrayB: [Float] = [10,20,30,40] let arrayResult...
(1) odpowiedzi
2017-01-03 23:01 I can't get my code to print »
Hi im currently working on an exercise for School, but I can't get my program to print the lines I want... .data taman: .asciiz "\n Quantos nu...
(0) odpowiedzi
2017-01-03 01:01 ReactJs: target.key undefined after method is reached from li rendered by map function »
I'm currently trying to coding a react app that would do the following: - Create a list of questions from an array using a map function. - Making each...
(1) odpowiedzi
2017-01-02 23:01 Using ng-repeat to loop through an array that is formatted like a string »
I have recently started adding Angular to an old app I made. Part of the app stores a json encoded array in a single cell in a mySql table. I know thi...
(3) odpowiedzi
2017-01-02 18:01 How to efficiently store a two-dimensional array with different File types in a Django Model (PostgresSQL) »
I will like to store in a Django model the variations on the price of some houses for a date. For example: House.objects.create(name='house1', prices...
(0) odpowiedzi
2017-01-02 03:01 Node.js loop over array of objects asynchronously »
Sorry if the title itself is a contradiction :) JS beginner here.. I get an array of MongoDB documents and I want to extend each one with another obj...
(2) odpowiedzi
2017-01-01 20:01 Swift: Difference between addingObjects method vs append method »
I am currently learning Swift 3 for iOS development and I wanted to know what the difference is between the following method: if let myItemArray = it...
(2) odpowiedzi
2016-12-30 19:12 ColdFusion - Create multidimensional array dynamically »
I'm using CF 10. As a script is running, I am creating an array containing distinct values that represent a single vehicle. I'm initializing the arr...
(1) odpowiedzi
2016-12-29 08:12 Infinite length array in swift »
I noticed one thing in Haskell that it efficiently handle working with infinite length array with great ease. So being swift programmer, I am curious...
(3) odpowiedzi
2016-12-28 15:12 If an element already exists in an array, don't add it again »
I have an array of objects that looks like this: var array = [ {id:123, value:"value1", name:"Name1"}, {id:124, value:"value2", name:"Name1"}...
(8) odpowiedzi
2016-12-28 13:12 Can I have an array of objects with a custom toString in JavaScript? »
I've got an array of objects. (Use case might be solitaire cards). I want to embed a toString for debugging them. I'm using the following (simplif...
(1) odpowiedzi
2016-12-28 07:12 maintain sorting order of object after converting to array »
I am converting an object to array using var objRe =[ {"organization":"Educerus","project":"Educerus 2014","open_tickets":10}, {"organizatio...
(0) odpowiedzi
2016-12-27 21:12 Updating an item in an array passed by reference »
What's the easiest/right way to update an item in an array? I want the caller to have the updated array as well. So: static func updateItem(updatedIt...
(2) odpowiedzi