footer group band (gc!= null & hasFunction=true)
3517
private void printBand(GroupCache gc, Band staticBand, boolean hasFunction, boolean usePrevious)
            throws QueryException {

        Band band;
        List<FunctionCache> fCache = null;
        isDetail = false;
        boolean isPageHeaderFooter = false;
        if (gc == null) {
            if (staticBand != null) {
                band = staticBand;
                if (ReportLayout.PAGE_HEADER_BAND_NAME.equals(band.getName()) || ReportLayout.PAGE_FOOTER_BAND_NAME.equals(band.getName())) {                	
                	isPageHeaderFooter = true;
                }
            } else {
                isDetail = true;
                band = getReportLayout().getDetailBand();
            }
        } else {
            fCache = gc.getFuncCache();
            if (hasFunction) {
                band = gc.getFgBand();
            } else {
                band = gc.getHgBand();
            }
        }
        currentBandName = band.getName();        

        int rows = band.getRowCount();
        int cols = band.getColumnCount();
        Set<CellElement> ignored = getIgnoredCells(band);        
        int lastRow = -1;        
        for (int i = 0; i < rows; i++) {
        	
            // hide when expression
            // a hidden cell is considered to be rendered with null value (but value is taken
            // into account in functions)
            // if all cells from a row are hidden , we consider the entire row hidden (hideAll)
            // and no cell from that row is rendered
            boolean[] hide = new boolean[cols];
            boolean hideAll = false;
            int count = 0;
            boolean rowWithHideExpression = false;
            boolean hideExpressionForEmptyData = false;
            for (int j = 0; j < cols; j++) {
                BandElement bandElement = band.getElementAt(i, j);
                if ((bandElement != null) && (bandElement.getHideWhenExpression() != null)) {
                   rowWithHideExpression = true;
                   if (hideExpressionForEmptyData(bandElement.getHideWhenExpression())) {
                	   hideExpressionForEmptyData = true; 
                   }
                }
            }
            if (rowWithHideExpression) {
                for (int j = 0; j < cols; j++) {
                    BandElement bandElement = band.getElementAt(i, j);
                    if ((bandElement != null) && (bandElement.getHideWhenExpression() != null)) {
                        String expression = bandElement.getHideWhenExpression();
                        Boolean result = (Boolean) evaluateExpression("", expression, currentBandName, null, gc);
                        hide[j] = result;
                    } else {
                    	// bandElement can be null in older version of reports (previous to 4.1)
                        hide[j] = (bandElement == null) || "".equals(bandElement.getText());                                                
                    }
                    if (hide[j]) {
                        count++;
                    }
                }
                if (count == cols) {
                    hideAll = true;
                }
            }
            
            if (printRowsForEmptyData && !hideExpressionForEmptyData) {
            	continue;
            }
            
            for (int j = 0; j < cols; j++) {
                
                if (findIgnoredCellElement(ignored, i, j)) {
                    //System.out.println("*** header ignored i="+i + "  j="+j);                	
                    continue;
                }                                
                
                // newRow is computed relative to cells that are renedered through exportCell
                // ignored cells are not taken into account
                if (i > lastRow) {                	
                    newRow = true;                                              
                } else {
                    newRow = false;                    
                }
                
                BandElement bandElement = band.getElementAt(i, j);      
                if (bandElement != null) {
                	newRowCount = Math.max(newRowCount, bandElement.getRowSpan());
                }
                if (newRow) {                       	
                	int gridRow = getReportLayout().getGridRow(band.getName(), i);
                	RowElement re = getRowElement(getReportLayout(), gridRow);
                	// if new page is put for the first row in the layout, we should not create a new page                	
                	if (re.isStartOnNewPage() && !start ) {
                		if (!startNewPage) {
                			// if header on every page, must not use header rows inside pageRow count              			
                			if (getReportLayout().isHeaderOnEveryPage()) {
                				if (pageRow - headerRow > 0) {                				
                					createNewPage();
                				}
                			} else {
                				createNewPage();
                			}
                		} else {
                			// we create new page excepting only for first group or in case there are no header rows
                			if ( (getReportLayout().getHeaderBand().getRowCount() == 0) ||
                			    !(ReportLayout.GROUP_HEADER_BAND_NAME_PREFIX + "1").equals(band.getName())) {
                				createNewPage();
                			}
                			startNewPage = false;
                		}
                	}
                }
                
                
                // subreports with parameters can be used only inside detail band
                // we must update values for subreport parameters
                // parameter name used in subreport must be the column alias from parent report !
                //
                // !!! we may have a subreport with parameters inside another subreport, so we always try yo add parameters from subreports
                if (isDetail && ((bandElement instanceof ReportBandElement) || (bandElement instanceof ChartBandElement))) {
                	Map<String, QueryParameter> params = bean.getParametersBean().getSubreportParams();
                	if (params.size() == 0) {
                		// first time we have to look for subreports and add parameters of subreports that are not yet found in master report
                		List<Report> subreports = ReportUtil.getDetailSubreports(bean.getReportLayout());
                		for (Report subreport : subreports) {
                			bean.getParametersBean().addNotFoundSubreportParameters(subreport.getParameters());
                		}
                		// similar for charts
                		List<Chart> charts = ReportUtil.getDetailCharts(bean.getReportLayout());
                		for (Chart chart : charts) {
                			bean.getParametersBean().addNotFoundSubreportParameters(chart.getReport().getParameters());
                		}
                	}
                	for (QueryParameter qp : params.values()) {                								                		
                		try {
                			Object pValue = getResult().nextValue(qp.getName());
                			bean.getParametersBean().setParameterValue(qp.getName(), pValue);
                		} catch (QueryException ex) {
                			// if parameter is in third level (report->subreport->subreport:param) it won't be found in first level report
                			if (!bean.isSubreport()) {
                				throw new QueryException("Invalid column for parameter: " + qp.getName(), ex);
                			}                			
                		}
                	}
                }
                
                Object value = getBandElementValue(fCache, gc, staticBand, hasFunction, usePrevious, bandElement);

                // hide when expression
                if (!hideAll && hide[j]) {
                    value = null;
                }

                int rowSpan = 1, colSpan = 1;
                if (bandElement != null) {
                    rowSpan = bandElement.getRowSpan();
                    colSpan = bandElement.getColSpan();
                }

                int gridRow = getReportLayout().getGridRow(band.getName(), i);
                boolean isImage = bandElement instanceof ImageBandElement;
                
                if (!hideAll) {
                    exportCell(band.getName(), bandElement, value, gridRow, i, j, cols, rowSpan, colSpan, isImage);                    
                }
                lastRow = i;
                
                // after exportCell where we may use newRow and newRowCount variables
                // we need to reset newRowCount
                if (newRow) {
                	newRowCount = 1;
                }
            }
            // page header and page footer do not count for row computation
            if (!isPageHeaderFooter) {
            	exporterRow++;
            	if (!hideAll) {
            		if (ReportLayout.HEADER_BAND_NAME.equals(band.getName())) {
        				headerRow++;
        			}
            		pageRow++;
            	}            	
                start = false;                	
            }
           
        }        
    }
