pass array of emails to Job class Mail::to

I am able to send single email but when it comes to multiple emails jobs class fails to send it to multiple users. The code below works fine and sends email to one user $email = new Report($this->user); Mail::to($this->user->email)->que...
more »

2017-05-20 21:05 (3) Answers

Java Objects and arrays

I'm relatively new to java and i'm wondering how to go about writing this set of code. Currently I have a class to create an object for each name and number pairs from a list the user inputs public class Data { private String x; private int...
more »

2017-05-20 19:05 (2) Answers

Getting indexes of maximum number in array

I have an array containing numbers which are ranks. Something like this. 0 4 2 0 1 0 4 2 0 4 0 2 Here 0 corresponds to the lowest rank and max number corresponds to highest rank. There may be multiple indexes containing Highest Rank. I want to fin...
more »

2017-05-20 11:05 (3) Answers

validating array using jQuery Validate

I am trying to validate an array using jQuery Validate plugin. The array has a numeric key and the key number is not sequential. That means, it could be cause[0] or cause[2] or cause[7] Html code <form id="myform" action="submit.php"> <...
more »

2017-05-20 09:05 (2) Answers

How to nest unboxed vectors?

This may be a pretty basic question, but I've searched around and I cannot seem to find the answer. I would like to represent a 2D list using unboxed Vectors. This is easily done with normal vectors: > import qualified Data.Vector as V > V.fr...
more »

2017-05-20 08:05 (1) Answers

Doesn't prints the entire array properly

Here is my code for an atm machine. It first asks the user for card number then Pin and then expiry date. char card_number[16]; memset(card_number,0,16); char pin[4]; memset(pin,0,4); char exp_date[5]; memset(exp_date,0,5); printf("Enter Card numbe...
more »

2017-05-20 02:05 (3) Answers

Swift Draw a route for an array of value

Hi I have an array like this route = [[latitude,longitude],[latitude,longitude]...]. I should draw a line that follows the arrays coordinates. I tried with this function: func addPolylineToMap(locations: [CLLocation]){ var coordinates = locati...
more »

2017-05-20 00:05 (1) Answers

Cache array of objects in node js

I have a schools social network, every school has a a number of dashboards that the students can post in it, since I don't want to go to the database every time a student want to see a dashboard I thought to build a cache system for the schools, at t...
more »

2017-05-19 23:05 (2) Answers

Sort other arrays based on one array (Obj-C)

I have three NSMutableArray's: NSMutableArray *dateArray; NSMutableArray *nameArray; NSMutableArray *imageArray I would like to sort the dateArray based on the closest date, and then have the nameArray and imageArray bases on this new sorted order...
more »

2017-05-19 19:05 (1) Answers

Numpy split data with delimiter at once

I have a numpyarray, it looks like this: [ [1,2,6,1,5] [3,6,46] [7,7,6,6,6,62,4] [2,4,52,85,78] ] the data is heterogeneous My question is now if it possible is without doing it for every single row (means no "for loop") to split the data by a de...
more »

2017-05-19 13:05 (2) Answers

Why is "sort" sorting ALL arrays?

I have this (in Javascript): function f(n){ var arr = (''+n).split(); var sortedArr = arr; sortedArr.sort(); } When I return arr and sortedArr, they are both sorted. Why is this? Shouldn't the .sort method only sort sortedArr here? ...
more »

2017-05-19 12:05 (2) Answers

Retrieve array from postgres

Very basic question but couldn´t find a solution. In a table with some values I try to store in 1 column a array (int[]) and retrieve it. The storing and searching works fine but if I select it I get it as string in php. Table week col id (int) ...
more »

2017-05-19 11:05 (1) Answers

Showing array value as the number in the array

Currently my code shows the year from 1885 to 2017. What this does is show the years like so 0 = 1885, 1 = 1886. What I want is that it shows it like this 1885 = 1885, 1886 = 1886 etc. (This resembles the date a car is built) $options = []; for ($...
more »

2017-05-19 10:05 (3) Answers

Adding arrays to a php variable

I am using PDO in order to select some values from my database. For each iteration of my $teachArray, I store the selected array into my $language_id variable. I then get rid of any empty array that I have inside my $language_id and assigning it to...
more »

2017-05-19 07:05 (1) Answers

Remove empty arrays from PHP variable

I am using PDO in order to select some values from my database. For each iteration of my $teachArray, I store the selected value into my $language_id variable. However, I am also storing some empty arrays which is not my intention. I would like to...
more »

2017-05-19 05:05 (1) Answers

How to properly count occurrence in arrays?

I've got an in depth array (arrays of arrays). I'm trying to make a decent function without using any extra methods and JS designs (like closures). This is a working solution (but a bad one because of the global variable) var counter=0; functio...
more »

2017-05-18 18:05 (4) Answers

C++ Array Assignment in Function Issue

C++ newbie here and I have run into an issue which I can't figure out. When I run the code below I get the correct results I expected: #include <iostream> #include <math.h> void factorize(int *factors, int number) { // declare var...
more »

2017-05-18 15:05 (1) Answers

java.lang.ArrayIndexOutOfBoundsException: 19

The code below is to visualize a printout of data generated in the rest of the program. It takes out the info from the wagens and locos who are inputted into a arraylist. My main concern here is how to combine them in the right order of this and to ...
more »

2017-05-18 15:05 (1) Answers