Fix #2620: pk_columns & unique_columns fixed

Describe your changes :

issue #2620
pk_columns & unique_columns fixed

Type of change :

[x] Bug fix

Checklist:

[x] I have read the CONTRIBUTING document.
[x] I have performed a self-review of my own.
[x] I have tagged my reviewers below.
[ ] I have commented on my code, particularly in hard-to-understand areas.
[x] My changes generate no new warnings.
[ ] I have added tests that prove my fix is effective or that my feature works.
[x] All new and existing tests passed.

Reviewers

Ingestion: @harshach @ayush-shah @pmbrul

@ulixius9 let's test this with other connectors to see if it's not breaking anywhere.

@ayush-shah tested this code change with mysql, mssql, postgres, redshift & vertica and it's not breaking anywhere.


use classloader to load class

@johncarl81 I can't find the 1.1.11-SNAPSHOT anywhere. I am also getting ClassNotFoundException on a Huawei tablet

what class is not found @kaciula?

The class that is not found at runtime is MyClass$$Parcelable. It is being generated but at runtime, it is not being found. Also I am using the proguard settings mentioned in the README. It's happening only with the release version and not the debug version. However, I am using the same proguard settings for both.
After doing some small unrelated code changes, I no longer get the exception.


Visit GAT (Generic Associated Types) + Fold pattern

A bit of context before you read this: #4112
I'm working on the AST template macro, My current approach is something like this:
a. use oxc_ast_codegen to generate a visitor with support for every visitable AST type(placed at oxc_ast_quote/src/generated/{here})  that would:

accept an interop resolver or map
visit each node
visit inner nodes to get their TokenStream
produce a TokenStream to create that node at runtime
short circuit on literals and enums that are either unit or wrapping literals

b. proc-macro

substitute and map the interpolation spans to their inner value(which would support identifiers for now but it can be extended to accept rust expressions as well)
i. In the initial implementation we use raw string manipulation here
ii. as our next step we can add support for QuoteInterpolation in our parser with an ast_quote_parser feature to prevent multiple iterations on the source code(but with caching, we might not need this).
parse the macro input with oxc_parser
check for errors and retrieve the valid program
use the visitor generated in step a to create something like Statement(BlockStatement { ... })
add support for generating tracing boilerplate to mimic what ast_builder would've done before as our single point of construction(e.g. counting allocations in debug builds)

As you might already see it feels like a good place to introduce the Fold pattern to our arsenal, So I'm re-proposing one of my old suggestions which is adding a generic associated type Result to both Visit and VisitMut this way we won't need a new visiting paradigm while being able to selectively return from our visitor implementations.
It goes like this:
pub trait VisitResult: Default {
    fn extend(&mut self, next: Self);
}

impl VisitResult for () {
    fn extend(&mut self, next: Self) {}
}

pub trait Visit<'a>: Sized {
    type Result: VisitResult;

    fn visit_program(&mut self, it: &Program<'a>) -> Self::Result {
        walk_program(self, it)
    }
    // ...
}

pub fn walk_program<...>(visitor: V, it: &Program<'a>) -> V::Result {
    let mut result = V::Result::default();
    let kind = AstKind::Program(visitor.alloc(it));
    visitor.enter_node(kind);
    visitor.enter_scope(
        {
            let mut flags = ScopeFlags::Top;
            if it.source_type.is_strict() || it.directives.iter().any(Directive::is_use_strict)
            {
                flags |= ScopeFlags::StrictMode;
            }
            flags
        },
        &it.scope_id,
    );
    result.extend(visitor.visit_directives(&it.directives));
    if let Some(hashbang) = &it.hashbang {
        result.extend(visitor.visit_hashbang(hashbang));
    }
    result.extend(visitor.visit_statements(&it.body));
    visitor.leave_scope();
    visitor.leave_node(kind);
    result
}

Our current implementations would only need to add this one line:
impl<'a> Visit<'a> for X {
    type Result = ();
    // ...
}

A similar implementation in rustc.

@oxc-project/core Would you guys care to pitch in? Both in terms of my general approach and this fold pattern. I'm still in really early stages and haven't even gotten to a working demo so it's just the right time to bikeshed over this.

The macro in question is going to have multiple variants and one configurable version which are something like this:
// ideally
let js_stmt = quote_js!(let x = 123);
let ts_stmt = quote_ts!(let x: number = 123);
let jsx_stmt = quote_jsx!(
{123}
);
let tsx_stmt = quote_tsx!(
{123 as T}
);

// worst case, it has all of the above plus
let js_expr = quote_js_expr!(123);
let ts_expr = quote_ts_expr!(123 as T);

// with configuration
let ast = quote_ast! {
    // accept configuration as an inner attribute on the first line since the syntax isn't a valid JS
    // and using arguments and having `,`  is hard to parse because it looks like a valid JS code at times
    // (or we have to parse the input more thoroughly instead of YOLOing it).
    #![source_type(js), as(Vec<'a, Statement<'a>>)]
    let x = 123;
    let y = 456;
    let z = x + y;
};

A lot here, I'm going to go through it one by one:
Parsing style
I suggest parsing everything as TSX, to avoid needing quote_js, quote_ts etc. Just quote_ast!.
In practice I can't imagine many (or any) cases where a snippet needs to be parsed specifically as JS/JSX/TS/TSX to be valid. In unlikely event that we do hit such a case, we could just write out the code explicitly (as we do now) and not use the macro. Simplify for the common case.
Macro name
How about ast!, snippet! or fragment!?
Syntax
I don't think ast!(...).into_in(self.allocator) will work. Where there's multiple levels of Box/Vecs required, the macro will need to insert alloc calls in its output.
I suggest:
trait Builder<'a> {
  fn allocator() -> &'a Allocator;
}

