feat(metaprogramming): Add #[use_callers_scope]

Description
Problem*
We have many methods now such as Quoted::as_type or Quoted::as_trait_constraint which resolve items in the current scope. It is useful to change the scope these are resolved in but somewhat impractical to do what we did with Expression::resolve and have them all take module parameters.
Summary*
I've added #[use_callers_scope] which can be added to a comptime function to change the scope any builtins resolve in to that of the caller. This also works in helper functions and closures.
Additional Context
Documentation*
Check one:

[ ] No documentation needed.
[x] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.

but somewhat impractical to do what we did with Expression::resolve and have them all take module parameters

Why, is it because of verbosity?
I wonder how this will interact with other functions. For example we have FunctionDefinition::set_parameters. In that method we evaluate the types of parameters relative to the function, and adding #[use_callers_scope] won't change that. Or it won't change how Expr::resolve works. So I don't know if #[use_callers_scope] should apply to these (and actually all) these solving methods, or we'll just have some methods work in one way, some methods work in another way.

Why, is it because of verbosity?

Yes, I think it's a bit impractical to always have users pass around module ids everywhere when most of the time they just want to work as if the attribute is in the scope of the item it's being used on.

So I don't know if #[use_callers_scope] should apply to these (and actually all) these solving methods, or we'll just have some methods work in one way, some methods work in another way.

#[use_callers_scope] definitely shouldn't apply everywhere. I just have it changing the "default" currently but it is still overridden by anything that explicitly sets the function or module. So resolve with None for the  module argument would use the caller as the "current" scope instead. Some things like Module::add_item should also always be within that module since it is the destination of the item and doesn't make sense to be anywhere else.
I suppose we could also discuss whether the module argument should be removed from Expression::resolve but I saw adding this attribute as a quick way of changing the scope for all of these resolution methods that are currently fixed, and doing it in a way that is consistent for users across each function (although does have a learning curve as they'd need to be aware of the attribute unlike a parameter which is obvious).


HOTFIX: Changes suggested fee to be correct

Minor tweak to adjust suggested fee

!approved-for-mainnet

This was fixed differently by a different PR. Closing.


remove return statement from console.log

causes compilation failure when using typescript

i signed it

@tavelli Could you tell us a little more about the error that you are seeing with Typescript? (e.g. could you paste the error here?)
We added an ESLint rule to all projects that makes having a return statement inside promises mandatory to avoid some common errors that developer face when writing these return promises (e.g. forgetting to return a Promise or a chained/sub promise).
cc/ @inlined @tinaliang

FYI we added this as part of #306

@nicolasgarnier my bad i's actually tslint error not compile error, but it will cause deploy firebase deploy to fail if using default tslint config created during firebase init.
the lint error is:
ERROR: Expression has type void. Put it on its own line as a statement.
so it can also resolved by just moving return statement onto separate line after the console.log
return streamAsPromise.then(() => {
    console.log('Thumbnail created successfully');
    return;
})

That looks good to me. I'd also accept inlined expressions as well (they're exempt from the always-return linter rule):
return streamAsPromise
    .then(() => console.log('Thumbnail created successfully'))
    .catch(err => console.error('Error creating thumbnail', err));

As some minor other fixes from my sample: always print your errors and print them to stderr.

I just added the return null; to  your PR. Let's merge!
Thanks @tavelli !

Thanks!


Add promote_at functionality. Also optimized logic for promotion

We were facing two issues:

Long delayed jobs were never promoted(https://github.com/LearnBoost/kue/issues/312)
Number of delayed jobs were more than 9 lakhs and increasing. When promotion code executed(at an interval of 5 sec), redis took atleast 1.5 sec just to sort them.

To fix above two issues, this pull request did following:

Additionally save promote_at field which is based on delay and creation time
Create a new zset 'q:jobs:delayed_promotion' which stores job id along with promote_at timestamp(as score)
When job.promote is called, first n(where n is limit passed to promote function) number of jobs are fetched from 'q:jobs:delayed_promotion' and moved to inactive. Since 'q:jobs:delayed_promotion'  already sorted based on promote_at timestamp, it took few ms to get them

@behrad: Any updates here

We have open similar issues relating to job promotion, I was going to refactor the whole promotion stuff and improve existing flaws. I'll post then

https://github.com/LearnBoost/kue/issues/312
https://github.com/LearnBoost/kue/issues/449

https://github.com/LearnBoost/kue/issues/312

https://github.com/LearnBoost/kue/issues/312#issuecomment-66695555


Move the subgraph task to the blocking thread pool

This is probably the busiest task in indexing nodes and it blocks on the DB on many of its steps. Locally I could not reliably measure whether it reduced contention, but still seems worth seeing what happens on the hosted service. Even if we can't see a change, in principle this is a correct thing to do.
Part of #937

Looks good in general, and I agree it's worth trying out. Just to help me understand: does this make it so that everything to do with subgraph indexing runs on the blocking pool? Are there any downsides to that?
And: how will we know that this change is an improvement once it gets put into production?

@lutter It makes it so that task, which is the driver for subgraph indexing, runs in the blocking pool. The downside is that the interaction with the reactor (to park/unpark) requires cross-thread communication, which is neglibile for us. Once https://github.com/tokio-rs/tokio/issues/588 is done, there will be a more convenient way of putting tasks in a blocking pool, and then we can experiment with putting all tasks which may block in the blocking pool.
We can compare the frequency of "Possible contention in tokio threadpool" warnings to tell if it helped, which isn't very scientific but it's what we have.


Display download link and delete checkbox only if attachment persisted

Fixes #71

@all-contributors please add @oleg-kiviljov for bug and code


python312Packages.velbus-aio: 2023.12.0 -> 2024.4.0

Diff: https://github.com/Cereal2nd/velbus-aio/compare/refs/tags/2023.12.0...2024.4.0
Changelog: https://github.com/Cereal2nd/velbus-aio/releases/tag/2024.4.0
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

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

5 packages built:

home-assistant-component-tests.velbus
python311Packages.velbus-aio
python311Packages.velbus-aio.dist
python312Packages.velbus-aio
python312Packages.velbus-aio.dist


Compiling with Makefile causes instant buffer overflow

When compiling using the Makefile, the binary abort at start, with the following message:
*** buffer overflow detected ***: terminated

Gcc version: 12.2.0

Valgrind does report an issue too, but the output is mangled due to nurses taking control of the tty output.
It seems to come for the strncpy, within strp_off_dot, but Valgrind reports conditional jumps and the use of uninitialised values too.
char *strip_off_dot(char *str, size_t str_s) {
    char *result = NULL;
    for(size_t i = 0; i < str_s; i++) {
        if(str[i] == '.') {
            result = malloc(sizeof(char)*str_s-i);
            strncpy(result, str+i+1, str_s-i+1);
        }
    }
    return result;
}

Thanks for noticing and reporting, that's my bad. It should be fixed in the latest pull request, can you try it out and make sure?


Title: Adding a Preloader

Initiative (Required)
GSSoC 2024 Extd 🚀
Is your feature request related to a problem? Please describe.
The current Webapp does not have a preloader
Describe the solution you'd like.
I would like to add a custom preloader which will match the theme and aesthetic of the Website
Add any other context or screenshots about the feature request here.
No response

@Kushal997-das
Kindly assign me the issue


AUI-2281 HISTORY.md

Just started reviewing :) :octocat: Sent from GH.

Pull request submitted to https://github.com/mairatma/alloy-ui/pull/334. See changes here. :octocat: Sent from GH.


Doc for mapreduce.job.user.classpath.first=true

new workaround for CDH and Druid classpath issues using the mapreduce.job.user.classpath.first configuration for favoring Druid version of Jackson instead of the binary incompatible one provided with CDH
new link to more Hadoop configuration parameters for jobProperties

Let me know if you this looks better and if you need me to squash the changes.

Thanks @slaunay !  Would you mind filling out the CLA ?

:+1: after CLA
As per https://groups.google.com/d/msg/druid-development/3CSoTMYtsTU/0U_4KoD1AwAJ we shoouuuulllldddd have auto-squashing turned on.

I filled out the individual CLA but you might already have my company (OpenDNS, now Cisco) as a corporate CLA anyway.
Thanks Charles.

👍


File Save Structure: Custom Locations & Names?

Hello Saltcorn Community,
I've been considering building an app using Saltcorn, and as part of this project, I anticipate that users will be uploading multiple files, including avatar images and a series of photos.
However, I've noticed that Saltcorn's default file saving behaviour doesn't quite meet my needs. It appears that all uploaded files are stored in a single, unstructured folder, with identical file names simply being appended with _1, _2, _3, etc.
Ideally, I would prefer to have a more organized structure - perhaps a unique folder for each user's files. Additionally, the ability to rename files upon upload (for example, a user's avatar image could be automatically renamed to "Avatar.jpg") would be extremely helpful. This could also potentially save a database entry, as I could set "Avatar.jpg" as the default avatar for all users.
With the existing file saving structure, I fear that even a moderate number of users could result in an unmanageable amount of files in a single folder (e.g., 100 users could create over 1,100 files).
Has anyone found a way to customize the file save location and naming in Saltcorn, or does anyone know if these features are being considered for future updates? Any advice, workarounds, or pointers towards relevant resources would be greatly appreciated!
Thank you for your time and looking forward to your responses.

Did you see this?:
At the bottom of "Settings / Files" there is a 'Create new Folder' option.
Then, when you have an edit view with an upload Field, you see a 'Folder' option in the Field settings menu.


test: organize and add tests

Description
I felt like the tests needed to be better organized, so it would be easier to write new tests and to check the unit test coverage. This PR does the following to achieve those goals:

Add a utils.py file that helps with requesting endpoints, and checks the status code and global headers of the response.
Test everything with sync and async endpoints
Add tests for adding a global header, startup handler and shutdown handler, and a test for modifying request headers with middlewares (which is skipped for now as this is currently bugged in Robyn)
Rename endpoints for a better understanding (sync endpoints start with /sync and async one with /async for example)
Fix some docstrings

There is still room for improvements, like actually testing if the startup and shutdown handlers are executed, but I didn't figure out a way to test this properly for now.

Hey @AntoineRR 👋
Thanks for the PR - the pre-commit.ci - pr  is failing. I will do a thorough review in 20 minutes.

Oh I didn't notice the precommit failing, I will fix that thanks

Thanks for the review ! :wink: I will go through it and let you know when I did the changes

PR updated @sansyrox :slightly_smiling_face:


Environment variables update

This is a rework for miopen/env.h.
Changes:
All environment variables must have default values, specified at declaration (3 types)

uint64_t
std::string
bool

The environment macro has been expanded to:  MIOPEN_DECLARE_ENV_VAR(name, type, default_val)
Environment variables can now be update programmatically with:
template <typename EnvVar, typename ValueType>
void UpdateEnvVar(EnvVar, const ValueType& val)

