fix: update motify generic types

The goal of this PR is to address #46 - and in general, provides better type inference for the motify function. The general philosophy here is:

The primary generic type here is Props, which can be easily inferred by TS.
The Style generic is then derived from Props['style'] by "unwrapping". For example, ViewProps['style'] = StyleProps<ViewStyle>, so we need to unwrap that StyleProps type to get the raw style type.

I tested this out locally, and it seems to be working. But I'm far from experienced with moti, so if I apologize if I totally overlooked some nuance with this! I'm loving the work you're doing with moti - so I'm hoping this PR is of some use to the project!

Hey thank so much for the PR! How does this affect array styles? I want to make sure we don't have any arrays, so I'm not sure how the StyleProp type handles that.
Do we need to filter out arrays? Something like type NoArray<T> = T extends any[] ? never : T?
Let me know, thanks.

For array styles - that's a great question! If you check out ViewStyle, you'll see it's an object (dictionary). RN has a utility type:
export type StyleProp<T> = T | RegisteredStyle<T> | RecursiveArray<T | RegisteredStyle<T> | Falsy> | Falsy;

And the style prop for ViewProps is StyleProp<ViewStyle>. So the StyleProp utility is what RN uses to allow for an array of style objects. By unwrapping, we're ensuring we're just getting a dictionary.

For array styles - that's a great question! Here's my understanding: if you check out ViewStyle, you'll see it's an object (dictionary). RN has a utility type:

export type StyleProp<T> = T | RegisteredStyle<T> | RecursiveArray<T | RegisteredStyle<T> | Falsy> | Falsy;

And the style prop for ViewProps is StyleProp<ViewStyle>. So the StyleProp utility is what RN uses to allow for an array of style objects. By unwrapping, we're ensuring we're just getting a single object.

Yeah I realized that a few minutes after sharing. Appreciate the explanation.

I made a CodeSandbox remaking the types from this PR. The proposed props change should work, where it infers from an object or style.
See it here: https://codesandbox.io/s/moti-types-pfw2t
As for the ref, I think it works using Component<Props>. It's unclear to me if that's actually typing it properly or not for the ref. Feel free to open that and play with it to confirm.

Awesome, I'll check that out. Got pulled in to some work stuff yesterday and didn't get a chance to finish things up here, but hoping to dig back in a bit today. Part of the challenge has been around RN's View etc. having slightly complicated types (they aren't just straight-up React.ComponentClass or React.FunctionComponent, so the typing gets hairy quick. And the Component ref type works for the RN primitives, but doesn't quite work for user-defined components - so I'm still investigating that. I'll poke around your sandbox and see if I can make any progress!

Sounds good! Once we figure out the ref, this should be good to go. I'm left wondering - is there a standardized wondering to forwardRef with types for any component?

In all my research, I've had no luck.
So, I think the best solution is to allow users to pass a Ref generic, and if they don't, it falls back to Component<Props>. What do you think?

Sorry for the delay on this! It fell off of my radar for a bit. I think you're right on the generics. I just pushed up a commit that loosens the props type a bit so that it's not excluding user-defined components, and lets user define Ref type, but defaults to Component<Props> (which seems to work for the native RN components that moti ships animated versions of).

Looks good!
2 changes:

Can you make Ref the first generic, so it's easier to edit? If it's not first, then you need to explicitly provide props, which won't ever be necessary.
After making Ref first, TS will complain that the second argument can't be optional, so I'm thinking we default props to something like Props extends ... = ViewProps.

Yeah, I really wasn't expecting the ref typing to put up this big of a fight 😅
I like the idea of not having to define the Props type just to define the Ref type, but right now we have Ref = Component<Props>, so we can't currently define Ref first (since it depends on Props).

Is it possible for props to extend { ref?: Ref }? I assume no, but I'm honestly not sure.

I tried to motify SVG component like Path from react-native-svg library but some TS issues are there. Animated.createAnimatedComponent is capable of handling Path. So, please also test with SVG components before merging this pull request.

This might be relevant: https://fettblog.eu/typescript-react-generic-forward-refs/

I wonder if this polymorphic component utility from Stitches could solve the ref issue: https://radix-ui.com/primitives/docs/utilities/polymorphic

After giving this some more thought, I think it's better to have the ref property from native components like View, Text, etc, than to optimize for custom components' refs. The latter requirement is very niche, so it's a fine trade-off.
@gksander think you could solve the merge conflicts here since the latest release? Thanks!

Wow, sorry for the huge delay on this! Things at work/life picked up a bit and this fell off my radar. Let me see if I can try to reconcile the merge conflicts and take another stab at the ref forwarding thing.

