#781 - accounts linking

What does this pull request aim to achieve? 💯
Please be concise and link any related issue(s):
to solve #781 account linking

[x] I have checked that no one else is working on similar changes.
[x] I have read the latest README and understand the development workflow.
[x] The name of this branch is: feature/<branch_name>, or hotfix/<branch_name> if this is a hotfix, where <branch_name> briefly describes the issue(s) resolved and is prefixed with the issue number(s) (e.g. 1127-1130-update-git-branching-model). The branch is created in a cloned version of this repo, not a forked repo.
[x] This branch is rebased/merged with the latest staging (or the latest production if it is a hotfix).
[x] There are no merge conflicts.
[x] There are no console warnings and errors.
[x] On the right hand side of this PR, I have linked the appropriate issue(s) under "Issues" and added a project progress under "Projects".
[x] The title describes the issue(s) being addressed using format: <issue_numbers> - <brief_issue_description> (e.g. #1127/#1130 - Update Git Branching Model)

the review build URL: https://feature781-linkaccounts.fightpandemics.xyz/

@Zaydme et al, let's wait for some folks from the QA to test it out before we merge into staging...

Yes @rabbi08 once your accounts are linked together, you'll not be able to link them again, next time you sign up with social account, it will log you in directly, that's why you don't see the message again, I will need your steps to reproduce the error you saw

Yes @rabbi08 once your accounts are linked together, you'll not be able to link them again, next time you sign up with social account, it will log you in directly, that's why you don't see the message again, I will need your steps to reproduce the error you saw

Agree, @ddveloper that's what the test is, but as I mentioned, looks like that now I am not able to login using my email. This account was registered as Google user and I tried it on linkedin for testing purpose and now no login work on my email.
Thanks

@ddveloper
Below is the summary of the issues observed during the above mentioned flow:

After user clicks on ‘Ok’ on the user account linking pop up, the user should be logged in and should land on FP home page, like normal logins.
Issue: Currently after clicking ‘Ok’ in the account linking pop up, user is navigated to Sign In screen again.

When user try to login using Email/pwd login mode and enter random pwd : valid error message should be displayed ONLY if we matching email in the DB.
i.e. if user have already created profile with Google/linkedin/Facebook -> Then try to login using email/pwd -> enter random password
Then system should know that this is NOT new user and they do NOT have pwd so the error message should be to guide them to ‘Join Now’.
‘Login failed, reason: Create password using ‘Join Now’

‘Edit Security’ option is not displayed for the user anymore.

Below are the test scenarios executed in the Sequence mentioned with '->':

Linkedin -> Enter ‘email/pwd’ -> create profile page -> enter required details -> click ‘Create profile’  -> profile created successfully

Now sign out -> click Sign In -> Google -> Create profile page with pop up ‘your accounts with same email were linked together, please log in with any of them’

Click ‘OK’ in the pop up

User lands on ‘Sign In’ Page -> FAIL, user should be logged in with the same email

So, user again navigate to FP home page -> click on ‘Sign In’ -> google -> and they are signed in now as Google user

Now sign Out

Sign In -> Email address ‘same as used above’ -> enter RANDOM pwd

Error displayed:
Login failed, reason: Wrong email or password.

So now click on Join Now -> Enter same Email address used above -> enter Pwd and Confirm pwd

Click on Join Now -> email verification email is send

Verified the email

Click ‘Sign In’ Enter email/Pwd -> Click on ‘Sign In’ -> Create Profile page with pop up ‘your accounts with same email were linked together, please log in with any of them’

Click ‘OK’ in the pop up

User lands on ‘Sign In’ Page -> FAIL, user should be logged in with the same email

So, user again navigate to FP home page -> click on ‘Sign In’ -> Enter email/Pwd -> Click on ‘Sign In’
Now user is logged in.

@rabbi08 as we discussed yesterday, code was changed to remind user for no account case and the Edit Security changes were reverted since it will not work for linked account when email/pwd is not the primary account.
for the Facebook login in incognito mode, I saw staging build has no problem and other review build has same issue, could we review this after merging into staging, if the issue is still there then create an issue for that?

@ddveloper
Verified this fix on the feature branch and accounts are getting linked if user is using same email address but different login modes: PASS
Below is the summary of the test scenarios executed:

User sign Up through Social media channel:

Sign Up using Linkedin/google/Facebook (say 'Linkedin') : PASS
Try to Sign In using Google with same email address, used to signup in step#1
After entering the required details -> user is redirected to 'create profile' page and following message is displayed.
"Your account has been linked with your existing same email account. Please login again with any of them."
Click 'Ok' -> user is directed to 'Sign In' Page : PASS

Now, user can login to FP application using 'same email address' and through different login modes.
User can try to login using direct email address and password even when the account have been created before for the same email through social media login mode.
Following error message is displayed and user is guided to signup using 'Join Now' and the account get linked with existing account of that email address : PASS

Note: So, all the accounts with same email address will be linked together with one account on FP: PASS

Following error message is displayed for new user, no account exist in FP: PASS

Note: Need to observe/restest the login scenario for Facebook after it is merge in STG. Will log a bug if the problem exist in STG as well.
LGTM. Thanks @ddveloper


Marshaling multi-case struct unions causes run-time errors

An otherwise valid and working struct union will cause run-time errors when used with functions on the System.Runtime.InteropServices.Marshal type. (Note: I didn't test ever possible function on the Marshal type).
Repro steps

Define a small struct union
type Msg =
  | One of name :string
  | Two of key :int

Instantiate and use with Marshal functions
let msg = Two 42
let size = Marshal.SizeOf(msg)  // <<< will fail
// ... alternately ...
let buffer = Marshal.AllocHGlobal(64) // HACK: just assumed a much larger size
Marshal.StructureToPtr<Msg>(msg, buffer, false) // <<< will fail

Expected behavior
Marshal.SizeOf() correctly reports size and Marshal.StructureToPtr() correctly moves bytes. In other words, the same behavior which occurs when using an explicit struct.
Actual behavior
Functions on the Marshal type raise run-time exceptions.
Known workarounds
None.
Related information
Provide any related information

Windows 10
FSharp.Core 4.1 (from Nuget)
.NET Runtime v 4.6.2
Visual Studio 2017 (with nightly release of F# Tooling: <IP_ADDRESS>31702)

FWIW, I am not seeing this behavior with struct records. They work as one would expect.

Define a small struct union

In your repro code you don't put [<Struct>] - I assume you did that in practice? thanks

Whoops! My bad.  :-(
Yes. The actual code did apply the [<Struct>] attribute. I've update the repo steps accordingly.
Sorry for any confusion.

@pblasucci The underlying reason for this is that the struct union type is not marked "sequential"
The bigger picture is that multi-case struct unions currently use a set of fields which are the union of all the different cases, plus a tag. This is obviously non-optimal in many cases, and in the future we may change this to use actual .NET IL union types that use overlapping fields, or which share fields between different cases. For this reason I don't think we want to use "Sequential" layout or encourage marshaling for struct unions at this time? Single case struct unions may be a different story though, clearly they should be sequential and marshalable.

Thanks, @dsyme. This actually makes a lot of sense. Maybe this is just a documentation issue?

@pblasucci I'm tracking work (which I'm currently doing) here: https://github.com/dotnet/docs/issues/1677
Would love to get your input on this area if you think it's worth documenting.

I'm going to close this since it's really a documentation issue and being track by @cartermp


feat(interval): add + operator

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

4 of 4 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
501

Relevant Lines:
501

💛  - Coveralls


callback handler never handle calendar

Hello!
I'm try to use calendar in my project. So, I can show calendar in bot.
But when pressing on calendar keys in Telegram then  function never handle it.  simple_cal_callback.filter() has no effects too.
My code:
@disp.callback_query_handler(dialog_cal_callback.filter())
async def process_get_check_in_date_state(query: CallbackQuery, data: dict) -> None:
    selected, date = await SimpleCalendar().process_selection(query, data)
    if selected:
        await query.message.answer(
            f'You selected {date.strftime("%d/%m/%Y")}'
        )

Upd: If I stop script and run again then function start handling. WTF?

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

never happen in aiogram3


Swift2objc class properties

Implement class properties wrapping

coverage: 90.826% (-0.07%) from 90.895%
when pulling 690c4e71a5da68cccff01f495d00fcece11604a1 on Mohammad3id:swift2objc-class-properties
into 7efefec16509ed38544a8af999b9e85694586bc7 on dart-lang:main.

I suggest we add a step in the test that attempts to compile both input & output files after generating the wrappers to catch any errors. For example in generating setters I accidentally rewrapped the newValue instead of unwrapping them. Such a mistake can be caught by the compiler since the code was trying to assign an incorrect type to a property. Wdyt?


Callback support

Is it possible to add support for passing a callback function to fire after each image is changed? I'm hiding all images using object-fit in non-supported browsers, with opacity 0 in CSS, and manually set the opacity to 1 after running the script - which I would like to do in the callback.

How do you mark which images use object-fit? Are you using a class?
You can probably already do
objectFitImages('.your-class');
$('.your-class').css('opacity', 1);

objectFitImages is synchronous so wherever you call it you can directly also set the opacity to 1

Here's a CSS-only solution:
@keyframes fadein {
    from {
        opacity: 0;
    }
}
img {
    object-fit: cover;
    font-family: 'object-fit: cover';
    animation: fadein 1s backwards paused;
}
img[src^='data:'] {
    animation-play-state: running;
}


[question]how to check not exist header field with supertest?

If I set the express.js like this:
app.set("x-powered-by", false);

How to test this?
.expect('X-Powered-By', '', done)

will throw error: Error: expected "X-Powered-By" header field
.expect('X-Powered-By', null, done)

also not works.
Thanks for your help!

The headers are available as an object in the response object of the end callback - you can make assertions there. The manner in which you do this depends on the testing suite. Here's an example for mocha with chai:
var expect = require('chai').expect;
var request = require('supertest')('http://localhost:8000');

it('should not have the x-powered-by header', function(done) {
  request
    .get('')
    .end(function(err, res) {
      if (err) {
        return done(err); // done.fail(err) if using jasmine
      }

      // Ensure header does not exist
      expect(res.headers).to.not.have.key('x-powered-by');

      // All is good
      done();
    });
});

However, it would be nice if the expect method supported this. I'll extend the expect method to support testing the non-existence of a header, and make a pull request. The syntax I am proposing is expect('header-name', false, ...).

+1
I need to test my app for X-Frame-Options being emitted and a special url that prevents it in certain 3rd party cases that want to use my app in an iframe. and the allow-from (uri) isnt supported universally.
So my tests need to look for X-Frame-Options being emitted in one case, and NOT being emitted with a special url.
expect("x-frame-options",false) should handle this situation.
@AhmedAKZM thanks for the workaround tip, ive been pulling my hair out trying to test this properly


chore: dep instead of glide

Codecov Report

Merging #51 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #51   +/-   ##
=======================================
  Coverage   42.52%   42.52%
=======================================
  Files           2        2
  Lines          87       87
=======================================
  Hits           37       37
  Misses         49       49
  Partials        1        1

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 6cf4eff...f475b4f. Read the comment docs.


Sandboxing loads and stores

This is the first JIT that I've worked on, so I don't know how one goes about same-process memory isolation without generating check-address-and-trap instructions. Obviously check-and-trap is viable, but I feel like it must be possible to jack into the OS's (and therefore, hardware's) memory protection mechanisms to get the same protections with better performance. I assume it works by calling into the operating system to set accessible memory regions before jumping into wasm code and then resetting the accessible regions afterwards or when calling into host functions, but how do you stop the wasm code from doing an i32.store onto the program counter (by using some method to guess the location of it) without also preventing it from writing to the stack?

You can implement it like as follows on 64-bit platforms.
When you compile code, let's say that you have the start of the linear memory in some register B.   You compile i32.load or i32.store as follows: you take address specified as operand and offset B by this value and then perform the access. Because the operand is 32-bit (and this is guaranteed by the validation process) you can only access addresses from B to B+4GB (*).
In run time, when you instantiate a linear memory, you allocate 4GB(*) worth of virtual memory pages. You do that unconditionally (even if only 1 page was requested you still map all 4GBs). However, you mark as readable/writeable only the part that was explictly requested by the memory definition. The rest of this 4GB (if any) is marked as non-acccessible.
When you jump to compiled code you pass the start of the memory to the register B as expected by the compiled code. When code that was compiled from i32.load/i32.store gets a pointer to out-of-bounds address it will definitely hit a region which was marked as non-readable/writeable and thus trap.
Then it is up to you to catch this trap. For POSIX like systems you should be able to install a signal handler before jumping to generated code and to save jmpbuf_t with setjmp. In case of OOB access it will be invoked synchroniously on the offender thread. You can then find appropriate jmpbuf_t and jump to it using longjmp.
See:

https://github.com/CraneStation/wasmtime/issues/15
https://github.com/CraneStation/wasmtime/pull/27

(*) there is a catch. It is actually possible to specify address for 4GB, since i32.load and i32.store have 32-bit offset immediate, so actually you can address 8GBs. But that doesn't change a lot of things.

What @pepyakin said :-). Also, wasmtime has support for allocating such memory regions, handling signals, and unwinding with longjmp, as well as other runtime and WebAssembly module support, so I think it'd make sense to start looking at integrating lightbeam with wasmtime.
A first step might be using wasmtime-environ to decode the Module as I sketched out here. Once that's in place, we might want to move lightbeam to live within the wasmtime repository. We'll probably need to make some changes to wasmtime to integrate it well, but we can do that.

I propose the following plan:

First, start using wasmtime-environ for parsing the module as sketch out here. Wasmtime-environ via wasmparser currently expect to consume the whole wasm module as a &[u8], which isn't ideal, but is fixable.

Then, we can start to teach lightbeam how to obtain the base address and length of a linear memory. Wasmtime-runtime's main way of communicating with JITs is through the VMContext struct and the other data structures in that file. A pointer to the VMContext struct is passed as an extra argument at the end in all compiled wasm functions (the vmctx argument, in Cranelift).

For reference, the pointer to the array of linear memory records is here. To make it easy to access these fields, wasmtime-environ provides functions that return the offsets to these fields. Construct a VMOffsets instance (which just needs to know the target pointer size), and then vmctx_memories tells you the offset from the vmctx pointer to the memories pointer, and then index_vmmemory_definition_base and index_vmmemory_definition_current_length provide the offsets from the memories pointer to the fields containing the base address and length of linear memory (for now, use index 0 as wasm only supports one linear memory).
Once we have the base address and the length, we can emit the code to do the bounds check if needed, and the access.
It's simplest to start by reloading the base and length for each access, and then we can make it be clever about reusing the base and length in a register later, as we'll need to be careful about caching these values across a potential heap resize.
There's admittedly a lot here, and a lot of this is new API surface area in Wasmtime, so please ask if there's anything that doesn't make sense here.


refactor: factor out some logic from virtwrap's SyncVMI

What this PR does
Before this PR:
SyncVMI had 175 lines and doing VirDomain creation, handling VirtDomainState related logic, handling disks and network attachments.
After this PR:
SyncVMI has 43 lines due to creation of 4 helper functions.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
I'm actually working on improving https://github.com/kubevirt/kubevirt/pull/11324 to help avoid issues with hook sidecars... this changes are not required for that, but helped a bit separate which the code I need to change, etc.

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

NONE

/sig code-quality
I'd be happy to see a long function become shorter.

Regarding the first commit, virtwrap: refactor: SyncVMI: rename variables   IMO it will add more confusion then solve anything. The existing naming used are all over the codebase

Yes, I was looking only to SyncVMI from the POV of introducing libvirtxml.Domain variable and then, dom domain and libvirtDomain became confusing to me. I'll drop the rename here and we can revisit it later.

and the new suggestions are not really better (i.e. they do not provide the reader a better understanding of what it is really).

Yes, the useful context is missing.
I think anyway that this might be a topic for https://github.com/kubevirt/kubevirt/issues/11259 ~ I'm all for small variable names if the context is clear enough.

/retest

Looks great!
/approve


fix test case number

before
860 tests, 1345 assertions, ...

after
861 tests, 1346 assertions, ...

Thank you for contributing!!!


front-end: Export dynamic from dart:core.

The dynamic type should be should be exported by the dart:core library under the dynamic identifier.
As a built-in identifier, it's possible to declare members named dynamic (even thought you probably shouldn't), and those will shadow the dynamic in dart:core.
See #29125.

