[Bug]:  Checking for Orphaned Files - Uncaught Exception

Describe the Bug
Orphened files don't get moved, errors out with an uncaught exception.
Config
# This is an example configuration file that documents all the options.
# It will need to be modified for your specific use case.
# Please refer to the link below for more details on how to set up the configuration file
# https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup

commands:
  # The commands defined below will IGNORE any commands used in command line and docker env variables.
  dry_run: false
  cross_seed: true
  recheck: true
  cat_update: false
  tag_update: true
  rem_unregistered: true
  tag_tracker_error: true
  rem_orphaned: true
  tag_nohardlinks: true
  skip_cleanup: false

qbt:
  # qBittorrent parameters
  host: localhost:9098
  user: xxxx
  pass: xxxx

settings:
  force_auto_tmm: false  # Will force qBittorrent to enable Automatic Torrent Management for each torrent.
  tracker_error_tag: ===ERROR===  # Will set the tag of any torrents that do not have a working tracker.
  ignoreTags_OnUpdate: # When running tag-update function, it will update torrent tags for a given torrent even if the torrent has one or more of the tags defined here.
  - ===NOHL===
  - ===ERROR===
  - cross-seed
  nohardlinks_tag: ===NOHL===
directory:
  # Do not remove these
  # Cross-seed var: </your/path/here/>  # Output directory of cross-seed
  # root_dir var: </your/path/here/>  # Root downloads directory used to check for orphaned files, noHL, and RecycleBin.
  # <OPTIONAL> remote_dir var: </your/path/here/>  # Path of docker host mapping of root_dir.
  # Must be set if you're running qbit_manage locally and qBittorrent/cross_seed is in a docker
  # <OPTIONAL> recycle_bin var: </your/path/here/>   # Path of the RecycleBin folder. Default location is set to remote_dir/.RecycleBin
  # <OPTIONAL> torrents_dir var: </your/path/here/>  # Path of the your qbittorrent torrents directory. Required for `save_torrents` attribute in recyclebin

  cross_seed: D:\QBT\Torrents\CS\cross-seed
  root_dir: D:\QBT\Done\
  remote_dir: D:\QBT\Done\
  recycle_bin: D:\QBT\Recycle\
  torrents_dir: C:\Users\pax07\AppData\Local\qBittorrent\BT_backup\
  orphaned_dir: D:\QBT\Orphaned\
cat:
  SERIES/SONARR: D:\QBT\Done\SERIES\SONARR\
  SERIES/MEDUSA: D:\QBT\Done\SERIES\Medusa\
  SERIES/101: D:\QBT\Done\SERIES\101\
  MOVIES/RADARR: D:\QBT\Done\MOVIES\RADARR\
  MOVIES/PTP: D:\QBT\Done\MOVIES\PTP\
  SITE/AlphaRatio: D:\QBT\Done\SITE\AlphaRatio\
  SITE/Keep Alive: D:\QBT\Done\SITE\Keep Alive\
  SERIES/B5: D:\QBT\Done\SERIES\B5\
  SITE: D:\QBT\Done\SITE\
  SITE/The Geeks: D:\QBT\Done\SITE\The Geeks\
  Redacted: D:\QBT\Done\SITE\Redacted\
  Done: D:\QBT\Done\
  Sonarr: D:\QBT\Done\SERIES\Sonarr\
  MOVIES: D:\QBT\Done\MOVIES\
  SEED: D:\QBT\Torrents\Done\NGS\SEED\
tracker:
  # Tag Parameters
  # <Tracker URL Keyword>:    # <MANDATORY> This is the keyword in the tracker url
  # <MANDATORY> Set tag name. Can be a list of tags or a single tag
  #   tag: <Tag Name>
  # <OPTIONAL> Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading. -2 means the global limit should be used, -1 means no limit.
  #   max_ratio: 5.0
  # <OPTIONAL> Will set the torrent Maximum seeding time (min) until torrent is stopped from seeding. -2 means the global limit should be used, -1 means no limit.
  #   max_seeding_time: 129600
  # <OPTIONAL> Will ensure that noHL torrents from this tracker are not deleted by cleanup variable if torrent has not yet met the minimum seeding time (min).
  #   min_seeding_time: 2000
  # <OPTIONAL> Will limit the upload speed KiB/s (KiloBytes/second) (-1 sets the limit to infinity)
  #   limit_upload_speed: 150
  # <OPTIONAL> Set this to the notifiarr react name. This is used to add indexer reactions to the notifications sent by Notifiarr
  #   notifiarr: <notifiarr indexer>
  animebytes.tv:
    tag: AnimeBytes
    max_ratio: 3
  beyond-hd:
    tag: Beyond-HD
    max_ratio: -1
  gazellegames:
    tag: GazelleGames
    max_ratio: -1
  landof.tv:
    tag: BroadcasTheNet
    max_ratio: -1
  myanonamouse:
    tag: MyAnonamouse
    max_ratio: -1
  passthepopcorn:
    tag: PassThePopcorn
    max_ratio: -1
  tleechreload:
    tag: TorrentLeech
    max_ratio: 3
  torrentdb:
    tag: TorrentDB
    vmax_ratio: 3
  torrentleech:
    tag: TorrentLeech
    max_ratio: 3
  hdbits:
    tag: HDBits
    max_ratio: 5
  morethantv:
    tag: MoreThanTV
    max_ratio: 3
  filelist.io:
    tag: FileList
    max_ratio: 5
  stackoverflow.tech:
    tag: IPTorrents
    max_ratio: 3
  alpharatio.cc:
    tag: AlphaRatio
    max_ratio: 3
  torrenthr.org:
    tag: TorrentHR
    max_ratio: 5
  opsfet.ch:
    tag: Orpheus
    max_ratio: -1
  hd-space.pw:
    tag: HD-Space
    max_ratio: 3
  bit-hdtv.com:
    tag: BIT-HDTV
    max_ratio: 3
  bibliotik.me:
    tag: Bibliotik
    max_ratio: -1
  music-vid.com:
    tag: MusicVids
    max_ratio: -1
  flacsfor.me:
    tag: Redacted
    max_ratio: -1
  thegeeks.click:
    tag: TheGeeks
    max_ratio: 5
  immortalseed.me:
    tag: Imortalseed
    max_ratio: 3
  other:
    tag: ===OTHER===
    max_ratio: 3
nohardlinks:
  MOVIES/RADARR:
    exclude_tags:
    cleanup: false
  MOVIES/PTP:
    exclude_tags:
    cleanup: false
  SERIES/SONARR:
    exclude_tags:
    cleanup: false
recyclebin:
  # Recycle Bin method of deletion will move files into the recycle bin (Located in /root_dir/.RecycleBin) instead of directly deleting them in qbit
  # By default the Recycle Bin will be emptied on every run of the qbit_manage script if empty_after_x_days is defined.
  enabled: false
  # <OPTIONAL> empty_after_x_days var:
  # Will automatically remove all files and folders in recycle bin after x days. (Checks every script run)
  # If this variable is not defined it, the RecycleBin will never be emptied.
  # WARNING: Setting this variable to 0 will delete all files immediately upon script run!
  empty_after_x_days: 60
  # <OPTIONAL> save_torrents var:
  # If this option is set to true you MUST fill out the torrents_dir in the directory attribute.
  # This will save a copy of your .torrent and .fastresume file in the recycle bin before deleting it from qbittorrent
  save_torrents: true
  # <OPTIONAL> split_by_category var:
  # This will split the recycle bin folder by the save path defined in the `cat` attribute
  # and add the base folder name of the recycle bin that was defined in the `recycle_bin` sub-attribute under directory.
  split_by_category: false

orphaned:
  # Orphaned files are those in the root_dir download directory that are not referenced by any active torrents.
  # Will automatically remove all files and folders in orphaned data after x days. (Checks every script run)
  # If this variable is not defined it, the orphaned data will never be emptied.
  # WARNING: Setting this variable to 0 will delete all files immediately upon script run!
  empty_after_x_days: 60
  # File patterns that will not be considered orphaned files. Handy for generated files that aren't part of the torrent but belong with the torrent's files
  exclude_patterns:
  - '**/.DS_Store'
  - '**/Thumbs.db'
  - '**/@eaDir'
  - /data/torrents/temp/**
  - '**/*.!qB'

#apprise:
  # Apprise integration with webhooks
  # Leave Empty/Blank to disable
  # Mandatory to fill out the url of your apprise API endpoint
  #api_url:
  # Mandatory to fill out the notification url/urls based on the notification services provided by apprise. https://github.com/caronc/apprise/wiki
  #notify_url:

#notifiarr:
  # Notifiarr integration with webhooks
  # Leave Empty/Blank to disable
  # Mandatory to fill out API Key
  #apikey:
  # <OPTIONAL> Set to a unique value (could be your username on notifiarr for example)
  #instance:

webhooks:
  error:
  run_start:
  run_end:
  function:
    cross_seed:
    recheck:
    cat_update:
    tag_update:
    rem_unregistered:
    tag_tracker_error:
    rem_orphaned:
    tag_nohardlinks:
    cleanup_dirs:

bhd:
  # BHD Integration used for checking unregistered torrents
  apikey: xxxx

Logs
https://gist.github.com/pax0707/bd16dde738ce74fbd2179c9cab2a65b5
Screenshots
No response
Installation
Local
Version Number
3.6.2
What branch are you on?
master

Did you ever get it to work? Having the same issue and using windows as well.

Nope.
I disabled orphaned in the current version and call a separate older version to do just the orphaned handling.

Nope.
I disabled orphaned in the current version and call a separate older version to do just the orphaned handling.

What version works fine for you?

I believe that the issue should be fixed in #293 but I haven't actually tested it on windows so it may not actually fix anything

@flows, @pax0707 , can you please test using the latest develop branch to see if you still have this issue?