This is useful for writing test code.
In order to support previous behavior inline bool IsDefault(EnvVar) function added to identify unset variables.

All environment variables must have default values, specified at declaration (3 types)

Why?

Environment variables can now be update programmatically...
This is useful for writing test code.

I do not like this idea as it does not look KISS enough to me. But I am not going to object provided that performance is on par.

@junliume @JehandadKhan Please do not merge until performance testing results are ready.

@cderb Could you update the wiki on env variables?

Not an enviable task.
Indeed some more comprehensive material can be found at github.io, but this is also not all inclusive. https://rocmsoftwareplatform.github.io/MIOpen/doc/html/index.html

@msaudulhassan

@cderb Could you update the wiki on env variables?

Why this is necessary (who is the intended audience)?

@cderb The PR is intended to resolve #2551 and minimize fixes in #2409 (in progress). Can you please edit the topmost comment (PR description) and add this information there?

@JehandadKhan @junliume FYI as far as I can see, the issues listed in #2521 and review comments in #2409 could be resolved without this PR without much efforts. I'm telling you this just to let you know; finally, I'm just another incompetent programmer tired of debating.

@atamazov  I believe some context might help. As you know we are in the process of converting all tests into binaries ( aka gtests). Since the final target is to package these tests, we would need to come up with some mechanism which would enumerate and run all the tests. Since such a mechanism would complicate things, a simpler way would be to just link all the tests in a single test binary which will run all the tests. (This is the approach taken by rocblas etc as well).
Such an approach would provide a clean interface for running all the tests while maintaining filtering capability using gtets' built in regex filtering approach. However, in this instance all tests would share the same binary image and env var based approach would not be feasible since the env var values cannot be reset.

I took the liberty to merge the conflicts in test/gtest/layernorm.cpp by accepting the changes in Develop branch
TEST_P(LayerNormTestFloat, LayerNormTestFw)
{
const auto& handle = get_handle();
<<<<<<< HEAD
if(!(miopen::IsEnabled(MIOPEN_TEST_ALL{}) && (GetFloatArg() == "--float")) ||
!(miopen::StartsWith(handle.GetDeviceName(), "gfx908") ||
miopen::StartsWith(handle.GetDeviceName(), "gfx90a") ||
miopen::StartsWith(handle.GetDeviceName(), "gfx94")))
if((miopen::StartsWith(handle.GetDeviceName(), "gfx908") ||
    miopen::StartsWith(handle.GetDeviceName(), "gfx90a") ||
    miopen::StartsWith(handle.GetDeviceName(), "gfx94")) &&
   miopen::IsEnvvarValueEnabled("MIOPEN_TEST_ALL") && (GetFloatArg() == "--float"))
{
    RunTest();
    Verify();
}
else

develop
{
GTEST_SKIP();
}
};

@CAHEK7 Please see https://github.com/ROCmSoftwarePlatform/MIOpen/issues/2521#issuecomment-1819467431

@amberhassaan I understand your concerns, however --

The unset state is a natural property of environment variables, it is widely used in the library...

and therefore I am not sure if it is possible to do what you would like to do (i.e. get rid of the unset state) without serious refactoring of the source code, that would introduce very strong dependency between environment variable object and the rest of the code.
Consider example from https://github.com/ROCmSoftwarePlatform/MIOpen/pull/2514#discussion_r1393012957:
In the original IsApplicable:
#if WORKAROUND_SWDEV_266868
     if(StartsWith(ctx.GetStream().GetDeviceName(), "gfx10") ||
        StartsWith(ctx.GetStream().GetDeviceName(), "gfx11"))
         if(!miopen::IsEnabled(MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW1X1{}))
             return false;
#endif
     if(miopen::IsDisabled(MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW1X1{}))
         return false;

The default value of the variable should be initialized with something like:
bool ConvOclBwdWrW1x1_IsEnabledByDefault(const std::string& device)
{
#if WORKAROUND_SWDEV_266868
     if(StartsWith(device, "gfx10") ||
        StartsWith(device, "gfx11"))
         return false;
#endif
      return true;
}

As you can see the transformation is non-trivial (two return false replaced by one return false and one return true).
Note that this function should be made global because we want to move all the declarations/definitions into a header file.
And in the solver we should leave only:
if(miopen::IsDisabled(MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW1X1{}))
    return false;

and then remember that the substantial part of IsApplicable (activation of a workaround) is hidden within initialization of the environment variable.
I do not believe that this is what you want to do.

🌀 Performance testing results
🟢 Baseline develop f0606ba18 vs branch c1c8336ce - neither device-side nor host-side performance regressions found. Good to go!
/cc @junliume @JehandadKhan @cderb

@junliume  Can we get this merged?


[backport] Remove backslashes to continue lines of link targets

Backport of #7170

[automatic post] Jenkins, test this please.

Separated a commit for conflict resolution.

Jenkins CI test (for commit c3024af284e70c8a539b5e5fe68e7bffc495effc, target branch v6) succeeded!

Jenkins, test this please.

Jenkins CI test (for commit c3024af284e70c8a539b5e5fe68e7bffc495effc, target branch v6) succeeded!


Mark DATA_Sent_TooSlowly… test as flaky

We don't have the FlakyAttribute in release/2.2 and https://github.com/aspnet/AspNetCore-Internal/issues/1323 is reporting failures in that branch is well. @anurse do you recommend skipping in the release/2.2 branch for now?

If we don't believe there's a product issue behind this, go ahead and skip the test in release/2.2

Http2TimeoutTests.AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterCooldownExpires(intFinalFrameType: 0)

Should this be marked flaky as well while you're here?

@aspnet-hello triage https://dev.azure.com/dnceng/public/_build/results?buildId=135737

This comment was made automatically. If there is a problem contact ryanbrandenburg.
I've triaged the above build.


THANK YOU

HEY MAN THANKS A BUNCH FOR MAKING THIS!!  send me a Crypto address I will throw you a tip saved me hours  bringing a old site back to life

@ChrisFrench you are most welcome, but this is thanks enough! Drop some cash on someone or a group helping folks less fortunate than me if you so desire :)


Improving global folding and IPO for immutable globals.

Parameters and constants end up as globals that previously were not getting marked as immutable unless the globals were default initialized. Now the GlobalTable tracks whether a global is exclusively stored within initializers (or functions only called from initializers) in order to mark them as immutable. IPO was updated to support propagating uniform immutable global loads across call edges as if they were constants (as they effectively are just constants stored on the global scope).
Required for #17875 (to avoid treating constants/parameters as dynamic binding table values).

Oh, test failures :P well, code LGTM

(fixed tests/lint, PTAL)


How to train SyncNet with frames of 3 and 7?

Hello, I want to train Syncnet with the number of image sequences at 3 and 7, but I don't know if my configuration is correct. In the case of 5 frames of image, the syncnet_T is 5 and the syncnet_mel_step_size is 16. One frame of image corresponds to 3.2 frames of audio. So, When the input image is 3 and 7 frames, the corresponding syncnet_mel_step_size is 9.6 and 22.4???

Hi, unfortunately I don't know anything about SyncNet or how it's related to Sitcom Simulator, could you elaborate?


Can not load WakaTimePackage in ssms 2017.8.1

I follow this step to install it
and when I start my ssms,I get this error

and this is my ActivityLog.xml
ActivityLog.zip
this is my ssms about page

and I use another extension:SQLPrompt,I don't know whether it cause this error

I open the ActivityLog.xml,and I search the guid of 52d9c3ff-c893-408e-95e4-d7484ec7fa47
I can find this errorAppid denied the loading of package
so,I try to run the ssms with administrator，and now it works well
So, I suggest you write run the ssms with administrator note in the install step as  tips

Thank @w371987114 I already added the troubleshooting section and will make a PR to website.


How to stop the server?

hey. In my opinion, the Dispose method should

Disconnect all clients
Close the TcpListener

but it's not like that

Hi @diskshared I amended the Dispose method on the server to call Dispose on each of the connected clients.  I'll update NuGet as well.  On the earlier question, are you submitting data via telnet using the appropriate framing, i.e. instead of sending "Hello" are yo sending "5:Hello"?

https://github.com/jchristn/WatsonTcp/commit/52de1d4641ec03ab90c80075165979650afd68b7

Thanks for the quick response)
All customers are disconnected, it's good.
What about TcpListener?
You bind the address
_Listener = new TcpListener (_ListenerIpAddress, _ListenerPort);
After the end of the server, it must be freed
_Listener.Close ();
About telnet, I realized what was my mistake when I looked at the server code more carefully)

Good call, fixed!  https://github.com/jchristn/WatsonTcp/commit/9a6e87c97fc7569f73cd561268a2d024d37eeeee


Update lodash-webpack-plugin

0.7.0

@boygirl Can you point me to where Lodash is used. It may help me find more places to optimize lodash-webpack-plugin.

@jdalton thanks! This package is the archetype that controls all the infrastructure for individual Victory components like this one https://github.com/FormidableLabs/victory-chart. We're using maybe a dozen lodash methods across all the victory components. All the components are using named imports from lodash. Let me know if you need any more information. Thanks for constantly improving lodash :)

Nice! Thank you!
It looks like y'all are hitting most of the replacement paths for lodash-webpack-plugin, rock!


[6.0 cherry-pick][embedded] Avoid a crash on location-less SIL functions in PerformanceDiagnostics

Explanation: SILGen can generate calls to things like swift_readAtKeyPath, which end up being location-less SILFunctions, this caused a crash in PerformanceDiagnostics. Fix is to avoid assuming all SILFunctions have a SILLocation. https://github.com/apple/swift/pull/72819
Scope: Embedded Swift only.
Risk: Low, all changes only apply to Embedded Swift.
Testing: Added test case.
Issue: rdar://125724841
Reviewer: @eeckstein on https://github.com/apple/swift/pull/72819

@swift-ci please test

@swift-ci please test


mention FlashGrid Cluster as an option to run Oracle RAC on Azure

The "Oracle RAC in the cloud" section talks only about alternatives to Oracle RAC. However, many customers need to use Oracle RAC on Azure because of its active-active HA architecture and database uptime advantages.
There is a solution available from FlashGrid that enables Oracle RAC on Azure and that is used by multiple Azure customers since 2017. The FlashGrid solution is available through Azure Marketplace. It makes sense to mention it as a possible option, even if Azure cannot commit to supporting it.

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

ID: 78d8dd88-8d9c-7b3c-78b9-efc2643a09b0
Version Independent ID: 53b6427a-b7fd-8677-c415-6235e434f80e
Content: Architectures for Oracle database on Azure Virtual Machines - Azure Virtual Machines
Content Source: articles/virtual-machines/workloads/oracle/oracle-reference-architecture.md
Service: virtual-machines
Sub-service: oracle
GitHub Login: @jjaygbay1
Microsoft Alias: jacobjaygbay

@adanielov
Thanks for the feedback! I have assigned the issue to content author to check and update the document as appropriate.

