Multiple Objectives

Typical optimization models have a single objective function, while real-world optimization problems often have multiple, competing objectives.
So far blend mutiple objectives works, while which is not as good as lexicographic approach to control objectives in priority.
So could I request a new feature for CP-SAT about lexicographic multiple objectives? Thanks.

you can :-)
It will be low priority though.

you can :-)
It will be low priority though.

So for now there is still not any functions allow us to set the priority to multiple objective?
Example in Cplex:
The function minimizeStaticLex specifies to CP Optimizer a number of floating-point expressions whose values are sought to be minimized in a lexicographic fashion. When this function is used and the problem is feasible, CP Optimizer will generate one or more feasible solutions to the problem, with subsequent solutions having a lexicographically smaller value of exprs than preceding ones. This means that a new solution replaces the preceding one as incumbent if the value of criterion exprs[i] is less than in the preceding solution, so long as the values of criteria exprs[0..i-1] are not greater than in the preceding solution. In particular, this means that the newer solution is preferable even if there are arbitrary increases in the values of criteria after position i in exprs, as compared with the preceding solution. The search terminates when either the optimality of the last solution is proved, a search limit is exhausted, or the search is aborted.

I said low priority :-).
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le jeu. 9 déc. 2021 à 07:39, jiang-yuan @.***> a écrit :

you can :-)
It will be low priority though.
So for now there is still not any functions allow us to set the priority
to multiple objective?
Example in Cplex:
The function minimizeStaticLex specifies to CP Optimizer a number of
floating-point expressions whose values are sought to be minimized in a
lexicographic fashion. When this function is used and the problem is
feasible, CP Optimizer will generate one or more feasible solutions to the
problem, with subsequent solutions having a lexicographically smaller value
of exprs than preceding ones. This means that a new solution replaces the
preceding one as incumbent if the value of criterion exprs[i] is less than
in the preceding solution, so long as the values of criteria exprs[0..i-1]
are not greater than in the preceding solution. In particular, this means
that the newer solution is preferable even if there are arbitrary increases
in the values of criteria after position i in exprs, as compared with the
preceding solution. The search terminates when either the optimality of the
last solution is proved, a search limit is exhausted, or the search is
aborted.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2944#issuecomment-989559537,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3LAMP273V3PIHVXQWLUQBFJNANCNFSM5JHJE5RQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

