[EPIC] Proposal for Date/Time enhancement

!!! Please correct me if i'm wrong !!!
Intro

This changes breaks some original behaviors.
UTC+8 is the local time zone in my examples.
As our goal is to be Postgresql compatible, this proposal is mainly following

PostgreSQL Date/Time Types
Arrow-rs

I plan to do Data Type Formatting Function and Date/Time Functions and Operators after most of the items here are finalized

Design Principle

align with postgresql in most cases
use nanoseconds for the default timestamp resolution (unlike postgresql and pyspark's microseconds)
use utc+0 as default timezone for  timestamp with time zone

Let's Begin with Postgresql's Date/Time

Let's Start to Compare

Timestamp
Postgresql

uses 8 bytes for both timestamp and timestamp with time zone. (note that time zone is included in these 8 bytes)
uses microsecond as resolution, which is the number of microseconds from 1970-01-01T00:00:00
has 7 kinds of floating point precision, from timestamp(0) to timestamp(6)

timestamp(0) rounds to seconds
timestamp(3) rounds to milliseconds
timestamp(6) rounds to microseconds

timestamp 'xxx' output timestamp

if xxx does't contain time zone info, it just works as what you think

willy=# select timestamp '2000-01-01T00:00:00';
      timestamp
---------------------
 2000-01-01 00:00:00
(1 row)

if xxx contains time zone info, time zone is just ignored. (i believe that this is a surprise for some people) e.g.

willy=# select timestamp '2000-01-01T00:00:00+08:00';
      timestamp
---------------------
 2000-01-01 00:00:00
(1 row)

timestamp with time zone 'xxx' output timestamp with time
1 if xxx contains no time zone, it assume it's local time

willy=# select timestamp with time zone '2000-01-01T00:00:00';
      timestamptz
------------------------
 2000-01-01 00:00:00+08
(1 row)

2 if xxx contains time zone, it'll be converted to your local time zone
willy=# select timestamp with time zone '2000-01-01T00:00:00+02:00';
      timestamptz
------------------------
 2000-01-01 06:00:00+08
(1 row)

Datafusion

Timestamp(TimeUnit, Option<String>)

we have

TimeUnit::Second
TimeUnit::MilliSecond
TImeUnit::MicroSecond
TimeUnit::NanoSecond

which store number of seconds/millis/micros/nanos from 1970-01-01T00:00:00
most of the timestamp related functions output Timestamp(TimeUnit::NanoSecond, None)

We only have timestamp literal but no timestamp with time zone
timestamp xxx outputs Timestamp(TimeUnit::NanoSecond, None)

if xxx contains no time zone, it automatically applies local time, parse it, convert it to utc time zone, and then drop the time zone #3080

❯ select cast('2000-01-01T00:00:00' as timestamp);
+------------------------------------------------------------------+
| CAST(Utf8("2000-01-01T00:00:00") AS Timestamp(Nanosecond, None)) |
+------------------------------------------------------------------+
| 1999-12-31 16:00:00                                              |
+------------------------------------------------------------------+
1 row in set. Query took 0.004 seconds.

if xxx contains time zone, it's parsed correctly, then converted to utc time zone, and then drop the time zone

❯ select timestamp '2000-01-01T00:00:00+02:00';
+------------------------------------------------------------------------+
| CAST(Utf8("2000-01-01T00:00:00+02:00") AS Timestamp(Nanosecond, None)) |
+------------------------------------------------------------------------+
| 1999-12-31 22:00:00                                                    |
+------------------------------------------------------------------------+
1 row in set. Query took 0.000 seconds.

Proposal

make timestamp xxx work like postgresql does
add timestamp with time zone, i believe there're lots of works and discussions to do: apache/arrow-rs#1936 apache/arrow-rs#1380 apache/arrow-rs#597
make the local time zone as UTC by default (timestamp is hard, i think this could prevent some ambiguities)
add set time zone to xxx to change the local time zone

Date
postgresql image
Posgresql

supported these formats

Datafusion

among all the format above, we only support the first 1999-01-08

Proposal

I don't think there're any issues for Date
We could consider add another 2 ISO 8601 formats (i.e. 19990108 and 990108) Chrono strictly follows ISO 8601. I think supporting all 8601 date formats makes sense.

Time
Postgresql

time xxx output time that requires 8 bytes
time xxx with time zone that requires 12 bytes, I have no idea why we need 4 more bytes here since timestamp with time zone only requires 8 bytes

Datafusion

We don't have time literal for now, let's wait for #3010

Proposal

I personally never used time with time zone. I have no clue when we need it. arrow-rs's time datatype contains no timezone. Perhaps we need not to implement this.
let's wait for #3010

Interval
Postgresql

requires 16 bytes
resolution as microseconds
the outputs for different operators & inputs

Datafusion
reference: https://github.com/apache/arrow-rs/blob/master/arrow/src/datatypes/datatype.rs#L237

Interval(IntervalUnit)
we have following units

IntervalUnit::YearMonth

number of months
stored as 32-bit integer

IntervalUnit::DayTime

stored as 2 contiguous 32-bit integers (days, millisseconds), 8 bytes in total

IntervalUnit::MonthDayNano
a triple of the number of (months, days, nanoseconds)

month is stored as 32-bit integers
day is stored as 32-bit integers
nanosecond is stored as 64 bit integers
16 bytes in total

interval xxx output Interval(DayTime)

❯ select interval '1 hour 1 second';
+------------------------------------------------+
| IntervalDayTime("3601000")                     |
+------------------------------------------------+
| 0 years 0 mons 0 days 1 hours 0 mins 1.00 secs |
+------------------------------------------------+
1 row in set. Query took 0.000 seconds.

interval xxx support floating number seconds

❯ select interval '0.1 second';
+-------------------------------------------------+
| IntervalDayTime("100")                          |
+-------------------------------------------------+
| 0 years 0 mons 0 days 0 hours 0 mins 0.100 secs |
+-------------------------------------------------+
1 row in set. Query took 0.000 seconds.

if it's less than microsecond, it'll truncated

❯ select interval '0.0001 second';
+------------------------------------------------+
| IntervalDayTime("0")                           |
+------------------------------------------------+
| 0 years 0 mons 0 days 0 hours 0 mins 0.00 secs |
+------------------------------------------------+
1 row in set. Query took 0.000 seconds.

we cannot add interval(DayTime) to Timestamp(NanoSecond, None), perhaps the reason here is the difference of resolution

❯ select timestamp '2000-01-01Z' + interval '1 day';
Plan("'Timestamp(Nanosecond, None) + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to")

we can add interval(DayTime) to Date

❯ select DATE '2000-01-01' + INTERVAL '1 day';
+--------------------------------------------------------------------+
| CAST(Utf8("2000-01-01") AS Date32) + IntervalDayTime("4294967296") |
+--------------------------------------------------------------------+
| 2000-01-01                                                         |
+--------------------------------------------------------------------+
1 row in set. Query took 0.000 seconds.

it breaks while we have hour (or other smaller units) interval #3093

❯ select DATE '2000-01-01' + INTERVAL '1 hour';
+-----------------------------------------------------------------+
| CAST(Utf8("2000-01-01") AS Date32) + IntervalDayTime("3600000") |
+-----------------------------------------------------------------+
| +11856-06-19                                                    |
+-----------------------------------------------------------------+
1 row in set. Query took 0.000 seconds.

We don't have Time now, let's wait for #3010

Proposal

Consider make INTERVAL xxx outputs Interval(MonthDayNano) instead of Interval(DayTime) as it's easier to align with our Timestamp(NanoSecond, None)
Carefully design the outputs for operators like what postgresql has
we could think about whether we really need timestamp with time zone - timestamp ...  While comparing Timestamp(TimeUnit,  TimeZone) Timestamp(TimeUnit, None). the one with time zone will be converted to utc and drop the timezone (it simply drop the timezone internally).this is what postgresql has

willy=# select timestamp with time zone '2000-01-01T00:00:00Z' - timestamp '2000-01-01T00:00:00';
 ?column?
----------
 08:00:00
(1 row)

Thanks @waitingkuo  -- I plan to review this proposal more carefully later today or tomorrow.

(I will respond individually to the parts of the proposal)
Timestamp Proposal

make timestamp xxx work like postgresql does
add timestamp with time zone, i believe there're lots of works and discussions to do:...
make the local time zone as UTC by default
add set time zone to xxx to change the local time zone

I think this sounds like a great idea 👍

I don't think there're any issues for Date
We could consider add another 2 ISO 8601 formats (i.e. 19990108 and 990108) Chrono strictly follows ISO 8601. I think supporting all 8601 date formats makes sense.

I agree

Time Proposal

I personally never used time with time zone. I have no clue when we need it. arrow-rs's time datatype contains no timezone. Perhaps we need not to implement this.
let's wait for https://github.com/apache/arrow-datafusion/pull/3010

I agree -- until there is a compelling reason for time (rather than timestamp) it seems reasonable to postpone additional work on this

Interval  Proposal

Consider make INTERVAL xxx outputs Interval(MonthDayNano) instead of Interval(DayTime) as it's easier to align with our Timestamp(NanoSecond, None)

Here is the spec in case that is interesting: https://github.com/apache/arrow/blob/master/format/Schema.fbs#L354-L372
I think this is a good idea -- Interval(MonthDayNano) is a relatively new addition to the arrow standard, so I think DataFusion might default to Interval(DayTime) is because that was all that was available at the time of initial implementation.

Carefully design the outputs for operators like what postgresql has

Agree

we could think about whether we really need timestamp with time zone - timestamp ... this is what postgresql has

I don't quite understand the question about "really need timestamp with time zone - timestamp" -- as I thought your proposal for timezones was to fill out the feature set for timestamp with timezone 🤔

we could think about whether we really need timestamp with time zone - timestamp ... this is what postgresql has

I don't quite understand the question about "really need timestamp with time zone - timestamp" -- as I thought your proposal for timezones was to fill out the feature set for timestamp with timezone 🤔

i originally thought that comparing timestamp with time zone and timestamp without time zone is ambiguous. it turns out that postgresql simply drop the time zone and keep the native timestamp. this is quite straightforward for our implementation as well (i.e. Drop the time zone from Timestamp(TimeUnit, Optinal(Timezone)). i'll update my proposal for this

@waitingkuo  what do you think about making a list on this ticket of all the various timestamp / time related open items? I think there are a non trivial number of them, such as https://github.com/apache/arrow-datafusion/issues/194, https://github.com/apache/arrow-datafusion/issues/3103 and several others? Alternately, we can make another ticket that collects the items

perhaps the reason here is the difference of resolution

There is no reason, it just isn't implemented. I implemented add for Date32 & Date64, but not Timestamp yet.

it breaks while we have hour

I believe a Date has the resolution of 24 hours, so adding 1 or 23 hours should have no effect?

INTERVAL xxx outputs Interval(MonthDayNano)

I'm wary of this because it changes Interval from being a true Duration (fixed unit of wall clock time, e.g. milliseconds elapsed) into a Gregorian calendar unit (due to supporting Month).

2. add another 2 ISO 8601 formats

I personally lean towards only supporting one, especially if Chrono only supports one. https://xkcd.com/1179/ https://xkcd.com/927/

@waitingkuo I think 95% of what you propose is very sensible. The other 5% I don't think is incorrect, but does raise cause for consideration.
Some random thoughts:

I generally think we should try to stick to parity with postgres, as it is ubiquitous & mature, makes integration testing easier, and arbitrates disputes about desired behavior
counterpoint to #1: arrow is the foundation for datafusion, and as such I think we should go with it over postgres when pragmatic / sensible to do so
when possible I think we should also delegate date / time things to chrono, as these things are very difficult, and it would be nice to not have to maintain a date/time library as well as a parser, query engine, etc
as we push towards higher performance, I think #3 will become increasingly less possible (unless we want to merge GPU/CIMD support into chrono)
We should be clear that there are two types of timezone: Pacific Time (a legal entity) and PST/PDT (UTC+8/7 hours). It appears postgres only supports the later? Which is kind of strange because it limits the purpose of timezones IMO - having a meeting at a recurring time throughout the year requires application logic to switch between PST & PDT when appropriate.
The above legal manifestations add a lot of complexity. On linux chrono pulls its database from tzinfo on linux, and I'm not sure if there's an equivalent on windows. Supporting those means having an always-updated database outside of our codebase. (so I hope to either defer to chrono, or not do it).
Its important to remember that a timezone (of any kind) is not related to time, but rather location. It's where something is happening, not when.
Due to all of the above I've found it useful in OLTP systems to keep all timestamps as UTC and convert to the user locale when displaying. That being said, datafusion is designed for OLAP, so I can see uses where the user has a SQL console open and there is no app layer to convert, which makes a good case for supporting timezones in the query engine, but it comes with a high cost of implementation, so we should be very considerate before adding each layer of complexity (UTC offsets, calender operations, timezones).

@waitingkuo what do you think about making a list on this ticket of all the various timestamp / time related open items? I think there are a non trivial number of them, such as #194, #3103 and several others? Alternately, we can make another ticket that collects the subtasks
@alamb
sure! i'll do it

it breaks while we have hour

I believe a Date has the resolution of 24 hours, so adding 1 or 23 hours should have no effect?

this issue is fixed, it works now

https://xkcd.com/927/
agree, the current one is the most widely used

add another 2 ISO 8601 formats

I personally lean towards only supporting one, especially if Chrono only supports one. https://xkcd.com/1179/ https://xkcd.com/927/

Due to all of the above I've found it useful in OLTP systems to keep all timestamps as UTC and convert to the user locale when displaying.

I think this is best practice for all new OLTP and OLAP systems (always store data as UTC and then render into user locale as desired).
I think what makes it tougher in OLAP system is that the data being processed is often  created outside of Datafusion (aka in parquet or CSV files from some other system) which can and unforuntaely do write dates / times / timestamps other than UTC
In general, I would be a big fan of trying if possible of having datafusion normlize all data on input to UTC prior to processing but I worry this might not be a good idea for performance reasons.

In general, I would be a big fan of trying if possible of having datafusion normlize all data on input to UTC prior to processing but I worry this might not be a good idea for performance reasons.

Postgrseql deal with this in the similar way https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES

All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the TimeZone configuration parameter before being displayed to the client.

If that's the case, should it be Timestamp(Nanosecond, "UTC") or Timestamp(Nanosecond, None)?

When we are done with the discussion, perhaps we can close this issue and use https://github.com/apache/arrow-datafusion/issues/3148 as the coordination point for development

When we are done with the discussion, perhaps we can close this issue and use #3148 as the coordination point for development

i think we could close it for now and move the discussion to #3148 and submit new ticket to discuss some big topics (e.g. timezone)


Pipelining tests: sort responses before comparison

A lot of intermittent failures are being seen with the pipelining tests on Travis. The failures are not reproducible locally. This commit tries to reduce the likelihood of failures by sorting the received responses before comparing them with the expected responses. This is to take care of cases where we might receive responses in an order different from the requests made.

Codecov Report

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

@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   68.35%   68.35%
=======================================
  Files          20       20
  Lines        1324     1324
=======================================
  Hits          905      905
  Misses        419      419

Flag
Coverage Δ

#KituraNet
68.35% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


patch is incorrectly applying the entire query when re-fetching

Steps to reproduce
This issue happens when you issue a .patch request where the payload modifies fields that are in the query.  This is a regression from 6.x.
In 6.x, if you did
const toUpdate = { foo: 'bar' };
const [item] = await service.patch(id, toUpdate, { query: { foo: { $ne: 'bar' } } });

(note: this fails in both single and multi cases, see explanation below)
Expected behavior
you will get back the modified row(s) if the query filter (and ID) matched any records.
Actual behavior
In 7.x, this no longer works.
This is because in service.js, this changed:
          const findParams = idList.length ? Object.assign({}, params, {
            query: {
              [this.id]: { $in: idList }
            }
          }) : params;

to
          query: Object.assign({
            [this.id]: { $in: idList }
          }, params.query)

which incorrectly applies the original query filters to the data that's being re-fetched.  This is wrong - patch should return me changed rows, and should not be applying my original filters (which will fail in this case, I just changed the data that I was searching for!)
BUT
This does break uses of $populate which might also be part of the query.  We, of course, use both in different scenarios.  Ideally, the $populate portion would be pulled out and reapplied to the ensuing _getOrFind, but not the actual filters.
System configuration
Tell us about the applicable parts of your setup.
Mongoose 7.3.2
Node 10.15.3

this is fixed in #362


Fix a number of sensiolabsinsight issues

Fix a number of sensiolabsinsight issues. See https://insight.sensiolabs.com/projects/aeda0c78-7b25-427e-aa90-39b21ab1f8df/analyses/10 for more info.

Merging this myself since it's just minor stuff. The biggest change is that we changed from using getServiceProviders to registerFields to register the locale field, which is more in line with how it's used/saved.


Converting the project to typescript

Proposition
As this is a small project, converting it to typescript is a task that should not be that hard.
Benefits
If the project is in typescript, we can generate a typed.d.ts file containing all the types from this project. This file, in turn, would make this library available for TypeScript user.
More types mean fewer errors, an easier coding experience, and overall better readability of the code.
Cons
Adding typescript brings some complexity in configuration and requires more knowledge to maintain than a vanilla JS project.
Related to #118

Implemented by: #249


Convert to a Flutter FFI plugin

As per https://codelabs.developers.google.com/codelabs/flutter-ffigen#2
Shoehorning cargo into a cmake/cocoapods build might be a challenge

There's also https://github.com/corrosion-rs/corrosion :eyes:

The CypherStack team managed to get a cargo-built rust plugin working in flutter_libepiccash, so I am referencing that repo while following your first link to try and get this building as a Flutter FFI plugin.

Thanks @sneurlax! We can test on iOS/macOS

OK I have got it building but not tested working on android and linux in https://github.com/sneurlax/flutter_libtor/tree/flutter-plugin
I just renamed the repo to flutter_libtor to match other CypherStack plugins for our use because I'll be testing tor-ffi as part of Stack Wallet, but after getting it working I'll make a branch with the changes necessary so y'all don't have to rename anything on your end and can look over the changes without them being attached with a repo name change.

Thank you @sneurlax. So with this approach you still need to manually run the script?
I'd prefer for this to build automatically (as long as user has cargo and other dependencies) by triggering cargo (or the scripts themselves) from cmake/cocoapods like in the Flutter FFI template.
Imagine if we publish this on pub.dev and user does an flutter pub add tor. How does one find the script then?

Thank you @sneurlax. So with this approach you still need to manually run the script?
I'd prefer for this to build automatically (as long as user has cargo and other dependencies) by triggering cargo (or the scripts themselves) from cmake/cocoapods like in the Flutter FFI template.
Imagine if we publish this on pub.dev and user does an flutter pub add tor. How does one find the script then?

Yes, you have to manually run the script.  That's how CypherStack's plugins are set up.  That's a very good point and that makes sense, I'll try to do that now but I'm not familiar with it.  If the Flutter FFI template does it, though, I should be able to follow that example and get it building automatically.

@jeandudey I tested it but I found it an overkill and it doesn't even work for Android. I think for the Linux build it's enough to do vanilla cmake like:
add_custom_target(
        tor_rust
        COMMAND cargo build --manifest-path ../../src/tor-ffi/Cargo.toml
)

add_dependencies(tor tor_rust)

Android should work with: https://github.com/mozilla/rust-android-gradle iOS: ? macOS: ? (but probably same as iOS) Windows: ?????

I was working along these lines before finding https://github.com/fzyzcjy/flutter_rust_bridge which I hope will be better for iOS etc

Their approach is outlined in https://cjycode.com/flutter_rust_bridge/library/platform_setup.html#how-it-works:

We have a series of build scripts (/scripts/build-*.sh) that build all of our platform specific binaries into /platform-build and package them up appropriately, based on the target platform. Example: on iOS/macOS, this bundle is an XCFramework, on Windows/Linux, it is a .tar.gz.

These binaries are uploaded to somewhere online; as mentioned previously, we will use GitHub releases in this guide (which is automated in ci).

When the Dart tooling builds our library (such as when an application consuming our library is built), it invokes the platform specific build process. We hijack this build process by downloading a copy of the binaries for the needed platform, if not already present on the filesystem. This last part is the key; it allows us to run integration tests locally and in CI by providing our own copy of the binaries instead of forcing our build process to always fetch the binaries from GitHub releases.

After the binaries are stored locally (either by being copied to the proper folder(s) or by fetching them from online), we extract them and place them in the needed locations.

Basically they suggest building the binaries on the CI and uploading somewhere. Flutter plugin build then fetches the binaries from the internet.
I'm not sure if this approach works for us (Foundation Devices) since repoducible builds is one of our aims. With this apporach if the user wanted to verify the build he'd have to build the rust libs himself and then change the code to point to whereever he put those binaries. Seems pretty involved and I'm not even sure if it would work.
@sneurlax give me like a week to retry the trigger-the-script-from-cmake-gradle-cocoa-whatever approach again and I'll report back here.
Executing a custom command in the build process, how hard can it be? (famous last words)

With this apporach if the user wanted to verify the build he'd have to build the rust libs himself and then change the code to point to whereever he put those binaries. Seems pretty involved and I'm not even sure if it would work.

How we are approaching this is that there are two scripts, build and download, basically.  We will still default to building it from source, but the download script downloads tagged binaries from github releases.  If your builds are reproducible and will produce the same binary as a tagged release, I only see upsides to this approach: you don't have to build, but if you do, you can verify that the output is identical.  Reproducibility is still an outstanding issue for us, so not all local builds will match tagged releases, but if yours are reproducible, then downloading and verifying should be just as safe as building locally, right?   We're missing that feature but offering downloading binaries as an option for the convenience of higher-level developers that don't want to bother with sometimes-lengthy builds (we build Monero from source... twice, ha!)
As to

wherever he put those binaries

you have the build and download script put their outputs in the same place: wherever they'd go to get built or bundled into your binary, package, etc.

I'm not even sure if it would work

We have been wanting to follow the example of isar, which wraps rust as a dart ffi plugin and is distributed as tagged binaries per-platform similar to the approach described by flutter_rust_bridge...  I'm not sure if they've achieved reproducibility, but the number of contributors they have communicates to me that their system for modifying the source and testing the binaries is coherent, at least
Let me know how I can help.  For the time being I'm going to test and see how flutter_rust_bridge works if all downloading is disabled and we just build from source every time (that's gotta be possible... right?)

After some thinking I'd say you are right.
It's totally okay to have the default be to download - as long as the "power-user" can still build from source locally. As the CI would probably just be GH actions it would be obvious what source the binaries are built from (as long as you trust GitHub - but we all implicitly do here).
Since the approach in your branch is somewhat similar to what flutter_rust_bridge is doing for the build (keeping the native build scripts in a separate folder) I think it makes sense to move in that direction. I won't have the time to tackle this myself in the coming weeks but would be more than happy to assist.
I have closed https://github.com/Foundation-Devices/tor/pull/3 but maybe it can be used later on, in case we decide to do some cool way of triggering the local build (maybe with build flavours?).

PS I forked this and pushed changes on top of your #ffi-plugin branch pushing things forward a bit.  I generated C headers and dart bindings and I think this is ready to be used, but I had trouble testing.  I'll have to revisit it.  I wanted to see if libtor (vs libtor-sys) would be any better, but it wasn't much better...

OK!  I got it building and apparently working on a fork of your ffi-plugin branch in the tor branch of stack_wallet.  when I use start I see:
flutter: Instance of Tor created!
May 17 17:26:32.655 [notice] Tor <IP_ADDRESS> running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1t, Zlib 1.2.13, Liblzma N/A, Libzstd N/A and Glibc 2.31 as libc.
May 17 17:26:32.655 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
May 17 17:26:32.655 [notice] Read configuration file "/home/user/Documents/tor/torrc".
May 17 17:26:32.656 [notice] Opening Socks listener on <IP_ADDRESS>:64179
May 17 17:26:32.656 [notice] Opened Socks listener connection (ready) on <IP_ADDRESS>:64179
May 17 17:26:32.656 [notice] Opening Control listener on <IP_ADDRESS>:8795
May 17 17:26:32.656 [notice] Opened Control listener connection (ready) on <IP_ADDRESS>:8795

so it seems to be working, but I need to test it better.  The scripts need cleaning and they don't run automatically yet.  I'd like to polish this package up a bit and maybe get the example app running if that'd be helpful--what would you say are the next steps here?

One thing I notice is that I'm going to need to configure the directory used for tor files, as right now they're put into ~/Documents by default

One thing I notice is that I'm going to need to configure the directory used for tor files, as right now they're put into ~/Documents by default

By all means! As long as AppDocumentsDir or whatever we are using right now can stay the default. I don't think most users (especially on mobile) care where Tor files are.

what would you say are the next steps here?

Like you said if we could get a simple start/stop Tor example app running that would be grand.

I got the start/stop Tor example up, but am wondering how to actually use it :P
I'll get the example app working vs how I'm demoing use now: https://github.com/cypherstack/flutter_libtor/issues/2
I'll post here again later when I get the standalone example working

I updated the ffi-plugin branch's flutter example app to show usage: https://github.com/sneurlax/tor/blob/ffi-plugin/example/lib/main.dart

As for using it more generally, should I be approaching it through the control port or by using it in Rust and wrapping that to a Dart FFI function?  I can do the latter, but if the former's possible, I'd prefer that in order to minimize code in this repo
I still need to make/fix and demonstrate builds for android

also note that I got another Rust-to-Dart example working well in https://github.com/sneurlax/libxmr after having gone through this process
a key takeway is to generate C bindings from Rust, not C++

I'm working on using the daemon started in the flutter example app.  I need to return both port and password from Rust to Dart
There are several options:

Pass in configuration from Dart.  Make a new Rust FFI function or add a parameter or two to start_tor
Return randomly-generated configuration from Rust.  Convert/cast configuration to an FFI-safe type which is returned to the start_tor Dart caller
Read configuration file (eg ~/Documents/tor/tor.log) for port (but can't trivially derive password from this?)

So, the hashed password being needed in order to connect to the started daemon, I'll check whether the unhashed password is passed back from tor_main_configuration_new and if so return that, otherwise I'll need to pass in configuration from Dart

I connected to it as a normal, authenticated socks5 proxy and successfully showed a Tor exit node ip, so at this point I'm going to work on adding a configuration model
I had to print the random password created by the lib, so I'm working on a class/model for Tor configuration to replace this section: https://github.com/cypherstack/flutter_libtor/blob/main/lib/tor.dart#L119-L153
start will have an optional configuration param, if it's null then we'll generate one as currently
the configuration used will be returned on success

We connect to .onion services through BDK and that "just works" by passing the socks proxy parameters. What client are you using?

I had to make a custom client in order to support sockets over the socks5 proxy: https://github.com/cypherstack/tor/blob/main/example/lib/socks_socket.dart
@julian-Cstack made significant progress removing the requirement for manual or scripted building using cargokit, but an open issue prevents the universal application of cargokit to automatic rust builds.  That code is here:
but when it works, it's really cool to just flutter run it and go.  The author of cargokit has already filed an issue and a fix, so we should eventually be able to remove all the manual setup instructions and scripts alike
Now we need a way to stop the daemon.  Got any suggestions for approaching that?  I haven't even really looked into Arti's rust or API since the change, but I'll dive in--just wanted to report progress on removing the manual build steps and replacing scripted setups and see if you had an easy stop method handy

Just a small heads-up, Cargokit now has workaround for the pub bug so the symlink is resolved beforehand. I also added github action that builds example project for all possible platforms / configurations to detect regressions like this earlier.

Thank you @knopp!
@icota we have Linux, iOS, and Android working, but macOS uses a precompiled binary right now.  I haven't tested Windows yet, but it should work and here's that PR

@knopp and @julian-CStack helpfully resolved the macOS build issue, so we will make another PR for that once it's polished.  I've yet to test Windows, still working on fixing certain aspects of our usage of this plugin

macOS just uses a recompiled binary currently, otherwise this issue could be closed or it could be closed by #17 (which currently has issues to resolve of its own)

#20 solved the macOS precompiled binary issue.  So this should be good or close to publishing, right?
The only issue might be the SOCKSSocket class, which I did find has an issue: https://github.com/cypherstack/tor/issues/24
I had to write it custom because many other packages I tried wouldn't work for our use case (raw socket use to connect to ElectrumX).  It could and maybe should be spun out as a separate package.  We moved it into the main lib dir and exported it so that we wouldn't have to manually sync fixes between repos, rather just using one source for the class, but it probably ought to get published as a standalone package because--as far as I tested--none of the top 6 or so major SOCKS5 Dart packages support HTTP, HTTPS, and socket connections (at least insofar as we needed).


how to specify the time zone

I want to search news in realtime. However, I found I can't specify the time zone for search, and all the news time with different time zone.  I might miss some news if I use local time to extract news every hour.

So what is the max latency should I use for real time acquisition?
What is the time zone used in publish time?

Max latency is 24 hours but realistically it is minutes to a few hours after being published
We always try to get UTC but sometimes the source does not specify that.

You could simply sort descending by publish-time to make sure you get the latest news.
Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD

Thanks
---Original---
From: "David @.>
Date: Mon, Oct 14, 2024 01:30 AM
To: @.>;
Cc: "Optimus<EMAIL_ADDRESS>Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)
Max latency is 24 hours but realistically it is minutes to a few hours after being published
We always try to get UTC but sometimes the source does not specify that.
You could simply sort descending by publish-time to make sure you get the latest news.
Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news?
天天高兴！
@.***

------------------ 原始邮件 ------------------
发件人:                                                                                "ddsky/world-news-api-clients"                                                                                @.>;
发送时间: 2024年10月14日(星期一) 凌晨1:30
@.>;
<EMAIL_ADDRESS>主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10)
Max latency is 24 hours but realistically it is minutes to a few hours after being published
We always try to get UTC but sometimes the source does not specify that.
You could simply sort descending by publish-time to make sure you get the latest news.
Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news? 天天高兴！ @.***
…
------------------ 原始邮件 ------------------ 发件人: "ddsky/world-news-api-clients" @.>; 发送时间: 2024年10月14日(星期一) 凌晨1:30 @.><EMAIL_ADDRESS>主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10) Max latency is 24 hours but realistically it is minutes to a few hours after being published We always try to get UTC but sometimes the source does not specify that. You could simply sort descending by publish-time to make sure you get the latest news. Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