@jjaygbay1
Can you please check and add your comments on this doc update request as applicable.

@rolyon
please review

@PesalaPavan
I don't have knowledge in this area. I've sent email to try to find an appropriate contact.

@dlepow
Please review.

@PesalaPavan - Unfortunately I do not maintain this content set, nor do I have current knowlege of the tech. I'm unassigning myself. Thanks.
#unassign: @dlepow

Thanks for your contribution to our documentation
We are moving to a new user feedback system. As part of that effort, we are creating a content request in our backlog to address this gap and are closing this GitHub issue. The updated content will be published shortly.

Please continue to provide feedback about the documentation. We appreciate your contributions to our community.
#please-close


PDF edit: polish diacritics rendered but invalid when save to PDF or printed

Configuration:

Web browser and its version: Mozilla Firefox 106.0.2
Operating system and its version: Arch Linux 6.0.6
PDF.js version: master
Is a browser extension: no

Steps to reproduce the problem:

Use Text tool, add polish diacritics letters: ć, ń, ó, ś, ź, ż, ą, ę, ł:

Print - preview will show invalid characters (or nothing rendered at all) - only ó works as expected:

When printed (or saved to PDF) result will be same as in preview.

Duplicate of #12264


bug(markdown): markdown never worked

A few notes:

There are a few libraries (1 rust crate and a few javascript libraries) which can pretty reliably convert text to markdown. However, Uplink currently treats everything as markdown, which results in incorrect rendering of non-markdown text. We have a hack in place to mitigate this, but unfortunately most of the markdown stuff is still broken.
we're also using prismjs to allow rendering code blocks with a given language. The markdown processing libraries don't support this and extra hacks are required to make both work at once.
the most recent change to this part of the code involved ensuring that the processed code wasn't stored in State, which allows properly editing the message.

Considering that it's difficult or impossible to make our current implementation work, I recommend choosing one of these approaches:

the easy way: use regexes for each thing we want to capture (bold, italics, underline, code block, strikethrough)
the hard but maybe more efficient way: build a state machine that can do this all in a single pass.

Extra stuff that could be cool

detecting lines that start with one or more of these: # and rendering a heading
detecting bulleted and numbered lists

I keep forgetting that some of this stuff is due to the webview or maybe Dioxus. it looks like at least on the Linux version of Uplink, em and s tags are ignored.

opened an issue here: https://github.com/DioxusLabs/dioxus/issues/1541

related code:
the fix/markdown-again branch of Uplink
the markdowns repository: https://github.com/Satellite-im/markdowns


fix problem in dateparser receiving time input in wrong format

Why was this closed I still have datetime error on the latest release, and the skin changer never opens after that.

Why was this closed I still have datetime error on the latest release, and the skin changer never opens after that.

i closed it because the issue was fixed. if it has came back and you have some understanding of coding you can completely remove the update checker yourself and not have the issue anymore


Node logs are printed multiple times in integration and unittests

When doing integration test, since we use spawnProcess, stdout is piped:
https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/ci/system_integration_test.d#L74
But then, we also print the logs afterwards:
https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/ci/system_integration_test.d#L82-L95
I think we should only keep the later, as the first provides interleaved output.
In unittests, we only will print it twice if a node triggers an assertion, because first this will trigger:
https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/source/agora/test/Base.d#L129
Then we usually have the following:
https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/source/agora/test/Simple.d#L37

The unittest part has been worked around in #1971, however that solution relies on single-threaded tests. Fixing it for multi-threaded shouldn't be hard. For the integration tests, it could probably be fixed rather easily using a configuration (now that we have this).


Player see only sun and moon positons not working

Hey, I was trying to use small time, but I didn't want to provide a actual "time" for my players, so I wanted to allow them just to see the sun and moon position, but seems like that option is not working.
It is a bug or something?
Small Time version: 1.16.6
Foundry version: 11.302

Seems to be working fine for me. Sure you're not just setting the default for new scenes, in settings?

Wait I have to configure that per scene?


How to force ffmpeg to use TCP protocol for rtsp transport using ffmpeg-python

Hi, thank you for this handy library.
I am currently working on rtsp stream.
It seems like by default ffmpeg uses UDP protocol, but users can force ffmpeg to use TCP through flags, like
ffmpeg -rtsp_transport tcp -i "rtsp://xx.xxx.xxx.xxx:80/stream1" -y output.mp4
reference https://stackoverflow.com/questions/23238295/force-ffmpeg-to-use-tcp-protocol-when-reading-a-rtsp-stream
My question is that how can I add -rtsp_transport flag using ffmpeg-python to make this work.

@x91003502 did you make progress with this?

I'm also looking for a solution of this. Tried using global_args and does not seem to work. My example:
self.process = (
            ffmpeg.input(link)
            .output("-", format="rawvideo", pix_fmt="rgb24")
#            .global_args("-loglevel", "warning")
            .global_args("-rtsp_transport", "tcp")
            .run_async(pipe_stdout=True)
        )

The -loglevel flag seems to work properly, but the -rtsp_transport does not give any effect. The command does work through command line. Maybe due the way the arguments are parsed? If I put:
ffmpeg -rtsp_transport tcp -i rtsp://<user>:<pass>@localhost:<port>/<url> -acodec copy -vcodec copy test.mp4

seems to work, but if I put
ffmpeg -i rtsp://<user>:<pass>@localhost:<port>/<url> -acodec copy -vcodec copy test.mp4 -rtsp_transport tcp

it has no effect.

I think the problem is that there is no "slot" after ffmpeg keyword and before -i flag. So, the easiest (hacky) way I found is to add the flag manually in the library where it constructs the subprocess command. In the module, there is a script _run.py
@output_operator()
def run_async(
    stream_spec,
    cmd='ffmpeg',
    pipe_stdin=False,
    pipe_stdout=False,
    pipe_stderr=False,
    quiet=False,
    overwrite_output=False,
):
    """Asynchronously invoke ffmpeg for the supplied node graph.

    There are some provided example code

    """

    args = compile(stream_spec, cmd, overwrite_output=overwrite_output)

    # Add flags in args to Force FFMPEG to use TCP protocol when reading a RTSP Stream
    args.insert(1, '-rtsp_transport')  # Add this
    args.insert(2, 'tcp')                     # Add this
    print(f'CMD COMMAND : {args}')
    stdin_stream = subprocess.PIPE if pipe_stdin else None
    stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
    stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
    return subprocess.Popen(
        args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
    )

From my experience, this can work, but again, it's not the formal solution., wondering if there's any formal solution.

Did the same just before your response (ugly nonetheless). Being able to specify the position of the argument in global_args would be perfect. Thank you!

I think the problem is that there is no "slot" after ffmpeg keyword and before -i flag. So, the easiest (hacky) way I found is to add the flag manually in the library where it constructs the subprocess command. In the module, there is a script _run.py
@output_operator()
def run_async(
    stream_spec,
    cmd='ffmpeg',
    pipe_stdin=False,
    pipe_stdout=False,
    pipe_stderr=False,
    quiet=False,
    overwrite_output=False,
):
    """Asynchronously invoke ffmpeg for the supplied node graph.

    There are some provided example code

    """

    args = compile(stream_spec, cmd, overwrite_output=overwrite_output)

    # Add flags in args to Force FFMPEG to use TCP protocol when reading a RTSP Stream
    args.insert(1, '-rtsp_transport') # Add this
    args.insert(2, 'tcp')             # Add this
    print(f'CMD COMMAND : {args}')
    stdin_stream = subprocess.PIPE if pipe_stdin else None
    stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
    stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
    return subprocess.Popen(
        args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
    )

From my experience, this can work, but again, it's not the formal solution., wondering if there's any formal solution.

Thank you this works, hope fix for this will be in master soon


Naming convention support for multi-project - multi-region - multi environment peering and multi-tenant VPCs

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Describe the Feature
Support for multi-tenant peering / peering that spans projects, regions, environments, etc.
The naming convention created by https://registry.terraform.io/modules/cloudposse/label/null/latest -- in the way that has been set up in this repo -- it is assumed these are single tenant.
I am happy to make a pull request for this, as I've done this myself, but I'm not a complete terraform export and am not as familiar with your testing requirements / conventions as you might like.
Expected Behavior
Separately named resources for requester/accepter depending on project
Use Case
I have infrastructure that is shared between multiple projects, regions, and environments. One of these resources is our database VPC, which needs to peer with stage,  prod, and a test resource (due to some limitations of instance sizes, pricing, and availability, it is a multi-tenant DB)
Describe Ideal Solution
If there was an option of setting:

namespace
environment
stage
name
delimiter
attributes
tags

for both requester and accepter, that would be very useful, as these are not always the same.
I  can see supporting the current behavior and the new feature by:

Create module.requester_context and module.accepter_context separately instead of using the module.this
use the var.requester_X /  var.accepter_X  first, then default to var.X for the module.accepter_context / module.requester_context
use module.requester_context and module.accepter _context instead of your current module.this

that should allow for this repo to support multi-tenant VPC peering, or projects that need to peer between projects/regions/etc.
Alternatives Considered
Set values that expand to both resources, however that breaks tag lookup
Additional Context
Add any other context or screenshots about the feature request here.

Looks like we now use a custom label for requester and accepter. 😄
https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account/blob/67f1be28c474144878294d626d5650224bc60443/requester.tf#L79-L86
https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account/blob/67f1be28c474144878294d626d5650224bc60443/accepter.tf#L20-L30
Please comment if this is still an issue.


[HUDI-2925] Fix duplicate cleaning of same files when unfinished clean operations are present.

What is the purpose of the pull request
Fixed duplicate cleans which lead to issues with metadata table.
Brief change log
Perform unfinished clean operations before attempting to generate a new clean plan.
Refresh fsview after each unfinished clean operation.
Verify this pull request
Added unit test TestHoodieBackedMetadata::testMultiClean
Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Hey @prashantwason : Can you respond to our comments above. Looking to get his into 0.10.1. would appreciate if you can respond. we can see how to proceed and get this in.

Responded to the comment above. Are there specific objections to the way this patch is implemented or the issue itself? I am open to any way to fix this issue.

Since we don't have a clear/concrete plan yet, I am removing it from 0.10.1. but lets brainstorm and try to get a closure.

@prashantwason : We are looking to get this in for 0.11. Would appreciate if you can follow up on this and let us know once its ready to review again.

@nsivabalan Your plan to not schedule clean when another is in progress works. Can you please make that change and I can close this PR? Happy to review the other PR too.

@yihua : do you want to review. Prashant has given a ship it.

@yihua : if you are good, can I go ahead and merge this in.


Wait for kudu appsettings update for run from zip issue

Wait for kudu appsettings update for run from zip issue

Codecov Report

Merging #1194 (1cb8152) into develop (51d4342) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop    #1194   +/-   ##
==========================================
  Coverage      31.96%   31.96%
  Complexity       453      453