OK.
I have a series of variables x* and *
and I want to minimize following equation:
(x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n
I wrote
 tmpExp = 0
for i in range(n):
    tmpExp += x[i]- y[i]

sumxmy = model.NewIntVar(0,9999999999,'name')
model.Add(sumxmy == tmpExp )

sumxmy should be a IntVar, but why it gives errors ''Exception has occurred: NotImplementedError
calling // on a linear expression is not supported, please use CpModel.AddDivisionEquality'
when I try to call:
objective= sumxmy / n
model.Minimize(objective)

P.S. I need a float result, but AddDivisionEquality use // to round result.

WIth 9.2 (coming very soon), you can have an objective with integer
variables and floating point coefficients.
In the meantime, multiply all coefficients by 1000 and use the integer
division by n.
(x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) * 1000 / n
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le jeu. 9 déc. 2021 à 08:09, jiang-yuan @.***> a écrit :

OK.
I have a series of variables x* and *
and I want to minimize following equation:
(x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n
I wrote
tmpExp = 0
for i in range(n):
tmpExp += x[i]- y[i]
sumxmy = model.NewIntVar(0,9999999999,'name')
model.Add(sumxmy == tmpExp )
sumxmy should be a IntVar, but why it gives errors ''Exception has
occurred: NotImplementedError
calling // on a linear expression is not supported, please use
CpModel.AddDivisionEquality'
when I try to call:
objective= sumxmy / n
model.Minimize(objective)
P.S. I need a float result, but AddDivisionEquality use // to round result.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2944#issuecomment-989575221,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

actually, just minimize (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn).
The division by n does not change the optimal solution.
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le jeu. 9 déc. 2021 à 09:02, Laurent Perron @.***> a écrit :

WIth 9.2 (coming very soon), you can have an objective with integer
variables and floating point coefficients.
In the meantime, multiply all coefficients by 1000 and use the integer
division by n.
(x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) * 1000 / n
Laurent Perron | Operations Research | @.*** | (33) 1 42 68
53 00
Le jeu. 9 déc. 2021 à 08:09, jiang-yuan @.***> a
écrit :

OK.
I have a series of variables x* and *
and I want to minimize following equation:
(x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n
I wrote
tmpExp = 0
for i in range(n):
tmpExp += x[i]- y[i]
sumxmy = model.NewIntVar(0,9999999999,'name')
model.Add(sumxmy == tmpExp )
sumxmy should be a IntVar, but why it gives errors ''Exception has
occurred: NotImplementedError
calling // on a linear expression is not supported, please use
CpModel.AddDivisionEquality'
when I try to call:
objective= sumxmy / n
model.Minimize(objective)
P.S. I need a float result, but AddDivisionEquality use // to round
result.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2944#issuecomment-989575221,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

actually, just minimize (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn). The division by n does not change the optimal solution. Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à 09:02, Laurent Perron @.> a écrit :
…
WIth 9.2 (coming very soon), you can have an objective with integer variables and floating point coefficients. In the meantime, multiply all coefficients by 1000 and use the integer division by n. (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) * 1000 / n Laurent Perron | Operations Research | @. | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à 08:09, jiang-yuan @.**> a écrit : > OK. > I have a series of variables x and * > and I want to minimize following equation: > (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n > I wrote > > tmpExp = 0 > for i in range(n): > tmpExp += x[i]- y[i] > > sumxmy = model.NewIntVar(0,9999999999,'name') > model.Add(sumxmy == tmpExp ) > > sumxmy should be a IntVar, but why it gives errors ''Exception has > occurred: NotImplementedError > calling // on a linear expression is not supported, please use > CpModel.AddDivisionEquality' > > when I try to call: > > objective= sumxmy / n > model.Minimize(objective) > > P.S. I need a float result, but AddDivisionEquality use // to round > result. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <#2944 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ > . > Triage notifications on the go with GitHub Mobile for iOS > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. > >

Yes. But in fact I simplify the problem. I have two objectives: high priority obj1 low priority obj2.
Then the overall objective become:
model.Minimize(obj1+obj2)
If I do not div obj2 by n, the magnitude will scale to n times and overwhelm obj1.
Similarly, if I multiple obj2 by 1000, then I also need to multiple obj2 by 1000. Then I have modify the domain of obj1 and obj2 to 1000 times.
But in Cplex, these can be implement by mdl.minimize_static_lex([obj1, obj2]).
That's why I think the supporting of multiple priority is useful.

but static lex is not the same as alpha * obj1 + beta * obj2. I know it is
useful. It it not a high priority as you can do it manually, and it
requires changes in a lot of places to support correctly.
To do it manually: Solve with obj1. Get the optimal value. Get the
solution. Change the objective to obj2. Add the constraint obj1 ==
optimal_value. Add the current solution has hints for the new model. Solve
again.
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le jeu. 9 déc. 2021 à 09:53, jiang-yuan @.***> a écrit :

actually, just minimize (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn). The
division by n does not change the optimal solution. Laurent Perron |
Operations Research | @.*** | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à
09:02, Laurent Perron @.
> a écrit : … <#m_-907661233271731503_> WIth 9.2 (coming very soon), you
can have an objective with integer variables and floating point
coefficients. In the meantime, multiply all coefficients by 1000 and use
the integer division by n. (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) *
1000 / n Laurent Perron | Operations Research | @. | (33) 1 42 68 53 00
Le jeu. 9 déc. 2021 à 08:09, jiang-yuan @.**> a écrit : > OK. > I have
a series of variables x and * > and I want to minimize following
equation: > (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n > I wrote > >
tmpExp = 0 > for i in range(n): > tmpExp += x[i]- y[i] > > sumxmy =
model.NewIntVar(0,9999999999,'name') > model.Add(sumxmy == tmpExp ) > >
sumxmy should be a IntVar, but why it gives errors ''Exception has >
occurred: NotImplementedError > calling // on a linear expression is not
supported, please use > CpModel.AddDivisionEquality' > > when I try to
call: > > objective= sumxmy / n > model.Minimize(objective) > > P.S. I need
a float result, but AddDivisionEquality use // to round > result. > > — >
You are receiving this because you modified the open/close state. > Reply
to this email directly, view it on GitHub > <#2944 (comment)
https://github.com/google/or-tools/issues/2944#issuecomment-989575221>,

or unsubscribe >
https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ
. > Triage notifications on the go with GitHub Mobile for iOS >
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android >
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Yes. But in fact I simplify the problem. I have two objectives: high
priority obj1 low priority obj2.
Then the overall objective become:
model.Minimize(obj1+obj2)
If I do not div obj2 by n, the magnitude will scale to n times and
overwhelm obj1.
Similarly, if I multiple obj2 by 1000, then I also need to multiple obj2
by 1000. Then I have modify the domain of obj1 and obj2 to 1000 times.
But in Cplex, these can be implement by mdl.minimize_static_lex([obj1,
obj2]).
That's why I think the supporting of multiple priority is useful.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2944#issuecomment-989640082,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3PODWPM46PCHC26AWTUQBVAJANCNFSM5JHJE5RQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

but static lex is not the same as alpha * obj1 + beta * obj2. I know it is useful. It it not a high priority as you can do it manually, and it requires changes in a lot of places to support correctly. To do it manually: Solve with obj1. Get the optimal value. Get the solution. Change the objective to obj2. Add the constraint obj1 == optimal_value. Add the current solution has hints for the new model. Solve again. Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à 09:53, jiang-yuan @.> a écrit :
…
actually, just minimize (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn). The division by n does not change the optimal solution. Laurent Perron | Operations Research | @. | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à 09:02, Laurent Perron @. > a écrit : … <#m_-907661233271731503_> WIth 9.2 (coming very soon), you can have an objective with integer variables and floating point coefficients. In the meantime, multiply all coefficients by 1000 and use the integer division by n. (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) * 1000 / n Laurent Perron | Operations Research | @. | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à 08:09, jiang-yuan @.**> a écrit : > OK. > I have a series of variables x and * > and I want to minimize following equation: > (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) / n > I wrote > > tmpExp = 0 > for i in range(n): > tmpExp += x[i]- y[i] > > sumxmy = model.NewIntVar(0,9999999999,'name') > model.Add(sumxmy == tmpExp ) > > sumxmy should be a IntVar, but why it gives errors ''Exception has > occurred: NotImplementedError > calling // on a linear expression is not supported, please use > CpModel.AddDivisionEquality' > > when I try to call: > > objective= sumxmy / n > model.Minimize(objective) > > P.S. I need a float result, but AddDivisionEquality use // to round > result. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <#2944 (comment) <#2944 (comment)>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ > . > Triage notifications on the go with GitHub Mobile for iOS > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. > > Yes. But in fact I simplify the problem. I have two objectives: high priority obj1 low priority obj2. Then the overall objective become: model.Minimize(obj1+obj2) If I do not div obj2 by n, the magnitude will scale to n times and overwhelm obj1. Similarly, if I multiple obj2 by 1000, then I also need to multiple obj2 by 1000. Then I have modify the domain of obj1 and obj2 to 1000 times. But in Cplex, these can be implement by mdl.minimize_static_lex([obj1, obj2]). That's why I think the supporting of multiple priority is useful. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#2944 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3PODWPM46PCHC26AWTUQBVAJANCNFSM5JHJE5RQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Restart use hints is a possible way and it will restart the whole search process.
What if fixed the value of obj1 and ask it too search for more iterations based on current solution? Will it be more efficient than restarting?

The solver cannot continue if you change the model.
So option 1:
optimize c * obj1 +  obj2, the weighted sum approach.  This works, but is
very limited because c > |obj2|. So you cannot have a lot of terms in your
objective. And you have the full complexity of both objectives upfront.
Option 2:
optimize obj1, store, change the objective, ... the manual lex approach.
The advantage is that you do not need to create obj2 in the first model.
obj2 and all the relevant variables and constraints.
Then you create the full model, taking advantage of the optimal value of
obj1, and resolve.
Your choice.
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le jeu. 9 déc. 2021 à 13:31, jiang-yuan @.***> a écrit :

but static lex is not the same as alpha * obj1 + beta * obj2. I know it is
useful. It it not a high priority as you can do it manually, and it
requires changes in a lot of places to support correctly. To do it
manually: Solve with obj1. Get the optimal value. Get the solution. Change
the objective to obj2. Add the constraint obj1 == optimal_value. Add the
current solution has hints for the new model. Solve again. Laurent Perron |
Operations Research | @.*** | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à
09:53, jiang-yuan @.
> a écrit : … <#m_6499425557474693548_> actually, just minimize (x1- y1 +
x2 - y2 + x3- y3 +...... + xn- yn). The division by n does not change the
optimal solution. Laurent Perron | Operations Research | @. | (33) 1 42
68 53 00 Le jeu. 9 déc. 2021 à 09:02, Laurent Perron @. > a écrit : …
<#m_-907661233271731503_> WIth 9.2 (coming very soon), you can have an
objective with integer variables and floating point coefficients. In the
meantime, multiply all coefficients by 1000 and use the integer division by
n. (x1- y1 + x2 - y2 + x3- y3 +...... + xn- yn) * 1000 / n Laurent Perron |
Operations Research | @. | (33) 1 42 68 53 00 Le jeu. 9 déc. 2021 à
08:09, jiang-yuan @.**> a écrit : > OK. > I have a series of variables
x and * > and I want to minimize following equation: > (x1- y1 + x2 - y2

x3- y3 +...... + xn- yn) / n > I wrote > > tmpExp = 0 > for i in
range(n): > tmpExp += x[i]- y[i] > > sumxmy =
model.NewIntVar(0,9999999999,'name') > model.Add(sumxmy == tmpExp ) > >
sumxmy should be a IntVar, but why it gives errors ''Exception has >
occurred: NotImplementedError > calling // on a linear expression is not
supported, please use > CpModel.AddDivisionEquality' > > when I try to
call: > > objective= sumxmy / n > model.Minimize(objective) > > P.S. I need
a float result, but AddDivisionEquality use // to round > result. > > — >
You are receiving this because you modified the open/close state. > Reply
to this email directly, view it on GitHub > <#2944
https://github.com/google/or-tools/issues/2944 (comment) <#2944
(comment)
https://github.com/google/or-tools/issues/2944#issuecomment-989575221>>,

or unsubscribe >
https://github.com/notifications/unsubscribe-auth/ACUPL3MVUNR622ZP6R67OD3UQBIZNANCNFSM5JHJE5RQ
. > Triage notifications on the go with GitHub Mobile for iOS >
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android >
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Yes. But in fact I simplify the problem. I have two objectives: high
priority obj1 low priority obj2. Then the overall objective become:
model.Minimize(obj1+obj2) If I do not div obj2 by n, the magnitude will
scale to n times and overwhelm obj1. Similarly, if I multiple obj2 by 1000,
then I also need to multiple obj2 by 1000. Then I have modify the domain of
obj1 and obj2 to 1000 times. But in Cplex, these can be implement by
mdl.minimize_static_lex([obj1, obj2]). That's why I think the supporting of
multiple priority is useful. — You are receiving this because you modified
the open/close state. Reply to this email directly, view it on GitHub <#2944
(comment)
https://github.com/google/or-tools/issues/2944#issuecomment-989640082>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3PODWPM46PCHC26AWTUQBVAJANCNFSM5JHJE5RQ
. Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
.

Restart use hints is a possible way and it will restart the whole search
process.
What if fixed the value of obj1 and ask it too search for more iterations
based on current solution? Will it be more efficient than restarting?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2944#issuecomment-989809425,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3LQSBACDPRAZT2NHO3UQCOTJANCNFSM5JHJE5RQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Feature request: saving images in other file formats

This is more to track a discussion:
Would you consider supporting the storage of images in other file formats, e.g. .h5?
I'm just asking since cytomapper could directly link to those without reading images into memory.

Good question! Steinbock uses good ol' TIFF to ensure interoperability with other tools, especially image viewers. But I agree with you that it's definitely not the optimal format (although steinbock can and does memory-map TIFF files in some use cases). Ideally, formats like OME-NGFF were available already, but we'll have to wait a bit for that.
Regarding the HDF5 container format I'm a bit hesitant, as there is no "standard" for how to encode images in such a file, afaik. It seems that every tool (e.g. Ilastik, CellProfiler) encodes images in their own way, sometimes partially compatible with each other. Maybe you have more insight/suggestions there?

Yes, TIFF is definitely the preferred format for interoperability. And I fully agree on HDF5 - there's no recommended way of storing images. However, python and R have readers available that are quite flexible which makes this file format relatively user friendly. So you can decide on the format, document the specifications and we'll just want to make sure that one can access the data programmatically. I'll have a look how easy it is to access the ilastik image crops - maybe you could stick to this. I'll get back to you.

Ok, I checked the crops and they look fine to me. The dataset name of each file is crop so they are easy to read in with cytomapper. I would propose to add a flag something like --filetype hdf5 (default --filetype tiff) to each call that generates images (multi- and single-channel) and store the dataset under a default name (e.g. img or mask). But of course only if you think that's reasonable ;) and also no rush with this.

Yes, TIFF is definitely the preferred format for interoperability. And I fully agree on HDF5 - there's no recommended way of storing images. However, python and R have readers available that are quite flexible which makes this file format relatively user friendly.

It seems somewhat counter-intuitive to me to use a container format on top of a directory structure. When storing image data in a container file format, I'd find it more intuitive to store related data (images, masks, crops, single-cell data, ...) in a single file, which btw is also what @mezwick suggested at some point. But I do get the point of enabling other software like cytomapper to more easily do on-disk operations, so I'll add support for "HDF5 images" to steinbock in an upcoming release.

Ok, I checked the crops and they look fine to me. The dataset name of each file is crop so they are easy to read in with cytomapper.

Indeed, the HDF5 image data produced by steinbock for Ilastik is undocumented (on purpose), see https://bodenmillergroup.github.io/steinbock/latest/cli/classification/#data-preparation. You can have a look at https://github.com/BodenmillerGroup/steinbock/blob/548ccf69e80a1ec3cb144a16ec67070fcab5474c/steinbock/classification/ilastik/_ilastik.py#L76-L95 how these are generated.

I would propose to add a flag something like --filetype hdf5 (default --filetype tiff) to each call that generates images (multi- and single-channel) and store the dataset under a default name (e.g. img or mask).

Would you suggest to use a command-line option (i.e., can be specified individually for each command) or an environment variable (i.e., we'd expect to always write images in the same file format)?

It seems somewhat counter-intuitive to me to use a container format on top of a directory structure. When storing image data in a container file format, I'd find it more intuitive to store related data (images, masks, crops, single-cell data, ...) in a single file, which btw is also what @mezwick suggested at some point. But I do get the point of enabling other software like cytomapper to more easily do on-disk operations, so I'll add support for "HDF5 images" to steinbock in an upcoming release.

Yes, indeed, storing all data in a single file is the more elegant approach. And cytomapper wouldn't have a problem with it as long as the dataset names are specified. But here I would stick to the general steinbock approach where each function call produces new files.

Would you suggest to use a command-line option (i.e., can be specified individually for each command) or an environment variable (i.e., we'd expect to always write images in the same file format)?

I would use the command-line option as users (me ;)) might not want to store all images in a certain format. Maybe adding it to the "exports" would also be an option. So keep TIFF as the main image format but allow HDF5 export.


getting rid of REX.W prefixes for x87 ops

those prefixes confuse valgrind and they don't have any meaning

thx


How I added an on-the-go battery for OW+...

Not an issue/feature request/etc more of wanted to pass the notes on my latest project to team... I finally succeeded in getting a battery pack and charger etc to be able to charge on the go. Now can finally make it to the ocean on the golden gate park runs...

You need,

the solar charger controller ($38) https://www.amazon.com/gp/product/B01HCL7LEW
liIo 36V battery ($45) http://www.ebay.com/itm/NEW-SAMSUNG-18650-36V-4-4AH-BATTERY-EBIKE-VAPE-POWERWALL-BATTERIES-20-CELLS-BMS-/201895735309?epid=1621923126&hash=item2f01ec700d:g:Mh8AAOSwSypY9Y7d
old laptop power cable to charge the battery supporting 12-30VDC @ >5A

Then it's solder city converting everything to XT60 plugs. For charging the battery w/ the laptop power cable the solar charger is set to 42V/1.5A and for charging the OW+ from the battery solar charger is set to 58V/3.5A
If any of you are going down this rabbit hole let me know, took a bit of time to get this working with electrical smoke and bit of scare that I don't wish on anyone :)

Hi Kevin,
Thanks for sharing your project.
I'm about to follow your steps and have a few questions if you don't mind:
Does your setup include any battery over discharge protection ?
Can you get a full OW+ charge with your battery ? If so, how long does it take to fully charge your OW+ ?
Thank you for your help :)

Hi iSalah -
Good question, overcharge protection is baked into the board BMS (battery
management system) - it will prevent any overcharging with the setup, just
like if you charged off AC and adapter.
I was able to get a full charge, took about 20 mins? or around there.
Definite must for OW+. Now I'm riding a OW+ XR and wow, thing goes forever,
I'm going up to 15 miles on a single charge. Also the setup to charge also
works on the XR (63V/3.2A), although tbh XR doesn't need it, thing just
goes.
On Tue, Aug 14, 2018, 2:45 PM iSalah<EMAIL_ADDRESS>wrote:

Hi Kevin,
Thanks for sharing your project.
I'm about to follow your steps and have a few questions if you don't mind:
Does your setup include any battery over discharge protection ?
Can you get a full OW+ charge with your battery ? If so, how long does it
take to fully charge your OW+ ?
Thank you for your help :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/ponewheel/android-ponewheel/issues/44#issuecomment-413026616,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0LrRFp--miH2cvE6b4AbfH2FwBwNO1ks5uQ0T3gaJpZM4RH3jx
.


RFC for fork signalling.

Open PR: #4526.

Outstanding question in the RFC, how and when we add the protocol version.


at_c: Decision on making C99 our minimum C version

Write an architectural decision on why we are making C99 our minimum version of the C SDK

Finished here https://github.com/atsign-foundation/at_protocol/blob/trunk/decisions/2024-02-c99-minimum-version.md


Bulgarian Translation

This is great. Thank you for helping make One-Time Secret better!

This is now live:
https://onetimesecret.com/?locale=bg
I forgot to ask before, what name and link would like me to include for the thank you:
https://onetimesecret.com/translations

Name: Byalk and link to my GitHub :)

Done and done


How to make my own front UI and use it?

Can I edit clip-front.js to change the UI?

You can follow the readme
On Sun, Apr 28, 2024, 11:48 AM IF-chan @.***> wrote:

—
Reply to this email directly, view it on GitHub
https://github.com/rom1504/clip-retrieval/issues/381, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR437RTGXEXOQOOSOKV5NLY7TAWDAVCNFSM6AAAAABG43DRFSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DONBWGE3TGMY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

You can follow the readme
…
On Sun, Apr 28, 2024, 11:48 AM IF-chan @.> wrote: — Reply to this email directly, view it on GitHub <#381>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437RTGXEXOQOOSOKV5NLY7TAWDAVCNFSM6AAAAABG43DRFSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DONBWGE3TGMY . You are receiving this because you are subscribed to this thread.Message ID: @.>

"For Development" Part?

No rather everything above of this section


Detect golang version in integration-cli

Also changed some tests which depends on golang version

@ahmetalpbalkan I changed variable name.

I think we need to get to the heart of the matter instead

@jfrazelle What if there is no heart of matter? Then we just waste time on thing which used by not a single person in a world.

lol idk I was more hoping some of ahmets patches would magically fix who
knows
On Thu, Feb 19, 2015 at 12:47 PM, Alexander Morozov <
<EMAIL_ADDRESS>wrote:

@jfrazelle https://github.com/jfrazelle What if there is no heart of
matter? Then we just waste time on thing which used by not a single person
in a world.
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/10862#issuecomment-75132500.

@jfrazelle :) I think @ahmetalpbalkan is not working on cross-version support. But he can!

@vbatts you're the one I know of who has cared about aggressive Go
retrocompatibility previously -- will you survive if we drop Go 1.2 support
and call this case closed? :smile:

And go1.3, why not? :)

IMO, Go 1.3 support is still worth keeping for a little while longer,
especially since we've got all the tests passing (ie, it's currently
working fine).