correct

Thx
---Original---
From: "David @.>
Date: Mon, Oct 14, 2024 23:27 PM
To: @.>;
Cc: "Optimus<EMAIL_ADDRESS>Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)
For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news? 天天高兴！ @.***
…
------------------ 原始邮件 ------------------ 发件人: "ddsky/world-news-api-clients" @.>; 发送时间: 2024年10月14日(星期一) 凌晨1:30 @.><EMAIL_ADDRESS>主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10) Max latency is 24 hours but realistically it is minutes to a few hours after being published We always try to get UTC but sometimes the source does not specify that. You could simply sort descending by publish-time to make sure you get the latest news. Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
correct
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

for returned parameter publish_date, is it the news actual publish time writen in the news, or is it the time you logged into the database?
And the publish_date might be of any time zone, it's not a fixed time zone?

that's the actual publish time specified by the source. It can be any time zone, because the news could come from Australia and if they just write "October 15th, 8:50am" we have to take that time. Sometimes that do write it with UTC offsets though.

Thx 4 your reply
---Original---
From: "David @.>
Date: Tue, Oct 15, 2024 16:58 PM
To: @.>;
Cc: "Optimus<EMAIL_ADDRESS>Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)
that's the actual publish time specified by the source. It can be any time zone, because the news could come from Australia and if they just write "October 15th, 8:50am" we have to take that time. Sometimes that do write it with UTC offsets though.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Create a UI Clone for FOCUS ECommerce Website