393940
private void markUngroupedEnclosedNodes(InstructionGroup group) {
        while_:
        while (true) {
            for (int i = getIndexOfFirstInsn(group), max = getIndexOfLastInsn(group); i < max; i++) {
                InstructionGraphNode node = method.getGraphNodes().get(i);
                if (node.getGroup() == null) {
                    markGroup(node, group);
                    sort(group);
                    continue while_;
                }
            }
            break;
        }
    }
1080840
function checkGroup(query, group) {
    if (group instanceof Array) {
      // check each condition from group
      for ( var c in group) {
        check(query, group[c]);
      }
    }
  }
1275530
Rule IfieldGroup() {
		return Sequence(String("[G:"),
				ZeroOrMore(WSP()).suppressNode(),
				TexTextIfield(),
				String("]"))
			.label(IfieldGroup);
	}
278301
public void setOnFooterViewBindViewHolderListener(FamiliarRecyclerView.OnFooterViewBindViewHolderListener onFooterViewBindViewHolderListener) {
        if (null != mWrapFamiliarRecyclerViewAdapter) {
            mWrapFamiliarRecyclerViewAdapter.setOnFooterViewBindViewHolderListener(onFooterViewBindViewHolderListener);
        } else {
            mTempOnFooterViewBindViewHolderListener = onFooterViewBindViewHolderListener;
        }
    }
1222293
function isGroupResult(item) {
  log.trace('isGroupResult(%j)', item);

  if (! item) return(false);
  if (item.groupType) return(true);
  if (item.objectCategory) {
    re.isGroupResult.lastIndex = 0; // Reset the regular expression
    return(re.isGroupResult.test(item.objectCategory));
  }
  if ((item.objectClass) && (item.objectClass.length > 0)) {
    return(_.any(item.objectClass, function(c) { return(c.toLowerCase() === 'group'); }));
  }
  return(false);
}
226940
function _LayoutCommon_groupFromOffset(offset) {
                    return offset < this._groups[0].offset ?
                        0 :
                        this._groupFrom(function (group) {
                            return offset < group.offset;
                        });
                }
1215513
@Nonnull
  public TypeaheadDataset setFooter (@Nullable final String sFooterHTML)
  {
    return setFooter (StringHelper.hasText (sFooterHTML) ? JSExpr.lit (sFooterHTML) : (IJSExpression) null);
  }