Getting this:
| No torrents to tag with no hardlinks.                                                              |
| Uncaught Exception                                                                                |
Traceback (most recent call last):
  File "C:\PAX\qbit_manage\qbit_manage.py", line 551, in <module>
    start_loop()
  File "C:\PAX\qbit_manage\qbit_manage.py", line 322, in start_loop
    start()
  File "C:\PAX\qbit_manage\qbit_manage.py", line 429, in start
    stats["orphaned"] += RemoveOrphaned(qbit_manager).stats
  File "C:\PAX\qbit_manage\modules\core\remove_orphaned.py", line 23, in __init__
    self.pool = Pool(processes=max(cpu_count() - 1, 1), initializer=init_pool, initargs=(self.config,))
  File "C:\Program Files\Python38\lib\multiprocessing\context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "C:\Program Files\Python38\lib\multiprocessing\pool.py", line 212, in __init__
    self._repopulate_pool()
  File "C:\Program Files\Python38\lib\multiprocessing\pool.py", line 303, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "C:\Program Files\Python38\lib\multiprocessing\pool.py", line 326, in _repopulate_pool_static
    w.start()
  File "C:\Program Files\Python38\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Program Files\Python38\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Program Files\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Program Files\Python38\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'Request._session.<locals>.QbittorrentSession'
Press any key to continue . . . Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Python38\lib\multiprocessing\spawn.py", line 102, in spawn_main
    source_process = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect

I sure do love python

@pax0707  can you please test again?

@bobokun working now!
 No torrents to tag with no hardlinks.                                                              |
|=================================== Checking for Orphaned Files ====================================|
| Locating orphan files                                                                              |
| Processing orphan exclude patterns                                                                 |
| 5 Orphaned files found                                                                             |
| D:\QBT\Done\MOVIES\RADARR\Scream.2.1997.2160p.UHD.BluRay.x265-B0MBARDiERS\scream.2.1997.2160p.uhd.bluray.x265-b0mbardiers.mkv |
| D:\QBT\Done\SERIES\SONARR\Big.Beasts.S01E07.1080p.WEB.H264-GGEZ\big.beasts.s01e07.1080p.web.h264-ggez\Big.Beasts.S01E07.1080p.WEB.H264-GGEZ\big.beasts.s01e07.1080p.web.h264-ggez.mkv |
| D:\QBT\Done\SERIES\SONARR\Big.Beasts.S01E08.1080p.WEB.H264-GLHF\big.beasts.s01e08.1080p.web.h264-glhf\Big.Beasts.S01E08.1080p.WEB.H264-GLHF\big.beasts.s01e08.1080p.web.h264-glhf.mkv |
| D:\QBT\Done\SERIES\SONARR\Digman.S01E08.1080p.WEB.h264-BAE\digman.s01e08.1080p.web.h264-bae\Digman.S01E08.1080p.WEB.h264-BAE\Digman.S01E08.1080p.WEB.h264-BAE.mkv |
| D:\QBT\Done\SERIES\SONARR\Yellowjackets.S02E07.1080p.WEB.H264-CAKES\yellowjackets.s02e07.1080p.web.h264-cakes\Yellowjackets.S02E07.1080p.WEB.H264-CAKES\yellowjackets.s02e07.1080p.web.h264-cakes.mkv |
| Moving 5 Orphaned files to D:\QBT\Orphaned\                                                        |
| Removing newly empty directories                                                                   |
|====================================================================================================|


Create from the models in a folder a catalog pdf/image

Hey @lordsaturos, thanks for creating the issue.
Could you give more details what exactly you want and what the motivation behind that is?
Thanks!

Closed in favor of #49 that has a better description.


Fix modals

added a debounce function to the repos:update call. This was necessary to kick off debugging our modal problems
fixed modal flickering after copying a link. Closes #140
modals can now be closed by esc or clicking outside the frame. Closes #74
migrated all modal code to base-elements/modal, which makes it a lot nicer to maintain (and allowed squashing the above bugs)
removed lib/modal-element

Thanks!

Hope you don't mind my slight style modernizations..
LGTM!
I'm curious, what specifically was causing the modal flickering?