==========================================
  Files             94       94
  Lines           4699     4699
  Branches         800      800
==========================================
  Hits            1502     1502
  Misses          3053     3053
  Partials         144      144

Continue to review full report at Codecov.

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


[WIP] TSP description, vision and guidelines

My interpretation of the TSP. A tentative description of what it is, what it aims to accomplish and the use cases it aims to solve.
Some initial guidelines to follow when extending the TSP to accomodate new use cases.

I haven't had a chance to comment on this PR. I'll provide my feedback in the coming days.


P5 inno 120 michelle sprint 1

EventCard Component

Added function to grab data from firestore
Added EventCard component and styling
Added HackathonEventsPage to hold the EventCard where the data is called

to access it,
npm start
go to route "/hackthons" and comment out any logic that might require a login

Looks good! I’ll let another team member review before we merge. Great job!


@emotion injecting global styles that force me to use higher specificity when styling Mui components

@emotion seems to be injecting a set of basic rules that are applied to some components

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
If you go to the Sandbox below and click the button "Open Menu", you can see the MenuItems inline.
If you look at the elements tab, the .css-10d1a0h-MuiButtonBase-root class is being applied to these MenuItem components.
Expected Behavior 🤔
At no point anywhere am I specifying these default classes, but they're taking precedence over my own style rules.
This doesn't work,
const useStyles = makeStyles((theme) => ({
    menuItem: {
        padding: theme.spacing(2)
    }
}))

But higher specificity does,
const useStyles = makeStyles((theme) => ({
    '&&': {
        menuItem: {
            padding: theme.spacing(2)
        }
    }
}))

What's also odd is that if you uncomment App.jsx:12 (ie <GlobalStyles />), then the MenuItem components are stacked as they should be (but the class .css-10d1a0h-MuiButtonBase-root can still be found in elements).
Steps to Reproduce 🕹
.
Your Environment 🌎
Browser: Google Chrome
  System:
    OS: macOS 10.15.5
  Binaries:
    Node: 14.15.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  Browsers:
    Chrome: 88.0.4324.96
    Edge: Not Found
    Firefox: 84.0.1
    Safari: 13.1.1
  npmPackages:
    @emotion/react: ^11.0.0 => 11.1.4
    @emotion/styled: ^11.0.0 => 11.0.0
    @material-ui/core: 5.0.0-alpha.23 => 5.0.0-alpha.23
    @material-ui/icons: ^4.11.2 => 4.11.2
    @material-ui/styled-engine:  5.0.0-alpha.23
    @material-ui/styles:  5.0.0-alpha.23
    @material-ui/system:  5.0.0-alpha.23
    @material-ui/types:  5.1.5
    @material-ui/unstyled:  5.0.0-alpha.23
    @material-ui/utils:  5.0.0-alpha.23
    @types/react: ^17.0.0 => 17.0.0
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    typescript: ^4.0.3 => 4.1.3

This github issue seemed to be related to my issue, but setting peerDependencies didn't work, and running npm ls @material-ui/core didn't return anything.

Duplicate of #24109

Duplicate of #24109


Fix #23 - add value getter and setter directly on input (did not remo…

…ve it from others for now)

@avi can you please take a quick look? I did not remove value getter/setter from RemoteElement since it does seem like Text Element is using it and I thought some other elements might also use it. So I thought maybe it's better for it to stay this way until we encounter other problems.

Coverage decreased (-0.5%) to 88.454% when pulling 650ae91c3712c9d5e488b9a841c46fa53c64b935 on fixInputValueTrackingReactBug into a37e8ceddcbbb0b22c32ea036ad07071306efcfb on master.


fix: missing qna recognizers when publishing

Description
In PR #4351 lost the qna recognizers generate logic, The runtime will throw error when use the qna.
This is a quick fix for main branch. In PR #4549 also fixed the issue, and move all this logic to client. But it maybe can not be merged immediately.

Task Item
refs #4549
#minor

Screenshots

Coverage decreased (-0.04%) to 54.895% when pulling c4d2089cdb9c9e2221de8e9774e31a15da7250d2 on lei9444:qnabuild into c4553695d60a09805aae0995f8bb380bbdeb0b44 on microsoft:main.

Taking this to fix the qna bot broken in master


Make private key testing code more explicit

... when doing UInt8Array to string conversion.
This improves upon #1007.

Task linked: CU-3gb22b9 Implement early detection of invalid private key on import


How can I get the data

Hi,
i know its not a issue but I can´t get the current data and send it with axios for example.
It is possible to get a basic code for that? Thanks

Maybe a little too late but hope this help someone in the future,
You need to put a ref to your hot-table component
<hot-table root="testHot" ref="testHot" :settings="handsonSettings"></hot-table>
and then call this function
this.$refs.testHot.table.getData()
It's important to say that "table" is the instance returned by the handsontable constructor, so you can call all the handsontable methods using the "table" prop of the hot-table instance.

@eard7 I tried that but am getting "TypeError: Cannot read property 'getData' of undefined".
I've analyzed the component in Vue Tools (and dumped it to console), the Vue instance does not contain the property 'table'.
Any ideas?

@TJKoury That's weird. The code i published is what worked for me. Did you installed the handsontable dependency? (npm install -s handsontable)

Yes, I did.  The problem is when you create an alias in Webpack, it applies that alias across all packages.
From: eard7<EMAIL_ADDRESS>Sent: Friday, November 03, 2017 1:07 PM
To: handsontable/vue-handsontable-official<EMAIL_ADDRESS>Cc: TJKoury<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [handsontable/vue-handsontable-official] How can I get the data (#7)
@TJKoury https://github.com/tjkoury  That's weird. The code i published is what worked for me. Did you installed the handsontable dependency? (npm install -s handsontable)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/handsontable/vue-handsontable-official/issues/7#issuecomment-341767094 , or mute the thread https://github.com/notifications/unsubscribe-auth/AAtuKFCspsIRw7UA2gGdIF2Y8ZNJh8WWks5sy0hMgaJpZM4OkCXo .  https://github.com/notifications/beacon/AAtuKLpDZF5jvdYD-fiiGMWbqfk51Oppks5sy0hMgaJpZM4OkCXo.gif

I had to add a property to the parent Vue instance (this.mounted) when it's mounted, and check for that property whenever I want to save data.
Also, trying to use this with Vuex two-way binding is very difficult.

@TJKoury i see, i didn't had that problem because i accessed the instance with the click of a button (some time after the component mounted). Glad it worked for you, and yeah it's a little tricky but works.

@eard7 Thanks.  Also if anyone else is having issues with Vuex, try listening for afterChange events on the table and feeding data back to mutations:
....
afterChange: (changes, source) => {
          if (this.mounted && source === 'edit') {
          this.$store.commit('ontology', this.getTableData())
     }
},
methods: {
    getTableData: function () {
        return this.$refs.oHOT.table.getData()
    }
...... }

@TJKoury  Can you expand you code a little bit before the afterchange:
if i try your suggestion like this :
export default {   data: function () {     return {       root: 'testHot',       vueData: [[1, 2, 3, 4]],       hotSettings: {         minSpareRows: 1,         rowHeaders: true,         colHeaders: [           'player1',           'player2',           'seed',           'club'         ],         afterChange: function (changes, source) {           console.log(this.getData())           console.log(this)           if (this.mounted && source === 'edit') {             this.$store.commit('SAVE_HANDSONTABLE_DATA', this.getData)           }         }       }     }   },
this refer to handsontable instance and i cannot access the store directly. this.$store = undefined
there is something i am missing here. Thank for your help

You said : this refer to handsontable instance and i cannot access the store directly. this.$store = undefined
I have the same problem. How to solve?

@PhilAndrew
Finally i got it working like this :
afterChange: function (changes, source) {
          console.log(source)
          if (source === 'edit') {
            this.rootElement.__vue__.$store.dispatch('updatePlayerList', this.getData())
          }

hope this work for you too !

@PhilAndrew @aspben I ended up not using $store directly.  I created a computed property and used a method to set the value.

I think we can close this issue. Feel free to reopen if you find the same problem.
@francoismart Could you create a new issue with details?


Pod install fails for React 0.30.0

I'm new to React and CocoaPods so this could well be a basic mistake on my part.
Reprod details:
create new project using https://github.com/facebook/react-native/releases/tag/v0.30.0

npm install react-native-maps
rnpm link

pod init inside the ios directory and add react-native-maps reference
pod install
Analyzing dependencies
Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
[!] Unable to satisfy the following requirements:

- `react-native-maps (from `../node_modules/react-native-maps`)` required by `Podfile`

It seems like you've changed the constraints of dependency `react-native-maps` inside your development pod `react-native-maps`.
You should run `pod update react-native-maps` to apply changes you've made.

But:
pod update react-native-maps
[!] The `react-native-maps` Pod is not installed and cannot be updated

Try adding
pod 'React', :path => '../node_modules/react-native'

to your pod file

Ok, so this is just another issue with:
https://github.com/lelandrichardson/react-native-maps/issues/279  (no points to me for not googling the error properly before raising - this is another duplicate)


doc(CONTRIBUTING): Remove refence to "install script"

This removes a confusing reference to an "install script"
in the dependency section. A change that was forgotten in #1787
Change-Type: patch
Connects To: #1771, #1787

That change was originally made in https://github.com/resin-io/etcher/pull/746 and I'm afraid I think it might have been my suggestion which prompted it.


Add queue_name to queued method options for CloudTenant model

This PR adds a queue_name to the queue options for the CloudTenant.create_cloud_tenant_queue, CloudTenant#update_cloud_tenant_queue and CloudTenant#delete_cloud_tenant_queue methods.
I've also added some specs (these methods were previously uncovered), refactored the existing specs a bit (mostly so I could re-use the factories), and added some comments on those methods.
Part of #19543

@miq-bot add_reviewer @agrare


Missing utils classes

Hi,
I'm am using this plugin from some time already and today I noticed that some of Tailwind's classes that are listed in the official Docs are not present by me at all.
For example:

for both margin and padding starting from m-7 and p-7 there are no classes with odd numbers),
font-size classes are missing from text-7xl

Is this a thing of plugin's internal config or is rather something broken?
My entire config looks like this:
const defaultTheme = require("tailwindcss/defaultTheme");

module.exports = {
  purge: [],
  theme: {
    colors: {
      primary: "var(--color-primary)",
      secondary: "var(--color-secondary)",
      "surface-primary": "var(--bg-primary)",
      "surface-secondary": "var(--bg-secondary)",
      "accent-primary": "var(--accent-primary)",
      "accent-secondary": "var(--accent-secondary)"
    },
    container: {
      center: true,
      padding: defaultTheme.spacing["4"],
    },
    typography: {
      default: {
        css: {
          color: "inherit",
          maxWidth: "none"
        }
      }
    },
    extend: {
      rotate: {
        135: "135deg",
        270: "270deg",
      },
    },
  },
  variants: {
    margin: ["odd", "even"],
  },
  plugins: [require("@tailwindcss/typography")],
};

Upgrade Tailwind

Package.json?

Here it is:
{
  "main": "gridsome.config.js",
  "private": true,
  "scripts": {
    "build": "gridsome build",
    "develop": "gridsome develop",
    "explore": "gridsome explore"
  },
  "dependencies": {
    "@gridsome/source-strapi": "^0.2.0",
    "gridsome": "^0.7.0"
  },
  "devDependencies": {
    "eslint": "^7.12.1",
    "node-sass": "^5.0.0",
    "prettier": "2.1.2",
    "sass-loader": "^10.0.5"
  }
}

Try installing Tailwind

Try installing Tailwind

Please, take another look, I missed the plugin itself. It was correctly installed by npm and like I sad - Tailwind works but some classes simply don't exist.

Hi @kwiat1990,
did you try it with the current version '^4.1.0'?

Yeah, it turned out to be just a problem with old versions. After upgrading it works all seamless.
@dsturm thanks for the tipp to update my packages.


static library

Can I build a Typhoon as a static library?
I cannot use cocoaPods as I cannot force a customer to use them. On other side I cannot use a dynamic framework as I need to support an iOS7 for the time being.

Hi! Yes you can, no problem.
Either drag the source files into your project, and create a static library target for that, then add as a dependency to another target, or checkout Typhoon and build from there.

I thought the project has it.
Cheers.

We're looking at reconfiguring our build server, and uploading latest binaries as part of that, hence issue reopened. (In the meantime you'll still have to build manually).

That's a great news! Looking forward to get binaries

Closed by #478


Fixing http adapter to allow HTTPS connections via HTTP

Allows accessing HTTPS APIs via a configured HTTP proxy

This has broken our deployments on two of our applications. We are continuing to receive errors here in heroku despite disabling caching and updating the package. We could use some advice here since all of our deploys are failing in since this change was made.

Yet one more update, we were able to update node versions again but had to update our package.json file to "contentful": "^6.1.1" it seems having the up carrot with a lower version number wouldn't update the package to the latest. Also trying to update with npm in the command line wouldn't work either. Not sure how changing node versions caused this to update the way that it did.

@mrispoli24 Sorry for the trouble! Was clearly my mistake, I released a fresh v4.6.5 which points to the correct axios version for v4. This will never happen again :)