808379
public GroupBuilder setAllowSplitting(boolean headerSplit, boolean footerSplit) {
		group.setAllowHeaederSplit(headerSplit);
		group.setAllowFooterSplit(footerSplit);
		return this;
	}
770693
function footer() {
        $footer = $this->footer_content;
        if ($footer) {
            if ($this->header_type == GESHI_HEADER_PRE) {
                $footer = str_replace("\n", '', $footer);;
            }
            $footer = $this->replace_keywords($footer);

            if ($this->use_classes) {
                $attr = ' class="foot"';
            } else {
                $attr = " style=\"{$this->footer_content_style}\"";
            }
            if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) {
                $footer = "<tfoot><tr><td colspan=\"2\">$footer</td></tr></tfoot>";
            } else {
                $footer = "<div$attr>$footer</div>";
            }
        }

        if (GESHI_HEADER_NONE == $this->header_type) {
            return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '</ol>' . $footer : $footer;
        }

        if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) {
            if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
                return "</ol>$footer</div>";
            }
            return ($this->force_code_block ? '</div>' : '') .
                "$footer</div>";
        }
        elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) {
            if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
                return "</tr></tbody>$footer</table>";
            }
            return ($this->force_code_block ? '</div>' : '') .
                "$footer</div>";
        }
        else {
            if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
                return "</ol>$footer</pre>";
            }
            return ($this->force_code_block ? '</div>' : '') .
                "$footer</pre>";
        }
    }
1179064
public static ViewGroup buildStickyDrawerItemFooter(Context ctx, DrawerBuilder drawer, View.OnClickListener onClickListener) {
        //create the container view
        final LinearLayout linearLayout = new LinearLayout(ctx);
        linearLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        //set the background color to the drawer background color (if it has alpha the shadow won't be visible)
        linearLayout.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, R.attr.material_drawer_background, R.color.material_drawer_background));

        //create the divider
        if (drawer.mStickyFooterDivider) {
            addStickyFooterDivider(ctx, linearLayout);
        }

        fillStickyDrawerItemFooter(drawer, linearLayout, onClickListener);

        return linearLayout;
    }
95527
def make_footer
      footer = [
        @crc,              # bytes 0-3
        @zstream.total_in, # bytes 4-7
      ].pack 'VV'

      @io.write footer

      @zstream.flags |= Zlib::GzipFile::FOOTER_FINISHED
    end
1288434
public function footer() {
        global $CFG, $DB, $PAGE;

        // Give plugins an opportunity to touch the page before JS is finalized.
        $pluginswithfunction = get_plugins_with_function('before_footer', 'lib.php');
        foreach ($pluginswithfunction as $plugins) {
            foreach ($plugins as $function) {
                $function();
            }
        }

        $output = $this->container_end_all(true);

        $footer = $this->opencontainers->pop('header/footer');

        if (debugging() and $DB and $DB->is_transaction_started()) {
            // TODO: MDL-20625 print warning - transaction will be rolled back
        }

        // Provide some performance info if required
        $performanceinfo = '';
        if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {
            $perf = get_performance_info();
            if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {
                $performanceinfo = $perf['html'];
            }
        }

        // We always want performance data when running a performance test, even if the user is redirected to another page.
        if (MDL_PERF_TEST && strpos($footer, $this->unique_performance_info_token) === false) {
            $footer = $this->unique_performance_info_token . $footer;
        }
        $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);

        // Only show notifications when we have a $PAGE context id.
        if (!empty($PAGE->context->id)) {
            $this->page->requires->js_call_amd('core/notification', 'init', array(
                $PAGE->context->id,
                \core\notification::fetch_as_array($this)
            ));
        }
        $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);

        $this->page->set_state(moodle_page::STATE_DONE);

        return $output . $footer;
    }
6603
public function Footer()
    {
        $this->SetY(-15);
        $this->billetSetFont('footer');
        $this->Cell(88.5, 5, $this->PageNo() . " / $this->AliasNbPages");
        $this->Cell(88.5, 5, date('Y-m-d H:i:s O'), 0, 0, 'R');
    }
