Prev | Current Page 169 | Next

David Berube

"Practical Reporting with Ruby and Rails"


\vspace{0.1in} % Add a small amount of
% whitespace between the
% header and the table.
\normalsize % Switch back to normal size.
\begin{tabular}{llll} % Start a table with four
% left-aligned columns.
\textbf{Item}& % Four headers, each in bold,
\textbf{Seller}& % with labels for each column.
\textbf{Count}&
\textbf{Average Price}\\\\
'
keywords.each do |keyword|
first=true
sellers.each do |seller|
total_items, average_price = *EBaySearch.get_average_price(keyword, seller)
latex_source << "
\\textbf{#{first ? keyword.latex_escape : ' '}} &
#{seller ? seller.latex_escape : 'First 100 eBay Results'} &
#{total_items} &
\\#{average_price ? ('$%0.2f' % average_price) : ''}
\\\\ "
# Note that the character & is the marker for the end of a cell, and
# that the sequence \\\\ is two escaped backslashes, which mark
# the end of the row.
first=false # This marker controls whether to redisplay the keyword.
# For visual formatting reasons, each keyword is
# shown only once.
end
end
CHAPTER 6 n TRACKING AUCTIONS WITH EBAY 120
latex_source << '
\end{tabular}
\end{document}'
fh = File.


Pages:
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
Kurs architektury wyprawy 47lw570s stolarka aluminiowa częstochowa Potopek