Is your feature request related to a problem? Please describe.
Yes, since this a Frantend development of a UI of a website
Describe the solution you'd like.
I will use HTML, CSS and JS
Describe alternatives you've considered.
No alternative
Add any other context or screenshots about the feature request here.

/assign


Where is inference demo source code?

i need the inference demo code， could you give me the code？

you can simply use "cvpods_test --config path/to/config.py"


Client Allocation Request for: VillageOne Space LLC

Client Allocation Questions
Core Information

Name: VillageOne Space LLC
Website / Social Media: https://villageoneart.com/
Region: North America
DataCap Requested: 10TiB
Addresses to be Notarized: f3rncwz3qo2bwnsrfjc7kq53xr7yi2lctcydtllxozmszndvttou7n565yb6aqssvn4omyf5m7q62qpfmqcbwq
Notary Requested: KodaRobotDog

@twoopportunity Please subscribe to notifications for this Issue to be aware of updates. Notaries may request additional information on the Issue.

@twoopportunity, please provide the following information.
1.Please introduce you and your organization.
2. When was the company established?
3. How many employees does the company have?
4. How many product users do you have?
5. How many social media followers do you have?
6. Have you ever participated in the Filecoin project and made corresponding contributions?
7. How about the total amount of your data each year? Could you estimate the amount of the data to be stored on the Filecoin network and the onboarding speed after approval of DataCap. How many types of your use cases?
8. Regarding miners, what is your allocation plan?

