Returns the values to the group passed as parameter. If :behavior setting is used, so a
function in [lib/pdf/behaviors.rb] calculates the value of current field, else the report
method is called
438001
def calculate_footer_values group, source
            @footers[group.to_sym].each do |field, value|
                footer_rule = source[field]
                symbolize! footer_rule[1]
                unless footer_rule[1][:behavior].nil?
                    @footers[group.to_sym][field] = JunoReport::Pdf::Behaviors.send footer_rule[1][:behavior].to_sym, value, (@record.respond_to?(field) ? @record.send(field) : nil)
                else
                    if footer_rule[1][:value].blank?
                        value = !@record.class.reflect_on_association(group.to_sym).nil? ? @record.send(group.to_sym).send(field.to_sym) : @record.send(field)
                    else
                        value = footer_rule[1][:value]
                    end
                    @footers[group.to_sym][field] = footer_rule[1][:label].to_s + value
                end unless @footers[group.to_sym].nil? || footer_rule[1].nil?
            end
        end
705904
function (displayValue, currentlyOpen) {
                var self = this;
                if (currentlyOpen) {
                    var report = new ariaWidgetsControllersReportsDropDownControllerReport(), dataModel = this._dataModel;
                    report.displayDropDown = false;
                    report.value = dataModel.value;
                    report.text = dataModel.text;
                    return report;
                } else {
                    setTimeout(function () {
                        self._resourcesHandler.getAllSuggestions({
                            fn : self._suggestionsCallback,
                            scope : self,
                            args : {
                                nextValue : displayValue,
                                triggerDropDown : !currentlyOpen,
                                keepSelectedValue : true,
                                allSuggestions : true
                            }
                        });
                    }, 1);
                }
            }
508224
def value_parameters(self):
        
        return it.chain(self.value_backbone.parameters(), self.critic_head.parameters())
1004121
def _set_optimizer_param(optimizer, param_group, param_name, value):
    
    if param_group == 'all':
        groups = optimizer.param_groups
    else:
        groups = [optimizer.param_groups[int(param_group)]]

    for group in groups:
        group[param_name] = value
1340163
public String getGroupedValue() {
        StringBuilder sb = new StringBuilder();
        sb.append(getRegisternummer()).append(Constants.DOT);
        sb.append(getAccountType()).append(Constants.DOT);
        sb.append(getPartAfterAccountType());
        return sb.toString();
    }
956964
def get_flat_groups(self, field=None):
        '''
        
        '''
        field = field if field else self._determine_group_field(field)
        temp_groups = self.data['grouped'][field]['groups']
        return [y for x in temp_groups for y in x['doclist']['docs']]
256827
def group_ids=(values)
      values ||= []
      values = [ values ] unless values.is_a?(::Array)
      values = values.reject{|v| v.blank?}.map{|v| v.to_i}
      self.groups = Incline::AccessGroup.where(id: values).to_a
    end
1050665
def get_field_value(self, instance, field_name):
        
        # XXX: can we come up w/ a better API?
        # Ensure we map ``percent`` to the ``id`` column
        if field_name == 'percent':
            field_name = 'id'
        value = getattr(instance, field_name)
        if callable(value):
            value = value()
        return value
1225156
function() {
      try {
         
         // Save the previous value:
         var previousVal = null;
         
         // Close a previously created group
         if(this.group) {
            previousVal = this.group.getValue();
            this.group.close();
            this.group.destroy();
            this.groupOptionsWrapper.innerHTML = "";
         }
      
         // Get value is directly the class !!
         var classO = inputEx.getFieldClass(this.typeSelect.getValue());
         
         // Instanciate the group
         var groupParams = {fields: classO.groupOptions, parentEl: this.groupOptionsWrapper};
         this.group = new inputEx.Group(groupParams);
         
         // Set the previous name/label
         if(previousVal) {
            this.group.setValue({
               name: previousVal.name,
               label: previousVal.label
            });
         }
         
         // Register the updated event
         this.group.updatedEvt.subscribe(this.onChangeGroupOptions, this, true);
            
         // Create the value field
         this.updateFieldValue();
         
      } catch(ex) {
         if(YAHOO.lang.isObject(window["console"]) && YAHOO.lang.isFunction(window["console"]["log"]) ) {
            console.log("inputEx.TypeField.rebuildGroupOptions: ", ex);
         }
      }
         
   }
