Im trying to learn bourbon-neat, came across its breakpoint feature that takes a query and grid-columns. What is the use of grid-columns there? Why would you set the grid-columns like that when you can change the columns on the fly with declaration to span-columns?
Just need abit more explanation as to why you will provide a second parameter.
It is just to provide a little more flexibility. You may never use it, but for instance you may wish to have a 12 column grid for large screens and a 5 column grid for smaller columns. In this instance span-columns would not work as 12 cannot be divided by 5.
Admittedly you may not use it that often!
Related
Multisort seems to work just fine...as long as you are using built-in sort types (see this example, which loads with the first two columns included in the default sort). As soon as I attempt to use a custom sort function, sorting only seems to take into account the first column specified (see this example, which is identical to the functional first example - although it specifies a custom sort function). I tried looking through the documentation, as well as looking through the source code for the built-in sort types, and I don't see anything different from what I am doing?
(Interestingly enough, the sort icons would make it seem like both columns were sorted; but if you put a breakpoint in the custom sort function, you can clearly see that it never gets called for the second column. Also potentially worth noting is that this only seems to be an issue if both columns use a custom sort. If I alter the second example such that the first column uses one of the built-in sort types - either by manually using one, or just accepting the default - then the multisort appears to function as expected. In the inverse case, using a custom sort for the first column and a built-in sort for the second column, again only the first column specified is actually sorted. I also [posted this as a potential bug on the project itself][https://github.com/tannerlinsley/react-table/issues/3512], but am cross-posting it here on the off chance that I just missed something when attempting to implement my custom sort functions.)
From the corresponding project issue:
"This, in fact, seems to be a problem with your custom sort type. You see, in the example you provided, your defaultAlphanumericSort only returns 1 or -1.
However, if you look at the defaultOrderByFn of react-table, you will notice that the secondary (tertiary and so on ... ) sorting is only applied, if the previous sorting functions returned 0. Extend your custom sort type to return 0 on equality and you should be fine."
Struggling to find rank values from highest to lowest, please see attached example of what I'm trying to achieve.
My current custom expression is:
Sum([ViolationAmt])
I have tried this:
Sum([ViolationAmt]) over Rank([ViolationAmt])
I've played around with the rank expressions however unable to implement...would be very grateful for some help.
Spotfire Rank Example
I need to make a lot of assumptions here because I don't know anything about your data set or really what your end goal is, so please comment back and/or provide more info in your question if I am off base.
the first assumption is that each row in your dataset represents one, for simplicity, [AccountID] with a [ViolationAmt]. I'm also guessing you want to show the top N accounts with the highest violations in a table, since that's what you've shown here.
so it sounds like you are going to need two calculated columns: one for getting the total [ViolationAmt] per account, and then another to rank them.
for the first, create a column called [TotalViolationAmt] or somesuch and use:
Sum([ViolationAmt]) OVER ([AccountID])
for the second:
Rank([TotalViolationAmt])
it will be useful to read the documentation on ranking functions if you haven't already.
you could probably combine these two into a single column with something like:
Rank(Sum([ViolationAmt]) OVER ([AccountID]))
but I haven't tested this at all. again, if you put in a bit more detail about what you're trying to accomplish it will help you get a better, more detailed answer :)
I am creating an application with a lot of links. Because the links are contained in cells in a table, the urls that are generated by Wicket tend to get long, making the page slower to load.
For example:
2011-06-09 00:00:00.0
I try to figure out where to start exploring the encoding / decoding of URLs, but it is rather complex material. My first approach was to just use 'short' names for components (like "t", "f" etc). I can imagine there is a better approach.
I can image it would be possible just to 'number' the links; as the page still exists, so I would end up with something like this:
2011-06-09 00:00:00.0
Are there solutions for my problem already out there, or can anyone point me to the right direction?
If a Javascript solution is acceptable, you can use a single event listener on the whole table instead of many links in the table.
See this example for an inspiration:
https://github.com/svenmeier/apachecon-wicket/tree/master/src/main/java/eu/apachecon/base/ui/performance
Notice how the Ajax behavior transports dynamic extra parameters to the server. It looks for rows only though. if you need to distinguish between table cells being clicked, you'll have to expand on the idea.
The solution suggested by Sven is the better solution.
Here is a solution which you may call fundamental: register your own root IRequestMapper that will compress/uncompress the generated urls by the real mappers. See CryptoMapper and HttpsMapper for example of custom root mapper.
How do you use SetAutoPageBreak in fpdf if you want it to be enabled? On the net I've found all sorts of variants:
$p->SetAutoPageBreak(1,20);
$p->SetAutoPageBreak(true,20);
$p->SetAutoPageBreak('true',20);
$p->SetAutoPageBreak(on,20);
$p->SetAutoPageBreak('on',20);
$p->SetAutoPageBreak('on','20');
Thanks!
SetAutoPageBreak accepts a boolean value for it's first parameter so all the examples you have shown are valid.
See the PHP manual for details on what values are evaluated to true/false. Personally, I would use true or maybe 1. It's clear and easy to understand when you review your code in the future.
Are you having trouble with the output or was it just a curiosity question?
EDIT:
MultiCell is just that, it has multiple cells, to allow for line breaks etc. The page break will only occur if one of the cells breaches the limit and even then it will just break for that cell. So, in effect a paragraph of text over multiple lines may be split across two pages, but the last line on the page won't breach the margin limit.
You might want to consider using cell or, forcing a page break using AddPage.
I made a report with about 30 different rectangles and textboxes that have different visibility expressions depending on the parameters. (It's a student invoice and many different messages have to appear depending on the semester) When I made all the expressions I coded in the parameters in all upper case. Now I have a problem when users enter lowercase letters, the SQL all works fine since it is not case sensitive, but the different rectangles and textboxes don't show. Is there a way in the report code to first capitalize all the parameters before running the SQL? Or do I actually have to go back to every visibility expression and add separate iif's for upper and lower case? (That seems incredibly silly to have to do). I can't change my parameters to numbers because I have been given strict requirements for input. Thanks.
I do not know if this is the most elegant solution, but you could accomplish this by following this procedure for every parameter on the Report Parameters page:
1)Re-name the parameter, leaving its prompt as that of the old parameter.
2)Add a new parameter with the same name as the old parameter.
3)Mark this new parameter as Hidden.
4)Make sure that the new parameter's available values are marked as non-queried(available values will never be actually used.)
5)Mark the Default Values as Non-queried, using the following syntax:
=ucase(Parameters!OldParameterName.Value)
Can't you just UCASE the params (do it in the xml view, it will be quicker and you might even be able to do a regex find/replace)