PageRenderTime 318ms queryTime 29ms sortTime 21ms getByIdsTime 125ms findMatchingLines 89ms

100+ results results for '_ pluck repo:joshua/dotfiles' (318 ms)

Not the results you expected?
create_service_spec.rb https://gitlab.com/alexkeramidas/gitlab-ce | Ruby | 385 lines
                    
298
                    
299        issue_ids = MergeRequestsClosingIssues.where(merge_request: merge_request).pluck(:issue_id)
                    
300        expect(issue_ids).to match_array([first_issue.id, second_issue.id])
                    
                
mapping.fp.js https://gitlab.com/fabi.gjuzi/Portfolio | JavaScript | 424 lines
                    
108	  'pipe': 'flow',
                    
109	  'pluck': 'map',
                    
110	  'prop': 'get',
                    
                
labels_controller.rb https://gitlab.com/tbeadle/gitlab-ce | Ruby | 164 lines
                    
94    Label.transaction do
                    
95      available_labels_ids = @available_labels.where(id: params[:label_ids]).pluck(:id)
                    
96      label_ids = params[:label_ids].select { |id| available_labels_ids.include?(id.to_i) }
                    
                
project_team.rb https://gitlab.com/mehlah/gitlab-ce | Ruby | 207 lines
                    
101    source_members = source_project.project_members.to_a
                    
102    target_user_ids = target_project.project_members.pluck(:user_id)
                    
103
                    
                
editfile.blade.php https://gitlab.com/oytunistrator/92five | PHP | 118 lines
                    
43                            <p>{{$file['file_name']}}</p>
                    
44                            <span>{{$file['size']}}. Uploaded on {{new ExpressiveDate($file['uploaded_date'])}} by {{User::where('id',$file['uploaded_by'])->pluck('first_name')}} {{User::where('id',$file['uploaded_by'])->pluck('last_name')}}</span>
                    
45                          </div>
                    
                
test_wave.py https://gitlab.com/pmuontains/Odoo | Python | 123 lines
                    
16class WavePCM8Test(WaveTest, unittest.TestCase):
                    
17    sndfilename = 'pluck-pcm8.wav'
                    
18    sndfilenframes = 3307
                    
33class WavePCM16Test(WaveTest, unittest.TestCase):
                    
34    sndfilename = 'pluck-pcm16.wav'
                    
35    sndfilenframes = 3307
                    
60class WavePCM24Test(WaveTest, unittest.TestCase):
                    
61    sndfilename = 'pluck-pcm24.wav'
                    
62    sndfilenframes = 3307
                    
87class WavePCM32Test(WaveTest, unittest.TestCase):
                    
88    sndfilename = 'pluck-pcm32.wav'
                    
89    sndfilenframes = 3307
                    
                
reportable.rb https://gitlab.com/Rambabu.d/sujala | Ruby | 140 lines
                    
136  	def names(column)
                    
137  		to_model(column).pluck(:name).uniq
                    
138  	end
                    
                
stat_graph_contributors_graph_spec.js https://gitlab.com/ayufan/gitlab-ce-repo-2 | JavaScript | 133 lines
                    
