Data dodania Pytanie
2017-08-09 18:08 Need guidance to use .map,.group,.pluck, etc. to make multi series line chart in ruby on rails app »
I'm trying to display a multi series line chart using chartkick in a Ruby on Rails app. The chart should display paper_types and the weightfor each...
(2) odpowiedzi
2017-08-09 13:08 Ruby on Rails - Seeding big data (over 2.7M) record to production database »
In my application I have a City model. I have a sql file that contains all the cities in the world (its over 2.7M) & I need to seed all of them to...
(3) odpowiedzi
2017-08-09 11:08 How does let/var resolve mutability? »
I don't have any problem, i would just like some clarification on an issue regarding mutability. In Objective-C we would use for example NSMutableArr...
(2) odpowiedzi
2017-08-09 09:08 Merge objects of an array in PHP using Eloquent »
I have a collection of objects grabbed out of my DB using Laravel's Eloquent ORM ( I am not using Laravel just integrated Eloquent into my own Framewo...
(1) odpowiedzi
2017-08-08 16:08 Ruby array += vs push »
I have an array of arrays and want to append elements to the sub-arrays. += does what I want, but I'd like to understand why push does not. Behavior ...
(2) odpowiedzi
2017-08-08 16:08 Java int memory usage »
While I was thinking over the memory usage of various types, I started to become a bit confused of how Java utilizes memory for integers when passed t...
(7) odpowiedzi
2017-08-08 08:08 Split String to array and Sort Array »
I am trying to sort a string split by comma. But it is not behaving as expected var classes = "10,7,8,9"; Console.Write(string.Join(",", classes.Spli...
(6) odpowiedzi
2017-08-07 17:08 .net mvc send json with mixed types from controller »
So I have this JsonResult: [HttpPost] public JsonResult getJsonInvoicesClient(int id_client) { var a = db.invoices .Where(x => x.id_cl...
(1) odpowiedzi
2017-08-07 17:08 Can SBCL arrays have typed arrays as elements? »
Consider this simple example: (deftype image nil '(simple-array single-float (100))) Here we are defining a shorthand for a type that is an array t...
(2) odpowiedzi
2017-08-06 22:08 Sort array with priority »
I have an array, this array contains unsorted values. Ex. $Array_Raw=array('KEY_0'=>'550','KEY_1'=>'400','KEY_2'=>'800', ...
(1) odpowiedzi
2017-08-06 17:08 Reading structures with typed slots in SBCL »
Consider this simple code example: (defstruct test (:example nil :type (simple-array single-float))) (defparameter test-struct (make-test :examp...
(1) odpowiedzi
2017-08-06 11:08 php empty result for language table »
I am trying to add multiple language options with the database. I created a table as follows. And my PHP function is: public function Languag...
(3) odpowiedzi
2017-08-06 09:08 Why I am able to pass a bigger array into a smaller array in Java? »
This might be a silly question but does a Java array accept more than its size? If yes then why do we need ArrayList? I thought that arrays had a fixe...
(4) odpowiedzi
2017-08-06 00:08 Creating an array of all objects of a class »
Is there a way of creating an array of all colour objects created? So that every time a new colour is added, it is also automatically added to the arr...
(4) odpowiedzi
2017-08-05 22:08 How to create a common lisp (SBCL) vector of a particular type for usage in a usocket? »
I'm very new to Common Lisp and I am trying to learn how to program using network sockets. In the common lisp usocket api it specifies that the functi...
(1) odpowiedzi
2017-08-05 13:08 Quickly convert a very large number of lists of strings into ndarray »
My file looks as follows, where the first 3 numbers per line denote a triangle/triplet of things, and the 4th number is a marker for each triangle: 1...
(1) odpowiedzi
2017-08-05 05:08 getting CSRF token value in a chrome extension »
I'm new to chrome extensions and I'm making one that does a POST request to an api for a query. The API uses CSRF tokens in its header to protect the ...
(0) odpowiedzi
2017-08-04 09:08 How to print out calendar.month_name array in python? »
I have the following code: import calendar month=calendar.month_name print(month) I wish to have following output which is in array form or list...
(3) odpowiedzi
2017-08-03 12:08 How to convert returned array to dictionary with Swift 3 »
I'm using FB API to get the list of user's page likes. But i'm stuck with converting array (the array is the return data from FB API) to dictionary. ...
(1) odpowiedzi
2017-08-03 10:08 How to pass an array of primitives as varargs? »
I'm stuck trying to pass an array of primitives (in my case an int[]) to a method with varargs. Let's say: // prints: 1 2 System.out.println...
(2) odpowiedzi
2017-08-03 10:08 Numpy: Multiplying large arrays with dtype=int8 is SLOW »
Consider the following piece of code, which generates some (potentially) huge, multi-dimensional array and performs numpy.tensordot with it (whether w...
(0) odpowiedzi
2017-08-02 09:08 jquery ajax passing 2 arrays and then split them and use them separetely in laravel »
When i change the value of a dropdown list in a view, i pass it with an ajax call in a controller to return 2 arrays to change 2 other dropdown lists ...
(2) odpowiedzi
2017-08-02 07:08 How to check if words can be created from list of letters? »
I have a string $raw="aabbcdfghmnejaachto" and an array $word_array=array('cat','rat','goat','total','egg'). My program needs to check whether it is...
(6) odpowiedzi
2017-07-31 20:07 Adding multiple arrays to form one final array. Debug swift xcode »
I am trying to create a flashcard app. I successfully got the app too the point where there were 11 different arrays of flashcards and all of these ar...
(2) odpowiedzi
2017-07-31 19:07 How to extract values from multidimensional array grouped by some value inside it using PHP? »
I have an array that looks like this:- Array ( [0] => Array ( [id] => 10 [group] => 11 ) [1] => Array ( [id] => 11 [group] => 1...
(4) odpowiedzi
2017-07-31 09:07 What is the type of a pointer to a 2D array? »
I know that the following is not correct: int arr[2][3] = {}; //some array initialization here int** ptr; ptr = arr; But I am quite surprised that ...
(4) odpowiedzi
2017-07-31 06:07 How to query array stored column in Postgres, (array intersection) »
I have a table which contains value in array something like this. id | contents_id 1 | [1, 3, 5] 2 | [1, 2] 3 | [3, 4, 6] 4 | [2, 5] How to wri...
(2) odpowiedzi
2017-07-30 19:07 Swift how to sort an array of custom objects in a given order with property »
I have an array of restaurantsIds in a specific order. I make a network call to get Restaurants for each one of these ids. I am returned with all the ...
(3) odpowiedzi
2017-07-30 16:07 I can`t access the array that I create with scheduler »
I made the function to create the array everyday with scheduler. And I want to get the date from that array. But when I access the index page, array ...
(1) odpowiedzi
2017-07-30 06:07 PHP array_push with custom key »
I'm trying to merge two arrays which have a custom key using array_push, but when I use array_push it removes the custom key. For example if I just c...
(2) odpowiedzi
2017-07-29 16:07 How to check if an array is in a multidimensional array »
I'd want to check, using a filtering query, if an array is equal to an element of another multidimensional array which can be considered as an array o...
(2) odpowiedzi
2017-07-29 00:07 Tap screen for sound(array of sound files), xcode and swift »
CURRENTLY - I am in the midst of building a flashcard app. The app displays an array of flash cards which the user can swipe left and right through(c...
(2) odpowiedzi
2017-07-27 12:07 Laravel Array Validation »
$rules = [ 'user_id' => 'required|exists:users,id', 'preparat_id' => 'required|exists:preparats,id', ...
(2) odpowiedzi
2017-07-25 15:07 Java sum two double[][] with parallel stream »
Let's say I have this two matrices: double[][] a = new double[2][2] a[0][0] = 1 a[0][1] = 2 a[1][0] = 3 a[1][1] = 4 double[][] b = new double[2][2] ...
(5) odpowiedzi
2017-07-25 14:07 How to append array element with increasing the array count with key in PHP? »
I've array $a $a[1] = "A"; $a[2] = "B"; $a[3] = "C"; $a[4] = "D"; Let's say, "X" is new value that I want append middle position in array, I want t...
(3) odpowiedzi