@tianon now that gcc5 is frozen and hoped to release imminently, I am less strong on go1.2 compat. (As gcc5 will have a gcc-go that support go1.4)
@LK4D4 let's keep go1.3 for a while ...

meh go 1.2

<3


jsx install script errors

I did get my account an identity as described in the documentation.
First running the script
root@happy:~# /tmp/jsx container-install
- redis loghandler cannot be loaded
- redis loghandler cannot be loaded
3bot
+ ssh -oStrictHostKeyChecking=no -t root@localhost -A -p 9000 python3 /sandbox/code/github/threefoldtech/jumpscaleX_core/install/jsx.py configure --sshkey id_rsa -s
ssh_exchange_identification: Connection closed by remote host
Fri 27 14:01:49 tall/InstallTools.py -1411 - _execute                           : EXCEPTION:

    Could not execute:    python3 /sandbox/code/github/threefoldtech/jumpscaleX_core/install/jsx.py configure --sshkey
        id_rsa -s
--TRACEBACK------------------
/tmp/jsx in <module>
    1095    cli()
/tmp/jsx in container_install
    260    docker.install_jumpscale(branch=branch, force=reinstall, pull=pull, threebot=threebot, identity=identity)
/sandbox/code/github/threefoldtech/jumpscaleX_core/install/InstallTools.py in install_jumpscale
    5752    self.execute(cmd)
/sandbox/code/github/threefoldtech/jumpscaleX_core/install/InstallTools.py in execute
    5490    interactive=interactive,
/sandbox/code/github/threefoldtech/jumpscaleX_core/install/InstallTools.py in execute
    6576    original_command=original_command,
/sandbox/code/github/threefoldtech/jumpscaleX_core/install/InstallTools.py in _execute
    1411    raise Tools.exceptions.Base(msg)
-----------------------------