Default window size cuts off instruction

Tested on:

MacBook Pro (2018), MacOS 13.4.1
Version:
TestFlight geteduroam Test version 2.0(47)

❎ test not approved
I still have this issue. See screenshot

Tested on:
MacBook Pro (2018), MacOS 13.4.1
Version:
TestFlight geteduroam Test version 2.0(62)
✅ test approved
All looks good now! No matter what size I make the screen, that overlapping part is not happening anymore


Updated day cycle

About the PR
Refactor of the day cycle change system, as well as commands for admins to interact with it
Why / Balance
resolves: #114

different command format with _
also, how about add prefix cp14 to commands?


An exception is thrown if the "var" operator returns null from some operators

Environment

Nuget Package: JsonLogic 2.0.0
Nuget Version: 6.1.0
OS: WSL
.Net Target: net6.0

Describe the bug
An exception is thrown if the "var" operator returns null from some operators.

To Reproduce
[Test]
public void ExceptionThrownIfVarNull ()
{
  var rule = System.Text.Json.JsonSerializer.Deserialize<Rule>("{ \"in\" : [ {\"var\": \"item\"}, {\"var\": \"list\"} ] }");
  var result = rule.Apply();
}

Expected behavior
rule.Apply() should return false if "var" operator returns null.
if data was not been provided.

if var property could not be found.

for JsonLogic "play  ground"
{"in": [{"var": "item"}, {"var": "list"}]}

Additional context
This behavior could be found only in some methods. I only know about "in" and "<" but I think it could be some more.
For method like "===" is working as expected

[Test]
public void JustExample ()
{
	var rule = System.Text.Json.JsonSerializer.Deserialize<Rule>("{ \"===\" : [ {\"var\": \"item\"}, {\"var\": \"list\"} ] }");
	var result = rule.Apply();
}

Not sure if null === null is correct. Thought.
For "in" operator it should be a simple fix:
public override JsonNode? Apply(JsonNode? data, JsonNode? contextData = null)
{
	var test = _test.Apply(data, contextData);
	var source = _source.Apply(data, contextData);

	if (source is JsonValue value && value.TryGetValue(out string? stringSource))
	{
		var stringTest = test.Stringify();

		if (stringTest == null || stringSource == null)
			throw new JsonLogicException($"Cannot check string for {test.JsonType()}.");

		return !string.IsNullOrEmpty(stringTest) && stringSource.Contains(stringTest);
	}

	// suggestion
	if (source == null)
		return false;

	if (source is JsonArray arr)
		return arr.Any(i => i.IsEquivalentTo(test));

	throw new JsonLogicException($"Cannot apply `in` to {test.JsonType()} and {source.JsonType()}.");
}

Not sure about other rules.
Please could you apply a solution to both JsonLogic 2.0.0 and 3.00

Thanks for reporting.  I've been able to replicate on json-everything.net.  I'll have a look and try to get an update out soon.
Unfortunately, I don't support retroactive updates.  My build process runs automatically on master branch.

rule.Apply() should return false if "var" operator returns null.

I don't think this is exactly the case.

It seems to be a variance on how in behaves.

If the second argument is an array, tests that the first argument is a member of the array

This doesn't say what the operator should do if the second argument is not an array.  It appears that https://jsonlogic.com returns a false for this case whereas I decided to throw an exception because of the type mismatch.

There are some other weird things that their playground does.
{"+":[0,[4,2,false]]}

This returns 4.  It looks like it decomposes [4,2,false] and just takes the first item before adding the values.
{"+":[0,["string",2,false]]}

and
{"+":[0,"string"]}

both return null, which supports that theory.

Thank you for a quick response.
var rule = System.Text.Json.JsonSerializer.Deserialize<Rule>("{\"var\": \"item\"}");
var result = rule.Apply();
result  == null -> true

