Questions tagged [collect]

Use this tag for questions related to the act of gathering/collecting/grouping data/results from several nodes/places/computers to one (or main) resource(s).

Use this tag for questions related to the act of gathering/collecting/grouping data/results from several nodes/places/computers to one (or main) resource(s).

For example, in Distributed Computing, the slaves would do their local computation and eventually, one would like the master to collect the (local) results.

296 questions
0
votes
2 answers

List inplace replacement & time zone convertion

I have been trying to resolve this issue for the past day and can not seem to find a more elegant (Groovy style) solution, hope someone can help me out. Basically I have a list that contains time stamps (GMT-0) coming from an external source that…
syepes
  • 13
  • 4
0
votes
1 answer

Mysql2 response does not work with method collect in Ruby

I am using mysql2 in my ruby script. using this to test API responses against the mysql DB this is a snippet of my script test_job_by_id_5 id = $data["jobs"]["id"][i] # example 5 job = JobServices.job_by_id(id) response = @@con.query("select *…
Amey
  • 8,037
  • 8
  • 36
  • 59
-1
votes
1 answer

Laravel 7: Find duplicates in a collection and keep lower values and remove the others higher values

when i use $data_collect->groupBy('group_id') and give me result like this: Illuminate\Support\Collection Object ( [items:protected] => Array ( [1] => Illuminate\Support\Collection Object …
Fredy
  • 2,750
  • 6
  • 25
  • 39
-1
votes
1 answer

Why won't the Common LISP Return function work?

I've been working on a project in common lisp for a bit now, and I can't figure out why the loop I am using won't return a list. It will print the new list (correctly!) if I use a 'Finally' statement at the end of the loop, but it will not print…
kra361
  • 1
-1
votes
1 answer

How to collect the contents of a browser's address bar in C / C++?

Overview I wish to collect the contents of a browser's address bar opened by a function in a program in C / C++. There are a few threads here which discuss the matter. However, none seems to be helpful to me. My environment OS : Windows 7, Windows…
Morbius
  • 7
  • 3
-1
votes
1 answer

How do you collect data from all your threads in java?

So I made a class that extends Thread class and I have a main class that calls start(). I have created 1000 threads to run my program in this way: int ThreadNum = 1000; for(int i=0; i
-1
votes
2 answers

Why does the compiler prevent me from using push on a Vec created using collect()?

The following compiles: pub fn build_proverb(list: &[&str]) -> String { if list.is_empty() { return String::new(); } let mut result = (0..list.len() - 1) .map(|i| format!("For want of a {} the {} was lost.", list[i],…
Edmund's Echo
  • 400
  • 4
  • 7
-1
votes
1 answer

Create a list of objects from a list of String in groovy

I am having a list of string as follows. List l = ["1","2","3"] And I have a class like as follows. class person { String name } I want to create a list of person object from List l. I have tried using groovy list collect but I am not able to…
Apoorva sahay
  • 1,640
  • 3
  • 23
  • 43
-1
votes
1 answer

php in array collect same array

I have this array in PHP: $a =…
-1
votes
1 answer

undefined reference to `main' - collect2: error: ld returned 1 exit status

I am trying to compile in a UNIX environment and keep receiving this error. However, all I have is the main function in the file? Any ideas? This is the ONLY code I have since I was having the error in a different file and decided to test the…
starlight
  • 120
  • 1
  • 16
-1
votes
1 answer

Bulk collect limit with execute immediate

For operating on millions of records I want to put a limit of 500 but the following code gives error. Error report: ORA-06550: line 6, column 49: PLS-00103: Encountered the symbol "LIMIT" when expecting one of the following: DECLARE TYPE EMP_T…
PTK
  • 161
  • 14
-1
votes
1 answer

Getting successfully updated id's from "for all update" in oracle

I am trying to update records in bulk. After running for all update I need to call a procedure and send all successfully updated id's as one of the parameter to the procedure.All those id's for which update was not performed due to some error should…
PTK
  • 161
  • 14
-1
votes
1 answer

collect dictionairy values in python list

I have a list which has dict values in it. I want to group by ts and collect other values. Please note that ts is common and will be there in all dictionaries in the list. But the other values like HP, BP can change in each dictionary. Please…
-1
votes
2 answers

What is simplest way to convert :pluck or :collect results to array of strings in Rails?

I have a model called Record and belongs Product model, the price column type is hexadecimal. Rails already convert it to string in view. But I wanna get them in my console queries. Example code for pluck: Product.first.records.pluck(:price) This…
thatway_3
  • 383
  • 1
  • 7
  • 19
-1
votes
1 answer

Need to group struct type into array

I have a hive table with a column struct. I need to run a query to collect some rows of that column into array. The end result should be array of struct<....> I have tried "collect_set", but it is giving me an error that it cannot be used for…
maze2002
  • 1
  • 1
1 2 3
19
20