Blackberry - how to Display Dynamic Table Layout view - blackberry

In Blackberry, How to Create Dynamic Layout View which data is parsed and loaded using XML or JSON Parser and Table Layout be like as below
-----------------------
image| Text
-----------------------
image|Text | image|Text
-----------------------
image|Text | image|Text
-----------------------
-----------------------
image| Text
-----------------------
image|Text | image|Text
-----------------------
image|Text | image|Text
-----------------------
Please Provide Sample Code

Take a look at FlowFieldManager, it should do what you want.

Related

How to get a static hardcoded table with number, caption and reference in Rmarkdown? [duplicate]

This question already has answers here:
Referencing a 'hand-made' table using bookdown package
(3 answers)
Closed last month.
I am trying to include a table in an Rmarkdown document, which is going to be rendered both in PDF and in HTML. I would like the table to float in the PDF version, and have a running number and a caption, and be linkable using \#ref.
Everything I have found in the interwebs is about how to produce a dynamic table based on some structure, using knitr and variants. I don't want that. I want a static, hardcoded table, and I have not been able to get this to work.
As an example, I have the following in my file tabletest.Rmd:
---
output: pdf_document
---
Lorem ipsum
| | Covered | Not covered |
| :---------- | :-------: | ------------: |
| Observed | $k$ | $n-k$ |
| Expected | $qn$ | $(1-q)n$ |
See Table X.
This is roughly the output I would like in PDF:
I created the desired output by LaTeXing a file with these contents:
\documentclass{article}
\begin{document}
Lorem ipsum
\begin{table}
\begin{tabular}{|c|c|c|}
& Covered & Not covered \\ \hline
Observed & $k$ & $n-k$ \\
Expected & $qn$ & $(1-q)n$
\end{tabular}
\caption{A table}\label{ref: table}
\end{table}
See Table \ref{ref: table}.
\end{document}
You have to use bookdown::pdf_document2, rather than (rmarkdown::)pdf_document, to use cross-references within a document, as explained in 4.7 Cross-referencing within documents of R Markdown Cookbook. You can make a cross-reference to a table by inserting (\#tab:label) to the table caption and by refering the table using \#ref(tab:label). See also the second paragraph from the last in 2.5 Tables of bookdown: Authoring Books and Technical Documents with R Markdown.
---
output:
bookdown::pdf_document2: default
---
Lorem ipsum
| | Covered | Not covered |
| :---------- | :-------: | ------------: |
| Observed | $k$ | $n-k$ |
| Expected | $qn$ | $(1-q)n$ |
Table: (\#tab:ref2tab-first) The caption for the first table
See Table \#ref(tab:ref2tab-first)
and compare it with Table \#ref(tab:ref2tab-second).
| | purchased | Not purchased |
| :---------- | :---------: | :-------------: |
| food | sausage | bread |
| book | bookdown | cookbook |
Table: (\#tab:ref2tab-second) The caption for the second table

Fill in blank cells from several columns in ={ARRAYFORMULA()}

I have a human-friendly sheet with sparse hierarchical data:
SEASON | FRUIT | LETTER
-----------------------------
Winter | |
| Lemons |
| | Delta
Summer | |
| | Alpha
| | Beta
| Pears |
| | Gamma
(Note how Alpha and Beta don't have a FRUIT entry.)
I want to generate a new column, using ARRAYFORMULA(), to contain a full "path" to the LETTER:
SEASON | FRUIT | LETTER | PATH
------------------------------------
Winter | | | Winter//
| Lemons | | Winter/Lemons/
| | Delta | Winter/Lemons/Delta
Summer | | | Summer//
| | Alpha | Summer//Alpha
| | Beta | Summer//Beta
| Pears | | Summer/Pears/
| | Gamma | Summer/Pears/Gamma
Please help me to understand how to write such ARRAYFORMULA().
I'm trying approach, based on answers in Fill in blank cells in ={ARRAYFORMULA()}, but I'm stuck at resetting FRUIT to empty string for a new SEASON. I.e. this naïve implementation would yield Summer/Lemons/Alpha instead of Summer//Alpha:
={ ARRAYFORMULA(
IFERROR(VLOOKUP(ROW(SEASON), IF(SEASON<>"", { ROW(SEASON), SEASON }), 2, 1), "")
& "/" & IFERROR(VLOOKUP(ROW(FRUIT), IF(FRUIT<>"", { ROW(FRUIT), FRUIT }), 2, 1), "")
& "/" & LETTER
) }
Here is a sample spreadsheet created specifically to answer this question.
you will find this formula in cell E1 on a tab called Possible Solution.
=ARRAYFORMULA(IF(LEN(A:A&B:B&C:C),VLOOKUP(ROW(A:A),FILTER({ROW(A:A),A:A},LEN(A:A)),2,1)&"/"&VLOOKUP(ROW(B:B),FILTER({ROW(B:B),B:B},LEN(A:A&B:B)),2,1)&"/"&C:C,))
It uses the VLOOKUP(ROW(),FILTER(),[index],TRUE) technique to append the relevant parts of the path to one another.
Note the portion of the formula in the image which i believe was the crux of the trouble with the strategy you were trying...

Is it possible to generate example table for scenario in specflow?

The main problem is that example table is too long (below the example is a mock short, my real test would be ~300 lines). Is it possible to generate these table? I have mypage30.. it would be hard to maintain it
Scenario Outline: Check categories
Given I visit '<mypage>'
When I select '<category>'
Then the selected category is shown
Examples:
| mypage | category |
| page1 | mouse |
| page1 | cat |
| page1 | horse |
| page1 | do |
| page1 | duck |
| page2 | mouse |
| page2 | cat |
| page2 | horse |
| page2 | do |
| page2 | duck |
It's impossible to generate a content of .feature file automatically.
Yet I guess in your case you can make it other way.
One way is to store your table in .xlsx file and to use this file as a data source.
If you choose this option, it's very simply implemented in SpecFlow: https://specflow.org/plus/documentation/Prepare-feature-files-for-external-examples/
All you need is to specify the path to your source file:
#source:CalculatorExamples.xlsx
Examples:
| case | a | b | result |
Another way is to generate all the data within your test scenario. I don't know how you wanted to generate this table so I assume that the first way is better.

Highlighting duplicates over multiple rows using conditional formatting

I'm trying to create a Google spreadsheet to organise a seating plan. I've laid out the page with 11 separated smaller tables in a kind of grid format (for easier reading, as you can see it all without scrolling). Like this:
Table 1 | Table 2 | Table 3 |
Seat | Name | Diet | Seat | Name | Diet | Seat | Name | Diet |
1 | | | 1 | | | 1 | | |
2 | | | 2 | | | 2 | | |
I'm trying to create a conditional format to highlight cells where a name appears more than once.
So I created a conditional format with a custom formula as follows (the range covers the all tables):
COUNTIF($A$1:$O$42, A1)>1;
and I set the range to only the Name cells on the page.
However when I purposely set a duplicate the cells are not highlighted.
I thought that maybe my formula was wrong, so I put into a cell and pointed it at a duplicate cell and it returned TRUE.
So I'm at a loss a how to get it working.
Try this formula applied to range A3:O
=AND(ISTEXT(A3),COUNTIF($A$3:$O$42, A3)>1)
Example sheet is here: https://goo.gl/hChZbt

Is it possible to link to a bookmark within a PDF using URL parameters?

When providing a link to a PDF file on a website, is it possible to include information in the URL (request parameters) which will make the PDF browser plugin (if used) jump to a particular bookmark instead of just opening at the beginning?
Something like: http://www.somehost.com/user-guide.pdf?bookmark=chapter3 ?
If not a bookmark, would it be possible to go to a particular page?
I'm assuming that if there is an answer it may be specific to Adobe's PDF reader plugin or something, and may have version limitations, but I'm mostly interested in whether the technique exists at all.
Yes, you can link to specific pages by number or named locations and that will always work if the user's browser uses Adobe Reader as plugin for viewing PDF files.
For a specific page by number:
Link text
For a named location (destination):
Link text
To create destinations within a PDF with Acrobat:
Manually navigate through the PDF for the desired location
Go to View > Navigation Tabs > Destinations
Under Options, choose Scan Document
Once this is completed, select New Destination from the Options menu and enter an appropriate name
RFC 3778 section 3 specifies "Fragment Identifiers" that can be used with PDF files, which include nameddest and page.
There are multiple query parameters that can be handled.
Full list below:
Source
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| Syntax | Description | Example |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| nameddest=destination | Specifies a named destination in the PDF document | http://example.org/doc.pdf#Chapter6 |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| page=pagenum | Specifies a numbered page in the document, using an integer | http://example.org/doc.pdf#page=3 |
| | value. The document’s first page has a pagenum value of 1. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| comment=commentID | Specifies a comment on a given page in the PDF document. Use | #page=1&comment=452fde0e-fd22-457c-84aa- |
| | the page command before this command. | 2cf5bed5a349 |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| collab=setting | Sets the comment repository to be used to supply and store | #collab=DAVFDF#http://review_server/Collab |
| | comments for the document. This overrides the default comment | /user1 |
| | server for the review or the default preference. The setting is of the | |
| | form store_type#location, where valid values for store_type are: | |
| | ● DAVFDF (WebDAV) | |
| | ● FSFDF (Network folder) | |
| | ● DB (ADBC) | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| zoom=scale | Sets the zoom and scroll factors, using float or integer values. For | http://example.org/doc.pdf#page=3&zoom=200,250,100 |
| zoom=scale,left,top | example, a scale value of 100 indicates a zoom value of 100%. | |
| | Scroll values left and top are in a coordinate system where 0,0 | |
| | represents the top left corner of the visible page, regardless of | |
| | document rotation | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| view=Fit | Set the view of the displayed page, using the keyword values | http://example.org/doc.pdf#page=72&view=fitH,100 |
| view=FitH | defined in the PDF language specification. For more information, | |
| view=FitH,top | see the PDF Reference. | |
| view=FitV | Scroll values left and top are floats or integers in a coordinate | |
| view=FitV,left | system where 0,0 represents the top left corner of the visible | |
| view=FitB | page, regardless of document rotation. | |
| view=FitBH | Use the page command before this command. | |
| view=FitBH,top | | |
| view=FitBV | | |
| view=FitBV,left | | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| viewrect=left,top,wd,ht | Sets the view rectangle using float or integer values in a | |
| | coordinate system where 0,0 represents the top left corner of the | |
| | visible page, regardless of document rotation. | |
| | Use the page command before this command. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| pagemode=bookmarks | Displays bookmarks or thumbnails. | http://example.org/doc.pdf#pagemode=bookmarks&page=2 |
| pagemode=thumbs | | |
| pagemode=none | | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| scrollbar=1|0 | Turns scrollbars on or off | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| search=wordList | Opens the Search panel and performs a search for any of thewords in the specified word list. | #search="word1 word2" |
| | The first matching word ishighlighted in the document. | |
| | The words must be enclosed in quotation marks and separated byspaces. | |
| | You can search only for single words. You cannot search for a string of words. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| toolbar=1|0 | Turns the toolbar on or off. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| statusbar=1|0 | Turns the status bar on or off. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| messages=1|0 | Turns the document message bar on or off. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| navpanes=1|0 | Turns the navigation panes and tabs on or off. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| highlight=lt,rt,top,btm | Highlights a specified rectangle on the displayed page. Use the | |
| | page command before this command. | |
| | The rectangle values are integers in a coordinate system where | |
| | 0,0 represents the top left corner of the visible page, regardless of | |
| | document rotation | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
| fdf=URL | Specifies an FDF file to populate form fields in the PDF file beingopened. | #fdf=http://example.org/doc.fdf |
| | Note: The fdf parameter should be specified last in a URL. | |
+-------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------+
It's worth adding that Wayne's solution also works in:
Chrome (since v. 14 from 2011, see this issue for details) (tested on v. 87 and v. 44),
Firefox (tested on v. 84.0.1 and v. 40),
Opera (tested on v. 73 and v. 31),
Safari (tested on v. 14.0.2, it didn't work on v. 8),
(Updated with the current versions as of January 2021.)
PDF Open Parameters documents the available URL fragments you can use.

Resources