@juliangruber hah, all cool (:
Glad you like it. The problem was that we were nesting two instances of un-load and with the re-render step it would load and then unload the content somehow. E.g. the API was messy and not thought out well enough. Doing a bunch of work on nanocomponent helped in building like a better API - something I think we can probably leverage for other components tooooo :sparkles:


when running this HmcRestClient

I'm getting this:
File "./HmcRestClient", line 11, in
load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2843, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2434, in load
return self.resolve()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2440, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/Main.py", line 18, in
from src.main.HmcRestClient import *
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/HmcRestClient.py", line 21, in
from src.generated_src import UOM
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/generated_src/UOM.py", line 24, in
raise pyxb.PyXBVersionError(PyXBVersion)
pyxb.exceptions.PyXBVersionError: 1.2.4

maybe I'm not using it correctly


More syntactic sugar for Match Cases

Now this is possible:
List<Option<Number>> list = List.of(Option.some(.1));

// = 1
Number num = Match(list).of(

        // checks equality
        Case(List.of(Option.some(new BigDecimal(".1"))), .1),

        // same as above, using a result supplier
        Case(List.of(Option.some(new BigDecimal(".2"))), () -> .2),

        // selects the value
        Case($(), l -> l.length()),

        // allows to directly return a value instead of a value supplier
        Case($_, -1)
);

Current coverage is 95.03%

Merging #1110 into master will decrease coverage by -0.06% as of ffa0904

@@            master   #1110   diff @@
======================================
  Files           77      77
  Stmts         9312    9318     +6
  Branches      1729    1729
  Methods          0       0
======================================
  Hit           8855    8855
  Partial         91      91
- Missed         366     372     +6

Review entire Coverage Diff as of ffa0904

Powered by Codecov. Updated on successful CI builds.


why does  AspNetCore.Hosting.Internal.WebHost|Hosting shutdown after App start ?

I run my asp net core by IIs, I find that Hosting shutdown when app has been started. I run a background task on asp.net core by using IHostedService feature.
I has set the startMode of IIs  to AlwaysRunning.
my asp net core version is 2.1. I attach img screenshot about my log output

We periodically close 'discussion' issues that have not been updated in a long period of time.
We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.


[WFCORE-5967] Fix Duplicate Module Path argument on Process Controlle…

…r command line launcher
Jira issue: https://issues.redhat.com/browse/WFCORE-5967

Core -> Full Integration Build 11729 outcome was UNKNOWN using a merge of 626c2c22fff118f001220bd5cdb53cbf48065d1d
Summary: Canceled (Tests passed: 6275, ignored: 111; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 02:21:01

Hi @bstansberry , you're right, this is an invalid bug, closing it, thanks for the review


Should FileType's name be "AVIF" or "AV1" ?

The built-in AV1FileType (PDN v4.2.11 and earlier) calls it "AV1" with, of course, *.avif as the extensions.
AvifFileType.dll (plugin) calls it "AVIF".
Should it be "AV1", "AVIF", or even "AV1 (AVIF)" ?

I will change it to "AV1 (AVIF)" for the next release.
I am currently trying to switch the decoder to use dav1d, which should improve the decoding speed and memory usage.
Hopefully it will also reduce the DLL sizes by a few hundred KB.


new conda yml, some py updated to fit python 3

As title.
i am newbee for python and git.
Modifications to make it work have been marked as LRP, so search LRP to find and ...

Again, let me clarify since i am new to git and py:    Except new conda yml and Three py files where modifications have been marked as LRP,  nothing else has been changed for this pull request.


Add faculty website URL

Add faculty website URL in https://hercules-10496.herokuapp.com/api/v1/faculty/info/all. wimp needs it too :D

Most definitely! ❤
Do we scrape the websites from the faculty directory?
Also, I think this would require adding a new website column to the faculty table.

Yes, exactly!


What is the islandora_version_count table used for?

islandora.install creates the db table islandora_version_count, which is annotated as 'Keeps track of the number of changes to an entity'. However, grepping through the contrib modules directory only reveals a single use of 'islandora_version_count', in the .install file, and creating a new revision of a node doesn't add anything to the table. Is this still in use, and if so, what populates it?

Ohhhhh waaaaay back (yes kids, there was a time before COVID-19) that was going to be how we enforced write order to Fedora. To ensure that in the case of two instantaneous edits we didn't end up with the wrong state in Fedora compared to Drupal we would check that the counter of the new write was one more than the counter of the current document. It may not be needed anymore but we haven't done a lot of multi-edit testing and depending on how asynchronous your Fedora is this could still be an issue.

Ah. Thanks for the background.

Should I just close this?

🤷

Burn it with :fire:?
We didn't implemented it... and may very well never...

Resolved with https://github.com/Islandora/islandora/commit/0097808bddf2de94c772f7ca94c32bf373ebc730


Update status once installation CR is written

Description
This PR writes an empty status block after we've written the installation CR to the datastore. We want this change because an operator scorecard test checks for the existence of the status in the CR after applying the CR manifest. The operator scorecard tests are run when we submit an operator metadata bundle to certify a new version of our operator.
We'll want to backport this to 1.6, 1.7 and 1.8 to cover Calico v3.14 and v3.15.

For PR author

[ ] Tests for change.
[ ] If changing pkg/apis/, run make gen-files
[ ] If changing versions, run make gen-versions

For PR reviewers
A note for code reviewers - all pull requests must have the following:

[ ] Milestone set according to targeted release.
[ ] Appropriate labels:

kind/bug if this is a bugfix.
kind/enhancement if this is a a new feature.
enterprise if this PR applies to Calico Enterprise only.

Thanks for looking @tmjd

What status information does the operator scorecard expect to be present?

The test checks whether the Installation CR has a status block present. It's checkstatustest in this list: https://sdk.operatorframework.io/docs/scorecard/scorecard/#basic-operator

A 'real' status that we could include here is a 'Valid' field indicating that the resource has been parsed and looks to be valid.

That's a reasonable idea, maybe we can revisit that later, wdyt?

Maybe since we intend our main status reporting to be through the tigerastatus resource we should include a reference in the Installation.Status that points to the tigerastatus? (just throwing out ideas)

:+1: I think there's something to explore there for sure. But for the sake of satisfying the scorecard test maybe we can just add in the empty status block for now since it's an easier change to approve since we're not changing the API.


Section links on case studies landing pages are broken

The section headings on the case studies landing pages (e.g. https://zulip.com/case-studies/tum/) look like they should have links, but nothing happens when you click on them. It's actually worse than if the headings were plain text, as it also makes it difficult (impossible?) to even copy-paste the heading.

@alya Do you wish the heading were plain text instead?

Oh! This looks a very different issue than what I had imagined. @eeshangarg this may easy for you to fix since you wrote some of the code as per git blame in templates.py.

@alya @amanagr This is much larger issue, the section links are broken on pages other than case studies as well, such as "Why Zulip"

@Eeshan Garg @.***> Are you debugging it, or do you need help?
On Thu, Jul 22, 2021 at 10:07 AM Eeshan Garg @.***>
wrote:

@alya https://github.com/alya @amanagr https://github.com/amanagr
This is much larger issue, the section links are broken on pages other than
case studies as well, such as "Why Zulip"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zulip/zulip/issues/19349#issuecomment-885072802, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAP6IUX5DGANAWFEHNC7HBTTZBF4JANCNFSM5AZJ7SJQ
.

@alya: Submitted a PR right now :)

Sweet, thanks!
On Thu, Jul 22, 2021 at 10:21 AM Eeshan Garg @.***>
wrote:

@alya https://github.com/alya: Submitted a PR right now :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zulip/zulip/issues/19349#issuecomment-885082076, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAP6IUTWKFSKXGA36FHJN3TTZBHS5ANCNFSM5AZJ7SJQ
.


Drop npm 6 and node 14 from V3

Description

This PR drops support for node14 and npm6

[x] For npm 6, development is "broken" insofar as …npm i / npm ci don't work due to lockversion conflict
[x] node14 is EOL and we don't want to be stuck supporting it for the support lifecycle of v3 (which would extend beyond AWS Lambda support for node14)

Types of Changes

[ ] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Documentation update
[ ] Breaking change (could cause existing functionality to not work as expected)
[ ] Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

Removing a public function or component or prop
Adding a required argument to a function
Changing the data type of a function parameter or return value
Adding a new peer dependency to package.json

Changes

(change1)

How to Test-Drive This PR

(step1)

Checklists

General

[ ] Changes are covered by test cases
[ ] CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance
You must check off all items in one of the follow two lists:

[ ] There are no changes to UI

or...

[ ] Changes were tested with a Screen Reader (iOS VoiceOver or Android Talkback) and had no issues
[ ] Changes comply with WCAG 2.0 guidelines levels A and AA
[ ] Changes to common UI patterns and interactions comply with WAI-ARIA best practices

Localization

[ ] Changes include a UI text update in the Retail React App (which requires translation)

@adamraya did I fail to disable npm6 and node14, not sure why it's expecting this check when I dropped it

@adamraya did I fail to disable npm6 and node14, not sure why it's expecting this check when I dropped it

Fixed. It had to do with the branch protection rules.

https://github.com/SalesforceCommerceCloud/pwa-kit/blob/96d406c54e9c963c2c1d6150c40eb28b56038750/packages/pwa-kit-create-app/README.md#L7-L8
https://github.com/SalesforceCommerceCloud/pwa-kit/blob/96d406c54e9c963c2c1d6150c40eb28b56038750/packages/pwa-kit-dev/README.md#L7-L8
https://github.com/SalesforceCommerceCloud/pwa-kit/blob/96d406c54e9c963c2c1d6150c40eb28b56038750/packages/pwa-kit-react-sdk/README.md#L9-L10
https://github.com/SalesforceCommerceCloud/pwa-kit/blob/96d406c54e9c963c2c1d6150c40eb28b56038750/packages/template-retail-react-app/README.md#L9-L10

@wjhsf lol, nope! Beat you to it by a second!


update leaves with latest version of content from google docs

dev notes

download google docs with leaf content as text files
remove old leaves in case of name changes
run the script to convert content to hugo leaf files
commit changes

updated in #31


Dynamic project git url based on starter path

Pre-Flight checklist

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
Closes #384
What's this PR do?
Parses a sites WebsiteStarter.path value to determine the hugo projects repo to use in a concourse-ci pipeline
How should this be manually tested?
Follow testing instructions for #366

Codecov Report

Merging #385 (eff38b9) into master (c35b442) will increase coverage by 4.72%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #385      +/-   ##
==========================================
+ Coverage   90.03%   94.76%   +4.72%
==========================================
  Files         135       69      -66
  Lines        4397     1737    -2660
  Branches      681      382     -299
==========================================
- Hits         3959     1646    -2313
+ Misses        395       89     -306
+ Partials       43        2      -41

Impacted Files
Coverage Δ

websites/utils.py

websites/views.py

websites/admin.py

ocw_import/tasks.py

content_sync/admin.py

users/models.py

news/views.py

users/admin.py

websites/apps.py

main/sentry.py

... and 55 more

Continue to review full report at Codecov.

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

Closing this because it's included in #399


Missing Files Library

Hi, i got and error occured. did i missed something else ?
here the error information :
Information:Gradle tasks [clean, :app:generateArmDebugSources, :app:generateArmDebugAndroidTestSources, :app:compileArmDebugSources, :app:compileArmDebugAndroidTestSources, :libraries:opencv:generateDebugSources, :libraries:opencv:generateDebugAndroidTestSources, :libraries:opencv:compileDebugSources, :libraries:opencv:compileDebugAndroidTestSources]
C:\Users\Asus-Akueajim\Desktop\OpenCV-AndroidSamples-master\app\src\main\jni\Tutorial2.cpp
Error:(2, 33) opencv2/core/core.hpp: No such file or directory
C:\Users\Asus-Akueajim\Desktop\OpenCV-AndroidSamples-master\app\src\main\jni\DetectionBasedTracker.cpp
Error:Execution failed for task ':app:compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp'.

Multiple build operations failed.
C++ compiler failed while compiling Tutorial2.cpp.
C++ compiler failed while compiling DetectionBasedTracker.cpp.
See the complete log at: file:///C:/Users/Asus-Akueajim/Desktop/OpenCV-AndroidSamples-master/app/build/tmp/compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp/output.txt
Information:BUILD FAILED
Information:Total time: 25.095 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console

here the output.txt file
output.txt

I have same issue,Did you fixed it ?


Argon2 hash() method doesn't use provided salt, but hashRaw() does

As the title says
The hash function uses a randomly generated salt on every invocation.
Wheres the hashRaw function takes into account the provided hash.
This doesn't effect the verify() methods since they use the encoded hash.
But the hash() method creates a totally different hex hash and encoded string each time it's invoked even if a salt is provided..
Conversely, the hashRaw() function DOES return the same correct hash, using the provided salt, each time it's invoked.
Is this by design, or simple oversight?
My thoughts were that if a salt is provided, it should use it as a parameter in Argon regardless of whether or not you're generating an encoded pw hash output or just the hex value...
Please correct me if I'm wrong and it's working as intended.
Thanks!

Just like to point out that the actual Argon2 implementation DOES use the provided salt: see the source
So unless I'm mistaken - this is actually a very severe issue. You'll likely need to release a fix as a new major version of the package since it'll most likely break a lot of people's implementations of this package - because if they have been providing a salt all this time, they would be none the wiser that it's being totally ignored.
And since this argon2 package has ~600k downloads per month I'd consider it pretty severe and would appreciate it if you paid this issue some attention.
Again, correct me if I'm wrong. But I'm now pretty convinced that this is an incorrect implementation of argon2 and would definitely fail an audit -- not production ready after all.
@Brooooooklyn


Chart does not redraw on resize

When using the .resize() method, the chart apparently does not redraw. Here is the documentation entry for the .resize method:
.resize()
Use this to manually resize the canvas element. This is run each time the browser is resized, but you can call this method manually if you change the size of the canvas nodes container element.
// Resizes & redraws to fill its container element
myLineChart.resize();
// => returns 'this' for chainability

(end of documentation entry)
According to the comment, the chart should resize and redraw.
Here is a JSFiddle demonstration (after clicking the "resize" button, the chart disappears; it will reappear if the mouse is moved over it):
https://jsfiddle.net/n8zL1x01/1/
I believe this is either a bug or a mistake in the documentation.
Tested in Chrome 39.0

Calling .render(true) after .resize() seems to be a good workaround.

Closing since this is v1 and there is a good work-around. In v2 resize() will re-render the chart.


Yes/No Prediction Component and Joyride

WIP - check it out.
Added in base functionality and styling for yes/no prediction component.
Joyride needs to be refactored to recognize components that are displayed conditionally based on user input.
Will need to refactor as well once we are pulling in initial song data from DS/Mock endpoints.

🎊

Updated Joyride:

Updated yes/no buttons:


How to set weight decay for different params

I want to set different weight decay for specific params. For example, when training backbone with GroupNorm， the norm params's weight decay shall be set to 0 according to paper.
How could I achieve this in config file?

In config files, you cannot do it.
But you can modify Runner instantiation in function _dist_train or _non_dist_train of mmdet/apis/train.py like this:
non_decay_params = []
decay_params = []
for name, params in model.named_parameters():
    if 'gn' in name: #this means you must define parameters with explicit names containing 'gn'
        print('[non decay]', name)
        non_decay_params += [params]
    else:
        decay_params += [params]

import torch.optim as optim
optimizer = optim.SGD([
    {'params': non_decay_params},
    {'params': decay_params, 'weight_decay': cfg.optimizer.weight_decay},
], lr=cfg.optimizer.lr, momentum=cfg.optimizer.momentum)
runner = Runner(model, batch_processor, optimizer, cfg.work_dir,
            cfg.log_level)

Note that through experiments I found that these modifies do not improve at all. Correct me if wrong.


Apache Superset  1.5.0 login error

I have been using Apache Superset 1.4.2 and wanted to upgrade to 1.5.0 as it supports non-timeseries-x-axis.
https://github.com/apache/superset/tree/master/RELEASING/release-notes-1-5
I tried to install it from github via python on windows 10 into an unique environment:
conda activate %env%
call conda install git
pip install --upgrade setuptools pip  --user python
pip install X:\python_geohash-0.8.5-cp39-cp39-win_amd64.whl
pip install markupsafe==2.0.1
pip install sqlalchemy-trino
pip install<EMAIL_ADDRESS>pip show apache-superset
SET FLASK_APP=superset
superset db upgrade
flask fab create-admin
superset load_examples
superset init
superset run -p 8088 --with-threads --reload --debugger
I already installed some aditional libraries (geohash, markupsafe, sqlalchemy-trino), otherwise it wouldn't finish.
So far, there is no console error but when I open http://<IP_ADDRESS>:8088/superset/welcome/ it just shows an empty white screen

Does anyone know how to fix this issue?

Hi @JohnRson, unfortunately Superset does not officially support Windows, so we cannot guarantee it works on Windows 10.  But we're happy to accept PRs to improve support for unsupported platforms.


MintableToken#mint works for zero amounts

See: https://github.com/OpenZeppelin/zeppelin-solidity/blob/8e01dd14f9211239213ae7bd4c6af92dd18d4ab7/contracts/token/MintableToken.sol#L34
IMO mint should revert if called with an amount of 0.

@maraoz we discussed this last week, and we're not sure this is agood idea.
First, mint can be viewed as a transfer from 0x0 (as the standard suggests to signal via an event). Given that transferring zero amount is allowed, it would be consistent to also allow to mint zero.
Also, this catch makes sense if a human being is calling the mint function. However, for a smart contract which at some point decides to invoke mint on a token, this change forces it to check for the value to be not-zero before calling the function; which is not a standard requirement, and may cause the entire calling transaction to unexpectedly fail.
Given that minting zero does not pose a security risk, and to follow the robustness principle (Be conservative in what you send, be liberal in what you accept), I'd suggest not implementing this change.

I don't see the advantage of allowing minting 0 tokens. It doesn't make sense in any situation, so I thought it was better for it to just fail. It's a good way to catch mint-function-user errors and prevent them from silently failing.
For example, adding this check would fix this toy problem: https://docs.google.com/presentation/d/1_SiLRCTpypJvsyjgOMWgOQahTrUDexuWJQQNHEvC2A0/view#slide=id.g2816afc9f9_0_441

The advantage is allowing a smart contract that invokes mint on a token to be able to run a mint(0) call without needing to add extra checks. Even though mint is not part of the standard as transfer is, it still bears some resemblance, and since a contract should be able to safely call transfer(0) without needing to add any checks, the same should apply to mint.
That being said, feel free to sudo on this and I'll happily merge the associated PR ;-)

My question was: when would a contract ever do mint(0)?

Hmm let's say we have a token that mints a fraction of every transfer, and sends it to a collector wallet.
contract TokenWithInflationPerTransfer is MintableToken {

  (...)

  address public collector;

  function transfer(address _to, uint256 _value) public returns (bool) {
    if (super.transfer(_to, _value)) {
      mint(_to, _value * 0.01);
      return true;
    }
  }
}

The code above works with the current version, but would break if we impose a validation for mint being greater than zero, forcing this contract to add a check for value * 0.01 > 0.
It's a contrived example, but I wanted to illustrate a scenario where zero is a legal value to process (such as in an ERC20 transfer), and is relayed to mint or other method.

I'm convinced. I couldn't think of any example like the one above. Closing


Grammar Improvements

https://anydsl.github.io/thorin2/langref.html
The grammar seems to contain mistakes:

The rule I for index literal is never used
pack and array expressions contain i but this does not mean import here
v is used but never declared
The precedence rules seem to be not complete
s+ in g is confusing as s is optional X?+ = X*
The precedence rules list Π Sym : e does this refer to .Pi Sym ( : etype )? , edom n? (can be confused with Π b → ecodom) => unicodes should be used consistently
I think more rules are unused that I did not catch

Maybe a good solution would be to write the grammar as tree-sitter (https://github.com/NeuralCoder3/tree-sitter-thorin)
and generate the document from it.
The tree-sitter grammar can be automatically tested (e.g. to parse the lit tests) and allows additional uses such as

syntax highlighting in IDEs
intelligent auto-completion
error detection
code folding
auto-formatting
find usages


Coveo search

Deploy preview URL: https://a5537109.cloudflare-docs-7ou.pages.dev

Deploy Preview is here: https://c8b02ea7.cloudflare-docs-7ou.pages.dev/
(Pages build finished before PR was opened, hence no bot comment)

sorry, forgot to mention this is still WIP - waiting for UAT results, but any upcoming changes would be styles only - so feel free to review the rest

Hey @lukeed, a couple responses to your comments.
Blockers:

Once we get in https://jira.cfops.it/browse/WDC-508, I think that'll address some of your concern, as well as non-blocker #1. We can key off your search context to promote that info more heavily. As to the other piece... we're trying to intentionally stay a more unopinionated during the initial rollout so we can get more accurate data to feed Coveo's built-in M/L models. Once those start kicking in, they should help tailor the results. I know that isn't a super satisfying answer, but we should be able to fast-follow to make the results significantly better. The other benefit -- probably bigger for other doc areas than for workers -- is that the new search allows us to pull in content from the Learning Center, Blog, and KB.
(also relates to 3) There's no interactivity at the moment of searching b/c we don't have enough data to safely populate their query suggestion M/L model. It basically auto-fills with suggested queries based on past user inputs. We actually went live w/ that functionality in the KB and... uh... basically folks started hammering our search with inappropriate phrases to the point that it was auto-completing phrases like sexy videos and others. Again, understand that it isn't super satisfying, but it should get corrected soonish (we also have some logic to try and avoid getting NSFW queries put into our data in the first place)
The JS library is used for the query suggestion component. So it's not technically necessary now... but it's what pre-populates search queries.

Non-blockers:

Valid point. I'd prefer the slightly softer approach of weighting dev doc content a bit heavier (instead of just excluding everything else). Might just be a personal preference... but I can envision folks not realizing that a filter was pre-selected and getting frustrated.
We can definitely change it. At this point, we sorta have to standardize that verbiage across the other domains, so it might require a bit of communication to do so.
Can't really speak to the tech side, but definitely a valid point.

Thanks @kodster28
Until that ticket lands, I don't think this can be merged or even reviewed fairly. The search experience is so degraded right now that it dramatically impairs the entire devdocs experience. Adding in a few results from other Cloudflare properties in no way justifies losing the ability to search – accurately and/or at all – our ~1600 documentation pages.
Without good search, content remains hidden unless & until a user takes the time to painstakingly comb through our sidebars & keep the content organization/ladder memorized for future visits.

Did something change in the last hour? Previously I had 4 DevDocs results when searching for "logging workers" and none of them were the Logging from Workers page I was looking for. (similar experience with ab test and other terms.) Now there are 28 and the desired page is the 1st result

Ah.... so I think the change in sitemaps may have basically excluded dev docs from our index. I changed that earlier in the day, but maybe it's something to do with caching?

Actually, @lukeed, do you know why those changes would've just appeared now? Just wondering b/c I looked back and the re-indexing took place ~4 hours ago... but then didn't appear in your testing.
That would be a potential concern for pushing live.

I noticed the poor results yesterday & verified they were still occurring when I left my review today. Nothing different on my end & it was always same search terms /shrug
Do you have the updated sitemap? Not sure what you need from me.
Also, since the dropdown will come in a later iteration, can we move the Coveo JS out of this PR?
Using this example production page, there is:

a total of 308kB total transferred
where 58.4kB of that is JS
and 20kB is CSS.

The same page with this Coveo PR bumps it up to:

555 kB total transfer
241 kB of JS
71 kB of CSS

I know this is my personal quest, but I find this concerning... 4x'ing our JS & 3.5X'ing our CSS for what's effectively a redirect. I know it's prep-work for future dropdown, but this is a massive (performance) price to pay for what's essentially some keyboard listeners, an HTTP call, and some DOM updates.

The Lighthouse performance score for the live/production Logging from Workers page is 98
The score for the same page in the Coveo version is 74 — this will extend to all Dev Doc pages
IMO this verifies my concern w/ their SDK files

I think that's a valid concern on the script and -- since we aren't rolling it out yet -- it seems like it'd make sense to keep it off.
We can also add that (and potentially you or another dev advocate) to our next meeting with them to pass along that feedback.

Also, since the dropdown will come in a later iteration, can we move the Coveo JS out of this PR?

Agreed on this -- since we aren't using any live functionality on most pages, I think we should remove any JS we can at the moment, and just have it redirect to that query page when someone types in a search query.
In the future, we'll obviously want to include dropdown and proper "on-page" search functionality. At that point, we should investigate if there's optimizations we can do in order to lessen the performance implications on each page across the docs. That work could probably also benefit other CF properties (MRK, support, etc.) as well, so it's definitely worth doing.
@eidam -- can you update the PR accordingly with @lukeed's suggested change? To meet our deadlines, we still want to move on this PR ASAP; I agree with @kodster28's point that any issues we may have with functionality should probably be brought up in a future group meeting for the project.

I've added the necessary changes to defer the new script. Will remeasure the lighthouse impact after build completes.
From there, if it's still significant, I will remove the SDK files entirely & replace with a redirect for the time being until dropdown-version is ready.
I don't know who Coveo is or where they came from, but since this is here to stay, I'd much rather not use their SDK files at all and apply equivalent functionality here at 1/20th the cost.

In my last commit, I removed Coveo SDK files everywhere except the /search/ page. Instead, all other pages' search input will redirect to the /search/ page (which was already the behavior).
And I pre-selected the Developer Docs filter, because that makes the most sense & feels the best to me. (Easy to remove)
Will reply with the updated Lighthouse score, but it should be a 98 for all pages except the /search/ page, which should be a 81 now (see previous comment)

This is super late notice, so apologies, but we should delay the pushing this live until at least Monday.
Saying that not b/c there's any issues I'm seeing with the code ... but b/c I'm actually moving up to Colorado tomorrow and just found out that my phone isn't eligible to enroll in Okta for access to GChat or gmail. Was really not anticipating that second part :(.
Talking with Jenna, she thinks we should push it back to Monday since I won't be available in case we run into any issues. I wouldn't think we would... but like if something weird happened with the Dev Docs source in pipeline like it did yesterday/today or something else unanticipated, it wouldn't be the best.

Source: https://cea3ac07.cloudflare-docs-7ou.pages.dev/workers/learning/logging-workers/

It got better because we dropped the ~45kB of JS for the old search too :)

Hey @lukeed or @eidam, before launching this, can we actually remove Developer docs as a pre-selected filter?
I agree that it does make sense in the Workers and Pages docs... but there's a lot of other areas where we aren't as... let's say thorough in our documentation. We still have some pretty glaring holes for SSL, Speed features, etc. for example.
It'll actually be incredibly helpful to see when and for what documents folks are leaving dev docs and going to blog, community, and KB. That way, we can identify gaps in our content and prioritize fixes.

Oh, also... as a note, if the unfiltered view gets too annoying from a Pages/Workers perspective, we can do some fancy stuff for those docs specifically once we implement https://jira.cfops.it/browse/WDC-508

@kodster28 config switched to production one


Comments causes Atom to hang.

Toggling comments via editor:toggle-line-comments works fine but adding or removing comments manually hangs atom.
It is the compilation of suggestion list that hangs atom.
I can not reproduce in --safe.
I'm experiencing this in Atom 0.178.0 on Ubuntu 14.04.2 LTS 64-bit with Gnome 3.12.2.
Originally though this was a javascript file exclusive bug so started conversation about this here: https://github.com/atom/language-javascript/issues/26#issuecomment-77549578
but later found out that its not language specific. Tested with ruby files as well.

Can you please update atom and autocomplete-plus and retest?

I cannot reproduce this. As @benogle mentioned in #315:

Do you guys ave any other autocomplete providers installed? Can you paste in apm list for me?
Pasting in the entire error report (you can copy via the clipboard icon in the red notification) would be helpful.

Does this problem still exist, after upgrading to v2.5.0?

@baelter I am closing this due to a lack of a response. Please respond back if you are still experiencing this issue.


Use of the word "there" in a specific sentence

Hi,
Awesome document. Thank you!
"As such, when designing for the web, there design is limited to a single codebase that gets served to the end user. No mobile templates for mobile users and desktop templates for desktop users. One single codebase."
Why is the word "there" used here? I am not sure to understand. Shouldn't it be "their"?
English as a second language-er, here.

I think it should be "the design".


Possibly change the size of an Avatar when used as a MenuTrigger?

Hello again :)
I was playing with the Avatar component and noticed it defaults to a larger size (size-12) than other components (like the button and menu).
As a result when an Avatar is used as a MenuTrigger https://zaichaopan.github.io/tailwind-react-aria-components-starter-kits/?path=/docs/menu--docs#with avatar trigger (which i imagine is pretty common) that results in the size being noticeably different:

I was wondering whether you thought either of these options would be a good idea:

reduce the default Avatar size a bit so then it would automatically match the height of the other components (without needing to shrink it by adding a custom class) e.g

... or ...

When an Avatar is used as a MenuTrigger, have that code spot that and it would reduce its size to be the same height as the text would be. That way "out of the box" it is already aligned 🚀

The user can just override its size of course (like i did) and so it's not a bug, but it's nice to default to matching heights, perhaps.
Thanks!
Greg

I like the idea of reducing the default avatar size a bit. The default height of button is h-9.  Size 9 might seem a little smaller for default size. Also the sizes of avatar menus are different  depending on where they are used. For example the size on sidebar is most likely different from the one on the top nav bar. Probably size-10 is a good one for default.

Makes sense!
I checked shadcn (not that it needs to match, but out of interest) and they've gone for size-10 (which works out to 40px) for their Avatar. So that seems good.


default_package references now create an error if they reference a package that isn't a plugin implementation

Steps to reproduce
TLDR; try to add/compile an app with a plugin using default_package to endorse a package.
Repro steps

Clone sample app https://github.com/Equartey/flutter_default_plugin_repro
Checkout Flutter master channel, flutter channel master

Error is present at least between >=3.24.0-1.0.pre.151 >3.24.0-1.0.pre.180

Run $ flutter pub get.
Error should be present. App will also fail to compile.

Alternative: switch to Flutter stable channel and dependencies resolve along with the app compiling.

Expected results
Flutter should be able to resolve the endorsed package like in previous versions. Or if this is intended, documentation should be updated to reflect the new behavior.
Actual results
The following errors prevent the plugin from being fetched and/or the app from compiling.
Package amplify_secure_storage:linux references amplify_secure_storage_dart:linux as the default plugin, but the
package does not exist.
Ask the maintainers of amplify_secure_storage to either avoid referencing a default implementation via `platforms:
linux: default_package: amplify_secure_storage_dart` or create a plugin named amplify_secure_storage_dart.

Package amplify_secure_storage:windows references amplify_secure_storage_dart:windows as the default plugin, but the
package does not exist.
Ask the maintainers of amplify_secure_storage to either avoid referencing a default implementation via `platforms:
windows: default_package: amplify_secure_storage_dart` or create a plugin named amplify_secure_storage_dart.

Code sample
Sample Repo
Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
https://pastebin.com/fj7KjACU

Flutter Doctor output
Doctor output
[✓] Flutter (Channel master, 3.24.0-1.0.pre.180, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.24.0-1.0.pre.180 on channel master at /Users/quaelija/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 36dac294e9 (25 hours ago), 2024-07-18 12:07:26 -0400
    • Engine revision d58ba74250
    • Dart version 3.6.0 (build 3.6.0-54.0.dev)
    • DevTools version 2.37.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/quaelija/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/quaelija/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.91.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.92.0

[✓] Connected device (7 available)
    • Android SDK built for arm64 (mobile) • emulator-5554                        • android-arm64  • Android 7.1.1
      (API 25) (emulator)
    • iphone (mobile)                      • 00008120-0014189C017BC01E            • ios            • iOS 17.5.1 21F90
    • iPhone 15 Pro (mobile)               • 9769DBEE-D114-4A35-B4BF-360F06E79C83 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • iPhone 15 Pro Max (mobile)           • B66B1944-2468-4C2E-A646-67365BBDA3DC • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)                      • macos                                • darwin-arm64   • macOS 14.5 23F79
      darwin-arm64
    • Mac Designed for iPad (desktop)      • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79
      darwin-arm64
    • Chrome (web)                         • chrome                               • web-javascript • Google Chrome
      126.0.6478.183

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Package amplify_secure_storage:linux references amplify_secure_storage_dart:linux as the default plugin, but the
package does not exist.

This error message is slightly wrong; it should say "the package either does not exist, or is not a plugin package".
/cc @Gustl22
The fact that it's erroring is as intended; these pubspec lines are incorrect, and always have been, because amplify_secure_storage_dart isn't a plugin package—it just didn't matter because those lines weren't actually used by anything previously (other than pub.dev detecting the presence of the platform entries to know what platforms to list). A default_package for a plugin must be a plugin package.
This package has a very odd structure for a plugin; it's using internal Platform switching instead of the dartPluginClass registration logic to control what implementation is used. Is there a reason for that?
If you want to keep the current structure, the simplest solution would probably be to put a no-op registerWith method on your existing Dart class, and then list that class as the dartPluginClass (non-web) and pluginClass (web) instead of the current incorrect default_package entry.

(I also filed https://github.com/dart-lang/pub-dev/issues/7884 for the fact that workarounds with dartPluginClass are needed in the first place.)

Hi @stuartmorgan, thank you for the detailed response.

This package has a very odd structure for a plugin; it's using internal Platform switching instead of the dartPluginClass registration logic to control what implementation is used. Is there a reason for that?

I don't have all the context around why this decision was made, however, I suspect its due to this plugin requiring extra logic from a Flutter package that would otherwise be unavailable in the dart plugin class.
As for your suggestions, I tired using dartPluginClass, but I struggled to get a clean build that also passed our test suite. I suspect this would require a further refactor of our logic. Ultimately, we decided to omit the invalid plugin endorsement definitions that weren't previously used. This avoids the new errors and our tests pass.
Let us know if this approach is incorrect and warrants a second look. Appreciate the help.

As for your suggestions, I tired using dartPluginClass, but I struggled to get a clean build that also passed our test suite.

Could you elaborate on the issue? I'm not sure how an essentially unused method would break test suites.

Ultimately, we decided to omit the invalid plugin endorsement definitions that weren't previously used. This avoids the new errors and our tests pass.
Let us know if this approach is incorrect and warrants a second look.

If you drop platforms from the flutter:plugins: section entirely, you'll have an incorrect list of supported platforms on pub.dev. That's the only impact I would expect.

@stuartmorgan

Could you elaborate on the issue? I'm not sure how an essentially unused method would break test suites.

You can disregard my statement about running into an issue.
I dug deeper into the docs and found my error, I had incorrect class references. In the end, I was able to take your suggestion and get a clean build.
This seems like the better solution now, thanks for the support.


Stuck when using a type alias for the module typesafe-actions

I originally opened this issue in facebook/create-react-app#6467, but upon further investigation I assume that this issue is related to fork-ts-checker-webpack-plugin.
So if you may allow me, I'm gonna go ahead and copy and paste the content of the issue:
Environment
Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.13.0 - /usr/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  Browsers:
    Firefox: 65.0
  npmPackages:
    react: ^16.8.2 => 16.8.2
    react-dom: ^16.8.2 => 16.8.2
    react-scripts: 2.1.5 => 2.1.5
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce
This issue is related to creating a type alias and using it.
When I develop with redux and typesafe-actions, I spotted a common pattern:
// actions.ts
import { createStandardAction } from "typesafe-actions";

export interface MyActionPayload {
    foo: string;
}

const myAction = createStandardAction()<MyActionPayload>("MY_ACTION");

// MyComponent.tsx
import { MyActionPayload } from "./actions";

interface DispatchProps {
    performMyAction: (payload: MyActionPayload) => void;
}

So I decided to abstract it to:
// actions.ts
import { createStandardAction } from "typesafe-actions";

export interface MyActionPayload {
    foo: string;
}

const myAction = createStandardAction()<MyActionPayload>("MY_ACTION");

// MyComponent.tsx
import { myAction } from "./actions";
import { Dispatcher } from "./Dispatcher";

interface DispatchProps {
    performMyAction: Dispatcher<typeof myAction>;
}

// Dispatcher.ts
import { ActionType } from "typesafe-actions";

export type Dispatcher<T> = (payload: ActionType<T>["payload"]) => void;

For some reason this does not work. The dev server gets stuck on Files successfully emitted, waiting for typecheck results... forever. However, if we inline Dispatcher it does work as expected.
// actions.ts
import { createStandardAction } from "typesafe-actions";

export interface MyActionPayload {
    foo: string;
}

const myAction = createStandardAction()<MyActionPayload>("MY_ACTION");

// MyComponent.tsx
import { myAction } from "./actions";

interface DispatchProps {
    performMyAction: (payload: ActionType<typeof myAction>["payload"]) => void;
}

There is no Typescript error, the server is just stuck. I have set up a demo repo; in order to reproduce the bug just do:
$ git clone https://github.com/MeLlamoPablo/dev-server-bug-test-repo
$ cd dev-server-bug-test-repo
$ yarn
$ yarn start

As the repo's README.md says, you can find the working version in the working branch.
I noticed that react-scripts doesn't use fork-ts-checker-webpack-plugin, but react-dev-utils/ForkTsCheckerWebpackPlugin. In order to be able to switch the checker plugin, we can just run yarn eject and we'll find the webpack config files in config/webpack.config.js.
Thank you so much for your help!

Given it gets stuck with Files successfully emitted, waiting for typecheck results... which is part of the create-react-app TypeScript infrastructure I have a feeling this may be cra specific.
Can you repro this with just fork-ts-checker-webpack-plugin?

Can you repro this with just fork-ts-checker-webpack-plugin?

No, I can't. I pushed a branch to my repo: fork-ts-checker-webpack-plugin and it still gets stuck, but that must be for another reason because I can't get the simplest of hello worlds running. If I apply this diff:
diff --git a/src/index.tsx b/src/index.tsx
index c24e9d8..add4adf 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,5 +1,4 @@
 import React from "react";
 import ReactDOM from "react-dom";
-import App from "./App";

-ReactDOM.render(<App />, document.getElementById("root"));
+ReactDOM.render(
Hello world!
, document.getElementById("root"));

The server still gets stuck on Files successfully emitted, waiting for typecheck results.... But now it is using fork-ts-checker-webpack-plugin and not react-utils/ForkTsCheckerWepackPlugin as you can see here.

Any addition insights on this? I recently upgraded packages and now experiencing this same "Files successfully emitted, waiting for typecheck results..." message and horridly long build times that tax the proc.

This issue appears narrow in on the root cause, a conflict between Typescript 3.4.1 and<EMAIL_ADDRESS>Microsoft/TypeScript#30663

This issue was just resolved and should be closed. See: Microsoft/TypeScript#30663


@docusaurus/plugin-client-redirects does not work with GitHub Pages

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[ ] I have tried the npm run clear or yarn clear command.
[ ] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[ ] I have tried creating a repro with https://new.docusaurus.io.
[ ] I have read the console error message carefully (if applicable).

Description
I am attempting to redirect /docs/X to /docs/ego4d/X if the page X does not exist as I have recently added mutliple instanced docs to the documentation site. The site I am hosting is hosted on github pages on this repo: https://github.com/EGO4D/docs
I have tried doing so via:

@docusaurus/plugin-client-redirects (this does not work locally or in production)
Using Redirect, useLocation() and useIsBrowser() by swizzling the NotFound component (both by wrapping and overriding it)

(2) does not work as I am unable to build a static site due to the use of Redirect, useLocation and useIsBrowser. I have tried useEffect in react, but this does not work as it states I am not in a react component.
It is unclear to me how to redirect subpages. Any help would be appreciated on this issue.
Reproducible demo
No response
Steps to reproduce

On development environment, goto localhost:3000/docs/abc
Observe that this redirects to localhost:3000/docs/ego4d/abc

For (1) this does not work, but will according to the docs and other issues referencing this, i.e. #8691

yarn deploy
Observe in production the above does not happen

Expected behavior
Redirect according to my description
Actual behavior
No redirect occurs
Your environment

Public source code: https://github.com/EGO4D/docs
Public site URL: https://ego4d-data.org/docs/
Docusaurus version used: 2.4.3
Environment name and version (e.g. Chrome 89, Node.js 16.4): stable v20.4.0 & Chrome 118.0.5993.70 (arm64)
Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS Ventura 13.5.2

Self-service

[ ] I'd be willing to fix this bug myself.

Are you trying to redirect a fixed set of pages, or a wildcard redirect? Client-redirects works by emitting extra HTML files, so you cannot possibly achieve the latter.

If you think there is a bug, please report it correctly.

I am attempting to redirect /docs/X to /docs/ego4d/X if the page X does not exist as I have recently added mutliple instanced docs to the documentation site.

I would do:
export default {
  plugins: [
    [
      '@docusaurus/plugin-client-redirects',
      {
        createRedirects(existingPath) {
          if (existingPath.includes('/docs/ego4d')) {
            // Redirect from /docs/X to /docs/ego4d/X
            return [
              existingPath.replace('/docs/ego4d', '/docs'),
            ];
          }
          return undefined; // Return a falsy value: no redirect created
        },
      },
    ],
  ],
};

While your current code is:
 [
      '@docusaurus/plugin-client-redirects',
      {
        createRedirects(existingPath) {
          if(!existingPath.includes("ego4d") && !existingPath.includes("egoexo") && existingPath.includes("/docs/")) {
            return [
              existingPath.replace("/docs/", "/docs/ego4d/")
            ];
          }
          return undefined; // Return a falsy value: no redirect created
        },
      }
    ]

Your current code looks wrong to me, the "existing path" is the path of a real document (/docs/ego4d/X), not the path of the redirect you plan to create (/docs/X).
You want to redirect from /docs/X to /docs/ego4d/X, but your code seems to try to do the opposite (redirect from /docs/ego4d/X to /docs/X)

To help you debug this, maybe start first by using a static hardcoded list of redirects, before attempting to create them dynamically.

@docusaurus/plugin-client-redirects (this does not work locally or in production)
We mention that this only works in production build in the docs, so don't expect it to even work locally, unless you build in production mode locally.
If you want to redirect from /docs/ego4d/X, and you can debug your own plugin usage because one of those 2 redirect files must exist after a production build:

/docs/ego4d/X/index.html (with trailingSlash: true that you use)
/docs/ego4d/X.html

If this file does not exist locally after your build then you did something wrong in your createRedirects logic.

Using Redirect, useLocation() and useIsBrowser() by swizzling the NotFound component (both by wrapping and overriding it)

If you choose to use React or React-Router to do a redirect, that's a bit out of the scope of Docusaurus. If "it doesn't work" then you can open an issue to React-Router

(2) does not work as I am unable to build a static site due to the use of Redirect, useLocation and useIsBrowser. I have tried useEffect in react, but this does not work as it states I am not in a react component.

If React complains then it's because you used it badly. Again we can't teach you how to use React here, it's out of the scope of Docusaurus. We don't even see your bad code to be able to help you 🤷♂

If you want help, please help us help you. If you try multiple attempts, then create one branch per attempt, and describe each attempt clearly/independently with code used, screenshots, expectations and unexpected result. "doesn't work" is not helpful. Also if you look for support, please don't open bug reports.
Also, unless a very clear minimal repro is provided, this is not a bug but a support request, for which Discord or GitHub discussions are a better place.

I see, it appears I was using createRedirects incorrectly, as I was thinking it input a path that the user would request. Instead it provides a mapping from existing documents to the set of redirects to be constructed.
Thanks.


fix: dep update

:tada: This PR is included in version 7.0.5 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


is it possible to control startIndex programatticaly?

I'm using a vs-repeat something like this:
<div vs-repeat>
  <div ng-repeat="item in items track by $index">
   ...
  </div>
</div>

I have UI functionality that when you click on a specific item it renders a different view (details for the item).  When I close the details for the item a vsRepeatReinitialized event fires and sets startIndex to 0.
So...  If my list of items is many items long and the viewport is small the effect is that I scroll through dozens of items, click on one of them, close the details, and then end up at the top of the list only to need to scroll again.
If I have the desired startIndex is there a way that I can have vs-repeat start by showing items AT that index?

A couple of complicating factors (which could be confounding)

The click to get details uses HTML5 pushState.
I've got infinitescroll wired into the vs-repeat with an index watcher as suggested here: https://github.com/kamilkp/angular-vs-repeat/issues/10#issuecomment-55221981

I am also looking for the ability to set the startIndex for a very similar use case

You can do it by scrolling the container manually via javascript to a previously stored value. I don't want to overload the lib with functionalities that can be achieved by an external code/directive

Sorry I didn't ask clearly enough.  I'm fine saving the startIndex and then scrolling to that index, but I don't know how to do that with vs-repeat if the element I wish to scroll to is not currently in the DOM (sorry if that's a dumb question).  Thanks for building a really helpful lib.


Add top action row to editor

This pr makes tabs independent and show them in action row when ERM's are detected.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #XXXXX

@ojeytonwilliams Do we merge it with the DEBUG commit or does it need to be removed from this PR?  If so, then we should not Squash and merge, correct?  I am fine with the changes, so merge how you like.

The DEBUG commit is just there to facilitate QA, so it can go (I'll do that).  Since you've started adding the ERMs to steps, I think we can stop creating DEBUG commits and just use those steps for QA.

Nice one, @ahmadabdolsaheb, this is really taking shape.


fix: support JSON inputs for policy document when IAM policy/statements are not set as Terraform objects

what

Consider JSON source policy documents in the recently added precondition block.

why

It's expected to support JSON inputs while var.iam_policy and var.iam_policy_statments may remain unset. The precondition fails in this case:

│ Error: Resource precondition failed
│
│   on .terraform/modules/iam_policy/main.tf line 90, in data "aws_iam_policy_document" "this":
│   90:       condition     = var.iam_policy_statements != null || var.iam_policy != null
│     ├────────────────
│     │ var.iam_policy is null
│     │ var.iam_policy_statements is null
│
│ Exactly 1 of var.iam_policy and var.iam_policy_statments may be used, preferably var.iam_policy.

references

N/A

/terratest


"env" key deprecated in kustomize.yml (secretGenerator)

As per: https://github.com/kubernetes-sigs/kustomize/pull/1041
New format should be:
  envs:
    - secrets/traefik-forward-auth.env

in the examples.
Thanks

👍

👍


chore: set up if

Description

Problem*

Resolves https://github.com/noir-lang/noir/issues/2993
Summary*

Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

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

I'm inclined to omit this until we have proper line breaking support, I think it would be sad to lose the ability to do let min = if a < b { a } else { b };

Omitting until we have proper line breaking support


Add documentation for evaluateToBoolean()

IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #[issue number] or Closes #[issue number]
Engineer Checklist

[ ] I have written Unit tests for any new feature(s) and edge cases for bug fixes
[ ] I have added any strings visible on UI components to the strings.xml file
[ ] I have updated the  CHANGELOG.md file for any notable changes to the codebase
[ ] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
[ ] I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app

Code Reviewer Checklist

[ ] I have verified Unit tests have been written for any new feature(s) and edge cases
[ ] I have verified any strings visible on UI components are in the strings.xml file
[ ] I have verifed the CHANGELOG.md file has any notable changes to the codebase
[ ] I have verified the solution has been implemented in a configurable and generic way for reuseable components
[ ] I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

yay docs!


Aligns API Fields with K8s Conventions

What type of PR is this?

/kind bug
/kind api-change
What this PR does / why we need it:
This PR does the following:

Updates API fields to be consistent with Kubernetes API conventions.
Makes httproute.spec.rules optional since all subfields are optional and sets a default value.
Makes the port field of RouteForwardTo optional. When unspecified, the port of the request will be used to forward to a backend. Note: All other RouteForwardTo fields are optional.

Which issue(s) this PR fixes:

Fixes https://github.com/kubernetes-sigs/service-apis/issues/537
Does this PR introduce a user-facing change?:

- The port field of `RouteForwardTo` is now optional.
- `httproute.spec.rules` is now optional. When unspecified, `kubebuilder:default={{matches: {{path: {type: "Prefix", value: "/"}}}}}` will be used.

xref: https://github.com/kubernetes/enhancements/pull/2366#discussion_r567007118
/assign @robscott @hbagdi
/cc @bowei @youngnick @jpeach @stevesloka

@robscott @cmluciano does the validating webhook ensure that a RouteForwardTo includes a serviceName or backendRef value? Note that both fields are optional but one is required to forward the request to the appropriate object.

I don't understand why Metadata, Spec, and Status are all optional. I recognize that all k8s APIs have these fields configured with omitempty, but none of them have +optional tags. Although following API conventions strictly would result in a +optional tag here, I'm just not seeing it anywhere else. Because of that, I'd prefer to leave these fields as they originally were and try to get some clearer guidance on this from apimachinery. There has to be a reason for how this is done, I'm just not seeing it spelled out anywhere.

+optional is used in the apps group APIs: https://github.com/kubernetes/api/blob/master/apps/v1/types.go
In an effort to move the PR forward, I'll remove +optional from all spec/status/meta fields.

I think structs should be pointers when they are optional. As you've pointed out, the API conventions make an allowance for optional maps and slices that are not pointers, but I'm not seeing the same guidance for structs. In many cases I think it would be difficult to understand if a struct was truly empty, at least more difficult than simply checking if the value of the field was nil.

I'll revert structs to pointers.

I think a default value for BackendPolicy status does not make sense. I'll add more comments specifically on that field.

I'll remove the default.

In general, I'm uncomfortable with increases to min lengths in this scope because they represent breaking API changes. Although we've been open to breaking changes in our Go API for new minor releases, I don't think we should extend that to our Kubernetes API unless it's in the form of loosening validation.

I'll remove minLength changes from this PR.

+optional is used in the apps group APIs: https://github.com/kubernetes/api/blob/master/apps/v1/types.go
@danehans you're completely right on this one, sorry for the confusion! I edited my comment but was too late. I'm fine with adding +optional tags in to match upstream.

Thanks!
/lgtm


Callback not called with stdout/stderr

Probably because they don't emit the finish, but it would be nice to handle them properly anyway.
It's unfortunate because in my CLI I often do:
pump(
  inputStream,
  output  === undefined || output === '-'
    ? process.stdout
    : createWriteStream(output),
  () => {
    // do some cleanup after transfer
  }
)

Try using my stdout-stream module instead of process.stdout

I use a passthrough stream piped to stdout to work around the issue.
Thanks for your answer :)


Install fails: deprecated<EMAIL_ADDRESS>

Hi,
I ran $ apm install build on Ubuntu 16.04 with Atom 1.11.2 installed and it returned the error:
Installing build to /home/fusion809/.atom/packages ✗

npm WARN deprecated<EMAIL_ADDRESS>cross-spawn no longer requires a build toolchain, use it instead!
npm ERR! Linux 4.4.0-43-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/fusion809/.atom/.apm/.apmrc" "--userconfig" "/home/fusion809/.atom/.apmrc" "install" "/tmp/d-116920-20913-12lg2f2/package.tgz" "--runtime=electron" "--target=0.37.8" "--arch=x64" "--global-style"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5
npm ERR! file /home/fusion809/.atom/.apm/argparse/1.0.9/package/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/fusion809/.atom/.apm/argparse/1.0.9/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-116920-20913-1bbtssm/npm-debug.log

Thanks for your time,
Brenton

Nvm after deleting my ~/.atom/.apm folder this error went away.


ol.coordinate.toStringHDMS() can result in 60 seconds in the output string rather than rolling that up to the next minute

We are seeing a value like this being output from toStringHDMS():
37 59' 60" N ...
Which should actually be:
38 00' 00" N ...
I suspect it's due to expected floating point arithmetic errors and could be handled in degreesToStringHDMS_() like so:
ol.coordinate.degreesToStringHDMS_ = function(degrees, hemispheres, opt_fractionDigits) {
    var normalizedDegrees = ol.math.modulo(degrees + 180, 360) - 180;
    var x = Math.abs(3600 * normalizedDegrees);
    var dflPrecision = opt_fractionDigits || 0;

    var deg = Math.floor(x / 3600);
    var min = Math.floor((x / 60) % 60);
    var precision = Math.pow(10, dflPrecision);
    var sec = Math.ceil((x * precision) % 60) / precision;

    if (60 === sec) {
        sec = 0;
        min += 1;
    }

    if (min >= 60) {
        min -= 60;
        deg = deg >= 0 ? deg + 1 : deg - 1;
    }

    return deg + '\u00b0 ' + ol.string.padNumber(min, 2) + '\u2032 ' +
        ol.string.padNumber(sec, 2, dflPrecision) + '\u2033 ' +
        hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);
};

Do you have a concrete failing testcase? Are you willing and able to submit a pull request?

Thanks.  I can come up with a test case and would be happy to submit a pull request (don't know how soon though).

No rush.

Noticed the above as well. I solved it by following function operating on a either a lat or a long. The function is comparable to the one proposed above. Precision is up to 9 digits in addition to the total seconds. .lpad is my own extension for String for left padding. Anyway, my 2 cents for your perusal... Rgds, Reinoud
function toDegMinSec(d,decimals,isSigned,isLatitude) {
	var negative = d<0? true : false

	var sectotal = Math.abs(d*3600);
	decimals = parseInt(Math.max(0,Math.min(9,decimals)));
	var secrounded = sectotal.toFixed(decimals);

	var minint = parseInt(secrounded/60.0);
	var sec = (secrounded-(60*minint)).toFixed(decimals);
	var min = parseInt(minint%60);
	var deg = parseInt(minint/60);

	if (isSigned) {
		var sign = deg==0? " " : negative? "-" : " ";
		return (sign+new String(deg).lpad(' ',3)+"°"+new String(min).lpad(' ',2)+"'"+new String(sec).lpad(' ',(2+1+decimals))+"\"");
	} else {
		var hem = d<0? (isLatitude? "S":"W") : isLatitude? "N" : "E";
		return (new String(deg).lpad(' ',3)+"°"+new String(min).lpad(' ',2)+"'"+new String(sec).lpad(' ',(2+1+decimals))+"\""+hem);
	}
}

Pull request @veetrp?

I'm sorry ahocevar. I'm new to GitHub and not well versed yet in this kind of collaboration. I would love to participate but forking the whole ol3 lib is probably a bit much to begin with... Please indicate if my perception is wrong... Cheers, Reinoud

@ahocevar referring to the above, making a pull request means I have to fork ol and add my function to my branch and then request a pull? Or is there an easier way? Sorry I'm a newbie on GitHub and I code in my spare time (being a geologist by profession)...

@veetrp This tutorial might help you getting started: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github

@tsauerwein and @ahocevar
Hi Tobias and Andreas, thanks for the info. As I suspected, to make a pull request you'll have to fork and branch. I appreciate that's the version control system, i.e. fair enough. However at this point that would take too much of my time, being only a developer in my spare time. So, I'm sorry. Anyways, I greatly enjoy this ol work and thank you for the all the hard work. Rgds, Reinoud

#6410 I created a pull request to address this

Fixes with #6410.


templatePattern fixed (digits added)

!bbox_4326! did not replace because of templatePattern did not contain digits

Thanks!


Skipping fields in serde_json::Value whose value is None.

Hi all, I am quite new to rust and I am unable to figure out how to ignore fields from serialized representation of serde_json::Value. I know we can provide skip_serialization_if_none on struct fields, but unfortunately this is a Value not my struct. I have tried implementing a custom Serializer, but I am quite lost on how to deal with nested structures.
This is what I have so far
#[derive(Deserialize, Debug)]
pub struct CustomValue(Value);

impl Deref for CustomValue {
    type Target = Value;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl Serialize for CustomValue {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        // let mut seq = serializer.serialize_map(Some(2))?;
        match &self.0 {
            Value::Null => serializer.serialize_none(),
            Value::Bool(b) => serializer.serialize_bool(*b),
            Value::Number(n) => n.serialize(serializer),
            Value::String(s) => serializer.serialize_str(s),
            Value::Array(v) => v.serialize(serializer),
            Value::Object(m) => {
                let mut seq = serializer.serialize_map(Some(m.len()))?;
                for (k, v) in m {
                    if !v.is_null() {
                        seq.serialize_entry(k, v)?;
                    }
                }
                seq.end()
            }
        }
    }
}

But this only removes None keys from top level fields. In theory, I know that we'll have to do a recursive approach here, but in practice I don't know how to implement this in Rust. I can't figure out what types to use etc.
Any help is very appreciated, thank you.

Does https://github.com/jonasbb/serde_with#skip_serializing_none help?


Change verbage in various areas

Message to be sent to individuals is currently set as "notes"  this is pointless in the current version. Changing that to "Personal Message' would make more sense.

Not at the moment. but lets leave it open just encase.

Think we can close this.


Implement findrole

Fixes #57
findrole command accepts multiple arguments and lists down all the profiles with roles that matches the input arguments. It also checks if the argument is valid.
I have yet to code out the tests
e.g. findrole supplier client - lists down all suppliers and clients

Current tests do not include ADA and HOON in TypicalPersons. If I add it under the getTypicalPersons() method, other tests fails. Hence, in FindRoleCommandTest, i have excluded those 2 in the test domain. If we were to change to include these 2 in the method, reminder to change it under the FindRoleCommandTest as well.


Configure GA for SPA

Bounce rate is high, think this is a reason

https://github.com/KHS-Minithon/website/commit/709f0b4a10446cb8b920681f8249bb85083922ba

Looks good thx


Fix rfc6570 incomplient notation of query expansion and continuation

This pull request will fix the notation of query parameters, so they will be complient to RFC 6570 section 3.2.8 and 3.2.9.
The query parameter notation from multiple occurring parameters (lists) has to be {?list*} for Form-Style Query Expansion and {&list*} for Form-Style Query Continuation.

@goetas @muub @andrerom @mwadon @adrienbrault Do someone want's to review this pull request?

Hi, I've tested and reviewed it. Looks good to me... I'm would like to understand why previously was implemented as bar%5B%5D... Any Idea of what could be the impact if this gets merged?

Hi, a possible impact could be that any library which has used the previously RFC incomplient implementation might be unable to expand the generated uri template.
But this would be the expected and an appreciated behavior. Any implementation which is only able to expand the invalid format is also invalid.
I would recommend to mark this change as a minor release to give any consumers the ability to respect and test the underlying changes.
From my point i find no reason why it was previously implemented that way. Maybe to force* the consumer to generate a query like: https://host.domain/path?query[]=foo&query[]=fooBar.
But this should not be a problem of this url generator due to the fact that it claims to be RFC6570 compliment. Otherwise it would not be.

Most likely because the syntax query[] is more PHP friendly (even if against the RFC6570 standard...), isnt?

Yes if you use the contents of the superglobal $_GET instead of $_SERVER['QUERY_STRING'] to construct your request you are right.
But this it is not to the url generator to decide how the client expands the templated uri. The url generator also does not know which backend might be behind the templated uri. It could be a node server or any other technology which is able to handle http requests.

One of the flaws I remember in RFC6570 is that there is no way to generate parameters as query[] for arrays. Isnt?

as exampple:
{?list*} expands to ?list=red&list=green&list=blue if the list is ['red', 'green', 'blue']
This is what RFC6570 says, but for PHP list=red&list=green&list=blue will collapse in a single $list='blue' most probably

I think that this PR should be merged but will require a 3.0 release as it is not backward compatible (even if standard).
Does it make sense to allow anyway some way to generate query[] if the user wants to... ? so it will be more friendly in the case both client and server are PHP

I would not recommend this, as this will bring knowledge about the underlying infrastructure of potential external services into the source code.
Only the consumer on client and server side has to decide how to handle the uri template and the expanded uri.

Alright. Then the example on https://github.com/hautelook/TemplatedUriRouter#usage is wrong. It should be
/demo{?page,sort*,filter*}


libratbag-hidraw: add filter to hidraw read

Currently, we only have functions that will read and timeout after 1s if
no packets were received. The issue with this is that a lot of times we
may catch unrelated packets, such as mouse or keyboard changes.
To solve this, this patch adds a new set of functions suffixed with
_filter, that will keep reading packets until a valid packet if found.
Users define a filter function and pass it as an argument.
Signed-off-by: Filipe Laíns<EMAIL_ADDRESS>

Replaces #1151
@perigoso, please give it a try

I just updated the to only log the read buffers on valid packets, which prevents ratbagd from being a keylogger in most situations if these functions are used.

Tested on the Rival 310 where I was abled to reproduce the issue reliably, everything working as expected.
ratbag info: openinput: protocol version 0.0.1
ratbag info: openinput: firmware vendor: openinput-git
ratbag info: openinput: firmware version: r206.419530a.dirty
ratbag info: openinput: device: openinput Device

@FFY00 I am fine with merging this PR as it, unless you want to address some of @whot comments

I do.

@FFY00  can't request a review from you, so heres a mention

I wasn't able to reproduce the initial issue (the devices firmware currently only sends protocol packets, no regular mouse or keyboard), but it is working in the "non edge case"/regular state

Can someone with devices that use the steelseries driver test this?

I'm not sure whether you want mice with custom or official firmware tested as don't see any SteelSeries-specific changes, but I tried this branch with my SteelSeries Rival 100 in case it matters. It works fine, I can change LED color and resolutions. It should be noted that my mouse doesn't support reading configuration data from it and doesn't support changing button behaviors.

driver-steelseries.c  uses hidraw functions that were changed here

I put some break points to check if changed pieces of code are used on my mouse, only firmware version is used (which gives the same result), read configuration is not (who would have thought).

well thats good enough for me, I didnt think there would be any problems

merged, thanks


How to check if sel::Selector is a table and get its length?

I have this lua table:
clips = {{x=80, y=0, w=79, h=79}, --aiming up
	{x=0, y=79, w=79, h=55}, --standing legs
	{x=80, y=79, w=79, h=55}, --running (legs)
	{x=160, y=79, w=79, h=55}, --running 2
	{x=240, y=79, w=79, h=55}, --running 3
	{x=320; y=79, w=79, h=55}, --running 4
	{x=400, y=79, w=79, h=55}, --jumping (legs)
	{x=480, y=79, w=79, h=55}, --jumping 2
	{x=560, y=79, w=79, h=55}, --jumping 3
	{x=0, y=138, w=79, h=55},--jumping 4
	{x=0, y=197, w=79, h=139}--crouch
}

And I want to access it from c++. How do I get the amount of elements in sel::State state["clips"] so I can get all the nested tables without knowing the length of the array beforehand? Sorry for asking this here but I couldn't find anywhere else to ask.

An easy way might be to add a size function to the clips table and just invoke that.
int size = state["clips"]["get_size"]();
// etc

I have another issue, this time it's with reading a string. I have this in the lua script:
name = "alex"

But for some reason when doing this in C++, name ends up being NULL instead of "alex":
sel::State state{true};
char* name = state["name"];

Is there anything I did wrong?

You are trying to store something in the Lua runtime to a char* which has a sizeof a pointer. That can't work because the string needs to be heap allocated. Use std::string name instead. I suggest looking at https://github.com/jeremyong/Selene/blob/master/test/interop_tests.h for examples of usage. Hopefully the different test cases will be descriptive enough.