Implement this trait on everything which has access to allocator - e.g. AstBuilder, TransformCtx, TraverseCtx.
Then you can use any of these as first arg to macro for a less verbose style:
let stmt = ast!( self, let x = #{foo}; );
let stmt = ast!( ctx, let x = #{foo}; );
let stmt = ast!( ast, let x = #{foo}; );

Macro can access the allocator via Builder::allocator for use in Box::new_in, Vec::new_in, into_in etc.
Builder trait could be later extended with a method to generate AstNodeIds, if we end up adding them to every node.
Type coercion
syn's parse_quote! macro manages to determine output type via type coercion. I think ideal API (from macro user's perspective) would be if we do the same. So only 1 macro, and no "config" required. e.g. all these would be valid:
let assignment: AssignmentExpression = ast!( self, x = 123 );
let expr: Expression = ast!( self, x = 123 );
let stmt: Statement = ast!( self, x = 123 );
let stmts: Vec<Statement> = ast!( self, x = 123 );

Similarly for interpolation:
let expr: Expression = get_expression_somehow();
// `expr` gets converted to a `Statement`
let func_decl: Statement = ast!( self, function foo() { #{expr} } );

I don't know how parse_quote! achieves this, but I'm guessing something like .into_in(). Maybe it's impractical, or will increase compile times too much, but I think worth investigating.
Scopes
Ideally macro would also generate correct scope/symbol info, e.g. for things like this:
let stmt: Statement = ast!( self, function foo(x) { return x; } );

let name: BindingIdentifier = get_binding_id_somehow();
// NB: `name` in `return #{name}` gets converted to an `IdentifierReference`
let stmt = ast!( self, function foo(#{name}) { return #{name}; } );

Access to scope tree and symbols could be via Builder trait.
Not sure how it'd know what the parent scope is. Maybe macro should only generate internal scope tree, and linking the snippet into existing scope tree should be left to the user.
Probably the stuff with identifiers is too tricky for initial implementation. We could leave that to macro user initially and add more capability to the macro later.
Visitor + macro
This architecture makes sense to me. Nice!
Fold pattern
I'm not opposed to this. However, I don't entirely see how extend would work for this use case. Are you sure that's enough?
If it does work, but we don't want to alter current Visit trait, we could alternatively create a new trait in which visit_* methods return Self::Result. Thanks to your codegen, generating a whole new trait is not such a burden.
Side note: Just to mention something I've probably not said out loud before: I am hoping we can condense Visit, VisitMut and Traverse into a one-size-fits-all visitation trait in future. I think Traverse could be extended to do everything that Visit and VisitMut do (and more), and be just as performant. That's just a vague thought at the moment though - may not come to fruition.
GAT
Sorry if I'm ignorant, but what is a GAT?
(side note: I think it's preferable to avoid abbreviations and unexplained compiler jargon in issues if possible - there are smart people out there who could be great contributors to Oxc, but may not be steeped in knowledge of compilers - let's try to be accessible)

We need a meeting session so I can have a clear mental model of this, before we write down any code.

Parsing style
I suggest parsing everything as TSX, to avoid needing quote_js, quote_ts etc. Just quote_ast!.
In practice I can't imagine many (or any) cases where a snippet needs to be parsed specifically as JS/JSX/TS/TSX to be valid. In unlikely event that we do hit such a case, we could just write out the code explicitly (as we do now) and not use the macro. Simplify for the common case.

You are probably right on this one, We might not need to differentiate between them at all. All of these are different invocations of the ast macro with different configurations so at the end if you really need to parse with a specific configuration you can use that.

Macro name
How about ast!, snippet! or fragment!?

I think having the quote in the name is better than having generic names such as ast!, expr! or snippet!. We are quoting another type of code here and it feels natural to use because we already have quote (quote crate) and parse_quote (syn) in the rust ecosystem. Suppose someone has seen any proc-macro code before they'd understand what a quote_js or quote_ast would do(or at least have a guess). I just went with the conviction established in that space and used by SWC as well.

Syntax
I don't think ast!(...).into_in(self.allocator) will work. Where there's multiple levels of Box/Vecs required, the macro will need to insert alloc calls in its output.

I planned to wrap the result as a lazy closure and have it be there lazily until you call into_in or possibly build on it.
I'd like to avoid passing anything but the valid JS as our macro input. look at this example:
let a = quote!((ctx), (ctx, ));

It just confuses me because we don't want to wrap our code in strings, You can't easily see where the rust expr ends and js one starts.
If Instead of that we create a type that would be something like this:
struct LazyQuoteAst<'a, R, F: FnOnce(&'a Allocator) -> R> {
    fun: F
}

impl<...> LazyQuoteAst<...> {
    pub fn build(self, alloc: &'a Allocator) -> R {
        self.fun(alloc)
    }
}

We can output this in our macro:
LazyQuoteAst { fun: |alloc| {
    // stuff...
}}

And use it like so:
let lazy_a = quote!(let x = 123;);
let lazy_b = quote!(#{lazy_a} let y = 456;);
let stmts = lazy_b.build(some_random_allocator_with_no_need_for_traits);

Type coercion
syn's parse_quote! macro manages to determine output type via type coercion. I think ideal API (from macro user's perspective) would be if we do the same. So only 1 macro, and no "config" required.

This one is something I'm really fond of, It is a bit complicated because we need to rely on our return type to know the result and that should happen in runtime. syn gets away with this because they already parse in peace meals and can afford to have a dedicated Parse implementation for each resulting type, We would like to create the code regardless of the result.
With that we are going to experience runtime errors as opposed to comptimes that's why I think it is going to be hard to adopt this without sacrificing something(either perf or runtime safety).
I do a really nifty trick for distinguishing between when we return Statement vs. Vec<Statement>. I parse the input and see how many statements are there if one we return one otherwise we return a vector. We can force a single ExpressionStatement to be parsed as Expression but it creates other problems for us when we want to explicitly parse expressions as statements.

Scopes

I think this should be left for the user, It isn't part of a template system. And you can easily have your identifier references with something like this:
let name: BindingIdentifier = get_binding_id_somehow();
// NB: `name` in `return #{name}` gets converted to an `IdentifierReference`
let stmt = ast!( self, function foo(#{name}) { return #{get_binding_reference_somehow(name)}; } );

It has a much better macro hygiene as well. It won't do anything magical for you, It just allows you to write less boilerplate.

Fold pattern
I'm not opposed to this. Presumably the generic will make Rust compiler generate much more code (multiple versions of Visit, walk_*), but that's probably worth it if it solves a problem.

About the compile time costs, We only pay for it where we need it so anything with a unit result would be the same as before. But I think we shouldn't go too crazy with it, Right now the plan is to only use it in our comptime, It shouldn't be a common pattern in the project but it allows custom folds which can help in some sticky situations.

However, I don't entirely see how extend would work for this use case. Are you sure that's enough?

As I've said, I'm yet to get to a working demo but It seems promising, think of it as an accumulation on results instead of a traditional fold, If we ever need anything we can just keep it in our result type(for example it can contain ASTNodeId or the nodes themselves).
For this specific case I was thinking about the result as a TokenStream so extend would do just that, We want to add together a bunch of token streams and return them. There might be some edge cases that I haven't thought of yet, We'll find them as we move on with the implementation.

If it does work, but we don't want to alter current Visit trait, we could alternatively create a new trait in which visit_* methods return Self::Result. Thanks to your codegen, generating a whole new trait is not such a burden.

I didn't want to introduce yet another trait for it but a Fold trait might be a good choice here since we can generate it for our macro only and don't put it in the production. It won't have any effect on my process so it is up to Boshen I guess.

Side note: Just to mention something I've probably not said out loud before: I am hoping we can condense Visit, VisitMut and Traverse into a one-size-fits-all visitation trait in future. I think Traverse could be extended to do everything that Visit and VisitMut do (and more), and be just as performant. That's just a vague thought at the moment though - may not come to fruition.

Oh, we talked about this in one of our meetings I remember the discussion. If I'm not mistaken we talked about the possibility of using traverse underneath. But the visitor pattern is just too universal to get rid of. Every developer has used a visitor pattern before so it is easy to understand, Traverse on the other hand is unconventional and only there to solve a limitation of visitors specifically with rust borrow checker and aliasing.
That's why I think we should keep visitors as an easy means to visit nodes where you don't need all of the freedom of Traverse.
Every beginner programming guide has a section for visitors so people should be familiar with it. Just search top 20 design patterns and you'll see every single result would have a visitor section.

GAT
Sorry if I'm ignorant, but what is a GAT?
(side note: I think it's preferable to avoid abbreviations and unexplained compiler jargon in issues if possible - there are smart people out there who could be great contributors to Oxc, but may not be steeped in knowledge of compilers - let's try to be accessible)

Sir, you are absolutely right. Generic Associated Type is a relatively new term(stabilized in 2022?) And I should've used the full name here just to avoid confusion.
Let me know if I've missed anything.

We need a meeting session so I can have a clear mental model of this, before we write down any code.

Aye aye cap⚓My schedule was a bit weird this week(and sadly continues to be through the following week), I'll hit you up on Discord so we can figure out a time that would work for everyone.

let lazy_a = quote!(let x = 123;);
let lazy_b = quote!(#{lazy_a} let y = 456;);
let stmts = lazy_b.build(some_random_allocator_with_no_need_for_traits);

Ah ha this is nice. We can also inject other info with this pattern e.g.:

quote!(let x = 123;).span(span).build(alloc);
quote!(let x = 123;).scope(scope_id).build(alloc); (to support generating scope binding for x)

Can we still support type inference with the nested version quote!(#{lazy_a} let y = 456;);?

I think scopes should be left for the user

I disagree. Ideally macro would do it for them. From experience updating the transformer to set scopes/symbols/references correctly, it's a lot of boilerplate code, and quite error-prone.

Type coercion

I think this is really important for ergonomics.
We can still use parser without alteration by wrapping the code snippet in appropriate surrounding code before parsing, and then just pull out the part of the AST we want. e.g.:
let params: FormalParameters = quote!( {x = 1}, y, z ).build(alloc);

would wrap the snippet as (function( {x = 1}, y, z ) {}) before parsing, and return program.body[0].expression.expression.params.
I'm not saying we have to do all this in first iteration, but just trying to define what our end goal is.

Ah ha this is nice. We can also inject other info with this pattern e.g.:
* `quote!(let x = 123;).span(span).build(alloc);`

* `quote!(let x = 123;).scope(scope_id).build(alloc);` (to support generating scope binding for `x`)

Supporting nested lazies is quite a complication, maybe should skip that initially. It's not too bad for user to do this instead:
let not_lazy_a = quote!(let x = 123;).build(alloc);
let lazy_b = quote!(#{not_lazy_a} let y = 456;);
let stmts = lazy_b.build(alloc);

Wow! I like how you expanded on this builder to do the scope stuff. It also allows the end user to provide their custom logic via traits. For example, you may want a custom strategy for the allocation or scope management of a specific node(e.g. identifier references), You implement a custom trait for your specific node, And on paper, you should be golden.
trait LazyScope<R> {
    fn build_in_scope(self, semantic: &Semantic) -> R;
}

impl<'a, F: FnMut(&'a Allocator) -> IdentifierReference<'a>>
    LazyScope<R> for LazyQuoteAst<'a, IdentifierReference<'a>, F>
{
    fn build_in_scope(self, &'a alloc: &'a Allocator, semantic: &Semantic) -> IdentifierReference<'a> {
        let node = self.build(alloc);
        // stuff...
        node
    }
}

I disagree. Ideally macro would do it for them. From experience updating the transformer to set scopes/symbols/references correctly, it's a lot of boilerplate code, and quite error-prone.

I totally agree with your point, What I was trying to say with "...It isn't part of a template system..." was that it should happen through other means than a proc-macro, But you are making quite a strong case for having some simple infrastructure to help with it, And maybe adding it to the quote macros is the way to go. Let's have a chat about it to figure out our requirements for this. It has to wait for the next iterations but if it benefits us to have such a thing in our macro then we should do it.

But I do think it's important to be able to generate all kinds of AST nodes

Yes, we should find a way to do so, To be honest, it is quite a complicated process to be able to produce all of the ast kinds(especially with how interpolations should be substituted). I suggest for the start we only provide 2 macros, quote_stmt for statements and quote_expr for expressions. Later on, we can expand our infrastructure to support different kinds and then we can expose a more general macro called quote.
I think to support this we need an actual parser to parse interpolations which can happen in our parser with a feature flag or we can have 2 passes on the input source.


[#2130] fix(server): Potential huge partition limit invalid when flushing is slow

What changes were proposed in this pull request?
fix potential huge partition limit invalid when flushing is slow
Why are the changes needed?
Fix: #2130
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit tests

PTAL @maobaolong

cc @jerqi PTAL


[1.4.x backport] Attempt to recover from Errors and RuntimeExceptions

Looks like this is already backported, thanks!


Single buffer manager with multiple size classes

This is the first PR towards the goal that our BM can allocate pages with multiple size classes, e.g., 4KB, 8KB, ..., 1GB, etc, that are backed by a single memory pool.
This PR changes internal implementation of BM, while still keeps its interfaces unchanged, and also page sizes.
Only 4KB and 256KB are two supported size classes in this PR, which will be extended to more size classes in the following PR.
MemoryManager
Inside MM, there are multiple MemoryAllocator, each is responsible for allocating/reclaiming memory blocks of its size class (backed by a temp in-mem file) from the BM. Same page reuse logic is implemented to avoid allocating new pages when possible.
BufferManager
Inside BM, there are multiple BufferPools, each corresponds to a collection of frames with a fixed page size class.
The buffer pool is backed by one or more mmap regions (virtual memory space). There can be more than one region due to that mmap() has length limit of SIZE_T_MAX.
During construction, the buffer pool maps its frames to its own allocated regions, and leaves the responsibility of handling memory fragmentation to the OS.
Pin and Unpins will still go through FileHandle. The locking and mapping from page id to frame id logic remains unchanged, but the eviction strategy is now changed to queue-based so it can adapt to variable-sized frames easily.
See comments above claimAFrame() for details.
The physical memory usage is tracked by an atomic usedMemory, which guarantees the memory usage is always below what user specifies maxSize. usedMemory is incremented when we fill an empty frame and decremented when we actually remove a page out of a frame.
Thanks to Fadhil Abubaker (@fabubaker) who helped us with the initial prototype on the mmap idea in his course project with Semih.

The design has shifted, I should open a new PR instead of continuing on this one.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-yml-archive-non-versioning-archive/pull/57 is merged into live branch.
Auto archive content to https://github.com/VSC-Service-Account/docs-yml-archive-non-versioning-archive.git

Docs Build status updates of commit 8eeaae9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

docs/TOC.yml
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-1.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-2.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-3.yml
:white_check_mark:Succeeded
View

docs/to-be-archive/level2/article3-2-1.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level2/article3-2-2.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level2/article3-2-3.yml
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Integration with non-Rails Rack applications

I'm attempting to use Rails Autoscaler with a non-Rails app. I can see the collector getting data, but none of it is making it up to the actual service - is there anything else I need to do to make this work?
The only change I've made is to introduce the following monkey patch:
require "rails_autoscale_agent/middleware"

module RailsAutoscaleAgent
  module Logger
    # Rails Autoscale (naturally) goes to Rails.logger by default,
    # which doesn't exist in this context.
    def logger
      SemanticLogger["rails_autoscale"]
    end
  end

  class Config
    # The default implementation of this makes use of Object#present?
    # on the config value. Replace it with just doing this by default
    # (which will ignore requests with > 10kb request body, as they
    # apparently throw off the metrics)
    def ignore_large_requests?
      true
    end
  end
end

@jellybob Hey, excellent! You're the first user I know of using this in a non-Rails context. Would you mind trying https://github.com/adamlogic/rails_autoscale_agent/pull/3 to see if you can remove your monkey patch?
gem 'rails_autoscale_agent', github: 'adamlogic/rails_autoscale_agent', branch: 'non-rails-support'

You'll need to manually insert the RailsAutoscaleAgent::Middleware. If you still don't see data making it into Rails Autoscale, shoot an email to<EMAIL_ADDRESS>and we'll figure it out.


feat: ACL defaults for host and permission

Avoid setting on each and every ACL rule:
host: *
permission: ALLOW

They are set by default and can be overridden

Hi @gquintana ,
Wouldn't it be better to be able to manager default values settings section of the state ?
Something like this:
settings:
  topics:
    defaults:
      replication: 3
      configs:
        host: *
        permission: ALLOW

This would then allows to specify default value for all the configs.
Best,
Jerome

To me it's not a topic setting (think about cluster and group ACLs) but an ACL default. I am not sure being able to configure this default is necessary
Note that the "host: *" is the default when using "kafka-acls.sh" tool.
I chose the default "permission: ALLOW" because from security point of view everything should be forbidden, unless it's allowed by an ACL. Moreover it's the default, on Kafka Broker side (allow.everyone.if.no.acl.found defaults to false). The contrary (allow everything unless it's forbidden) doesn't make sense to me.
Note to myself:  the "pattern: LITERAL" should be also be the default

Ah sorry yes I clearly made a confusion !
Then I agree thanks !

Thanks for the contribution -- should be in the next release shortly :)


Core Author username
Coin-OpCollection
Core .yml snippet
display_name: NARC
repository: Distribution-OpenFPGA
filter: pram0d.zunit_

Closed per #813.


Empty array when sheetname has spaces

I'm trying to read exel file and its has sheetnames with spaces
Sheet with sheet name as 'Something One' -> does'nt read gives empty array
Sheet with sheet name as 'SomethingOne' -> reads gives data back
is this a configuration level thing or a bug ?
const bufferArray = e?.target?.result;
const wb = XLSX.read( bufferArray, { type: 'array' } );
const wsname = wb.SheetNames[7];
const ws = wb.Sheets[wsname];
const data = XLSX.utils.sheet_to_json(ws, {
  defval:'',
  raw : true,
  header : ['OrderType','Time','Date','Volume','Rate','Amount']
});

console.log('data', data) -> empty array

`

Can you share the original file?

Please share the actual file and we will reopen the issue


Save last query & timestamp by default

Steps to reproduce

dispatch a find in one page of your app.
Navigate to another that effectively needs the same data.

Expected behavior
We should have a way to tell how old the cache is and what query populated it. That would allow us to say, not run the query again if it was ran less than a minute ago.
Actual behavior
The cache has no origin information, no information about whether the connection dropped since it was populated and no information about the query that populated it. Therefore, we have no guarantees about the data and are thus forced to implement our optimization or fire the potentially non-trivial query again.
Working with feathers-vuex is currently quite wordy... we should look for ways to cut down lines for the typical app.
Proposed Solution
Lets add a property to the vuex state with
last: {
  createdAt:<PHONE_NUMBER>1
  query: 'find'
  params: '{}'
}

I've found myself checking the cache and then fetching if not available a few too many times... it would be nice if feathers-vuex services came with an anyGet and anyFind action, which checks the cache for answers and if nothing is found, pulls from the web. A max age field would be a nice parameter as well.
getAssignment: async function () {
        let assignment = this.lazyAssignmentGet(this.$route.params.id)
        if (typeof assignment === 'undefined') {
          return this.assignmentGet(this.$route.params.id)
        } else {
          return assignment
        }
  },
  created () {
    ; (async () => {
      let assignment = await this.getAssignment()
     })()
  }

@marshallswain I'm using anyGet and anyFind in all my projects. Any get in particular drastically reduces network load and the risk of race conditions from sub components trying to getter/get when an upstream component hasn't finished action/get
they are very small and work incredibly well... would you welcome a pull request for anyGet? I've found the use cases and benefits of anyFind less common.
// VUEX
export const standardCustomization = {
  actions: {
    anyGet: async function ({ commit, dispatch, getters }, args) {
      let entity = getters.get(args)
      if (typeof entity === 'undefined') {
        await dispatch('get', args)
        return getters.get(args)
      } else {
        return entity
      }
    },
    anyFind: async function ({ commit, dispatch, getters }, args) {
      let result = getters.find(args)
      if (result.total === 0) {
        await dispatch('find', args)
        return getters.find(args)
      } else {
        return result
      }
    }
  }
}

@rayfoss A PR would be great!  A new issue might be better if you feel like you might implement the main feature of this issue sometime.

I also like the idea of a maxAge-based cache.  As a baby step towards this, I've added a createdAt timestamp to the pagination data in<EMAIL_ADDRESS>

In the future, I'll look into using can-query-logic to implement smarter cacheing.

fun real world edge case:
Google play music will only get the playlist list once and pull from cache every time you go to the playlist list page. It will reactively add to the list, but if your laptop is asleep, you'll end up with missing playlists even though you've "browsed" back and forth between pages inside Google Play Music.
AllGet would solve this, but it would be expensive for Google. AllGet([id, maxAge]) would fix the problem without hitting the server every time.

@rayfoss the new pagination object for each store now provides enough information to make this possible.  You get all sorts of info, now: https://feathers-vuex.feathers-plus.com/service-module.html#querying-with-find-pagination


PD-Checkbox / PD-Radio

Checkbox and Radio should have a more clear style if they are readonly/disabled. Currently it is not visible if the value is checked/selected. We suggests the following:

Furthermore as discussed yesterday. We often have to align those with other input elements (PD-Input, PD-Combobox, etc) and therefore have to add a margin to pd-checkbox/pd-radio to align with the input element and not with the full pd-input including the label.
Should work for something like this (which it does)

Does not work for inputs with labels:

I implement another property vertical-adjust (css variables also possible -> i.e. --pd-datepicker-vertical-adjust) to adjust the vertical alignment.
With this two options you can adjust mixed inline forms for your case.
The following form elements will be included: radio, checkbox, input, dropdown, datepicker, combobox


Feat execute batch parser router

Session Router Module.
This parser and router can work whenever dApp requires building and validating the atomic userOp signed with a session key.
Same support should be given in the SDK as well along with documentation on how to use SDK to build userOps which feature calls to executeBatch()

introduced a struct to handle padded sig parameters

minor conflicts, you can delete lock files and regenerate


[Godot 4.x] Stack Overflow/Infinite Recursion

This is my node config

When I try to play the scene this happens

Could this be caused by #17 or #18? I haven't yet been able to try the 4.x version myself (I don't usually run master). PRs to fix this are welcome.

Fixed by #20 .


cURL Error 18 : transfer closed with outstanding read data remaining

Hello guys,
i really need help with this error :
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 18: transfer closed with outstanding read data remaining (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:188 Stack trace: #0 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(151): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(104): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(45): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 C:\xampp\htdocs\TRELLO\trello\ in C:\xampp\htdocs\TRELLO\trello\vendor\stevenmaguire\trello-php\src\Http.php on line 273
i already try to change $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; in CurlFactory.php into $conf[CURLOPT_HTTPHEADER][] = 'Expect: 100 - continue'; it fixed this error, but another error continue , the error was like this :
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 56: Received HTTP code 417 from proxy after CONNECT (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:188 Stack trace: #0 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(151): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(104): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 C:\xampp\htdocs\TRELLO\trello\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(45): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 C:\xampp\htdocs\TRELLO\trello\vendo in C:\xampp\htdocs\TRELLO\trello\vendor\stevenmaguire\trello-php\src\Http.php on line 273
how can i fix this error? and what is the cause of this error ?
Thank You so much for your help.. every help from others will be appreciated too.
Best Regards,
-Me

The answer to this issue is similar to what I wrote to you in #1599. Look up error 18 at https://curl.haxx.se/libcurl/c/libcurl-errors.html and it will say:

A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.

I see that you open several issues at Trello's client as well. You do clearly have network problems. Ask a co-worker for help or write a question on Stack overflow.

so basically, i can't fix error 18 if it was network problems?

i know clearly the problem, but can you give me the solution to the problem??

Im sorry, but I do not think I can give you the solution because I do not know your network. However I did give you an advice:

Ask a co-worker for help or write a question on Stack overflow.

GitHub is not a forum for general programming issues. There are plenty of very talented people at Stack overflow that are willing to help you.


GT:Auto-Gatling

Added file for Auto-Gatling

Marking Auto-Gatling

The implementation is good, but there is an annoying effect caused by the Gatling lowering influence. In case a 1 inf dude comes to a deed with Gatling, they take control but that is immediately taken back. Would be ok if it was just once, but from some reason, this happens 10 times spamming the chat log. Will have to take a look at that first.


Exclude prefixes via ConfigMap

Description

Motivation and Context

#1735
How Has This Been Tested?

[x] Covered by existing integration testing
[x] Added integration testing to cover
[ ] Tested locally
[ ] Have not tested

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 not work as expected)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

@alex-yust Could you look at addressing @nickolaev 's comments?


Unclear Metrics

So, here's another not clear thing...
In the dashboard, specifically in the metrics dashboard, right now I only have 1 enrollment, but it shows multiple unique facial id like if there are more than just one added face... actually if I try to delete each one (using the GET method) it fails, except for the last one, which is the real one, once I delete the last record, all the other ones are deleted also...

Aditionally please be more consise and clear with the documentation!.

These are static logs that are recorded for each new enrollment on your FACEIO application. When you delete a Facial ID via call to the DELETEFACIALID API endpoint, the logs are not modified at all, only the index count is decreased for each deletion you perform. You can even disable log collection entirety via the security tab of your Application Manager.
Symisc Systems, SUARL
-----Original Message-----
From: Josue @.>
To: symisc/faceio-npm @.>
Cc: Subscribed @.***>
Sent: Mon, 29 May 2023 6:15
Subject: [symisc/faceio-npm] Unclear Metrics (Issue #6)
So, here's another not clear thing...
In the dashboard, specifically in the metrics dashboard, right now I only have 1 enrollment, but it shows multiple unique facial id like if there are more than just one added face... actually if I try to delete each one (using the GET method) it fails, except for the last one, which is the real one, once I delete the last record, all the other ones are deleted also...

Aditionally please be more consise and clear with the documentation!.
--
Reply to this email directly or view it on GitHub:
https://github.com/symisc/faceio-npm/issues/6
You are receiving this because you are subscribed to this thread.
Message ID: @.***>


[CXF-7925] Dynamic WSDL Client creation fails on JDK 11 because it cannot compile generated classes

Allow to specify the classpath for app server where class loaders are not URL based.

this is under testing for integrating with wildfly


Create pytest.yml

Created a workflow file that runs pytest everytime new code is pushed to the repo

I really like how this GitHub Actions stuff works!


Installing P4J using python3.11

I'm trying to install P4J using python3.11 but got an error (I've attached the file in output from the command python3.11 -m pip install P4J --log piplog.txt). Instead, installation using python3.10 was successful. Could you help me fixing the issue?
piplog.txt

Dear Francesco
The package has been updated to support the latest version of cython. You should be able to install for python 3.11 with no issues now. Please confirm

Hello,
I confirm that I could successfully install the package using python 3.11. Thank you!


Update aws provider to 5.0.0

Thanks the review ! Please also check https://github.com/quortex/QX_Template_Reference/pull/852 for the migration script/doc


Maps removed from maps/

PR #80 removed most of the maps from maps/.
While they should be brought back, perhaps instead I can make a sh script which will simply download them instead, which will make the repo much more lightweight.

Yes! I realized this happened the other day, but haven't had a chance to fix it yet.

Following our conversation, I think it will be better to have a separate repo for that and then only include a bash script in hog2 which will download things selectively. It will also add the ability to download benchmarks from other repos (e.g., Iron Harvest).

I've restored the files for the moment. The plan is to create a benchmark director which is blank except for a script which will download from other repositories. I will leave this open until that is complete.


Move item buttons + Standard DND behaviour

Is it possible to interact with the dnd-kit state in some way to keep animations but move the item in the in the array directly while retaining the default dndkit animations?

I would also be interested in this. I want to display some "move back", "move forward" buttons.


[Feature Request] Resizable areas

Currently you can minimize areas (map, system info, route, signatures, killboard), but you can neither move nor resize them. It would be good, if you could freely move and resize all areas to customize pathfinder to your needs.

Custom panel layouts:

added drag&drop for reordering panels
panel layout is stored on client and can be changed per map.


About save_global_map

Hi @donghao51,
Thanks for your fantastic work! While reading your code, I found pole-based localization for each session is conducted on the saved global map. However, It seems like the global map is generated from poles extracted from all sessions by the function save_global_map. Whether my understanding is right? If so, why the global map is not generated only by historical sessions instead of all sessions for global localization?
Best wishes!

Hello @BIT-MJY , thanks for your interest in our work! For different sessions, most of the paths are overlapped but not all. For example, some trajectory in 2012-01-15 is not covered by 2012-01-08, if we only use session 2012-01-08 for mapping, for the non-covered part in 2012-01-15 there is no pole correspondence in the global map and the error would be large.
In the mapping part, we use all scans in the first session(2012-01-08 in our case). For the following sessions, we only use scans that have a distance (controlled by remapdistance https://github.com/PRBonn/pole-localization/blob/719d14e2c325a6528e71114691fe15733a6f31eb/src/ncltpoles.py#L90) to the path of the previous session.

Got it. Thx!


[BUG] Engines are completely broken

Short Description
Whenever you try to start an engine - ACF crashes with an error
Branch and Version
Git-dev-f8ee62a
Console Error Logs (Optional)
Starfall acfSetActive() crash
starfall] Warning! A net message (ACF_Sounds_AdjustableCreate) is already started! Discarding in favor of the new message! (starfall_error)
  1. SendError - addons/starfall/lua/starfall/transfer.lua:113
   2. Error - addons/starfall/lua/entities/starfall_processor/shared.lua:141
    3. runOnError - addons/starfall/lua/entities/starfall_processor/shared.lua:49
     4. Error - addons/starfall/lua/starfall/instance.lua:774
      5. runScriptHook - addons/starfall/lua/starfall/instance.lua:634
       6. v - addons/starfall/lua/starfall/sflib.lua:744
        7. unknown - lua/includes/modules/hook.lua:96

Hook 'tick' errored with: addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
    [C]: in function 'WriteString'
    addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
    addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function 'TriggerInput'
    starfall/libs_sh/acffunctions.lua:930: in function 'acfSetActive'
    SF:libs/xinput_car_controller_lib.txt:249: in function <SF:libs/xinput_car_controller_lib.txt:247>

Wiremod inputs crash
[ACF - Info] Successfully linked Petrol Tank[ID: 1157] to 1.4L Flat 4 Petrol[ID: 1171].
Wire error (Entity [1171][acf_engine] by Player [1][dobriy]):
addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
	[C]: in function 'WriteString'
	addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
	addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function <addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:124>
	[C]: in function 'xpcall'
	addons/wire/lua/wire/server/wirelib.lua:82: in function 'TriggerInput'
	addons/wire/lua/wire/server/wirelib.lua:662: in function 'Wire_TriggerOutput'
	addons/wire/lua/entities/gmod_wire_button.lua:172: in function 'Switch'
	addons/wire/lua/entities/gmod_wire_button.lua:98: in function <addons/wire/lua/entities/gmod_wire_button.lua:83>

[wire] Warning! A net message (ACF_Sounds_AdjustableCreate) is already started! Discarding in favor of the new message! (wire_clienterror)
  1. ClientError - addons/wire/lua/wire/wireshared.lua:303
   2. TriggerInput - addons/wire/lua/wire/server/wirelib.lua:88
    3. Wire_TriggerOutput - addons/wire/lua/wire/server/wirelib.lua:662
     4. Switch - addons/wire/lua/entities/gmod_wire_button.lua:172
      5. unknown - addons/wire/lua/entities/gmod_wire_button.lua:98

sv: Wire error (Entity [1171][acf_engine] by Player [1][dobriy]):
addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
	[C]: in function 'WriteString'
	addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
	addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function <addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:124>
	[C]: in function 'xpcall'
	addons/wire/lua/wire/server/wirelib.lua:82: in function 'TriggerInput'
	addons/wire/lua/wire/server/wirelib.lua:662: in function 'Wire_TriggerOutput'
	addons/wire/lua/entities/gmod_wire_button.lua:172: in function 'Switch'
	addons/wire/lua/entities/gmod_wire_button.lua:98: in function <addons/wire/lua/entities/gmod_wire_button.lua:83>

How to Reproduce (Optional)

Spawn an engine
1.1) [Optionaly] Link and activate fueltank
Spawn a button. Attach engine's Active wire input to buttons wire output
Press the button
Engine crashes

Screenshots (Optional)
Starfall acfSetActive() crash
acf-starfall-crash.webm
Wiremod inputs crash
acf-wiremod-crash.webm
Additional Information (Optional)
Might be related to the latest attempt to fix engine sounds not playing after you do startup-shutdown sequence once and start engine again.

Should be fixed now, could you give it a look if everything works fine on your end aswell?

Seems like the fix is working. And the issue with engine sounds stop working after 1 startup-shutdown cycle is no longer present. I've tested both in single player and on dedicated server.
2024-04-13_11-54.webm
Minor thing - for some reason on dedicated server ACF misreports Client version

Oops sorry lol, this was because of this typo I made while fixing the other issue

Minor thing - for some reason on dedicated server ACF misreports Client version

Afaik this has been a thing forever. Imo @TwistedTail we should just remove the Client Status section entirely since only the server version actually matters. Might be more productive to replace it with the ability to add tabs for any repositories so that the Missiles, etc. versions can be viewed from the menu as well.


Move lock for concurrency policies into scheduler

Move the lock for coordinating concurrency policies into the scheduler. With the current approach, when there are more than one schedulers, there is a race in scheduling that results in failure to enforce the concurrency accurately.

Thanks for working on this change, LGTM :+1:
On a related note - would it some how be possible for us to write end to end / integration tests which actually try to emulate the race and verify it's not there (probably quite hard to do end to end wise)?
Maybe spawn two scheduler process as part of an integration test?


help setting up with no-ip Dynamic DNS Hostnames

hello i have been trying to get this to work with no-ip Dynamic DNS Hostnamesbut i cant get it to work.
name is breyscrypto.dynns.com and ip it is tied to is <IP_ADDRESS> where do i put this information when i am trying to set it up.
thanks for all your help

breyscrypto.dynns.com will go to <IP_ADDRESS> and <IP_ADDRESS> would go to 192.168.01.xxx.  192.168.01.xxx is where i have the files installed


Android Basics: classes-and-inheritance

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-classes-and-inheritance#7
In which task and step of the codelab can this issue be found?
Classes and inheritance in Kotlin
I am Unable to Find the NEXT Button. Please Help me out.
Describe the problem

Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

@Esh527
The issue that you presented to us is extremely important, and I thank you for bringing it to our attention. Actions will soon be taken to fix it.


MSIX: PowerRename dialog is not on the foreground

When PT is installed using MSIX, the PowerRename dialog doesn't show up on the foreground

this sounds less than ideal.  So if my desktop has 40 windows open, Rename could be hidden under a ton of existing windows versus launching on top?

FWIW, I've seen this bug in my project that uses a similar IExplorerCommand-launching-UI pattern. If anyone comes up with a solution, I'd be interesting in hearing about it. Thanks!

one thing i just noticed, if the context menu happens outside the primary monitor, it actually launches on the foreground, only on the primary monitor when it is executed it doesn't work correclty

@crutkas
we checked @wjk's extension and it does have the same problem. The interesting part is that he uses a different mechanism (COM SurrogateServer) and it's written in C#.
So it's not just a problem with the way we register the extension, or the fact that we use C++, it seems a problem that affects all type of scenarios.

ImageResizer has the same issue on the MSIX build. If the context menu is launched on the primary monitor it appears right behind the the Explorer window and it isn't in focus (title bar is greyed out).

@arjunbalgovind  as ImageResizer is a new addition for 0.16, lets create a new issue and xref the two.  I'll do that.  This is for 0.15 scoped.

Marked as external, since it turned out to be a Windows bug.
Working on a workaround to be used until the Windows bug is fixed.

Fix available in 0.15.0 https://github.com/microsoft/PowerToys/releases


added tests for websocket-client

cleanup and prettify

Coverage increased (+0.16%) when pulling 44db2c28a354449bf219d01c79fc3cc6830368e3 on dsundberg:websocket-client-unittests into 8d5f99640e857517aca90f1e6428c2e49c92a7ec on node-red:master.


Suggestion box and Map are overlapping for small screen

For smaller screen sizes the suggestion box for autocompletion is being overlapped with the map.

@neha-93 and @grace-omotoso made a pr please check it once for potential suggestions


Add System76

We use Rust in many projects at System76.
As for whom to contact, regarding this listing, the contactee may be me (michael@system76.com).

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ashleygwilliams (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.


"add" event unexpectedly fired

I created two sortables: a palette list from which you can clone an element and add it to a main list.
Sortable.create( mainElement, {
    group: 'slides',
    onAdd: handleSlideAdd
})

Sortable.create( paletteElement, {
    group: {
        name: 'slides',
        pull: 'clone'
    },
    sort: false
})

When I drag an element from the palette over the main list and back to the palette, the main list sortable calls the onAdd() function. My handler then processes an item that wasn't dropped in the main list and modifies content in the palette when it should only modify content in the main list.
Nothing should happen in the main list when I drop the palette item back in the palette.

Create example on jsbin.com (draft)

There it is: http://jsbin.com/linavobacu/edit?html,js,output

Fixed, try dev-branch.

Thank you, it works :)

Thanks, had the same problem. works now.


Add jest

There is no other unit testing framework in the list that uses only recursive templates and not a single macro. Furthermore, not many will be using C++14. Please either merge this or close it; leaving it indefinitely open isn't going to help.

Any update on this one?

Looks like the project is not active anymore and has too few stars.

I added it into https://github.com/fffaraz/awesome-cpp/blob/master/minor.md

Sounds good!


New check: STAT tables in static fonts

What needs to be checked?
Static instances need different stuff in their STAT tables to variable fonts. Fontbakery should tell us if a "variable" STAT table has ended up in a static instance.
Detailed description of the problem
Adobe feature syntax allows for the definition of a STAT table. Fonts built with a hand-coded STAT table in feature syntax may be built either as static or variable, but will end up with the same STAT table. This is a problem, because a STAT table which works on variable fonts will not be appropriate for static instances. The examples in the OT spec of non-variable fonts with a STAT table show that the table entries must be restricted to those entries which refer to the static font's position in the designspace. i.e. a Regular weight static should only have the following entry for the weight axis:
        <AxisIndex value="0"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="265"/>  <!-- Regular -->
        <Value value="400.0"/>

However, if the STAT table intended for a variable font is compiled into a static, it will have many entries for this axis. In this case, Windows will read the first entry only, causing all instances to report themselves as "Thin Condensed".
Optional fix
Just drop the STAT table from the static.
Resources and exact process needed to replicate
https://github.com/notofonts/latin-greek-cyrillic/issues/429
Expected Profile

[x] Universal (broadly accepted best practices on the type design community)

This'll mess you up on Windows if you get it wrong.
Expected Result
Fontbakery should:

WARN if a non-variable font has a STAT table at all, since they're a pretty rare thing and you're almost certainly better off without them (just rely on WWS/style linking).
FAIL if a non-variable font has more than one AxisValue per axis.

Severity assessment
4

I'm starting to work on this one now.

The new check was implemented at PR #4151 not including the suggested WARN on the mere presence of a STAT table on static fonts because @Lorp suggested in a conversation that having the STAT table would actually be desirable. Also @twardoch presented some ideas about this topic on a private conversation.
I am closing this issue, and encourage others to open a separate one in case further changes (like the proprosed WARN) are still needed.


wakeword: activeMin does not seem to work on android. Timeout still occurs after ~4-5 seconds regardless of what it is set to

Describe the bug
Title says it all. Setting activeMin in the wakeword config does not increase the timeout duration past 4-5 seconds.
Your environment

Version of react-native-spokestack: 6.1.4
Version of react-native: 0.63.4
Device and OS version: moto g7, Android version 10

Expected behavior
Going off of the activeMin API description, "The minimum length of an activation, in milliseconds, used to ignore a VAD deactivation after the wakeword." I expect that setting this to 10000 would keep Spokestack activated for at least 10 seconds after wakeword activation before deactivating.
Actual behavior
Spokestack deactivates after 4-5 seconds, regardless of what activeMin is set to.
Steps to reproduce
await Spokestack.initialize(
', // account id
'', // api token
{
refreshModels: true,
pipeline: {
profile: Spokestack.PipelineProfile.TFLITE_WAKEWORD_NATIVE_ASR
},
wakeword: {
activeMin: 10000,
filter: require('../../../../assets/tflites/filter.tflite'),
detect: require('../../../../assets/tflites/detect.tflite'),
encode: require('../../../../assets/tflites/encode.tflite'),
},
}
);
await Spokestack.start();
This is placed in a useEffect and initializes spokestack properly, everything seems to work fine except for the aforementioned issue.
I have not tested on iOS.

Thanks for opening an issue. Perhaps we could word this differently, but activeMin and activeMax are meant to be used together. I think what you want is to increase activeMax. Have you already tried that?

We discussed this and noticed you're using the native ASR. We should document this more thoroughly, but the best we can do with the native ASR is provide a hint on how long to stay open. Unfortunately, the native asr (android) does not guarantee it will be honored. You should be able to switch to Spokestack ASR. If that still doesn't work, then we can reopen this issue.


Whitelist facets exposed on search pages

For: https://www.pivotaltracker.com/story/show/97724776
To give us control over what search facets are accessible on the frontend vs backend we define a list of facets in the locale file under petitions.facets.public and petitions.facets.admin.  The public frontend only shows these facets in the filter list so a user shouldn't be invited to click on a facet that isn't public.  We also make the public backend reject any facet that is not in the public list so they can't just hack the url to see, for example, a list of hidden petitions.
The admin isn't so constrained as it's not a problem if an admin can see a petition via a non-public scope.  However, so we don't baffle them with too many options we use the locale list to populate the filter dropdown on the all petitions page.

Obvs, props to @pixeltrix as this was his idea, I'm just the crude workman who implemented it.

Feels a bit strange to use a localisation file to configure the application... But OK :) Implementation looks good. :+1:

Looks good :shipit: once :green_apple: (so I can merge it into my branch :) )

Needs a rebase :/

Rebased and addressed @pixeltrix's comments.  Merge plz.

Wasn't fast enough with the merge, rebase needed

2nd time (today)'s the charm?


Task complete event?

Is there any event I can subscribe to know when my task is completed?
For example, I have 1000 URLs queued with maxConcurrency : 3, which will capture screenshot and save to /screenshot directory. Then I want to run some analysis parallelly to update the DB as soon a task is completed.
If I add my analysis method on task function, it will keep the page open unnecessary.
So having a event similar to taskerror will help
cluster.on("taskcomplete", (data) => {
    console.log(`Task completed and the page has been closed ${data}`);

   // Page has been freed up for next queued task

   // Run my analysis function here

   //  Update database will goes here

});

As a workaround for this, you can use the puppeteer event page.on('close' or similar.


Hyperlinks are not rendered at all when inside an Area

I have created an area.
When the a-tags are defined within my Area "Application" then those a-tags are not rendered with an href=""
Maybe the root cause could be that Razor intellisense is also not working? Thats just a side note.

I use VS 2015, .NET 4.6.1, asp.net 5.0 Beta 8.
Thats a sample repro:
https://www.sendspace.com/file/e81spx
Repro steps:

Click the hyperlink in the main navbar "Evaluate Application"
The Areas _Layout is loaded
Investigate the Schoolyears hyperlink.
See that the a-tag is not rendered just literally displayed.

If all this is a user bug ;-) please let  me know that I can proceed :-)

Any chance you can upload the app to a GitHub repo? A lot easier to browse :smile:
A common cause is that the area/controller/action combination doesn't exist in the app (URLs to non-existent places are not rendered - but we're soon changing that behavior to allow it).

Have fun: https://github.com/bastienJS/AreaHyperlinkIssue

A total head-scratcher, but I figured it out :smile:
The issue is that the default tag helpers are all registered in ~/Views/_ViewImports.cshtml, and that file isn't in a parent folder of the area views.
You can either:

Move the _ViewImports.cshtml file to the root of the app
Copy the file into ~/Areas/ or ~/Areas/Application/Views

These files are found by walking up the folder hierarchy from wherever the view is located, so if there's no imports file, you get no tag helpers.

Cool ;-) Thanks a bunch! Would it not be a good  idea to throw an exception at runtime that razor can not file such file? Else its stumbling in the dark? ;-)

It's fine to not have those files, so there can't really be any error for it.

OK. If you allow a side question also regarding my sample .sln. When you loaded the solution did you have intellisense for the razor directive?

I didn't reuse your solution - I just created a new solution to try it out.
But once I added the missing _ViewImports.cshtml file, and then re-opened the view page, I got purple tag helpers in there.

Can I post a razor intellisense bug also here on the forum or do I have to post it on visual studio forum? because in my .sln razor does not work.

For Razor Intellisense post here: https://github.com/aspnet/Tooling/issues/


Target latest lts .net core

I'd like to have a NuGet package targetting .net core 3.1
Let's discuss how we can achieve it.
We can do something similar to what peeps in https://github.com/justeat/JustEat.StatsD/blob/master/src/JustEat.StatsD/JustEat.StatsD.csproj did
E.g. target multiple frameworks + msbuild voodoo for determining depending asp.net core nugets versions
Also, it is unclear how current artifacts are being published. Is it possible to move build pipeline to something like TravisCI or similar?

The pipeline will be moved to GitHub actions soon.
As for compatibility, we have to stick to .NET Standard in my opinion.
What features do you need from the latest .net core that aren't in .net standard?

Yeah, for some reason I thought nuget was targeting netcoreapp2.2, netstandard20 is everything that is needed atm.
I was woried about referenced nuget packages version ( e.g. Microsoft.Extensions.* ) all targeted 2.2.0. But then I found this amazing article.
TLDR:
When used in an ASP.NET Core 2.x app, the 2.x.x libraries will be used, just as before. However, when you reference your library in an ASP.NET Core 3.0, the 2.x dependencies of your library will be automatically upgraded to the 3.0.0 versions due to the NuGet package resolution rules.

There might be a point when we would want a .net core 3.1 specific features though, then multi-targeting would work fine. No need in it atm


sim/posix/sim_linuxspi.c: fix select not work and incorrect behaviour

Summary
Fixed missing SPI_SELECT method and incorrect sending behavior in sim_linuxspi
Impact
N/A
Testing
N/A

Please squash to a single commit

Please squash to a single commit

done

Please fix the build


Climate 647- Update dataset_processor.temporal_subset

Now users can extract seasonally averaged data between month_start and month_end using dataset_processor.temporal_subset module. By default, seasonal average is not calculated (average_each_year=False).

Merged build triggered. Test Failed.

Merged build started. Test Failed.

Merged build finished. Test Passed.

Thanks @huikyole, I'll take a look!

Need to update the title to be in line with the wiki so it mirrors to JIRA correct. Please use CLIMATE- so it mirrors properly. If the ticket number isn't present in that format then it won't work properly.


Add move_toward_smooth helper

I didn't test if the documentation in the XML files were rendered correctly because I couldn't find a way to preview it locally; I'd be happy to check it if someone can provide the information Edit: looked it up from within the GUI instead of looking for a local HTML export
I'm not sure if I need to document something in the Changelog apparently this is done separately
With regards to the API, it might make sense to use a time constant (equal to 1/rate) instead of rate, but I feel like it can be more confusing when there is already delta in the parameters which also a "time unit"

Bugsquad edit, closes: https://github.com/godotengine/godot-proposals/issues/9803

Please open a proposal to track the support and details of this feature

Looks good generally, save for the documentation details and the addition of a dedicated method to the engine, especially to handle the single/double precision behavior

Sorry, what do you mean by "save for"; is it a typo for "[it is] safe for"?

I mean "except for", an English phrase

Would be appreciated if you also added tests for expm1 but that's not necessary and can be added later

Sure, added

Also, forgot, we might want to add this to the C# glue as well, what do you think @godotengine/dotnet

This will be handy in many demo projects as I keep forgetting how to do smooth lerping in a FPS-independent manner.

Also, forgot, we might want to add this to the C# glue as well, what do you think @godotengine/dotnet? Can be done in a follow-up unless they think it's relevant to add it there too

I don't mind doing the change but testing it is going to be challenging for me

On an unrelated note, I've been thinking more about the API. Instead of move_toward_smooth(from, to, delta, rate), we could leave the rate handling to the user who would call it like this: move_toward_smooth(from, to, delta * RATE)
Benefits:

consistent with move_toward() where the user is expected to scale the delta value themselves: it makes move_toward_smooth() a drop-in replacement of move_toward()
allow the user to do delta / TIME_CONSTANT or delta * RATE depending on their taste

Drawback:

loss of information: the documentation is going to be much more vague about how to use the function

Thoughts?

This is definitely a good to have core feature.
Would it make sense to add SLERP versions?

move_toward(from, to, delta, rate)

please not that, worst of all options
Opinion: Delta at the end feels more natural as the other 3 args are user defined whereas delta is unknown: move_toward_smooth(from, to, rate, delta)

Since there was no answer I made my pick and pushed a new version.
Changes from last time:

Split out the expm1 changes into a dedicated commit since it's a bit off-topic and helps reviewing the main commit
Decided on move_toward_smooth(from, to, delta); users are expected to multiply delta themselves to bend the curve; I can revert back or change the prototype to whatever decision is made
Added C# support, but this is done blindly (compilation included) because I was unable to test it

Hey I noticed this only implements vec2 and vec3. Can this math be used for rotations too? float angle, basis, quaternion?

Pardon my ignorance, but can we not just have a single function e.g.: :thinking:
float Math::exp_smooth_delta(float p_delta)
{
return -Math::expm1(-p_delta)
}

Then reuse all the existing functions e.g.:
Vector2 a, b;
Vector2 res = a.move_toward(b, exp_smooth_delta(delta));

I do accept it is kind of nice to have this shorthanded, but it also seems to create a whole load of variations of existing functions for a particular case.

Hey I noticed this only implements vec2 and vec3. Can this math be used for rotations too? float angle, basis, quaternion?

Case in point - where does this end?

Case in point - where does this end?

how many slerp/lerp functions exist?

I've changed the Voxel demo to make use of move_toward_smooth() for FPS-independent smoothing. The project below uses 120 physics ticks per second; if you change it to 30 in the project settings, notice how player movement acceleration becomes much slower (while it should remain just as fast). Try creating a flat world in the project so you can test this more easily.

I haven't checked the test project in detail, but just to point out, this code is purely math, it doesn't touch physics, and should therefore not be tested with a project that uses physics, because that would be conflating two different things. The only relevant factor is physics tick rate.
A suitable test would therefore be something like moving a box across the screen at different tick rates.
This is basic to the scientific method - remove any extraneous variables.
https://www.scribbr.co.uk/research-methods/extraneous-variable/

I've changed the Voxel demo to make use of move_toward_smooth() for FPS-independent smoothing. The project below uses 120 physics ticks per second; if you change it to 30 in the project settings, notice how player movement acceleration becomes much slower (while it should remain just as fast). Try creating a flat world in the project so you can test this more easily.

The code is:
	velocity.x = move_toward_smooth(velocity.x, 0.0, MOVEMENT_FRICTION_GROUND if is_on_floor() else MOVEMENT_FRICTION_AIR)
	velocity.z = move_toward_smooth(velocity.z, 0.0, MOVEMENT_FRICTION_GROUND if is_on_floor() else MOVEMENT_FRICTION_AIR)

You need to use delta otherwise it cannot work

You need to use delta otherwise it cannot work

Right, I had assumed it was automatic for some reason.

Great work, this is both simple to use and immensely useful! This implementation is far more elegant than Unity's Mathf.SmoothDamp.
Just a couple of notes:

It's probably better to document the function's behavior when negative delta values are passed (quickly moves towards infinity).
You may also want to document the fact that, given the nature of the exponential function, it may take much longer to reach the target value than the user might expect. In particular, I feel like it should be warned that this can cause strange behavior if some piece of code is setup to only run before/after reaching the target value (especially code that was previously using the regular move_toward) - though callers can work around this by testing is_equal_approx(from, to).

Shouldn't this remain an undefined or unspecified behavior? Delta is not really supposed to be something else than the delta parameters of the process and physics_process functions.

Agreed, and personally I can't think of any good use for a negative value. Though the documentation for the original move_toward mentions that possibility:

Use a negative delta value to move away.

The difference should be immediately obvious though (using the "smooth" version will move away much faster), so I don't think it's really necessary to document this aspect. The other point was much more important, thanks for adding the note.
And yeah, I agree that documenting 7 variants of what is essentially a single function is kind of a burden, but there's no way around that as far as I'm aware of. Speaking of this, once these changes are merged, the example in the tutorial about interpolation (section "Smoothing motion") should eventually be changed,
from
$Sprite2D.position = $Sprite2D.position.lerp(mouse_pos, delta * FOLLOW_SPEED)
to
$Sprite2D.position = $Sprite2D.position.move_toward_smooth(mouse_pos, delta * FOLLOW_SPEED)

Shouldn't this remain an undefined or unspecified behavior? Delta is not really supposed to be something else than the delta parameters of the process and physics_process functions.

You can't really tell the user what to do with this function, I suppose.
Note that move_toward works just fine backwards. But regardless of what it is decided to do with negative value, you should document what happens with them.

And yeah, I agree that documenting 7 variants of what is essentially a single function is kind of a burden, but there's no way around that as far as I'm aware of.

Yyyyyeah. We can't easily maintain all of them in quality, but at least all of them should mention accurate information.

Shouldn't this remain an undefined or unspecified behavior? Delta is not really supposed to be something else than the delta parameters of the process and physics_process functions.

You can't really tell the user what to do with this function, I suppose. Note that move_toward works just fine backwards. But regardless of what it is decided to do with negative value, you should document what happens with them.

In that case, is it OK to document it as undefined behavior? Right now the negative delta doesn't seem useful or meaningful and we may find a more relevant behavior in the future. Documenting a behavior with a negative value implies that it's a legit case (here, as far as I know, it's not).
Also, this PR is opened since 7 months for something fairly small: what really is blocking here?

In that case, is it OK to document it as undefined behavior?

Yeah.

Also, this PR is opened since 7 months for something fairly small: what really is blocking here?

Core review approval. It's new, exposed API and regardless of size it's likely worth evaluating whether this function is worth having in core.

Also, this PR is opened since 7 months for something fairly small: what really is blocking here?

not implemented for all the things that lerp is implemented for (vec4, quaternion, basis, color and float angle). since this is meant to be a framerate-independent version of lerp it should either cover everything that lerp covers or only do the basic float version. otherwise the API is arbitrary and inconsistent imo

Also, this PR is opened since 7 months for something fairly small: what really is blocking here?

not implemented for all the things that lerp is implemented for (vec4, quaternion, basis, color and float angle). since this is meant to be a framerate-independent version of lerp it should either cover everything that lerp covers or only do the basic float version. otherwise the API is arbitrary and inconsistent imo

It's not really meant to be a replacement for lerp. IMO lerp should remain a generic interpolation method with a floating-point "weight" parameter in the [0.0, 1.0] range, and it's up to the user to decide where this "weight" comes from. As far as I can see, in Godot, this has always been the intended use.
This function, move_toward_smooth, is meant to be an alternative to move_toward, and the latter is currently only implemented for floats, Vector2 and Vector3 in Godot.
In Unity, this also seems to be the general philosophy. MoveTowards is only implemented for floats, Vector2, Vector3, Vector4 and angles in degrees (to make sure they wrap correctly around 360). SmoothDamp (which is the move_toward_smooth equivalent) is implemented for the same types, except Vector4. Lerp is implemented for a myriad of other types, including quaternions, colors, etc. And that's probably the way it should be, because the interpolation method varies with the type of data to be interpolated, but the 'weight' parameter does not - it's always just a float in the [0.0, 1.0] range, conforming to the user's expectations. That parameter can be supplied by move_toward_smooth if so desired. Vector2 and Vector3 variants can be implemented for convenience, specially because the original method already implements them.

@danijmn Thank you, I indeed aligned move_toward_smooth on move_toward, so I implemented it only where the latter was.

Vector2 and Vector3 variants can be implemented for convenience, specially because the original method already implements them.

I don't know if I misunderstood something here, but I implemented it for vec2 and vec3, in C# as well

I don't know if I misunderstood something here, but I implemented it for vec2 and vec3, in C# as well

Sorry, bad choice of words! I amended the comment.

In Unity, this also seems to be the general philosophy. MoveTowards is only implemented for floats, Vector2, Vector3, Vector4 and angles in degrees (to make sure they wrap correctly around 360)

If we go purely by the existing API methods shouldn't this PR also include rotate_toward_smooth since there's rotate_toward in godot?
On a sidenote to me as a user it doesn't really make sense that there's rotate_toward for 2d rotations but not for 3d rotations, I wouldn't necessarily presume that it's some kind of a design philosophy, it might as well be an oversight. Is it possible that unity and godot are missing methods that would make sense to have to better meets user expectations? Just wanted to bring this to the discussion to make sure we're being intentional and not just blindly copying what has been

If we go purely by the existing API methods shouldn't this PR also include rotate_toward_smooth since there's rotate_toward in godot?
On a sidenote to me as a user it doesn't really make sense that there's rotate_toward for 2d rotations but not for 3d rotations, I wouldn't necessarily presume that it's some kind of a design philosophy, it might as well be an oversight. Is it possible that unity and godot are missing methods that would make sense to have to better meet user expectations? Just wanted to bring this to the discussion to make sure we're being intentional and not just blindly copying what has been

You're right, if we go down the route of matching the existing API, we should also cover rotate_toward.
The implementation is trivial:
static _ALWAYS_INLINE_ double rotate_toward_smooth(double p_from, double p_to, double p_delta) {
	return Math::lerp_angle(p_from, p_to, -Math::expm1(-p_delta));
}
static _ALWAYS_INLINE_ float rotate_toward_smooth(float p_from, float p_to, float p_delta) {
	return Math::lerp_angle(p_from, p_to, -Math::expm1(-p_delta));
}

Some tests:
TEST_CASE_TEMPLATE("[Math] rotate_toward_smooth", T, float, double) {
	// Low delta -> takes a step toward "to", taking into account the shortest angle difference
	CHECK(Math::rotate_toward_smooth((T)0.0, (T)0.75 * (T)Math_PI, (T)0.1) == doctest::Approx((T)0.07137 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)0.75 * (T)Math_PI, (T)0.3 * (T)Math_PI, (T)0.5) == doctest::Approx((T)0.57294 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)0.25 * (T)Math_PI, (T)Math_PI, (T)0.3) == doctest::Approx((T)0.44439 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)-1.25 * (T)Math_PI, (T)1.0) == doctest::Approx((T)-0.97409 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)0.75 * (T)Math_PI, (T)4.1) == doctest::Approx((T)-1.23757 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)Math_PI, (T)3.3) == doctest::Approx((T)-0.98156 * (T)Math_PI));

	// High delta -> immediately converges on "to" without overshooting
	CHECK(Math::rotate_toward_smooth((T)0.0, (T)0.75 * (T)Math_PI, (T)1000.0) == doctest::Approx((T)0.75 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)0.75 * (T)Math_PI, (T)0.3 * (T)Math_PI, (T)1000.0) == doctest::Approx((T)0.3 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)0.25 * (T)Math_PI, (T)Math_PI, (T)1000.0) == doctest::Approx((T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)-1.25 * (T)Math_PI, (T)1000.0) == doctest::Approx((T)-1.25 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)0.75 * (T)Math_PI, (T)1000.0) == doctest::Approx((T)-1.25 * (T)Math_PI));
	CHECK(Math::rotate_toward_smooth((T)-0.5 * (T)Math_PI, (T)Math_PI, (T)1000.0) == doctest::Approx((T)-Math_PI));
}

Adding variants for all other kinds of lerp functions might bring some convenience to the user, but bear in mind that this way of smoothing transitions is not necessarily the best one. It doesn't support setting up different types of easing/transitions like Tween does, so it's not very versatile. It is much more convenient though, as it doesn't require saving any extra state.
IMO adding variants for every type covered by lerp is overkill. Besides, we already have a lot smoothing functions, such as cubic_interpolate_*, ease, smoothstep, Tween.interpolate_value, etc. I like the suggestion of a single exp_smooth_delta function which can be plugged into lerp, or even just exposing expm1, provided that adequate examples are given. But I would still keep move_toward_smooth at the very least. Many users are likely to stumble upon that when looking for the regular move_toward, and in many cases it will be quite an improvement.


[REQUEST] Selenium and Pupperteer Press and Hold Action

there are some work i need to press and hold for example to solve walmart captcha... normally i use python with command line:
element = driver.find_element_by_css_selector('#px-captcha')
# print(len(element.text), '- Value found by method text')
action = ActionChains(driver)
click = ActionChains(driver)
action.click_and_hold(element)
action.perform()
time.sleep(random.uniform(10.1,12.1))
action.release(element)
action.perform()
time.sleep(random.uniform(0.2,0.5))
action.release(element)

Please review and add it. I'm very happy when it's finished and will give you a cup of coffee. thank you very much.

Are you the admin of walmart?


add basicauth {user} to replacer

1. What does this change do, exactly?
Following on from #1937 and #1931 this change adds {user} value in basicauth to be used by replacer
2. Please link to the relevant issues.

#1937
#1931
#1953

3. Which documentation changes (if any) need to be made because of this PR?
I don't think it requires any but I can add if necessary.
4. Checklist

[ ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[x] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I am willing to help maintain this change if there are issues with it later

Tested on Windows 7 x64 and LGTM.


Add Option#getE and Option.allObject

Adds two methods:

Function allObject, which transforms an object (map) of Options to an Option of object type
Instance method getE, which returns interior value or throws

Hello,
Since library size is a very important thing on the frontend side of things (and we're using prototypes at this time, which is hard/impossible to treeshake) it would be best if we could discuss new method additions before actually submitting the PR.

The allObject method sounds like it could be useful once in a while but we already have Option.all, which I feel is sufficient and very standard in the functional world (sequence/traverse).

I'm not in favor of throwing exceptions in lib code. You can easily do that in application code (assertNotUndefined) if you want to.


Implement New Action Link Formatting Element for Portal

User Story - Business Need
Clients have asked for a way to emphasize call to action links in email content, like a button. VA design standards does not support a button, but UX has found a promising design element called an action link which they'd like to add to the portal template formatting options.

[x] Ticket is understood, and QA has been contacted (if the ticket has a QA label). Note that Jake on the Nova team also needs to be looped into this work.

User Story(ies)
As a VA Notify-onboarded business line,
I want to call attention to the primary link in the email
So that the Veteran is more likely to click on the link.
Additional Info and Resources

Image files for action links are here.  These would go in the same va.gov platform s3 bucket as the VA logo.

https://us-gov-west-1.console.amazonaws-us-gov.com/s3/object/notifications-va-gov-assets?region=us-gov-west-1&prefix=va-logo.png

Email formatting is controlled by jinja in the utils repo:

https://github.com/department-of-veterans-affairs/notification-utils/blob/master/notifications_utils/field.py#L58

https://github.com/department-of-veterans-affairs/notification-utils/blob/master/notifications_utils/formatters.py

The formatting element for this is:  >>[webpage](url)

Portal formatting key:

Notify Email Markdown Formatting Guide

Action link is https://<env>-va-gov-assets.s3-us-gov-west-1.amazonaws.com/img/vanotify-action-link.png
Engineering Checklist

[ ] Add action link parsing to the mistune inline grammar.
[ ] Add action link parsing to the mistune blockquote grammar.
[ ] Add action link formatting to the NotifyEmailMarkdownRenderer

Acceptance Criteria

When a VA Notify Portal user adds an action link element into an email template, the email should display the action link icon and the hyperlink specified.

This should apply to when the action link is viewed in both a) email preview mode and b) once the email has been sent.
This should apply to both a) when the action link is by itself, and b) when the action link is in card format.

 If the action link is in card format, then it should also utilize the card formatting.

The action link icon and hyperlink should be clickable.

If the action link is in card format, then it should also utilize the card formatting.
 Hyperlinks can include personalizations per existing formatting.

Completed work meets the requirements below or alternatives have been reviewed and approved by Product and UX:

UX wants a flexible element that can be used independently on a new line or combined with the existing card element.

If combined with the card element, it would still be the only thing on that line, but would use the styling of the card also.

The action link itself is the combination of the icon followed by a hyperlink.
There can only be 1 hyperlink per action link. This element will not support static text alone or in combination with the hyperlink.
UX would like the entire element (image and hyperlink text) to be clickable, but it's not a deal breaker if only the hyperlink is clickable.
There will only be 1 action link per template

QA Considerations
Once the formatting changes have been made and deployed to Perf, you should be able to update your template to include an action link and check template preview (which uses our API to render). You can then send yourself an email to check the content.
Potential Dependencies
Leave blank if n/a

We don't own the public s3 bucket - va.gov does, so we'll need to get them to add it or figure out how to make our own publicly accessible bucket

Out of Scope
There’s an existing bug with template preview for personalizations in URLs. I’m not asking to fix this as part of this ticket unless as you’re in there it’s easier than expected. Reach out if that’s the case to double check. https://app.zenhub.com/workspaces/va-notify-620d21369d810a00146ed9c8/issues/gh/department-of-veterans-affairs/notification-utils/127

This is proving to be trickier than I expected especially after reading the spike documentation. I've tried a few different ways of creating the action link, but haven't had any success so far. I will try working with Michael in the morning to see if we can put our heads together on this.

I worked with Michael briefly this morning, but Mistune continues to be a nightmare. The custom lexer I added appears to be working when the notify_email_markdown object is called directly, but doesn't work when called from somewhere else, like get_html_email_body. There seems to be something I'm missing here, so I'm still trying to understand what that is.
I added a unit test that passes when calling notify_email_markdown. I thought that would be sufficient, but it seems I'll need to add some tests to ensure everything is working together as expected.

Met with Kyle and there weren't any obvious solutions jumping out at us. Kyle is going to take a look on his own sometime today, and I'll continue to work on it as well. Maybe the Mistunes code has some hints?

After looking into it a bit more Kyle managed to help me get un-stuck from the problem I was facing. Now I need to do some testing and confirm the expectation with someone from the Strike team.

With how we implemented the lexer I'm currently hitting a problem with it not properly recognizing newlines within text. This is causing test_paragraphs to fail when using the notify_email_markdown function, which uses the updated code. There's another way I can have it work, but it's more "hacky" than I'd like.

So it looks like ignoring mistune was the way to go. It might need some styling changes, but I was able to update add a template with action links! The image showed up in the previews of the email template and they showed up in the email when I sent one to myself.

Coordinated with Ian and Elissa to make sure the action link is looking how it's supposed to. There's a little more work to do based on their feedback, but I'm hoping to have the PR up Friday.

Well the changes and thorough unit testing took a little longer than I expected, so the PR is not up yet. Everything seems to be working from what I can tell from the unit tests. I'll deploy and test Monday morning. As long as everything looks good during that testing the PR will be open for review.

Found a bug when testing this morning, so I had to clear that up, which deplayed opening the PR. This is carrying over to the new sprint to make sure we have time to QA it before closing it out.
The ticket took a long time in general because it had to be reworked a couple of times to find a solution that would work consistently and not break any existing functionality. The older version of Mistune that we use also does not have very robust documentation, so a lot of work went into going through that packages code to figure out how things work.

QA PASSED
PRs (utils and api) approved and merged; deployed to Perf in Pipieline.
Promoted the template that Evan created in Dev to Perf.
Template preview route in Perf:

POST 201 response showing the content with the body:

Received email:

YouTube review indicates that the link works. Sadly, I had to click the link to test it. And now I have been rickrolled.


Update LOCALIZATION_CONTRIBUTORS

Summary
Details and comments

Thank you for your interest in contributing to Qiskit translations. Please go ahead and follow steps 4 and 5 in the Contributing to Qiskit documentation.

Can you please move this PR here: https://github.com/Qiskit/qiskit-translations


Python match/case syntax highlight is not supporting

Hello! First of all, thank you for this pretty theme, love using it.
I have faced with problem that match/case syntax, which was added in Python 3.10, not supporting by theme. If you switch to default theme, everything is OK, so I suppose that the problem is not in IntelliSense, but in tokenization something inside the gruvbox theme.

@ruthus18 would you be able to provide a full snippet to be used for investigating this?


Will the pretraining-data Common Crawl Screenshot 400K and the 140 million REC and REG question-answer pairs be released?

@zRzRzRzRzRzRzR  hope these be released， thx

maybe not plan,sorry for that

同问。都命名了，是打算放出来的吧？


Standard logging module

Using the python logging module we can format the logs as we want: logging module doc
I attached an example
oceanpatterns.log
Let me know if that could work with the requirements of the logs

This looks actually useful for the "exec_info" section

Using the python logging module we can format the logs as we want: logging module doc
I attached an example
oceanpatterns.log
Let me know if that could work with the requirements of the logs

This log is well structured, but if you provide this at the web interface it's hard to understand if there's an error and the type of error.
To understand better the reason of json log file:
If the method in dataminer crashes for any reason, the output files will not be produced, so the wps protocol will fail and the only file returned will be the dataminer log which can be very long and hard to read.
To provide a feedback to the web app also in case of a method error, I choose to group the code in some try-catch blocks, in this way each portion of code has a specific error code.
If you do this, when there's an error in the code, you are able to handle the error simply providing some empty file to wps protocol to respect the output interface, then you can add the error code in the json file to notify the web app that an error has occurred and also the type of error plus a small attached message.
If the log in a json file, the web app can immediately read the error code to understand if there were errors or if the method was executed correctly.
Maybe as @mdrudi suggested, we can put that python log into exec_info section

Ok, this is clearer to me now. So I will use the JSON format of the logs at least for error handling and see how I can reuse the rest in the "exec_info" section.

Yes it sounds good. The standard logging module looks very useful to manage the content of the current "exec_info" inside the JSON. For what concerns the other information into the JSON, hopefully in the near future we should do a review of this content, also because of the catalogue, but now it is too early for this kind of activity.


rPackage.seewave can't find libsndfile

Issue description
Steps to reproduce
Add in nix-shell rPackages.seewave and nix-shell it
Technical details
stft.c:3:61: fatal error: sndfile.h not found

System: 16.09.940.8a5c376
Nix version: nix-env (Nix) 1.11.4
Nixpkgs version: 16.09.940.8a5c376

likely seewave needs libsndfile.out instead of libsndfile which points to libsndfile.bin

@frerich I fixed this bug some time ago. Could you close it? Thanks in advance!


Fix example/models/models_loading_gltf.c controls

Hello,
The "UP/DOWN arrow keys to switch animation" binds on models_loading_gltf.c conflict (overlap) with the camera controls.
This pull request rebinds them to "LEFT/RIGHT mouse buttons to switch animation".
Best regards.

@asdqwe thanks for the review!


The number of frontal and lateral chest radiographs

Hi authors,
Paper MIMIC-CXR-JPG, A LARGE PUBLICLY AVAILABLE DATABASE OF LABELED CHEST RADIOGRAPHS listed  the number of frontal and lateral chest radiographs in the three datasets. However in the file mimic-cxr-2.0.0-metadata.csv, there were 15769 null values (missing) in column ViewPosition. So were there any non-manual methods to determine which view for these samples?
Many thanks!

There are sometimes other DICOM fields which will give an idea of what the view position is. Have you tried ViewCodeSequence 0x00540220?

Thank you! Actually in the file mimic-cxr-2.0.0-metadata.csv, when there was null value (missing) in column ViewPosition，the value in column ViewCodeSequence was still null.

Hmm, thinking back that makes sense. I did a lot of harmonizing of distinct DICOM fields to get the missing data down to ~15769 / 370,000, so I've probably already scoured similar fields and imputed view code with them. The last alternative would be to use the procedure code, and if it only mentions PA/AP, then it's a frontal x-ray. Beyond that, training a model to classify the image is the best bet. Probably not too crazy to do! I also noted sometimes the view position is wrong (but it's very rare, like 0.1% or so) - so the classifier could be used to correct those as well.

I see, thank you for the reply.


Generic parameters inference in interface

TypeScript Version:  3.4.0-dev.20190226

Search Terms:
Generic parameters inference
Code
interface IFoo {
    id: string;
}

interface ITest<T extends IFoo | IFoo[]> {
    data: T;
};

interface ITest2<T extends IFoo | IFoo[]= IFoo> {
    data: T;
}

const test1: ITest = { // Generic type 'ITest<T>' requires 1 type argument(s). ts(2314)
    data: [{
        id: ''
    }]
}

const test2: ITest2 = {
    data: [{ // Property 'id' is missing in type '{ id: string; }[]' but required in type 'IFoo'. ts(2741)
        id: 'fds'
    }]
}

Expected behavior:
I expect the interface ITest to understand that data is typeof Array<IFoo> like for generic method inference.
If I precise a default value for generic parameter (ITest2), I can understand that in my test2 implementation, it will take IFoo as a default implementation, even if I found the error explanation a little bit weird to understand.
Actual behavior:
As describe in the code section, I get some errors because I must provide the expected type.
The thing is, sometime, in some third party library definition, they don't export some type, so I cannot easily pick the expected variant of the generic type I want to have.
A  way to fix it, is to recreate a type by mimicking the structure of the original type, but I increase the number of source of truth, so as soon as the third party update the definition, it breaks my duplicated type.
Playground Link:
Playground link
Related Issues:
Well... I found lot of issues but related with generic method (that works like a charm today), not really just for interface...

Working on this area at #26242

Oh! true, I miss this one!
Great news! I'm looking forward this issue.

Still would really love to see this for defining plain objects that map to a generic type! Would be really helpful for creating inputs that a framework expects without having to use extra factory functions everywhere.