Manatee.Trello Limited to 50 labels in a board - manatee.trello

I am getting back all of the labels for a board and I guess we are hitting up against some limit now.
var board = new Board(boardString);
foreach (var label in board.Labels.ToList().OrderBy(x => x.Name))
{
Console.WriteLine(label.Name + " " + label.Id);
}
We have over 50 labels now and no dice? Any ideas?

As of version 1.17.0, I have added BoardLabelCollection.Filter(LabelColor) and BoardLabelCollection.Limit(int) to support this feature.

Related

How do I maximize the window to multiple monitors in awesome wm?

I have three monitors in a horizontal line. Sometimes i want to maximize a window to three monitors at once, by pressing a combination of keys (and then returning it all back if necessary). How can I do that?
Untested, but the basic idea is to make the window floating and resize it to cover everything:
function(c)
c.floating = true
local geo = screen[1].geometry
geo.x2 = geo.x + geo.width
geo.y2 = geo.y + geo.height
for s in screen do
local geo2 = s.geometry
geo.x = math.min(geo.x, geo2.x)
geo.y = math.min(geo.y, geo2.y)
geo.x2 = math.max(geo.x2, geo2.x + geo2.width)
geo.y2 = math.max(geo.y2, geo2.y + geo2.height)
end
c:geometry{
x = geo.x,
y = geo.y,
width = geo.x2 - geo.x,
height = geo.y2 - geo.y
}
end
To undo the above, make the client no longer floating, i.e. c.floating = false.
Wiring the above to a keybinding is left as an exercise for the reader.

Google Spreadsheet Chart options returning same width for all charts

Using apps script I want to increase the width and height of all the charts (any type of charts may be - generic) in a sheet. I tried the below code but it always alerts 371 x 600, no matter that charts are resized/shrink ed etc
var sheet = SpreadsheetApp.getActiveSheet();
var n = sheet.getCharts().length;
for (var i = 0; i < n; i++) {
var chart = sheet.getCharts()[i];
var th = chart.getOptions().get('height');
var tw = chart.getOptions().get('width');
showAlert(th + " " + tw);
chart = chart.modify()
.setOption('width', th + 20) //set increased width
.setOption('height', tw + 20) //set increased height
.build();
sheet.updateChart(chart);
}
It's working fine for me. (Note: the showAlert() function needs to be defined as described here: GAS-showAlert)
The only problem I see is that you've mixed up width and height variables for the Options in your code. But it is working for me, no problem.

Two xscreens uinput multitouch device, wrong coordinates on second x screen

First of all hi, this is my first question in stackoverflow :)
The hardware setup is 2 x nvidia gtx980 GPUs each connected to 3 monitors.
The videowall is arranged as one row of 6 monitors.
We are using the propietary nvidia drivers. The xserver version is 1.15.1 (7.7).
We create a uinput multitouch ABS (MT) device attached to a different master than the core pointer.
The max and min of ABS_X and ABS_MT_POSITION_X are set according to the size of both xscreens (0, 11520 - 1). This is checked using xinput list [device id].
As we are using two GPUs we are not able to create one large xscreen but we arrange 2 xscreens (one for each GPU) with three monitors aligned on each.
The problems lies on the second xscreen (xscreen1). When we emit touch events with x coordinate higher than 5760 (the size of the first xscreen) the points are reported by the xserver on a distant x coordinate (probably at the end of the second xscreen or farther away). We have checked this starting from xscreen0 and moving to the second. The y coordinate gets reported correctly (as both xscreens are y aligned).
The calibration matrix of the virtual multitouch device is the identity matrix.
If the uinput device is created as an ABS single point device (like a wacom tablet i guess) the x coordinate is reported correctly.
I'm thinking the problem might lay in evdev or inside the xserver (as i have read the new versions calibrate inside the server not in evdev). If this is the case any hint as to where this may happen would be great. If this is not the case any help is highly appreciated.
For anyone who may get this problem in the future, our team came up with a small patch a long time ago, here it goes in case it may be of use ...
---
dix/events.c | 21 +++++++++++++++++++--
mi/mieq.c | 26 ++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 8efdf18..5155ef5 100644
--- a/dix/events.c
+++ b/dix/events.c
## -2999,8 +2999,25 ## CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
/* Motion events entering DIX get translated to Screen 0
coordinates. Replayed events have already been
translated since they've entered DIX before */
- ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
- ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+
+ /*Now we take into account inputs comming from MT device that uses absolutes coordinates.*/
+ switch (ev->type) {
+ case ET_Motion:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
+ ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+ break;
+ case ET_TouchBegin:
+ case ET_TouchUpdate:
+ case ET_TouchEnd:
+ ev->root_x -= screenInfo.screens[0]->x;
+ ev->root_y -= screenInfo.screens[0]->y;
+ break;
+
+ }
}
else
#endif
diff --git a/mi/mieq.c b/mi/mieq.c
index 05447d6..cc151f6 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
## -447,6 +447,32 ## mieqMoveToNewScreen(DeviceIntPtr dev, ScreenPtr screen, DeviceEvent *event)
DequeueScreen(dev) = screen;
x = event->root_x;
y = event->root_y;
+
+
+ /*Now we take into account inputs comming from MT device that uses absolutes coordinates.*/
+ switch (event->type) {
+ case ET_Motion:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ // print
+ break;
+ case ET_TouchBegin:
+ case ET_TouchUpdate:
+ case ET_TouchEnd:
+ {
+ ScreenPtr screenPtr = dev->spriteInfo->sprite->pDequeueScreen;
+ x -= screenPtr->x;
+ y -= screenPtr->y;
+ NewCurrentScreen(dev, screenPtr, x, y);
+ return;
+ // break;
+ }
+ default:
+ break;
+ }
+
NewCurrentScreen(dev, DequeueScreen(dev), x, y);
}
}