Also, I think this slipped by me earlier, but it appears Animated.createAnimatedComponent from Reanimated only supports class components (https://github.com/software-mansion/react-native-reanimated/discussions/1527). We're trying to support FCs with the types, but I'm wondering if we should be restricting to Class components based on the Reanimated restriction (and if a user wants to animate a FC, they can wrap it in a Class component). What are your thoughts on that?

Line 15 is missing TextStyle btw

I'm still experiencing the same issue? Why this was closed though without merging? Was there some issue in this approach?
<MotiText
	// @ts-ignore reason: types are not properly defined on the moti package
	from={{ color: '#797979' }}
	animate={{
		@ts-ignore reason: types are not properly defined on the moti package
		color: activeButtonBasedOnControlled === button
			? colorScheme === 'dark'
			? 'black'
				: 'white'
			: '#797979',
	}}
	transition={{ duration: 200, type: 'timing' }}
	className="font-inter font-normal"
	numberOfLines={1}
>
	{button}
</MotiText>

Have to tsignore to opt out of ts errors.


Support deployment lifecycle of an environment/image

I would like to be able to answer the questions:

When was this container image sha256 deployed to production and when was it retired?
What images have been deployed to staging in the last 5 days?
What image was running in QA last Tuesday at 4:45 PM GMT?

Use case 1
I discover a vulnerability in a container image, I want to know when and where the code was ever deployed.
Use case 2
I discover anomalous activity on a container orchestration platform and want a report of the images deployed at the time.

Nice! Thanks for getting it started, and these questions you'd like to answer are the perfect way to think about attestation schemas.
For an "environment", do you think a simple name like "prod" or "qa" is enough? Or do we need a way to reflect more details?

I think we'd need some more context, I'm thinking situations like multiple regions, partial rollouts that were aborted, etc

Yeah... Any other ideas? We could wrap it up in a URI acme.com/<environment>/<region>/<service> or maybe just use a set of labels?

I think I like the idea of a URI!
It will let users bring their own org structure as well as it could reference an entry with additional details / context of the env itself.


Build error :      net.sf.ehcache.store.disk.DiskStorageFactory - Disk Write of item

when I build my project in local using cygwin64, I got subject error.
testAddToMyLibraryHashCodesAddsToAnExistingCacheEntry(com.pearson.ltg.ole.service.MyLibraryCacheServiceTest)  Time elapsed: 0.028 sec  <<< ERROR!
net.sf.ehcache.CacheException: java.io.FileNotFoundException: C:\cygwin64\tmp\myLibraryCache.data (Access is denied)
myLibraryCache.data  --> This  file is not available but its trying to access.  Not sure what it is...

This is not a CAS issue, because that is not a CAS test and that is not a CAS file.

I am trying to build my project in local using cygwin. I am getting file permission denial error. So requesting to get a help

I understand, but that's not something we can help with here :( you should either post that question on the CAS mailing list or get in touch with cygwin folks who might know how to get around this issue.

thank you


Bruteforce Failing when trying Amazon

Tried to brute force an american number, script downloaded the NANPA files, then said
"Using Amazon to find the victim's phone number..."
and then it errors with a giant error that begins with this:

Unknown error:

<!doctype html><!--[if IE 8]><html data-19ax5a9jf="dingo" class="a-no-js a-lt-ie10 a-lt-ie9 a-ie8"><![endif]--><!--[if IE 9]><html data-19ax5a9jf="dingo" class="a-no-js a-lt-ie10 a-ie9"><![endif]--><!--[if !(IE 8)&!(IE 9)]><!--><html data-19ax5a9jf="dingo" class="a-no-js"><!--<![endif]-->
  <head>
<script type='text/javascript'>var ue_t0=ue_t0||+new Date();</script>
<script type='text/javascript'>
window.ue_ihb = (window.ue_ihb || window.ueinit || 0) + 1;
if (window.ue_ihb === 1) {

var ue_csm = window,

Thanks for letting me know. Note that this tool is meant as a PoC, you can do the same with any webproxy like Burp's intruder. I am also still working on phonerator, which will be the right tool to generate valid phone numbers and will be able to give you the list needed to use on online services like Amazon

I've published a new one. Check https://www.martinvigo.com/phonerator-an-advanced-valid-phone-number-generator/


get function is too generic in prim/scal/meta/get.hpp?

Description
get in scales is probably too general.
template <typename T>
inline T get(const T& x, size_t n) {
  return x;
}

We have other more specialized templates in arr and mat e.g.
template <typename T>
inline T get(const std::vector<T>& x, size_t n) {
  return x[n];
}

If scales get is included in a file there's a pretty good chance it's used when we really wanted the second one. We're seeing an error with this in the gp_exp_quad_cov OpenCL PR
http://d1m1s1b1.stat.columbia.edu:8080/blue/organizations/jenkins/Math Pipeline/detail/PR-1206/15/pipeline#step-107-log-856
Expected Output
We expect template deduction for cases of vectors to choose the second one while simple types should go to the first.
Resolution
We can template the get in stan/math/prim/scal/meta/get.hpp to only compile if it's a fundamental type using std::is_fundamental
template <typename T, typename = std::enable_if_t<std::is_fundamental<T>::value>>
inline T get(const T& x, size_t n) {
  return x;
}

This is a pretty small change so if it's cool I'm going to add it in #1206 if people are cool with that
Current Version:
v2.19.1

@syclik is it okay if I include stan/math/prim/arr/meta/get.hpp in stan/math/prim/scal/meta/get.hpp>?
Otherwise the fix I made throws errors

Nah nvm Jenkins is not happy about that answer
stan/math/prim/scal/meta/get.hpp(4): File includes an array header file. [scal]
make: *** [test-math-dependencies] Error 1
script returned exit code 2

Wait also why are the functions in meta defined in stan and not stan::math?
https://github.com/stan-dev/math/blob/develop/stan/math/prim/arr/meta/get.hpp

No. What are you trying to do? There’s probably another way to do it.
What you’re suggesting will just make sure the std::vector traits are all
instantiated before the generic traits are called. What did you do to make
it fail? Where it failed, should you have included an arr header instead?
Btw, there is an effort to simplify this all. But we won’t get there if we
tangle everything up in our current structure. The magic that holds
everything together is how the traits are defined (by includes) and
instantiated (sometimes implicitly).
On Sun, May 12, 2019 at 7:24 PM Steve Bronder<EMAIL_ADDRESS>wrote:

@syclik https://github.com/syclik is it okay if I include
stan/math/prim/arr/meta/get.hpp in stan/math/prim/scal/meta/get.hpp>?
Otherwise the fix I made throws errors
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236#issuecomment-491637905, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADH6FYBTIOIKCXJUYPOIBDPVCRKFANCNFSM4HMLIAPA
.

No. What are you trying to do? There’s probably another way to do it.

I'm trying to restrict the type deduction for get in stan/math/prim/scal/meta/get to just scalar types. Right now if we included scal and arr there's instances where the template deduction will pick the get in stan/math/prim/scal/meta/get where it should pick the get in stan/math/prim/arr/meta/get.
The issue is that both of the templates below are satisfied by std::vector<double>. I'm pretty sure the main issue here is that the compiler gets confused and picks the wrong function because it doesn't use the return type in choosing the right function
// `stan/math/prim/scal/meta/get.hpp`
// T = std::vector<double>
// Returns back std::vector<double>
template <typename T>
inline T get(const T& x, size_t n) {
  return x;
}

//// `stan/math/prim/arr/meta/get.hpp`
// T = std::vector<double>
// returns back double
template <typename T>
inline T get(const std::vector<T>& x, size_t n) {
  return x[n];
}

With my change this should stop the scal version from getting used when it shouldn't.
// `stan/math/prim/scal/meta/get.hpp`
// SFINAE kicks this out for T = std::vector<double>
template <typename T, typename = std::enable_if_t<std::is_fundamental<T>::value>>
inline T get(const T& x, size_t n) {
  return x;
}

Does that make sense? If so I can go through and check the arr version is included in the right places

Actually the other alt here is to move the code for is_positive that handles vectors into arr

Can you let me know what code you’re running?
What you’re describing doesn’t make sense. It’s doing exactly as it’s
supposed to behave, by design. That’s why we need to include the traits in
the right order and then it’ll behave.
On Sun, May 12, 2019 at 7:49 PM Steve Bronder<EMAIL_ADDRESS>wrote:

Actually the other alt here is to move the code for is_positive
https://github.com/stan-dev/math/blob/develop/stan/math/prim/scal/err/check_positive.hpp#L30
that handles vectors into arr
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236#issuecomment-491639363, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADH6F44RJLGSY7IF52WA5TPVCUHVANCNFSM4HMLIAPA
.

To be more specific, you shouldn’t need to restrict get in prim scal. It’ll
be taken care of when you include the correct headers for prim arr.
On Sun, May 12, 2019 at 8:23 PM Daniel Lee<EMAIL_ADDRESS>wrote:

Can you let me know what code you’re running?
What you’re describing doesn’t make sense. It’s doing exactly as it’s
supposed to behave, by design. That’s why we need to include the traits in
the right order and then it’ll behave.
On Sun, May 12, 2019 at 7:49 PM Steve Bronder<EMAIL_ADDRESS>wrote:

Actually the other alt here is to move the code for is_positive
https://github.com/stan-dev/math/blob/develop/stan/math/prim/scal/err/check_positive.hpp#L30
that handles vectors into arr
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236#issuecomment-491639363,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADH6F44RJLGSY7IF52WA5TPVCUHVANCNFSM4HMLIAPA
.

I’m trying to look through the Jenkins error, but having trouble tracking
through the output on my phone.
Can you isolate this to a particular test case? I feel like this is
happening on that branch due to having the traits not instantiated in the
correct order.
I think it should be an easy-ish fix on the branch, but shouldn’t require a
change to Math directly, if I’m right about what the problem is. If I’m
wrong, then we’ll pick out what exactly is going on.
On Sun, May 12, 2019 at 5:13 PM Steve Bronder<EMAIL_ADDRESS>wrote:

Description
get
https://github.com/stan-dev/math/blob/develop/stan/math/prim/scal/meta/get.hpp
in scales is probably too general.
template inline T get(const T& x, size_t n) {
return x;
}
We have other more specialized templates in arr and mat e.g.
template inline T get(const std::vector& x, size_t n) {
return x[n];
}
If scales get is included in a file there's a pretty good chance it's
used when we really wanted the second one. We're seeing an error with this
in the gp_exp_quad_cov OpenCL PR
http://d1m1s1b1.stat.columbia.edu:8080/blue/organizations/jenkins/Math Pipeline/detail/PR-1206/15/pipeline#step-107-log-856
Expected Output
We expect template deduction for cases of vectors to choose the second one
while simple types should go to the first.
Resolution
We can template the get in stan/math/prim/scal/meta/get.hpp to only
compile if it's a fundamental type using std::is_fundamental
https://en.cppreference.com/w/cpp/types/is_fundamental
template <typename T, typename = std::enable_if_t<std::is_fundamental::value>>inline T get(const T& x, size_t n) {
return x;
}
This is a pretty small change so if it's cool I'm going to add it in #1206
https://github.com/stan-dev/math/pull/1206 if people are cool with that
Current Version:
v2.19.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADH6F7SEBWZPDQDQXJCRDTPVCB7LANCNFSM4HMLIAPA
.

yes! One sec doing a writeup of what's going on rn. It's a bit of a weird one

Thanks. This stuff is tricky.
On Sun, May 12, 2019 at 10:26 PM Steve Bronder<EMAIL_ADDRESS>wrote:

yes! One sec doing a writeup of what's going on rn. It's a bit of a weird
one
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236#issuecomment-491655332, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADH6F2FVZN3GCEXFLVYIQTPVDGTRANCNFSM4HMLIAPA
.

Btw, I just checked out the branch for #1206. It seems like it's way behind; hard to tell what's actually different from develop with the current state.

So I think what your saying is correct, I think my confusion here is that the code for check_positive doesn't do what it looks like I would think it does.
Here's an example where things are kind of confusing for me
#include <stan/math/prim/scal.hpp>
#include <gtest/gtest.h>
#include <limits>

template <typename T>
void supposed_to_be_vec(T A) {
  if (stan::is_vector_like<T>::value) {
    printf("We Good!\n");
  } else {
    printf("Mamma Mia!!\n");
  }
}

TEST(ErrorHandlingScalar, check_is_vec_like) {
  // Prints 'Mamma Mia'
  std::vector<double> A{-1, -2, -3, -4};
  supposed_to_be_vec(A);

  // Prints "We Good"
  double** foo;
  supposed_to_be_vec(foo);

  // Prints "We Good"
  double lalala[10];
  supposed_to_be_vec(lalala);
}

}

I would expect that when is_vector_like received a vector it would say yes right?
But looking at the code for is_vector_like it's supposed to give a value of true when T can be accessed by brackets. But vectors can be accessed by brackets so idk why that's false? (stan::is_vector only returns false when using the definition only from scal.
So, I think the real issue here is that we have code in scale that looks as if it should handle vectors but doesn't. In particular idt the code in that positive struct really does what it looks like it does.
At first glance, it appears the code below is made to handle the case of vectors, but because of how is_vector_like is defined in scal it's actually a specialization for pointers.
template <typename T_y, bool is_vec>
struct positive {
  static void check(const char* function, const char* name, const T_y& y) {
    if (!std::is_unsigned<T_y>::value && !(y > 0))
      domain_error(function, name, y, "is ", ", but must be > 0!");
  }
};

template <typename T_y>
struct positive<T_y, true> {
  static void check(const char* function, const char* name, const T_y& y) {
    // NOTE: We're gonna talk about this length function in a second
    using stan::length;
    for (size_t n = 0; n < length(y); n++) {
      if (!std::is_unsigned<typename value_type<T_y>::type>::value
          && !(stan::get(y, n) > 0))
        domain_error_vec(function, name, y, n, "is ", ", but must be > 0!");
    }
  }
};

So the code above is never going to go off for a vector, but will go off for pointers. But what's the code for length in scal?
template <typename T>
size_t length(const T& /*x*/) {
  return 1U;
}

So now things start getting weirder! Here's three tests which I would expect to throw but go along just swimmingly.
TEST(ErrorHandlingScalar, check_is_posi_pointer) {
  double* poo[5];
  *poo[0] = -1.0;
  *poo[1] = -2.0;
  // whoops ¯\_(ツ)_/¯
  *poo[4] = 3.0;
  // This is true for is_vector_like so check_positive
  // is going to use the template specialization
  supposed_to_be_vec(poo);
  stan::math::check_positive("check_positive", "foo", poo);
}

TEST(ErrorHandlingScalar, check_is_posi_double_array) {
  double butt[5];
  butt[0] = -1.0;
  butt[1] = -2.0;
  // whoops ¯\_(ツ)_/¯
  butt[4] = 3.0;
  // This is true for is_vector_like so check_positive
  // is going to use the template specialization
  supposed_to_be_vec(butt);
  stan::math::check_positive("check_positive", "foo", butt);
}

TEST(ErrorHandlingScalar, check_is_posi_double_array_bounds) {
  double gutt[0];
  gutt[0] = -1.0;
  // This is true for is_vector_like so check_positive
  // is going to use the template specialization
  supposed_to_be_vec(gutt);
  // Because length() returns 1 this goes past the array bounds
  stan::math::check_positive("check_positive", "foo", gutt);
}

Another weird thing, the final definition of check_positive in the prim/scal/err folder actually checks whether the size argument it's past is > 0, where all the other definitions check whether y is a positive value.
inline void check_positive(const char* function, const char* name,
                           const char* expr, int size) {
  if (size <= 0) {
    std::stringstream msg;
    msg << "; dimension size expression = " << expr;
    std::string msg_str(msg.str());
    invalid_argument(function, name, size, "must have a positive size, but is ",
                     msg_str.c_str());
  }
}

Now with all the above said, am I just not understanding the intent of the struct positive<T_y, true>? I've never really looked at this code before so maybe I'm not getting it in context.
If the above stuff should fail or (work for pointers) I think there's a couple of solutions / fixes.

Give lengths argument a name and have the function return back sizeof(blah) / sizeof(*blah) or something like that so that pointers size is looked at and the for loop there goes off the right number of times. change is_vector_like to say vectors are vector like.

Totally remove the concept of vectors and anything that can be array like accessed from scal, template the functions to check that the types are scalar, then define the vector array accessor like versions  in arr

Also, I'm watching GoT right now bit I think just adding the code for prim/arr will do what I want the code to do there

Ha. I just finished. We can talk later.
But quick fix to the whole problem:
instead of including stan/math/prim/scal.hpp, include
stan/math/prim/arr.hpp.
arr.hpp refers to array; this is the confusing part. It’s actually
describing Stan’s notion of arrays—that translates to std::vector in C++.
In your test, you use std::vector. Just swap to the arr.hpp header and that
will instantiate and include the right template specializations the Math
library so all of it works.
The way the check functions (and everything else) works is that it just
relies on the template metaprograms to behave. They behave if and only if
everything is instantiated correctly. We’ve tried to get it to not have
this sort of order dependence, but it’s a fundamental templated C++ thing
that multiple efforts to detangle it have failed.
Let me know if that works.
On Sun, May 12, 2019 at 11:39 PM Steve Bronder<EMAIL_ADDRESS>wrote:

Also, I'm watching GoT right now bit I think just adding the code for
prim/arr will do what I want the code to do there
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236#issuecomment-491665225, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADH6F4O2NYXXB4BPF33CEDPVDPFPANCNFSM4HMLIAPA
.

Okay so I think I got it!
Though agrad_test was failing in ./test/unit/math/rev/core/agrad_test was failing because of weird header orders so I had to get those in order and everything worked fine for me locally. We'll see how travis does.
I still think my above is true tho'. May be good to do something to flag the above so people don't do one thing expecting another.

It’s actually
describing Stan’s notion of arrays—that translates to std::vector in C++.
In your test, you use std::vector.

But for prim.hpp this would be the stuff that passes is_vector_like right? Which in my examples above idt the function does what the user would expect it to do in the case of an array of doubles. If the function isn't for that in prim then I'd rather have the deduction fail so I know to look elsewhere for the function that does the thing I want

Wait also why are the functions in meta defined in stan and not stan::math?

This is something we are investigating in #1122. Basically template metaprograms are in stan:: by design (except for those that arent, those shouldnt be in stan::math::). Runtime programs should (probably?) be moved to stan::math:: at some point. This namespace confusion is something I plan to resolve (will open a discussion) once I cleanup everything else in that issue. And then make a wiki with guidelines.

Word! Also @syclik I couldn't figure out the right dependency order for the headers,  would you have time to take a look?

Sure.... what does that mean? What should I look at?
On Mon, May 13, 2019 at 9:47 AM Steve Bronder<EMAIL_ADDRESS>wrote:

Word! Also @syclik https://github.com/syclik I couldn't figure out the
right dependency order for the headers, would you have time to take a look?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/math/issues/1236?email_source=notifications&email_token=AADH6F2L2DDN2MBEYBJVUETPVFWNRA5CNFSM4HMLIAPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVILOZI#issuecomment-491829093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADH6F5IAT2MMJAHQ6PKJUTPVFWNRANCNFSM4HMLIAPA
.

Oh apologies, for pr #1206 theres an error from Jenkins caused by the dependencies. It used to be because the check_positive function was not getting its header orders correctly and threw for prim/gp_exp_quad and rev/adiff_test.cpp**. I modified test/.../rev/util.hpp so that those passed, but now its throwing because of integrate_ode_adams_rev_test.cpp which I'm guessing is because it expects a different order of the headers.
You can see the changes to util.hpp in 5aabdc9. I think we need to revert those and look at what the correct header order is for prim/gp_exp_quad_cov.hpp.
**I'm on mobile and cant remember the name of the right rev test but will look when I get to a comp

Closing this because I'm pretty sure it's just that I didnt get the dependency structure


What is the maximum number of nodes a graphormer can handle?

the quadratic complexity of the self-attention module restricts Graphormer’s application on large graphs.

The paper describes graphormer as not applicable to large graphs. What is the maximum number of nodes a graphormer can handle?

It depends your GPU memory and batchsize. For example, max_node=128 and batchsize=32 works fine under 32GB GPU memory.

It depends your GPU memory and batchsize. For example, max_node=128 and batchsize=32 works fine under 32GB GPU memory.

Thanks for your reply! So is it the hardware configuration that limits the number of nodes in a graph, not the complexity of the model? However, in other data, the number of nodes often exceeds several hundred, such as AST. Does graphormer apply in this case?

It depends your GPU memory and batchsize. For example, max_node=128 and batchsize=32 works fine under 32GB GPU memory.

Thanks for your reply! So is it the hardware configuration that limits the number of nodes in a graph, not the complexity of the model? However, in other data, the number of nodes often exceeds several hundred, such as AST. Does graphormer apply in this case?

The GPU memory usage is an integrated result casued by the model configuration, training configuration, model complexity, and of course, the hardware configuration decides how many GPU memory can you use in the training.
If you find that you meet the OOM issue during training, you can decrease your minibatch size, using accumulate training, cutoff your big graph, use a smaller model, or simply use an advanced GPU with more memory.

When building a Graph with PyG, the molecular dataset already provides the data required by Torch_geometric.data.data. For example, the sample in ZINC:
{'num_atom': 24,
'atom_type': tensor([0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0],
       dtype=torch.int8),
'bond_type': tensor([
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
        [0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
        [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2],
        [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0]],
       dtype=torch.int8),
'logP_SA_cycle_normalized': tensor([3.1382])}

x = mol['atom_type'].to(torch.long).view(-1, 1)

Node features directly use the atom_type attribute in the sample.
I want to use graphormer to encode graph on a custom dataset, but my graph data doesn't have node features like zinc dataset. In this case, does it need to train the model to learn the node features and then use graphormer to obtain graph embedding?
If yes, can it be understood as similar to learning Node embedding with GCN and obtaining graph embedding by computing?
If no, how should the nodes used to construct the graph be represented?

At the end of the paper:

Node Representation. There is a wide range of node representation tasks on graph structured data, such as
ﬁnance, social network, and temporal prediction. Graphormer could be naturally used for node representation
extraction with an applicable graph sampling strategy. We leave it for future work.

Getting node representations using graphormer is future work. So now graphormer can only get graph representations, , not like GCN, get the node representation and then get the graph representation?
Does the data used for training itself need to contain node features, as do zinc datasets?

When building a Graph with PyG, the molecular dataset already provides the data required by Torch_geometric.data.data. For example, the sample in ZINC:
{'num_atom': 24,
'atom_type': tensor([0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0],
       dtype=torch.int8),
'bond_type': tensor([
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
        [0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
        [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2],
        [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0]],
       dtype=torch.int8),
'logP_SA_cycle_normalized': tensor([3.1382])}

x = mol['atom_type'].to(torch.long).view(-1, 1)

Node features directly use the atom_type attribute in the sample. I want to use graphormer to encode graph on a custom dataset, but my graph data doesn't have node features like zinc dataset. In this case, does it need to train the model to learn the node features and then use graphormer to obtain graph embedding? If yes, can it be understood as similar to learning Node embedding with GCN and obtaining graph embedding by computing? If no, how should the nodes used to construct the graph be represented?

Hi, sorry for the late response. (Other team members have been just too busy to answer!)
For this question, the answer is yes. If your custom dataset doesn't contain node features, it's still OK to use Graphormer by initializing node features to zeroes, or initializing them randomly, etc. In Graphormer we use centrality encoding (node degree information) to compute node embedding, so we can still obtain different embeddings for each node while taking the graph's structural information into account. Then the graph's embedding can be obtained by getting representation for the virtual node. I think this process has some similarity with GCN.

At the end of the paper:

Node Representation. There is a wide range of node representation tasks on graph structured data, such as
ﬁnance, social network, and temporal prediction. Graphormer could be naturally used for node representation
extraction with an applicable graph sampling strategy. We leave it for future work.

Getting node representations using graphormer is future work. So now graphormer can only get graph representations, , not like GCN, get the node representation and then get the graph representation? Does the data used for training itself need to contain node features, as do zinc datasets?

Graphormer can get node representation (actually the model's output is node representation itself) and the training data doesn't need to contain node features.

Hi,When I have obtained all node representations and want to obtain the graph representation, should I simply use an aggregation strategy?


sirikali: 1.6.0 -> 1.7.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/mhogomchungu/sirikali/releases.
meta.description for sirikali is: Qt/C++ GUI front end to sshfs, ecryptfs-simple, cryfs, gocryptfs, securefs, fscrypt and encfs
meta.homepage for sirikali is: https://github.com/mhogomchungu/sirikali
meta.changelog for sirikali is: https://github.com/mhogomchungu/sirikali/blob/1.7.0/changelog
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.7.0 with grep in /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0
found 1.7.0 in filename of file in /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

sirikali

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A sirikali https://github.com/r-ryantm/nixpkgs/archive/0db4e2725bc840418a4d787d635fbe0036a8dd0c.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/0db4e2725bc840418a4d787d635fbe0036a8dd0c#sirikali

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0
ls -la /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review

x86_64-linux

:white_check_mark: 1 package built:

sirikali

Maintainer pings
cc @linuxissuper for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

Add a :+1: reaction to pull requests you find important.

hm, I would like to test this but I get Cannot mix incompatible Qt library (6.7.2) with this library (6.8.0)
with both /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0/bin/sirikali
and /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0/bin/.sirikali-wrapped
anybody know how I could test this?

hm, I would like to test this but I get Cannot mix incompatible Qt library (6.7.2) with this library (6.8.0) with both /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0/bin/sirikali and /nix/store/0xlvqdd7d4y5va5gwscif9cql77r7n47-sirikali-1.7.0/bin/.sirikali-wrapped
anybody know how I could test this?

You can safely ignore these warnings. Does it launch?

unfortunately these are not only warnings
it doesn't launch because of this
I've tested it in a vm with nixos-unstable and it launches
but the Create Volume button doesn't seem to work anymore

Version 1.7.0 breaks the Create Volume functionality
see https://github.com/mhogomchungu/sirikali/issues/279


Fix fix use cbo rule hint unused because of logic reverse

use_cbo_rule_hint show used but it does not be used

run buildall

add intro pr in desc

run buildall


Add multiple Docker networks support

As seen in this in #227, Traefik should support multiple docker networks.

I am using traefik with Docker Compose for local development. Docker Compose will create a new network by default for your docker-compose file. Therefore it would be nice if traefik supports multiple docker networks.

+1

I have a swarm cluster with containers that are mapped so several overlay networks.
When Traefik retrieve it's conf from the swarm master it concatene all the IP result that it won't works:
   "backend-test": {
      "servers": {
        "server-seb_test_1": {
          "weight": 1,
          "url": "http://<IP_ADDRESS><IP_ADDRESS>:80"
        }
      }
    },

my container have 2 ip <IP_ADDRESS> & <IP_ADDRESS>
is there a way to specify traefik which network to use in this case somethink like traefik.network ?
    labels:
      - "traefik.backend=test"
      - "traefik.port=80"
      - "traefik.frontend.rule=Host:test.example.com"
      - "traefik.network=net_front"
    networks:
      - net_front
      - net_back_api
      - net_back_tool

+1

+1
I have a swarm cluster with containers that are mapped on several overlay networks.
version: '2'
services:
  myapp:
    expose:
      - "8080"
    depends_on:
      - mongodb
    labels:
      - "traefik.backend=my-app"
      - "traefik.frontend.rule=Host:my-app.docker.localhost"
    networks:
      - front
      - application-backend

  mongodb:
    image: mongo:latest
    container_name: mongodb
    networks:
      - application-backend

networks:
  application-backend:
    driver: overlay
  front:
    external:
      name: traefik_front

When Traefik retrieve the conf from the swarm master, there is IP literal concatenation.
See the debul log:
traefik    | time="2016-05-31T08:49:14Z" level=debug msg="Creating server server-compose_my-app_1 at http://<IP_ADDRESS>.0.1.3<IP_ADDRESS>:8080 with weight 1"

Fixed by #415


Allowed for an input of seconds rather than milliseconds

Fixes #26
Lets the user input a unit of seconds for the level editor rather than milliseconds.
Adjusted then display to reflect this change in unit of measurement.

LGTM! Thanks for your contribution @matt-ross16 ! :smile:

By the way, I write release notes in my Discord server and I like to @mention the people that contributed to the latest updates, so if you are in the Discord server, tell me your name! :slightly_smiling_face: If you aren't I'll just say you are @matt-ross16 from Github. :wink:


[QUESTION] Semantic Chunking

Question
Does the privateGPT´s current version support semantic chunking with LLamaIndex?
Best regards,
Ilker

Right now, nupe. We are using SentenceWindowNodeParser.
Feel free to make changes and open a new PR. However, we plan to do in the near future (as shown in our roadmap)


Docker build broken due to dependency dario.cat/mergo missed.  dario.cat domain has expired.

Description
Docker build broken due to missed dependency Dario.cat/mergo. Build with cached dependency works fine.
Gitea Version
1.22
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.30.2
Operating System
Linux Debian, All
How are you running Gitea?
docker build --build-arg GITEA_VERSION=v1.22.0 -t dev.sarov.local/integrasdl/gitea:v1.22.0 .
Database
SQLite

It's used by https://github.com/go-git/go-git/blob/c4390a64249356c285c069c6cc833e81539a55d8/repository.go#L17
Maybe we could use https://github.com/darccio/mergo as workaround.

This shouldn't be an issue when you are using a GOPROXY. Can you check why you aren't using one?

Also check if you can reach the default GOPROXY from your build machine:

https://proxy.golang.org/
https://sum.golang.org/
https://index.golang.org/

Thanks for this report. I will close it now as the domain has been renewed, and so using a replace in go.mod is no longer needed.


No syntax checkers available for Java

I do not seem to have any syntax checkers for java on my install of syntastic.
I am running Linux mint 17.2 on vim 7.4 and I just removed and reinstalled all of the plugins that I have installed through vim.
I also have tried just having the syntastic plugin active with every other plugin inactive.
No matter what I do when I try :SyntasticInfo java I get:
Syntastic version: 3.7.0-25 (Vim 704, Linux)
Info for filetype: java
Global mode: active
Filetype java is active
Available checkers: -

I do have the javac.vim file under ~/.vim/plugins/syntastic/syntax_checkers/java/
And when I try running SyntasticCheck javac I get:
syntastic: warning: checker javac is not available
Here is my vimrc file:
" requred by Vundle
set nocompatible
filetype off

" start Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin('~/.vim/plugins/')

" Vundle plugins

Plugin 'VundleVim/Vundle.vim'

" Syntastic does syntax checking in programs
Plugin 'scrooloose/syntastic'

" Does tab completion in vim
Plugin 'Valloric/YouCompleteMe'

" Does whitespace fixing in vim
Plugin 'ntpeters/vim-better-whitespace'

" end of Vundle plugins
call vundle#end()
filetype plugin indent on
" end of vundle stuff

" YouCompleteMe commands
let g:ycm_key_list_select_completion = ['<TAB>']

" Syntastic commands
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_java_javac_executable = '~/.vim/plugins/syntastic/syntax_checkers/java/javac.vim'
let g:systastic_python_checkers = ['pylint', 'python']
let g:syntastic_mode_map = {'mode': 'active'}
let g:syntastic_python_pylint_quiet_messages = {}

" toggle Pylint error messages
" Either only Errors or Errors and Style warnings will be shown
function! ToggleStyle()
    if exists("g:syntastic_python_pylint_quiet_messages")
        if g:syntastic_python_pylint_quiet_messages == {}
            let g:syntastic_python_pylint_quiet_messages = {"level": "warnings"}
        else
            let g:syntastic_python_pylint_quiet_messages = {}
            echo g:syntastic_python_pylint_quiet_messages
        endif
    else
         let g:syntastic_python_pylint_quiet_messages = {}
    endif
    :w
    :SyntasticReset
    :SyntasticCheck

endfunction

" function that refreshes the Syntastic errors
function! RefreshSyntaxErrors()
    :w
    :SyntasticReset
    :SyntasticCheck
endfunction

nmap ds :call ToggleStyle()<CR>
nmap W :call RefreshSyntaxErrors()<CR>
" m gets rid of all extranious whitespace
nmap m :StripWhitespace<CR>

" Better whitespace commands
highlight ExtraWhitespace ctermbg=3
nnoremap fd :ToggleWhitespace<CR>

" turns on line numbers when vim starts
set number

" changes the keymaping for Esc while in insert mode to jk
inoremap jk <Esc>
inoremap JK <Esc>
inoremap Jk <Esc>
inoremap jK <Esc>
                     " Makes up and down go 10 lines instead of one
noremap <Up> 10k
noremap <Down> 10j

" toggles "paste" and "nopaste"

"set pastetoggle=<F12>

nnoremap <F12> :set invpaste<CR>
set pastetoggle=<F12>
set showmode

" Makes 'H' and 'L' go to the beginning and end of lines respecitvely
nmap H ^
nmap L $

" makes ctrl j move the window down and ctrl k move the window up
nmap <C-j> <C-e>
nmap <C-k> <C-y>

" Makes the keymap for Ctrl-n Ctrl-n to toggle numbering lines (eqivilant of
" presing 'n' twice while holding down Ctrl
nmap <C-n><C-n> :set invnumber<CR>

"changes tab to 4 spaces
set tabstop=4
set shiftwidth=4
set expandtab
retab!

"sets a line at 80 characters so you know when to do a newline
set colorcolumn=80
highlight ColorColumn ctermbg=2*

" stuff for setting leader key in vim
set showcmd
let mapleader=","

And when I set syntastic_debug to 17 my syntastic.log file is attached.
I hope that someone can figure out what is wrong
Thanks!

I do have the javac.vim file under ~/.vim/plugins/syntastic/syntax_checkers/java/

From the README:

Syntastic is a syntax checking plugin for Vim that runs files through
external syntax checkers and displays any resulting errors to the user.

The key word here is external: you need to install javac itself for syntastic's checker javac to work.  javac.vim is a 15k file, did you really believe it could possibly implement syntax checking for Java all by itself?


Add Featured Link List (Item) Component

💡 Description
Each search result item needs to be its own component as stated in the design docs. This was pointed out in the review with Anil and Edward.

Added in https://github.com/NASA-PDS/wds-react/commit/3dc12137b1e2959f2d37846e417202e366f7e2c1


Issue #33 fix part 2 - sometimes events hidden by other events

I think I fixed it properly this time... :)
I'm not 100% sure if the insets are all accurate - I might not totally understand how they should be working.  The selected event will come to the top as well.
Also, sorry about all the extra stuff before, I'm not used to the whole 'pull request' stuff on github yet.
'Before' picture:

'After' picture:

This looks great, nice job!


punishment to replace refund transfer.

this pr has the same idea with  https://github.com/raiden-network/raiden/pull/1322
for example Alice wants send 10 tokens to Charlie through Bob, when Bob receives this MediatedTransfer, Bob doesn't have 10 tokens on channel Bob-Charlie. so Bob must send this 10 tokens back to Alice. how can Alice make sure that she will not lost these 10 tokens even Bob knows the Secret from anyone else?

Bob's RefundMessage is below :

RefundMessage = namedbuffer(
    'refund_Message',
    [
        cmdid(REFUNDMESSAGE),
        pad(3),
        identifier,
        expiration,
        token,
        channel,
        recipient,
        target,
        initiator,
        hashlock,
        amount,
        fee,
        signature,
    ]
)

All this Field is copied from Alice's MediatedTransfer,except recipient is Alice now.
Bob signed this message using the following ways:
hash1=sha3(cmdid,identifier,expiration,
           token,channel,recipient,
           target,initiator,hashlock,
           amount,fee,
           )
hash2=sha3(amount,hashlock,hash1)
signature=sign(hash2)

When Alice receives Bob's RefundMessage, she will send a RemoveExpiredLock back and gives Bob a new balance proof which doesn't contain the hashlock above.
Alice MUST save this refund message to database, whenever she founds a unlock on blockchain match this refund message, she can punish Bob.
After Bob receives Alice's RemoveExpiredLock Message, Bob MUST discard the MediatedTransfer even he knows the corresponding  secret now and updates Alice's balance proof to the new state.

I'm not sure if there will be a refund in the new design

ChannelUnlocked should add parameter hashlock too , let the relevant node to know the obsolete  hashlock appears on blockchain.


MQTT Issue With Latest MQTT Broker Add-on in Home Assistant

Yesterday my ESP devices on MQTT stop working.
This issues seems to be related with update of home assistant add on for mqtt broker which I am using.
On a my ESP devices I am using pubsubclient library.
According to traces form device I can see that it actually manages to connect to MQTT server:
13:10:40.466 -> <IP_ADDRESS>
13:10:41.448 -> Attempting MQTT connection...
13:10:41.495 -> MQTT client state: 0
13:10:41.495 -> Publishing topic [/light/bedroom/desk/availability] payload: online
13:10:41.495 -> Publishing topic [/light/bedroom/desk/state] payload: OFF
13:10:41.542 -> Publishing topic [/light/bedroom/desk/brightness] payload: 0
13:10:41.542 -> Subscribing on topic [/light/bedroom/desk/state/set]
13:10:41.542 -> Subscribing on topic [/light/bedroom/desk/brightness/set]

all topics seems to be published and subscribed.
On MQTT broker add on in home assistant I can see following traces:
1621509042: New client connected from <IP_ADDRESS> as /light/bedroom/desk/ (p2, c1, k15, u'myUserName').
which I would say indicate that devices are connected on mqtt broker.
However, it seems like messages are not exchanged.
Can you please help?

working fine here just sometime stops subscribing  , i have to restart add-on or esp to get it working back
change "/light/bedroom/desk/" to something short

Did you ever resolve this?


Spin up the op stack with docker compose

Mocktimism is not meant to have a requirement on docker but as a starting point using docker will get something up and running faster

Gonna just do it without docker to start


Translate README.md to Spanish language

Can you asign me this issue?

Sure @AlexandreInsua. Assigned

Done.

@prithvi1307 , I apologize, I forget sign the commit.

Hey, can I take over this issue if it is not been completed yet?

Hi, Can you see this PR #2283 ?


Allow local registration for built-in ADF types.

Users can locally register types with the same JSON type name used for
de/serialization as the type name for some built-in Linked Service,
Dataset or Activity type.
Converters now use one type mapping to keep track of the types it can
de/serialize.
Make the list of reserved types non-static, but keep the lazy
initialization of the list to prevent the need to hit the assembly more
than once per process.
Each initialization of a client object will get its
Enables the scenario for testing new properties on existing types.

We will be bumping the package version before the release at the end of the week.

Hi @bgold09, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (brgold). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


chore: update copyright year to 2024

Minor note: the copyright notice refers to the first year of publication, although in the case of software, also of updates. Technically the year in individual modules should really only be updated when that module is next updated.


Automate cluster setup for Azure

Description
We should write terraform code to programmatically deploy hubs on Azure infrastructure, similar to our AWS and GCP terraform deployments. We already have two hubs running on Azure (#288 and #413) that we can use as reference.
Benefit
Azure probably the least-common cloud that our communities want to run infrastructure on. However, it's still one of "the big three" and will certainly be requested again in the future. Moreover, since we're already running two hubs on Azure, we can use a terraform deployment to make it easier to update and maintain those hubs in the future.
Implementation
Here is the terraform code for the UToronto deployment. We should clean this up, generalize it, and move it to this repository.
We should try to use AzureFile if possible so that we don't have to hassle with setting up our own filesystems on Azure.
Steps to complete this goal

[x] https://github.com/2i2c-org/pilot-hubs/pull/513

[x] Move the terraform directory from our utoronto deployment repo to this repo, taking care to preserve history
[x] Modify our current terraform code to work alongside the new Azure terraform stuff, making sure we have the right level of abstraction
[x] Update Azure terraform code to setup home directory storage on Azure with AzureFile

[x] https://github.com/2i2c-org/pilot-hubs/issues/718

/cc @sgibson91 who has a lot of Azure experience!

@sgibson91 do you have any experience with Azure Files? I am hoping we can use that the way we use EFS on AWS

A small amount, nothing that ever managed to get into production though.

I followed this guide to create the Azure Files volume in AKS (There's also this guide for dynamic creation)
Then, the z2jh guide for shared volumes

This issue kinda devolved into security of the data in the volume and authentication methods, i.e., using the Storage Access Key probably isn't the best move as it has full read/write access. But I also don't think any of the proposed solutions actually work for a Kubernetes deployment (they came from the context of a Data Safe Haven which is a bunch of VMs not controlled by k8s). So I'm just flagging that in case you want to factor it into your considerations.

Could we keep this one open until our azure cluster setup is documented? We have a placeholder page for this here: https://pilot-hubs.2i2c.org/en/latest/howto/operate/new-cluster/azure.html
Doesn't need to be complex since we're using terraform. I wonder if we could just reuse much of the instructions here: https://pilot-hubs.2i2c.org/en/latest/howto/operate/new-cluster/google-cloud.html ?

Yep, that PR should've closed https://github.com/2i2c-org/pilot-hubs/issues/373 not this one! Sorry for not verifying that.

No problem 🙂

Next steps on this one: @yuvipanda and @sgibson91 will collaborate together to write out some rough documentation for this, and we can refine this documentation in the future when we need to deploy a hub on Azure.

I'm removing this from our backlog and replacing it with something a bit more focused on the documentation, since that's the only remaining step: https://github.com/2i2c-org/pilot-hubs/issues/718
We can close this one when that is done as well

#718 is merged so I believe this can be closed now


Add test for streaming decoding on MoChA

Codecov Report

Merging #206 (2430f57) into master (7c4046b) will increase coverage by 0.80%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
+ Coverage   37.65%   38.46%   +0.80%
==========================================
  Files          87       87
  Lines       10088    10088
  Branches     2116     2116
==========================================
+ Hits         3799     3880      +81
+ Misses       6099     6002      -97
- Partials      190      206      +16

Impacted Files
Coverage Δ

neural_sp/models/modules/cif.py
87.34% <0.00%> (-3.80%)
:arrow_down:

...eural_sp/models/seq2seq/decoders/rnn_transducer.py
76.25% <0.00%> (-0.67%)
:arrow_down:

neural_sp/models/modules/mocha.py
85.32% <0.00%> (+2.17%)
:arrow_up:

neural_sp/models/seq2seq/decoders/las.py
59.86% <0.00%> (+8.89%)
:arrow_up:

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 7c4046b...2430f57. Read the comment docs.


Check placeholder variable style

Currently using  tag to indicate that the preceding text needs to carry the placeholder variable style as shown here: https://developers.google.com/style/code-in-text
Once style is implemented, we should make sure it looks okay in all languages.

Using a different convention for now.


Feature Request: Move recording area with the Cursor

I used this feature in another recording application and it helps a lot when I want to keep a small recording video/gif dimension but need to show multiple further-apart sections of the screen.
So e.g if i have a 600x400px wide recording area, this feature can allow moving the recording box automatically where ever my cursor goes on the screen.

I was just looking for this option myself.
I think we can get the best of both worlds (buffered and lock-step), and that would be accomplished by @WELZ-gh 's idea of post-processing. It offsets a majority of the work from the recorder onto the editor. The only problem I foresee is that it would require the initial recording to capture the entire screen space every frame so it could perform the cropping later.
Meanwhile, the recorder could encode a "follow" flag into each frame. Whether that flag is enabled throughout the entire recording, or only enabled by a hotkey at run-time, the post-processor could crop the frames based on the state of the flag.
For example:

User sets a record area of 300x300
User starts recording
User realizes they need to move to another part of the screen
User depresses Ctrl+Q (or something, doesn't matter)
The frame locks to the cursor (doesn't need to be centered)
User moves the cursor+frame to the new working region
User releases the hotkey
The frame unlocks from the cursor

This also allows the hotkey to control different types of following:

Always follow except on hotkey
Follow only while hotkey is pressed
Hotkey toggles follow

I'm working on this feature request and I'm currently implementing it like this:
(I may change it)

Activates/Deactivates by pressing a key combo.
UI is hidden during mouse movement, in order to avoid it getting in the way of the recording. (You can notice that if you move a recording window too fast and the FPS is low, parts of the UI will be captured too).
The UI will tell you when this capture mode is enabled.

Buffer mode

Configurable buffer, percentage or fixed value, independent side buffers (x4).

Always on center mode

This one poses an issue, since the mouse can be always moving around, I must always hide the recorder.

Example of buffer mode (20px at both sides)

@NickeManarin  This looks fantastic! I can't wait for this!
I think, for your potential problem, you have 3-4 options:

Tell the user they have to press some special key combination to stop recording (Windows does something similar when screen recording from PowerPoint or in a game using the "game bar").
Put an icon into the system tray / notification area that the user can click to stop recording
Leave the UI on-screen but draggable, and if it shows up in the recording it's the user's fault they didn't move the UI
Some other screen capture devices do this - is it possible to "ignore" your own UI during capture? For example, in a Zoom meeting, when you share your screen other participants don't see your own UI controls.

I think even if you just shipped Buffer mode, it would make a bunch of people happy. Keep up the great work!

Hi!
I was wonder if there is a possibility to set the bounds of the region that follows the mouse? I mean, if I only wan't to record inside an app, and don't want to catch things outside?
Thank you!

@labsforge No, right now there's no way. :/

So this won't be added or can't?
Just want to vote that this feature I'd really like, sorry to re-open but I literally found this page, by googling "follow cursor" and screen to gif.
Thanks ofr hard work regardless

@jaxjexjox Are you referring to the feature that @labsforge asked or the one that this issue ticket was created for?
If the first, create a new ticket and it will be implemented.

Nick,
I apologise, I didn't read the thread very well initially.
Should I make a new request or expand on this one? I'm slowly getting used to the program but I think my main gripe (sorry!) is that the 'snap to cursor' pixel buffer is only 100 pixels.  I kind of need something upwards of 150 to 200 pixels still, as I'm documenting stuff for some elementary users and I really and them to get a good understanding of what they're seeing.
I still would be curious to see the app do a 100% 1 to 1 snap to the cursor, even if it moves around the display a lot, just to get an idea of how that plays.

@jaxjexjox I asked what you meant because this ticket was about a "cursor following" feature that already got implemented, but another user asked about the possibility to limiting the cursor following to a specific app.
So, I was confused about what you wanted.
Now I understand that you want an increased buffer zone limit.
I opened a new ticket for that: https://github.com/NickeManarin/ScreenToGif/issues/643

Just in case anyone sees this (I'm still looking through the settings), but is their a way to force it to follow the cursor dead center (unless you move to the edge of a screen).
I've increased the buffer to 100, and it's better, but it's still only moving when the cursor is near the edge, and it's kind of disorientating.


virtaulenvwrapper.sh path fix

The virtualenvwrapper is installed into the global venv environment. This is set to $BOXEN_HOME/homebrew. The install puts the script into the bin directory. This patches the path... let me know if there is a better approach.

Can this PR be merged? I'm experiencing the same issue.


how to handle with React.createElement ?

hi
I use transform and i dont get the value from html tag like.
const options = {
  transform: (node, index) => {
    if (node.name == "button") {
      return React.createElement(
        Button,
        null,
???? <-- how to insert value to this
      )
    }
  }
}

I'm not 100% sure what you want to do but I'm guessing you want to add all children to this tag:
            const children = processNodes(node.children, transform);
            return React.createElement(Button, null, children);


adding new language/continuous pretraining notebook

I can see the new notebook to train/add a new language, but I don't know why no extra tokens are being added. The new language will not necessarily have the same script or origin. How is it a good way to train?

Iv done some finetuning to new languages, mostly Norwegian that, and in my experience adding tokens degrade the models performance.
If the base model have seen the language in question during pre-training, I would recommend not adding new tokens.
You would however probably want to change the tokens if the language uses a different script, but that will also reduce the quality of the output greatly.


Reported clock rate for decode is different than clock rate in config files

In ibm*.textpb files, the clock rate is specified as 500kHz for HD media:
			clock_rate_khz: 500

However, when decoding HD media, the reported clock rate is shown as double:
 36.1: 290.11225 ms in 123425 bytes
       26 records, 13 sectors; 1.00us clock (998kHz); 8 distinct sectors;
       logical track 36.1; 12288 bytes decoded.

This is happening because internally the decoder is using bits-per-second for the clock, which of course is half the MFM or FM clock rate (but correct for GCR). That should be relatively easy to correct in the appropriate decoders.


Calibrate Pipette Mount: Add Tip Rack

As a robot user calibrating my pipette mount, I would like to be prompted to add an appropriate tip rack to the deck, so that I can use it for pipette mount tip probe.
Acceptance Criteria

After initiating pipette mount calibration (#2130), user prompted to add the appropriate tip rack for the selected pipette to the deck in slot 5
-- User prompted to add the appropriate Opentrons (GEB) tip rack. (See note)
User also instructed to remove all other labware from deck (?)
User asked to confirm when tip rack is in slot 5

Implementation Notes

Note we can eventually expand this to accommodate any tip we have data on, esp. as we're only saving the x and y in this process.

If user arriving to this after changing pipette - they will have already removed all labware from deck.
if calibrating straight from robot page - will need to tell user to remove labware in addition to trash.

Design
https://zpl.io/2ZzEjWE
https://zpl.io/V4lmOPJ

note to self:
add exit button
and show wizard under modal


The window of WindowsTerminal v. 1.14.x, 1.15, run as Admin, is not restored if it was minimized

Windows Terminal version
1.14.1962.0
Windows build number
10.0.19044.1826
Other Software
No response
Steps to reproduce

run Windows Terminal (v.1.14, v.1.15) as administrator;
minimize the window;
try to restore the Window Terminal again (clicking on its button in taskbar, using Window manager (Alt+Tab));

There are workarounds to bring the window back.

@gabbymouth suggests to click Shift+Right mouse button on WT button in taskbar and then select the Restore option in small menu.
If WT were configured to attach the new WT to recent one, then run the new WT as Admin, it would be restored again.

First, I faced the problem on Preview WT v1.15, it was very annoying so I downgraded to v1.13 and it worked as I think until it has automatically been upgraded to v1.14.
Expected Behavior
The window of WindowsTerminal must to be restored/open
Actual Behavior
The window of WindowsTerminal stays minimized.

same

same. i can reproduce this issue if i double-click terminal icon on taskbar.

I tentatively suspect that this is a duplicate of #13589. I'm gonna wait for confirmation in that thread that they're seeing this when elevated before deduping. (although, supposedly if it happens regardless of elevated or not, then I guess that issue's just a superset of this issue...)

I have the same issue. Another workaround is to move the mouse cursor over the taskbar icon, hold down the shift key and right-click on the taskbar icon and you should get a small menu with Restore as an option. Click on Restore and it will pop up where it was.

/dup #13589

same

same, when you can't restore window while command is running with run as admin like dism /online , winget etc. and command is done then you can restore window. weird bug.

Running dism /online or any other app as admin does not change anything for me. The window still cannot be restored afterwards.

Yep, that's right. This is a known bug unrelated to what's running in the terminal. The fix for https://github.com/microsoft/terminal/issues/13589 is just waiting to be serviced at the moment.


Upgraded 3x driver to 3.9.0 & 4x driver to 4.6.0

Upgraded 3x driver to 3.9.0 & 4x driver to 4.6.0. This fixes #1

Thank you!


[locale] Italian capitalization

Changed capitalization on it-ch and it locale to reflect the docs and english locale that are capitalized
(Also the commit messages say localitazion instead of capitalization i'm sorry i'm dumb hope that's not bad)
it-ch
@xfh
it
@aliem
@nostalgiaz
I couldn't tag them all because some deleted their accounts i think?

I am not a native Italian speaker, but many search result suggest that months and days of the week are not capitalised in Italian. What's your motivation for this change?

I'm a native italian speaker and honestly don't think there's a rule about capitalization. It's not necessary, meaning that typing sabato or Sabato is the same really, i don't know if it's the same in english or not.
The reason was that the docs showed all names being capitalized in english and i wanted it to be consistent
I know some of the other authors are native speakers so i wouldn't mind their opinion on this as i'm not an expert in linguistics or anything like that


M3-832 Make SELECT ALL slightly less demanding.

Purpose
We were screaming at the user. Screaming is bad. Use your indoor voices.

Coverage remained the same at 27.634% when pulling 48000f68b58974fd2cb377ec6bae2f4a9e677ad4 on rjstires:M3-832 into 10304af39430ed8b530a17d5158e5de4692e03fc on linode:develop.


Sparkmlversions

Update spark ml version WIP

I'll drive this one - I'd like to try a few things...


Deployment Failure

GE=et an error that PropertyChangeNotAllowed, the steps in this article are not accurate.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8b6a3e65-41c2-2b42-2a04-64532ba021d3
Version Independent ID: e24ba292-e0fd-20d7-611c-30b1b664390d
Content: Expand existing host pool with new session hosts - Azure
Content Source: articles/virtual-desktop/expand-existing-host-pool.md
Service: virtual-desktop
GitHub Login: @Heidilohr
Microsoft Alias: helohr

@Mr-Pepper Can you please elaborate on the following so that it would help us update the document:

At which step are you seeing the error?
You mentioned 'the steps in this article are not accurate', can you please provide more details on this.

Thanks,

Is there any update?

We will now close this issue. Please share the details when you get a chance and if there are further questions regarding this matter, please tag me in a comment. I will reopen it and we will gladly continue the discussion.


Return Build objects in luci_build_service class instead of true

Currently a few methods in the luci_build_service class are always returning true but it is more useful if they return a Build object.

\cc @CaseyHillers

\cc @nehalvpatel a very simple backend change.

@nehalvpatel can we close this bug?

Yup, closing now.


fix helmignore issues.

NOTES.txt is necessary, check the official doc here: https://docs.helm.sh/developing_charts#chart-license-readme-and-notes
Add recommended helmignore gtom helm repo: https://github.com/helm/helm/blob/master/pkg/repo/repotest/testdata/examplechart/.helmignore

Hi @paassdc. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I signed it!

Please switch to release-1.1 branch.


Fix components ownership

What does this PR do?

Fix CODEOWNERS.
Motivation

Have the correct reviewers for those components.
Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


cssClass in AlertButton disappeared

Ionic version:  (check one with "x")
[ ] 1.x
[X] 2.x
I'm submitting a ...  (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
I can't use cssClass in AlertButton as described in my alert-options.d.ts:
export` interface AlertButton {     text?: string;     role?: string;     handler?: Function; }
Expected behavior:
Use a cssClass for style the button as described in your online docs:
Button options

Property	Type	Description
text	string	The buttons displayed text.
handler	any	Emitted when the button is pressed.
cssClass	string	An additional CSS class for the button.
role	string	The buttons role, null or cancel.

Related code:
insert any relevant code here

Other information:
The error is:
[11:07:02]  typescript: src/components/consumption-card/consumption-card.ts, line: 65
            Argument of type '{ text: string; cssClass: string; handler: (data: any) => void; }' is not assignable to
            parameter of type 'string | AlertButton'. Object literal may only specify known properties, and 'cssClass'
            does not exist in type 'string | AlertButton'.

      L64:  text: 'Ok',
      L65:  cssClass: 'primary',
      L66:  handler: data => {

The code is:
let rejectModal = this.alertController.create();
rejectModal.setTitle('test');
rejectModal.addButton({
            text: 'Ok',
            cssClass: 'primary',
            handler: data => {
                let value = parseInt(data);
                this.outcomeModel = this.buildOutcomeModel(value);

                this.outcomeDescription = this.outcomeModel.getDescription();
                this.buttonClass = OUTCOME_STATES.OWN_CHOICE;
                this.iconColor = 'red';
                this.onOutcome.emit({consumption: this.consumption, outcomeModel: this.outcomeModel});
            }
        });

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
$ ionic info

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.1
Xcode version: Not installed

Facing the same issue. The AlertButton interface introduced with 2.3.0 is missing the cssClass property.

yeah, it is already fixed. in the meantime, you can just force a cast in typescript, remember TS is just for linting, the types are not real.

@manucorporat Could you give an example of forcing a cast in typescript, as you recommend? If I try:
const alert = this.alertCtrl.create(<AlertOptions>{
      title: "Error",
      message: "Something's wrong",
      buttons: [{
          text: "OK",
          role: "cancel",
          cssClass: "alert-button"
      }]
});
alert.present();

the transpiler still complains:
Type '{ title: string; message: string; buttons: { text: string; cssClass: string; role: string; }[]; }'
cannot be converted to type 'AlertOptions'. Types of property 'buttons' are incompatible. Type '{ text:
string; cssClass: string; role: string; }[]' is not comparable to type '(string | AlertButton)[]'. Type '{
text: string; cssClass: string; role: string; }' is not comparable to type 'string | AlertButton'. Object
literal may only specify known properties, and 'cssClass' does not exist in type 'string | AlertButton'.

Do I need to create a new interface or... something?

@shanehughes3:
const alert = this.alertCtrl.create(<any>{
      title: "Error",
      message: "Something's wrong",
      buttons: [{
          text: "OK",
          role: "cancel",
          cssClass: "alert-button"
      }]
});
alert.present();

@jsayol Aha - thank you! Looks like I need to hit the books on typescript some more...


Small error in readme

In the readme it states that the "enabled" configuration can be set like this:
    'enabled' => app()->environment() === 'production',
This causes the following error, probably because the environment is not yet set at this point:

Fatal error: Uncaught ReflectionException: Class env does not exist in /home/vagrant/Code/barryvanveen/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 734
ReflectionException: Class env does not exist in /home/vagrant/Code/barryvanveen/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 734

I believe a better way to use this would be:
    'enabled' => env('APP_ENV') === 'production',
Could this be fixed in the readme to help new users?
Cheers,
Barry

Fixed 👍


Enhancement: DatePicker Width/Depth

Hi, the new date picker is awesome, thanks, it would be useful to be able to select only years for example, i.e. If the user wants to pick a cars years model.

Sorry, this component not support only years selection.
Sometimes later, when I will implement my own datepicker component - I will make this.
But now it is not possible.

Ok, that sounds great, will wait until the new datepicker is released.


Allow 'export default's in JS files without incorrect error

Fixes #6794.

@RyanCavanaugh @billti

:+1:; log an issue for fixing the conformance test thing

:+1:


{shutdown,connack_timeout} when benchmark

Hi!
I already set the config:
listener.max_connections = infinity
listener.nr_of_acceptors = 1000
erlang.max_ports = 10000000
erlang.process_limit = 10000000
And use emqtt_benchmark
Two console:
./emqtt_bench_sub -c 20000 -i 10 -t bench/%i -q 2
./emqtt_bench_pub -c 100 -I 10 -t bench/%i -s 25
A few minutes, it will be:
[error] [Client <0.8154.1>] CONNACK Timeout!
client 6372 EXIT: {shutdown,connack_timeout}
Topics: ["bench/%i"]
conneted: 19054
[error] [Client <0.8157.1>] CONNACK Timeout!
client 6371 EXIT: {shutdown,connack_timeout}
Topics: ["bench/%i"]
conneted: 19055
[error] [Client <0.8160.1>] CONNACK Timeout!
client 6370 EXIT: {shutdown,connack_timeout}
Topics: ["bench/%i"]
conneted: 19056
Another time, when all the clients conneted, suddenly many clients got "{shutdown, tcp_closed}".
It works with emqttd

I test again, and this time, all the clients connectd, and work well a while, the sub clients:
client 17564 EXIT: {shutdown,tcp_closed}
client 17563 EXIT: {shutdown,tcp_closed}
client 17562 EXIT: {shutdown,tcp_closed}
client 17561 EXIT: {shutdown,tcp_closed}
client 17560 EXIT: {shutdown,tcp_closed}
client 17558 EXIT: {shutdown,tcp_closed}
client 17559 EXIT: {shutdown,tcp_closed}

Thanks for your input!
Can you help us a little understanding what the scenario does?
It seems you setup a 100 publishers doing 10k msg/s total. (but to what topics?)
and 20k subscribers, but to what topics?

I have not look the code of emqtt_benchmark, I just take the tool to test emqttd and vernemq.
By the way, if vernemq has something like emqttd_dashboard would be better.
Demo

For example, create 50K concurrent clients at the arrival rate of 100/sec:
./emqtt_bench_sub -c 50000 -i 10 -t bench/%i -q 2
For example, create 100 clients and each client publish messages at the rate of 100 msg/sec.
./emqtt_bench_pub -c 100 -I 10 -t bench/%i -s 256
Topic is "bench/%i"

OK, just guessing here:
First you seem to have 20k subscribers to 20k exclusive topics. But you send messages to only 100 of those topics, so the other connections will timeout, if they don't answer to keepalive.
Will have to look into the CONNACK problem otoh.
As I said, this is just guessing atm, I'll try to verify with your benchmark.

Is that  the vernemq server can not handle too much client connections in the same time?

No, at least 100 connection setup per second shouldn't be any problem.
By the way: an MQTT client can decide itself what it's CONNACK timeout is. I don't know what it is for your benchmark.
I found out though, that the default keepalive set is 600 seconds (that is, if you don't set any own keepalive timeout). This means your subscriber will disconnect after 5 minutes, if they never issue any MQTT control packets.

I use emqtt_benchmark to test emqttd, it will be fine.
But i use emqtt_benchmark to test VerneMQ, it will be connack_timeout in the same situation.

I guess the jobs rate limiter kicks in.

Thank you for your reply.
Can i make VerneMQ higher performance easily? like change some configuration.
I just decided to use VerneMQ, not emqttd, but in the benchmark, found this situation.

If this is the reasonit would be a config setting away... I have to verify it and get back to you.

Hi there.
OK, I did the test you mentioned in your first post myself:
./emqtt_bench_sub -c 20000 -i 10 -t bench/%i -q 2
./emqtt_bench_pub -c 100 -I 10 -t bench/%i -s 25

Instead of the -i 10 I used -i 1 which allowed to setup the 20000 consumers way faster (I guess 1ms sleep instead of 10ms). No problems occurred during the setup of the consumers. I must mention that I waited until all consumers were started before starting the publishers. After the publishers were publishing I ve seen the expected message rate, however with the given default configuration for max_online_messages and my pretty old test laptop (with many other programs open) I was constantly dropping some messages (discovered in console.log).
After about 5 minutes I got the mentioned {shutdown,tcp_closed}. Another check in the console.log file it was clear that VerneMQ has forcefully disconnected those 20k consumers, due to keepalive expired:
2016-04-24 21:34:26.574 [warning] <0.3967.3>@vmq_mqtt_fsm:connected:389 [<0.3967.3>] stop due to keepalive expired

It actually makes sense that this happened! Although the consumers are subscribed with QoS 2 the messages are delivered as QoS 0. This is because VerneMQ doesn't upgrade the QoS per default (similar to other brokers, not sure im emqttd does though). The upgrade_outgoing_qos VerneMQ config would allow you to change this behaviour.
But: it seems that the benchmark subscribers are not sending the required PINGREQs in case of QoS 0.
Regarding my previous comment, I am pretty sure the 'jobs' rate limiter is not an issue here, as the emqtt_bench_sub/pub is setting up the connections sequentially (at least what I've seen flying over the code). That said, on a decent machine I've seen connection setup rates over 1000 connections per second with VerneMQ, without special tuning of our rate limiter.
Hope this all makes sense .
Thank you for your suggestion with the dashboard. It hasn't our top priority at the moment but it is on our roadmap.
Cheers,
Andre

The CONNACK problem is happening for me also. I see TCP-retransmissions of the MQTT Connect Command in Wireshark.
Do you see anything in the VerneMQ console.log?

The CONNACK problem is isolated to be in LevelDB. A PR with a workaround is pending: https://github.com/erlio/vmq_server/pull/54

Thanks!
I will test when the PR merged.

@dergraf @ioolkos @dcy
I did the same test with vernemq and emqttd ,used the vernemq version is 0.12.5p4 .
I test ./emqtt_bench_sub -c 3000 -i 10 -t bench/%i -q 2 for vernemq and emqttd .
after some times , the vernemq console shows message:
".........@vmq_mqtt_fsm:connected:389 [<0.3967.3>] stop due to keepalive expired "
and all of the clients stoped by vernemq.
Firstly I thought may be the emqtt_bench_sub would not send keepalive message, Then I test with emqttd, In the console ,I saw , emqtt_bench_sub have send the keepalive message for 5 mins default.
so the emqtt_bench_sub really have sent the keepalive msg.
as @ioolkos said that " This means your subscriber will disconnect after 5 minutes, if they never issue any MQTT control packets. "  ,Does it  means that the vernemq ignore the keepalive msg as MQTT   control packets .The PINGREQ is also the MQTT   control packets.
@dergraf  said "But: it seems that the benchmark subscribers are not sending the required PINGREQs in case of QoS 0"  from the emqttd console I saw it really sent the PINGREQs . And in vernemq.conf I set upgrade_outgoing_qos=on.  after that the problem always happen.
how to fix that??

@liucy2007975
I just did 3 test runs with the exact command you had:
./emqtt_bench_sub -c 3000 -i 10 -t bench/%i -q 2
I observer the traffic in Wireshark. There we see that the connections come in with a keepalive timeout of 300 seconds set.

Mosquitto: did not receive a ping req within 300 seconds, and correctly disconnect the connections after 5 min+
VerneMQ: did not receive a ping req withing 300 seconds, and correctly disconnect the connections after 5 min+
EMQTT did not disconnect the connections, and the emqtt_bench started sending Ping Requests after 600 seconds.

In other words: the bench sends the ping requests too late. Please read what the MQTT spec states re: keep alives, if this still remains unclear.

@ioolkos  thank you for your reply!
Yeah, I see.  and I  just found that the emqttd  detect the clients disconnection time is  (Keepalive * 0.75) .


Feature/detect_xpress_at_runtime

-Detect Xpress at Runtime

Release one asset for each platform

I've tried to use it. When I run a simulation (example/SmallTestFiveCandidates) with solver = xpress but xpress missing from my env I get the following output
`Launching Problem Generation
[Full Run - Problem Generation][INFO 31-10-2023 14:55:55] rename problems: false
Could not find the Xpress shared library. Looked in: [/lib/libxprs.so', '/opt/xpressmp/lib/libxprs.so', ']. Please check environment variable XPRESSDIR
Warning: false
Warning: false
Warning: falseWith the warning repeated a lot of times then[Full Run - Problem Generation][INFO 31-10-2023 14:55:57] Problem Generation ran in: 2 seconds
[Benders][INFO 31-10-2023 14:55:57] starting Benders mpi
LOG_LEVEL                                                 0
MAX_ITERATIONS                                                -1
ABSOLUTE_GAP                                                10
RELATIVE_GAP                                             1e-06
RELAXED_GAP                                             1e-05
SEPARATION_PARAM                                               0.5
MASTER_FORMULATION                                           integer
AGGREGATION                                                 0
OUTPUTROOT                                                 .
TRACE                                                 1
SLAVE_WEIGHT                                          CONSTANT
SLAVE_WEIGHT_VALUE                                                 3
MASTER_NAME                                            master
STRUCTURE_FILE                                     structure.txt
INPUTROOT                                                 .
CSV_NAME                              benders_output_trace
BOUND_ALPHA                                                 1
SOLVER_NAME                                            XPRESS
JSON_FILE/home/marechaljas/CLionProjects/antares-xpansion/examples/SmallTestFiveCandidates/output/20231031-1455eco-Xpansion/expansion/out.json
LAST_ITERATION_JSON_FILE/home/marechaljas/CLionProjects/antares-xpansion/examples/SmallTestFiveCandidates/output/20231031-1455eco-Xpansion/expansion/last_iteration.json
TIME_LIMIT                                             1e+12
LAST_MASTER_MPS                             master_last_iteration
RESUME                                                 0
LAST_MASTER_BASIS                             master_last_basis.bss
BATCH_SIZE                                                 0
Warning: false
[Benders][INFO 31-10-2023 14:55:57] error: This is line 93 of file /home/marechaljas/CLionProjects/antares-xpansion/src/cpp/multisolver_interface/SolverFactory.cpp (function create_solver)
Solver 'XPRESS' not supported

MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.`
If I run with default solver it works as intended. However I do get:
Could not find the Xpress shared library. Looked in: [/lib/libxprs.so', '/opt/xpressmp/lib/libxprs.so', ']. Please check environment variable XPRESSDIR

Warning: false

With the last warning repeated several times
I note 3 points:

The "Warning false" obscuring the output
The warning around xpress when we didn't ask for an xpress simulation
The error at benders step when Xpress is not present. This should be caught earlier