2913
function goDoc() {
  _traverseDOM(document);
  // add standard footer
  var ftr = document.createElement("div");
  ftr.className = "footer";
  var msg = "Copyright &copy; 1998-2015 by Northwoods Software Corporation.";
  if (go && go.version) {
    msg = "GoJS&reg; version " + go.version + ". " + msg;
  }
  ftr.innerHTML = msg;
  document.body.appendChild(ftr);
}
250639
protected void layoutGroups() {
		log.debug("Starting groups layout...");
		for (DJGroup columnsGroup : getReport().getColumnsGroups()) {
			JRDesignGroup jgroup = getJRGroupFromDJGroup(columnsGroup);

			jgroup.setStartNewPage(columnsGroup.isStartInNewPage());
			jgroup.setStartNewColumn(columnsGroup.isStartInNewColumn());
			jgroup.setReprintHeaderOnEachPage(columnsGroup.isReprintHeaderOnEachPage());
			jgroup.setResetPageNumber(columnsGroup.isResetPageNumber());

			JRDesignSection headerSection = (JRDesignSection) jgroup.getGroupHeaderSection();
			JRDesignSection footerSection = (JRDesignSection) jgroup.getGroupFooterSection();

			JRDesignBand header = LayoutUtils.getBandFromSection(headerSection);
			JRDesignBand footer = LayoutUtils.getBandFromSection(footerSection);

			//double check to prevent NPE
			if (header == null) {
				header = new JRDesignBand();
				headerSection.addBand(header);
			}
			if (footer == null) {
				footer = new JRDesignBand();
				footerSection.addBand(footer);
			}

			header.setHeight(columnsGroup.getHeaderHeight());
			footer.setHeight(columnsGroup.getFooterHeight());

			header.setSplitType(LayoutUtils.getSplitTypeFromBoolean(columnsGroup.isAllowHeaderSplit()));
			footer.setSplitType(LayoutUtils.getSplitTypeFromBoolean(columnsGroup.isAllowFooterSplit()));

			if (columnsGroup.getLayout().isPrintHeaders()) {
				boolean found = false;
				boolean skipPreviousGroupHeaders = false;
				int groupIdx = getReport().getColumnsGroups().indexOf(columnsGroup);
				if (groupIdx > 0) {
					DJGroup prevG = getReport().getColumnsGroups().get(groupIdx - 1);
					if (!(prevG.getColumnToGroupBy() instanceof GlobalGroupColumn))
						skipPreviousGroupHeaders = !prevG.getLayout().isShowValueForEachRow();
				}
				for (Object o : getVisibleColumns()) {
					AbstractColumn col = (AbstractColumn) o;

					//If in a nested group, header for column prior to this groups column
					//depends on configuration

					if (col.equals(columnsGroup.getColumnToGroupBy())) {
						found = true;
					}

					if (!found && skipPreviousGroupHeaders) {
						continue;
					}

					JRDesignTextField designTextField = createColumnNameTextField(columnsGroup, col);
					designTextField.setPositionType(PositionTypeEnum.FLOAT); //XXX changed to see what happens  (must come from the column position property)
					designTextField.setStretchType(StretchTypeEnum.NO_STRETCH); //XXX changed to see what happens (must come from the column property)
					header.addElement(designTextField);
				}
			}

			DJGroupLabel label = columnsGroup.getFooterLabel();
			if (label != null) {
				List<DJGroupVariable> footerVariables = columnsGroup.getFooterVariables();
				PropertyColumn col = columnsGroup.getColumnToGroupBy();
				int x = 0, y = 0;
				//max width
				int width = getDesign().getPageWidth() - getDesign().getLeftMargin() - getDesign().getRightMargin();
				int height = label.getHeight();
				int yOffset = 0;
				if (label.getLabelPosition() == LabelPosition.LEFT) {
					DJGroupVariable lmvar = findLeftMostColumn(footerVariables);

					x = col.getPosX(); //label starts in the column-to-group-by x position
					y = findYOffsetForGroupLabel(footer);
					if (lmvar != null) {
						AbstractColumn lmColumn = lmvar.getColumnToApplyOperation();
						width = lmColumn.getPosX() - x;
					} else
						width -= x;
					height = getFooterVariableHeight(columnsGroup);
				} else if (label.getLabelPosition() == LabelPosition.RIGHT) {
					DJGroupVariable rmvar = findRightMostColumn(footerVariables);

					if (rmvar != null) {
						AbstractColumn rmColumn = rmvar.getColumnToApplyOperation();
						x = rmColumn.getPosX() + rmColumn.getWidth();
					} else
						x = col.getPosX(); //label starts in the column-to-group-by x position
					y = findYOffsetForGroupLabel(footer);
					width -= x;
					height = getFooterVariableHeight(columnsGroup);
				} else if (label.getLabelPosition() == LabelPosition.TOP) {
					x = col.getPosX(); //label starts in the column-to-group-by x position
					width -= x;
					yOffset = height;
				} else if (label.getLabelPosition() == LabelPosition.BOTTOM) {
					x = col.getPosX(); //label starts in the column-to-group-by x position
					y = getFooterVariableHeight(columnsGroup);
					width -= x;
				}
				layoutGroupFooterLabels(columnsGroup, jgroup, x, y, width, height);
				layoutGroupVariables(columnsGroup, jgroup, yOffset);
			} else {
				layoutGroupVariables(columnsGroup, jgroup, 0);
			}

			layoutGroupSubreports(columnsGroup, jgroup);
			layoutGroupCrosstabs(columnsGroup, jgroup);
		}
	}
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