113  describe("#get_dates", function () {
                    
114    it("plucks the date field from data collection", function () {
                    
115      var graph = new ContributorsMasterGraph()
                    
                
obj_or_seq.cc https://gitlab.com/freesoftware/rethinkdb | C++ | 384 lines
                    
20// is replaced by a new variable.
                    
21// For example, foo.pluck('a') becomes varnum.pluck('a')
                    
22raw_term_t make_obj_or_seq_func(const raw_term_t &term,
                    
142
                    
143class pluck_term_t : public obj_or_seq_op_term_t {
                    
144public:
                    
144public:
                    
145    pluck_term_t(compile_env_t *env, const raw_term_t &term)
                    
146        : obj_or_seq_op_term_t(env, term, MAP, argspec_t(1, -1)) { }
                    
161    }
                    
162    virtual const char *name() const { return "pluck"; }
                    
163};
                    
363
                    
364counted_t<term_t> make_pluck_term(
                    
365        compile_env_t *env, const raw_term_t &term) {
                    
                
Arr.php https://bitbucket.org/sklyarov_ivan/trap.git | PHP | 620 lines
                    
310	 *     // Get all of the "id" values from a result
                    
311	 *     $ids = Arr::pluck($result, 'id');
                    
312	 *
                    
315	 * @param   array   $array  list of arrays to check
                    
316	 * @param   string  $key    key to pluck
                    
317	 * @return  array
                    
318	 */
                    
319	public static function pluck($array, $key)
                    
320	{
                    
                
order-summary-item.tsx https://gitlab.com/remyvianne/krowkaramel | TypeScript | 215 lines
                    
55	// Prepare props to pass to the __experimentalApplyCheckoutFilter filter.
                    
56	// We need to pluck out receiveCart.
                    
57	// eslint-disable-next-line no-unused-vars
                    
                
Builder.php https://bitbucket.org/mikebosire/framework.git | PHP | 496 lines
                    
35		'lists', 'insert', 'insertGetId', 'update', 'delete', 'increment',
                    
36		'decrement', 'pluck', 'count', 'min', 'max', 'avg', 'sum',
                    
37	);
                    
                
README.md https://gitlab.com/blocknotary/IonicInterviews | Markdown | 118 lines
                    
78* [object.pick](https://www.npmjs.com/package/object.pick): Returns a filtered copy of an object with only the specified keys, similar to `_.pick… [more](https://github.com/jonschlinkert/object.pick) | [homepage](https://github.com/jonschlinkert/object.pick "Returns a filtered copy of an object with only the specified keys, similar to`_.pick` from lodash / underscore.")
                    
79* [object.pluck](https://www.npmjs.com/package/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) | [homepage](https://github.com/jonschlinkert/object.pluck "Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with values unmodified from those of the original object.")
                    
80* [object.reduce](https://www.npmjs.com/package/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) | [homepage](https://github.com/jonschlinkert/object.reduce "Reduces an object to a value that is the accumulated result of running each property in the object through a callback.")
                    
                
stat_graph_contributors_graph_spec.js https://gitlab.com/SaiAshirwadInformatia/gitlab-ce | JavaScript | 128 lines
                    
110  describe("#get_dates", function () {
                    
111    it("plucks the date field from data collection", function () {
                    
112      var graph = new ContributorsMasterGraph();
                    
                
sinon_extensions.js https://bitbucket.org/schatt/chorus.git | JavaScript | 248 lines
                    
111        } else {
                    
112            throw "No fetch found for " + model.url() + ". Found fetches for: [" + _.pluck(this.fetches(), 'url').join(', ') + "]";
                    
113        }
                    
121        } else {
                    
122            throw "No update found for " + model.url() + ". Found updates for: [" + _.pluck(this.creates(), 'url').join(', ') + "]";
                    
123        }
                    
131        } else {
                    
132            throw "No create found for " + model.url() + ". Found creates for: [" + _.pluck(this.creates(), 'url').join(', ') + "]";
                    
133        }
                    
140        } else {
                    
141            throw "No destroy found for " + model.url() + ". Found destroys for: [" + _.pluck(this.destroys(), 'url').join(', ') + "]";
                    
142        }
                    
                
class-wc-cli-report.php https://gitlab.com/webkod3r/tripolis | PHP | 372 lines
                    
306			$query_args['fields'] = 'ids';
                    
307			echo implode( ' ', wp_list_pluck( $top_sellers_data, 'product_id' ) );
                    
308		} else {
                    
                
index.js https://gitlab.com/blocknotary/IonicInterviews | JavaScript | 376 lines
                    
55 * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`,
                    
56 * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`,
                    
57 * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`,
                    
174lodash.pick = objects.pick;
                    
175lodash.pluck = collections.pluck;
                    
176lodash.property = utilities.property;
                    
                
Gruntfile.js https://gitlab.com/xxtxx/atom-settings | JavaScript | 409 lines
                    
17        meta: {
                    
18            license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>',
                    
19            copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
                    
                
Mail.php https://github.com/michaelmcandrew/lbc.git | PHP | 343 lines
                    
67        if ( ! $returnPath ) {
                    
68            $returnPath = self::pluckEmailFromHeader($from);
                    
69        }
                    
231     * @param  string $header  the full name + email address string
                    
232     * @return string          the plucked email address
                    
233     */
                    
233     */
                    
234    function pluckEmailFromHeader($header) {
                    
235        preg_match('/<([^<]*)>$/', $header, $matches);
                    
                
topic_tracking_state.rb https://gitlab.com/Ruwan-Ranganath/discourse | Ruby | 237 lines
                    
119
                    
120    highest_post_number = Topic.where(id: topic_id).pluck(:highest_post_number).first
                    
121
                    
                
calculations.rb https://gitlab.com/patrickread/rails | Ruby | 384 lines
                    
122    #
                    
123    #   Person.pluck(:name)
                    
124    #
                    
129    # Pluck returns an <tt>Array</tt> of attribute values type-casted to match
                    
130    # the plucked column names, if they can be deduced. Plucking an SQL fragment
                    
131    # returns String values by default.
                    
132    #
                    
133    #   Person.pluck(:id)
                    
134    #   # SELECT people.id FROM people
                    
136    #
                    
137    #   Person.pluck(:id, :name)
                    
138    #   # SELECT people.id, people.name FROM people
                    
140    #
                    
141    #   Person.pluck('DISTINCT role')
                    
142    #   # SELECT DISTINCT role FROM people
                    
                
test_nestedset.py https://github.com/frappe/frappe.git | Python | 235 lines
                    
99		min_lft = 1
                    
100		max_rgt = frappe.qb.from_("Test Tree DocType").select(Max(Field("rgt"))).run(pluck=True)[0]
                    
101
                    
                
tcp_vegas.c https://github.com/mstsirkin/linux.git | C | 339 lines
                    
206
                    
207			/* Pluck out the RTT we are using for the Vegas
                    
208			 * calculations. This is the min RTT seen during the
                    
                
refresh_service_spec.rb https://gitlab.com/l00mi/gitlab-ee | Ruby | 312 lines
                    
279
                    
280          issue_ids = MergeRequestsClosingIssues.where(merge_request: merge_request).pluck(:issue_id)
                    
281          expect(issue_ids).to eq([issue.id])
                    
298
                    
299          issue_ids = MergeRequestsClosingIssues.where(merge_request: merge_request).pluck(:issue_id)
                    
300          expect(issue_ids).to eq([issue.id])
                    
                
pre-compile.js https://bitbucket.org/websurgeon/cordova-test-on-device.git | JavaScript | 398 lines
                    
153    'pick',
                    
154    'pluck',
                    
155    'random',
                    
                
Arr.php https://gitlab.com/susmitha.plts/photographer_portfolio | PHP | 528 lines
                    
354    /**
                    
355     * Pluck an array of values from an array.
                    
356     *
                    
361     */
                    
362    public static function pluck($array, $value, $key = null)
                    
363    {
                    
365
                    
366        list($value, $key) = static::explodePluckParameters($value, $key);
                    
367
                    
386    /**
                    
387     * Explode the "value" and "key" arguments passed to "pluck".
                    
388     *
                    
392     */
                    
393    protected static function explodePluckParameters($value, $key)
                    
394    {
                    
                
todo_service.rb https://gitlab.com/alexsanford/gitlab-ce | Ruby | 342 lines
                    
205    todos = todos.where.not(state: state)
                    
206    todos_ids = todos.pluck(:id)
                    
207    todos.unscope(:order).update_all(state: state)
                    
                
personal_access_token_spec.rb https://gitlab.com/18dit020/gitlab | Ruby | 326 lines
                    
173
                    
174  describe '.pluck_names' do
                    
175    it 'returns the names of the tokens' do
                    
178
                    
179      expect(described_class.pluck_names).to contain_exactly(pat1.name, pat2.name)
                    
180    end
                    
                
viewModel.js https://bitbucket.org/ianmcorvidae/musicbrainz-server.git | JavaScript | 303 lines
                    
145        if (data.id) {
                    
146            var cacheKey = _.pluck(data.entities, "entityType").concat(data.id).join("-");
                    
147            var cached = viewModel.cache[cacheKey];
                    
                
user_test.rb https://gitlab.com/vectorci/samson | Ruby | 463 lines
                    
181    it "is all for admin" do
                    
182      users(:admin).administrated_projects.map(&:id).sort.must_equal Project.pluck(:id).sort
                    
183    end
                    
402    it "is cached" do
                    
403      user.stars.expects(:pluck).returns []
                    
404      user.starred_project?(project).must_equal false
                    
404      user.starred_project?(project).must_equal false
                    
405      user.stars.expects(:pluck).never
                    
406      user.starred_project?(project).must_equal false
                    
                
sa-TotalMonthlyByReseller.js https://gitlab.com/stoicsoftware/netsuite-sku-analytics | JavaScript | 342 lines
                    
309            "label": R.pipe(R.head, R.prop("resellerName"))(data),
                    
310            "data": R.pluck("sales")(data)
                    
311        };
                    
                
issuable_finder.rb https://gitlab.com/lee.claude/gitlab-ce.git | Ruby | 227 lines
                    
187    if milestones?
                    
188      items = items.where(milestone_id: milestones.try(:pluck, :id))
                    
189    end
                    
215        where('labels.title in (?)', label_names).
                    
216        where(target_type: klass.name).pluck(:target_id)
                    
217
                    
                
project_authorizations_spec.rb https://gitlab.com/klml/gitlab-ee | Ruby | 311 lines
                    
32    it 'includes the correct projects' do
                    
33      expect(authorizations.pluck(:project_id))
                    
34        .to include(owned_project.id, other_project.id, group_project.id)
                    
188    it 'includes nested groups' do
                    
189      expect(authorizations.pluck(:project_id)).to include(nested_project.id)
                    
190    end
                    
                
search_results.rb https://gitlab.com/realsatomic/gitlab | Ruby | 258 lines
                    
206    # Filter milestones by authorized projects.
                    
207    # For performance reasons project_id is being plucked
                    
208    # to be used on a smaller query.
                    
214          .select(:project_id).distinct
                    
215          .pluck(:project_id)
                    
216
                    
                
Gruntfile.js https://bitbucket.org/juanpicado/portfolio.git | JavaScript | 306 lines
                    
31      '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
                    
32      ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
                    
33
                    
                
selecting-data.js https://gitlab.com/Sxw1212/questions | JavaScript | 388 lines
                    
170
                    
171    result = yield r.db(dbName).table(tableName).indexWait('field').pluck('index', 'ready').run();
                    
172    assert.deepEqual(result, [{'index':'field','ready':true}]);
                    
207
                    
208    result = yield r.db(dbName).table(tableName).indexWait('fieldAddOne').pluck('index', 'ready').run();
                    
209    assert.deepEqual(result, [{'index':'fieldAddOne','ready':true}]);
                    
                
project_clusters_spec.rb https://gitlab.com/jamgregory/gitlab-ce | Ruby | 449 lines
                    
48
                    
49        expect(cluster_ids).to match_array(clusters.pluck(:id))
                    
50        expect(cluster_ids).not_to include(extra_cluster.id)
                    
                
arr-helpers.php https://gitlab.com/knowthecode/ktc-must-use | PHP | 343 lines
                    
228
                    
229if ( ! function_exists( 'fulcrum_array_pluck' ) ) {
                    
230	/**
                    
230	/**
                    
231	 * Pluck an array of values from an array.
                    
232	 *
                    
238	 */
                    
239	function fulcrum_array_pluck( $array, $value, $key = null ) {
                    
240		return Arr::pluck( $array, $value, $key );
                    
                
pipeline.rb https://gitlab.com/gitlab-group/gitlab-ce | Ruby | 389 lines
                    
126      statuses.order(:stage_idx).distinct.
                    
127        pluck(:stage, :stage_idx).map(&:first)
                    
128    end
                    
141      stages_with_statuses = CommitStatus.from(stages_query, :sg)
                    
142        .pluck('sg.stage', status_sql, "(#{warnings_sql})")
                    
143
                    
293    def environments
                    
294      builds.where.not(environment: nil).success.pluck(:environment).uniq
                    
295    end
                    
                
avatar.js https://gitlab.com/sogeta_albazi/books-and-movies | JavaScript | 237 lines
                    
14import { omit, sortKeys } from '../../utils/object';
                    
15import { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props';
                    
16import { isLink } from '../../utils/router';
                    
229        type: type
                    
230      } : link ? pluckProps(linkProps, this) : {},
                    
231      on: button || link ? {
                    
                
populate_untracked_uploads.rb https://gitlab.com/griest/gitlab-ce | Ruby | 259 lines
                    
199        paths = files.map(&:upload_path)
                    
200        existing_paths = Upload.where(path: paths).pluck(:path).to_set
                    
201
                    
232          model_class = Object.const_get(model_type)
                    
233          found_ids = model_class.where(id: model_ids.uniq).pluck(:id)
                    
234          deleted_ids = ids[model_type] - found_ids
                    
                
VersionManager.php https://gitlab.com/fbi/october | PHP | 463 lines
                    
282                ->where('code', $code)
                    
283                ->pluck('version')
                    
284            ;
                    
                
todo.rb https://gitlab.com/artofhuman/gitlab-ce | Ruby | 198 lines
                    
96      base = where.not(state: new_state).except(:order)
                    
97      ids = base.pluck(:id)
                    
98
                    
                
section_spec.rb https://github.com/benjaminvialle/Markus.git | Ruby | 106 lines
                    
87      it 'should assign the new starter file group' do
                    
88        ids = section.reload.section_starter_file_groups.pluck(:starter_file_group_id)
                    
89        expect(ids).to include starter_file_groups.first.id
                    
95      it 'should assign the new starter file group' do
                    
96        ids = section.reload.section_starter_file_groups.pluck(:starter_file_group_id)
                    
97        expect(ids).to include starter_file_groups.first.id
                    
99      it 'should remove the old starter file group' do
                    
100        ids = section.reload.section_starter_file_groups.pluck(:starter_file_group_id)
                    
101        expect(ids).not_to include starter_file_groups.second.id
                    
                
notification_recipient_service.rb https://gitlab.com/kivlor/gitlab-ce | Ruby | 302 lines
                    
155
                    
156        scope.pluck(:user_id)
                    
157      end
                    
175      def user_ids_with_global_level_watch(ids)
                    
176        settings_with_global_level_of(:watch, ids).pluck(:user_id)
                    
177      end
                    
179      def user_ids_with_global_level_custom(ids, action)
                    
180        settings_with_global_level_of(:custom, ids).pluck(:user_id)
                    
181      end
                    
                
index.js https://gitlab.com/jonnyforney/beerbowerpainting | JavaScript | 197 lines
                    
164      if (obj.method === 'first') return resp.rows[0];
                    
165      if (obj.method === 'pluck') return _.pluck(resp.rows, obj.pluck);
                    
166      return resp.rows;
                    
                
ProjectsController.php https://gitlab.com/mlnkv/ribbbon | PHP | 134 lines
                    
103		//		// Get the id of the user being sent the invite
                    
104		//		$user_id = DB::table('users')->whereEmail(Input::get('email'))->pluck('id');
                    
105		//
                    
118		//		// Prepare email invitation & send it
                    
119		//		$project_name	= Project::find($id)->pluck('name');
                    
120		//		$project_url 	= url() . '/projects/'.$id;
                    
                
template.php https://github.com/dxw/buddypress.git | PHP | 378 lines
                    
33		$users = is_array( $members_template->members ) ? array_values( $members_template->members ) : array();
                    
34		$user_ids = wp_list_pluck( $users, 'ID' );
                    
35		sort( $user_ids );
                    
86		$requests = is_array( $members_template->members ) ? array_values( $members_template->members ) : array();
                    
87		$request_ids = wp_list_pluck( $requests, 'ID' );
                    
88		$this->assertEquals( $request_ids, array( $u1 ) );
                    
119		$requests = is_array( $members_template->members ) ? array_values( $members_template->members ) : array();
                    
120		$request_ids = wp_list_pluck( $requests, 'ID' );
                    
121		$this->assertEquals( array(), $request_ids );
                    
143		$members = is_array( $members_template->members ) ? array_values( $members_template->members ) : array();
                    
144		$member_ids = wp_list_pluck( $members, 'ID' );
                    
145		$this->assertEquals( array( $users[1]), $member_ids );
                    
                
checkout_statistics.rb https://github.com/MiraitSystems/enju_trunk.git | Ruby | 326 lines
                    
81        if group.group_identifier.present?
                    
82          classification_ids = Classification.where("group_identifier = ?", group.group_identifier).pluck(:id)
                    
83        else
                    
84          # グループ未設定分
                    
85          classification_ids = Classification.where("group_identifier is null").pluck(:id)
                    
86        end
                    
                
stat_graph_contributors_graph.js https://gitlab.com/the-undefined/gitlab-ce | JavaScript | 278 lines
                    
120    ContributorsMasterGraph.prototype.get_dates = function(data) {
                    
121      return _.pluck(data, 'date');
                    
122    };
                    
                
backfill_project_repositories_spec.rb https://gitlab.com/gitlab-r2devops/gitlab-foss | Ruby | 106 lines
                    
41      it 'finds projects with repository on hashed storage' do
                    
42        projects = described_class.on_hashed_storage.pluck(:id)
                    
43
                    
49      it 'finds projects with repository on legacy storage' do
                    
50        projects = described_class.on_legacy_storage.pluck(:id)
                    
51
                    
60
                    
61        projects = described_class.without_project_repository.pluck(:id)
                    
62
                    
                
watch.js https://bitbucket.org/jollyscience/grunt-bbb.git | JavaScript | 168 lines
                    
49    // Get a list of files to be watched.
                    
50    var patterns = grunt.utils._.chain(targets).pluck('files').flatten().uniq().value();
                    
51    var getFiles = grunt.file.expandFiles.bind(grunt.file, patterns);
                    
                
routing_url_for.rb https://gitlab.com/Rockyspade/rails | Ruby | 140 lines
                    
18    # * <tt>:protocol</tt> - Overrides the default (current) protocol if provided.
                    
19    # * <tt>:user</tt> - Inline HTTP authentication (only plucked out if <tt>:password</tt> is also present).
                    
20    # * <tt>:password</tt> - Inline HTTP authentication (only plucked out if <tt>:user</tt> is also present).
                    
                
records_fetcher_spec.rb https://gitlab.com/abuhazim/gitlab-foss | Ruby | 146 lines
                    
25    it 'returns issues in the correct order' do
                    
26      returned_iids = records_fetcher.serialized_records.pluck(:iid).map(&:to_i)
                    
27
                    
                
dast_latest_gitlab_ci_yaml_spec.rb https://gitlab.com/18dit020/gitlab | Ruby | 172 lines
                    
26    let(:pipeline) { service.execute!(:push).payload }
                    
27    let(:build_names) { pipeline.builds.pluck(:name) }
                    
28    let(:ci_pipeline_yaml) { "stages: [\"dast\"]\n" }
                    
                
dast_site_profile.rb https://gitlab.com/zillemarco/gitlab | Ruby | 132 lines
                    
38  def self.names(site_profile_ids)
                    
39    find(*site_profile_ids).pluck(:name)
                    
40  rescue ActiveRecord::RecordNotFound
                    
                
GradingPeriodSet.jsx https://gitlab.com/ykazemi/canvas-lms | JSX | 411 lines
                    
160    termNames() {
                    
161      const names = _.pluck(this.setTerms(), "displayName");
                    
162      return I18n.t("Terms: ") + names.join(", ");
                    
                
miq_provision_quota_mixin.rb https://gitlab.com/aljesusg/manageiqtest | Ruby | 328 lines
                    
182    skip_id = self.class.name == "MiqProvisionRequest" ? id : miq_provision_request.id
                    
183    load_ids = queued_requests.pluck(:instance_id)
                    
184    load_ids.delete(skip_id)
                    
283      end
                    
284    prov_req_ids += MiqProvision.where(:id => prov_ids).pluck("miq_request_id")
                    
285
                    
                
index.js https://gitlab.com/blocknotary/IonicInterviews | JavaScript | 284 lines
                    
48 * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`,
                    
49 * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`,
                    
50 * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`,
                    
147lodash.pick = objects.pick;
                    
148lodash.pluck = collections.pluck;
                    
149lodash.range = arrays.range;
                    
                
entry.js https://bitbucket.org/baldpenguin/af-node-calipso.git | JavaScript | 212 lines
                    
125
                    
126    // if the queue gets too big, then pluck off whatever we can.
                    
127    // this should be fairly rare.
                    
                
expand.js https://gitlab.com/jorgegoes/jointswp-child | JavaScript | 248 lines
                    
45  }
                    
46  var defStr = this.opt.choices.pluck("key");
                    
47  this.rawDefault = defStr[ defIndex ];
                    
                
calculations.rb https://github.com/aviflombaum/rails.git | Ruby | 311 lines
                    
116    #
                    
117    #   Person.pluck(:id) # SELECT people.id FROM people
                    
118    #   Person.uniq.pluck(:role) # SELECT DISTINCT role FROM people
                    
118    #   Person.uniq.pluck(:role) # SELECT DISTINCT role FROM people
                    
119    #   Person.where(:age => 21).limit(5).pluck(:id) # SELECT people.id FROM people WHERE people.age = 21 LIMIT 5
                    
120    #
                    
120    #
                    
121    def pluck(column_name)
                    
122      key = column_name.to_s.split('.', 2).last
                    
                
collection.md https://gitlab.com/boxnia/NFU_MOVIL | Markdown | 233 lines
                    
113
                    
114## pluck(list, propName):Array
                    
115
                    
129
                    
130pluck(users, 'name'); // ["John", "Jane"]
                    
131pluck(users, 'age'); // [21, 27]
                    
143
                    
144pluck(users, 'name'); // ['John', 'Mary']
                    
145```
                    
146
                    
147See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck)
                    
148
                    
                
collection_proxy.rb https://github.com/kuroda/rails.git | Ruby | 126 lines
                    
41      delegate :group, :order, :limit, :joins, :where, :preload, :eager_load, :includes, :from,
                    
42               :lock, :readonly, :having, :pluck, :to => :scoped
                    
43
                    
                
cycle_analytics_events_spec.rb https://gitlab.com/artofhuman/gitlab-ce | Ruby | 134 lines
                    
25
                    
26      first_issue_iid = project.issues.sort_by_attribute(:created_desc).pluck(:iid).first.to_s
                    
27
                    
45
                    
46      first_mr_iid = project.merge_requests.sort_by_attribute(:created_desc).pluck(:iid).first.to_s
                    
47
                    
60
                    
61      first_mr_iid = project.merge_requests.sort_by_attribute(:created_desc).pluck(:iid).first.to_s
                    
62
                    
76
                    
77      first_issue_iid = project.issues.sort_by_attribute(:created_desc).pluck(:iid).first.to_s
                    
78
                    
                
request-handling.rst https://gitlab.com/albertkeba/docs | ReStructuredText | 316 lines
                    
101    -  portalmmm
                    
102    -  Plucker
                    
103    -  ReqwirelessWeb
                    
                
2009-04-22-scripted-db-views.aspx.markdown https://gitlab.com/Blueprint-Marketing/haacked.com | Markdown | 152 lines
                    
14stuck in a file on disk which gets compiled by ASP.NET into an assembly.
                    
15Most system administrators would first pluck out their own toenail
                    
16rather than allow an end user permission to modify such files.
                    
                
class-wpml-tm-xliff-writer.php https://bitbucket.org/ed47/epfl-smart-move.git | PHP | 396 lines
                    
144	private function pre_populate_strings_with_translation_memory( $strings, $source_lang, $target_lang ) {
                    
145		$strings_to_translate    = wp_list_pluck( $strings, 'value' );
                    
146		$original_translated_map = $this->get_original_translated_map_from_translation_memory( $strings_to_translate, $source_lang, $target_lang );
                    
177		if ( $strings_in_memory ) {
                    
178			return wp_list_pluck( $strings_in_memory, 'translation', 'original' );
                    
179		}
                    
                
record.js https://gitlab.com/crazybutterfly815/magento2 | JavaScript | 356 lines
                    
214        filterData: function (data) {
                    
215            var fields = _.pluck(this.elems(), 'index');
                    
216
                    
                
volumes.go https://github.com/dotcloud/docker.git | Go | 140 lines
                    
113		// For now, the only thing we can update is availability. Instead of
                    
114		// converting the whole spec, just pluck out the availability if it has
                    
115		// been set.
                    
                
CFInstall.js https://github.com/jakimowicz/ajaxlibs.git | JavaScript | 348 lines
                    
158  /**
                    
159   * Plucks properties from the passed arguments and sets them on the passed
                    
160   * DOM node
                    
                
index.ts https://gitlab.com/nguyenthehiep3232/marius | TypeScript | 105 lines
                    
56export { partition } from '../internal/operators/partition';
                    
57export { pluck } from '../internal/operators/pluck';
                    
58export { publish } from '../internal/operators/publish';
                    
                
product-attributes.php https://github.com/woothemes/woocommerce.git | PHP | 268 lines
                    
143		// Ensure our custom attribute is not in the results (proof of core endpoint).
                    
144		$names = wp_list_pluck( $attributes, 'name' );
                    
145		$this->assertNotContains( 'Numeric Size', $names );
                    
166		// Results should include "number" and "Numeric Size".
                    
167		$names = wp_list_pluck( $attributes, 'name' );
                    
168		$this->assertContains( 'number', $names );
                    
245
                    
246		$slugs = wp_list_pluck( $terms, 'slug' );
                    
247		$this->assertContains( 'small', $slugs );
                    
                
ArticleController.php https://bitbucket.org/clickmysoft/ecocar_rental.git | PHP | 171 lines
                    
77
                    
78        $x2 = CategoryPostModel::where('post_id',$id)->get()->pluck('category_id')->toArray();
                    
79        $x3 = TagPostModel::where('post_id',$id)->get()->pluck('tag_id')->toArray();
                    
                
pipeline.rb https://gitlab.com/sdalemans/gitlab-ce | Ruby | 322 lines
                    
87    def self.stages
                    
88      # We use pluck here due to problems with MySQL which doesn't allow LIMIT/OFFSET in queries
                    
89      CommitStatus.where(pipeline: pluck(:id)).stages
                    
229    def environments
                    
230      builds.where.not(environment: nil).success.pluck(:environment).uniq
                    
231    end
                    
                
contributions_calendar.rb https://gitlab.com/wolfgang42/gitlab-ce | Ruby | 97 lines
                    
76      # the list will be (relatively) short
                    
77      @contributed_project_ids ||= projects.distinct.pluck(:id)
                    
78      authed_projects = Project.where(id: @contributed_project_ids)
                    
                
issuable_collections.rb https://gitlab.com/alexsanford/gitlab-ce | Ruby | 114 lines
                    
12  def issuable_meta_data(issuable_collection, collection_type)
                    
13    # map has to be used here since using pluck or select will
                    
14    # throw an error when ordering issuables by priority which inserts
                    
                
milestone.rb https://gitlab.com/emrox/gitlab-ce | Ruby | 221 lines
                    
104        having('due_date = MIN(due_date)').
                    
105        pluck(:id, :project_id, :due_date).
                    
106        map(&:first)
                    
                
adduser.js https://github.com/dshaw/node.git | JavaScript | 137 lines
                    
35
                    
36  // pluck off any other username/password/token.  it needs to be the
                    
37  // same as the user we're becoming now.  replace them on error.
                    
                
roles_spec.rb https://gitlab.com/aljesusg/manageiqtest | Ruby | 367 lines
                    
72
                    
73    expect_result_resources_to_include_data("features", attr.to_s => klass.pluck(attr))
                    
74  end
                    
                
backbone.babysitter.js https://bitbucket.org/synapsos/lounge-old.git | JavaScript | 213 lines
                    
196      'contains', 'invoke', 'toArray', 'first', 'initial', 'rest', 
                    
197      'last', 'without', 'isEmpty', 'pluck'];
                    
198  
                    
                
Artist.php https://gitlab.com/noirscape/myimouto | PHP | 282 lines
                    
267        if (strpos($name, 'http') === 0) {
                    
268            // $conds = array('artists.id IN (?)', self::where(['url' => $name])->pluck('id'));
                    
269            // $sql = self::where('true');
                    
                
common.js https://gitlab.com/ndkhoiits/hello-jhipster | JavaScript | 292 lines
                    
181
                    
182function pluck(collection, key) {
                    
183  var result = isArray(collection) ? [] : {};
                    
                
account_notification.rb https://gitlab.com/ykazemi/canvas-lms | Ruby | 135 lines
                    
28    else
                    
29      sub_account_ids = UserAccountAssociation.where(user: user).pluck(:account_id)
                    
30      current = self.for_account(account, sub_account_ids)
                    
86
                    
87      roles = user.enrollments.shard(user).active.uniq.pluck(:type)
                    
88
                    
                
pretty-error.coffee https://gitlab.com/chriswhalen/flipkicks | CoffeeScript | 309 lines
                    
122	unskipPackage: (packages...) ->
                    
123		array.pluckOneItem(@_packagesToSkip, pkg) for pkg in packages
                    
124		@
                    
134	unskipPath: (paths...) ->
                    
135		array.pluckOneItem(@_pathsToSkip, path) for path in paths
                    
136		@
                    
146	unskip: (callbacks...) ->
                    
147		array.pluckOneItem(@_skipCallbacks, cb) for cb in callbacks
                    
148		@
                    
164	removeFilter: (callbacks...) ->
                    
165		array.pluckOneItem(@_filterCallbacks, cb) for cb in callbacks
                    
166		@
                    
176	removeParsedErrorFilter: (callbacks...) ->
                    
177		array.pluckOneItem(@_parsedErrorFilters, cb) for cb in callbacks
                    
178		@
                    
                
data_sources_controller_spec.rb https://bitbucket.org/schatt/chorus.git | Ruby | 241 lines
                    
42        get :index, :entity_type => "gpdb_data_source", :all => true
                    
43        decoded_response.map(&:id).should =~ GpdbDataSource.pluck(:id)
                    
44      end
                    
47        get :index, :entity_type => "oracle_data_source", :all => true
                    
48        decoded_response.map(&:id).should =~ OracleDataSource.pluck(:id)
                    
49      end
                    
                
linear.rb https://gitlab.com/523/gitlab-ce | Ruby | 267 lines
                    
64          # This allows to do O(n) search of shortest prefixes
                    
65          all_traversal_ids = all.order('namespaces.traversal_ids').pluck('namespaces.traversal_ids')
                    
66          last_prefix = [nil]
                    
                
dast_api_latest_gitlab_ci_yaml_spec.rb https://gitlab.com/zillemarco/gitlab | Ruby | 130 lines
                    
38    let(:pipeline) { service.execute!(:push).payload }
                    
39    let(:build_names) { pipeline.builds.pluck(:name) }
                    
40
                    
103          let(:build_dast_api) { pipeline.builds.find_by(name: 'dast_api') }
                    
104          let(:build_variables) { build_dast_api.variables.pluck(:key, :value) }
                    
105
                    
116          let(:build_dast_api) { pipeline.builds.find_by(name: 'dast_api') }
                    
117          let(:build_variables) { build_dast_api.variables.pluck(:key, :value) }
                    
118
                    
                
relation_test.rb https://github.com/Tho85/rails.git | Ruby | 235 lines
                    
216
                    
217      assert_equal 3, relation.where(id: post.id).pluck(:id).size
                    
218    end
                    
                
facts.rb https://github.com/theforeman/foreman.git | Ruby | 105 lines
                    
60      full_name: N_('Default location'),
                    
61      collection: proc { Hash[Location.all.pluck(:title).map { |title| [title, title] }] })
                    
62    setting('default_organization',
                    
66      full_name: N_('Default organization'),
                    
67      collection: proc { Hash[Organization.all.pluck(:title).map { |title| [title, title] }] })
                    
68    setting('update_hostgroup_from_facts',
                    
                
lfs_restorer_spec.rb https://gitlab.com/klml/gitlab-ee | Ruby | 128 lines
                    
71        expect(
                    
72          project.lfs_objects_projects.pluck(:repository_type)
                    
73        ).to contain_exactly('project', 'wiki')
                    
114          expect(
                    
115            project.lfs_objects_projects.pluck(:repository_type)
                    
116          ).to contain_exactly('project')
                    
                
remote-db.service.ts https://gitlab.com/hearoy/M1-projetNomade | TypeScript | 172 lines
                    
110      // get the keys of the albums, from the metadata'
                    
111      const keys$ = this._metas.take(1).pluck<string>('0', '$key');
                    
112      // get the albums, from each key ~ [albums[photos... ]... ]
                    
                
SchoolStudentController.php https://bitbucket.org/Pranav1010/pratibha.git | PHP | 337 lines
                    
74
                    
75            $studentCourses = CourseStudentSchool::where('user_id', $id)->pluck('course_id')->toArray();
                    
76
                    
                
usage_rights_controller.rb https://gitlab.com/ykazemi/canvas-lms | Ruby | 178 lines
                    
157    ids = folder.active_sub_folders.inject([]) { |file_ids, folder| file_ids += enumerate_contents(folder) }
                    
158    ids += folder.active_file_attachments.pluck(:id)
                    
159  end
                    
165    file_ids = folders.inject([]) { |file_ids, folder| file_ids += enumerate_contents(folder) }
                    
166    file_ids += @context.attachments.not_deleted.where(id: Array(params[:file_ids]).map(&:to_i)).pluck(:id)
                    
167    update_attrs = {usage_rights_id: usage_rights}
                    
                
issuable_base_service.rb https://gitlab.com/matth/gitlab-ce | Ruby | 347 lines
                    
112
                    
113    params[key] = available_labels.where(id: params[key]).pluck(:id)
                    
114  end
                    
                
session.php https://gitlab.com/haque.mdmanzurul/wp-harpar-carolyn | PHP | 430 lines
                    
386		if ( ! has_filter( 'attach_session_information' ) ) {
                    
387			$sessions = wp_list_pluck( $sessions, 'expiration' );
                    
388		}
                    
                
inGroupsOf.html https://github.com/prototypejs/prototypejs.github.com.git | HTML | 319 lines
                    
123            
                    
124              <li><a href="pluck.html">pluck</a></li>
                    
125            
                    
291
                    
292students.pluck('name').inGroupsOf(4) {
                    
293// -&gt; [ ['Sunny', 'Audrey', 'Matt', '&#xC9;lodie'],
                    
                
collection.js https://gitlab.com/DGuedes/Angular2Playground | JavaScript | 42 lines
                    
29  'partition': require('./collection/partition'),
                    
30  'pluck': require('./collection/pluck'),
                    
31  'reduce': require('./collection/reduce'),
                    
                
criterion.rb https://github.com/tobioboye/Markus.git | Ruby | 272 lines
                    
120        criterion_ta_ids = criteria
                    
121          .map { |criterion| criterion.criterion_ta_associations.pluck(:id) }
                    
122          .reduce(:+)
                    
                
left_outer_join_association_test.rb https://github.com/cjolly/rails.git | Ruby | 91 lines
                    
39  def test_left_outer_joins_return_has_value_for_every_comment
                    
40    all_post_ids = Post.pluck(:id)
                    
41    assert_equal all_post_ids, all_post_ids & Post.left_outer_joins(:comments).pluck(:id)
                    
                
list.js https://gitlab.com/blocknotary/IonicInterviews | JavaScript | 184 lines
                    
40  } else if (!_.isNumber(def) && def != null) {
                    
41    this.selected = this.opt.choices.pluck('value').indexOf(def);
                    
42  }
                    
                
sort.js https://gitlab.com/0072016/SDK-JavaScript- | JavaScript | 417 lines
                    
104    var self = this;
                    
105    return _.pluck(self._sortSpecParts, 'path');
                    
106  },
                    
                
sql.md https://gitlab.com/artofhuman/gitlab-ce | Markdown | 287 lines
                    
135
                    
136## Plucking IDs
                    
137
                    
137
                    
138This can't be stressed enough: **never** use ActiveRecord's `pluck` to pluck a
                    
139set of values into memory only to use them as an argument for another query. For
                    
142```ruby
                    
143projects = Project.all.pluck(:id)
                    
144
                    
153
                    
154The _only_ time you should use `pluck` is when you actually need to operate on
                    
155the values in Ruby itself (e.g. write them to a file). In almost all other cases
                    
                
issue_actions.rb https://gitlab.com/hvlad/gitlab-ce | Ruby | 217 lines
                    
71            @updates[:remove_label_ids] =
                    
72              quick_action_target.labels.on_project_boards(quick_action_target.project_id).where.not(id: label_id).pluck(:id) # rubocop: disable CodeReuse/ActiveRecord
                    
73            @updates[:add_label_ids] = [label_id]
                    
                
remove_duplicated_cs_findings_without_vulnerability_id_spec.rb https://gitlab.com/axil/gitlab | Ruby | 106 lines
                    
61
                    
62    location_fingerprints = findings.pluck(:location_fingerprint).flat_map { |x| Gitlab::Database::ShaAttribute.new.deserialize(x) }
                    
63
                    
                
aspects_dropdown_view_spec.js https://bitbucket.org/cfield/diaspora.git | JavaScript | 126 lines
                    
2  function selectedAspects(view){
                    
3    return _.pluck(view.$("input.aspect_ids").serializeArray(), "value")
                    
4  }
                    
                
 

Source

Language