VillageOneArt, located 594 Broadway Suite701 in SoHo, is an immersive art gallery with co-working space designed for creative minds across communication, fine art, fashion and photography. Seeking to promote individuality and imagination along with artistic expression, VillageOne is a site for diversity, beauty and collaboration to coexist in harmony.
website：https://villageoneart.com/about-villageone-art/
Founded Date: Oct 2018
Employees: less than 10 people.
At present, we have signed 512 members, and more than 5000 members have participated in or contributed to creative mind design
Social Media Account: https://www.instagram.com/villageoneart/; more than 1000 followers;
Never participated in the Filecoin project or made corresponding contributions
About 100 T will be stored each year; We intend to store about 1000 T on Filecoin, Less than 10 T DataCap will be used every week. Thees data are original works of artists, evidence files of copyright protection of works, etc., are private data because copyright is involved.
We intend to choose more than 5 miners.

Please confirm the above information.

@galen @dkkapur  I need your help.
My invitation for collaborating on the filecoin-project/filecoin-plus-client-onboarding repository has expired.
I can't deal with the client application now. Please give me an invitation.

Request Approved
Your Datacap Allocation Request has been approved by the Notary
Message sent to Filecoin Network

bafy2bzaceatgjctetulz3lo43g4xhp5rosqv2xvr62b47fdi2xgoaxvitxhd6

Address

f3rncwz3qo2bwnsrfjc7kq53xr7yi2lctcydtllxozmszndvttou7n565yb6aqssvn4omyf5m7q62qpfmqcbwq

Datacap Allocated

3TiB

You can check the status of the message here: https://filfox.info/en/message/bafy2bzaceatgjctetulz3lo43g4xhp5rosqv2xvr62b47fdi2xgoaxvitxhd6


flutter tool should place a flutter.version file in the build output next to the license file

Let's make this a trivial file to parse, maybe just starting with literally the version of Flutter, in the same format as we currently use for the version file we already generate.
Context here is making the version number available to other tooling that has been combined with the application but maybe not directly linked to the Flutter parts of the system, e.g. an Android or iOS third-party analytics package.

FYI @chingjun who worked in a similar space Google-internal builds (where I think the mapping from app-version to build-CL and thus engine-hash + symbols is well known).


New releases

I you visit here:
https://github.com/dmbaturin/soupault/releases
Most recent build is 1.4, however here:
https://files.baturin.org/software/soupault
you also find 1.5, 1.6 and 1.7. I think the newer releases should be added to
GitHub, or alternatively this other page should be linked in a prominent
location.

I agree, it's a good point. I should add the files here as an alternative location.

Releases are mirrored here again.


Double slashed urls are routed erroneously

This simple flask app has one resource routed:
from flask import Flask
app = Flask(__name__)

@app.route("/test.html")
def index():
    return "Hello World!"

if __name__ == "__main__":
    app.run(host='<IP_ADDRESS>', port=4000)

While the following returns 200
http://<IP_ADDRESS>/test.html

And the following (correctly) returns 404:
http://<IP_ADDRESS>/asd/test.html

The following returns 200 and output Hello World! while it shouldn't:
http://<IP_ADDRESS>//asd/test.html

Environment

Python version: 2.7.15
Flask version: 0.12.2 (but tested also 1.0.2)
Werkzeug version: 0.12.2 (but tested also 0.14.1)

This is a werkzeug issue. It may be fixed by https://github.com/pallets/werkzeug/pull/1286


Construct Vector from Slice<1,M> alias row()

Coverage remained the same at 100.0% when pulling 245cc1092a95c05b6389ca7efe0f15b160455d36 on vector_from_row into a126be0882f46336b06111995896ad85da97beef on master.


add API support for send-to-many

This allows users to post a set of amounts and addresses to /wallet/siacoins, the same endpoint currently used for single amount+address pairs. The rationale is to make it easy to split a large input among many outputs without requiring a separate transaction for each (which is slower and can cause fragmentation).
To create a send-to-many transaction, post a list of comma-separated amounts/addrs in the amounts/destinations form values, instead of the typical amount/destination form values. The backing logic is implemented in a new SendSiacoinsMulti method of the wallet.
PR'ing this early to invite discussion. Should we create a new route for send-to-many, instead of overloading /wallet/siacoins? Should the api handler construct the transaction itself using a transaction builder? And how should this PR interact with #1849?

Worth noting that this call is going to make life easier, and also make the blockchain smaller, for parties like exchanges and mining pools that frequently have to perform many payouts per block.
Overloading /wallet/siacoins seems okay to me.
Seems also reasonable that you could still set a fee on this set. In both cases, you are only setting a single fee. Let's keep the other PR hanging though until the fee market is implemented. I've got the first half of it done, just getting the tests working again before PR'ing it.

Overall looks pretty good in terms of design.


react-scripts not working with typescript template

yarn start throwing error
Steps to produce it:

npx create-react-app my-app --template typescript
yarn start

Attached is the screenshot of the error:

Below is my system details:

yarn version - 1.22.10
OS - MacOS Big Sur version 11.5.2

Did you try recovering your dependencies?
Yes

After replacing the start script react-scripts start with PATH=$PATH:./node_modules/.bin react-scripts start it worked.

I think its not a create-react-app issue but just the normal behavior of npm packages
Locally installed npm modules are not included in terminal path
You can try the same with eslint or any other package

Install 'eslintlocallynpm i -S eslint`
Try to run eslint in terminal eslint --version

A workaround for running locally installed packages can be
npx eslint --version


[W5.11][W12-3]Lim Ming Hong

Added the listing of persons after an add or delete command
Changed the user guide
Changed the test cases
Ready for review

Looks ok to me. You can close the PR once you have reviewed my comments.


Support for App Extensions

I added NS_EXTENSION_UNAVAILABLE_IOS attribute for appropriate methods. Now BlocksKit can be used in app extensions without any separate podspecs or so on.

For others: you can use
pod 'BlocksKit', :git => 'https://github.com/pilot34/BlocksKit.git'
before this pull request will be accepted

Looks like a good addition - I'd like to have it as well. What is the status for this?


Fixed issue with queued tasks preventing pending activity change

Needed to complete the pending activity change in a beforeCompleteTask callback so the task doesn't complete until the worker is already in the pending activity.
That change also required a change to the handleReservationEnded function so if it doesn't see a pendingActivity, it only changes the activity if the current activity is one of the systemActivities.
The logic to change the activity when the reservation ends needed to remain in case the task is completed from outside of Flex, so the CompleteTask action would never be invoked and the beforeCompleteTask wouldn't be triggered.