This will be handled entirely in the common front end. Reassigning to the fe team.

Is there any updates on this? (@jakobr-google )

There is a bit of an unfortunate state right now in that as far as I can tell there's no way to write code that prefixes dart:core and references dynamic and works on both the CFE and the analyzer.
Even if the main issue (and it's accompanying analyzer issue) is lower priority, I do feel like we should arrange things so that we don't have this catch-22.  cc @kmillikin @bwilkerson
import "dart:core" as core;

void main() {
  core.dynamic a; // Analyzer error
  dynamic b;  // CFE error
}

What is the concrete work that needs to happen here, @leafpetersen @bwilkerson ?

The analyzer needs to consider dynamic a normal (built-in) identifier in all contexts, and ensure that dart:core exports this identifier as a reference to the dynamic type.
Example code:
import "dart:core" hide dynamic;
import "dart:core" as core show dynamic;

core.dynamic get x => 42;
int dynamic = 10;
main() {
  print(dynamic);  // prints 10
  print(x is core.dynamic);  // prints true.
}

This code runs correctly on the current VM and dart2js, with and without --preview-dart-2.
It gives the following errors in the analyzer:

error • Undefined class 'core.dynamic' at dyn.dart:4:1 • undefined_class
error • The name 'core.dynamic' isn't defined, so it can't be used in an 'is' expression at dyn.dart:10:14 • type_test_with_undefined_name
hint • The library 'dart:core' doesn't export a member with the hidden name 'dynamic' at dyn.dart:1:25 • undefined_hidden_name
hint • The library 'dart:core' doesn't export a member with the shown name 'dynamic' at dyn.dart:2:33 • undefined_shown_name
2 errors and 2 hints found.

This problem is in fact causing ongoing issues when rolling package:googleapis into google3 because our API generator generates prefix-imported import "dart:core" as core; and uses core.dynamic (which is perfectly valid).
We have to manually edit the code we check into google3 to make the presubmit checks pass.

This should be closed, correct (since #32227 is where there is remaining work to do)?

closing as per discussion with Kevin/Dan


INotifyPropertyChanged Capability

Looking for a way to use a data model with the TableView and then fire an event to the TableView control once data inside the model has changed. In WPF you would use a NotifyPropertyChanged event. Do you have something similar in gui?

This should be very possible.  The discussion below shows how to present a list of data model objects (in the discussion it is the Process class.  Assuming you implement it as described then you should be able to refresh the data just using SetNeedsDisplay()
https://github.com/migueldeicaza/gui.cs/issues/1285

You can also use the INotifyPropertyChanged. See the DynamicMenuBar.cs  and DynamicStatusBar.cs scenarios implementation.
The model class:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L1004
The binding class:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L1056
The converter interface:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L1052
The converter class:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L1106
The data context property;
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L73
The bindings declarations:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L501-L503
The converters declarations:
https://github.com/migueldeicaza/gui.cs/blob/8bfa2f042509138dbcd5c904fe94912f1e344949/UICatalog/Scenarios/DynamicMenuBar.cs#L499

This should be very possible. The discussion below shows how to present a list of data model objects (in the discussion it is the System.Diagnostics.Process class. Assuming you implement it as described then you should be able to refresh the data just using SetNeedsDisplay() as at render time the RepresentationGetter will be called for each cell and the data will be served up out of your class.
Discussion: #1285
If after reading the discussion you still have questions please just say so and if possible provide some more details of your data model and I can advise more.

Thank you for the feedback. I think I'm maybe set is what I do when I use WPF, so you could maybe let me know how I could achieve the same in GUI.CS.
WPF would enable me to attached a List as a source to the WPF control. This enables me to fire the INotifyPropertyChanged event if anything changed within the model which in turns updates the display.
In GUI.cs it seems the acceptable approach would be to use a DataTable which is fine but I don't see any example to exposing the INotifyPropertyChanged event with in this object type.

Ok here is a fully worked example:
Application.Init();

// create some demo customers
var customers = new List<DemoCustomer>();
customers.Add(DemoCustomer.CreateNewCustomer());
customers.Add(DemoCustomer.CreateNewCustomer());
customers.Add(DemoCustomer.CreateNewCustomer());
customers.Add(DemoCustomer.CreateNewCustomer());

Random r = new Random();

// every 2 seconds change a customers name
Application.MainLoop.AddTimeout(TimeSpan.FromSeconds(2),
	(a) =>
	{
		var idx = r.Next(4);
		customers[idx].CustomerName = "Customer" + r.Next(9);
		return true;
	}
	);

var dt = new DataTable();
var id = dt.Columns.Add("ID",typeof(int));
var name = dt.Columns.Add("CustomerName", typeof(int));
var number = dt.Columns.Add("PhoneNumber", typeof(int));

// for each customer add a row to the table
for(int i=0;i<customers.Count;i++)
{
	// BUT don't store the actual values only store the index of the
	// list that the customer appears
	dt.Rows.Add(i, i, i);
}

// create a table view and the data source of the view to the DataTable we created (that has the indexes)
var tv = new TableView(dt)
{
	Width = Dim.Fill(),
	Height = Dim.Fill(),
};

// when rendering the cell convert the index into the current value of the property
tv.Style.GetOrCreateColumnStyle(id).RepresentationGetter = (i) => customers[(int)i].ID.ToString();

// Same for customer name
tv.Style.GetOrCreateColumnStyle(name).RepresentationGetter = (i) => customers[(int)i].CustomerName;

// Same for phone number
tv.Style.GetOrCreateColumnStyle(number).RepresentationGetter = (i) => customers[(int)i].PhoneNumber;

// register PropertyChanged event to refresh table
foreach (var customer in customers)
{
	customer.PropertyChanged += (s,e)=> tv.SetNeedsDisplay();
}

var w = new Window()
{
	Width = Dim.Fill(),
	Height = Dim.Fill(),
};

w.Add(tv);

Application.Run(w);

Application.Shutdown();

It uses the DemoCustomer class from the Microsoft INotifyPropertyChanged demo.  I have copied the DemoCustomer class below for convenience.
// This is a simple customer class that
// implements the IPropertyChange interface.
public class DemoCustomer : INotifyPropertyChanged
{
    // These fields hold the values for the public properties.
    private Guid idValue = Guid.NewGuid();
    private string customerNameValue = string.Empty;
    private string phoneNumberValue = string.Empty;

    public event PropertyChangedEventHandler PropertyChanged;

    // This method is called by the Set accessor of each property.
    // The CallerMemberName attribute that is applied to the optional propertyName
    // parameter causes the property name of the caller to be substituted as an argument.
    private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    // The constructor is private to enforce the factory pattern.
    private DemoCustomer()
    {
        customerNameValue = "Customer";
        phoneNumberValue = "(312)555-0100";
    }

    // This is the public factory method.
    public static DemoCustomer CreateNewCustomer()
    {
        return new DemoCustomer();
    }

    // This property represents an ID, suitable
    // for use as a primary key in a database.
    public Guid ID
    {
        get
        {
            return this.idValue;
        }
    }

    public string CustomerName
    {
        get
        {
            return this.customerNameValue;
        }

        set
        {
            if (value != this.customerNameValue)
            {
                this.customerNameValue = value;
                NotifyPropertyChanged();
            }
        }
    }

    public string PhoneNumber
    {
        get
        {
            return this.phoneNumberValue;
        }

        set
        {
            if (value != this.phoneNumberValue)
            {
                this.phoneNumberValue = value;
                NotifyPropertyChanged();
            }
        }
    }
}

Wow, ok let me give this a try. Thank you for taking the time to put this out in the clear manner you did!

Just to confirm, how would this change if I want to fire a addition event when I add to the List?

Just to confirm, how would this change if I want to fire a addition event when I add to the List?

So given the above solution and the fact that you are only adding new rows you would just have to add a new DataRow to the DataTable with the new index:
myCollection.Add(myNewInstance);

var newMaxIdx = myCollection.Count-1;
tv.Table.Rows.Add(newMaxIdx,newMaxIdx,newMaxIdx, [...]);

tv.Update();
tv.SetNeedsDisplay();

If you are adding and taking away rows then it gets more complex:
I would first try to identify a key into your data structure e.g. Name or ID etc.  That way you will be able to persist the users selection and generally be sensible about handling updates.  I would use a concurrency safe collection e.g. ConcurrentDictionary<k,v>.
Then I would store the Key instead of the index in the DataTable.
tv.Table.Rows.Add(objectsKey,objectsKey,objectsKey,...);

That would change the RepresentationGetter (to something like below - if your key is a string):
tv.Style.GetOrCreateColumnStyle(id).RepresentationGetter = (k) => customers[(string)k].ID.ToString();

Then you can prune the DataTable as often as you want and sync it with your collection.  Make sure to call Update() and then SetNeedsDisplay() so that it knows the underlying table has changed and updates the UI.

Perfect, thank you!


Update lcobucci/jwt 3.3 -> 4.0

Hi.
What about update lcobucci/jwt 3.3 to 4.0
it is necessary for PHP 8

I'll take care of this in next release. I'll do it on the weekend.
Lets see if we can work with all wishes here - see #16

I'll take care of this in next release. I'll do it on the weekend.
Lets see if we can work with all wishes here - see #16


SMV Cloud: 404 14 times in a row

We have come to accept a certain failure rate from SMV Cloud due to coordination with Azure back end issues.
However once in a while SMV Cloud repeatedly fails the same driver with a 404.  Last week I ran two PTPs with a max rerun of 5.  That was not enough.  This weekend I did a max rerun of 20.  One driver kept failing up to the 14th rerun / 36th hour where I then ran out of patience.  This means rerun approach does not work.  The fix should either be to eliminative any code that would reuse state/tokens/guids for same driver between reruns.  Alternatively a reduction of likelihood that we hit 404s.
The failing folder is here: \redmond\osg\Threshold\Tools\CORE\SiGMa\DPlat-DQT\Share\JakobL\Public\2017-03-31-SMVCloud404times14\win8_rtm_drivers_input_mouser\
The svb.log file shows 14 times:
[FATAL ERROR] Microsoft.WindowsAzure.Storage.StorageException : The remote server returned an error : (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. [C:\slam1\WDK\win8_rtm\drivers\input\mouser\mydriver.vcxproj]

commit e72f301fedd15f0ecae3ae7c9b3215de01af9f88 fixes this issue.
new binaries provided to SDV.

Fabulous.  Thank you for quick turnaround. Is this in SLAM SD and is Azure service updated?
On Apr 4, 2017, at 20:25, rahulku <notifications<EMAIL_ADDRESS>wrote:
Closed #19https://github.com/Microsoft/Static-Module-Verifier/issues/19.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/Static-Module-Verifier/issues/19#event-1029632492, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APdgOieG6_VCXZoLcAvLCzBQB1f1Mducks5rswmQgaJpZM4Mw5kA.
Thanks,

Jakob

yes.


TokenCard has some wrong typing on properties

On the explore page:

On the create page:

The types in components/src/Token/Card.tsx:

Let's check all the different types received and fix them as needed.
From https://github.com/liteflow-labs/nft/pull/1954#discussion_r953290986

@antho1404 could you tell me how "critical" is this bug? I don't understand the impact of this

Not super critical, basically some code quality, but I'm not even sure that's still valid anymore.
Let's close and reopen when needed

The fix is super simple from what I see, basically adding | undefined to all props and replace the default value "" by undefined in the create asset form page.

This won't be prioritize so good on my side to close this issue


Automatically match the Y-axis (Y-axis)

** Don't make a duplicate issue.
You can search in issues to make sure there isn't any already opened issue with your concern.
fl_chart: ^0.55.1
Is your feature request relasted to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Automatically match the Y-axis (Y-axis). If it is shown, my data range varies greatly from 0 to 10 billion, so how should I set it to make the display of the Y-axis more beautiful?
my data set :
Widget leftTitleWidgets(double value, TitleMeta meta) {
const style = TextStyle(
color: Color(0xff75729e),
fontWeight: FontWeight.bold,
fontSize: 10,
);
String text;
// if (timeType.isNotEmpty && timeType.contains('租金收入')) {
if (isMax100) {
switch (value.toInt()) {
case 0:
text = '0';
break;
case 10:
text = '10';
break;
case 20:
text = '20';
break;
case 30:
text = '30';
break;
case 40:
text = '40';
break;
case 50:
text = '50';
break;
case 60:
text = '60';
break;
case 70:
text = '70';
break;
case 80:
text = '80';
break;
case 90:
text = '90';
break;
case 100:
text = '100';
break;
    default:
      return Container();
  }
}

Please tell me how to set the ordinate more succinctly to make my code more concise. For example, when the data range is within 100, 0,10,20,30 ，，，，, when the data range is 0-60000, 0,10000,20000, etc., the ordinate can be displayed beautifully. thank you

Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Widget leftTitleWidgets(double value, TitleMeta meta) {
const style = TextStyle(
color: Color(0xff75729e),
fontWeight: FontWeight.bold,
fontSize: 10,
);
String text;
// if (timeType.isNotEmpty && timeType.contains('租金收入')) {
if (isMax100) {
switch (value.toInt()) {
case 0:
text = '0';
break;
case 10:
text = '10';
break;
case 20:
text = '20';
break;
case 30:
text = '30';
break;
case 40:
text = '40';
break;
case 50:
text = '50';
break;
case 60:
text = '60';
break;
case 70:
text = '70';
break;
case 80:
text = '80';
break;
case 90:
text = '90';
break;
case 100:
text = '100';
break;
    default:
      return Container();
  }

set my leftTitleWidgets ,as top ;
so How to avoid the above situation and indirectly optimize the code, thank you

Hi
I couldn't understand the problem.
Please format your code (or put it in a main.dart file).
Also, decrease your image sizes, because it is like a 10 page scroll to see an image.

I want to realize the adaptive display of Y-axis labeling. According to the actual data, it can be perfectly adaptive labeling from 0 to millions, billions, thank you

Is this issue related to #434?

so, can you tell me the code for this ? thanks

Do you need the logarithmic axis?

It seems you need the logarithmic axis feature.
So we do not have this feature at the moment.
btw, you can follow the #434 thread to read some workarounds about it.

thank you


Debugger

Problem
prompt engineering is slow, and in a multi-agent system is very hard. You need to experiment with a message arbitrarily deep in the stack quickly. The current replay feature is helpful, but does not work well with docker / k8s deployments, is hard to correlate llm requests (ie, find where you are), and is only "point in time experimentation" rather than modifying the rest of the request.
Out of Scope
This is supposed to be a prompt engineering tool. Developers should use code breakpoints when building custom agent templates or tools.
Proposal
Introduce a debugger into the eidolon dev tools component. Users can set break points on agents / tools and step through them using the debugger as they are used to in their IDE. Furthermore, they can review a conversation after-the-fact as well, inspect llm requests, and experiment with executing requests with alternative parameters.
Debug Pane
debugger controls, stack, evaluation option(s), variables, save (propagate variable changes to the system)
#################################################################################
#										#
#	Stop * Resume * Step Over * Step Into * Step Out Of			#
#	-----------------------------------------------------------------	#
#	Stack				|	evaluate: > execute_llm		#
#	worker_agent.execute_llm	|	-------------------------	#
#	manager_agent.execute_tool_call	|	messages = [...]		#
#	...				|	tools = [...]			#
#					|	output_format = {...}		#
#					|	[Reset][Save]			#
#										#
#################################################################################

Technical Overview

MVP does not need to worry about horizontal scaling. it is fine to say debugger is single thread only. Pub/Sub concept needed to gracefully break this onstraint
each frame contains id, kind, stack (list of frame names & pointers), variables, and lambdas (execute_llm, execute_tool) (sorry dave)
Frames are be returned as breakpoint events streamed back from sse, this gracefully allows ability to review stack post-execution
^ Frame info will ALWAYS be returned. They will have a flag on them "active" when being streamed, or alteratively a different type of event indicating the frame is frozen
User can review conversation history to see breakpoints and execute lambdas (although they have no ability to save variable changes)
New Endpoints

crud breakpoints			GET / POST 	debugger/breakpoints
update frame variables	POST		debugger/frames/{frame_id}/variables
execute frame lambdas	POST 		dubugger/frames/{frame_id}/lambdas{lambda_name}/executions
resume execution		POST		debugger/frames/{frame_id}/state <- open to feedback
^ frames likely has a get endpoint on it as well for sanity, but this is not strictly needed
^ Executions are not saved to DB
^ Post to /executions takes parameter overrides within body

MVP
To reduce scope we can start with part 2: re-executing llm / tool requests. This allows us to introduce most of the concepts (frames, stack, variables, execution) without needing to worry about enabled/disabled breakpoints, or debugger controls (step into, over) rest api concept or handle resumed execution.

[ ] 1. backend: Introduce concepts of frames. Do not allow them to be set, but stream them to frontend when enabled
[ ] 2. (deo 1) webui: View frames in existing conversation
[ ] 3. (dep 1) backend: ability to execute lambdas
[ ] 4. (dep 2, 3) ui: capability to modify variables (no save yet) and execute lambdas
[ ] 5. (dep 3) backend: Ability to update frame variables

Questions:
When brainstorming this feature, we talked about several breakpoint locations

action is run (ie, original http request)
pre llm execution
post llm execution
pre tool call
post tool call

I think we might want to narrow it down all the way to just pre-llm execution. At the end of the day, this is a prompt engineering tool, not a debugging tool, and we need to focus accordingly.

Reference: Watch the video at https://www.braintrust.dev/blog/announcing-series-a for an example of how they score and evaluate prompts. @parmi02 @LukeLalor


Add a failure test where / is appended once it move to next middleware

If you like to try  a gist https://gist.github.com/harikt/9d5546623dfc8bcee711


Multiple user IDs registered under the same email address

It seems the platform currently allows multiple users to be registered using the same email address? I am able to create two accounts (ks709, and ks7099) using the same email address - should we disable this?

This is set up to be handled by the mongodb by setting a unique constraint. Not the app itself. The app is responsible for relaying (and possibly formatting) the error message from mongodb.
This should be set up automatically if you run the setup up script:
https://github.com/ideafast/ideafast-portal/blob/76641e49e75866b3acdfa2faf0d242ffa535a650/packages/itmat-utils/src/databaseSetup/collectionsAndIndexes.ts#L12-L19
This script has been moved to itmat-setup package in the itmat-broker repo:
https://github.com/dsi-icl/itmat-broker/blob/fdc05ea3bee50ba1e3c5da7e35ba07554005af88/packages/itmat-setup/src/databaseSetup/collectionsAndIndexes.ts#L12-L19

dup #100
I suggest adding a email check here in the line that @wsy19961129 quoted. To avoid doing bcrypt if unneeded.

I suppose since the issue is one of database configuration this won't be fixed as such at this point in time. The IDEAFAST db has now been configured with those indexes. We might want to track another issue to add feature that analyse DB structure and makes sure system operates according to plans.


if Mirrors repo no content is fetched, updated time should not be changed #3551

backport to v1.4 from https://github.com/go-gitea/gitea/pull/3551
cc @lafriks @lunny

It seems you also backport #3554 in this PR.

LGTM


add Chongqing University with domain cqu.edu.cn

@leglorious I am sorry, the domain cqu.edu.cn is blacklisted because the school allows to register an email address there even if you are not a student of the school. If you are the student of this school, please apply with official document (OFFICIAL DOCUMENT tab at https://www.jetbrains.com/shop/eform/students).


set window target for minified build

This PR doing 3 important things:

Taking in account that it's a browser-only library setting globalObject: 'window' for webpack

Repointing main from package.json to non-minified UMD version and ships minified version as bounded to window function, not as UMD module.
Motivation here: if some developer are using this library via import Choices from 'choices.js' then that developer expect are non-minified version of the library to become part of his bundle (as they may  debug something or apply different minifier later, for example Closure Compiler and existing minifying will hurt). This expectation particularly set by common sense and by the most popular Javascript library of all times.
As result, coupled with upgraded fuse.js it decreases minified bundle size.

Committed affected minified builded asset (we should get rid of them from repository, seriously :-) )

@jshjohnson Just hitting an issue with regards to this: React apps that include Choices which are server-side rendered throw an error because window is not defined on the server.
What was the issue with leaving the default global var for UMD?


Change /next from PUT to POST

Whenever I try to change execute the /next method, it gives me the 405 not allowed method. I found out it was because the method of the request was PUT and not POST. This little change was the solution locally for me :)

That's weird, according to the docs and the console it should be POST.
I have just tried it and it seems to work with POST. Could you double check?

In your code it is post, I don't know why in my node_modules it was put...

You are right, the published package still uses PUT since it doesn't contain this fix https://github.com/JMPerez/spotify-web-api-js/commit/4f3c2967ba6ffe90aded9149a24f719c8b12f200. I'm going to publish the new version.

Published with version 0.22.1!


req.file undefined

my scenario:
at first it's works but when i try to upload again it return like that.
here is the file that i'm using
test.xlsx

Check for null before uploading the file in your js. See the sample codes.


Better base object controller

It should support

[ ] Search when type and auto pop up suggestions
[ ] List view when number of objects less than a configured number.
[ ] Search box when number of objects larger than a configured number.
[ ] Should be able to configure which field / or combination of fields is used for the display in the list.

Written by @xqliu
Created at 2014-11-09T00:24:03.000+0800
Link to http://betterlife.atlassian.net/browse/BE-11

This task depends on JBS-4

Written by @xqliu
Created at 2014-11-12T00:34:43.000+0800


Dependency not found: babel-runtime/regenerator

USING
"dependencies": {
   "animejs": "^2.2.0",
   "axios": "^0.18.0",
   "cheerio": "^1.0.0-rc.2",
   "firebase": "^5.5.8",
   "nuxt": "^2.2.0",
   "require": "^2.4.20",
   "vue-pdf": "^4.0.0",
   "vuelidate": "^0.7.4",
   "vuetify": "^1.3.6"
 },
 "devDependencies": {
   "babel-eslint": "^10.0.1",
   "eslint": "^5.7.0",
   "eslint-config-standard": "^12.0.0",
   "eslint-loader": "^2.1.1",
   "eslint-plugin-html": "^4.0.6",
   "eslint-plugin-import": "^2.14.0",
   "eslint-plugin-node": "^7.0.1",
   "eslint-plugin-promise": "^4.0.1",
   "eslint-plugin-standard": "^4.0.0",
   "stylus": "^0.54.5",
   "stylus-loader": "^3.0.2"
 }

In Component.vue
<template>
  <pdf :src="'~/assets/planes/actuaria.pdf'"></pdf>
</template>

<script>
import pdf from 'vue-pdf'

export default {
  components: {
    pdf
  }
}
</script>

On Terminal
This dependency was not found:

* babel-runtime/regenerator in ./node_modules/pdfjs-dist/lib/web/ui_utils.js

To install it, you can run: npm install --save babel-runtime/regenerator

does installing babel-runtime/regenerator solve the issue ?

I have the same problem. I want to know how to solve it.

I solved it by installing babel-runtime, because I had an error installing babel-runtime/regenerator as npm does not see it as a package.
In other words, I ran npm install --save babel-runtime

npm install --save @babel/runtime

error is still exit after npm install --save babel-runtime

For anyone still looking, npm install --save @babel/runtime is the way to go.


Update README markdown in according with CommonMark

Thanks @BenFradet, scheduling into next release

Cherry-picked into https://github.com/snowplow/iglu-central/pull/535, closing


jrc_cos7-1a

skipping connected components (only one nucleus id)

proofread tif found here: /avetissiane/tiff_slices/jrc_cos7-1a/s4._amira_proofread.tif

/avetissiane/tiff_slices/jrc_cos7-1a/s4_amira_proofread.zarr

Thumbnail
/cellmap/nrs/data/jrc_cos7-1a/thumbnail.nuc.jpg
Ready for meshes

DOI created.  Waiting on
jrc_cos7-1a manual segmentations*	https://doi.org/10.25378/janelia.26512204 https://figshare.com/s/f3bdd0b2fb1c59b91485


Typo in 3.4.1?

In Section 3.4.1, the Bayes Net indicates the conditional $P(W | X, \textbf{Z}) $ whereas the table describing the posterior P(X, Y | w, z) uses conditional $P(W | X, \textbf{Y})$:
Bayes Net:

wxyz.add(W1, [X1, Z1], "1/1 1/1 1/1 1/1")
wxyz.add(X1, [Y1, Z1], "1/1 1/1 1/1 1/1")
wxyz.add(Y1, [Z1], "1/1 1/1")
wxyz.add(Z1, "1/1")

Table describing the posterior P(X, Y | w, z):

x
y
P(W=2, X=x, Y=y, Z=7)

1
1
 P(W=2\X=1, Y=1)P(X=1\Y=1, Z=7)P(Y=1\Z=7)P(Z=7)

1
2
 P(W=2\X=1, Y=2)P(X=1\Y=2, Z=7)P(Y=2\Z=7)P(Z=7)

...
...
...

10
9
 P(W=2\X=10, Y=9)P(X=10\Y=9, Z=7)P(Y=9\Z=7)P(Z=7)

10
10
 P(W=2\X=10, Y=10)P(X=10\Y=10, Z=7)P(Y=10\Z=7)P(Z=7)

$\sum_{x, y}$P(W=2, X=x, Y=y, Z=7)

And also in Exercise 1 (<IP_ADDRESS>),

Show that in the example above, if we condition on known values for $\mathcal{Z}=(X,Y)$, the
posterior $P(W,Z|X,Y)$ factors, and as a consequence we only have to
enumerate two tables of length 10, instead of a large table of
size 100.

If the Bayes Net is supposed to be $P(W | X, Y)$ then this makes sense / can factorize, but if it's supposed to be $P(W | X, Z)$, then I think the exercise should read "... $\mathcal{Z}=(X, Z)$, the posterior $P(W, Y | X, Z)$ factors..."
Perhaps I misunderstood the exercise, but I think I am correctly understanding (that conditioning on a separating set of variables disconnects the graph to allow efficient factorization) based on the "hint" in exercise 3:

Show that if we are given the states, inferring the actions is actually quite efficient, even with the brute force enumeration. Hint: this is similar to the first exercise above.

Thanks for flagging this, @gchenfc ! I edited this now - will be live soon.


Switch isodate for isodatetime

The isodate library hasn't had any commits for two years. To reduce risk it would be good to swtich it with the isodatetime library.
The isodatetime library is maintained by the metomi team (cylc, etc...), and may have (though in theory shouldn't) more consistency with the way cylc does things.

isodatetime is supported, is fairly complete and stable, though isn't that fast. It sounds pretty suitable for our use, though it would be worth checking if the Tstandard library datetime.datetime.fromisoformat is sufficient, as that has been enhanced in python 3.11.


Updated deprecated MediaStream.stop() in Audio recorder example

Replaced microphone.stop() with microphone.getTracks().forEach( t => t.stop());
MediaStream.stop() is deprecated according to https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API.

ping @muaz-khan


fatal error: jni_md.h: No such file or directory (Mac OS X)

I'm trying to build LightGBM v2.2.2 with SWIG on Mac OS X.

Environment info
$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.14.3 (18D42)
      Kernel Version: Darwin 18.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
...

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
    1.8.0_192, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home

LightGBM v2.2.2
Error message
$ cmake -DUSE_SWIG=ON -DUSE_OPENMP=OFF -DAPPLE_OUTPUT_DYLIB=ON ..
-- The C compiler identification is AppleClang <IP_ADDRESS>10046
-- The CXX compiler identification is AppleClang <IP_ADDRESS>10046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: /usr/local/bin/swig (found version "3.0.12")
-- Found Java: /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin/java (found version "1.8.0_192")
-- Found JNI: /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/libjawt.dylib
....
$ make -j4
...
[ 96%] Linking CXX shared library ../lib_lightgbm.dylib
[ 96%] Built target _lightgbm
Scanning dependencies of target _lightgbm_swig
[ 98%] Building CXX object CMakeFiles/_lightgbm_swig.dir/java/lightgbmlibJAVA_wrap.cxx.o
In file included from /Users/tekumara/code3/LightGBM/build/java/lightgbmlibJAVA_wrap.cxx:178:0:
/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/include/jni.h:45:10: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
          ^~~~~~~~~~
compilation terminated.

Looks like this was solved post v2.2.3 commit 414bb60, PR #2002


road not detected for street terms in short form (in Russia)

Hi!
I was checking out libpostal, and saw something that could be improved.

My country is
RU

Here's how I'm using libpostal

rest api

Here's what I did - case 1

query=б-р Победы, д. 10

Here's what I got - case 1

[
  {
    "label": "house",
    "value": "б-р"
  },
  {
    "label": "road",
    "value": "победы"
  },
  {
    "label": "house_number",
    "value": "д. 10"
  }
]

Here's what I was expecting - case 1

[
  {
    "label": "road",
    "value": "б-р победы"
  },
  {
    "label": "house_number",
    "value": "д. 10"
  }
]

Here's what I did - case 2

query=б-р Солнечный 2

Here's what I got - case 2

[
  {
    "label": "house",
    "value": "б-р солнечный"
  },
  {
    "label": "house_number",
    "value": "2"
  }
]

Here's what I was expecting - case 2

[
  {
    "label": "road",
    "value": "б-р солнечный"
  },
  {
    "label": "house_number",
    "value": "2"
  }
]

Here's what I did - case 3

query=Савелкинский пр-д, д. 4

Here's what I got - case 3

[
  {
    "label": "house",
    "value": "савелкинский"
  },
  {
    "label": "road",
    "value": "пр-д д."
  },
  {
    "label": "house_number",
    "value": "4"
  }
]

Here's what I was expecting - case 3

[
  {
    "label": "road",
    "value": "савелкинский пр-д"
  },
  {
    "label": "house_number",
    "value": "д. 4"
  }
]

For parsing issues, please answer "yes" or "no" to all that apply.

Does the input address exist in OpenStreetMap?

yes, but don't have the city context

Do all the toponyms exist in OSM (city, state, region names, etc.)?

yes

If the address uses a rare/uncommon format, does changing the order of the fields yield the correct result?

yes, expanding:
** б-р to бульвар
** пр-д to проезд
has helped and provided the correct results in the expected form (but only with the expanded values).

If the address does not contain city, region, etc., does adding those fields to the input improve the result?

no

If the address contains apartment/floor/sub-building information or uncommon formatting, does removing that help? Is there any minimum form of the address that gets the right parse?

no, it doesn't contain such info

Here's what I think could be improved

add б-р as an alias/synonym to бульвар
add пр-д as an alias/synonym to проезд

Could probably be solved by changing here:
https://github.com/openvenues/libpostal/blob/master/resources/dictionaries/ru/street_types.txt#L3-L4
to
бульвар|бул|б-р
bulvar|bul|b-r
Same for "пр-д".

Could probably be solved by changing here:
https://github.com/openvenues/libpostal/blob/master/resources/dictionaries/ru/street_types.txt#L3-L4
to
бульвар|бул|б-р
bulvar|bul|b-r
Same for "пр-д".


pull request for e2e test at 12/27/2016 01:45:10

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Removing suggestion to customize in the default solution

This advise goes against all recommendations for customization and extension of the platform, having this in the docs can only lead to bad things.
I might live with a section saying it is possible to customize there, with appropriate warnings and disclaimers of course.

@rappen - Sorry for the delay in getting back to you. You're absolutely right about the default solutions so we've updated the content to provide better guidance. https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/use-solutions-for-your-customizations
Closing issue.

Thanks @Mattp123 ! 👍


Improve load_balancer documentation

Looking in the it seems there is an option about load_balancer. Trying to have a 2 instances SOLR cluster i was interested but didn't succeed to make it work.
The stange thing is there is no doc about it. Can you add a small sample of such config ?

Could it be the endpoint stuff? https://github.com/nelmio/NelmioSolariumBundle#multiple-clients-and-endpoints Sorry but I haven't used that, and haven't followed latest development in Solarium.


Arguments section does not match YAML snippet

e.g. Yaml has azureSubscription: but the arguments section talks about ConnectedServiceName
The Yaml snippet is also empty, so it's not at all clear what the format required is. Is this the subscription name, the GUID, both?

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

ID: 69ff8e50-4187-3622-1beb-155f006af5f5
Version Independent ID: bc56fa96-bded-95f8-39a4-a9e5242db1bf
Content: Azure Key Vault task - Azure Pipelines
Content Source: docs/pipelines/tasks/deploy/azure-key-vault.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @RoopeshNair
Microsoft Alias: ronai

@ian-craig Thank you for the feedback, assigning this to the author for further review.
In the meantime, please refer to the Azure Key Vault task repo documentation.


Allow other processes to bind to the STUN UDP port.

This change sets the SO_REUSEADDR option for UDP connections, something already set for TCP connection; allowing outside processes to bind to the same UDP STUN port, letting other applications send UDP messages that traverse NAT.
The specific use case I'm up against is allowing a TR-069 ACS server to send messages to devices connected to the STUN server.  Part of the TR-069 standard is a UDP Connection Request message, notifying the end device to check in for pending tasks.  Without the SO_REUSEADDR option, the ACS cannot bind to the correct port and the UDP Connection Request message is never received by the end device.

Hi Spencer,
I'm trying to understand this change and the implications.
Are you saying that there's a scenario where both the STUN server listening on port 3478 needs to share that same port with the ACS-server?  Why does the ACS-server need to listen on port 3478 if there's already a STUN server?  If you have two UDP services listening on the same port on the same box, incoming packets for that port will go to one server program, but not the other.  It's not deterministic.
Or is it the case that the ACS server just needs to send from port 3478 so as to take advantage of the port mapping the device already has with its NAT?

Or is it the case that the ACS server just needs to send from port 3478 so as to take advantage of the port mapping the device already has with its NAT?

Yes, it's this. The ACS doesn't need to listen on port 3478, but it does need to originate a message from the port.  In order to transmit the message on port 3478, the socket needs to bind to that port.  The ACS opens and closes the port long enough to transmit three copies of a 170 byte message.

Got it. I'd like to take this change, but have this mode off by default.  Would you like to go all the way with this:

Add a new bool member to CStunServerConfig called "reuseaddr" or something similar.

Add a corresponding command line parameter (e.g. "--reuseaddr") that would explicitly set the new member field of CStunServerConfig to true.  Command line parsing is what main.cpp is all about.

Modify CStunServer::Initialize to pass the config flag as a new parameter to the four separate calls to AddSocket.   Then AddSocket would pass the flag to CStunSocket::UDPInit.

Update markdown file to document new parameter.  (Then "make textres" and "make manpages")

Thanks!

Super!  Yes, I can make this an option, following your guide.  I'll reach out when it's ready for next steps.

Please check this again.  I've added and documented the --reuseaddr command line option.  UDPInit() was being called in the client and tests code, so I hard-coded a false, keeping these areas working as they were previously.
I tested the STUN server in my staging TR-069 environment.  When --reuseaddr was used, my ACS was able to share port 3478.  When the switch was not used, my ACS got a system error when trying to bind to port 3478.

Looks good. If you can address the issues above (initialize fReuseAddr in constructor and markdown comments), we should be good to go.

Thanks for your feedback.  The two changes you pointed out have been implemented, namely initializing fReuseAddr and updating the help text.

Please hold off on merging this code.  I'm finding that I'm not getting the wanted behavior from the STUN and ACS server.  When the ACS uses the port, it's blocking the STUN server momentarily. I may need to use something like IPC or iptables to get two processes to send over the same port.

What do you mean by "it's blocking the STUN server momentarily"?   If you can elaborate more on how the ACS server works, I might be able to assist.

This document explains how the TR-069 ACS Server utilizes STUN.
https://www.broadband-forum.org/technical/download/TR-111.pdf
Page 25 shows how STUN and the ACS use the same address and port to talk to a device behind NAT.
Figure 1-6 are stuff the STUN Server does.
Figure 7 is the ACS making a Connection Request to the device.
I'm using Genieacs, which runs on Node JS.  It's using the dgram module for the socket.  The reuseAddr flag is also being set.
https://nodejs.org/api/dgram.html#dgram_dgram_createsocket_options_callback
client = dgram.createSocket({type:'udp4', reuseAddr:true}).bind({port:3478});

I don't get any errors when sending messages using the dgram client in Node, and the device does get the UDP Connection Request.  If I leave the client open, the STUN server stops getting bind requests from the client device behind NAT.  If I close the Node dgram client, the STUN server starts getting messages after about 3-4 seconds.
It seems that both processes cannot use the same port at the same time, something I thought was possible using the SO_REUSEADDR.  I did test the SO_REUSEPORT option, but Node JS seems to not use this option, as it cannot connect to the port, even with the reuseAddr set to true.
I'm thinking on two alternative methods.  1) Use a IPC call, getting the STUN server to transmit the message on behalf of Node.  2) Build a STUN server in Node, so it can all run within the same process.

I just downloaded GenieACS from https://github.com/zaidka/genieacs.  But I don't see any reference to STUN, port 3478, etc... Where in the code does it create the socket?

I did some looking into how a Commercial ACS has things setup between the ACS and STUN server.  It looks like the STUN server sets up a relay port, allowing the ACS to tell the STUN server to send a message to the NAT'ed device.
https://github.com/zaidka/genieacs/pull/217#issuecomment-289509011

In your genieacs code, you aren't reliably closing the socket after you send.   Garbage collection should clean the socket up eventually.  But wouldn't it be better to create, bind, send, then close.

By chance are you using "--full" mode or specifying "--primaryinterface" in the command line args to the stun server.  It's possible that node.js is always doing a select/recvfrom call on the socket - thus consuming incoming packets.
Two ideas.

There is an open source STUN server written for Node.  You could easily slam that code into your GenieACS script and then hack some way to share the socket.

Rather than having GenieACS send directly to the client device, send a STUN indication message from GenieACS to the STUN server.  The STUN indication message has a custom attribute for the device's ip and port address as well as the payload you want it to receive.  Modify the stun server code to receive the STUN indication message and to read this attribute payload.  Then it sends the payload directly to the device from port 3478.  You'd probably just have to modify the code in stuncore/messagehandler.cpp  to treat the normal binding request differently from the indication message.  And you have to find a way to make it secure so that the stun server can't be used as a udp relay attach surface.  (e.g. only packets from localhost or a fixed set of IPs are allowed to send indication messages).  But I think this is pretty straightforward.

In your genieacs code, you aren't reliably closing the socket after you send. Garbage collection should clean the socket up eventually. But wouldn't it be better to create, bind, send, then close?

It gets closed here: https://github.com/spencerlambert/genieacs/blob/master/lib/api-functions.coffee#L59

Oh I see.  I thought it was javascript, but it's really coffeescript. I guess coffeescript uses indentation instead of curly braces to start a new block.  That's what was throwing me off.
What do you think of idea #1 or #2 above?

Thanks for pointing out the STUN indication message and custom attributes.  Right now, option 2 is most attractive, as it may scale the best as the ACS and STUN server can be physically separate.

Cool.  I double checked.  You just need to modify the code in stunreader.cpp/h to parse your new attribute type (you decide the schema) and then modify messagehandler.cpp to forward the data to the client device IP and port.   Don't forget about security.

Thanks!  Is this a modification that is useful in the main branch or should I stick with a fork, when I get it working?

I'll take the pull request if it's done right.  I didn't know too much about TR-069 and ACS until I heard about what you were trying to do.  I read up on the problem space and the "annex g" thing.  I think the original designers of the spec messed some things up, but it is the standard.
If you get the needed changes into both Genie-ACS and STUNTMAN, it will be win-win.  Feel free to start a mail thread with me and Zaid if you want to talk about broader design so we can all make sure it's the right thing end to end.  (My email is jselbie at g mail dot com).  I'm still wondering why the so_reuseaddr flag didn't work.  I'd like to figure out why that didn't work when I get some free time later this week - as that might save you some time.  Otherwise, if node.js doesn't play nice with socket sharing, I like the forwarding approach.

I just finished a packet capture on my TR-069 device.  It's looking like the port sharing works.  What first set me on the path thinking the port sharing wasn't working, was because when sending request close together my TR-069 device would only respond to the first UDP Connection Request, requiring a 5-10 second wait between successful UDP Connection Requests.
This packet capture shows that the NAT'ed device is getting all the UDP Connection Requests while doing STUN binding.
https://github.com/zaidka/genieacs/pull/217#issuecomment-289943495
Right now, it's looking like the SO_REUSEADDR works.  When I get the problem solved causing the ignored UDP Connection Request when going rapid fire, I'll let you know and we can work on completing this pull request.  Thanks for your help and input.  It's been very good.

Glad you got it figured out.  Let me do some sanity testing on the pull request and and I'll merge it in when done.  Might be a few days, but I don't anticipate any problems.  Thanks!

@spencerlambert  - hey there.  Two things.
I've got a new branch, development, which is intended to be the working branch for some "version 1.3" work I'm doing.  One of the features I'm adding is multi-threading where the server can have N threads, each with a dedicated socket listening on the same port as the others.  As a side effect of this change, I've touched the --reuseaddr code path to create sockets with SO_REUSEPORT instead of SO_REUSEADDR.  I think it should still work with your port-sharing scenario.  Could I convince you to validate this change with your ACS?
Also, someone on the StunProtocol.org mailing list (google group) was asking about TR69, ACS, and STUN co-existence. I wanted to introduce him to you to see if you could help resolve his issue.  But didn't have your email address.  Could you jump in on this discussion (or email jselbie at gmail and we'll do a private thread).
Thanks and happy thanksgiving.

I'd be happy to test this and post the results.


"Toggle Column" list of buttons for Element and Event Frame Attributes can be too long

I'm going to close this for now. The use case I had displayed 7 unique tags per FV. Obviously you could build out this structure, however this interface just becomes too large to be effective. In this case it makes more sense to have an event frame with 7 attributes per FV.


use @vx/* v0.0.120

this PR bumps @data-ui/xychart to use @vx/* v0.0.120 where possible for more flexible react deps. also adds a changelog.md

Coverage remained the same at 78.306% when pulling 7eead4844e644c15f722475bc2089b0f48e39bde on chris--vx-0.0.120 into<PHONE_NUMBER>253d80eb3251c4fe25fd615c309fbd on master.


Parameter to ignore very first epochs in ModelCheckpoint

I think it will be good if you add an argument to some built-in callbacks. i.e. ModelCheckpoint to ignore the very first epochs. Mostly in first epochs developers don't want to apply any action, since the model may not be in a desirable level.
For example, while using ModelCheckpoint with save_best_only parameter, I do not want to apply this on the first 5 epochs. My model starts from zero,and it takes 5 epochs to go above a desirable threshold, then I want it to monitor the passed metric.
It also could be a threshold parameter for the monitor metric to start applying the callback.
Code Example:
model_checkpoint_callback = tf.keras.callbacks.ModelCheckpoint(
    filepath=checkpoint_filepath,
    save_weights_only=True,
    monitor='val_accuracy',
    mode='max',
    threshold = 0.50,            # for instance
    save_best_only=True)

Then it will start monitoring after the val_accuracy goes above the passed threshold.
or
model_checkpoint_callback = tf.keras.callbacks.ModelCheckpoint(
    filepath=checkpoint_filepath,
    save_weights_only=True,
    monitor='val_accuracy',
    mode='max',
    ignore_firsts = 5,            # for instance
    save_best_only=True)

Then it will start monitoring after the 5 epochs.
Thanks in advance.

Thanks for the issue. Since ModelCheckpoint already has a wealth of complexity, will it work for you if you use a wrapper (custom) callback where it only calls ModelCheckpoint's epoch methods when epoch >= 5 for example?

@rchao  Thanks for your response. You mean that I can write a custom callback (wrapper) and in its on_epoch_end method, after checking the epoch number >=5, I call ModelCheckpoint's epoch methods? How can I do the last part (calling ModelCheckpoint's methods)? Could you please give me an example?

@Kaveh8 I implemented a custom callback that demonstrate what @rchao suggested above. Please take a look at the gist here. Thanks!
Please verify once and close the issue if this was resolved for you. Thanks!

Hello @Kaveh8, on second thought a subclass ModelCheckpoint may be even easier (as @jvishnuvardhan pointed out in the colab). Let us know if this helps. Thanks!

@rchao  @jvishnuvardhan That was great. Thank you for your help.


AQL queries not returning expected ACTIONS

Configuration information

EHRbase version: 0.16.5
openEHR_SDK version: bcc19c2
Archie version: 5a4a9442e5e2516aed5f25636ac236682aace7b9
PostgreSQL version: PostgreSQL 11.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 8.3.0) 8.3.0, 64-bit
Java Runtime version: Oracle Corporation 11.0.10+9
Operating System version: "Linux amd64 4.15.0-45-generic",

Description
When using a template that has two SECTIONS and every section has a nested ACTION, querying for the ACTION returns only the child of the first SECTION and not both.
Steps to reproduce

Download the template from here and create it in ehrbase using the REST API
create an EHR
Download the composition from here and create it in ehrbase using the REST API
Perform the query

select e/ehr_id/value, a/description[at0001]/items[at0002]/name/value from EHR e contains ACTION a

Actual result

The output is
{
    "q": "select e/ehr_id/value, a/description[at0001]/items[at0002]/name/value from EHR e contains ACTION a",
    "columns": [
        {
            "path": "/ehr_id/value",
            "name": "#0"
        },
        {
            "path": "/description[at0001]/items[at0002]/name/value",
            "name": "#1"
        }
    ],
    "rows": [
        [
            "e1f54616-338a-4eb6-86e0-621c248f339c",
            "Surgery type"
        ]
    ]
}

Expected result (Acceptance Criteria)
{
    "q": "select e/ehr_id/value, a/description[at0001]/items[at0002]/name/value from EHR e contains ACTION a",
    "columns": [
        {
            "path": "/ehr_id/value",
            "name": "#0"
        },
        {
            "path": "/description[at0001]/items[at0002]/name/value",
            "name": "#1"
        }
    ],
    "rows": [
        [
            "e1f54616-338a-4eb6-86e0-621c248f339c",
            "Surgery type"
        ],
        [
            "e1f54616-338a-4eb6-86e0-621c248f339c",
            "Therapy"
        ]
    ]
}

Notes:
This bug may be related to https://github.com/ehrbase/ehrbase/issues/464

Definition of Done

[ ] The defect is checked by an unit or an integration test (Robot)
[ ] Merge Request approved
[ ] Unit tests passed
[ ] Build without errors
[ ] Release notes prepared
[ ] No additional runtime warnings

Hi @svituz could you please post the OPT ? Tx

Hi @chevalleyc,
the opt is linked in the Steps to reproduce section.
It is at https://gist.github.com/svituz/e2569bb9a870fb55951fdde0d44728c9#file-openehr_example_template-xml

Hi @svituz there is some tweaking possible to allow handling arrays at content level. In application-local.yml, the following section allows this:
  aqlConfig:
    # if true, WHERE clause is using jsquery, false uses SQL only
    useJsQuery: false
    # ignore unbounded item in path starting with one of
    ignoreIterativeNodeList: 'dummy'
    # how many embedded jsonb_array_elements(..) are acceptable? Recommended == 2
    iterationScanDepth: 10

However, example-template is resulting in a number of non unique AQL paths. Please see my comment in https://github.com/ehrbase/ehrbase/issues/464. Since the iterated section results in structurally different trees, the path to the ACTION entry cannot be uniquely resolved. As indicated, the node/name predicate is intended to be used to constraint fine grained data item.
Thanks for this very interesting issue.

Setting aqlConfig.ignoreIterativeNodeList to 'dummy' have worked.
Can I ask what this configuration means?

The idea of this parameter is to identify which node to skip when evaluating the SQL expression for arrays. The problem with array expression in JSONB structure is that (AFAIK) the query planner cannot assess the cost of the query. F.e. the query mentioned in this CR, is evaluated as:
select
  "ehr_join"."id" as "/ehr_id/value",
  (ehr.xjsonb_array_elements(("ehr"."entry"."entry"#>>'{/composition[openEHR-EHR-COMPOSITION.report.v1],/content[openEHR-EHR-SECTION.procedures_rcp.v1]}')::jsonb)#>>'{/items[openEHR-EHR-ACTION.procedure.v1],0,/description[at0001],/items[at0002],0,/name,0,value}') as "/description[at0001]/items[at0002]/name/value"
from "ehr"."entry"
  right outer join "ehr"."composition" as "composition_join"
    on "composition_join"."id" = "ehr"."entry"."composition_id"
  right outer join "ehr"."ehr" as "ehr_join"
    on "ehr_join"."id" = "composition_join"."ehr_id"
where "ehr"."entry"."template_id" = 'example_template'

with the previous configuration, this expression is evaluated as:
select
  "ehr_join"."id" as "/ehr_id/value",
  "ehr"."entry"."entry" #>> '{/composition[openEHR-EHR-COMPOSITION.report.v1],/content[openEHR-EHR-SECTION.procedures_rcp.v1],0,/items[openEHR-EHR-ACTION.procedure.v1],0,/description[at0001],/items[at0002],0,/name,0,value}' as "/description[at0001]/items[at0002]/name/value"
from "ehr"."entry"
  right outer join "ehr"."composition" as "composition_join"
    on "composition_join"."id" = "ehr"."entry"."composition_id"
  right outer join "ehr"."ehr" as "ehr_join"
    on "ehr_join"."id" = "composition_join"."ehr_id"
where "ehr"."entry"."template_id" = 'example_template'

That is the array is no more expanded at content level.


Modify responses with userId by replacing userInfo

Purpose

Return users information instead of user id

Goals

Fetch user information from IS for a given userId and return the modified response

Approach

User stories

Release note

Documentation

Training

Certification

Marketing

Security checks

Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes
Ran FindSecurityBugs plugin and verified report? yes
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes

Samples

Related PRs

Migrations (if applicable)

Test environment

Learning

Ballerina 0.991, MySQL 5.7.25

Codecov Report

Merging #52 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   23.48%   23.48%
=======================================
  Files          45       45
  Lines        1154     1154
  Branches      182      182
=======================================
  Hits          271      271
  Misses        806      806
  Partials       77       77

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 8ba089e...b9bc7a8. Read the comment docs.


feat: rfox bridge pt1

Description
What this PR does:

Implement UI components for Arbitrum Bridge
Implement actual Arbitrum bridge functionality

What this PR does not:

wire it up from RFOX stake step, letting users use FOX.ETH as a staking asset and be routed to bridge, then back to stake when they've succesfully bridged
add the ack associated to the stake -> bridge flow
oil ya beard

TODO:

- [x] Make the abstraction actually decent enough
- [x] Tackle all relevant TODOs
- [x] Fix dodgy loading state during L1 -> L2 transition where both L1 and L2 are spinning
- [ ] TBD in a follow-up - actual bridge wire-up has been done, all that's missing here is ack and route from stake when selecting ETH.FOX (i.e a whole new flow that will need to be added) ~~Wire-up not as separate claim routes, but rather as subroutes of staking, in preparation for wiring this up in https://github.com/shapeshift/web/issues/7010~~

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[x] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes https://github.com/shapeshift/web/issues/7009
relates to https://github.com/shapeshift/web/issues/7010 - TBD, routing from RFOX staking and ack

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types or contract interactions might be affected by this PR?

Testing

Engineering

Operations

Screenshots (if applicable)

L1 step https://jam.dev/c/bb2bf978-b437-4b10-84ed-17302ee69035

L2 step

Mostly nitpicks but in general the use of non-null assertions seems to be slightly unnecessary - we should handle them without use of ! in most cases to avoid delicate implementation

@woodenfurniture tackled all comments (mostly in p3, since fixing these here wouldn't make sense, as p3 effectively takes all the deps-y and query-y boilerplate out of components and moves it into dedicated hooks).
react-query bump with skipToken safety incoming


Restructure ci modules

Objective

Currently all ci commands are in the subcommands module. This is problematic when you want to implement actually subcommands (such as cargo r -p ci -- doc check).
All command modules include the _command suffix, which is redundant.

Solution

Move commands modules into root crate folder.
Merge contents of commands/mod.rs into main.rs.
Move commands::subcommands module into commands module.
Remove the _command suffix from all commands::subcommands modules.

Requesting a review from @MrGVSV, since they were the one who structured the ci tool in its current form and may provide insight / reasoning.


fix: updates stats dapp with changes requested in #829

Summary of changes

Makes requested changes from stats design audit here #829

Thanks @monaiuu for the stats ui review!
Reference issue to close (if applicable)

Closes #829

Code Checklist

[ ] Tested
[ ] Documented

Need fixed height for compressed and uncompressed keys to be consistent just like in the design.
Expected:

Current:

Dropdown should have dividers between the option items.
Placeholder should be updated from Search authority account to Search authority.

Expected:

Current:


After the upgrade to 2021.2 the automatic recognition of .jelly as XML does not seem to work anymore.

Version report
IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021
Runtime version: 11.0.11+9-b1504.13 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.5
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 12
Non-Bundled Plugins: IdeaVIM (0.69), com.intellij.ideolog (<IP_ADDRESS>), com.paperetto.dash (3.3), org.antlr.intellij.plugin (1.16), org.intellij.plugins.hcl (0.7.10), mobi.hsz.idea.gitignore (4.2.0), CheckStyle-IDEA (5.54.0), zielu.gittoolbox (212.6.6), Stapler Framework Support (2.0.0), com.github.oowekyala.javacc (1.8), com.intellij.guice (212.4746.52), com.jetbrains.hackathon.indices.viewer (1.17), org.jetbrains.idea.grammar (2021.1.1), org.sonarlint.idea (<IP_ADDRESS>721), com.perl5 (2021.2), Pythonid (212.4746.96), org.asciidoctor.intellij.asciidoc (0.33.6), com.jetbrains.edu (2021.7-2021.2-172)
Kotlin: 212-1.5.10-release-IJ4746.92

Reproduction steps

Upgrade to 2021.2 with plugin 2.0.0
Results
Expected result:
.jelly is recognized as XML
Actual result:
It is not recognized.

https://plugins.jetbrains.com/docs/intellij/registering-file-type.html says the current way of registering file type is deprecated. It also happens to be preventing live  reload.


_TZE204_aoclfnxz thermostat target_temperature is controlled in 0.5 steps

Currently if I set temperature via home assistant to 21.5 it is rounded to 22.0 degrees. If I set temperature on device to 19.5, it is displayed as 19 degrees on HA. Any suggestion what changes I have to make to fix this?
https://github.com/jacekk015/zha_quirks/blob/main/ts0601_thermostat_avatto.py

I think I need to change this line https://github.com/jacekk015/zha_quirks/blob/main/ts0601_thermostat_avatto.py#L332C27-L332C32
to             lambda value: round(value / 100, 1), but it's not enough, numbers are still rounded

Tried to turn on the logger, and value is wrong in the logger as well. If I set on device 20.5, it logs:
homeassistant  | 2024-12-04 22:51:28.601 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 12, 4, 20, 51, 28, 600947, tzinfo=datetime.timezone.utc), priority=0, src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x9A0D), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=143, profile_id=260, cluster_id=61184, data=Serialized[b'\t\xb9\x02\x02\xf5\x10\x02\x00\x04\x00\x00\x00\x14'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=144, rssi=-64)
homeassistant  | 2024-12-04 22:51:28.605 DEBUG (MainThread) [zigpy.zcl] [0x9A0D:1:0xef00] Received ZCL frame: b'\t\xb9\x02\x02\xf5\x10\x02\x00\x04\x00\x00\x00\x14'
homeassistant  | 2024-12-04 22:51:28.607 DEBUG (MainThread) [zigpy.zcl] [0x9A0D:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl<0x09>(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Server_to_Client: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=185, command_id=2, *direction=<Direction.Server_to_Client: 1>)
homeassistant  | 2024-12-04 22:51:28.615 DEBUG (MainThread) [zigpy.zcl] [0x9A0D:1:0xef00] Decoded ZCL frame: AvattoManufCluster:set_data_response(param=Command(status=2, tsn=245, command_id=528, function=0, data=[4, 0, 0, 0, 20]))
homeassistant  | 2024-12-04 22:51:28.618 DEBUG (MainThread) [zigpy.zcl] [0x9A0D:1:0xef00] Received command 0x02 (TSN 185): set_data_response(param=Command(status=2, tsn=245, command_id=528, function=0, data=[4, 0, 0, 0, 20]))
homeassistant  | 2024-12-04 22:51:28.623 DEBUG (MainThread) [zhaquirks.tuya] [0x9a0d:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0210 (command 0x0002)

I probably need to update AVATTO_TARGET_TEMP_ATTR: ("target_temperature", t.uint32_t, True), this line to accept float?

Your device confirmed 20 degrees, HA just accept that and pass that forward to the GUI.
Chinese engineer didn't do a good job here.
Received value [0, 0, 0, 20]


If an extractor depends on inference, DD halts indefinitely before doing inference

At least stop with an error ... please. What's currently happening is that the output looks exactly like inference (with lines like
09:10:33 [taskManager] INFO  Memory usage: 539/1809MB (max: 233017MB)

getting output every minute and nobody knows what's going on.
(ACTUALLY, I'd propose ALLOWING extractors after inference. MY particular extractor was for printing precision and recall numbers after every run. Prolepsis: This SHOULD be in Dashboard, and it's going to be there, but it's just nice to have a precision number immediately after a run, in the DD log output.)

@netj @zhangce we should fix this!

Related: #424
Support for result pipelining would be great. Looks like a key challenge would be to cleanly model the "result" (see #416).


Render video cannot show

Hi @SuLvXiangXin ,
Thank you for great work.
When I run render script after trained, I can get images in path_render_step. One of color image as below

However, rendering videos cannot show. I use Windows Subsystem for Linux (WSL) for training and rendering.
Reproduce:
Train:
SCENE=bicycle
DATA_DIR=data/bicycle
EXP_NAME=bicycle
python train.py --gin_configs=configs/360.gin --gin_bindings="Config.data_dir = '${DATA_DIR}'" --gin_bindings="Config.exp_name = '${EXP_NAME}'" --gin_bindings="Config.factor = 4" --gin_bindings="Config.batch_size = 8192" --gin_bindings="Config.render_chunk_size = 8192"
Render:
bash scripts/render_360.sh
File render_360.sh:
SCENE=bicycle
EXPERIMENT="$SCENE"
DATA_ROOT=data
DATA_DIR="$DATA_ROOT"/"$SCENE"
accelerate launch render.py
--gin_configs=configs/360.gin
--gin_bindings="Config.data_dir = '${DATA_DIR}'"
--gin_bindings="Config.exp_name = '${EXPERIMENT}'"
--gin_bindings="Config.render_path = True"
--gin_bindings="Config.render_path_frames = 120"
--gin_bindings="Config.render_video_fps = 60"
--gin_bindings="Config.factor = 4"
Appreciate if you can give me some advice. Many thanks.

@HungNgoCT Is there any *.mp4 generated in your experiement directory? Or you mean you can't open the mp4? I can open the generated mp4 in my macbook, you may try to open it with another video player.

Thank you @SuLvXiangXin .
There are 4 files *.mp4 generated as the image below. The images in path_renders_step_25000 can be shown. But videos cannot.

The color video is here https://drive.google.com/file/d/1ypW0T10e9ZlZv-N3CCaUQrDDdlZYV3UD/view?usp=sharing
I have tried with Media player, Windows media player... which I used to show *.mp4 files generated from other nerfies.
"you may try to open it with another video player": Yes, if you can play your videos, I will try with other software.

@HungNgoCT It's strange that your video is so large, while my rendered view (factor 8) is only 2MB. I can't open your video too, and I will check the code.

@HungNgoCT Could you try to use the following code to generate your rgb.mp4 and see whether it can show? I can't find any  error in the code.
import os
import imageio
from PIL import Image
import numpy as np

# the directory of your rendered images
render_dir = 'exp/bicycle/render/path_renders_step_25000'

# output mp4 path
video_file = 'rgb.mp4'

num_frames = 120
zpad = max(3, len(str(num_frames - 1)))
idx_to_str = lambda idx: str(idx).zfill(zpad)

file_ext = 'png'
print(f'Making video {video_file}...')

writer = imageio.get_writer(video_file, fps=60)
for idx in range(num_frames):
    img_file = os.path.join(render_dir, f'color_{idx_to_str(idx)}.{file_ext}')
    if not os.path.exists(img_file):
        ValueError(f'Image file {img_file} does not exist.')

    img = np.array(Image.open(img_file), dtype=np.float32)
    img = img / 255.
    frame = (np.clip(np.nan_to_num(img), 0., 1.) * 255.).astype(np.uint8)
    writer.append_data(frame)
writer.close()

@HungNgoCT Could you try to use the following code to generate your rgb.mp4 and see whether it can show? I can't find any error in the code.
import os
import imageio
from PIL import Image
import numpy as np

# the directory of your rendered images
render_dir = 'exp/bicycle/render/path_renders_step_25000'

# output mp4 path
video_file = 'rgb.mp4'

num_frames = 120
zpad = max(3, len(str(num_frames - 1)))
idx_to_str = lambda idx: str(idx).zfill(zpad)

file_ext = 'png'
print(f'Making video {video_file}...')

writer = imageio.get_writer(video_file, fps=60)
for idx in range(num_frames):
    img_file = os.path.join(render_dir, f'color_{idx_to_str(idx)}.{file_ext}')
    if not os.path.exists(img_file):
        ValueError(f'Image file {img_file} does not exist.')

    img = np.array(Image.open(img_file), dtype=np.float32)
    img = img / 255.
    frame = (np.clip(np.nan_to_num(img), 0., 1.) * 255.).astype(np.uint8)
    writer.append_data(frame)
writer.close()

Hi @SuLvXiangXin ,

Cannot not show video created from above script using WSL environment. File size is 357 MB (strange as your indication)

Can show (file size ~ 2MB) if I run that script in a pure MS Windows environment, as below
https://user-images.githubusercontent.com/110378166/235850883-8f6ab579-07b2-41ff-8b78-72058e35692e.mp4

I think problem here is with Windows Subsystem for Linux environment. I am also finding how to solve and update you if I can do it.

I also encountered this problem, the video cannot be played, I am under Ubuntu, and it is the same with other players

import os
from PIL import Image
import numpy as np
import mediapy as media
from tqdm import tqdm
def open_file(pth, mode='r'):
return open(pth, mode=mode)
def load_img(pth: str) -> np.ndarray:
"""Load an image and cast to float32."""
with open_file(pth, 'rb') as f:
image = np.array(Image.open(f), dtype=np.float32)
return image
the directory of your rendered images
render_dir = 'exp/360_v2/bicycle/render/path_renders_step_25000'
file_ext = 'png'
output mp4 path
video_file = 'rgb.mp4'
print(f'Making video {video_file}...')
num_frames = 120
zpad = max(3, len(str(num_frames - 1)))
idx_to_str = lambda idx: str(idx).zfill(zpad)
img_file = os.path.join(render_dir, f'color_{idx_to_str(0)}.{file_ext}')
image=load_img(img_file)
shape = image.shape
video_kwargs = {
'shape': shape[:2],
'codec': 'h264',
'fps': 60,
'crf': 18,
}
with media.VideoWriter(
path=video_file,
shape=(822, 1237),
fps=60,
) as writer:
with media.VideoWriter(video_file, **video_kwargs,) as writer:
for idx in tqdm(range(num_frames)):
img_file = os.path.join(render_dir,
f'color_{idx_to_str(idx)}.{file_ext}')
if not os.path.exists(img_file):
ValueError(f'Image file {img_file} does not exist.')
    img = np.array(Image.open(img_file), dtype=np.float32)
    img = img / 255.
    frame = (np.clip(np.nan_to_num(img), 0., 1.) * 255.).astype(np.uint8)
    writer.add_image(frame)
    idx += 1

@HungNgoCT  @zaf05  Hi，I encountered the same problem, and resolved after run the following instruction:
pip install imageio[ffmpeg] imageio[pyav]
Hope it is helpful for you.


Files doesn't update disk usage properly

Description
I was cleaning up my PC today and notices that Files wasn't updating the disk usage properly
Files shows only 440GB Free instead of 1.1 TB

Steps To Reproduce

Cleanup PC
See that files doesn't update properly

Requirements
Expected behaviour would be Files updating properly or give us a refresh button in the Home View so we can trigger an update of those values
Files Version
<IP_ADDRESS>
Windows Version
10.0.22631.2715
Log File
debug.log

Thanks for the feedback, Merging with https://github.com/files-community/Files/issues/6182. You can check there or click subscribe in the right sidebar for updates.


Remove UTF-8 from documentation

It appears any sort of non-ascii character is mis-encoded by roxygen, and is not rendered properly in the final documentation.  Need to remove any non-ascii characters from the documentation.

Attempted to remove all UTF-8 codes from all documentation.


Area calculation not proper while drawing a polygon intersecting it's own shape

I was trying to draw and measure area of a polygon using Openlayers v3.7.0, It gave correct values for proper figures in which line continuation didn't intersect.
But when I draw a figure in which line continuation did intersect the total area was coming as subtraction of the two figures which forms as a result of line intersection.
Please refer the image below for more details.

Although OpenLayers does not enforce topology rules, a topology rule for proper area calculation of polygons is that none of the polygon's ring segments do not intersect.

Thanks Andreas Hocevar for the info.


Simplify Travis configuration

Shallow Git checkout
Cache node modules
Move npm update to before_install step
npm ci should run by default if supported

Note: This supersedes #104 so I'll close off that one once this is done.


Terraform Testing and Working with IE

Added documentation and recommendations for testing Terraform.
Added document around some options for working with IE, including the use of BrowserStack

@TomJKing Just noticed that this is still open. Any thoughts on the questions above?


Find Usage Error

apk link：https://raw.githubusercontent.com/xmhwws/AApk/master/formatfa.reflectmaster_1.9.1.apk
method: formatfa.android.f.reflectmaster.b.a.static int a(String str)

Find Usage:

But it didn't find all of them.
Jeb:

Jeb is right, jadx also needs improvement.
In addition, this gradle project imports Android studio, which also has this problem.
It may be a bug?

You are right, the usage reference is incomplete. Interesting enough the opposite direction works without problems.
Please note that the usage reference function of Jadx have to be used carefully as it (besides this bug) can always be incomplete. This can happen in case Jadx fails to decompile the method the method-to-be searched is called in.

It is strange because I can't reproduce this issue, for me usage dialog shows all use places. Maybe it is a race condition :(
@xmhwws please try latest unstable build. Also, you can try to trigger full decompilation (using text search) before usage dialog.

@skylot I used latest version from Git, jadx thread count set to 1 (using Java 11.0.4).
With background decompilation disabled if you first start the decompilation (e.g. by opening the text search window) the bug is present.
If you first open the class formatfa.android.f.reflectmaster.b.a and then trigger the decompilation the references are correct.

@jpstotz thanks! I reproduce this and looks like this is a recent regression done in 068234f0cab197a476cba5b30592aa4d88c50249 , so in release version this issue not exists.

I made a fix, thanks for the help!


⚠ Bofrost.de has degraded performance

In c52b943, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1068 ms

Resolved: Bofrost.de performance has improved in 7ff2687.