[SB] Internal Detach

If we do trigger a LinkDetach with close=False, the service may send back a DetachFrame with no error code.
In this case, we must set self._error as well in order to signal that our Link has been closed for future operations.

/azp run python - servicebus - tests

API change check
API changes are not detected in this pull request.

/azp run python - servicebus - tests


[HOLD #11768] IOS - Chat - Chat conversation is shifted and Fub menu partially visible after Take a picture and sent it

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Log in with any account
Select any user
Tap on Plus button - Add attachment
Select Take a Photo option
Take a photo
Send Photo

Expected Result:
Chat conversation is not shifted and Fub menu partially is not visible after Take a picture and sent attachment
Actual Result:
Chat conversation is shifted and Fub menu partially visible after Take a picture and sent attachment
Workaround:
Unknown
Platform:

Where is this issue occurring?

iOS (iPhone 8 / iOS 14.20

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/196460149-85638c69-3495-48c0-84a9-ce79e603f195.mp4

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

Issue seems confusing to me. Do you mean the uploaded attachment is rotated 90 degrees ?

Posted to Upwork:
https://www.upwork.com/jobs/~019638fe179bb97460
https://www.upwork.com/ab/applicants/1582975104337997824/job-details

Going to be OOO this next week so unassigning myself

Issue not reproducible during KI retests. (First week)

@kbecciv @mvtglobally please reopen if you can reproduce

Issue is reproduced with build <IP_ADDRESS>
https://user-images.githubusercontent.com/93399543/200349885-af9fd8ed-2577-4431-9af9-006bdc661fd4.MP4

@kbecciv could you please share your phone model and iOS version? I am not able to replicate this on an iPhone 13 with iOS 16.0:
https://user-images.githubusercontent.com/59587260/200745059-c024911c-1a62-44c9-94fa-49167249edb5.MP4

I am also unable to reproduce this on Android (app version v1.2.22-3)

This is IOS app issue only.
Phone model: IPhone 8/14.2

Another tester reported similar issue when creating a new chat, with build <IP_ADDRESS>
lat me know if we need a separate issue for this one.
https://user-images.githubusercontent.com/93399543/201431844-512a89c6-1c46-47f8-abb5-09843a1ea529.mp4

Assigning myself for help "navigating" the tracking issue. I'm also double check that this is linked there. Removing the Help Wanted label until we are off hold.

Also updated the issue description with model/OS for clarity. We may eventually close down the line in light of that information.

Still on hold per the larger initiative in the issue title.

On hold per the larger react navigation initiative.

Same as above.

Still holding, though we're making progress on the larger project.

Still on hold for the navigation project.

Same same.

Stil on hold.

Still on hold.

This is not reproducible anymore and there is nobody to pay for reporting so we can close this issue 🎉


vulnix: init at 1.2.2

Motivation for this change
Vulnix is a tool made for Nix/NixOS, so I guess it should be part of nixpkgs. 😁  Cheers @Mic92 for offering the PR review
Things done

[ ] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

I replaced most new python packages by packages already present in nixpkgs. Since tests are executed by vulnix, this should be a safe operation.

@Mic92 @FRidh Hey guys, do you need additional infos or another changes to push the PR forward?

could you squash all except "pythonPackages.BTrees: 4.1.4 -> 4.3.1"

squashed the commits.


Unicode Input

Julia has a great feature where you can input Unicode characters using LaTeX-like abbreviations. This would be great for Numbats REPLs as well. We could type \pi<tab> to get π or \hbar to get ħ.
Open questions:

It's probably fine to have a list of hard-coded sequences for this. Or should this be fully user-customizable? If so, which (new) construct should introduce those assignments?

I took a quick look at this, and this doesn't seem as trivial as it might initially seem:  rustyline doesn't seem to handle tab completions when the completion (like π) isn't a prefix of the input (like \pi).
Relevant issue: https://github.com/kkawakam/rustyline/issues/593

If it is too hard to do tab completions I think a reasonable alternative could be to allow LaTeX math abbreviations in the REPL input which are not replaced interactively while entering them but which are replaced in a step before passing the input to the actual numbat compiler.

I took a quick look at this, and this doesn't seem as trivial as it might initially seem: rustyline doesn't seem to handle tab completions when the completion (like π) isn't a prefix of the input (like \pi).

It looks like it did support that at some point, because kalker is based on (an old version of) rustyline and it allows you to type sqrt<tab> and it will be replaced by √. Their code is here. I tried something similar using code like this:
diff --git a/numbat-cli/src/completer.rs b/numbat-cli/src/completer.rs
index 572bc55..6746ee8 100644
--- a/numbat-cli/src/completer.rs
+++ b/numbat-cli/src/completer.rs
@@ -20,6 +20,16 @@ impl Completer for NumbatCompleter {
         pos: usize,
         _: &rustyline::Context<'_>,
     ) -> rustyline::Result<(usize, Vec<Self::Candidate>)> {
+        if line[..pos].ends_with("\\hbar") {
+            return Ok((
+                pos - "\\hbar".len(),
+                vec![Pair {
+                    display: "ℏ".into(),
+                    replacement: "ℏ".into(),
+                }],
+            ));
+        }
+
         if line.starts_with("use ") {
             return Ok((
                 0,

but it does not work as expected. Maybe this is a regression in rustyline? Unicode characters also seem to be handled incorrectly, because replacing e.g. h<tab> with ℏ works, but replacing h<tab> with x does not work — only with something longer. So they probably call "ℏ".len() instead of "ℏ".unicode_width() somewhere.

Oh — it works with CompletionType::Circular! But not with CompletionType::List, which is what we currently use in Numbat.


relativistic_correction parameters incorrectly documented

Title says it all:
https://tudatpy.readthedocs.io/en/latest/acceleration.html#tudatpy.numerical_simulation.propagation_setup.acceleration.relativistic_correction

Fix pushed


Show call notification from fcm notification (Android)

How can i show the incoming call notification from a fcm push notification on Android?

Check https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/example/lib/main.dart
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
  print("Handling a background message: ${message.messageId}");
  showCallkitIncoming(Uuid().v4());
}

please check with issue https://github.com/hiennguyen92/flutter_callkit_incoming/issues/182


async example

Hi will the routine resume once it has finished the async operation using await?
I tried your example but I'm unable to get any return from the async function unless I comment out the sleep_for part.

When current routine awaits an async operation, and async operation doesn't finish at once, current routine will yield, then this routine cann't  be resumeb by itself, it must be resumed by other active routine.

I have updated demo code,  added "resume awaiting routine".


sched: task: Fix nxtask_exit() for SMP

Summary

I noticed that nxsched_merge_pending() is called outside a critical section
The issue happens if a new rtcb does not hold a critical section
Actually, global IRQ control is done in nxsched_resume_scheduler() in nxtask_exit()
However, nxsched_merge_pending() was called after calling nxsched_resume_scheduler()
This commit fixes the issue by moving nxsched_merge_pending() before the function
NOTE: the sequence was changed for SMP but works for non-SMP as well

Impact

This commit affects both SMP and non-SMP

Testing

Tested with ostest with the following configurations
spresense:wifi_smp (NCPUS=2 and 4)
spresense:wifi (non SMP)
sabre-6quad:smp (QEMU)
esp32-core:smp (QEMU)
maix-bit:smp (QEMU)
sim:smp
lc823450-xgevk:rndis

@btashton
Could you backport this PR to 10.0?


azure-common: Imports adal/msrestazure but they are not listed as requirements

Package Name: azure-common
Package Version: 1.1.22
Operating System: Fedora 37
Python Version: 3.11.0b3

Describe the bug
The azure-common package imports adal and msrestazure in azure/common/client_factory.py, but neither appear in install_requires within setup.py. That causes an error during Fedora RPM package builds because azure.common.client_factory cannot be imported:
Check import: azure.common.client_factory
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 171, in <module>
    main()
    ^^^^^^
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 167, in main
    import_modules(modules)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 100, in import_modules
    importlib.import_module(module)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 939, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/python-azure-common-1.1.22-1.fc37.x86_64/usr/lib/python3.11/site-packages/azure/common/client_factory.py", line 17, in <module>
    import adal
    ^^^^^^^^^^^
ModuleNotFoundError: No module named 'adal'

To Reproduce
Steps to reproduce the behavior:

Install azure-common in a virtual environment
Run python and type import azure.common.client_factory
Traceback appears

Expected behavior
I expect to be able to import modules from azure.common successfully.
If I manually add msrestazure as a dependency during the RPM build, both msrestazure and adal are installed and all of the import checks pass.

Thanks for reporting the issue.
It is by design that we don't msrestazure and adal libraries.
azure-common is used by both track 1 and track 2 libraries and only track 1 libraries need azure.common.client_factory.
So we decided to make track 1 libraries require msrestazure and adal rather than setting the requirements in azure-common.
Can we disable the auto-importing?
Thanks.


ntpd-rs: fix darwin build

Description of changes
Maybe fixes darwin build. No access to a darwin machine.
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Result of nixpkgs-review pr 311482 run on aarch64-darwin 1

2 packages failed to build:

ntpd-rs
ntpd-rs.man

Now builds since the bump to 1.2.2.


chinese text input and show failed

where i change my ime to chinese mode, input word while became while block.

Duplicate of #33.


MOF file needed for ANCM

Going forward ANCM will have a Trace Provider registered with IIS. The trace provider will be accompanied by a mof file to be consumed by WMI.
We should make sure to check in the mof file so that the installer and any other interested parties can place it as needed.

pull request #603 https://github.com/aspnet/IISIntegration/pull/603

Just fixed in dev.


Parity for ION Tools

full parity with https://github.com/decentralized-identity/ion-tools

test
copilot:poem
other test
copilot:summary

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@3d48dfb). Click here to learn what that means.
The diff coverage is 42.86%.

:exclamation: Current head c48e555 differs from pull request most recent head 54ee3eb. Consider uploading reports for the commit 54ee3eb to get more accurate results

@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage        ?   57.32%
=======================================
  Files           ?       51
  Lines           ?     5916
  Branches        ?        0
=======================================
  Hits            ?     3391
  Misses          ?     1895
  Partials        ?      630

Impacted Files
Coverage Δ

did/ion/operations.go
30.56% <30.56%> (ø)

did/resolver.go
60.98% <46.15%> (ø)

did/web.go
70.34% <57.14%> (ø)

very nice

thanks for the thorough review @andresuribe87 ; should have addressed all


Initial EHR app

Provide an Django app which will be a initial foundation for the Electronic Health Record implementation of ohp.
References:

https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperability_Resources
https://en.wikipedia.org/wiki/Electronic_health_record
https://en.wikipedia.org/wiki/Electronic_health_record#cite_note-103
https://github.com/fhirbase/fhirbase

The models of the this app should be designed to map to http://hl7.org/fhir/resourcelist.html
A non-mandatory good starting point seems:
- Observation
- Patient
- AdverseEvent
- AllergyIntolerance
- CareTeam
- ClinicalImpression
- Communication
- CommunicationRequest
- Condition
- Consent
- DetectedIssue
- DiagnosticReport
- DocumentManifest
- DocumentReference
- Encounter
- Endpoint
- EnrollmentRequest
- EnrollmentResponse
- EpisodeOfCare
- EventDefinition
- Evidence
- EvidenceReport
- EvidenceVariable
- ExampleScenario
- ExplanationOfBenefit
- FamilyMemberHistory
- Goal
- Group
- HealthcareService
- Immunization
- ImmunizationEvaluation
- ImmunizationRecommendation
- ImplementationGuide
- Ingredient
- Location
- Measure
- MeasureReport
- Media
- Medication
- MedicationAdministration
- MedicationDispense
- MedicationKnowledge
- MedicationRequest
- MedicationStatement
- NutritionOrder
- NutritionProduct
- ObservationDefinition
- Organization
- OrganizationAffiliation
- Person
- Practitioner
- PractitionerRole
- Procedure
- RiskAssessment
- Substance
- SubstanceDefinition
- SupplyDelivery
- SupplyRequest
- Task
(Time spent on this and related issues: 3 hours)


feat/work_out_stores

This PR includes:

Stores are created to help keep the connection with the database service as neath as possible.

LGTM!


Mention fetch from URL in get-data

addresses #1641
Note: Didn't run Jekyll, the correctness of the slide syntax is not checked.
Yours, Steffen

Thanks @sneumann!


Update LLVM & TF submodules

An LLVM integrate upstream has broken the build. Let's see if this is all we need to do to fix it.

I'm working on a fix locally and if I find it we should fix+bump in one pr.

I think the issue is that the LLVM integrate hadn't hit tensorflow yet, so I pulled a commit that was too old


Beam SQL Extension raised an error when the input row contained iterable fields

Please add a meaningful description for your change here
Related to : https://github.com/apache/beam/issues/31118
Upon utilizing the Beam SQL within our pipeline, we encountered a noteworthy exception. It appears that when the input row encompasses fields of iterable types, the process fails irrespective of whether the iterable fields are included in the SQL filter condition or not. This issue stems from the fact that the Beam SQL extension attempts to construct an output row schema based on the input schema, and unfortunately, it currently lacks support for iterable types.
Consider the following example:
Given an inputRow in the schema:
field1: String
field2: Integer
field3: Array<String>
field4: ITERABLE

And ANY  Beam SQL condition such as :
field2 > 1
or Even
1 = 1
The pipeline will invariably fail, yielding the following error: Exception in thread "main" java.lang.UnsupportedOperationException: Unable to get ITERABLE at org.apache.beam.sdk.extensions.sql.impl.rel.BeamCalcRel$InputGetterImpl.getBeamField(BeamCalcRel.java:603).
(My first contribution to beam , kindly advise how to test lol)

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

thanks for the fix. While this sounds a valid fix, would you mind sharing the full stack trace. My understanding here is that there are two issues
(1) Beam SQL does not filter out fields not used
(2) Iterable isn't supported by Beam SQL
A full stack will be helpful to investigate (1), and possible optimization
The Iterable field type, introduced in #10003 was meant to be different than ARRAY. However the fix here treats it the same as ARRAY. It may have performance implications, and not work for large iterables? Maybe add a comment here or a TODO.
until it's optimized for Iterable, one can just write
case ARRAY:
case ITERABLE:
    return ....

so no need duplicate the line.
Also, there are switch (fieldType.getTypeName()) branches in several places in BeamCalRel, could it be all fixed for consistency?

@Abacn Sorry, I missed your comments. Was busy with the work and I completely forgot about this issue and did not follow up. I just saw that https://github.com/apache/beam/pull/31588/files fixed this issue.
I will close this PR."


I can still find removed SSN from the repo

In commit aa5e1b6aa116d28b298ff2832c663630138d0769,  you redacted certain SSN numbers for privacy reasons. However, I've discovered a method to retrieve them:

Produce a list of all possible numbers

Remove all entries present in this database from that list.

With this approach, you can now reveal all concealed SSN numbers.
Nobody is safe from this technology.

I believe i address it here https://github.com/PatrickJS/everyone-ssn-usa/pull/4


gitAndTools.delta: 0.4.5 -> 0.5.0

https://github.com/dandavison/delta/releases/tag/0.5.0

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

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

2 packages built:

bat-extras.batdiff
gitAndTools.delta

This is a semi-automatic executed nixpkgs-review. If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108006 run on x86_64-linux 1

2 packages built:

bat-extras.batdiff
gitAndTools.delta

Result of nixpkgs-review pr 108006 run on x86_64-darwin 1

2 packages failed to build:

bat-extras.batdiff
gitAndTools.delta

delta:
failures:

---- main_tests::test_diff_empty_vs_non_empty_file stdout ----
thread 'main_tests::test_diff_empty_vs_non_empty_file' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `1`', src/main.rs:533:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- main_tests::test_diff_same_non_empty_file stdout ----
thread 'main_tests::test_diff_same_non_empty_file' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `0`', src/main.rs:539:13

---- main_tests::test_diff_two_non_empty_files stdout ----
thread 'main_tests::test_diff_two_non_empty_files' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `1`', src/main.rs:533:13

failures:
    main_tests::test_diff_empty_vs_non_empty_file
    main_tests::test_diff_same_non_empty_file
    main_tests::test_diff_two_non_empty_files

test result: FAILED. 208 passed; 3 failed; 6 ignored; 0 measured; 0 filtered out


scopedCSS() returns an error css.replace is not a function

I am trying to compile .riot file that includes SASS(scss) codes with parcel.
But compilation fails with the following error:
🚨  /path-to-my-project/Getup/src/riot/my-app.riot: css.replace is not a function
    at scopedCSS (/path-to-my-project/Getup/node_modules/@riotjs/compiler/dist/index.js:291:14)
    at css (/path-to-my-project/Getup/node_modules/@riotjs/compiler/dist/index.js:339:5)
    at args (/path-to-my-project/Getup/node_modules/curri/curri.js:20:9)
    at args (/path-to-my-project/Getup/node_modules/cumpa/cumpa.js:24:48)
    at compile (/path-to-my-project/Getup/node_modules/@riotjs/compiler/dist/index.js:2024:4)
    at RiotAsset.generate (/path-to-my-project/Getup/node_modules/@riotjs/parcel-plugin-riot/RiotAsset.js:31:25)
Compile the sass code in riot/my-app.riot

Here is my working repository:
https://github.com/nibushibu/Getup/tree/riot4-parcel-scss-in-riot
I'm sorry if I have basically overlooked settings etc. but I would appreciate your advice.

I am sorry but I can not reproduce the issue. Could you please update your riot dependencies?

@GianlucaGuarini Thank you for your reply.
I will try to find out the cause again.

@GianlucaGuarini
I got succeed to compile when I tried to use the callback of registerPreprocessor() that returns css.css.toString():
// riot.config.js
var registerPreprocessor = require('@riotjs/compiler').registerPreprocessor
var sass = require('node-sass')

registerPreprocessor('css', 'scss', function(code, { options }) {
  const { file } = options

  console.log('Compile the sass code in', file)

  const css = sass.renderSync({
    data: code
  })

  return {
    code: css.css.toString(), // here!
    map: null
  }
})

module.exports = {
  hot: false,
  css: 'scss'
}

@nibushibu
Pls try the workaround!
上記の回避策を試してみてください。

@ShiMeiWo Great! Thank you for your suggestion.
I succeeded in compiling scss in .riot file.
ありがとうございます！

@ShiMeiWo that's not a workaround, that's just the new API 😄
I think the css: 'scss' option is not needed either

I think we can close this issue. @nibushibu please let me know if you will find other issue. Thank you guys

Oops, I'm sorry I didn't close it.
Thank you!


all my code disappeared

Issue Type: Bug
all my code just disappeared, the window crashed then i have to re open and when that happend all my code was gone. What to do?
VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 6.3.9600

System Info

Item
Value

CPUs
Intel(R) Celeron(R) CPU  N2840  @ 2.16GHz (2 x 2167)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: disabled_offoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
1.89GB (0.14GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

vscode-intelephense-client
bme
1.4.1

htmltagwrap
bra
0.0.7

bracket-pair-colorizer
Coe
1.0.61

prettier-vscode
esb
5.1.3

php-debug
fel
1.13.0

auto-rename-tag
for
0.1.4

code-runner
for
0.10.0

material-icon-theme
PKi
4.2.0

LiveServer
rit
5.6.1

px-to-rem
sai
1.3.1

bunker
sld
1.1.6

/needsMoreInfo

/needsMoreInfo

its just like that, was working on the js code at that moment then the window crashed and stop working and says i need to re open so i did and then all my js code was gone. The file now in 0 kb and all the code is gone. Dont know what to do. Is not like I didnt save or something, I have several time working on it but now is all gone. Really dont know what to do, cant find any solution dont know where to post

@Reyn52 Sorry about the data loss. @bpasero @Tyriar may have suggestions on recovering the file from VS Code's backups
Also, this could have been caused by one of your extensions. To help us investigate, can you tell us how the window crashed? Was there an error message? Did VS Code just suddenly quit? Has this happened before?

I tried but found nothing in backups, That's why I posted it here. Search in every single folder and there wasnt any thing to backup just found workspaces or something like that .json files I think.
I post the extensions I have if you can see.
And yes, is not the first time that the window crashed, but it was the first time I lost everything. You see, this computer doesnt have too many ram and when I'm doing something I have to just open the page that I'm working on and the vs code program, if I open to many tabs on firefox or any other programs they suddenly crash and have to be closed. So that is why I'm kind of use to crashes, even the vs code as I say, has crashed before and I just click on re open and close programs to save ram and normalize things. But this time, I dont know why it erase all my code, not just the code I writte at that time or that day, but all the code suddenly go to 0.
And btw the vs code never show any error message, or not something meaningful, just the window that says it crashed and if I want to re open or close and thats all I think.
I need to know if that is normal or if is a one time thing and if there is any solution in case it happends again to me or anyone (I hope no, I really wanted to cry). I found the way to keep things backup now with git, I'm new on this and learning along the way.
And if there's no solution at least have record of this problem.
PS: Luckily I had sent a copy with my code several days ago and at least I didnt have to start over again from 0 but for now I'm stuck with this computer and is all that I have and I know that it will keep crashing, already happend once today but with no code lost. So any advices or solution for the problem will be great.

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!


Asynchronous Collection Loading and Searching

I'm having problems searching.
I am using promises to search a collection which is asynchronously loaded. In my controller have the following function which is called to build a list of projects, which is injected into my view using controllerAs:
function getProjects() {
    var searchParams = angular.extend({}, $scope.search);
    if (!searchParams.title) delete searchParams.title;
    if (searchParams.state === 'ANY') delete searchParams.state;
    dbs.getProjects().then(function(projects) {
      Projects.list = projects.find(searchParams);
      Projects.count = Projects.list.length;
      console.log('list',Projects.list);
    });
  }

The controller uses a service (dbs) to get or load the projects collection:
var db = new loki('admin.json');
var projects = db.getCollection('projects') || db.addCollection('projects', {indices: ['id','access','type','state','title']});
this.getProjects = function() {
    return $q(function(resolve, reject) {
      if (projects.data.length > 0) return resolve(projects);
      ps.getProjects({page: 1, pagesize: 1000})
        .then(function(projectsAtomFeed) {
          var projectEntries = projectsAtomFeed.getEntriesByType('relations/project');
          projectEntries.forEach(function(entry) {
            projects.insert({
              id: entry.id.replace('urn:rel+uuid:project/',''),
              title: entry.title,
              description: entry.summary.projectDescription,
              access: entry.summary.projectAccess,
              type: entry.summary.projectType,
              state: entry.summary.state
            });
          });
          return resolve(projects);
        });
    });
  };

So if the projects collection is already loaded, it returns immediately and is available for searching.
My problem is the find method does not always work. For example, I never get correct results for "type". I suspect this has to do with the asynchronous nature of my code.
What is the right way to asynchronously populate and then search a collection?

Without a sample I can attach a browser debugger to, the first thing I would recommend testing is removing some or all of your indices to see if it is a problem with index generation / usage.  Functionally your find operations should work the same whether indexed or not.  If it works without any indexes, you can add them back and see if it functions differently when indexed.

Hi, would you be able to create a plunker for this so i can give it a go?
On Tue, Mar 17, 2015 at 2:38 PM, obeliskos<EMAIL_ADDRESS>wrote:

Without a sample I can attach a browser debugger to, the first thing I
would recommend testing is removing some or all of your indices to see if
it is a problem with index generation / usage. Functionally your find
operations should work the same whether indexed or not. If it works without
any indexes, you can add them back and see if it functions differently when
indexed.
—
Reply to this email directly or view it on GitHub
https://github.com/techfort/LokiJS/issues/104#issuecomment-82387745.

@techfort and @obeliskos Thanks for looking at this.
I'll try to create  plunkr but I'll probably have to mock the data. I won't be able to get to it for a few hours.

I haven't been able to get a plunkr working but I have discovered that find works for the first parameter of the search query only. Does LokiJs support compound filters? From the code, it appears so. However, if I find using a single filter, it works:
projects.find({'access': 'OPEN'}) //works

But if I search based upon compound filters, it ignores everything after the first filter:
projects.find({'access': 'OPEN', 'type': 'INDEXING'}) //ignores type filter.

On a hunch, I removed the indices. That didn't help. It still ignores all but the first filter.
My conclusion. I must be doing something wrong. Can you enlighten me?

Not implemented that notation yet but this should work :
projects.find({'$and' : [
  {'access' : 'open'},
  {'type' : 'INDEXING'}
]);

Will look into adding your (mongo) syntax above as comma separated implicit 'and' op.
We also support chaining if you don't need strict mongo compatibility, that might look like :
projects.chain().find({'access': 'open'}).find({'type': 'INDEXING'}).data();

Only one index is used for $and ops so make the first query expression the most likely to filter out records.

@obeliskos Thanks for pointing me in the right direction! Do you want me to close this?

Since implementing the $and op, it seems the syntax you were attempting is probably the most common.  I will probably be adding support for that syntax soon if performance is not impacted severely.
Sure you can close this and/or create an issue for request of feature.  Otherwise I will close in a bit.


Could NOT find GMock (missing: GMock_DIR)[Your bug title]

I am using Ubuntu 18.04
I have installed Gmock using
sudo apt-get install -y google-mock
But when I am running the cmake command
it throws error
-- gtest found: (include: /usr/include, lib: /usr/lib/libgtest.a;/usr/lib/libgtest_main.a
-- Could NOT find GMock (missing: GMock_DIR)
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GMock (missing: GMOCK_MAIN_LIBRARY GMOCK_LIBRARIES
GMOCK_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindGMock.cmake:30 (find_package_handle_standard_args)
cmake/TestUtils.cmake:24 (find_package)
CMakeLists.txt:104 (include)
-- Configuring incomplete, errors occurred!

@Shridharpawar77 — you need sudo apt install -y libgmock-dev -- the package you're using doesn't actually have the shared libraries or headers needed to compile. Installing libgmock-dev will fix your problem.

@Shridharpawar77 — you need sudo apt install -y libgmock-dev -- the package you're using doesn't actually have the shared libraries or headers needed to compile. Installing libgmock-dev will fix your problem.

sudo apt install -y libgmock-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgmock-dev

libgmock-dev is actually not available as a package.

@Recluse58 Which OS are you on? It's available in Ubuntu 20.04 and 18.04.

@Recluse58 Which OS are you on? It's available in Ubuntu 20.04 and 18.04.
You can also build it from source: https://github.com/google/googletest

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
Yeah I am also using 18.04. But apt-get simply doesn't locateit.

@Recluse58 the Ubuntu 18.04 package only contains the gmock source, and isn't prebuilt (https://packages.ubuntu.com/bionic/i386/google-mock/filelist), so you would still need to build from source.
If you removed your gtest installation and clear your build directory, Flashlight will also download and build gtest and gmock for you

@Recluse58 the Ubuntu 18.04 package only contains the gmock source, and isn't prebuilt (https://packages.ubuntu.com/bionic/i386/google-mock/filelist), so you would still need to build from source.
If you removed your gtest installation and clear your build directory, Flashlight will also download and build gtest and gmock for you

I build googletest from source on CentOS and add bin/header into PATH. However, I also get Could NOT find GMock (missing: Gmock_DIR), but it found gtest. WHY?
thanks a lot.


No autocomplete when typing

What version of Vim/Gvim are you using?

Vim channel logfile: /var/folders/2h/fs20m5d15p59qn_30g437b000000gn/T//vim_channel_log_20190504_1214_24_PpErcGaKwOle
govim logfile: /var/folders/2h/fs20m5d15p59qn_30g437b000000gn/T/govim_20190504_1214_24.201210000_934655886
Do the Vim channel or govim log files show anything interesting?

2019-05-04T12:14:24.327893: gopls server start =======================
2019-05-04T12:14:24.327893: gopls.Initialize() return; err: ; res:
2019-05-04T12:14:24.327893: &protocol.InitializeResult{
2019-05-04T12:14:24.327893:     Capabilities: protocol.ServerCapabilities{
2019-05-04T12:14:24.327893:         TextDocumentSync: map[string]interface {}{
2019-05-04T12:14:24.327893:             "openClose": bool(true),
2019-05-04T12:14:24.327893:             "change":    float64(1),
2019-05-04T12:14:24.327893:         },
2019-05-04T12:14:24.327893:         HoverProvider:      true,
2019-05-04T12:14:24.327893:         CompletionProvider: &protocol.CompletionOptions{
2019-05-04T12:14:24.327893:             TriggerCharacters:   {"."},
2019-05-04T12:14:24.327893:             AllCommitCharacters: nil,
2019-05-04T12:14:24.327893:             ResolveProvider:     false,
2019-05-04T12:14:24.327893:         },
2019-05-04T12:14:24.327893:         SignatureHelpProvider: &protocol.SignatureHelpOptions{
2019-05-04T12:14:24.327893:             TriggerCharacters: {"(", ","},
2019-05-04T12:14:24.327893:         },
2019-05-04T12:14:24.327893:         DefinitionProvider:               true,
2019-05-04T12:14:24.327893:         ReferencesProvider:               false,
2019-05-04T12:14:24.327893:         DocumentHighlightProvider:        true,
2019-05-04T12:14:24.327893:         DocumentSymbolProvider:           true,
2019-05-04T12:14:24.327893:         WorkspaceSymbolProvider:          false,
2019-05-04T12:14:24.327893:         CodeActionProvider:               true,
2019-05-04T12:14:24.327893:         CodeLensProvider:                 (*protocol.CodeLensOptions)(nil),
2019-05-04T12:14:24.327893:         DocumentFormattingProvider:       true,
2019-05-04T12:14:24.327893:         DocumentRangeFormattingProvider:  true,
2019-05-04T12:14:24.327893:         DocumentOnTypeFormattingProvider: (*struct { FirstTriggerCharacter string "json:"firstTriggerCharacter""; MoreTriggerCharacter []string "json:"moreTriggerCharacter,omitempty"" })(nil),
2019-05-04T12:14:24.327893:         RenameProvider:                   (*protocol.RenameOptions)(nil),
2019-05-04T12:14:24.327893:         DocumentLinkProvider:             &protocol.DocumentLinkOptions{},
2019-05-04T12:14:24.327893:         ExecuteCommandProvider:           (*protocol.ExecuteCommandOptions)(nil),
2019-05-04T12:14:24.327893:         Experimental:                     nil,
2019-05-04T12:14:24.327893:         ImplementationProvider:           false,
2019-05-04T12:14:24.327893:         TypeDefinitionProvider:           true,
2019-05-04T12:14:24.327893:         Workspace:                        (*struct { WorkspaceFolders *struct { Supported bool "json:"supported,omitempty""; ChangeNotifications string "json:"changeNotifications,omitempty"" } "json:"workspaceFolders,omitempty"" })(nil),
2019-05-04T12:14:24.327893:         ColorProvider:                    false,
2019-05-04T12:14:24.327893:         FoldingRangeProvider:             false,
2019-05-04T12:14:24.327893:         DeclarationProvider:              false,
2019-05-04T12:14:24.327893:         SelectionRangeProvider:           false,
2019-05-04T12:14:24.327893:     },
2019-05-04T12:14:24.327893:     Custom: {},
2019-05-04T12:14:24.327893: }
2019-05-04T12:14:24.327893: gopls server end =======================
How did you install govim?

Vim 8 packages git clone into ~/.vim/pack/plugins/start
What did you do?

in a module-based project started typing a package name (e.g. fmt.P) and no popup occurs
What did you expect to see?
popup showing available function calls
What did you see instead?
nothing
GoImports does appear to work on save as well as GoFmt

I am running vim in the root directory of my project that is located outside of GOPATH.

Hover does appear to show for a split second

Hi @drewthor - thanks for the report.
govim does not complete automatically. Instead it uses the default Vim binding <C-x><C-o> which translates as "hold down the left control key and then press x and then o".
See :help i_CTRL-X_CTRL-O for more details.
I don't use it, but I believe plugins like neoplete offer this sort of functionality. We have https://github.com/myitcv/govim/issues/202 tracking someone working out how to make govim work with neoplete (or anything similar).
Please let me know if <C-x><C-x> (in insert mode) doesn't work.

Omnifunc appears to be working. Thanks! I'll have to look into neoplete (or deoplete?)


poor support for tpcds queries

so far it manage to run only 14 % of the queries
https://colab.research.google.com/drive/1NGFqooYmbKs2ffQkTzMu_AWTHCHbE419#scrollTo=di7wsjAmOABJ

nice improvement, now it is 47%


Audit Compliance GDI specification pre-v1.7.0: Configuration

Review against https://github.com/signalfx/gdi-specification/blob/ce84954821bfe6ab6f6f1ed6cad5f87489293220/specification/configuration.md

One or more configuration variables may be needed to properly configure GDI repositories. Components that can be configured with environment variables MUST support configuration of these variables using environment variables.

❓

Any component that cannot be configured with environment variables MUST support configuration of these variables using an alternate method.

❓

Any component MAY support configuration of these variables by additional methods.

❓

GDI repositories MUST adopt stable and SHOULD adopt experimental configuration
variables in the OpenTelemetry Specification before proposing variables to the GDI specification.

❓

If a new configuration variable is needed by a GDI repository it MUST be brought to the GDI specification as a GitHub issue. The GDI specification maintainers SHOULD consider introducing needed configuration variables to the OpenTelemetry repository before approving Splunk-specific configuration variables.

❓

If a GDI repository requires an immediate configuration variable that is not available in the OpenTelemetry specification and not available in the GDI specification, the repository MAY introduce a repository-specific configuration variable until the GDI specification maintainers make a decision. Any repository-specific configuration variable defined SHOULD be prefixed with SPLUNK_ and MUST NOT be marked as stable unless added to the GDI specification. Upon resolution by the GDI specification, the GDI repository MUST change the repository-specific configuration variable by the repository's next minor release. This change MAY result in a breaking change so caution should be exhibited when considering repository-specific configuration variables.

❓

Splunk-specific configuration variables defined in the GDI specification MUST be prefixed with SPLUNK_. Furthermore, configuration specific to Splunk Observability Cloud MUST be prefixed with SPLUNK_OBSERVABILITY_ and to Splunk Enterprise or Splunk Cloud MUST be prefixed with SPLUNK_PLATFORM_.

❓

If a Splunk-specific configuration variable is declared as stable in the GDI specification and later the OpenTelemetry specification declares a similar variable as stable, the GDI specification MUST adopt the OpenTelemetry configuration variable and SHOULD mark the GDI specification configuration variable as deprecated by the next minor release. In addition to defining
Splunk-specification configuration variables, the GDI specification MAY require specific OpenTelemetry configuration variables be supported. If it does, the GDI specification MAY require certain values be supported including a specific default value.

❓

Whenever a configuration variable changes its name, a stable GDI repository (version >= 1.0) MUST support both old and new names until the next major release is done. The old configuration variable MUST NOT be removed in a minor release. GDI repositories that are not yet stable (version < 1.0) SHOULD follow this rule, but they are not required to. When it is detected that a user uses the old configuration variable a warning SHOULD be logged: the warning SHOULD state that the old variable is deprecated, the new one should be used instead, and that the old one will be removed in the next major release (not stable GDI repositories MAY remove deprecated features in any future release).

❓

Installation and configuration MUST optimize for customer experience and time-to-value. Installation and configuration MAY provide a mechanism for advanced or custom settings. As an example, the default installation for instrumentation libraries should provide everything needed to configure W3C and B3 as well as OTLP and Jaeger Thrift even though the default configuration is set to W3C and OTLP. Installing all of these dependencies by default may result in a large package, but makes it easy for users to switch settings via configuration. An advanced installation process can be provided where the user chooses what to install limiting the configuration options.

❓

For all use-cases that support environment variables (e.g. applications and serverless), it MUST be possible to configure an Instrumentation Library instance using the following environment variables:

Name
Default
Description

SPLUNK_ACCESS_TOKEN

Access token added to exported data. [1]

SPLUNK_PROFILER_CALL_STACK_INTERVAL
10000
Interval at which call stacks are sampled (in ms) [5]

SPLUNK_PROFILER_ENABLED
false
Whether CPU profiling is enabled. [2] [5]

SPLUNK_PROFILER_LOGS_ENDPOINT
*
Where profiling data is sent. Defaults to the value in OTLP_EXPORTER_OTLP_ENDPOINT [5]

SPLUNK_PROFILER_MEMORY_ENABLED
false
Whether memory profiling is enabled. [2] [6]

SPLUNK_REALM
none
Which realm to send exported data. [3]

SPLUNK_TRACE_RESPONSE_HEADER_ENABLED
true
Whether Server-Timing header is added to HTTP responses. [4]

[1]: Not user required if another system performs the authentication. For example, instrumentation libraries SHOULD send data to a locally running agent. The agent MAY define the access token that is used. If the instrumentation library is configured to send data directly to a Splunk back-end then this variable MUST be defined. Even when sending to an agent, instrumentation libraries MAY define this option (to support access_token_passthrough). This environment variable MUST work for otlp and jaeger-thrift-splunk exporters.
[2]: The instrumentation library SHOULD NOT allow changing the setting at runtime, and the initial setting SHOULD be used for the entire lifespan of the application run. An instrumentation library whose profiling capability is deactivated MUST NOT introduce additional profiling-based overhead. It also MUST NOT emit profiling-based data.
[3]: By default, instrumentation libraries are configured to send to a local collector (see OTEL_TRACES_EXPORTER below). If SPLUNK_REALM is set to anything besides none then the OTEL_EXPORTER_*_ENDPOINT is set to an endpoint based on the defined realm. If both SPLUNK_REALM and OTEL_EXPORTER_*_ENDPOINT are set then OTEL_EXPORTER_*_ENDPOINT takes precedence.
[4]: If stitching of RUM spans and APM spans is desired then this parameter MUST be set to true.
[5]: Applies only to instrumentation libraries with CPU profiling capabilities.
[6]: Applies only to instrumentation libraries with memory profiling capabilities.

❓

In addition to Splunk-specific environment variables, the following [OpenTelemetry environment
variables](https://github.com/open-telemetry/opentelemetry specification/blob/f228a83e652e5cd3ba96b9f780b704ee7a7daa4c/specification/sdk-environment-variables.md) are required.

OTEL_SERVICE_NAME

Users MUST define a name for the service they are instrumenting. The service name can either be defined using the OTEL_SERVICE_NAME or OTEL_RESOURCE_ATTRIBUTES environment variable, or directly in their code. If the user fails to define a service name the distribution MUST log a warning. The warning message MUST clearly describe how to set the service name or link to relevant documentation. E.g.
The service.name resource attribute is not set. Your service is unnamed and will be difficult to identify.
Set your service name using the OTEL_SERVICE_NAME or OTEL_RESOURCE_ATTRIBUTES environment variable.
E.g. `OTEL_SERVICE_NAME="<YOUR_SERVICE_NAME_HERE>"`

❓

OTEL_PROPAGATORS

Distribution MUST default to "tracecontext,baggage"
Distribution MUST support and document how to switch to b3multi

❓

Span Collection Limits

Distribution MUST default to 1000 for OTEL_SPAN_LINK_COUNT_LIMIT (not OpenTelemetry default)
Distribution MUST default to 12000 for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT (not OpenTelemetry default)
Distribution MUST default to unlimited for all others (not OpenTelemetry default)

❓

OTEL_TRACES_EXPORTER

Non-RUM distribution MUST default to otlp using grpc or http/protobuf transport protocol.

Non-RUM distribution MAY offer jaeger-thrift-splunk that defaults to http://<IP_ADDRESS>:9080/v1/trace.
NOTE: jaeger-thrift-splunk is deprecated. If the user selects jaeger-thrift-splunk, distributions MUST log a deprecation warning and suggest an alternate method. For example:
jaeger-thrift-splunk trace exporter is deprecated and may be removed in a future major release. Use the default
OTLP exporter instead, or set the SPLUNK_REALM and SPLUNK_ACCESS_TOKEN environment variables to send
telemetry directly to Splunk Observability Cloud.

❓

In addition to environment variables, other ways of defining configuration also exist:

Java System Properties: These properties MUST match the environment variables converting to lower case and replacing underscores with hyphens or periods. For example: system property splunk.trace-response-header.enabled is equivalent to environment variable SPLUNK_TRACE_RESPONSE_HEADER_ENABLED.

❓


Fix StructInheritence violations

DO NOT MERGE
A good explaination here:
http://thepugautomatic.com/2013/08/struct-inheritance-is-overused/

Changing to an initializer bolierplate worked fine for prison_day.rb but doesn't seem to work for prison_schedule.  It's the most straightforward resolution, but involved the most extra code (as compared to something like the attr_extras gem mentioned in the cited blog post.  Just wanted to give everyone a chance to comment before I went ahead and worked out why prison_schedule.rb doesn't like the initializer (realising that this carries the assumption that attr_exrtras would work...).

Totes justified in making these changes :+1:
Regarding the prison_schedule though I don't see why you'd have a problem doing:
class PrisonSchedule
  attr_reader :prison

  def initialize(prison)
    @prison = prison
  end
  # blah blah blah
end

@dan-palmer Because I was being an idiot, that's why :boom:
Fixed and ready for review.

:+1:

bump for merge once circle it finished...

@SteveMarshall that one-spacer is fixed.

Friday afternoon :ship: time!


router.param() regex validation

The express 4x api docs claim that you can pass regex as a second argument to router.param in order validate params.

The method could now be used to effectively validate parameters (and
optionally parse them to provide capture groups)

It then provides the following examples.
// validation rule for id: should be one or more digits
router.param('id', /^\d+$/);

router.get('/user/:id', function(req, res) {
  res.send('user ' + req.params.id);
});

// validation rule for range: should start with one more alphanumeric characters, followed by two dots, and end with one more alphanumeric characters
router.param('range', /^(\w+)\.\.(\w+)?$/);

router.get('/range/:range', function(req, res) {
  var range = req.params.range;
  res.send('from ' + range[1] + ' to ' + range[2]);
});

But, this doesn't actually seem to work. Taking a deeper dive, it doesn't look as if the code actually supports what the docs claim. In fact, passing anything other than a function will get you a tidy invalid param() call exception.
Using
express 4.12.3
node 0.12.4

I think you are going to have to use https://github.com/expressjs/express-params. I think the docs, that you copied, are just showing that you can use it and how.
"For example the express-params defines the following callback which allows you to restrict parameters to a given regular expression."
The docs could probably be worded a bit better to make that more clear.

The docs show, right above that example, that you actually have to run this code first; the example is simply split into two different code blocks and it won't work if you only use one of the two code blocks.
router.param(function(name, fn) {
  if (fn instanceof RegExp) {
    return function(req, res, next, val) {
      var captures;
      if (captures = fn.exec(String(val))) {
        req.params[name] = captures;
        next();
      } else {
        next('route');
      }
    }
  }
});

@hacksparrow how can that section be made clearer? It seems like this is always a large source of questions/confusion, because people are not reading it though and realizing they need to include that router.param(function(name, fn) { bit of code for it to work.

Thanks guys, having that bit more clear would certainly be helpful! I would imagine it's pretty common to skim docs on how to consume an api rather than reading every line; albeit, I probably [sh|c]ould have read more in depth in this case.

@dougwilson - Isn't that what express-params does? It seems it might be best to recommend that method as it seems the better way from a maintenance perspective for a consumer, right? Just some thoughts!

@kodypeterson After some research, it doesn't seem and is express-params is needed. Doug actually provides an example of how to accomplish, what I assume most people are trying to accomplish the app.params example from the doc.
app.get('/user/:userId([0-9]+)', fn);

@dougwilson perhaps this (post 4.11) example could be included in the docs to help avoid some of the confusion

Hi @kodypeterson the purpose of the section of the docs is to explain what app.param(function) does through examples; suggesting express-params module will not help anyone understand how to use app.param(function).
@sean3z it is, right in the section labeled "The code in the next section can be migrated using the following, without the use of router.param(callback):". Erasing everything and only keeping that will still not help people understand how to use app.param(function) signature, though.

@kodypeterson we in fact do mention the express-params module right there in the docs being discussed already.

If it helps the discussion, instead of assuming the section is being read, I'm going to paste what is currently on the Express website right now. Please, everyone, we need help trying to make the section better explain how router.param(callback) works, so please provide suggestions to that section that will help (either here, or even a PR!).

router.param([name,] callback)

Add callback triggers to route parameters, where name is the name of the parameter or an array of them, and function is the callback function. The parameters of the callback function are the request object, the response object, the next middleware, and the value of the parameter, in that order.

For example, when :user is present in a route path, you may map user loading logic to automatically provide req.user to the route, or perform validations on the parameter input.

router.param('user', function(req, res, next, id) {

// try to get the user details from the User model and attach it to the request object
User.find(id, function(err, user) {
if (err) {
next(err);
} else if (user) {
req.user = user;
next();
} else {
next(new Error('failed to load user'));
}
});
});

Param callback functions are local to the router on which they are defined. They are not inherited by mounted apps or routers. Hence, param callbacks defined on router will be triggered only by route parameters defined on router routes.

A param callback will be called only once in a request-response cycle, even if the parameter is matched in multiple routes, as shown in the following example.

router.param('id', function (req, res, next, id) {
console.log('CALLED ONLY ONCE');
next();
})

router.get('/user/:id', function (req, res, next) {
console.log('although this matches');
next();
});

router.get('/user/:id', function (req, res) {
console.log('and this matches too');
res.end();
});

router.param(callback) is deprecated as of v4.11.0.

By passing only a callback function, you can alter the router.param() API. For example the express-params defines the following callback which allows you to restrict parameters to a given regular expression.

The code in the next section can be migrated using the following, without the use of router.param(callback):

router.get('/user/:id([0-9]+)', function(req, res){
res.send('user ' + req.params.id);
});

router.get('/range/:range(\w+..\w+)', function(req, res){
var range = req.params.range.split('..');
res.send('from ' + range[0] + ' to ' + range[1]);
});

router.param(function(name, fn) {
if (fn instanceof RegExp) {
return function(req, res, next, val) {
var captures;
if (captures = fn.exec(String(val))) {
req.params[name] = captures;
next();
} else {
next('route');
}
}
}
});

The method could now be used to effectively validate parameters (and optionally parse them to provide capture groups):

// validation rule for id: should be one or more digits
router.param('id', /^\d+$/);

router.get('/user/:id', function(req, res) {
res.send('user ' + req.params.id);
});

// validation rule for range: should start with one more alphanumeric characters, followed by two dots, and end with one more alphanumeric characters
router.param('range', /^(\w+)..(\w+)?$/);

router.get('/range/:range', function(req, res) {
var range = req.params.range;
res.send('from ' + range[1] + ' to ' + range[2]);
});

The router.use() method also supports named parameters so that your mount points for other routers can benefit from preloading using named parameters.

@dougwilson @sean3z @kodypeterson
I agree, that section can be pretty confusing, especially with a notice box with some code in it and a reference to an external module. Let's make it as simple as possible, while still conveying the message successfully. Here is the re-write I am proposing. Everything after "router.param(callback) is deprecated as of v4.11.0." will be replace with the following.
The behavior of the router.param(name, callback) method can be altered entirely by passing only a function to router.param(). This function is a custom implementation of how router.param(name, callback) should behave - it accepts two parameters and must return a middleware.
The first parameter of this function is the name of the URL parameter that should be captured, second parameter can be any JavaScript object which might be used for returning the middleware implementation.
The middleware returned by the function decides the behavior of what happens when a URL parameter is captured.
In this example, the router.param(name, callback) signature is modified to router.param(name, accessId). Instead of accepting a name and callback, router.param() will now accept a name and a number.
var express = require('express');
var app = express();
var router = express.Router();

// customizing the behavior of router.param()
router.param(function(param, option) {
  return function (req, res, next, val) {
    if (val == option) {
      next();
    }
    else {
      res.sendStatus(403);
    }
  }
});

// using the customized router.param()
router.param('id', 1337);

// route to trigger the capture
router.get('/user/:id', function (req, res) {
  res.send('OK');
})

app.use(router);

app.listen(3000, function () {
  console.log('Ready');
})

In this example, the router.param(name, callback) signature remains the same, but instead of a middleware callback, a custom data type checking function has been defined to validate the data type of the user id.
router.param(function(param, validator) {
  return function (req, res, next, val) {
    if (validator(val)) {
      next();
    }
    else {
      res.sendStatus(403);
    }
  }
})

router.param('id', function (candidate) {
  return !isNaN(parseFloat(candidate)) && isFinite(candidate);
});

SGTM

Published. Please close the issue if it looks good.

This looks much better and should help mitigate some of the confusion!
Thanks for the quick turn around and assistance!

👍


Python: Bubble sort

Description
What is bubble sort in Python.
Explain it by giving suitable example.
Domain
Python_Domain
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign

@adityabisoi can i work on my issue

Name: C.Rachita
Contribution type: Video
@adityabisoi

@adityabisoi Can I contribute in Audio format

/assign

Topic is a part of ds-algo domain.


[sleeplog] Log file not found: Uncaught Error

Affected hardware version
Bangle 2
Your firmware version
2v12
The bug
Hello @storm64
your sleeplog app looks promising but it crashes when no "sleeplog.log" exists in the filesystem:
Uncaught Error: Expecting a string, got undefined
 at line 93 col 59 in sleeplog.boot.js
...(storage.read(this.logfile)));
                              ^
in function "log" called from line 74 col 45 in sleeplog.boot.js
          this.log(Math.floor(Date.now()), 2);
                                            ^
in function "calc" called from line 164 col 102 in .boot0
...idth) global.sleeplog.calc();
                              ^
in function called from system

How to reproduce:

install sleeplog
connect watch to console and see errors in log

Thanks for the fast fix @myxor. I added the atob() conversion to save storage, but forgot to test it without a logfile. :see_no_evil:


Support int.{from,to}_bytes

It was not implemented as in C/C++ backend, we can convert between array to int, and that's what I use to implement {from,to}_bytes, but in Nimv2's JavaScript backend, with int refers to BigInt, such a conversion is disallowed.

I'm working on this, almost finished but some tests are not passed yet.

And once finished, it shall work for NimScript too.


Link from Gbif  VIS summary page towards github repo broken

The description on the page http://www.gbif.org/dataset/823dc56e-f987-495c-98bf-43318719e30f  contains a link towards the vis-inland-occurrences repo, https://github.com/LifeWatchINBO/vis-inland-occurrences.
However, probably this was moved earlier towards this repo, so the link should be https://github.com/LifeWatchINBO/data-publication/tree/master/datasets/vis-inland-occurrences instead of https://github.com/LifeWatchINBO/vis-inland-occurrences

Thanks for reporting @stijnvanhoey. This has been corrected in the metadata and is staged in the IPT, but I'm waiting to republish until the data has been corrected (see #33). The same is true for some other datasets.
Maybe I shouldn't wait and already republish the dataset with updated metadata...

I have republished all 4 datasets for which I have reviewed and updated the metadata (but not yet the data). As a result, the GitHub link is now correct on the GBIF dataset page for vis-inland-occurrences: http://www.gbif.org/dataset/823dc56e-f987-495c-98bf-43318719e30f


Ctrl+C/Ctrl+V doesn't work in Explorer after Electron 8 update in Insiders builds

Issue Type: Bug
This is basically #98425 but I haven't found any open tracking issues.
Steps to reproduce:

Select file in Explorer (e.g. filename.ext)
Press Ctrl+C and then Ctrl+V
Nothing happens

Expected result: filename copy.ext is created
/cc @bpasero @deepak1556
VS Code version: Code - Insiders 1.47.0-insider (269f0fdd83f1e6611dd0c6d225a1685719eafedb, 2020-06-22T05:53:42.894Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
31.72GB (20.02GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

Thanks @IllusionMH

I can reproduce with bare Electron and this looks like an Electron 8 bug @deepak1556
https://github.com/electron/electron/issues/24253

This also reproduces using the mouse context menu: so the entire copy/paste flow is broken.

It looks like a fix for the electron bug was merged into all the relevant branches (8.x, 9.x, and 10.x) about 8 days ago.  Hopefully a new release will come soon.

But last Electron release was 9 days ago, so fix should be only in the next build.

But last Electron release was 9 days ago, so fix should be only in the next build.

Yeah, I know.  I meant hopefully a new Electron release will be out soon.

still error vscode 1.48.0-insider can't copy paste with remote wsl

Looks like we'll have to wait for Electron to upgrade to 9.1.1

Should be fixed in latest insiders, please check. Thanks!

Thanks! Works as expected in:
Version: 1.49.0-insider (user setup)
Commit: 6384e3246884694cbc34eacc70281ada15e2c7f2
Date: 2020-08-28T16:02:44.602Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.18363

Thanks for letting us know, adding verified label.


feat : random gradient generator

i want to work on this issue under jwoc

this extension is gonna have a generate button which will generate any random gradient on click for user
and user can copy that and use it in projects
it will show the preview of generated gradient

So you will be giving the option for angle, adding no of colors?

@harshita214  ???

I see okay okay , so there are two options only then right?

Completed - #102


Add openGL/mesa to compute nodes

Install:
mesa-libOSMesa.x86_64
mesa-libOSMesa-devel.x86_64
glfw.x86_64
glfw-devel.x86_64
mesa-libGL.x86_64
mesa-libGL-devel.x86_64

@steven-basart

Have these packages been installed?
How were these packages installed?
Should we update the cais_compute playbook/role?

They're on prod. Based on a user request from a long time ago.
Should be in cais-compute role I believe.

mesa-libOSMesa.x86_64 is installed on all packages.


Calling method with incorrect type fail silently

Consider the following code:
  void deserialize(List<Map> value) {
  }

  String source = '[{"id": "1"}]';
  var obj = json.decode(source);
  assert(obj is List);
  deserialize(obj);

As obj is a List<dynamic> and deserialize() expects a List<Map>, the above code would fail with the following error:
I/flutter ( 9844): type 'List<dynamic>' is not a subtype of type 'List<Map<dynamic, dynamic>>'

This is an expected error. However, I countered a situation where no error is reported in the console executing a similar method call. The call simply failed silently, leaving the developer (me) in the dark. It happened when I attempted to deserialize a json string to a list of objects using jaguar_serializer. The code stopped working after I have updated to the latest dev version of Flutter. Setting breakpoints won't help, the code appeared to exit just before the offending line in step-by-step mode.
I've uploaded a repo with code that reproduces this issue. Here is the offending line.
Interestingly, when I was creating a new project to try to isolate the issue, I once saw Android Studio stopped the execution and highlighted the offending line with the type 'List<dynamic>' is not a subtype of ... error on the tooltop (which is why I now know it's a type error. Otherwise I would be clueless). This is as if an exception breakpoint has been set (it hasn't). But no error is shown on the console, and it only happened once.
So I tried enabling the exception breakpoint, ran the code again, and found the breakpoint worked for the first few times (3-4 times I think). Then nothing happened anymore, and I'm yet to find a way to make Android Studio break again on the same line. And again, no error was reported whatsoever on the console, no matter the breakpoint worked or not.
[√] Flutter (Channel dev, v0.5.8, on Microsoft Windows [Version 10.0.17134.165], locale zh-HK)
    • Flutter version 0.5.8 at C:\flutter
    • Framework revision e4b989bf3d (3 days ago), 2018-08-09 09:45:44 -0700
    • Engine revision<PHONE_NUMBER>
    • Dart version 2.0.0-dev.69.5.flutter-eab492385c

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\CY\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio 3\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[!] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 22.2.1
    • Dart plugin version 171.4424
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio 3
    • Flutter plugin version 27.1.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] Android Studio (version 2.1)
    • Android Studio at C:\Android\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[!] VS Code, 64-bit edition (version 1.23.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected devices (1 available)
    • Nexus 5X • 00e1c63e154fae10 • android-arm64 • Android 8.1.0 (API 27)

! Doctor found issues in 3 categories.

I think it was mentioned that there was an issue recently where some error output was not printed.
Can you reproduce in latest master channel?

It has been fixed on the latest dev channel.
[√] Flutter (Channel dev, v0.7.0, on Microsoft Windows [Version 10.0.17134.165], locale zh-HK)
    • Flutter version 0.7.0 at C:\flutter
    • Framework revision 09fe34708f (2 days ago), 2018-08-22 10:20:51 -0700
    • Engine revision 4b271b2e02
    • Dart version 2.1.0-dev.1.0.flutter-69fce633b7

Also not reproducible on the master channel.
And I can have Android Studio to stop at the offending line with this option turned on:

That's it, thank you!


Corporate bullshit

Describe the issue
improve the UI of the landing page. go crazy & have fun)
Resource request
@claraxuxu is there anything he should need to get started ?

done 3f80599


Sites - get_energy_details isn't calling the "correct" API

SolarEdge has an API called Site Energy -Detailed with an endpoint of /site/{siteId}/energyDetails
This library includes a method called get_energy_details, but it doesn't call this API, it calls the Site Energy API (/site/{siteId}/energy).
I've corrected this in my project by overriding the Sites object and providing access to this endpoint.
I can PR this change to you, but I'd like you to provide me with direction on how to proceed?  To correct the API signature, would mean to create a breaking change to this project (which isn't 1.x, so do you care?).
In my override class I call it get_full_energy_details to add the functionality.
Let me know how you'd want this incorporated into this project and I'll do so.

Hm you're right, good catch! You can make a PR to fix this 👍
Comes back from https://github.com/Yenthe666/pysolaredge/blob/c8fa314ed59109c0b3032f88e5ccdcd16da41cc3/solaredge/api/sites.py#L134-L149
I guess this:
   api_endpoint = '/site/%s/energy' % site_id

Should become:
   api_endpoint = '/site/%s/energyDetails' % site_id

Right?

Yes.  I'll PR that.  I've also added 2 other endpoints that I'll include.
So to confirm, you are okay with breaking the get_energy_details method?  It will respond with a different payload structure after swinging it to the correct endpoint.

Yeah I'm fine with that because it was wrong in the first place anyways. Looking forward to your PR :)

resolved by pr #2


JSDoc: inference and type checking breaks when param is destructured

TypeScript Version:  2.3.4
Code
This works:
{
  /**
   * @typedef {{
      type: string,
      color?: string
    }} Props
  * @param {Props} props
  */
  const foo = (props) => {
    console.log(props.type); // type of type is string
  };
  foo({ type: 1 }); // error

  // However, if I destructure the param, it breaks:

  /**
   * @typedef {{
      type: string,
      color?: string
    }} Props2
  * @param {Props2} props
  */
  const foo2 = ({ type }) => {
    console.log(type); // type of type is any, expected string
  };
  foo2({ type: 1 }); // expected error but got none
}

Reading through the docs on JSDoc support, I couldn't find anything to suggest why this shouldn't work.

Possibly related to https://github.com/Microsoft/TypeScript/issues/11859

should be covered by https://github.com/Microsoft/TypeScript/issues/11859, though i think the syntax in jsdoc comments in this report are the correct ones.

on a second thought, should keep them separate, the two scenarios are different enough that we may want to fix one and not the other.

Fixed, I believe by #23307


[BUG] If  is below  in a urdf file, then  doesn't load.

E.G: the below code will cause right_leg have its origin set to xyz = [0, 0, 0] and rpy = [0, 0, 0], even though it is a valid xml that does not error when loaded by urdf_rs
invalid
<?xml version="1.0"?>
<robot name="origins">
  <link name="base_link">
    <visual>
      <geometry>
        <cylinder length="0.6" radius="0.2"/>
      </geometry>
    </visual>
  </link>

  <link name="right_leg">
    <visual>
      <geometry>
        <box size="0.6 0.1 0.2"/>
      </geometry>
      <origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
    </visual>
  </link>

  <joint name="base_to_right_leg" type="fixed">
    <parent link="base_link"/>
    <child link="right_leg"/>
    <origin xyz="0 -0.22 0.25"/>
  </joint>

</robot>

valid
<?xml version="1.0"?>
<robot name="origins">
  <link name="base_link">
    <visual>
      <geometry>
        <cylinder length="0.6" radius="0.2"/>
      </geometry>
    </visual>
  </link>

  <link name="right_leg">
    <visual>
      <origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
      <geometry>
        <box size="0.6 0.1 0.2"/>
      </geometry>
    </visual>
  </link>

  <joint name="base_to_right_leg" type="fixed">
    <parent link="base_link"/>
    <child link="right_leg"/>
    <origin xyz="0 -0.22 0.25"/>
  </joint>

</robot>

Thanks for the report! This is another regression introduced in https://github.com/openrr/urdf-rs/pull/64. I confirmed urdf-rs 0.6 (that uses serde-xml-rs) doesn't have this problem.

Can you check if this branch fixes it?

Can you check if this branch fixes it?

Can you make the version requirement of thiserror looser? I can't test urdf-rs due to the below cargo error.
cargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):
Updating git repository `[https://github.com/luca-della-vedova/urdf-rs`](vscode-file://vscode-app/snap/code/148/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)

Updating crates.io index

error: failed to select a version for thiserror.
... required by package `urdf-rs v0.8.0 ([https://github.com/luca-della-vedova/urdf-rs?rev=cb42f5a#cb42f5aa)`](vscode-file://vscode-app/snap/code/148/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)

... which satisfies git dependency `urdf-rs` of package `bevy_serialization_extras v0.2.1 (/home/ry/Projects/bevy_serialization_extras)`

versions that meet the requirements ^1.0.56 are: 1.0.56
all possible versions conflict with previously selected packages.
previously selected package thiserror v1.0.50
... which satisfies dependency `thiserror = "^1.0"` (locked to 1.0.50) of package `bevy_obj v0.12.0`

... which satisfies dependency `bevy_obj = "^0.12"` (locked to 0.12.0) of package `bevy_serialization_extras v0.2.1 (/home/ry/Projects/bevy_serialization_extras)`

failed to select a version for thiserror which could resolve this conflict
Failed to load workspaces.

Ah you are working with bevy! That's awesome, I worked with bevy_obj as well :)
Since bevy_obj just needs 1.0 I believe a simple cargo update should fix your build error.

I noticed that urdf-rs also fixes a patch version

No, "1.0.7" means ">= 1.0.7, < 2.0.0" (not "=1.0.7") because the cargo's default version requirement strategy is caret requirements.
https://github.com/openrr/urdf-rs/blob/e07b0ea013b47223213708a15430a2350c4ef02e/Cargo.toml#L16

I'm not sure if it really needs 1.0.7 or if we can just fix it to 1.0

1.0.7+ is needed because we use a feature only available since https://github.com/dtolnay/thiserror/releases/tag/1.0.7
https://github.com/openrr/urdf-rs/blob/e07b0ea013b47223213708a15430a2350c4ef02e/src/errors.rs#L7

OK thanks! I reverted the update since it's not necessary.

As for an error about thiserror: I think the real problem is that one of bavy's dependencies is pinning a proc-macro related dependency (I remember wgpu doing that before), but it's okay to remove the dependency on thiserror to avoid the problem. It would not be too complicated even if we wrote that manually.

Fixed in 0.9.0 (#98, #107).


Users/filipmhpersson/sortspecification

Implementation of specification pattern
Based on discussion in https://github.com/IEvangelist/azure-cosmos-dotnet-repository/issues/165.
I'm not sure how we will get the specification working together with continuation token and skip/take and have a return type that is the same for both ways of paging. I don't see a way for how we can specify CurrentPage when using continuation token, but maybe there is a way?
The specific implementation with evaluators is very inspired by this repository https://github.com/ardalis/Specification, but we cannot use that out of the box since it's very SQL specific and this is for cosmos, so lots of changes and been made and it will keep changing. But I think it should be given credit to in some way if we decide to add this pattern to the repository.
Still know WIP:
XML Comments
Make lots of public classes internal
Specific tests for specification function

Implementation of specification pattern Based on discussion in #165.
I'm not sure how we will get the specification working together with continuation token and skip/take and have a return type that is the same for both ways of paging. I don't see a way for how we can specify CurrentPage when using continuation token, but maybe there is a way?
The specific implementation with evaluators is very inspired by this repository https://github.com/ardalis/Specification, but we cannot use that out of the box since it's very SQL specific and this is for cosmos, so lots of changes and been made and it will keep changing. But I think it should be given credit to in some way if we decide to add this pattern to the repository.
Still know WIP: XML Comments Make lots of public classes internal Specific tests for specification function

In terms of the continuation token's and page number this is not something that could be supported. The token is the page marker in affect, does that make sense?

Implementation of specification pattern Based on discussion in #165.
I'm not sure how we will get the specification working together with continuation token and skip/take and have a return type that is the same for both ways of paging. I don't see a way for how we can specify CurrentPage when using continuation token, but maybe there is a way?
The specific implementation with evaluators is very inspired by this repository https://github.com/ardalis/Specification, but we cannot use that out of the box since it's very SQL specific and this is for cosmos, so lots of changes and been made and it will keep changing. But I think it should be given credit to in some way if we decide to add this pattern to the repository.
Still know WIP: XML Comments Make lots of public classes internal Specific tests for specification function

In terms of the continuation token's and page number this is not something that could be supported. The token is the page marker in affect, does that make sense?

Yes  but I think I have an idea based on your other comments.
Maybe we can look at making it
ISpecification<TItem,TResult>
Then you can have
BaseSpecification<TItem,IEnumerable>
ConitutationTokenSpecification<IItem,Page>
SkipTakeSpecification<Item,PageQuery>
And remove paging functionality from BaseSpecification and implement specific versions of it for the continutationtoken and skiptake. Think this would be a good way to communicate paging functionality to developers using specifications?

Implementation of specification pattern Based on discussion in #165.

I'm not sure how we will get the specification working together with continuation token and skip/take and have a return type that is the same for both ways of paging. I don't see a way for how we can specify CurrentPage when using continuation token, but maybe there is a way?

The specific implementation with evaluators is very inspired by this repository https://github.com/ardalis/Specification, but we cannot use that out of the box since it's very SQL specific and this is for cosmos, so lots of changes and been made and it will keep changing. But I think it should be given credit to in some way if we decide to add this pattern to the repository.

Still know WIP: XML Comments Make lots of public classes internal Specific tests for specification function

In terms of the continuation token's and page number this is not something that could be supported. The token is the page marker in affect, does that make sense?

Yes  but I think I have an idea based on your other comments.
Maybe we can look at making it
ISpecification<TItem,TResult>
Then you can have
BaseSpecification<TItem,IEnumerable>
ConitutationTokenSpecification<IItem,Page>
SkipTakeSpecification<Item,PageQuery>
And remove paging functionality from BaseSpecification and implement specific versions of it for the continutationtoken and skiptake. Think this would be a good way to communicate paging functionality to developers using specifications?

Yes I think that sounds ace, then you are right it is really clear what you are capable of doing and how it intends to work.

@mumby0168 if I'm not mistaken offset and cursor pattern are mutually exclusive. They serve different purposes. Have pros and cons. Offset is for smaller sets and allow pagination through skip/take, whereas cursor is for large sets and uses the continuation token as a pointer. Offset you can say go to page 3 while with cursor you can't.

@mumby0168 if I'm not mistaken offset and cursor pattern are mutually exclusive. They serve different purposes. Have pros and cons. Offset is for smaller sets and allow pagination through skip/take, whereas cursor is for large sets and uses the continuation token as a pointer. Offset you can say go to page 3 while with cursor you can't.

Exactly, we'll put.

@all-contributors please add @filipmhpersson for code and tests

@mumby0168 I have updated the PR now with a more generic management of return types. This allows for different specification to specify the return type, so it's either a list, a IPage or IPageQueryResult. In general this feels much better for a clear seperation between offset/limit and continuation token patterns. I still need to break out UseContinutationToken and PageNumber from the SpecificationBuilder and make sure they are only useable from
ContinuationTokenSpecification and PageNumberPageSizeSpecification (this one really needs a new name :)). Also some cleanup from generics in the latest PR is required. I just wanted to prove the pattern before cleaning it up. But there is no real reason for the OrderedEvaluator for example to have a generic return type.

You can name it OffsetSpecification

@mumby0168 I have updated the PR now with a more generic management of return types. This allows for different specification to specify the return type, so it's either a list, a IPage or IPageQueryResult. In general this feels much better for a clear seperation between offset/limit and continuation token patterns. I still need to break out UseContinutationToken and PageNumber from the SpecificationBuilder and make sure they are only useable from
ContinuationTokenSpecification and PageNumberPageSizeSpecification (this one really needs a new name :)). Also some cleanup from generics in the latest PR is required. I just wanted to prove the pattern before cleaning it up. But there is no real reason for the OrderedEvaluator for example to have a generic return type.

I will give this a review tomorrow, thanks again for your contribution.

@filipmhpersson great work! Love the samples they look really cool, I think they're is just some XML comments to update and maybe some tests to add, and maybe a bit of formatting here and there but on the whole looking great.

@filipmhpersson great work! Love the samples they look really cool, I think they're is just some XML comments to update and maybe some tests to add, and maybe a bit of formatting here and there but on the whole looking great.

Great I'm in the process I'm cleaning up and adding tests when there is time over.
One thing I noticed that ordering with ThenBy/ThenByDescending requires a composite index set in the cosmos db. Do you think we should still make it possible for users to use ThenBy but try to make it explicit in comments and documentation that a composite index on the selected fields is necessary? Or is it better to remove the ThenBy functions and add it later if it's needed?

@filipmhpersson great work! Love the samples they look really cool, I think they're is just some XML comments to update and maybe some tests to add, and maybe a bit of formatting here and there but on the whole looking great.

Great I'm in the process I'm cleaning up and adding tests when there is time over.
One thing I noticed that ordering with ThenBy/ThenByDescending requires a composite index set in the cosmos db. Do you think we should still make it possible for users to use ThenBy but try to make it explicit in comments and documentation that a composite index on the selected fields is necessary? Or is it better to remove the ThenBy functions and add it later if it's needed?

Yes I'd agree, I was curious whether the composite index would cause that isssu. I do believe it is documented by the Cosmos DB team that to use the ThenBy methods you do need a composite index.

I have an issue I'm not really sure how to solve. Maybe some of you have more cosmos knowledge here.
When doing a more complex query with continuation token I'm getting a result for a composite continuation token and not a "normal" token. It looks like this:
[{"compositeToken":{"token":"+RID:~uvMJAOhjU+aJAAAAAAAAAA==#RT:1#TRC:10#RTD:xr+kQyQkLTy4IjFZtUNUBMBFwA==#ISV:2#IEO:65567#QCF:4#FPC:AWUAAAAAAAAAyAAAAAAAAAA=","range":{"min":"","max":"FF"}},"orderByItems":[{"item":43}],"rid":"uvMJAOhjU+aJAAAAAAAAAA==","skipCount":0,"filter":"true"}]
It works perfectly fine for fetching items but it seems like this token cannot be used with a CountAsync. Then I get an exception that says :
MalformedContinuationTokenException: ParallelContinuationToken is missing field: 'token.
I guess this has something to do with the Count method in the cosmos SDK not expecting a composite token.
I'm not sure if the count even should include the continuation token but in the already existing PageAsync method with continuation token the count method uses the continutation token. So that's why I'm trying to make it work here. Another solution would be to just count without continuation token always. But I don't like that this would function different compared to the PageAsync method.
Any clues on how this could be solved? @mumby0168  @IEvangelist.

I have an issue I'm not really sure how to solve. Maybe some of you have more cosmos knowledge here.
When doing a more complex query with continuation token I'm getting a result for a composite continuation token and not a "normal" token. It looks like this:
[{"compositeToken":{"token":"+RID:~uvMJAOhjU+aJAAAAAAAAAA==#RT:1#TRC:10#RTD:xr+kQyQkLTy4IjFZtUNUBMBFwA==#ISV:2#IEO:65567#QCF:4#FPC:AWUAAAAAAAAAyAAAAAAAAAA=","range":{"min":"","max":"FF"}},"orderByItems":[{"item":43}],"rid":"uvMJAOhjU+aJAAAAAAAAAA==","skipCount":0,"filter":"true"}]
It works perfectly fine for fetching items but it seems like this token cannot be used with a CountAsync. Then I get an exception that says :
MalformedContinuationTokenException: ParallelContinuationToken is missing field: 'token.
I guess this has something to do with the Count method in the cosmos SDK not expecting a composite token.
I'm not sure if the count even should include the continuation token but in the already existing PageAsync method with continuation token the count method uses the continutation token. So that's why I'm trying to make it work here. Another solution would be to just count without continuation token always. But I don't like that this would function different compared to the PageAsync method.
Any clues on how this could be solved? @mumby0168  @IEvangelist.

The continuation token won't work with the .CountAsync method. It only works if you perform the same query as you did when the token was generated. For example you can't have a query that orders by name and then by age with a continuation token. I wrote about this here if this helps explain 😃
https://billy-mumby-dev.com/paging-in-azure-cosmos-db
I found this hard to begin with as well.

I have an issue I'm not really sure how to solve. Maybe some of you have more cosmos knowledge here.
When doing a more complex query with continuation token I'm getting a result for a composite continuation token and not a "normal" token. It looks like this:
[{"compositeToken":{"token":"+RID:~uvMJAOhjU+aJAAAAAAAAAA==#RT:1#TRC:10#RTD:xr+kQyQkLTy4IjFZtUNUBMBFwA==#ISV:2#IEO:65567#QCF:4#FPC:AWUAAAAAAAAAyAAAAAAAAAA=","range":{"min":"","max":"FF"}},"orderByItems":[{"item":43}],"rid":"uvMJAOhjU+aJAAAAAAAAAA==","skipCount":0,"filter":"true"}]
It works perfectly fine for fetching items but it seems like this token cannot be used with a CountAsync. Then I get an exception that says :
MalformedContinuationTokenException: ParallelContinuationToken is missing field: 'token.
I guess this has something to do with the Count method in the cosmos SDK not expecting a composite token.
I'm not sure if the count even should include the continuation token but in the already existing PageAsync method with continuation token the count method uses the continutation token. So that's why I'm trying to make it work here. Another solution would be to just count without continuation token always. But I don't like that this would function different compared to the PageAsync method.
Any clues on how this could be solved? @mumby0168  @IEvangelist.

The continuation token won't work with the .CountAsync method. It only works if you perform the same query as you did when the token was generated. For example you can't have a query that orders by name and then by age with a continuation token. I wrote about this here if this helps explain 😃
https://billy-mumby-dev.com/paging-in-azure-cosmos-db
I found this hard to begin with as well.

So what would be the solution here? My currently pushed version works. But I do the Count with the query and without a continuation token. To me this makes sense, it's the total amount of items in the database given the current filter. But this will mean it's functions differently compare to the count of the PageAsync with continuation token method.

I'll have a proper look 2 night @filipmhpersson away from my desk today.

Hi, @filipmhpersson I have spoken with @IEvangelist and we have both agreed there is a great PR and we are happy for it to be merged.
We have some testing we'd like to do and some styling nits we will amend but other than we'd like to thank you for taking the time to raise this PR. If you are happy we can merge this and then get it released in the next few days :)
There are just some merge conflicts that need resolving first.

Are you happy for this to be merged @filipmhpersson ?

Are you happy for this to be merged @filipmhpersson ?

From my part I'm happy, but maybe some acceptance test and so is needed. Or is that handled later?


types are not re-generated when "hardhat test" is executed

hardhat compile automatically does generate types on every change,
but hardhat test doesn't.
There is a workaround (always run hardhat compile && hardhat test) but its awkward..

This is to do with hardhat, not typechain. Other workarounds include:

creating an alias for hardhat compile && hardhat test in os
creating a npm / yarn script that named test and then call it using npm run test

Yes, this is not a problem of typechain per se, but the hardhat-typechain plugin.
The plugin automatically generates types on hardhat compile task, but doesn't automatically generate types on hardhat test

Regenerating types make sense when the artifacts change and they do when you run compile script (which change artifacts only if you change solidity files).
The test script also runs compile script if you changed solidity files else it does not. Are you saying this doesn't happen for you?

@drortirosh @NikolaiSch can you guys prepare an example repo where this happens? This must be a regression because it works. We even have tests for that: https://github.com/dethcrypto/TypeChain/blob/master/packages/hardhat/test/project.test.ts#L77

I'm having this same problem:

Make a change to a solidity file that fixes a bug, save.
Run hardhat test - test fails
Run hardhat test again, test passes.

I heavily use the TypeChain factories in my tests, it seems the old types/artifacts are already loaded into memory (the factories include the bytecode from the previous complile, they don't use the bytecode from the artifacts from the compile that executes during hardhat test.


Warn child joint that resolves to world

Summary
SDFormat doesn't allow

[already implemented] joint child to be world
[new] joint child to resolve to world (e.g. joint child can be a frame that's attached to a world)

The latter is implemented in this PR

I originally created a new test with a example sdf. However, after pushing the code, I realized that there's actually a very similar TEST that checks for the same thing. Therefore the latest push cleans up all the unnecessary noise.
Test it
The first commit only contains the test so it doesn't catch when the resolved child link is the world. Therefore, it'll result in a FAIL test. But the second commit contains the logic to catch when the resolved child link is the world. Hence the test will PASS

checkout 1390e88f550a5a40329b433b1f2324c721b2bb9b commit and rebuild. Run the gazebo_garden/build/sdformat13/bin/INTEGRATION_joint_dom test. This should result in one test that FAILS.
checkout 58319f00e436bd82263de6767b269cb3d3815a17 commit and rebuild. Run the test again and this time, the test will PASS.

Checklist

[ ] Signed all commits for DCO
[ ] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

@azeey now that I think about it, maybe this can be much simpler...

I don't think I need to add another TEST since worldJointInvalidChildWorld test does pretty much the same.
I won't have to add additional example sdf since it's already pretty much the same as world_joint_child_resolved_to_world sdf

Looks great! And props on realizing that we don't need another test.
/cc @scpeters

good call; I guess I had made the test but didn't add all the checking logic. It would have been more obvious if I had split the error cases into separate files, but I was lazy. Nice job catching it!


contains() for json doesn't work when casting to

(Context: contains() for json has been added to 4.0 and am writing documentation for it)
I think this is a bug, if not then will be a note to add to the documentation to explain the behaviour.

EdgeDB Version: 4.0-beta.1+0f54951'
EdgeDB CLI Version: 3.5.0+40f966d
OS Version: Windows 11

Steps to Reproduce:
edgedb> with str1 := '{"Hi": "Bye", "One": "Two"}',
....... str2 := '{"Hi": "Bye"}',
....... select {
....... contains(to_json(str1), to_json(str2)),
....... contains(<json>str1, <json>str2)
....... };
{true, false}

I see the two jsons generated from the strings aren't quite equivalent to each other and a to_json(string) and a <json>string will display differently:
edgedb> with str1 := '{"Hi": "Bye", "One": "Two"}',
....... str2 := '{"Hi": "Bye"}',
....... select
....... { to_json(str1), <json>str1 };
{
  Json("{\"Hi\": \"Bye\", \"One\": \"Two\"}"),
  Json("\"{\\\"Hi\\\": \\\"Bye\\\", \\\"One\\\": \\\"Two\\\"}\""),
}

I see the two jsons generated from the strings aren't quite equivalent to each other and a to_json(string) and a <json>string will display differently:
edgedb> with str1 := '{"Hi": "Bye", "One": "Two"}',
....... str2 := '{"Hi": "Bye"}',
....... select
....... { to_json(str1), <json>str1 };
{
  Json("{\"Hi\": \"Bye\", \"One\": \"Two\"}"),
  Json("\"{\\\"Hi\\\": \\\"Bye\\\", \\\"One\\\": \\\"Two\\\"}\""),
}

Yes, casting a string to json produces a json object that is a json-string.
It doesn't parse the string as json, which is what to_json does.
This all seems to be working as intended?


Request with font weight not working

This is not working for me (works with Google Fonts):
https://api.fonts.coollabs.io/css2?family=Aguafina+Script:400&display=swap
While this is working:
https://api.fonts.coollabs.io/css2?family=Aguafina+Script&display=swap
Is this a bug or is there anything else to consider, when loading font weights?

sorry this was my fault, after reading the the new API docs for CSS2 it became clear that the old way of getting the font weight no longer works.
But it works perfectly using the new way:
https://api.fonts.coollabs.io/css2?family=Roboto:wght@300;900&display=swap