Tested successfully by @ldvlgr


Training face-only model

Can I get the dataset settings you used to train the face-only model? In particular, which dataset are you using for trainset_3d? In your paper, you say that the "Sterling dataset" is used to evaluate 3D face-only. Can you list its directory structure?
trainset_3d = ['']
trainset_2d = ['MSCOCO', 'FFHQ']
testset = ''
Thanks

I couldn't find good 3D datasets to train a face-only model. Instead, I just used MSCOCO and FFHQ to train a face-only model.
Please visit Pose2Pose branch of this repo (https://github.com/mks0601/Hand4Whole_RELEASE/tree/Pose2Pose) and use them.
I removed Sterling dataset as it does not have comprehensive images :(

Many thanks for the prompt reply.


DMC Kanye is pinned to Poltergeist 1.5.1

This is pretty much the same issue as #1. Kanye duck-punches a specific Poltergeist version and raises if it finds a different version. Let's figure out how far we can relax that version requirement.

This one should be easier than Capybara ( #2 ) because we're adding methods to a Poltergeist class (Capybara::Poltergeist::Driver) rather than overwriting them. To verify this against other versions, we need to:

[ ] Check that no methods are added with names matching ours
[ ] Check that no methods are removed that our methods call

This is fixed in v0.0.3 and v0.1.0.


Use os_hidden

http://specs.openstack.org/openstack/glance-specs/specs/rocky/approved/glance/operator-image-workflow.html

Link is dead, this is the new one: https://specs.openstack.org/openstack/glance-specs/specs/rocky/implemented/glance/operator-image-workflow.html

I've created a PR (https://github.com/SovereignCloudStack/openstack-image-manager/pull/175) which adds support to use os_hidden.
Please feel free to review and comment it or extent the PR.


chore: merged repo and org config

Resolves #648
QA: https://github.com/one-two-test/one/issues/3

we can get the nested inheritance for the entire config without using the lodash simply like this.
const config = {...parsedOrgConfig, ...parsedRepoConfig}
What's the benefit to use lodash here? @whilefoo

we can get the nested inheritance for the entire config without using the lodash simply like this.
const config = {...parsedOrgConfig, ...parsedRepoConfig}
What's the benefit to use lodash here? @whilefoo

that would work only for top-level properties not nested, example: https://jsfiddle.net/8qhbj7r2/

that way we don't need to keep adding new functions for every property.

Got that, I'm pushing a new commit with helpers function removed and lodash used in merging all objs

All configs merged: https://github.com/one-two-test/one/issues/3#issuecomment-1698618254

@devpanther please resolve conflicts

@devpanther please resolve conflicts

resolved

@whilefoo @Draeieg This should be QA'd and merged asap.. there are new configs been added everyday and that's merge conflicts for me

@whilefoo @Draeieg ping


How to auth NTLM

Hey,
I have an OData Endopoint that I need to auth against w/ NTLM. Dont seem to  work.
Any ideas?
Tx,Gabor

Hi,
o.js only supports basic auth. If you want to use NTLM you need to set the correct header yourself. To do so you can add a header in the oConfig:
headers: [],		//an array of additional headers [{name:'headername',value:'headervalue'}]


(mysql) Silence warnings for unused fields

Not sure if there is a better way to go about this, but the sheer number of warnings generated on the CI makes it difficult to spot any new ones that show up.

These have been bugging me for a while but I haven't had the time to fix it, thanks.


Latest version on Homebrew is 1.3.1

Any chance we can have the new version up on Homebrew?

Hello @krzkrzkrz
Pull request is now open: https://github.com/Homebrew/homebrew/pull/49225,
thanks for contributing.

Passpie is now 1.4.1 on home brew. Thanks


Enabled "python.analysis.autoFormatStrings" is being applied on docstrings

Environment data

Language Server version: v2023.7.10
OS and version: MacOS 13.3.1
Python version (& distribution if applicable, e.g. Anaconda): Python 3.11.3

Code Snippet

def convert_values_to_two_decimal_places_string(dict_: dict[Any, float]) -> dict[Any, str]:
    """Converts the values from floats to strings with two decimal places.

    Args:
        dict_ (dict[Any, float]): The dictionary to convert its values.

    Returns:
        dict[Any, str]: The dictionary with its values converted to a string with two decimal places.

    Usage:
    >>> convert_values_to_two_decimal_places_string({"pi": 3.14159265359})
    {"pi": "3.14"}
    """
    return {key: f"{value:.2f}" for key, value in dict_.items()}

Repro Steps

Create a docstring.
Add {} anywhere inside of it.

Expected behavior
Pylance not considering it as an f-string.
"""
{}
"""

Actual behavior
Pylance considers it as an f-string and adds leading f to convert it to an f-string.
f"""
{}
"""

Logs

Not important in this case.

Thanks for the bug. It should be changed to skip this in doc strings.

This issue has been fixed in prerelease version 2023.7.21, which we've just released. You can find the changelog here: CHANGELOG.md


ephemeral performance fixes

pass bulk upak loads to upak.Batcher
don't lock EK lib on logout/shutdown since this can deadlock if the eklib's lock is held

(ci flake unrelated)


Session Store is Empty After Setting Key and Values

So I'm working with a company API to access organization data. The only problem I'm having is with the session store. I've got a .Net Core 2.1 project and in startup I'm setting up the Session as shown in docs and setting my Timeout to 10 minutes. I've got two methods. SetTokens() and TryGetString(). SetTokens add the string values to the Session.store by using SetString(). I'll check the session store and the key plus their values are visible in the Session.store. All good. But then immediately after when I try to retrieve those values from the Session within the TryGetString(), the store turns out to have no values.
I'm using the standard .Net Core DI to inject a Singleton of the IHttpContextAccessor within the constructor of the class that holds the above two methods. I'm setting a private variable of the accessor to what has been injected which is the standard pattern. I'm using that private variable of the accessor instance to SetTokens() which are the values I need into the store, and the that same variable of the accessor instance to then retrieve those values using TryGetString(). Which stepping through shows the values being set and store, then retrieving shows the store empty with no values.
I don't understand what I'm doing wrong as I thought the session cannot be replaced or duplicated as it counts as the single session created during the startup of the application in the Startup.cs file. I'm showing the class where I'm passing in the accessor, setting it as a private, storing keys, then trying to retrieve keys.
I'm trying not to post too much but if I need to include the Startup.cs or anything else, please let me know and I'd be glad to.
using System;
using System.Collections.Generic;
using System.Net.Http;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;

namespace CHS.SkyApiAuthCodeFlow
{

    /// <summary>
    /// Sets, gets, and destroys session variables.
    /// </summary>
    public class SessionService : ISessionService
    {
        private const string ACCESS_TOKEN_NAME = "token";
        private const string REFRESH_TOKEN_NAME = "refreshToken";
        private readonly IHttpContextAccessor _httpContextAccessor;

        public SessionService(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }

        /// <summary>
        /// Destroys access and refresh tokens from the session.
        /// </summary>
        public void ClearTokens()
        {
            try
            {
                _httpContextAccessor.HttpContext.Session.Remove(ACCESS_TOKEN_NAME);
                _httpContextAccessor.HttpContext.Session.Remove(REFRESH_TOKEN_NAME);
            }
            catch (Exception error)
            {
                Console.WriteLine("LOGOUT ERROR: " + error.Message);
            }
        }

        /// <summary>
        /// Return access token, if saved, or an empty string.
        /// </summary>
        public string GetAccessToken()
        {
            return TryGetString(ACCESS_TOKEN_NAME);
        }

        /// <summary>
        /// Return refresh token, if saved, or an empty string.
        /// </summary>
        public string GetRefreshToken()
        {
            return TryGetString(REFRESH_TOKEN_NAME);
        }

        /// <summary>
        /// Sets the access and refresh tokens based on an HTTP response.
        /// </summary>
        public void SetTokens(HttpResponseMessage response)
        {
            if (response.IsSuccessStatusCode)
            {
                string jsonString = response.Content.ReadAsStringAsync().Result;
                Dictionary<string, string> attrs = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonString);
                _httpContextAccessor.HttpContext.Session.SetString(ACCESS_TOKEN_NAME, attrs["access_token"]);
                _httpContextAccessor.HttpContext.Session.SetString(REFRESH_TOKEN_NAME, attrs["refresh_token"]);
            }
        }

        /// <summary>
        /// Return session value as a string (if it exists), or an empty string.
        /// </summary>
        private string TryGetString(string name)
        {
            byte[] valueBytes = new Byte[700];
            bool valueOkay = _httpContextAccessor.HttpContext.Session.TryGetValue(name, out valueBytes);
            if (valueOkay)
            {
                return System.Text.Encoding.UTF8.GetString(valueBytes);
            }
            return null;
        }
    }
}

Also I'm not sure about number 3., what Table of Contents?
Requests for new Topics

Write a short paragraph describing what the topic will cover.

Write an outline of the proposed topic contents.

Where would you put the topic in the Table of Contents.

If you know who should review the issue, notify them by including @githubID in the issue description.

I'm not sure why the code is getting broken up above like that but it's not messing up the important stuff.

@DanJ210 I fixed it. For an inline code snippet, it would be single backticks. For a code block like that, use three at the top and bottom (```).
RE: Request for new topics ... that won't apply, since this pertains to an existing topic.
RE: Your trouble with session state
I'm sorry to hear you're having trouble.
This probably won't help much, but I just did an overhaul on the topic+sample on https://github.com/aspnet/Docs/pull/7029. That merged yesterday and should go live within 24 hours. However, I don't think it will help in this case. It was more of a re-organization overhaul than a content overhaul. Most of the guidance didn't change.
May I recommend that you open this issue on Stack Overflow. Here, only a handful of cats see your issue, and most of them are doc authors. Please do post back here if you find out the issue because it might be something that we need to address in the topic. If you don't reach a conclusion on Stack Overflow within a few days, I recommend opening an issue on the aspnet/Home repo. Cross-link this issue into that issue so that we can track how it progresses.

Ok I will try and report back.

I'm not really getting anywhere with stack overflow. I've had one person try and help but even he can't figure it out and I've posted pretty much the whole project. The session is getting a new ID when I believe a new ID means it's a new session so the old values that I've saved are gone. But I don't know how the session is getting a new ID because and AddSingleton DI is controlling the IHttpContextAccessor so unless I restart the application, the session within that accessor should be the same even if I'm navigating to an API Auth endpoint to authenticate a user against an API. When I return from that it seems the session gets replaced.

Create an issue in the aspnet/Home repo issues. The engineers are watching there, and they'll triage your issue to either the correct repo or provide assistance on-the-spot.
You can post what you provided here :point_up: or load the code into a repro project on GH and link to the repro file from the issue.
Please ping me on the issue, cc/ @guardrex, and I'll keep tabs on the discussion.

Yes I meant to open on the Home repo. Thanks. I'll link back to this. I have sensitive app keys so if I create a repo I'll have to exclude those files which will mean that the app cannot be run. But at least the code can be seen.

Sorry, one last thing. I don't know how to ping you. When I try to @guardrex your name it doesn't come up. I'm not clear on how to use the cc/ unless I'm just supposed to type 'cc/ @guardrex' and it's in there as plain text.

Yes ... put cc/ @guardrex at the bottom of the initial opening comment and every response on the issue will automatically generate an email to me.

Ok. Thanks.

We have a topic for IHttpContextAccessor now and the App state topic has been overhauled since this issue. I don't think there's anything else actionable here.

I created my own store for the time being. Nothing else can be done here. Thanks for the help @guardrex


add ctime (created time) and mtime (modified time) to execution nodes

.

ctime and mtime are "auto grouped", especially when compared to created and modified


Disable grafana-dev test in canary environment

ref: https://github.com/open-cluster-management/backlog/issues/13015
Signed-off-by: clyang82<EMAIL_ADDRESS>

/assign @morvencao

/retest


feat: add platform mobile as a seperate platform which targets both ios and android

This targets the common case where the feature layer is shared on android and ios.

Done


[CMS-295] Correct documentation to match script. Add TODOs for things we

should reconsider or change.

Please test this before merging.


Generation not following the constraints when validator is specified

Description
The generator is not following the constraints when a custom validator is specified.
URL to code causing the issue
No response
MCVE
from pydantic import validator
from polyfactory.factories.pydantic_factory import ModelFactory

class Product(BaseModel):
    price: float = Field(Required, description="Price of the product in dollars (> 0).", gt=0)

    @validator("price")
    def process_price(cls, value): return round(value, 2)

class ProductFactory(ModelFactory[Product]):
    __model__ = Product

for e in range(1000):
    Product(**ProductFactory.build().dict())

Running this code results in:
pydantic.error_wrappers.ValidationError: 1 validation error for Product
price
  ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)

Steps to reproduce
Just run the given code.

Screenshots
No response
Logs
No response
Litestar Version
Not sure what Litestar is.
Platform

[ ] Linux
[X] Mac
[ ] Windows
[ ] Other (Please specify in the description above)

By constraint you mean the gt value specified in field or the logic in validator?

@Goldziher I can attest that it happens for the gt values specified.
This is because field_info somehow loses the values of metadata inside PydanticFieldMeta.from_field_info despite having it in cls.__model__.model_fields.items() in the ModelFactory.get_model_fields classmethod.
                cls._fields_metadata = [
                    PydanticFieldMeta.from_field_info(
                        field_info=field_info,
                        field_name=field_name,
                        random=cls.__random__,
                        use_alias=not cls.__model__.model_config.get("populate_by_name", False),
                        randomize_collection_length=cls.__randomize_collection_length__,
                        min_collection_length=cls.__min_collection_length__,
                        max_collection_length=cls.__max_collection_length__,
                    )
                    for field_name, field_info in cls.__model__.model_fields.items()
                ]

Aside from gt etc constraints, does polyfactory take into account @validator at all? I looked at it briefly but didn't find any (obvious) reference. Also can't tell how the field_info, _fields_metadata etc mentioned above are related to this.

Aside from gt etc constraints, does polyfactory take into account @validator at all? I looked at it briefly but didn't find any (obvious) reference. Also can't tell how the field_info, _fields_metadata etc mentioned above are related to this.

I don't know whats happening there. We don't do anything with valudators. Maybe pydantic modifying some values.

What's happening is that first polyfactory creates correctly a value greater than zero, but sometimes that's close to zero say 0.00234. Then the validator above returns round(0.00234, 2) == 0 and when passed back to the constructor it fails the constraint validation. If polyfactory doesn't do anything with validators, that explains the issue.

Wow, great catch !
So basically the issue is that the pydantic validator is either imprecise or it modifies the input?

Not sure what you mean by imprecise but yes Pydantic (ab)uses the term "validator" to include parsing of input data:

validators allow complex data schemas to be clearly and easily defined, validated, and parsed.

Calling something like round(value, 2) a "validator" or even "parser" seems like a stretch, it's more like a general value transformer. Terminology aside, the issue here is more subtle:

The originally posted MCVE is not a polyfactory bug or missing feature; the test is wrong. What the test does is equivalent to the following:

    # this works:
    # (a) the input is greater than 0
    # (b) the output is rounded to 2 decimals
    p = Product(price=0.000234)
    assert p.price == 0.0

    # This fails: the rounded value is not greater than 0
    Product(**p.dict())

Basically the specific model definition does not roundtrip: the usually expected deserialize(serialize(model)) == model invariant does not hold. This may (or may not) be ok but it has nothing to do with polyfactory.

By default the @validator decorator applies after regular field validation (e.g. the gt check in the MCVE). This can change by passing pre=True to cause the validator to be called prior to other validation, for example:

    @validator("price", pre=True)
    def process_price(cls, value):
        return round(value, 2)

Now Product(price=0.000234) is invalid so in this case polyfactory should not have generated this value for price.

Even without pre=True, a validator can always raise an error:

validators should either return the parsed value or raise a ValueError, TypeError, or AssertionError (assert statements may be used).

For example say the price validator was like this:

    @validator("price")
    def process_price(cls, value):
        value = round(value, 2)
        assert value > 0
        return value

Just like in case (2), Product(price=0.000234) is invalid and polyfactory should not have generated this value for price.

Closing this since supporting custom validators wouldn't be possible. @HarshTrivedi, if you meant something else, please feel free to reopen the issue.


Weird text justification (not just for titles)

The issue discussed here seems to apply to all text in the document, not just titles. Periodically throughout my document, there will be lines of otherwise normal text that appear very stretched out, with the equivalent of a hundred or more spaces between words.
Is there a workaround for this? I'd be content with just disabling justification completely.

+1 for Option to disable completely.  Never want full justification.

Closing this. Text justification is disabled in the v5 (https://stackedit.io/app)


Fix graceful shutdown (#363)

Motivation:
Graceful shutdown has been broken since the streaming rewrite. It only
worked for HTTP/1 traffic.
Modifications:

Rename GracefulShutdownHandler to GracefulShutdownSupport

Make it an abstract class and provide two implementations; the
default one and the disabled one
GracefulShutdownSupport is not a ChannelHandler anymore but just a
utility class

HttpServerHandler now requires GracefulShutdownSupport to count the
number of pending responses.
Add more tests and improve the existing ones in
GracefulShutdownIntegrationTest

Result:

Graceful shutdown should work as expected.
Fixes #363

@anuraaga @jonefeewang PTAL

Current coverage is 65.34% (diff: 96.55%)

Merging #371 into master will increase coverage by 0.10%

@@             master       #371   diff @@
==========================================
  Files           341        341
  Lines         13660      13665     +5
  Methods           0          0
  Messages          0          0
  Branches       2044       2042     -2
==========================================
+ Hits           8912       8929    +17
+ Misses         3800       3790    -10
+ Partials        948        946     -2

Powered by Codecov. Last update 34be4ef...886efeb

LGTM, thanks!

LGTM.

Thanks for reviewing, everyone!


Problem to send emoji

Hi everyone,
I am having problem with emoji send.
I have this kind of message:
"somebody commented on your post: Bla bla bla \ue415"
but this arrives:
"somebody commented on your post: Bla bla bla ?"
How can I fix this?

This problem still exists. Please see https://github.com/iamcal/php-emoji/issues/8#issuecomment-22218428


Start - end time

Checklist

[x] I'm asking a question
[x] I've looked through the README and FAQ for similar questions
[x] I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE
First, thanks for such a handy tool as youtube-dl.
Reading the documentation in the OUTPUT TEMPLATE section, I found allowed names such as start_time and end_time. The question is, can I use Python to somehow access them, and not just through cmd?

https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303

do you have some function, which can download video from youtube from start_time to end_time?


[WIP] example form: Form step headings

Resolves Intopia UT 1: Text should be a heading - remove span (339996).

On each new page of the form, the form name/section text is styled and positioned like a heading but is marked up using a <span>

As per their suggestion, we've addressed this problem by merging the form title (span) with the page title (H1).

As far as the code is concerned, we've created a FormStepTitle component to replace the PageTitle in Form step pages only. There is no visual difference, but there are semantic difference with the headings.
Checklist

[ ] Read and check your code before tagging someone for review.
[X] Run yarn format
[X] Run yarn lint in the root of the repository to ensure tests are passing
[X] Run yarn test to ensure tests are passing. Run yarn test -u to update any snapshots tests.

Need to test with other screen-readers to verify the approach


⚠ Contemporanea has degraded performance

In 04d1c18, Contemporanea ($SITE_CNTM) experienced degraded performance:

HTTP code: 200
Response time: 5621 ms

Resolved: Contemporanea performance has improved in 27ca723.


support fusiform-similarity API

sources = g.V().hasLabel("ip").limit(200000);
edgeLabel = graph.schema().getEdgeLabel("ip_xid");
direction = com.baidu.hugegraph.type.define.Directions.OUT;
minNeighborCount = 4;
alpha= 0.8;
degree = -1;
minSimilars = 20;
top = 100;
groupProperty = null;
minGroupCount = -1;
capacity = -1;
limit = -1;
withIntermediary = true;

traverser = new com.baidu.hugegraph.traversal.algorithm.FusiformSimilarityTraverser(graph);
result = traverser.fusiformSimilarity(sources, direction, edgeLabel,
                                      minNeighborCount, alpha, minSimilars, top,
                                      groupProperty, minGroupCount, degree, capacity, limit,
                                      withIntermediary);

// result.toMap()
g.V(result.vertices())


Sp 1013

Purpose

Update java version from version 11 to 17. Fixes #1013.
Remarks

PR introduces (a) breaking change(s): yes
PR introduces (a) deprecation(s): no

@bossenti thanks, I've updated the README - is there any other place you are aware of where we need to update the version?

None that I'm aware of


Publish Python protobuf classes to PyPI

It should be possible to import & use foxglove protobuf classes from PyPI without running protoc manually.

Done in https://github.com/foxglove/schemas/pull/74


Oneramp grant proposal

Project Abstract

Please replace these instructions with a brief description of your project summarising key points (1-2 paragraphs).
If your application is a follow-up to a previous grant, please mention which one in the first line of the abstract and include a link to previous pull requests if applicable.

Grant level

[ ] Level 1:  Up to $10,000, 2 approvals
[ ] Level 2:  Up to $30,000, 3 approvals
[x] Level 3:  Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied and aptly renamed (project_name.md).
[x] I have read the application guidelines.
[x] Payment details have been provided (Polkadot AssetHub (USDC & DOT) address in the application and bank details via email, if applicable).
[x] I understand that an agreed upon percentage of each milestone will be paid in vested DOT, to the Polkadot address listed in the application.
[x] I am aware that, in order to receive a grant, I (and the entity I represent) have to successfully complete a KYC/KYB check.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[ ] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
[ ] I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

Thanks for the application @eliashezron there are no deliverables present for milestone 2. Could you add a second milestone table similar to the one that was filled in for M1? I will also make a few suggestions to remove template text.


Sync eng/common directory with azure-sdk-tools for PR 3457

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/3457  See eng/common workflow

/azp run js - storage-blob - tests, js - keyvault-secrets - tests, js - eventhubs-checkpointstore-blob - tests

/check-enforcer override


How can i cover the entry.app settings in --target app?

What problem does this feature solve?
1.I don't want to use ./src/main.ts;
2.I don't need the app output;
Whether to empty configureWebpack.entry.app or to remove ./src/main.ts will throw out error.
What does the proposed API look like?
none.

Hi, GitHub issues are only for bug reports and feature requests. If you need help, please ask on the forums or the discord.


Add page indicator for albums

Just a thing that says 1 / 45 or something like that to tell you what page you're on.

It's actually there but black. I have fixed it


Add param for a preloaded GTM Container + datalayer

Thanks for the PR! Excuse my tardiness, life gets in the way sometimes :)


[RESTEASY-1659] changed the algorithm for HEADER putAll and added tes…

…t for change

see detailed comments about this proposed fix here, https://issues.jboss.org/browse/RESTEASY-1659

Thanks for the fix @rsearls.
How is it possible to see comments in RESTEASY-1659? Even being logged-in I don't see any comments, however I receive them by email.

Does anyone know if a distinction is being made?

As you have correctly noted, if one needs to append he should call addAll().

Hi @dmak.   We have a way of tagging comments for employees only.  I've untagged my description of the
analysis of the cause of the bug.  Check the jira and you should see it.


Remove outdated EPEL 9 workaround

Sync of downstream change: https://src.fedoraproject.org/rpms/packit/pull-request/1402

/packit-stg build


Publish to Maven Central.

Are you open to publishing releases to Maven Central?
I know you have your own repository but it makes things easier for consumers of the library to use Maven Central and there's overhead in pulling libraries from multiple repositories.  Also, we know that Maven Central won't go away any time soon but it would be possible for your domain to expire etc.
Sonatype has good documentation on the steps involved.
Thanks!

I'm travelling at the moment, I'll get back on beginning of May.

I'm also keen to see this thanks.

Hi,
I had a go at this (publishing to Maven Central) and got as far as creating the groupId 👍
https://issues.sonatype.org/browse/OSSRH-27013
but having gone through the documentation it seems to me that this is going to use more of my time than I'm willing to put into this.
So unless someone steps up with a more or less complete pull request that accomplishes this, then this is not going to happen anytime soon, so I'm closing this.
Feel free anyone to open this again if you have something to contribute.

Ooops, I just remembered/noticed the pull request by masterav10, I will have a look at that.

I may have succeeded in publishing to a sonatype manven central. Please test if you can access it.
FWIW, this is what the Nexus Repository Manager shows for 'maven':

com.github.purejavacomm
purejavacomm
1.0.1.RELEASE

As a matter of fact, you did solve it. Just tested using maven central through gradle, and I was able to download using the new groupId. I'm going to make a pull request to update the README to show both gradle and maven links.

Great, hope it helps people who use Maven / Gradle. Thank you very much for your, like I said, this would not have happened without your contribution. Even with that it more time than I had anticipated.


Hot key should be rotatable without a TSS generation event.

The hot key is required to be online and therefore is a higher risk of compromise or theft. It should be to possible to replace or rotate the Hotkey without requiring a new TSS regeneration.

Added observer tag, it would be a new message in the protocol to transfer the observer address.


QImage::isNull Segmentation fault

In dev branch in ModelPC::decrypt, I added check for if image is null (see code), but when I tested it with null image, the qt called segmentation fault. What's wrong?
QByteArray ModelPC::decrypt(QImage * image, /*...*/)
{
    //...
    if(image->isNull()) {  ---  Segmentation fault
        fail("nullimage");
        return nullptr;
    }
    //...
}

Image in this case is nullptr

Pretty obvious, problem not in the QImage::isNull, but in *nullptr ... New code:
image == nullptr || image->isNull(), but not
image->isNull() || image == nullptr, because if image = nullptr it will be calculated first and fault will appear.


Review Journal design

The journal table needs to be reviewed

Looks good for now. Later we'll need to match the specific table columns output by the backend, but that doesn't matter too much for the sake of the mock 👍  nice one!


footer links css improvement needed

footer links on-hover-underlines need to be removed and hover transform: xtranslate(10px) needs to be added.
assign me this issue under apertre

Go ahead

@UjjwalSharma01 pr sent #138


System.Reflection.ReflectionTypeLoadException in :0

Error in NuGet Package Explorer
System.Reflection.ReflectionTypeLoadException in :0
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
View on Bugsnag
Stacktrace
D:\a\1\s\PackageExplorer\App.xaml.cs:53 - PackageExplorer.App.get_Container()
D:\a\1\s\PackageExplorer\App.xaml.cs:62 - PackageExplorer.App+<Application_Startup>d__4.MoveNext()
:0 - PackageExplorer.App.Main()

View full stacktrace
Created automatically via Bugsnag

An error linked to this issue has been reopened in Bugsnag
System.IO.FileNotFoundException in :0

An error linked to this issue has been marked as fixed in Bugsnag
System.IO.FileNotFoundException in :0


RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same

Hi
I am trying to train - cascade_mask_rcnn_hrnetv2p_w32_20e_coco with custom dataset using tools/train.py.
python ../mmdetection/tools/train.py ./model/cascade_mask_rcnn_hrnetv2p_w32_20e_coco.py
I am getting following error -
Traceback (most recent call last):
  File "../mmdetection/tools/train.py", line 189, in <module>
    main()
  File "../mmdetection/tools/train.py", line 185, in main
    meta=meta)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/apis/train.py", line 174, in train_detector
    runner.run(data_loaders, cfg.workflow)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train
    self.run_iter(data_batch, train_mode=True, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter
    **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 67, in train_step
    return self.module.train_step(*inputs[0], **kwargs[0])
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/models/detectors/base.py", line 238, in train_step
    losses = self(**data)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 98, in new_func
    return old_func(*args, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/models/detectors/base.py", line 172, in forward
    return self.forward_train(img, img_metas, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/models/detectors/two_stage.py", line 127, in forward_train
    x = self.extract_feat(img)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/models/detectors/two_stage.py", line 67, in extract_feat
    x = self.backbone(img)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/mmdet/models/backbones/hrnet.py", line 547, in forward
    x = self.conv1(x)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 399, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/home/neosis/miniconda3/envs/mmdet/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 396, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same

Will you be able help or provide some pointers on what could be amiss?
Best
Ashutosh

Solved by using to_float32


Add topic checking config to default config of embeded mqtt server

Description:
In hbmqtt 0.9.3, a topic checking feature added' which required default config have to include topic-check section.
See #16356
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:

[ ] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

@fabaff could you help to validate this fix?


Events infinite scrolling

Add infinite scrolling for events. The goal is to ensure that the feature works as expected before expanding it to all other queries (transactions, submissions, registry entries).
With the changes in place, events are not retrieved 10 at a time. When scrolling down, 10 more will be incrementally loaded until all events have been loaded. Visually the UI should feel virtually identical. It may load slightly faster at first since we are now fetching fewer results. The way to perform the pagination is done based on https://github.com/kaleido-io/paladin/blob/63f3ef44541245a56aea7c2434bc53191ab33271/core/go/pkg/blockindexer/event_streams.go#L542-L546.
This can be seen applied in ui/client/src/queries/events.ts as follows:
 let requestPayload: any = {
    jsonrpc: "2.0",
    id: Date.now(),
    method: RpcMethods.bidx_QueryIndexedEvents,
    params: [
      {
        limit: constants.EVENT_QUERY_LIMIT,
        sort: ["blockNumber DESC", "transactionIndex DESC", "logIndex DESC"],
      }
    ]
  };

  if (pageParam !== undefined) {
    requestPayload.params[0].or = [
      {
        "lessThan": [
          {
            "field": "blockNumber",
            "value": pageParam.blockNumber
          }
        ]
      },
      {
        "equal": [{
          "field": "blockNumber",
          "value": pageParam.blockNumber
        }],
        "or": [
          {
            "lessThan": [{
              "field": "transactionIndex",
              "value": pageParam.transactionIndex
            }]
          },
          {
            "equal": [{
              "field": "transactionIndex",
              "value": pageParam.transactionIndex
            }],
            "lessThan": [{
              "field": "logIndex",
              "value": pageParam.logIndex
            }]
          }
        ]
      }
    ]
  }

Infinite scrolling has been added to the indexer. Transactions and events are now loaded 10 at a time. Note that the logic for retrieving receipts and full transactions had to be updated in order to fetch those incrementally.
Infinite scrolling as also been added to the submissions panel.
In all cases, 10 items at a time are being retrieved. When scrolling, 10 more will be incrementally loaded.

With regards to the registry, that is something that will likely require a conversation before we go ahead and add infinite scrolling. This is because currently the UI is making some seamless simplification of the data by aggregating the entries from all registries in one list. We may want to revisit this and instead show registry entries grouped by registry.


Fix jQuery condition

Throws ReferenceError: Can't find variable: jQuery otherwise

Hi @tlvince can you give more info about the context ? I can't reproduce this error on demo site http://brunob.github.io/leaflet.fullscreen/

Sorry, it's been nine months since I filed this and I don't remember the context. Feel free to close.

:\ sorry for the delay to anwser, closing this one.


Add support for Japanese Shorthand Day of the Week

To the best of my knowledge, the ability to shorthand day of the week in Japanese date-format is impossible. Using this page page, the way the Japanese date format is written is "MM月dd日 (shorthand day of the week written in kanji)".
Support for this would be greatly appreciated. Thanks.

This can be fixed by changing system language to Japanese.


chore: pass token param to release please

Problem
Release please bot is not able to trigger workflows.
Solution
Give him a PAT
Notes
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs

@weboko why was nwaku modified?

hmm, didn't add anything to it and it seems it's not ignored. Does it affect something?


introduce stan arrays at first use

we currently don't explain what they are but rely heavily on them

as in the list that goes into stan or array[] real in stan? Both seem like good things to touch on

yea agree (was thinking the second but first actually too)


doc(changelog): Revert extra Spinnaker Version 1.19.2

I accidentally re-released 1.19.2; revert the change to the docs so the release time stays correct (and so that the extra deprecated on 1.19.1 goes away).
This reverts commit 51a7e74ec026d83adf35b12f5a69838657c36a65.

I thought I had created this PR yesterday, but I guess I didn't...


Issue4979

The incorrect filename in the comments (Doxygen field) is changed.
Fixes issue #4979

Thanks! applied to master


Istio 1.4.0 tracing service moved from port 80 to 9411

Bug description
In istio 1.4.0, tracing.istio-system has moved from port 80 to 9411.  There is already a zipkin.istio-system service in the namespace on 9411.  Both services point to the same workload (Jaeger).
This is a breaking change for us so just wondering why it was made and if it was intentional, it should have been in the upgrade notes (as we have upstream systems talking to tracing.istio-system).
Expected behavior
Consistent service ports between releases or details in release notes explaining the changes.
OR if you're really honouring semver releases, 1.4.0 shouldn't have breaking changes from 1.3.x and a different service port could probably be classed as breaking.
Steps to reproduce the bug
Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)
1.4.0
How was Istio installed?
Environment where bug was observed (cloud vendor, OS, etc)

Associated commit appears to be https://github.com/istio/istio/commit/9e0887f5cef4ef4038f464e113be28d02937c782#diff-264788198be8f0b9371c31fecce6d199 and issue https://github.com/istio/istio/issues/17204

Nodeport more trouble then it is worth...  These two PRs need a revert.  The author is free to resubmit the work.

Had a deeper look at the PR.  With istioctl dashboard jeager for example, none of these config options are needed across any of the third party component charts.  We should consider their removal.
@Stono for the moment, I am going to make a small surgical change that should exhibit the original behavior.

Thanks @sdake - no huge urgency on my part, I've patched around it locally.  Just don't want other users getting caught out when they upgrade to 1.4.0.

@Stono this was fixed by an unrelated commit that syncronized the operator with the installer charts after my PR to fix the installer charts had merged for 1.4.
Cheers
-steve

verified 1.4-dev (what will be 1.4.1) operator instantiates the services as follows
...
tracing                  ClusterIP      <IP_ADDRESS>    <none>          80/TCP                                                                                13s
zipkin                   ClusterIP      <IP_ADDRESS>    <none>          9411/TCP                                                                                14s

Cheers
-steve


SMART-141 Do not split WinRM into separate streams, keep all in one

Signed-off-by: Mykola Mandra<EMAIL_ADDRESS>

looks good.  will review UI side before merging for good measure.

Test changes will follow in this PR, merge is ready after.

looking at the UI PR https://github.com/apache/brooklyn-ui/pull/196 you are showing the win/powershell filter controls on any stream that looks like powershell CLI XML.  so here i think we don’t need a special stream for winrm , we can just use the default behaviour of sending it in stderr … and the UI will figure out it to render it as CLI XML.

Adjusted unit-test and live test for a single WinRM stream.

Changes in XML formatter address issues of odd offsets in CLI XML content supplied in the WinRM stream.


Missing stateMutability field in Function's ABI.

The FunctionAbiEntry struct is missing the stateMutability field from the compiled .json.

Sorry, I think this is not needed.


Problems after project updated to v6-preview5

My code was working using preview3 but after the update to oreview5:
using Finbuckle.MultiTenant.EntityFrameworkCore; - does not exist, ok, I have removed it
but  this cannot be compiled because MultiTenantDbContext is unknown
 public partial class dbContext : MultiTenantDbContext
    {
        bool bSnake = false;

        public PMdbContext(ITenantInfo tenantInfo) : base(tenantInfo)
        {
        }

How to fix the code (worked with preview 4)?

Ho @win32nipuh can you post your csproj file and your context class? Or email to me if you don’t want to post it?

Hi Andrew, ok.

@win32nipuh in the project file you sent I don't see a package reference to Finbuckle.MultiTenant.EntityFrameworkCore
Also you'll need to update your Microsoft EF Core references to 3.1.4-- I should not require this in the final release.

Thanx, it fixed.
The next question: I edit my application which was working using preview-3.
The existing code:
services.AddMultiTenant<DerivedTenantInfo>()
                    .WithStore<ConfigurationStore<DerivedTenantInfo>>(ServiceLifetime.Singleton)
                    .WithHostStrategy(tenantSettings.HostTemplate)

or
                services.AddMultiTenant<TenantInfo>()
                .WithConfigurationStore()
                .WithRouteStrategy();

In both cases:
1>Startup.cs(70,18,70,35): error CS1061: 'FinbuckleMultiTenantBuilder<TenantInfo>' does not contain a definition for 'WithRouteStrategy' and no accessible extension method 'WithRouteStrategy' accepting a first argument of type 'FinbuckleMultiTenantBuilder<TenantInfo>' could be found (are you missing a using directive or an assembly reference?)

1>Startup.cs(77,22,77,38): error CS1061: 'FinbuckleMultiTenantBuilder<DerivedTenantInfo>' does not contain a definition for 'WithHostStrategy' and no accessible extension method 'WithHostStrategy' accepting a first argument of type 'FinbuckleMultiTenantBuilder<DerivedTenantInfo>' could be found (are you missing a using directive or an assembly reference?)

How to fix this code for using preview-6 ?


Fix update-antora-ui-spring README example

Move the step that updates only one branch to a different job, avoiding running it multiple times since the previous job used a matrix strategy

Thanks for the Pull Request! This is now merged into main :smile:


[FR] button to open contents of code block in code editor

If I want to make changes to the code with the full power of a code editor, it would be cool if I could open the contents of the code in an individual block in vscode, for example.

if run-javascript for example, then open open in vscode with syntax highlighting of .js file:
ex:
function multiple(x) {

    function fn(y)
    {
        return x * y;
    }

    return fn;
}

var triple = multiple(3);
triple(2); // returns 6
triple(3); // returns 9
console.log(triple(2));

Would this open the Markdown file, but with JS language mode on? Or a separate file created for the specific code block?

I see, thanks. Currently, editing the code block content is difficult for the plugin (as we apply buttons to the rendered version -- accessing the source code from the rendered version is hard).
This can definitely be done, but we'd have to get that working first. Thanks!

As @chlohal said, this is hard to do and not part of the near-future roadmap. If you use javascript instead of run-javascript at least the syntax highlighting will still work and you can still run the code in the reading. You can also install the plugin Completr to get an IDE-like auto-completion.

Makes sense, I appreciate the consideration!


cannot start audio_helpers (does not exist - cant fix myself)

Hi, I try to use a raspbery pi zero w with a phat dac and an usb microphone (everything is working, checked that before everything) to run the google assistant.
Here the command and its' response. What am I doing wrong?
Sorry for the dumb question. First raspberry pi zero project...
(env) pi@googleRaspberry1:~ $ python -m audio_helpers
/home/pi/env/bin/python: No module named audio_helpers

If you don't have the source code, but just the library you downloaded through pip, it's a different command that's in our readme.


Whitelisting properties

Any way of whitelisting properties so an unrecognized property fails the validation? Or unrecognized properties get deleted similar to strong_paramaters?

Looks like additionalProperties takes care of this


⚠ Bofrost.be has degraded performance

In 085e9f1, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1797 ms

Resolved: Bofrost.be performance has improved in f3852da.


Add play speed slider

A slider with which you can manipulate the number of steps per second (like NetLogo has) would be really useful.
Make sure if the simulation takes already a bit of time, the step delay isn't added to it, but just is the remainder.
Example: Simulation takes 50ms, and I want to display 10 steps per second. Then only 50ms should be added to get the 100ms desired.
In NetLogo:

Let's see how we can implement this. So far I am not so happy with the simulation speed. It's super random for me, sometimes super slow and sometimes okay ish.

AgentPy has an implementation that modifies speed of visualisation, as can be seen in different examples including this one. Might be interesting for inspiration.