Test and second run
doing a check for the ID and running it a second time it does install:
root@happy:~# ssh-add -L
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC05P5eFki+5vHdn9BMrQwj0LZzl4FxwTAQ4GtwJFTS4Hog10Ly9sdhPQANOWASC1FXwZThVzj91hL8JCFuBZ5pDx29rJCDMQdqqVHQI5j8qkh4ZNNNQr/QLxdGl53RtQgabGe0OSnP+ZdvGHuSQdTg03bomGrpCYcahLbcj1yWBsCuF2VDgnW0AHeMR0lEubbKMSQrTNCuZqrGbRPuxaHzWj9KQSe4xiRtA/PB7ccMsQlXeIh5pv8QI6k858oJzvlswczTgZivCKoHRnU6XyDVd60y9v3BpbB7YgTasw/VXUDt4oH7U61VI3Jy7t/d9jazMcDt3CngDtRpWQqZSO77 /root/.ssh/id_rsa
root@happy:~# /tmp/jsx container-install
- redis loghandler cannot be loaded
- redis loghandler cannot be loaded
3bot
+ ssh -oStrictHostKeyChecking=no -t root@localhost -A -p 9000 python3 /sandbox/code/github/threefoldtech/jumpscaleX_core/install/jsx.py configure --sshkey id_rsa -s
Reading package lists...
Building dependency tree...
Reading state information...
redis-server is already the newest version (5:5.0.5-2build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sysctl: setting key "vm.overcommit_memory": Read-only file system
53:C 27 Mar 2020 13:02:05.649 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
53:C 27 Mar 2020 13:02:05.650 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=53, just started
53:C 27 Mar 2020 13:02:05.650 # Configuration loaded
Connection to localhost closed.
+ ssh -oStrictHostKeyChecking=no -t root@localhost -A -p 9000 rm -f /tmp/InstallTools.py;rm -f /tmp/jsx
Connection to localhost closed.
 - Installing jumpscaleX
+ ssh -oStrictHostKeyChecking=no -t root@localhost -A -p 9000 apt-get install python3-click -y
Reading package lists... Done
Building dependency tree

Did not do the -d option - maybe that's the solution. Will try tomorrow (28/3)

No longer relevant given sdk work done.


OID values should be unsigned int

I think there is a problem in the readOID function when a value in the OID is higher than 2^31. It is returning negative numbers. For example:
var ber = require("asn1").Ber;

// Buffer contains OID <IP_ADDRESS>.4.1.149<IP_ADDRESS>.<IP_ADDRESS>87117176
var data = new Buffer([6,18,43,6,1,4,1,245,12,1,1,5,1,1,19,138,224,215,210,120]);
var reader = new ber.Reader (data)
console.log(reader.readOID());
// prints "<IP_ADDRESS>.4.1.149<IP_ADDRESS>.1.1.19.-1407850120"

A possible fix would be casting each value to unsigned integer before storing. I.e replacing values.push(value) with values.push(value >>> 0)

I agree with @rjrivero. I ran into the same problem with 32bit OIDs and values.push(value >>> 0) solves it. Please also

add a release note that this implantation limits OIDs to 32bit (readOID and writeOID)
log an error if an OID exceeds 32 bit, i.e. if the sequence has more than 5 bytes, or has 5 bytes but the first byte has bits 1, 2 or 3 set (bit 0 is 1).

I have seen there is little progress on this project over the past few years.  My project, the net-snmp project, depends on this project, so I have cloned it and migrated (i.e. copied) all the outstanding issues and pull requests.
I will be releasing a new version of my version of this project under the asn1-ber namespace on npmjs.org by the end of the week which should address this particular item (I've already pushed the current code to this namespace to reserve it).
I am now tracking all changes under my own copy at asn1-ber.  Note that this is not a "fork" but a clone and fresh commit to a new repository.  I have of course retained all copyrights and attributed back the original author.
There are quite a few projects dependant on this project, and I want to make sure there is momentum on the issues and feature requests reported.

This issue has been addressed in my version of this project which has now been published to npm:
https://www.npmjs.com/package/asn1-ber

@stephenwvickers: cool. Thank you.


Add polyfill for Number.isFinite()

To fix https://github.com/CartoDB/tangram-cartocss/issues/85

could you move this forward?


Allow including Images in sections

Whenever I try to pass images in the sections, it doesn't show up in the output. Example usage: https://stackoverflow.com/questions/56853198/teams-invoke-webrequest-sending-base64-string-png-to-teams/57034497#57034497
My yml file
      - name: Generate QR Code
        id: qrcode
        uses: hammadj/qr-code-generator@master
        with:
          content: exp://exp.host/@foo/bar?release-channel=pr-${{ github.event.number }}
      - name: Send Deploy Preview Notification To MS Teams
        uses<EMAIL_ADDRESS>        with:
          webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
          title: "TESTING Deploy Preview For PR #${{ github.event.number }} (${{ github.event.pull_request.title }})"
          summary: "Deploy Preview For PR #${{ github.event.number }}"
          text: ${{ github.event.pull_request.body }}
          sections: '[{ "title": "QR Code", "images": [{ "image": "${{ steps.qrcode.output.data }}" }] }]'
          actions: '[{ "@type": "OpenUri", "name": "View PR", "targets": [{ "os": "default", "uri": "${{ github.event.pull_request.html_url }}" }] }, { "@type": "OpenUri", "name": "Preview App", "targets": [{ "os": "default", "uri": "https://expo.io/@danieloertli/unloan-app?release-channel=pr-${{ github.event.number }}" }] }]'

@hammadj Thanks for your comment! Let me have a look.

@justinyoo  when you fixed it ?


[gardening] Eliminate assert.

The code around here should be safe ot use even in ossa SIL since we are only
using it to lookup information about conformances and opened archetype info.

@swift-ci smoke test

I did this in a different PR.


Laboratory: Query actual graph endpoints

In Laboratory today you can only see mock data based on schema types. That misses the central point for us, we need to see real data.
So for example, I have set up my Hive account with two targets: One for staging and another for production. When I am in Laboratory and write a query, I expect it to be sent to a configured endpoint for that target; such as for the staging target I want the query/variables/headers sent toward the staging gateway.
When I execute a query I want it to be sent to that endpoint and see the result resolving real data. I don't want to look at mock data.

That's a super interesting issue @klippx , thank you for reporting this one.
At the moment we provide a mocked API in the Lab (mainly for exploration and documentation purposes).
I think at the moment we don't really have the gateway URL (we only store service(s) URLs for projects like Federation or Stitching), so we are not able to send the requests to the actual service.
@kamilkisiela do you think we can allow sending the runtime URL (of either the gateway or the single-project endpoint) and then use that in the Lab?

An update on this one; we now have the persisted SDL of every schema published, so this makes it easier to have access to the real latest composable schema. This means we are able to use that as introspection. The missing piece is to allow users to specify a runtime URL per target, and then allow to switch between mocked/actual endpoints in the Lab.

I think we can do the following:

a form in target's settings to provide an url of a real endpoint and a list of secrets (accessible in GraphiQL - header values)
a note on top of GraphiQL: "Connect it with your real GraphQL endpoint" or "Executing operations against real GraphQL API".
inject secrets in header's value


Supporting Original Version

This is for anyone temporarily needing to run the original code. I also updated the notebook to automatically pass params. After this pull, will upgrade the notebook to the new code like in https://github.com/huseinzol05/Stock-Prediction-Models/pull/9

Created a cryptocurrency data downloader to write csv of cryptos ohlcv.

This pull request goes beyond the title description. No need to pull the notebook file. Just the rest.


Update Zooz device files

To account for new devices, per Zooz:
Below are the new settings which have been added to the following dimmer versions so far:
ZEN72 10.10 (ver. 1.0 hardware) and 2.0 (ver. 2.0 hardware)
ZEN74 10.10 (ver. 1.0 hardware, no 2.0 hardware available at the moment)
ZEN77 10.20 (ver. 1.0 hardware), 2.10 (ver. 2.0 hardware), and 3.0 (ver. 3.0 hardware)
Please let me know if you have any questions here!
Remote Z-Wave Dimming Duration (Multilevel Commands For Group 3 And 4)
Parameter 30: Set the time it takes to get from 0% to 100% brightness on dimmers and smart bulbs directly associated with your dimmer in Groups 3 and 4 when pressing and holding the paddle (physical dimming) on your dimmer. The number entered as value corresponds to the number of seconds.
Values: 1 – 99 (seconds). Default: 5.
Size: 1 byte dec
Ramp Rate Control
Parameter 9: Adjust the ramp rate ON for your dimmer when the top paddle is pressed (physical ramp rate on). Values correspond to the number of seconds it take for the dimmer to reach full brightness when operated manually.
Values: 1 – 99 (seconds). 0 – instant on. Default: 0.
Size: 1 byte dec
NOTE:  On all other previous firmware versions including 1.0 and 10.0, this setting was used for all ramp rate control (to adjust behavior for on/off physical and Z-Wave ramp rate). The default value for this parameter used to be 1.
Parameter 27: Adjust the ramp rate OFF for your dimmer when the bottom paddle is pressed (physical ramp rate off). Values correspond to the number of seconds it take for the dimmer to turn off when operated manually.
Values: 1 – 99 (seconds). 0 – instant off. Default: 2.
Size: 1 byte dec
Parameter 28: Adjust the ramp rate ON for your dimmer when a Z-Wave command is sent to turn the dimmer on (Z-Wave ramp rate on). Values correspond to the number of seconds it take for the dimmer to reach full brightness when operated via Z-Wave.
Values: 1 – 99 (seconds). 0 – instant on. 255 – match physical. Default: 255.
Size: 1 byte dec
Parameter 29: Adjust the ramp rate OFF for your dimmer when a Z-Wave command is sent to turn the dimmer off (Z-Wave ramp rate off). Values correspond to the number of seconds it take for the dimmer to turn off when operated via Z-Wave.
Values: 1 – 99 (seconds). 0 – instant off. 255 – match physical. Default: 255.
Size: 1 byte dec

I would also like this to be updated. I just got a several of these dimmers with the 2.0 hardware and firmware and can't properly set the ramp rate parameters as the current device files only have a single parameter (9) for this.

I would also like this to be updated. I just got a several of these dimmers with the 2.0 hardware and firmware and can't properly set the ramp rate parameters as the current device files only have a single parameter (9) for this.

@jordahlm, Hi, I am trying to write the configuration parameters for your device.  I added the ones for hardware version 1.0, but don't have a way to checking for hardware version 2.0 and 3.0 of the ZEN77.  Do you have ZEN77 ver 2.0 or 3.0 devices?  If you do, could you please go into Z-WaveJS, go to your device.  Click the Configure Link under Device Info

Then click on the Z-Wave JS Device Database link

and reply with the URL it takes you to?  That might help me figure out how to write the configuration file for version 2.0 and 3.0 of the ZEN77.
The ZEN72 and ZEN74 configuration parameters should trickle down in the next release or so once PR 5125 gets merged.

Sorry, I don't currently have any hardware version 2.0 Zen77s, only Zen72s. I may have a 2.0 Zen77 soon and will update here if I do.

No problem.  Hopefully someone does and if they submit that information, I can look to write the config file for it.

The information in my original post came from Zooz, so you can just go ahead and add them. No need to verify for us to merge it.

I added the ones for hardware version 1.0, but don't have a way to checking for hardware version 2.0 and 3.0 of the ZEN77. Do you have ZEN77 ver 2.0 or 3.0 devices? If you do, could you please go into Z-WaveJS, go to your device.

@alvinchen1 This is the link my ver 2.0 ZEN77 brings me to: https://devices.zwave-js.io/?jumpTo=0x027a:0x7000:0xa007:0.0

@AnthonyMaiorani sorry to shake off the cobwebs on this one, but there is a suggestion on how to get the Hardware Version of the ZEN77 if you are running Z-WaveJS UI you could help us out?  See https://github.com/zwave-js/node-zwave-js/pull/5080.


unicode string in tooltip

Duplicate Check

[X] I have searched the opened issues and there are no duplicates

Describe the bug
tooltip on IconButton shows unicode strings not actual strings, the example also not show the correct value if not English.

codes like below

def get_button(icon: str, func: Any, tooltip: str = "") -> ft.IconButton:
    return ft.IconButton(
        icon=getattr(ft.icons, icon.upper()),
        style=ft.ButtonStyle(
            shape=ft.RoundedRectangleBorder(radius=0),
        ),
        on_click=func,
        tooltip=tooltip,
    )

get_button("remove", self.click_min, "最小化")

Code sample
Code
[Paste your code here]

To reproduce
change the tooltip to non-English strings.
https://flet.dev/docs/controls/iconbutton#icon-buttons
Expected behavior
No response
Screenshots / Videos

Captures
[Upload media here]

Operating System
Windows
Operating system details
Windows 11
Flet version
0.24
Regression
No, it isn't
Suggestions
No response
Logs
Logs
[Paste your logs here]

Additional details
No response

I think this should have been fixed in https://github.com/flet-dev/flet/issues/3920.
Can you try the latest prerelease: pip install Flet -U --pre

yes, pre version fixed.


Where do the build instructions live?

How does one build meta-bistro? Is qemu supported as a build target?

meta-bistro doesn't do much on its own. A common way to use it is together with the Poky Yocto distribution (as well as some other layers). The best way to get started it probably to start building Poky, read the docs concerning layers, and then add meta-bistro up your project. You'll find the docs here: https://www.yoctoproject.org/documentation
As a side-note, Pelagicore will release a Yocto guide which uses meta-bistro in some examples, but the official docs will suit you best for now.

Regarding qemu; it is not a supported target, but I do not forsee any obvious problems with using it. Let me know when you've tried it!

Do we feel we can close this issue now, or should we update the README with some additional information?

ping @jeremiah. OK to close this?

Please close.

On 8 Mar 2017, at 10:00, Jonatan Pålsson<EMAIL_ADDRESS>wrote:
ping @jeremiah. OK to close this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


toLocalStorage?

Okay, sorry to just hammer out ideas without much suggested solutions, but it would also be great to say:
tree.toLocalStorage();
tree.fromLocalStorage();

If the browser refreshes etc. you would easily be able to keep the state.

Hello @christianalfoni, I indeed use the localStorage some times to store a tree so the application can keep its state across the browser "accidents".
However, I don't know if methods dealing with the localStorage should be part of the library for the following reasons:

It is really simple to store the tree in the localStorage and does not take more than one or two lines usually.
I always find myself wanting to keep only certain parts of the state in the localStorage and end up selecting part of the data I need.
This is not isomorphic.

You know what, that is very true, I think you are right about this :-) I just got a bit excited, hehe


Update pyOpenSSL

to avoid security vulnerabilities

Changes committed in https://github.com/CanDIG/ga4gh-server/pull/57, approved and merged, closing issue!


Multiverse

Multiverse commands work fine.. just when we try to play..
http://prntscr.com/bewoue

disable tampermonkey and try again

Didnt do nothing still same!!!!!!! Its the game... multiverse the problem

@raphyjb Multiverse is not a plugin.

._. u told me to post it here

No, I told you too post here about a plugin which was givememinions, or superminions it was. I didn't say multiverse.

oh ok sry


Tony Stark

Overview
You are new at the film industry and casting for the role of "Iron Man" for a Marvel movie at the request of the director. You have auditioned 300 people, after going through all of them Robert Downey Jr.  was the best guy you could find. So, you choose him for the role. After the first day's shoot, everyone went home. The next day, the director asked for the Iron Man again. So, instead of calling Robert Downey Jr. you sat down again and posted for an audition to find an actor and brought Michael Fassbender. Seeing your job the director became outrageous. After coming to his senses, he sat down with you and made a few points clear.

You can't have different persons playing the same role on different days of the shoot.
It's not economically and temporally viable to audition for the same character again and again

So, from now on you are to ensure 2 things

Before the shooting starts, you need to find an actor for the role.
After casting, whenever that role is to be played you call for the same actor.

Assumptions
Let's assume the actor is immortal and as long as he lives he will happily play the role. So, no replacements will be needed.
Task
Implement an Actor class and a Cast class. So that, whenever Cast calls for an Actor the above-stated rules are maintained.
Notes
I know you are not that dumb to cast the same roles again and again. It's all just an assumption :P

Reminders

React to the problem if you find it interesting and helpful. This will help others to easily identify good problems to solve.
Feel free to comment about the problem. Is the description unclear? Do you think it is too easy or too difficult than what is mentioned? Comment about it.
Discussion about the solution is OK. But do not paste a solution here. Give a link to the solution instead.
Do you have an interesting problem? Post it.

Hi, can I try this problem?

Hi, can I try this problem?

Sure @Rethran , anyone can try any problems.


[SCB-597] update sprign boot version in business-service-spring-boot-starter

Signed-off-by: zhengyangyong<EMAIL_ADDRESS>Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Forgotten update version

Coverage remained the same at 87.557% when pulling 11f13f7ce2be2fedaa1cae7db438d73cad9de780 on zhengyangyong:SCB-597 into 9c734ac7691f638ddfb136410c8b65838e7bc594 on apache:master.


Optional Kinesis Modules, Multiple S3 bucket notifications, and more

to: @chunyong-lin
cc: @airbnb/streamalert-maintainers
size: medium
Background
Not all clusters need a Kinesis Stream, but currently it's required.  This change allows for simpler clusters, that may only use S3 as event sources:
{
  "id": "test",
  "modules": {
    "cloudtrail": {
      "enable_kinesis": false,
      "enable_logging": true
    },
    "cloudwatch_monitoring": {
      "enabled": false
    },
    "s3_events": [
      {
        "bucket_id": "jack.test.streamalert.cloudtrail"
      },
      {
        "bucket_id": "jack.second-test.streamalert.stuff",
        "enable_events": false
      }
    ],
    "stream_alert": {
      "alert_processor": {
        "current_version": "$LATEST",
        "enable_metrics": false,
        "log_level": "info",
        "memory": 128,
        "timeout": 10
      },
      "rule_processor": {
        "current_version": "$LATEST",
        "enable_metrics": false,
        "log_level": "info",
        "memory": 128,
        "timeout": 10
      }
    }
  },
  "region": "us-east-1"
}

Changes

Make Kinesis Streams and events optional
Modify the CloudTrail module to optionally send to Kinesis
Refactor the S3 events module to allow for multiple buckets and control over enabling/disabling event notifications.  This is necessary for cross-account permissions (where the event would be enabled in the producer account sending the notification).

Misc Changes

Add more context in the Issues template to point to Slack
Disable Terraform state refresh for apply's - this speeds up deploys and builds

Testing

Deployed and verified in test account with two clusters

Coverage remained the same at 95.636% when pulling 05ba428901080dff5a8f67d4d704135544724fa6 on jacknaglieri-cross-acct-s3-events-and-more into b1966aa630455d0dfd7f511476347dc30bbf97d5 on master.

Coverage remained the same at 95.636% when pulling 217963bcc6f270f7b299fad1c48f07aa259db1fc on jacknaglieri-cross-acct-s3-events-and-more into b1966aa630455d0dfd7f511476347dc30bbf97d5 on master.

Coverage remained the same at 95.636% when pulling e7861975050ecbd87eb557545f5641bc870d9444 on jacknaglieri-cross-acct-s3-events-and-more into b1966aa630455d0dfd7f511476347dc30bbf97d5 on master.

Coverage remained the same at 95.687% when pulling 3d73ea74c326d5e90c10ec55915e34850c8084fc on jacknaglieri-cross-acct-s3-events-and-more into 71a51cf322e83954d0b72a761147c7b4dab4eb28 on master.

Coverage remained the same at 95.687% when pulling 4086db6b50d7deeb595913359b356fdae23675a9 on jacknaglieri-cross-acct-s3-events-and-more into d86579abb3a52e47cf638c4443ba3606b704b705 on master.


Create LICENSE

Please help im new to this and sm learning ss i go any info would be appreciated thsnks rick ellis 9ca1907


Add ReadTheDocs Webhook

I've got the the project set up on readthedocs for documentation hosting but can't enable the webhook on the repo...
Instructions here.

Done.


Prefer x86_64_v2 Python builds

Summary
Resolves #8499

I check that the versions uv uses all run on my machine.
CC @zanieb for the changes in the generator script.

Can we use these unconditionally? Don't we need to check if the system supports the v2 instruction set before selecting these distributions?

According to https://gregoryszorc.com/docs/python-build-standalone/main/running.html:

x86_64_v2-*
Targets 64-bit Intel/AMD CPUs approximately newer than Nehalem (released in 2008).
Binaries will have SSE3, SSE4, and other CPU instructions added after the ~initial x86-64 CPUs were launched in 2003.
Binaries will crash if you attempt to run them on an older CPU not supporting the newer instructions.

Requiring at least a cpu from 2008 is safe enough. I'd like to add cpu feature detection on top of that (e.g. avx2 for x86_64_v3), but this change in itself is a good idea.

I think we should probably retain the x86_64 downloads (so you can install them by key) then add and prefer the x86_64_v2 downloads by default. Removing access to the x86_64 downloads entirely doesn't make sense to me.
Also, this is a breaking change; although it may not be likely. We might want to roll it into 0.5.0.

I'm not particularly enthused about defaulting to the v2 builds without checking the CPU features, especially since we need to do so anyway in the future. But I feel less strongly about that as long as there's a path towards recovering the existing behavior.

Are there any benchmarks that show whether / how much CPython is faster with these extra instructions? Might by interesting to run the pyperformance test suite (which is what faster CPython team uses for benchmarking).

Is there a way to manually set uv to prefer v2 or v3 builds?
And then this could be documented as a non-default performance enhancement.

I might finish this up, it looks straightforward to detect this

(I didn't mean to close it, accidental click.)

Taking this up in https://github.com/astral-sh/uv/pull/9781


Remove dots from operation id

thanks @frodrigo … please could you add a spec to have the use case documented

@LeFnord can you point me where I need to add a test in the spec ?

@frodrigo sure … you should a test here https://github.com/ruby-grape/grape-swagger/blob/master/spec/lib/operation_id_spec.rb as unit tests, and maybe a request spec in this dir https://github.com/ruby-grape/grape-swagger/tree/master/spec/swagger_v2 this one is more for documentation purpose, how it is possible to have a dot there - I of myself have no idea 😉

I add a test and amend my commit.


avoid using std where we need no_std support

We can't do that since error in core became stable only in rust 1.81.0, while our MSRV here is 1.66.0. This won't work
https://github.com/rust-lang/rust/issues/103765#issuecomment-2298273104

I think we can change MSRV to 1.81.0, in this phase of RGB I don't see the need to support old Rust versions.

No, this is not a critical security issue and v0.11.0 is already feature-frozen.


system-probe, add a strip binary build option

What does this PR do?
This PR add a build option to strip the system-probe binary.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

[ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
[ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
[ ] If applicable, the config template has been updated.

What is the use case for this? This does happen during the packaging build.

@brycekahle this is useful when you have to copy the binary somewhere is another machine


Can't open an issue in Shoko Desktop

.. as there is no button for that.

ShokoDesktop is our WIP for the new client.
https://github.com/japanesemediamanager/ShokoDesktop
ShokoClient is the existing client.
https://github.com/japanesemediamanager/ShokoClient

The Shoko Client is called Shoko Desktop in my installation
Therefore the confusion

Yeah it's a fun game of the GitHub repo being called client while the program is called Desktop. :)


How to obtain height of bottomTabs?

I want to place Fab above bottom tabs, I'm using custom coordinator layout behaviors for my views, but getOuterContainer has protected access modifier and there are no other methods to obtain this height

the bottomTabs is too high,not 56 dp.

Now possible with the library version 1.1.9.
mBottomBar.getBarSize(new OnSizeDeterminedListener() {
    @Override
    public void onSizeReady(int size) {
        // Do whatever you want with the size. The size is the BottomBar's
        // height on mobile and width on tablet mode.
    }
});

// You can also get the bar directly, although the size could be 0.
mBottomBar.getBar();


Script to generate counterpart G-Cloud 8 PDFs

For this story: https://www.pivotaltracker.com/story/show/128842655
I started off trying to parameterise the generate-agreement-sinature-pages script, but it turns out that there are enough differences with generating the counterpart pages that it makes more sense to me as a separate (but very similar) thing.
The main differences are different conditions on when a file should be generated, an extra file that needs to be copied and later removed, (i.e. the signature file), and file names.
It could probably have been parameterised and just one script, but that would have involved an explosion of command line arguments and/or a bunch of conditional steps in generate_agreement_signatre_pages.py` that wouldn't be very pretty.

I pushed a couple of commits to remove unused stuff, re-order the not to the end of the line and use tempfile for the HTML files.
I'm not going to change the import stuff right now, but yes it's something we can do as pat of a wider fix across all these scripts.
Think that's everything that's needed for now, holler if I missed something.


Edit feature on Camper News

It would be nice if you could edit the posts your submit on Camper News. I made this post by mistake : http://www.freecodecamp.com/news/let. I was typing the title for the submission and hit the enter key by mistake and now I can neither delete it nor edit it.

Great idea!

Yes - the ability to delete it entirely would suffice. Then people could resubmit if necessary, but like with Twitter, there probably isn't a need for an edit functionality, especially since we removed comments.


Staging to main: Fix bug in MAP

Description

Related Issues

References

Checklist:

[ ] I have followed the contribution guidelines and code style for this project.
[ ] I have added tests covering my contributions.
[ ] I have updated the documentation accordingly.
[ ] This PR is being made to staging branch and not to main branch.

@loomlike I think there are some of the tests in the nightly builds that haven't been updated:
@pytest.mark.notebooks
    @pytest.mark.parametrize(
        "size, expected_values",
        [
            (
                "1m",
                ***
                    "map": 0.060579,
                    "ndcg": 0.299245,
                    "precision": 0.[2701](https://github.com/recommenders-team/recommenders/actions/runs/6749833186/job/18351719718?pr=2035#step:3:2708)16,
                    "recall": 0.104350,
                ***,
            ),
            (
                "10m",
                ***
                    "map": 0.098745,
                    "ndcg": 0.319625,
                    "precision": 0.275756,
                    "recall": 0.154014,
                ***,
            ),
        ],
    )
    def test_sar_single_node_functional(
        notebooks, output_notebook, kernel_name, size, expected_values
    ):
        notebook_path = notebooks["sar_single_node"]
        pm.execute_notebook(
            notebook_path,
            output_notebook,
            kernel_name=kernel_name,
            parameters=dict(TOP_K=10, MOVIELENS_DATA_SIZE=size),
        )
        results = sb.read_notebook(output_notebook).scraps.dataframe.set_index("name")[
            "data"
        ]

        for key, value in expected_values.items():
>           assert results[key] == pytest.approx(value, rel=TOL, abs=ABS_TOL)
E           assert 0.1850985029206066 == 0.060579 ± 5.0e-02
E             comparison failed
E             Obtained: 0.1850985029206066
E             Expected: 0.060579 ± 5.0e-02

@miguelgfierro To fix this issue, I need to change map_at_k() in the notebooks to use map() which will cause conflicts with your changes in PR #2031 where you're removing glue parts:
# Record results with papermill for tests
import scrapbook as sb
sb.glue("map", rank_eval.map_at_k())  --> rank_eval.map()
...

So I think it will be good to wait for your PR gets merged into staging first and then fix the issues if that's okay.

So I think it will be good to wait for your PR gets merged into staging first and then fix the issues if that's okay.

Got it, makes sense

@SimonYansenZhao Hi Simon, I found an issue at execute_notebook function I wanted you to confirm:
        if (
            "tags" in cell.metadata
            and "parameters" in cell.metadata["tags"]
            and cell.cell_type == "code"
        ):
            cell_source = cell.source
            modified_cell_source = (
                cell_source  # Initialize a variable to hold the modified source
            )
            for param, new_value in parameters.items():
                if (
                    isinstance(new_value, str)
                    and not (new_value.startswith('"') and new_value.endswith('"'))
                    and not (new_value.startswith("'") and new_value.endswith("'"))
                ):
                    # Check if the new value is a string and surround it with quotes if necessary
                    new_value = f'"{new_value}"'
                # # Check if the new value is a string and surround it with quotes if necessary
                # if isinstance(new_value, str):
                #     new_value = f'"{new_value}"'
                # Define a regular expression pattern to match parameter assignments and ignore comments
                pattern = re.compile(
                    rf"(\b{param})\s*=\s*([^#\n]+)(?:#.*$)?",
                    re.MULTILINE
                    # rf"\b{param}\s*=\s*([^\n]+)\b"
                )
                modified_cell_source = pattern.sub(rf"\1 = {new_value}", cell_source)  <-------- Here.

In the code above, modified_cell_source = pattern.sub(rf"\1 = {new_value}", cell_source)  this part always replaces a new value with the original cell_source.  This means that the next parameter value is updated into the original cell source string again, not the one we applied the previous value to, which is modified_cell_source. And thus modified_cell_source will only contain the last parameter value that was updated.
To test and fix this, I changed the code to apply the pattern to modified_cell_source cumulatively, and added a test case (to do so, I pull that part into a separate function, as I suggested earlier).
If you see those changes make sense or have any comments, please let me know!
The changes are in jumin/fix_nightly branch.

Vamos!!!!


Add fmt and lint to deno tasks.

Codecov Report

Merging #81 (794ac2c) into main (919b039) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #81   +/-   ##
=======================================
  Coverage   94.53%   94.53%
=======================================
  Files          20       20
  Lines        1847     1847
  Branches      196      196
=======================================
  Hits         1746     1746
  Misses        101      101

Flag
Coverage Δ

unittests
94.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 919b039...794ac2c. Read the comment docs.


Config option to use size changing items on players.

Yeah I think it would be really fun being able to shrink and grow other players (Not by default though)

Yeah this was amongst the first things I've thought of.
Idk, maybe I'll add a config option, yes

Fixed in ede2651


KAFKA-7388 equal sign in property value for password

Changing limit of split to 2 values, to only split to key and value. if split and value is empty, also throw error.

Added test to check feature with delimiter (equal sign) in different pos
deleted test that enforced no multiple equal signs in properties
added tests for password overrides with symbols

Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

retest this please

@rajinisivaram  Can you take a look at this? often  passwords contain an '=' character.

retest this please

@omkreddy what would you like me to retest? for manual testing, I have run the shell command line tools with password override. build seems to be failing for other reasons.

@mutdmour  Above comment is not for you :) .  By commenting  "retest this please",  we can re-trigger the Jenkins builds/tests.

it passed ✅


kepler: init at unstable-2023-07-19

Description of changes
NIST-based CVE lookup store and API powered by Rust
https://github.com/Exein-io/kepler
Related to #81418

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 250733 run on x86_64-linux 1

1 package built:

kepler


Add OWNERS file

This file is used by openshift ci bot to assign a reviewer and also
provide permission to specific member to approve it.

Honestly, I would have expected an announcement/a discussion about all the process changes forced on us when we start using OpenShift CI before these changes are done.

I would have expected an announcement/a discussion about all the process changes

I do not think any of us was aware of this 'need'. However the need to gate with our build on OpenShift CI outways the choice of using the CI.
We can discuss about how to adhere to the process; ignore, follow, configure, etc.


mzML converted from wiff produces different DiaNN results

Hi,
I have converted wiff files to mzML with this container using the below command:
singularity run --env WINEDEBUG=-all \
        -B /scratch/:/scratch \
        ${pwiz} wine msconvert \
        ${wiff} \
        --32 \
        --filter "peakPicking vendor msLevel=1-" \
        -o ${outdir} \
        --outfile ${sampleID}.mzML > ${logdir}/${sampleID}.log 2>&1

I have also converted the same samples with the MSConvert GUI using the same parameters, and the resulting mzML files are identical.
When these mzML files are used in DiaNN analysis (either Linux or GUI) the results differ markedly from the same analysis conducted on the GUI with .wiff input. The abundance ratios are much higher from mzML input, the ratios are not consistent between samples for the same protein, and the number of unique genes per sample is lower.
I have submitted this as an issue to DiaNN, but wondering if you could provide some insights as to possible causes, and is there a way I can 'view' the wiff data to observe the values directly to compare to the values reported in the converted mzML files.
Many thanks,
Cali

ProteoWizard has the SeeMS application that lets you view any format that msconvert can handle, and also add some of the filters that msconvert can apply. The default installation settings even add it to the Windows Explorer context menu when you right-click on files and folders. With SeeMS it should be pretty easy to stack the same spectrum from WIFF and mzML on top of each other, synchronize zooming, and see what's causing the difference.

Thanks for your swift and perfect reply, what a great tool!
The only difference is the number of data points: from the mzML file (top of screenshot below), values are much smaller than for the same sample in wiff format (below half of screenshot).

I extracted the values from SeeMS and summed the summable columns to confirm it was just the data points column that differed:

Data Points
Base Peak m/z
Base Peak Intensity
Total Ion Current
Precursor Info

mzML
802,472,849.00
101,536,067.10
6,138,657,847.00
550,390,347,558.67
158,799,923.92

wiff
6,305,120,887.00
101,536,067.10
6,138,657,847.00
550,390,347,558.67
158,799,923.92

Proteomics is not my field, could you please advise if this difference in the number of data points is likely to influence results of DIA analysis?
Many thanks,
Cali

That's the peak picking. Going from profile data to centroid. Maybe DIA-NN run directly on WIFF does peak picking differently?


Release @google-cloud/asset v0.1.0

This pull request was generated using releasetool.

This is weird.  Where's the version bump in package.json?

weird indeed!

Oh. when the library is initialized it starts at v0.1.0 - so no version bump is needed - just the changelog here.

Release is at https://github.com/googleapis/nodejs-asset/releases/tag/v0.1.0


Suggestions For The Mod

I decided one Issue was better than submitting a ton, so here it goes:
1: Insta-Printer - There should be an option when in creative mode, the player can tell the mod to place/destroy all blocks in the schematic, like world edit. (Just discovered that the Schematica schematics are compatible with world edit schematics, just put the schematic in world edit's schematic file.)
2: Required Material Sorting - Have a sorting option for materials that sorts based on the blocks still required. So if the schematic needed 100 stone, 4 sand, and had completed dirt, it would be listed as stone, sand, dirt.
3: Default Values Too Fast - The default place values are too fast, and cause the game to create ghost blocks. The insta-place/break options are unusable. This is made worse by the fact that on a re-log, you loose the schematic you had loaded, so you have to re-align it.
4: I have seen posts about the destroy mode destroying blocks in a different state, and agree with this. I think you should create a configurable blacklist of blocks to not destroy. Also, allow the placer to place water? Water needs to be on the blacklist, as it is destroyed when in the wrong state, which happens whenever blocks around the water are changed, and creates a chain reaction of deleting all the water placed.
This is a really good mod, and I look forward to it's future!

The import feature was/is planned, but due to time constraints I wasn't able to do any work on that. I could get it working in single player without much effort but I'd like to try to make a server side version of this as well instead of later patching that feature in.
Material sorting should be already included, click the button in the bottom left. It should sort by name and item count.
The default values work for most servers. I have to keep them high enough to prevent ghost blocks and other issues and low enough for a faster schematic placement. It might also be related to #170, which I'll try to address this weekend.
I'll have to revamp a lot of the features, including whitelists/blacklists. The printer right now is a buggy mess code wipe and adding, removing or fixing things is a nightmare. If I had the time I'd just straight up rewrite the entire printer from scratch, but I don't have the time to do so.
Water and lava will most likely never be placable. Code wise it requires special casing that I don't feel like adding. The other reason is griefing - although that shouldn't be a reason to not include a feature, this one is way too easy to abuse.  I'm already getting a decent amount of complaints for Schematica Reach, which is a fork of Schematica that increases the block reach by one and is heavily abused on PvP servers.

For the materials one, I meant an option to sort materials based on the items you need most of. For the rest of it, I completely understand, you provide free software and invest a lot of your time towards this mod. Good luck in the future, and I will await future additions!

Oops accidentally closed.

For the material list do you mean the remaining amount of items required?

Yes

And also could you add an indicator/material for how many blocks need to be destroyed?

If I can find a suitable place for it. Don't want to just slap it into a random location on one of the GUIs.

It could go under materials, maybe under air?

It's not a material though so it makes no sense to put it on that list.

Maybe on that same screen, in a corner?

I think it would be an interesting features for survival so that exist some hotkey to load different schematics and a hotkey that place the center of the schematic in the player's position. This would quickly create bridges or shelters in survival mode.

Make an issue of that then, don't hijack this thread :p

RE: Insta-Printer
in MP Creative that won't work, as although you have creative access you still have to live by the rules of server constraints (ie reach, facing blocks etc) ? from memory anyway (hence the ghost block issue(s) as that's the server disagreeing with the inbound packets).
RE: Default Values Too Fast
Partial fix for the ghosting is #34 ... its actually a source of frustration for myself as sometimes I can get away with an instant place but when server load gets backed up i get the ghost issue. So having to re-align XYZ/Flip/Rotations again is annoying.


Submitting sample template from documentation, error 500

Request
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: b7eeb802-89f5-4e9a-bbdf-632674806e64" -H "Cache-Control: no-cache" -H "Postman-Token: 42d80d73-4bce-ea37-c27c-b9b70c23fc22" -d '{
  "label": "Spotlight-Link",
  "description": "Recognises entities using Spotlight en enriches with geo information.",
  "serializedRequests": [
    {
      "method": "POST",
      "endpoint": "http://api-dev.freme-project.eu/current/e-entity/dbpedia-spotlight/documents",
      "parameters": {
        "language": "en"
      },
      "headers": {
        "content-type": "text/plain",
        "accept": "text/turtle"
      }
    },
    {
      "method": "POST",
      "endpoint": "http://api-dev.freme-project.eu/current/e-link/documents/",
      "parameters": {
        "templateid": "3"
      },
      "headers": {
        "content-type": "text/turtle",
        "accept": "text/turtle"
      }
    }
  ]
}' 'http://api-dev.freme-project.eu/current/pipelining/templates/'

Response
Status 500 Internal Server Error
{
  "exception": "eu.freme.broker.exception.InternalServerErrorException",
  "path": "/pipelining/templates/",
  "message": "could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement",
  "error": "Internal Server Error",
  "status": 500,
  "timestamp":<PHONE_NUMBER>672
}

I cannot reproduce this on a local instance of the Broker; it works fine. @jnehring or @ArneBinder, can you take a look what happens on the dev instance?

The value was to long: the column serializedRequests of pipelines was still an varchar(255), I changed it to longtext according to @Lob annotation in the pipeline model. Should be fixed now.
@andish please close, if this solves the problem.


Get response data even when validation fails to pass

What I am trying to achieve is to read the response data even when the validation set, fails. The reason for doing that is because the API I am trying to access implements application/problem+json.
So:
Alamofire.request(.POST, "http://httpbin.org/post")
  .validate()
  .responseJSON { (_, _, JSON, error) in
    println(JSON)        // null
    println(error)       // Error Domain=com.alamofire.error Code=-1 "The operation couldn’t be completed. (com.alamofire.error error -1.)"
  }

fails as it should when status code is for example 400, although I can't read the data inside response body by accessing the JSON.
I am currently trying to write an extension of Request for that, but without luck so far.
Thanks @mattt for this great library.

Hey @mattt
First of all, thanks a lot for making this great library.
We are having issues with this right now as well. The HTTP/1.1 RFC specifies that the response for 4xx requests should return an entity contain an explanation of an error. Is there a way that we could have Alamofire support this case?

+1

+1

+1 any update on this? this shouldn't be closed imo.

Handling it with a custom response handler worked great for me. I can upload a sample if you want next week.

Thanks @ziogaschr. That would be a nice workaround but I agree with @toothrot that this should be the default behavior according to RFC 2616.

So just as a heads up...this is now supported in the swift-2.0 branch through the in the default response serializers and also in the generic response serializers using the Result type. If there is ever an error that occurs anywhere in the request process, you will now receive the error and the original server data if it is available.
I'd encourage you to check it out. All the documentation has been updated accordingly.

Thank you a lot @cnoon for the update and your great work. I will give this a check soon.

@cnoon I just tested #791 & #792 in the project I am working on and I see many benefits. Thanks for the amazing work.
What I would like in advance is to be able to parse the error response data (according to RFC) in a ResponseSerializer. I am currently doing this but instead of using Result.Failure(), I have always to use Result.Success(customObject) and set the error and data in my customObject.
I see that data are exposed also to the response handler and the intention is to not handle them in ResponseSerializer. But talking only based on my project I will have to copy over the same code in more than 15-20 places to do so.
What I think will work nice is to have Result.Failure(AnyObject, NSError).

Hi @ziogaschr, thanks for your feedback. In the future, please comment directly on the issues you are referring to. That way we keep the conversations going in the correct location.
With that said, your suggestion is actually how it works in Alamofire 2.0. The .Failure case contains the NSData? from the server where the .Success case only includes the parsed object. While this is certainly the common use case, other outside the box features such as custom logging or DVR playback may need access to the original data, even in the .Success case. Therefore, in Alamofire 3.0, the original server data is ALWAYS returned in all the custom response serializers, not just in .Failure cases. If you don't need to use it, then don't.
Additionally, in #792, the Response object encapsulates the fact that the NSData? is even available. Therefore, you don't need to access it if you don't actually need it.
Cheers.

Hello @cnoon, it makes sense to comment directly on the other issues. Do you want me to move them?
When .Failure has to be called using my custom ResponseSerializer (e.g: named responseCustomJSON) I would like to parse the error data as JSON so as I don't have to do JSON parsing separately for each response handler. In that manner I would like to call .Failure(customJSON, error) or at least store it somehow in the Result in order to access it from the Response object.
Cheers

Are you running two parsing schemes? I don't quite understand your use case. Could you post some pseudo code or actual code of what you're attempting to do? I have a few different ideas, but I want to make sure I actually answer your question.

Let's say that we are doing a POST which returns a 429 with these data:
XHR Response: {
  "status": 429,
  "type": "https://sample.com/error/server-error",
  "detail": "Some description text",
  "title": "Rate limit”
}

and now the ResponseSerializer with some pseudo code.
return ResponseSerializer { _, response, data, error in

            // a custom object that app uses
            let res = ResponseHandler()

            guard error == nil else {

                // set error in ResponseHandler
                // this will allows us to use .Success for now
                res.error = error

                // try to parse response data as JSON
                // if the response is an application/problem+json
                // it will create a JSON successfully
                // after that we will try to read its status
                if response?.statusCode != 204,
                    let validData = data,
                    let headers = response?.allHeaderFields
                        where headers["content-type"]?.lowercaseString.rangeOfString("application\\/problem\\+json", options: .RegularExpressionSearch) != nil
                {
                    // add problem+json to response
                    res.json = JSON(data: validData)
                }

                // NOTE: we want to parse `application/problem+json` so when available we use .Success() to pass the object back
                // return .Success(res)

                return .Failure(res, error)
            }

            guard let validData = data where validData.length > 0 else {
                let failureReason = "JSON could not be serialized. Input data was nil or zero length."
                let error = AQError.errorWithCode(.AQJWTSerialization, failureReason: failureReason)

                res.error = error

                // NOTE: we want to parse `application/problem+json` so when available we use .Success() to pass the object back
                // return .Success(res)

                return .Failure(res, error)
            }

            if response?.statusCode != 204 {

                // parse it as a SwiftyJSON
                res.json = JSON(data: validData)
            }

            return .Success(res)
        }

As you see above normally I am using .Success instead of .Failure.
The benefit that I get the error data parsed as JSON in this case.
I have two serializers which depend on such logic.

Thank you for providing sample code. That makes it SOOO much easier for me to tell what you're trying to do. In this case, I would recommend working a bit more with Alamofire rather than against it. Let me explain.
Instead of trying to return a parsed JSON object in a failure case, take it one step further and convert the JSON object into a custom error that your app handles. In your example, rather than returning the ResponseHandler type, return a custom RateLimit error. You can use associated values on the RateLimit case if you need to keep any of that data. Although, I don't really think at the app level you need to know anything other than what the URL request was as well as the error that occurred.
You're already doing this in the second error case where you're catching invalid data prior to parsing the JSON and capturing it in a custom error.
Lastly, your final SwiftyJSON parsing case "could" use generics to attempt parse the JSON into a concrete model object. Then your Result type could return something like a User object rather than a vague ReponseHandler type.
Does that all make sense?

Yes @cnoon makes much sense. Although, this will trigger many changes in my app code.
When I started using Alamofire (back in v1 I think), it was cleaner to use it like this.
Thanks for your help and sorry for commenting on a closed issue.

No worries man, glad to help! 🍻


Caching is broken for Alpine CI runs

We get warnings in Github actions for both alpine-based jobs
Github's actions/cache@v3 apparently uses the host's tar command to tar up the cache
Should be easily fixable by installing GNU tar in the Alpine images

Seems to be fixed


Handle password field type for plugin configuration

It would be great to be able to store a password in a secure way in the plugins configuration.
Example:
password: {
      title: 'Password',
      type: 'password',
      required: true
},

This consists of 2 components:

Add an ajv definition for type password
Use bcrypt to store the encrpyted password

Related to wulkano/kap/pull/623

I think I'm missing something. Wouldn't the point of saving the password in the config be to use it at some point in the plugin runtime? How would we retrieve the password if we hash it with bcrypt before saving? We would have to save it as plaintext.
Does the service you are trying to build a plugin for support tokens? I think that would probably be the best way of going about it, rather than saving the user's password.

@karaggeorge seems like a token can be used: https://docs.nextcloud.com/server/13/developer_manual/api/OC/Authentication/Token/IToken.html
The service i try to integrate ist called "Nextcloud"

@ochorocho I would suggest using that instead, as we can't really save a user's password other than plaintext

Supporting a password field might be a bad idea as it gives the illusion of security, but in reality, the password is just stored in plain text on disk.
Instead, I think we should update the plugin guide about recommending using tokens instead.

To me it sounds like we should force tokens @sindresorhus for security reasons @sindresorhus, but I'm not sure how or if that would work. Like @karaggeorge mentioned:

Does the service you are trying to build a plugin for support tokens?

I'll update the docs to encourage token usage and close this issue unless anyone has additions @ochorocho.

To me it sounds like we should force tokens for security reasons @sindresorhus

I don't see how we would enforce that. Not providing a password type and documenting the recommendation is the most we can do, I think.

Yeah, we can add a note that basically says the plugins' config is saved as a plaintext file, so saving passwords is not particularly safe, but at the end of the day the plugins are made by other users, so if a user wants to install one and enter their password that's up to them

@skllcrn ok, thanks. I''m using now nextclouds login flow and its working how i wanted it to work :-)


Jbaker/testing

Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes: #18
Summary:
Add unit tests to meet 90% or greater threshold. Some minor component code cleanup to make sure the tests all passed correctly.
Type of change:
Please delete options that are not relevant.

[ ] New capability
[x] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

@jason-capsule42 rebase off of main and merge.

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Items saving

So that a saved item can be spawned with a single command.

I think a good interaction flow will be:

User creates room/item by normal means
When they are happy with the result, they use save item_name/room_name, saving a copy of the current item's state.
They can later use a verb like 'place' in the following manner:

User: place
Server: What saved item you want to place?
    1. button
    2. door
User: 1
Server: OK! (Server places a copy of the selected item on their current room.)

From a database point of view, for an item the steps needed would be:

Make a copy of the item and all it's custom verbs. (A copy is necessary, so changes in the original won't change the saved one)
Put that item in a ListField(ReferenceField(Item)) on the User entity.
When placed, make a copy of the saved item and it's custom verbs, and put it on the current room's items.

The process for the room is similar, but only the room's custom verbs, items and their corresponding custom verbs will be copied, deleting and overwriting any other items and verbs previously present in the room. Exits will remain the same, and won't be carried when a room is saved.

Item saving is very useful because it simplifies a lot some custom verbs. Room saving does not seem so useful, so we won't implement it for now.

Item saving is very useful because it simplifies a lot some custom verbs. Room saving does not seem so useful, so we won't implement it for now.

Tasks to solve this issue:

[ ] Add a field to entities.User to track saved items.
[ ] Create the save <item_name> verb.
[ ] Create the place verb.

Tasks to solve this issue:

[ ] Add a field to entities.User to track saved items.
[ ] Create the save <item_name> verb.
[ ] Create the place verb.


Android build lib not found

samples folder inner libs folder not found
OS X media_for_mobile inde sdk I would like to know how and where to download.

I have this problem too .
somebody can help us ?

I am also facing the same issue in android studio.
Where is the lib folder ?

Media for Mobile has been open sourced (see it at https://github.com/INDExOS/media-for-mobile), now you can build the libraries by yourself.


Ask Foundation to capture NSError/CFError backtraces for us.

On Apple platforms, when an error occurs in an Objective-C method or C function, convention is to return the error as an instance of NSError/CFError via an out-parameter. When that Objective-C method or C function is called by a Swift function, the Swift function detects the error, then effectively rethrows it, at which point our swift_willThrow hook is triggered. This can obscure the real origin of the error which may be many stack frames down from the point Swift takes over.
This PR asks Foundation, via a relatively new internal function, to capture backtraces for instances of NSError and CFError at the point they are created. Then, when Swift Testing attempts to look up the backtrace for an error it has caught, if Foundation has generated one, then Swift Testing can substitute it in place of the one it generated in the swift_willThrow hook.
Resolves rdar://114386243.
Checklist:

[x] Code and documentation should follow the style of the Style Guide.
[x] If public symbols are renamed or modified, DocC references should be updated.

@swift-ci test

@swift-ci test


Do not break everything once Meilisearch is not reachable

Instead of break the frontend and display an error message, it would be nice, if we could log an error message when Meilisearch is not reachable.

There shouldn't be an error message anymore.

I still get the same problem.
Configuration:
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3meilisearch']['host'] = 'wrong-host.com:7700';

Error:
cURL error 6: Could not resolve host: wrong-host.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://wrong-host.com:7700/indexes/pages/documents

Sorry, couldn't reproduce at first, but with your example I could. Now it should be fixed.

The page is not breaking anymore. Nice :)
But I think we should still log the error of debug purposes.

Added logging.


Fix cgfloat

CGFloat must be created explicitly or the cast will fail.
Also added CoreGraphics import, to prevent errors, e.g. when adding Arrow to playground.

Great :)


Refactor to use HttpService internally

Description
This PR refactors Tide to internally use the new http-service crate. That crate provides an HttpService trait, meant to provide a Rack-like interface between low-level http servers (like hyper) and frameworks or applications that sit on top of them.
The refactoring isolates all hyper-specific shim code to a new module, serve, which presents an HttpService-based interface to the rest of the crate. Eventually this shim code should be moved into an external crate.
Motivation and Context
The ultimate goals here are:

To move the shim code to work with hyper into a separate crate
To support a standardized layering such that the base web server can easily be switched out (in Tide and other web frameworks)

How Has This Been Tested?
As a pure refactoring, no new tests are added.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

Alright, I've updated to use the new Body::into_vec method on http-service, so this is good to go!


:bug: fix :tada: important

This is probably already fixed in the new version of the menu thanks anyway ;)