IMO Is correct behavior. If you do not provide any data or data that could not be found, it will return null.
So { \"in\" : [ {\"var\": \"item\"}, {\"var\": \"list\"} ] }  with no data provided it's same as {"in": [null, null]}

To me, throwing an exception laments the usage of the rule to only strict, specific data. As example {"in": [{"var": "item"}, {"var": "list"}]} Data should always item and list in the correct formats.
But what about the cases when you don't have control over data? (It's coming via API).  Or cases when different rules could be used in different resources.
IMO If the exception approach is used, it would be could throw different types of exceptions. One for incorrect rule format. The second is for incorrect data.
Currently  { \"in123\" : [ {\"var\": \"item\"}, {\"var\": \"list\"} ] } and {"in": [null, null]} will thorw JsonLogicException.
In my case, if data is missing I want to catch it and return false.  If the rule is incorrect I want to throw an exception.

Will do.
What sort of actions are you planning to do?
Are you keeping exceptions?

My preference is to match the original implementation if I can.

I'm pushing a fix for just the in operation.  See v3.0.1.  I'll look at the others in the next few weeks.

Sorry, I did not have time to check them all.

Name
Rule
json-everything.net
JsonLogic playgrand

Tested  (throws exeption). Not  working correct

AddRule
{ "+": [ null, 1]}
Cannot add null
null

DivideRule
{ "/": [ 1, null]}
Cannot divide types null and number.
null

{ "/": [ null, 1]}
Cannot divide types null and number.
0

MaxRule
{ "max": [ 1, null, 2]}
Cannot find max with null.
2

{ "max": [ null, null]}
Cannot find max with null.
0

MinRule
{ "min": [ 1, null, 2]}
Cannot find min with null.
0

{ "min": [ null, null]}
Cannot find min with null.
0

ModRule
{ "%": [ 1, null]}
Cannot divide types number and null.
null

{ "%": [ null, 1]}
Cannot divide types number and null.
0

MultiplyRule
{ "*": [ null, 1]}
Cannot multiply null.
null

{ "*": [ *, null]}
Cannot multiply null.
null

SubstrRule
{ "substr": [ null, 1,2]}
Start value must be an integer
"ul"

{ "substr": [ "hello", null]}
Cannot substring a null
"hello"

{ "substr": [ "hello", 1, null]}
Count value must be an integer
""

SubtractRule
{ "-": [ 1, null]}
Cannot subtract null
1

{ "-": [ null, 1]}
Cannot subtract null
-1

Not tested (throws   exeption)

AllRule

InRule

LessThanEqualRule

LessThanRule

MissingSomeRule

MoreThanEqualRule

MoreThanRule

NoneRule

ReduceRule

SomeRule

Not tested (throws   exeption). Should not needed any changes

IfRule ?

Tested (throws exeption). Working correct

CatRule
{ "cat": [ null, "hello"]}
"hello"
"hello"

{ "cat": [ "hello", null]}
"hello"
"hello"

Wow!  Thanks!  Just having this actually helps a lot.

Hello.
As far as I can see, there is the same issue with ''some'' and ''all'' operators.

Name
Rule
json-everything.net
JsonLogic playgrand

MaxRule
{ "max": [ 1, null, 2]}
Cannot find max with null.
2

MinRule
{ "min": [ 1, null, 2]}
Cannot find min with null.
0

These seem inconsistent.  Why would max actually give the max, but min gives 0?  Does it cast the null to 0, maybe?  That seems really weird.
This concept needs better specification.


Clarify that get_unix_time() returns seconds

I've been implementing IAPs for a mobile game and apparently Google Billing uses milliseconds for purchase timestamp. So I felt like our timestamp needs some clarification too.

Thanks!

Cherry-picked for 3.3.


Job for openvpn-iptables.service failed because the control process exited with error code.

Job for openvpn-iptables.service failed because the control process exited with error code. See "systemctl status openvpn-iptables.service" and "journalctl -xe" for details.
i run the command systemctl status openvpn-iptables.service
● openvpn-iptables.service
   Loaded: loaded (/etc/systemd/system/openvpn-iptables.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2019-08-08 21:36:03 CST; 1min 32s ago
 Main PID: 1522 (code=exited, status=2)

8月 08 21:36:02 iZuf699xdglcdywe43sfr7Z systemd[1]: Starting openvpn-iptables.service...
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z iptables[1522]: iptables v1.4.21: unknown option "--dport"
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z iptables[1522]: Try `iptables -h' or 'iptables --help' for more information.
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z systemd[1]: openvpn-iptables.service: main process exited, code=exited, status=2/INVALIDARGUMENT
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z systemd[1]: Failed to start openvpn-iptables.service.
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z systemd[1]: Unit openvpn-iptables.service entered failed state.
8月 08 21:36:03 iZuf699xdglcdywe43sfr7Z systemd[1]: openvpn-iptables.service failed.

my mistake

I have the same problem, can you elaborate what was problem or mistake ?
Thanks

@rudawem post the output of systemctl status openvpn-iptables.service
Also say what is your operating system and version.

My OS : Ubuntu 20.04 LTS
And I solve the problem, apparently in my OS, iptables path is /usr/sbin/iptables but openvpn-iptables.service was looking at /sbin/iptables with simple soft link problem was solved.
I use your script many times but this was first time to see this error, maybe dynamic iptables path needed in script.
BTW thanks for your awesome work!

@rudawem this is a change which I was aware of, but in a default Ubuntu 20.04 install the /sbin directory is aliased to /usr/sbin:
ls -la /sbin
lrwxrwxrwx 1 root root 8 Apr 21 20:18 /sbin -> usr/sbin

So it was not problematic.
I'll address this, but may I ask who is your hosting provider? They must be using a custom image.

Fixed, thanks a lot for the report.
For anyone wondering: the issue reported by @rudawem is different from the one in the OP.

I have this same issue, log attached.

systemctl status openvpn-iptables.service

openvpn-iptables.service
Loaded: loaded (/etc/systemd/system/openvpn-iptables.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-10-25 19:07:56 EDT; 3min 10s ago
Process: 4332 ExecStart=/sbin/iptables -t nat -A POSTROUTING -s <IP_ADDRESS>/24 ! -d <IP_ADDRESS>/24 -j SNAT --to <IP_ADDRESS> (code=exited, status=2)
Main PID: 4332 (code=exited, status=2)

Oct 25 19:07:56 OSMC systemd[1]: Starting openvpn-iptables.service...
Oct 25 19:07:56 OSMC iptables[4332]: iptables v1.8.2 (nf_tables): unknown option "--to"
Oct 25 19:07:56 OSMC iptables[4332]: Try `iptables -h' or 'iptables --help' for more information.
Oct 25 19:07:56 OSMC systemd[1]: openvpn-iptables.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 25 19:07:56 OSMC systemd[1]: openvpn-iptables.service: Failed with result 'exit-code'.
Oct 25 19:07:56 OSMC systemd[1]: Failed to start openvpn-iptables.service.

Change OS to ubuntu 18.


v:true ==# 1, but not for dictionary comparison

Steps to reproduce
:echo v:true ==# 1

outputs 1.
:echo {'a': 1} ==# {'a': 1}

outputs 1.
:echo {'a': v:true} ==# {'a': v:true}

outputs 1.
:echo {'a': 1} ==# {'a': v:true}

outputs 0.
Expected behaviour
My expectation was that the last example would output 1 since that was the case for :echo v:true ==# 1, the first example above.
Operating system
Kubuntu 21.10
Version of Vim
8.2. Included patches: 1-2434, 3402-3403, 3409, 3428, 3487, 3564, 3581-3582
Logs and stack traces
No response

Yeah, this may be a bit illogical, but that's the way it works.  In the first example the right hand side is a number, thus the comparison is done on numbers, and v:true is converted to the number one, thus it's a match.
When comparing dictionaries, there is no conversion, the values must be equal.
I don't think we should change this, it's likely to cause more trouble than it solves.
In Vim9 script the first example will give an error: "Cannot compare bool with number".
Thus then it's more consistent.

My expectation was that the last example would output 1 since that was the case for :echo v:true ==# 1, the first example above.

FWIW, I would argue that the issue is in the first command which should output 0 (or give an error).  But changing this now would probably break many existing scripts, so it's too late.
However, if you prefix your comparison command with the :vim9 modifier, you get more reliable results:
:vim9 echo true == 1
E1072: Cannot compare bool with number

:vim9 echo {a: 1} == {a: 1}
true

:vim9 echo {a: true} == {a: true}
true

:vim9 echo {a: 1} == {a: true}
false

Notice that:

an error is given when comparing v:true and 1 because the types of the operands do not match (boolean vs number)
a real boolean is given when the comparison is allowed (which is less ambiguous than a boolean number)
there is no need to append # to the == comparison operator (the 'ignorecase' option is not used for comparators that use strings)
there is no need to prepend v: in front of true/false
there is no need to quote the keys in a dictionary (as long as they only use alphanumeric characters, minus characters, and underscores)


spawnProcess does not find .bat files

johnnymarler (@marler8997) reported this on 2020-02-09T03:33:42Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=20571
CC List

torhu

Description
When you execute a program "foo" with spawnProcess, it will find "foo.exe" if it is a file in the PATH environment variable.  However, it will not find programs with the ".bat" extension.

When searching for a program in PATH on windows, all files with an extension from the PATHEXT environment variable should be checked, i.e.

 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

I've created a small program to demonstrate/reproduce this issue:

import std.file, std.process, std.stdio;

void main(string[] args)
{
    if (args.length == 1)
        runTest();
    else
        writeln("running from an exe!");
}
void runTest()
{
    const runDir = "C:\\temp\\testworkdir";
    const pathDir = "C:\\temp\\testpathdir";
    if (!exists(runDir)) mkdir(runDir);
    if (!exists(pathDir)) mkdir(pathDir);
    chdir(runDir);

    const thisExe = thisExePath();
    writefln("thisExePath is '%s'", thisExe);
    const tempExe = pathDir ~ "\\anexeprogram.exe";
    std.file.copy(thisExe, tempExe);

    environment["PATH"] = environment["PATH"] ~ ";" ~ pathDir;
    writefln("Added '%s' to path", pathDir);
    run(["anexeprogram", "recursive"]); // works

    const tempBat = pathDir ~ "\\abatprogram.bat";
    {
        auto batFile = File(tempBat, "w");
        batFile.writeln("@echo running from a bat file");
    }
    run(["abatprogram.bat"]); // works
    run(["abatprogram"]); // FAILS
    writefln("Success!");
}

void run(string[] args)
{
    writefln("Running %s", args);
    auto p = spawnProcess(args);
    assert(0 == wait(p));
}

torhu commented on 2022-10-31T03:20:59Z
Nevermind, I see what you mean now. spawnProcess will run batch files, but it won't find them unless the .bat extension is included.

torhu commented on 2022-10-31T01:45:21Z
Since batch files are not executables, but interpreted by cmd.exe, you need to use spawnShell instead.

Or are you suggesting that files with extensions in PATHEXT should be treated in a similar way to Linux shell scripts with shebang lines in them? It's a bit messy to implement that. The Windows ShellExecuteW function will run non-executables, but it doesn't allow you to set environment variables. So it's not a generic replacement for CreateProcessW.


Make all colors generic over f32 and f64

Closes #13
Notes:

T::from( constant ).unwrap() etc was used in a number of places to convert constants to num::Float trait ( via the num::Numcast trait).

make_color and make_hues macros has issues due to enum names clashing with the imported colors which need a parameter. So a separate file with the macro was created ( hues_macros_gen.rs and  lib_macros_gen.rs). rustc --pretty=expanded was executed manually on these files and the result copied to lib.rs and hues.rs files

For the hues macro gen, impl<T: Float> Into<T> for $name<T>  was manually implemented for f64 and f32

For impl for RgbPixel , was manually implemented for [u8;4], [f32;4] and [f64;4]. The same was done for the tuple variants.

Oh, this is a big one. A few first impression comments:

It seems like you forgot to document to_float.
I would really, really appreciate it if you didn't realign everything to use visual indentation.
I think it's safe to just lock the num crate to 0.1.
Using a default type, like in pub struct Rgb<T: Float = f32>, may make it possible to use them without specifying what T is.

I have rustfmt set to run on every save, none of the indentation was manual.

Yeah, I suspected that rustfmt had something to do with it, and it's a great tool, but automatically restyling every project you contribute to isn't as great. Note that this isn't about liking or disliking visual indentation. It's pretty and all, and I would probably use it with rustfmt if it wasn't for the downsides:

It has the tendency to result in a lot of rightwards drift. I have seen code becoming ridiculously squeezed along the character limit because of long function names.
It's noise in git diffs. Reindenting stuff because of a name change will have an unnecessarily large impact and may cause merge conflicts. Just because it's pretty.
It's tedious and unpractical unless it's automated.

I did use visual indentation once upon a time, but I have since moved on to simply indent one tab (four spaces) for each "level".

Also, regarding rustfmt in general; I prefer not to depend on it, since it's not really ready yet. There are still too many cases where it may mangle the code too much.

The major fomatting issues are in the examples. Let me see if I can revert those and squash all the commits. Might be easier to read.

Take your time. As I said, it's not personal or anything else. Just a style and conventions thing. I should probably add a section to CONTRIBUTING.md about it...

I have now made a first read-through and commented on some things (but not on every occurrence). It's otherwise very good and will be great with some polish.

Closing in favour of #18


Add actual game buttons for several things

List:
Differential reload
0-9 function keys (numpad 0-9 atm for tabs)
restart gameplay
Is there anything I'm forgetting?

done
would interfere with people who use numpad binds and dealing with that hassle just isn't worth it


[asyncStart] TypeError: 'NoneType' object is not callable

Both the .finetune(...) methods of gpt and chat_gpt classes return None.
But these methods are called by
https://github.com/anarchy-ai/LLM-VM/blob/b2e0cdad6a3d01c8812d31266bb84c9111fb1784/src/llm_vm/completion/optimize.py#L39-L45
using line
https://github.com/anarchy-ai/LLM-VM/blob/b2e0cdad6a3d01c8812d31266bb84c9111fb1784/src/llm_vm/completion/optimize.py#L276
Note, that asyncStart cannot handle foo=None. Which raises an exception:
Exception in thread Thread-3 (new_thread):
Traceback (most recent call last):
  File "/usr/local/python/3.10.8/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/python/3.10.8/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/workspaces/LLM-VM/src/llm_vm/completion/optimize.py", line 42, in new_thread
    t[0] = foo()
TypeError: 'NoneType' object is not callable

To fix this we can either make changes to asyncStart so that it handles NoneType or make sure that all .finetune(...) methods return a function using ABC.

Assign me this.

I have submitted a pr for this. please review my code https://github.com/anarchy-ai/LLM-VM/pull/203

closed by #203


Alternate base urls no longer working

When using an alternate baseurl (see example below), the filebrowser login page prompt no longer appears, with the loading animation just continuing forever. Looking at the page source, I can see that filebrowser is looking to load its javascript and css from the root base url "/static/...." instead of from the alternate base url "/admin/static/...".
Example caddyfile:
:80 {
    root /site
    filemanager  /admin  /files
}

@cmulk, thanks for reporting! This is already fixed, but it won't be pushed to this repo until the next release. See filebrowser/filebrowser#522.
Meanwhile, you can build the frontend from sources and update assets/rice-box.go in this repo as explained in filebrowser/filebrowser#520.


How to export data into .xlsx file using js-xlsx

I use AngularJs for my front end implementation and i dont use node.js.Since i import xlsx.core.min.js into my HTML page and i tried to export data inside my AngularJs controller function.But it throws Workbook is not defined. I am new to this API. Please let me know how can i use this API in my front end application to write data into .xlsx file format. Appreciate any sample code snippets.Thanks.
HTML code snippet
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.2/xlsx.core.min.js"></script>

...

<button ng-click="ExportData()">Export<button>

AngularJs Controller
$scope.ExportData= function(){
var workbook=new Workbook();// throws not defined
$scope.dataArrayForExportCsv=[ {userName:data.userName, age:data.age} ];
workbook = sheet_from_array_of_arrays($scope.dataArrayForExportCsv);
XLSX.writeFile(workbook, 'sample.xlsx');
}

I found a way to do this http://sheetjs.com/demos/writexlsx.html


feat: private endpoint workflow

Applicable spec: N/A
Overview
Pass in secrets related to private endpoints to pre-run script.
Rationale
To setup private endpoint related services.
Workflow Changes
Pre-run script now takes in private-endpoint related secrets.
Checklist

[x] The contributing guide was applied
[x] The PR is tagged with appropriate label (urgent, trivial, complex)

The test is failing due to: https://github.com/canonical/rockcraft/issues/621

Merging with failing test since this is an issue with building rockcraft from source


Fix a bug in comment deletion for Binja

Fixes #355

Blocked by https://github.com/binsync/libbs/pull/41


Cleaning up some allow_DeprecationWarning

Some of the allow_DeprecationWarning are old and not necessary (eg 1, 2). This PR just do some clean up
(probably it could include more in a followup)

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
17 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.01%) to 86.429%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/lex.rs
5
91.92%

crates/qasm2/src/parse.rs
12
96.2%

Totals

Change from base Build<PHONE_NUMBER>:
-0.01%

Covered Lines:
66272

Relevant Lines:
76678

💛  - Coveralls


s_ prefix not used in "Introduction to classes"

[Enter feedback here]
s_accountNumberSeed variable is named accountNumberSeed in the previous tutorial, misleading the person following the code. Also might be nice to have the coding convention specified in either of the two tutorials.

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

ID: ece1648c-e8a7-153d-a22b-350a619aa26d
Version Independent ID: a0c9221a-cc55-4c31-4f54-0e5fbdcbce25
Content: Object-Oriented Programming (C#)
Content Source: docs/csharp/fundamentals/tutorials/oop.md
Product: dotnet-csharp
Technology: csharp-fundamentals
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

That's a great suggestion @ilserd
I've added this to our backlog to address in our next round of updates on this article.


Writing bind files with ipaddress

Hello,
i used ipaddress to write name server configuration. And there is the reverse function very handy but
to write a complete file you need to write a SOA record which contains a shorter string than fqdn. So
i added the function to generate these special strings for ipv4 and ipv6.
On that way a added function to ipv6 which allows the same like supernet/subnet in ipv4.
cheers
meno

@mabels: this is out of scope for ipaddress and really deserves its own gem.  No reason you couldn't use ipaddress as a dependency.  Closing without reviewing or committing.

@francisluong this was opened in 2014.
I totally agree with your todays decision. I forked ipaddress around that time, and my branch is now running a:
cpp
javascript
rust
implementation with the same api. Thx for the api, but i will continue my own branch.
Please don't feel offened!
thx
meno

:+1:

during my work to port the stuff i changed the object structure so that there is no ipv4 or ipv6 specific object. Due to this i abstracted the most of the functions to now one implementation in the ipaddress class.
Currently i did not backported that changes to ruby but if you are interessed?
I would do the backport in my branch, if you take in account to merge this back to your version 2-:)


Create ci.yml for testing with GitHub actions

Apparently Travis is no longer free for OSS.
From this thread, it sounds like the julia folks are switching to use GitHub Actions for this instead! :)
I've given that a shot here.
Copied from https://github.com/JuliaLang/Example.jl/blob/master/.github/workflows/ci.yml

