How to divide a table into multiple groups each has its own header which is used to sort its group using jQuery-tablesorter plugin ?? - tablesorter

Take a look at this demo
How tablesorter could help me to do such table ??
Thanks

As far as I'm aware, tablesorter can't handle independent sorts within a single table.
The best you can manage is separate, abutting tables, each with .tablesorter() invoked on it.

Related

Map data structure for lua like javascript has?

I need a lua data structure that works like javascripts Map(), is there some way?
As a bad solution, I've been maintaining two tables, one ordered table and one unordered table under mytable for this so far, and maintaining them both. So when I need to remove or add a key from one table, I need to also do that to the other table.
This way I can use mytable.unordered for fast existence checks
mytable.unordered[key]
and mytable.ordered for iteration (which has to be in order for my use case).

Run combiner on multiple measures with Python SDK?

I'm struggling to find a real world example on how to use google cloud dataflow combiners to run a common ETL tasl which aggregates records on multiple keys (e.g. Date, Location) and sums values over different measures (e.g. GrossValue, NetValue, Quantity). I can only find examples with a typical Key/Value (e.g. Day/Value) aggregation. Any hints on how this is done with the Python SDK would be appreciated.
I'm not 100% sure I understand your question. Do you have separate elements you are trying to join the data together for, in which case you may wish to use CoGroupByKey? Or does a single element have multiple fields?
Hope some of this info helps,
I would suggest looking at windowing, which will allow you to subdivide a PCollection according to the timestamps of its individual elements. If you want to see all the events for particular day this may be useful. Python examples of windowing. You may want to window across a days worth of data. This link is useful as well to understand how you can use GroupByKey in different ways,
Another option is to determine what date your elements belongs to, and use a group by key to key it with "[location][date][other]". You may need to do something like this if you want to join the data based on multiple fields.
See this GroupByKey example, but change the key to use your multiple fields concatenated.
Here is an example for reducing with a custom combiner. You can add logic here to do a custom aggregation for multiple different measurements.

Visual studio online query items without tags

When are working with various Work Item types (user stories,Tasks, etc) we assign tags to reference the area of work. This makes it easy to filter the Backlogs items view to find any related stories.
I would like to build a query to identify Work Items where the tags have not yet been assigned.
I know this can be achieved using excel and filtering, however I specifically would like to do this using the queries. Is this possible??
Thanks in advance for any assistance.
Firstly, I have to say that it is not possible to create work item query to show work items which don't contain tags. As you see that the Operator for Tags is Contains or Does Not Contain, it is not possible to use these two operators to filter out these non-tagged work items.
Secondly, as you have more than 100 tags, it is not an effective way to use "Does Not Contain" operator to exclude all tagged work items.
So,
How about you adding a 'Null' tag to all non-tagged work items to specify that these work items don't have any tags? With this approach, you can create a work item query with Tags Contains Null to list these non-tagged work items.
If you don't want to take this approach, you need to work with excel just as you mentioned above, or take Dave's advice to work with API.

Searching by several columns in diffrent tables using one input field

I know that this question or its variations were discussed many times.
But I didn't find exactly my solution.
I have many tables assume 10. I would like to provide a solution for searching in table1.field1, table2.field2, ... table10.field10 using only one form input field. When User is typing a searching phrase Autocomplete field have to suggest a list of available results with note a table its goes from.
First idea that comes in my mind is denormalization i.e. creation a separate table Table_for_search(field1, ..., field10) that contains data from tables was mentioned above.
My problem is I wouldn't like to use any heavy solutions like Sphinx, ElasticSearch etc. Also light solutions like meta_search.gem, ransack.gem look like not suitable for may situation.
Thanks in advance.

How to change model lazyloadness at runtime in Symfony?

I use sfPropelORMPlugin.
Lazyload is ok if I operate on one object per web page. But if there are hundreds I get hundreds of separate DB queries. I'd like to completely disable lazyload or disable it for needed columns on those particularly heavy pages but couldn't find a way so far.
You should join all your relations when you build your query, that way you'll get all data in a single query. Note, you have to use joinWithRelation() where Relation is a related table name.
Elaborating on William Durand's answer, perhaps you should also look at the Propel function doSelectjoinAll(), which should pre-load all of the objects related to your relations. Just keep in mind this can be expensive as it relates to memory.
Another technique is to create a custom criteria with your needed joins, then use a manual hydrate technique to add on to your base object. I do this often when the data I need is using aggregates or other columns that are not exactly mapped to objects. There are plenty of hydrate() examples around.
Added utility method to peer to be able to set what columns I want to load. Using "pseudo columns" for this type of DB queries. Also I have overridden hydrate() to understand this "markup". All were good until I found out that even though data is hydrated symfony won't understand it and won't let you use it as intended.
PS join was never considered as an option because site is kind of high load.

Resources