169395
def get_parameter(self):
        
        current_index = self.input.currentIndex()
        selected_value = self.input.itemData(current_index, Qt.UserRole)
        if hasattr(selected_value, 'toPyObject'):
            selected_value = selected_value.toPyObject()

        try:
            self._parameter.value = selected_value
        except ValueError:
            err = self.raise_invalid_type_exception()
            raise err

        radio_button_checked_id = self.default_input_button_group.checkedId()
        # No radio button checked, then default value = None
        if radio_button_checked_id == -1:
            self._parameter.default = None
        # The last radio button (custom) is checked, get the value from the
        # line edit
        elif (radio_button_checked_id
              == len(self._parameter.default_values) - 1):
            self._parameter.default_values[radio_button_checked_id] \
                = self.custom_value.value()
            self._parameter.default = self.custom_value.value()
        else:
            self._parameter.default = self._parameter.default_values[
                radio_button_checked_id]

        return self._parameter
1021842
function aggregateParams(_, pulse) {
  var key    = _.field,
  value  = _.value,
      op     = (_.op === 'count' ? '__count__' : _.op) || 'sum',
      fields = accessorFields(key).concat(accessorFields(value)),
      keys   = pivotKeys(key, _.limit || 0, pulse);

  return {
    key:      _.key,
    groupby:  _.groupby,
    ops:      keys.map(function() { return op; }),
    fields:   keys.map(function(k) { return get(k, key, value, fields); }),
    as:       keys.map(function(k) { return k + ''; }),
    modified: _.modified.bind(_)
  };
}
907668
def evaluate_behaviors(text)
      modified_text = text
      if @behavior_objects
        @behavior_objects.each do |b|
          modified_text = b.evaluate(modified_text)
        end
      end
      modified_text
    end
561793
def to_representation(self, value):
        
        results = {}
        for action, method_names in self.action_method_map.items():
            # If using global permissions and the global method exists for this action.
            if not self.object_only and method_names.get('global', None) is not None:
                results[action] = getattr(self.parent.Meta.model, method_names['global'])(self.context['request'])
            # If using object permissions, the global permission did not already evaluate to False and the object
            # method exists for this action.
            if not self.global_only and results.get(action, True) and method_names.get('object', None) is not None:
                results[action] = getattr(value, method_names['object'])(self.context['request'])
        return results
640643
def group(self):
        
        retval = None
        parent = self.get_parent()
        Group = get_group_model()
        if issubclass(parent.specific_class, Group):
            retval = parent.specific
        if retval is None:
            retval = self.group_page
        return retval
85726
def calculate(enterprise_id, trend_type, ts = Time.now.floor)
        args = {
          enterprise_id: enterprise_id,
          ts: ts,
          type: trend_type
        }

        klass = @trend_for.constantize
        hitsResult = klass.public_send(:where, args)
        trends = hitsResult.map { |h| counter2trend(h) }

        # group trends as per the time of their happening and rank them on their
        # score
        grouped_trends = trends.group_by { |x| x.ts }
        grouped_trends.each do |_ts, trendlist|
          sorted_trendlist = trendlist.sort_by { |x| x.score }
          sorted_trendlist.each_with_index do |trend, index|
            trend.rank = index
            trend.type = trend_type
            trend.save!
          end
        end
    end
221732
def values(self):
        
        result = {}
        result['fontsz'] = self.ui.fontszSpnbx.value()
        result['display_attributes'] = self.ui.detailWidget.getCheckedDetails()
        return result
72343
function(viewOptions) {
      var view = this;
      if (!_.isEmpty(this.behaviors)) {
        view.__behaviorInstances = {};
        _.each(this.behaviors, function(behaviorDefinition, alias) {
          if (!_.has(behaviorDefinition, 'behavior')) {
            behaviorDefinition = {behavior: behaviorDefinition};
          }
          var BehaviorClass = behaviorDefinition.behavior;
          if (!(BehaviorClass && _.isFunction(BehaviorClass))) {
            throw new Error('Incorrect behavior definition. Expected key "behavior" to be a class but instead got ' +
              String(BehaviorClass));
          }

          var behaviorOptions = _.pick(behaviorDefinition, function(value, key) {
            return key !== 'behavior';
          });
          behaviorOptions.view = view;
          behaviorOptions.alias = alias;
          var behaviorAttributes = behaviorDefinition.attributes || {};
          var behaviorInstance = view.__behaviorInstances[alias] = new BehaviorClass(behaviorAttributes, behaviorOptions, viewOptions);
          // Add the behavior's mixin fields to the view's public API
          if (behaviorInstance.mixin) {
            var mixin = _.result(behaviorInstance, 'mixin');
            _.each(mixin, function(field, fieldName) {
              // Default to a view's field over a behavior mixin
              if (_.isUndefined(view[fieldName])) {
                if (_.isFunction(field)) {
                  // Behavior mixin functions will be behavior-scoped - the context will be the behavior.
                  view[fieldName] = _.bind(field, behaviorInstance);
                } else {
                  view[fieldName] = field;
                }
              }
            });
          }
        });
      }
    }