Hmm, looks like the tests failed because it doesn't like our Manifest.toml file... i'm just going to delete that and add package compat bounds instead, since that's the more modern thing to do.

Okay, i think this is working. The tests are failing because our tests are just plain broken, but let's just merge this, then merge master into #11, and fix the tests there! :)

Sounds good


Fix: Simple GUI exe event handler

I could agree to the PR if it wouldn't introduce a typo and mess up the package definition.

Can you please update this PR? We can then merge it.


Fix migration gcp dccm

Hello @ricardosdias! Thanks for opening this PR.

In the file dbaas/logical/migrations/0035_auto__del_field_database_log_type.py:

Line 15:5: E303 too many blank lines (2)
Line 22:5: E303 too many blank lines (2)
Line 25:101: E501 line too long (115 > 100 characters)
Line 27:101: E501 line too long (131 > 100 characters)
Line 28:101: E501 line too long (130 > 100 characters)
Line 29:101: E501 line too long (130 > 100 characters)
Line 30:101: E501 line too long (126 > 100 characters)
Line 33:101: E501 line too long (110 > 100 characters)
Line 37:101: E501 line too long (101 > 100 characters)
Line 38:101: E501 line too long (115 > 100 characters)
Line 39:101: E501 line too long (116 > 100 characters)
Line 42:101: E501 line too long (102 > 100 characters)
Line 43:101: E501 line too long (190 > 100 characters)
Line 44:101: E501 line too long (101 > 100 characters)
Line 45:101: E501 line too long (119 > 100 characters)
Line 46:101: E501 line too long (111 > 100 characters)
Line 47:101: E501 line too long (129 > 100 characters)
Line 52:101: E501 line too long (102 > 100 characters)
Line 53:101: E501 line too long (158 > 100 characters)
Line 56:101: E501 line too long (187 > 100 characters)
Line 58:101: E501 line too long (123 > 100 characters)
Line 64:101: E501 line too long (111 > 100 characters)
Line 65:101: E501 line too long (103 > 100 characters)
Line 66:101: E501 line too long (107 > 100 characters)
Line 67:101: E501 line too long (180 > 100 characters)
Line 72:101: E501 line too long (110 > 100 characters)
Line 73:101: E501 line too long (106 > 100 characters)
Line 75:101: E501 line too long (195 > 100 characters)
Line 76:101: E501 line too long (105 > 100 characters)
Line 79:101: E501 line too long (161 > 100 characters)
Line 86:101: E501 line too long (136 > 100 characters)
Line 87:101: E501 line too long (115 > 100 characters)
Line 88:101: E501 line too long (145 > 100 characters)
Line 92:101: E501 line too long (113 > 100 characters)
Line 93:101: E501 line too long (111 > 100 characters)
Line 97:101: E501 line too long (125 > 100 characters)
Line 98:101: E501 line too long (125 > 100 characters)
Line 99:101: E501 line too long (115 > 100 characters)
Line 100:101: E501 line too long (185 > 100 characters)
Line 101:101: E501 line too long (104 > 100 characters)
Line 103:101: E501 line too long (181 > 100 characters)
Line 107:101: E501 line too long (105 > 100 characters)
Line 108:101: E501 line too long (205 > 100 characters)
Line 109:101: E501 line too long (106 > 100 characters)
Line 110:101: E501 line too long (187 > 100 characters)
Line 112:101: E501 line too long (107 > 100 characters)
Line 113:101: E501 line too long (168 > 100 characters)
Line 114:101: E501 line too long (111 > 100 characters)
Line 122:101: E501 line too long (115 > 100 characters)
Line 123:101: E501 line too long (104 > 100 characters)
Line 136:101: E501 line too long (115 > 100 characters)
Line 137:101: E501 line too long (156 > 100 characters)
Line 139:101: E501 line too long (142 > 100 characters)
Line 140:101: E501 line too long (110 > 100 characters)
Line 144:101: E501 line too long (115 > 100 characters)
Line 145:101: E501 line too long (104 > 100 characters)
Line 148:101: E501 line too long (103 > 100 characters)
Line 150:101: E501 line too long (110 > 100 characters)
Line 154:101: E501 line too long (102 > 100 characters)
Line 156:101: E501 line too long (115 > 100 characters)
Line 157:101: E501 line too long (147 > 100 characters)
Line 158:101: E501 line too long (101 > 100 characters)
Line 160:101: E501 line too long (105 > 100 characters)
Line 162:101: E501 line too long (126 > 100 characters)
Line 163:101: E501 line too long (105 > 100 characters)
Line 164:101: E501 line too long (107 > 100 characters)
Line 165:101: E501 line too long (121 > 100 characters)
Line 166:101: E501 line too long (123 > 100 characters)
Line 167:101: E501 line too long (137 > 100 characters)
Line 168:101: E501 line too long (111 > 100 characters)
Line 169:101: E501 line too long (137 > 100 characters)
Line 173:101: E501 line too long (115 > 100 characters)
Line 176:101: E501 line too long (110 > 100 characters)
Line 182:101: E501 line too long (115 > 100 characters)
Line 183:101: E501 line too long (126 > 100 characters)
Line 184:101: E501 line too long (205 > 100 characters)
Line 185:101: E501 line too long (217 > 100 characters)
Line 186:101: E501 line too long (122 > 100 characters)
Line 187:101: E501 line too long (126 > 100 characters)
Line 188:101: E501 line too long (176 > 100 characters)
Line 189:101: E501 line too long (203 > 100 characters)
Line 190:101: E501 line too long (186 > 100 characters)
Line 192:101: E501 line too long (111 > 100 characters)
Line 196:101: E501 line too long (103 > 100 characters)
Line 197:101: E501 line too long (124 > 100 characters)
Line 198:101: E501 line too long (123 > 100 characters)
Line 199:101: E501 line too long (106 > 100 characters)
Line 200:101: E501 line too long (103 > 100 characters)
Line 201:101: E501 line too long (172 > 100 characters)
Line 202:101: E501 line too long (165 > 100 characters)
Line 203:101: E501 line too long (129 > 100 characters)
Line 205:101: E501 line too long (123 > 100 characters)
Line 206:101: E501 line too long (111 > 100 characters)
Line 207:101: E501 line too long (101 > 100 characters)
Line 211:101: E501 line too long (115 > 100 characters)
Line 212:101: E501 line too long (184 > 100 characters)
Line 214:101: E501 line too long (103 > 100 characters)
Line 216:101: E501 line too long (110 > 100 characters)
Line 220:101: E501 line too long (115 > 100 characters)
Line 221:101: E501 line too long (189 > 100 characters)
Line 225:101: E501 line too long (103 > 100 characters)
Line 226:101: E501 line too long (103 > 100 characters)
Line 227:101: E501 line too long (110 > 100 characters)
Line 230:101: E501 line too long (150 > 100 characters)
Line 231:101: E501 line too long (115 > 100 characters)
Line 232:101: E501 line too long (178 > 100 characters)
Line 233:101: E501 line too long (227 > 100 characters)
Line 237:101: E501 line too long (117 > 100 characters)
Line 238:101: E501 line too long (117 > 100 characters)
Line 239:101: E501 line too long (118 > 100 characters)
Line 240:101: E501 line too long (153 > 100 characters)
Line 241:101: E501 line too long (127 > 100 characters)
Line 242:101: E501 line too long (111 > 100 characters)
Line 243:101: E501 line too long (109 > 100 characters)
Line 245:101: E501 line too long (153 > 100 characters)
Line 249:101: E501 line too long (115 > 100 characters)
Line 250:101: E501 line too long (137 > 100 characters)
Line 253:101: E501 line too long (142 > 100 characters)
Line 254:101: E501 line too long (146 > 100 characters)
Line 256:101: E501 line too long (115 > 100 characters)
Line 257:101: E501 line too long (110 > 100 characters)
Line 261:101: E501 line too long (115 > 100 characters)
Line 264:101: E501 line too long (103 > 100 characters)
Line 265:101: E501 line too long (110 > 100 characters)
Line 269:101: E501 line too long (177 > 100 characters)
Line 270:101: E501 line too long (115 > 100 characters)
Line 273:101: E501 line too long (153 > 100 characters)
Line 274:101: E501 line too long (192 > 100 characters)
Line 276:101: E501 line too long (103 > 100 characters)
Line 280:101: E501 line too long (110 > 100 characters)
Line 285:101: E501 line too long (115 > 100 characters)
Line 286:101: E501 line too long (180 > 100 characters)
Line 290:101: E501 line too long (110 > 100 characters)
Line 293:101: E501 line too long (147 > 100 characters)
Line 294:101: E501 line too long (146 > 100 characters)
Line 295:101: E501 line too long (115 > 100 characters)
Line 296:101: E501 line too long (127 > 100 characters)
Line 297:101: E501 line too long (125 > 100 characters)
Line 299:101: E501 line too long (181 > 100 characters)
Line 302:101: E501 line too long (113 > 100 characters)
Line 303:101: E501 line too long (110 > 100 characters)
Line 307:101: E501 line too long (115 > 100 characters)
Line 308:101: E501 line too long (104 > 100 characters)
Line 309:101: E501 line too long (213 > 100 characters)
Line 310:101: E501 line too long (208 > 100 characters)
Line 311:101: E501 line too long (136 > 100 characters)
Line 312:101: E501 line too long (224 > 100 characters)
Line 313:101: E501 line too long (176 > 100 characters)
Line 319:101: E501 line too long (239 > 100 characters)
Line 320:101: E501 line too long (178 > 100 characters)
Line 321:101: E501 line too long (103 > 100 characters)
Line 322:101: E501 line too long (239 > 100 characters)
Line 324:101: E501 line too long (194 > 100 characters)
Line 325:101: E501 line too long (191 > 100 characters)
Line 326:101: E501 line too long (111 > 100 characters)
Line 327:101: E501 line too long (190 > 100 characters)
Line 334:101: E501 line too long (115 > 100 characters)
Line 337:101: E501 line too long (146 > 100 characters)
Line 339:101: E501 line too long (103 > 100 characters)
Line 340:101: E501 line too long (109 > 100 characters)
Line 344:101: E501 line too long (161 > 100 characters)
Line 345:101: E501 line too long (111 > 100 characters)
Line 350:101: E501 line too long (103 > 100 characters)
Line 352:101: E501 line too long (101 > 100 characters)
Line 359:101: E501 line too long (115 > 100 characters)
Line 360:101: E501 line too long (121 > 100 characters)
Line 361:101: E501 line too long (182 > 100 characters)
Line 362:101: E501 line too long (109 > 100 characters)
Line 365:101: E501 line too long (205 > 100 characters)
Line 366:101: E501 line too long (186 > 100 characters)
Line 367:101: E501 line too long (110 > 100 characters)
Line 372:101: E501 line too long (127 > 100 characters)
Line 373:101: E501 line too long (115 > 100 characters)
Line 376:101: E501 line too long (130 > 100 characters)
Line 379:101: E501 line too long (131 > 100 characters)
Line 380:101: E501 line too long (110 > 100 characters)
Line 384:32: W292 no newline at end of file