Issues with naming ranges for charts within the Google Spreadsheet Script

I've been trying for days to create charts with an intelligent range, that differs when the data in the google spreadsheet is updated. However i succeeded doing so, i can't get the .setOption aspect to work. I want for example, a title, description etc with the chart. But this is not the main issue since i can insert there by hand.
More important however is the range name, because there isn't when i use the script. So, within the chart it is not possible to see what each column represents, and i really want to fix that. I tried to use the .setNamedRange() aspects, but that is not working.
Someone who can help me with that?
function check() {
var sheet = SpreadsheetApp.getActiveSheet();
var end = sheet.getLastRow();
var start = (end - 5);
var endnew = (end - 4);
var startnew = (end - 6);
if(sheet.getCharts().length == 0){
Logger.log("Er is geen grafiek");
var chartBuilder = sheet.newChart()
.asColumnChart().setStacked()
.addRange(sheet.getRange("A" + startnew + ":" + "A" + endnew)) // should have a name
.addRange(sheet.getRange("B" + startnew + ":" + "B" + endnew)) // should have a name
.addRange(sheet.getRange("E" + startnew + ":" + "E" + endnew)) //should have a name
.setOption('title', 'Effectief gebruik kantoorruimte') //not working
.setPosition(10, 10, 0, 0)
var chart = chartBuilder.build();
sheet.insertChart(chart);
}
else{
Logger.log("Er is wel een grafiek");
var charts = sheet.getCharts();
for (var i in charts) {
var chart = charts[i];
var ranges = chart.getRanges();
var builder = chart.modify();
for (var j in ranges) {
var range = ranges[j];
builder.removeRange(range);
builder
.addRange(sheet.getRange("A" + (start) + ":" + "A" + end)) //should have a name
.addRange(sheet.getRange("B" + (start) + ":" + "B" + end)) //should have a name
.addRange(sheet.getRange("E" + (start) + ":" + "E" + end)) // should have a name
.setOption('title', 'Effectief gebruik kantoorruimte')
.build();
sheet.updateChart(builder.build());
}
}
}
}
I'm assuming that this code is the issue?
builder
.addRange(sheet.getRange("A" + (start) + ":" + "A" + end))
Maybe try using the JavaScript toString() method to make sure that your text formula is working.
.addRange(sheet.getRange("A" + start.toString() + ":" + "A" + end.toString()))
There is a different format that you can use:
getRange(row, column, numRows, numColumns)
So, it would be:
getRange(start, 1, 1, numColumns)
That starts on row "start" in column A. It gets one row of data, and how ever many number of columns.

KRL using a bee sting inside extended quotes

What are valid bee sting expressions within an extended quote?
rule set_persistents {
select when pageview ".*"
noop();
always {
ent:ecount += 1 from 1;
app:acount += 1 from 1;
}
}
rule test_bee_stings {
select when pageview ".*"
pre {
sum = ent:ecount + app:acount;
content = <<
sum is #{sum}<br/>
sum + 1 is #{sum+1}<br/>
ecount is #{ent:ecount}<br/>
acount is #{app:acount}
>>;
}
notify("Results", content) with sticky = true;
}
When I run this I get nothing (never see the notify box). If I remove the ecount and acount lines I get
sum is 2
sum + 1 is 21
What bee sting expressions are valid within an extended quote? Is it any different for a normal quoted string?
Variables used in beestings in extended quotes should already have an assigned value and not be an expression. This is because beestings in extended quotes are evaluated on the client side and not the server side. I would also, for the previously explained reason, advise against using 'sum+1' in a beesting even though it currently works for endpoints that understand JavaScript.
Here is how I would write what you are trying to do:
ruleset a60x546 {
meta {
name "extended-quotes-beesting"
description <<
extended-quotes-beesting
>>
author "Mike Grace"
logging on
}
rule test_bee_stings {
select when pageview ".*"
pre {
ecount = ent:ecount + 1;
acount = app:acount + 1;
sum = ecount + acount;
sumplus = sum + 1;
content = <<
sum is #{sum}<br/>
sum + 1 is #{sumplus}<br/>
ecount is #{ecount}<br/>
acount is #{acount}
>>;
}
{
notify("Results", content) with sticky = true;
}
always {
ent:ecount += 1 from 1;
app:acount += 1 from 1;
}
}
}
action shot of app run several times on example.com using bookmarklet:
*I would also advise against using a previous rules postlude to modify app and entity variables that you then use in the next rule expecting it to be incremented. While what you did works it's semantically messy and would probably be a bit cleaner the way I have demonstrated.
**should be taken with a grain of salt since this is only one crazy guy's opinion. : )*