Do see the Hitchhiker's guide to code style

Codecov Report

Merging #742 (3d9c411) into master (0ce0d0f) will decrease coverage by 0.00%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master     #742      +/-   ##
==========================================
- Coverage   41.39%   41.38%   -0.01%
==========================================
  Files         341      341
  Lines       25348    25349       +1
==========================================
- Hits        10492    10490       -2
- Misses      14856    14859       +3

Flag
Coverage Δ

unittests
41.38% <16.66%> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

dbaas/workflow/steps/util/database.py
34.24% <ø> (+0.15%)
:arrow_up:

dbaas/workflow/steps/util/host_provider.py
56.05% <0.00%> (-0.20%)
:arrow_down:

dbaas/physical/models.py
74.16% <20.00%> (-0.32%)
:arrow_down:

dbaas/logical/models.py
53.23% <25.00%> (-0.17%)
:arrow_down:

Continue to review full report at Codecov.

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


Mapping imported VM

I have built a module to reuse common VMs in different apps. How can I map those VM in the router? I tried to use the imported type in moduleId, but it seems to accept only strings.
I tried this:
import {MyViewModel} from "my-module";

// ...
    public configureRouter(conf) {
        conf.map({
            route: "my-vm",
            moduleId: MyViewModel
        });
    }
}

but I get  TypeError: name.trim is not a function.

You don't provide a type there, you provide a module id. Using that, it can load the view model from anywhere.

Thank you Rob, I understand now. So I can use moduleId: "my-module", but which VM is used if "my-module" exports more than one type?

That is indeterminate at present because the system is built to work with one export per module. So, code like that should not be pre-bundled and should be distributed as a collection of independent modules. In the future we may open up more possibilities, but that's the way it is today.

Okay, I'll work that out and try to keep the module split where necessary to adhere to this convention.


Add kill commands and export xterm when sshing

We now export the TERM env var before calling bash in the ssh command so commands in the container like vtysh (in quagga) or the less command work as expected. Also added a kill command so turning down a container is faster than when trying to gracefully stop them.

@xavileon LGTM.
I would separate the patch for kill and xterm change. A patch per logical change makes it easier for review, revert, bisect, etc. But, this time, the changes are small, so don't need to revise.
BTW, I forgot to share my work for kill because of heavy load for other tasks:
https://github.com/midonet/midonet-sandbox/compare/master...tomoe:kill
That is a bit more DRY, but this patch looks good to me as this part shouldn't change much.

Actually, these are two different commits (on a single PR though).
I really prefer your patch for killing containers. Mine was just a quick hack with zero-thought about it. We can check back next week.

ah, you're right. I was just looking at the PR summary.

I really prefer your patch for killing containers. Mine was just a quick hack with zero-thought about it. We can check back next week.

Ok, I'll send a pull req :-) Thanks for looking into it.

Code reviews are done through gerrithub.


feat(compute): add compute reservation create with existing  instance template

Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist

[x] I have followed Sample Format Guide
[ ] pom.xml parent set to latest shared-configuration
[ ] Appropriate changes to README are included in PR
[ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
[ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
[x] Tests pass:   mvn clean verify required
[x] Lint  passes: mvn -P lint checkstyle:check required
[ ] Static Analysis:  mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
[ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
[ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
[ ] Please merge this PR for me once it is approved

@TetyanaYahodska please resolve issue with failing tests before submitting this PR for review.


Request for License

Hi,
Can you please include a license for your code given at the link below:
http://bl.ocks.org/brattonc/5e5ce9beee483220e2f6

The author of that code is Curtis Bratton, @brattonc, and according to the README it is released under the BSD 2-clause license.


Add claims process

Initial fairdrop coins need to go through claim process of participating in the network

closed by #72


Add doc with reorderPlaylist method

Codecov Report

Merging #223 (a470bf4) into master (cb37c26) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #223   +/-   ##
=======================================
  Coverage   86.92%   86.92%
=======================================
  Files          18       18
  Lines         306      306
  Branches       35       35
=======================================
  Hits          266      266
  Misses         40       40

Continue to review full report at Codecov.

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


Added bootstrap script for Ubuntu 16.04 LTS and later

cc @v1k0d3n

+1 LGTM

@ant31 @mattymo i'd like to add this and the coreos bootsrap together, rather than have one-off's. i have the changes waiting to submit, but have been working on the vagrantfile changes as well. can we hold off? i can get the changes in tonight (it's holiday in the US today).

check #472 and compare. there are parts of this bootstrap method i like better, and there are parts of the change i submitted i like a little better.
i address the separate step for coreos, and combined that into a bootstrap-os role, which could then break out into different os bootstrap options (ubuntu xenial+ is one of those). i do like the fact checking and fail option in this change though, but would like @ant31, @Smana or @mattymo to look over and determine which parts of each they would like to keep. eventually, having bootstrapping just "work out of the box" without additional declarations in group_vars is probably the best option...

Merged in #473


Heapster should be able to write custom metrics from a kube cluster running outside GCP

The current gcm sink only works with GCP metadata endpoint.
When running heapster in kube cluster, it would be nice that heapster can:

Detect if the environment is outside GCP
If a credential is provided for Stackdriver/GCM, it can write metrics to GCM after authenticated with GCP private key authentication

note: created an issue referring to the feature request in #1175

This would be super nice. I've been able to get the Stackdriver monitoring agent running in Kubernetes 1.7.2 on AWS with a service account json private key mounted in /etc/google/auth/. It would be great if we could follow a similar pattern with heapster.

FYI looks like https://github.com/kubernetes/heapster/pull/1657 got merged.

I've confirmed that the above patch works by building master privately.


Fix jitter when quickly swiping back and forth between pages (iOS)

The problem: After a swipe is complete and the offset is being set in the state, if you keep swiping you can potentially have the ScrollView's internal offset be different than the one you are setting in state. If this is the case, then when the render happens and the offset is passed in as a prop to ScrollView, then it resets the offset to the one specified. The result is that you can be mid-swipe and the pages will jump back partially to the old offset causing some nasty jitter.
The fix: I added this.internals to store calculated values that are used a lot and are passed back to callbacks, but do not directly effect the render (isScrolling and offset). Offset does effect rendering but should only effect it when the size changes or if total pages changes. So offset is stored in this.internals most of the time and it's occasionally saved to the state to force the ScrollView to update. You will notice the callbacks that were getting this.state passed to them now get this.fullState() which includes state and internals.

very nice. Some issues mentioned the problem before.

Hi @nemophrost
I found a problem in this PR. Breaking the consistent scroll animate direction in loop mode.
Reproduce:
loop=true
if press the right button, run a loop: 1->2->3->1
but now we see the wrong animation when 3->1.
Please check again and help me fix it.

@leecade oh yeah, that makes sense. I'll fix that with a new PR

@nemophrost great 👍

#260 fixes it

Nice. I think this fixes issue I've been using a workaround for in https://github.com/leecade/react-native-swiper/issues/172?

每次循环结束后会闪屏一下