Custom shadow resolution broken on game 1.04 + fix 0.8.3

As title, the setting appears to be completely ignored. Too lazy to provide screenshots, but I'm 100% sure the issue is there, as the difference from stock and increased shadow resolution is extremely noticeable on my 4K display.  Rolling back to 0.8.2 fixed the issue. Of course, I have two separate ini files because the config names/parameters have been changed.
Unrelated, but I also either don't understand the camera sway option or that doesn't work either. I never tested it on 1.03 or before, but on 1.04 the option doesn't seem to work either on fix 0.8.2 or 0.8.3, but there's an option in the game's setting that apparently removes that sway? It does help a lot with the perceived amount of aliasing.
If that matters, I'm playing the MS Store /  Xbox / UWP / WinGDK version.
Edit: I'm using the "regular" version of the fix, not the Reloaded one.
Edit 2: Well, now I'm confused. I quit the game while writing this issue because in 0.8.2 there's no pause on focus loss, and my keystrokes were being sent to the game. Once I reopened the game, shadows were low-res. I tried swapping back and forth between 0.8.2 and 0.8.3, testing different values, but shadows are low-res. I've attached the log file, apparently the memory pattern scan fails for the camera shake but works for the shadow resolution part. I've also attached my config and the hashes of the fix's .asi , to prove I'm not going crazy
MetaphorFix.log
MetaphorFix.ini.txt

Edit 3: Tested 0.7.9, 0.8.0 and increased shadow res works. Tested 0.8.1, 0.8.2, shadows are low-res. I could've sworn I was using 0.8.2 and that was working, I don't know what to say.

The shadows tweak atleast on Steam version does work. As for the camera, for me I had to enable it in-game, and then set to true in the metaphor ini. If the in-game is set to disable, the metaphor tweak isn't working as intended.

So to clarify, you're still having issues with the shadow resolution when using v0.8.3 of MetaphorFix with your MS Store version of the game?
Also, the camera shake option does not work for you and the pattern scan for that fails?

So to clarify, you're still having issues with the shadow resolution when using v0.8.3 of MetaphorFix with your MS Store version of the game?
Also, the camera shake option does not work for you and the pattern scan for that fails?

As you can see from the attached MetaphorFix.log at line 3 I'm running 0.8.3, scroll down to line 129 and you can see the pattern scan fails. And yes, I re-re-re-re-tested and confirm that shadows are broken, actually I tested with no mod at all and shadows are slightly higher resolution. The breaking point for the increased shadow resolution working with me is 0.8.1, as in the last version they work properly on is 0.8.0
At the moment I'm using 0.8.0 and I'm kind of happy with it, asides from the camera sway disabler not working but I just disabled it in the game's settings instead (I guess it disables more kind of camera movements? I don't know honestly as I've never seen your implementation).
I understand you probably don't have access to this version of the game, if I can do anything to help you get to the bottom of this let me know, asides from lending you my MS Account for security concerns.

So to clarify, you're still having issues with the shadow resolution when using v0.8.3 of MetaphorFix with your MS Store version of the game?
Also, the camera shake option does not work for you and the pattern scan for that fails?

As you can see from the attached MetaphorFix.log at line 3 I'm running 0.8.3, scroll down to line 129 and you can see the pattern scan fails. And yes, I re-re-re-re-tested and confirm that shadows are broken, actually I tested with no mod at all and shadows are slightly higher resolution. The breaking point for the increased shadow resolution working with me is 0.8.1, as in the last version they work properly on is 0.8.0
At the moment I'm using 0.8.0 and I'm kind of happy with it, asides from the camera sway disabler not working but I just disabled it in the game's settings instead (I guess it disables more kind of camera movements? I don't know honestly as I've never seen your implementation).
I understand you probably don't have access to this version of the game, if I can do anything to help you get to the bottom of this let me know, asides from lending you my MS Account for security concerns.

I'm curious as to why the shadow resolution wouldn't be working for you as it appears to be detected and modifying the correct area of code (though I need to clarify that with access to the game exe). Are you using SpecialK with this game?
You don't need to share account details or anything. Just uploading the game exe will let me compare patterns and such which should be enough. Obviously I can't test the changes on an exe but I could generate a test build and then you could test it and report back.
So to dump the exe for the MS Store version, you'll need to use UWPDumper. You just launch the game, then launch the x64 version of UWPInjector.exe, type the process ID and it'll spit out unencrypted dumped game files. You would then upload the shipping executable for P3R (in P3R\Binaries\WinGDK) to somewhere like Pixeldrain or whatever file host you prefer.

There you go, sorry for the rar, actually had to go and download it myself because 7zip kept getting to 99% instantly and then being stuck there for minutes. The password is "shadowsplz" without quotation marks. Let me know if you need anything else.
Oh and since you asked I don't use SpecialK, I do use the latest ReShade with addons support. I didn't mention it as I've already tested with it disabled (.dll renamed) and excluded it being the culprit.

Thanks for posting that and sorry for not getting to it sooner. In v0.8.4, I've moved the graphics hooks/patches to apply earlier, this may fix the shadow issue for you as the patterns all match and the code seems roughly the same.
As for the camera shake, they actually just patched the game today and it looks like the reverted some of the changes they made in the last patch. It's possible it's just a different compiler output but regardless, v0.8.4 might work on the latest MS Store version now that the pattern is similar to the way it used to be.
If you try that version, let me know how it goes and post a log file.

With the latest version of the game (which apparently is called 1.09?) running the latest version of your fix everything works perfectly, great job! I still don't understand what the difference between disabling the camera shake in the fix .ini is compared to doing it in-game, but shadows have increased resolution, and with the in-game camera shake set to on while having it disabled in the fix .ini I don't get the idle swaying, so I guess it's working as intended. I'm gonna close this issue, but I'm still curious about the camera thing.

With the latest version of the game (which apparently is called 1.09?) running the latest version of your fix everything works perfectly, great job! I still don't understand what the difference between disabling the camera shake in the fix .ini is compared to doing it in-game, but shadows have increased resolution, and with the in-game camera shake set to on while having it disabled in the fix .ini I don't get the idle swaying, so I guess it's working as intended. I'm gonna close this issue, but I'm still curious about the camera thing.

Glad to hear it's working for you now! The main difference with the camera shake option in MetaphorFix is that it disables camera shake/sway everywhere, not just when running about and in dialogues as the in-game option does. Think of it like a global off switch for the camera shake/sway instead of it being selectively disabled when using the in-game option.


Don’t use Flask-Script

CLI commands are built into flask now.

Fixed in 3be6062d56128c43e1fd695c22cbf672685b0cf3.


wrong content

"help(random.randrange)
Help on method randrange in module random:
randrange(start, stop=None, step=1, _int=<class 'int'>) method of random.Random instance
Choose a random item from range(start, stop[, step]).
This fixes the problem with randint() which includes the
endpoint; in Python this is usually not what you want."
Function signature is wrong.The correct one should be randrange(**start=None,**stop,step=1)

In fact, the function signature in the help precisely matches the signature in the Python source code: https://hg.python.org/cpython/file/3.5/Lib/random.py#l177
I can see that this is confusing, as semantically it's the start parameters that is optional. However, in Python compulsory parameters have to go before optional parameters, so it is not allowed to have the signature randrange(start=None,stop,step=1).
I do not see what Spyder can do about this. If you type help(random.randrange) in Python (outside Spyder), you get the same.

Thank you for your reply,I'm a beginner of Python,sorry to bother you.
------------------ 原始邮件 ------------------
发件人: "Jitse<EMAIL_ADDRESS>发送时间: 2016年9月3日(星期六) 晚上11:13
收件人<EMAIL_ADDRESS>抄送<EMAIL_ADDRESS><EMAIL_ADDRESS>主题: Re: [spyder-ide/spyder] wrong content (#3397)
In fact, the function signature in the help precisely matches the signature in the Python source code: https://hg.python.org/cpython/file/3.5/Lib/random.py#l177
I can see that this is confusing, as semantically it's the start parameters that is optional. However, in Python compulsory parameters have to go before optional parameters, so it is not allowed to have the signature randrange(start=None,stop,step=1).
I do not see what Spyder can do about this. If you type help(random.randrange) in Python (outside Spyder), you get the same.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thank you for your reply,I'm a beginner of Python,sorry to bother you.

Don't worry about it, everybody was a beginner once.


Update logfilter to remove use of IpMap

Requires #9530 - libswoc 1.4.6.

Are there Au test(s) that exercise this these changes?

Yes, I was getting failures with "log-filter" (among others) which I fixed before sending up this PR.


To-do List

General

[ ] Finish CONTRIBUTING.md
[ ] Fix labels for issues
[x] Add milestones #11
[ ] Advertise this repo
[ ] Translate - #12

Front End

[ ] HTML for Posts and categories
[ ] CSS for Posts and categories
[ ] Make or find some graphics for Icons etc (if taken from the Internet, they MUST be licensed CC!)
[ ] Javascript (when the HTML/CSS are finished)
[ ] HTML, CSS, JS for submit post page

Back end

[ ] Make back end

I will go into much more detail later but I wanted to go ahead and create an issue for this so people can start giving ideas.

@Aliin Instead of adding To-do list on the Wiki we should do it here that way it can be publically checked off.

Okay, sorry. I'm learning still how to do all of this :)

Okay, we'll just use this To-Do-List for rough outline from now on, the actual coordination and to-do-lists will be on Trello.

Yeah, that's what it was intended to be, a public rough outline for those who were not on the Trello.


Should we support Cairo::Color?

rcairo will use red-colors. So we don't need to support Cairo::Color.


is it possible to use Ground Control with content type "application/json" ?

@mohammad19991 it can easily be done via change AFPropertyListRequestSerializer to AFJSONRequestSerializer and AFPropertyListResponseSerializer to AFJSONResponseSerializer


Error starting daemon: error initializing graphdriver: devmapper: Device %device% is not a thin pool

Output of docker version:
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64

Output of docker info:
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 1.10.3
Storage Driver: devicemapper
 Pool Name: docker-202:1-395536-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/mapper/docker-pool0
 Metadata file: /dev/mapper/docker-pool0
 Data Space Used: 186.7 MB
 Data Space Total: 48.31 GB
 Data Space Available: 48.13 GB
 Metadata Space Used: 1.683 MB
 Metadata Space Total: 17.05 GB
 Metadata Space Available: 17.04 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Library Version: 1.02.90 (2014-09-01)
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: bridge null host
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.87 GiB
Name: ip-172-16-11-30
ID: SGIG:VTD2:5Z25:WIHP:3DQS:TS25:HK53:BFM5:FILA:PRZF:ZKLH:TKT7
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Additional environment details (AWS, VirtualBox, physical, etc.):
AWS EC2
Steps to reproduce the issue:

Setup a lvm thin pool

PV=/dev/xvdf
VG=docker
LV=pool0

pvcreate $PV
vgcreate $VG $PV
lvcreate -y -l 5%VG -n $LV\meta $VG
lvcreate -y -l 90%VG -n $LV $VG
lvconvert -y --zero n --thinpool $VG/$LV --poolmetadata $VG/$LV\meta

lvs -a
  LV              VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare] docker ewi-------  2.50g
  pool0           docker twi-a-t--- 45.00g             0.00   0.01
  [pool0_tdata]   docker Twi-ao---- 45.00g
  [pool0_tmeta]   docker ewi-ao----  2.50g

dmsetup status
docker-pool0-tpool: 0 94363648 thin-pool 0 94/654336 0/737216 - rw no_discard_passdown queue_if_no_space
docker-pool0_tdata: 0 94363648 linear
docker-pool0_tmeta: 0 5234688 linear
docker-pool0: 0 94363648 linear

Try to run docker daemon with a devicemapper driver

Describe the results you received:
systemctl stop docker ; rm -rf /var/lib/docker ; /usr/bin/docker daemon --debug --storage-driver 'devicemapper' --storage-opt 'dm.thinpooldev=/dev/mapper/docker-pool0' --storage-opt 'dm.fs=xfs' --storage-opt 'dm.use_deferred_removal=true'
DEBU[0000] docker group found. gid: 999
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Using default logging driver json-file
DEBU[0000] [graphdriver] trying provided driver "devicemapper"
DEBU[0000] devicemapper: driver version is 4.27.0
DEBU[0000] devmapper: Deferred removal support enabled.
DEBU[0000] devmapper: Generated prefix: docker-202:1-395273
DEBU[0000] devmapper: Checking for existence of the pool docker-pool0
DEBU[0000] Cleaning up old shm/mqueue mounts: start.
FATA[0000] Error starting daemon: error initializing graphdriver: devmapper: Device docker-pool0 is not a thin pool

Describe the results you expected:
No fatal error.
Additional information you deem important (e.g. issue happens only occasionally):
Problem does not occur if you use deprecated options: dm.datadev and dm.metadatadev
systemctl stop docker ; rm -rf /var/lib/docker ; /usr/bin/docker daemon --debug --storage-driver 'devicemapper' --storage-opt 'dm.datadev=/dev/mapper/docker-pool0' --storage-opt 'dm.metadatadev=/dev/mapper/docker-pool0' --storage-opt 'dm.fs=xfs' --storage-opt 'dm.use_deferred_removal=true'

Try changing:
--storage-opt dm.thinpooldev=/dev/mapper/docker-pool0
to:
--storage-opt dm.thinpooldev=/dev/mapper/docker-pool0-tpool

Using the -tpool device works for me (debian jessie). Maybe this should be updated in the docs

@svvac some changes were made to the documentation recently, but perhaps you could check if there's incorrect information in there? https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/
The Markdown file used to generate that page can be found in this repository; https://github.com/docker/docker/blob/master/docs/userguide/storagedriver/device-mapper-driver.md

+1 I had the same problem, using the -tpool device works for me (debian jessie).  Official docs are not updated yet.

@lgibelli would you be interested in opening a pull request to fix that part of the documentation if it's incorrect? Also note that for Jessie, you should be able to use aufs if you install the linux-image-extra packages

@thaJeztah I'd rather not use aufs, Device Mapper (https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the recommended storage driver for Docker.
I don't think this should be fixed in the documentation, using the -tpool device is just a workaround. It should be fixed in Docker. The documentation could mention this as a workaround.

Made all steps mentioned in documentation and got the same issue. What should I do to fix this?

Device mapper is not the recommended storage driver for Docker, and that
page does not say that, it says it is the default for RHEL and derived
distros, and supported elsewhere. In general it is not recommended.
On 3 Jul 2016 00:33, "Luca Gibelli"<EMAIL_ADDRESS>wrote:
@thaJeztah https://github.com/thaJeztah I'd rather not use aufs, Device
Mapper (https://docs.docker.com/engine/userguide/
storagedriver/device-mapper-driver/) is the recommended storage driver for
Docker.
I don't think this should be fixed in the documentation, using the -tpool
device is just a workaround. It should be fixed in Docker. The
documentation could mention this as a workaround.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/docker/docker/issues/21304#issuecomment-230140029, or mute
the thread
https://github.com/notifications/unsubscribe/AAdcPP6ULszQZS38-oWObnV2Ejfe-M4zks5qR2XAgaJpZM4HzNGO
.

After restart LVM want activate again. So I updated to new kernel and overlay2. Spend whole day to realize devicemapper is bad (

After restart LVM dont want to activate again.

this might be caused by the missing thin_check binary. I have just came across the issue, and submitted a fix (https://github.com/moby/moby/pull/34486/commits/58a453f3f06c1daf34544da8aa16bb95e8e18010)

https://github.com/docker/docker.github.io/pull/386 (rollback to error?)

Had no problem with docker 1.12 engine.  But could not install docker-CE working.
dockerd: Error starting daemon: error initializing graphdriver: devmapper: Device docker-thinpool is not a thin pool
All thin pools (on other machines) work under older versions.
Besides, there is no docker-storage-setup anymore.
Anyone has used download CE and installed it successfully ?  Thx.

I'm getting this error in Docker version 19.03.2-ce, build 6a30dfca03 on Arch Linux

Same issue here with Docker version 19.03.12-ce, build 48a66213fe on Arch Linux.
I tried this command:
systemctl stop docker ; rm -rf /var/lib/docker ; /usr/bin/docker daemon --debug --storage-driver 'devicemapper' --storage-opt 'dm.datadev=/dev/mapper/docker-pool0' --storage-opt 'dm.metadatadev=/dev/mapper/docker-pool0' --storage-opt 'dm.fs=xfs' --storage-opt 'dm.use_deferred_removal=true'
But I get unknown flag: --storage-driver then the docker help show up.

The daemon subcommand no longer exists (the daemon is now a separate binary, named dockerd.
However, unless you have very specific reasons, I would not recommend using the device mapper storage driver (the driver is marked deprecated, but won't be removed (yet)). Generally, I'd recommend the default (overlay2) storage driver, which requires no configuration, and is more performant for most situations.

With the device mapper storage-driver being deprecated, I'm closing this issue


Commits page opens after navigating away

Describe the bug
If you click away from the Commits tab before it loads, the commits tab opens back up
To Reproduce
Steps to reproduce the behavior:

Go to Commits tab
Before it loads, go to a different tab

Expected behavior
Commits tab should not open
Screenshots
https://github.com/NirmalScaria/le-git-graph/assets/11315492/3fcd9567-2adb-40c1-84ce-a1c4f631a65b
Version information:

OS: macOS
Browser: Brave
Version: 1.56.14 (Chromium: 115.0.5790.114)
Repository where this issue was observed: All

@NirmalScaria can you assign this issue to me? I'm a participant of hacktoberfest

Hey @Grace229 ,
You are welcome to work on the issue and to submit a pull request. Individual issue assigning is not usually followed here.
Thank you. Best wishes.


CocoaList Swipe to Delete Function

Does  CocoaList support swipe left/right  as what we have in UITableView?

@skywalkerlw nope. Unfortunately I can't tap into how SwiftUI decomposes view hierarchies to extract images + text (to allow me to map it to UIContextualAction, so I'm considering replicating the API out of scope.


Update validate button

Description
Per UX feedback, the Validate button on the set up page has been moved to a flex group, to have rounded corners.

Issues Resolved
Closes #913
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Unable to get button to display correctly like in the original issue, got confirmation from @kavck that it's not urgent to merge this for the current release

The UI this is a part of is being replaced. Closing to work on the new UI instead.


Ruby wrong hightlighting

Issue Type: Bug
my code: https://pastebin.com/6pPea2gj

VS Code version: Code 1.21.1 (79b44aa704ce542d8ca4a3cc44cfca566e7720f1, 2018-03-14T14:46:47.128Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)

Memory (System)
7.89GB (2.66GB free)

Process Argv
C:\Program Files\Microsoft VS Code\Code.exe D:\Jason\My Games\RPGVX\Installers\Advanced Chest System v1.0\Data\Scripts.rvdata

Screen Reader
no

VM
0%

Extensions (4)

Extension
Author (truncated)
Version

npm-intellisense
chr
1.3.0

vscode-markdownlint
Dav
0.14.1

vscode-eslint
dba
1.4.8

vetur
oct
0.11.7

Reproduces without extensions

This issue was moved to textmate/ruby.tmbundle#117


Update pl.xml - finished translation

Proposed Changes
complete PL locale

I realized that PL translation was incomplete.
I added missing messages.

Thanks 😊


[Added Docs For Netlify

Updated the README to show the docs on how to upload your generated index.html pages
Added Docs for how to  upload your webpage on netlify
Added image assets

@mwt Please review my pull request

Looks good!


Implement $...$ via styling node

This is a fix for #5: supporting $...$ within \text.  For example, x+\text{some $y+\text{some $z$}$} works.
I tested in LaTeX, and it turns out that $$ doesn't mean anything special within \text, i.e., it starts and immediately ends math mode; so \text{$$foo$$} is equivalent to \text{foo} or \text{foo$$}.  So I didn't look for $$.  Perhaps I should look for \( ... \) and/or \[ ... \], but this is also a good start.
Basically, I implemented $ as an implicit group, and used the end-token argument for parseExpression to stop when hitting the closing $.  I returned a styling  (equivalent of \textstyle) node, and changed mode to math, which seems to force a return to math fonts.  Does this seem like the best approach?  We could instead return a math node, but I think it would be treated identically, at least for HTML.  In MathML, I couldn't figure out whether anything like mrow or mstyle can be nested within mtext... maybe it's fine?

I wonder whether this can be made a proper function in functions.js. The function handler does have access to the parser, so it should be able to do essentially the same things you are doing here, without need for a special case inside the Parser.
You shouldn't assign to mode directly, but instead use switchMode. It takes care of the fact that math mode discards whitespace while text mode retains them. As it is, \text{a$ b$c} will throw an exception since space is a valid symbol only in text mode. \text{a$b$ c} works as intended because the closing $ gets consumed after the mode was changed back. You might move the initial consume() after the mode switch, to avoid using switchMode. But that wouldn't work if you make this a function as suggested above.

In MathML, I couldn't figure out whether anything like mrow or mstyle can be nested within mtext...

Reading the grammar I'd say no. It can contain text, and it can contain two kinds of elements but neither of these elements can have any nested content, just attributes. So perhaps the correct approach would be to analyze the children of a run of text, and if some of it is not literally text, then we don't build a single mtext but instead build an mrow with mtext and other items as children.

I agree that $ could be put into functions... but the same could be said of sizeFuncs, styleFuncs, and presumably even \begin and \left (all currently in parseImplicitGroup).  I think the idea is that the numArgs model of arguments in functions.js doesn't "fit" these implicit groups so, even though numArgs: 0 ought to do the (zero) preparation we need for these functions to do the appropriate magic to the parser... it seemed like it should belong there?  Perhaps @xymostech could comment on preferred style?  (It looks like she wrote parseImplicitGroup initially.)  Is there a reason not to add an implicit flag or something to defineFunction support?...
Thanks for pointing out switchMode -- I missed that, as I was modeling after https://github.com/Khan/KaTeX/blob/master/src/Parser.js#L654-L670 (for no particular reason).  I wonder whether that manual assignment to this.mode is correct?  Anyway, I've switched to switchMode in $ handling, and now various spacing around the $ works.  (I had caught \text{a$b$ c} but missed \text{a$ b$c}!)
I haven't touched MathML support yet, but your plan sounds like a good one.

You are right, most of the things in parseImplictGroup would fit in functions.js just as well as $ if not even better, since the start with a \. At the time @xymostech wrote this code, having functions do this work was infeasible because a function execution couldn't modify the current position in the input string, it couldn't consume input. That became possible only with #386. That's not to say she would have done anything different, though.
I think there are two ways to look at it. One way is to say that a function (in the sense of functions.js) has all its commands parsed before any of them are executed. Then you're right, and $ should stay in the parser with the others you mentioned. Another way would be putting all the special handling in response to a given token into functions.js in order to keep the Parser lean. In that case all the things you mentioned should go there. It's probably best to lease $ where it is for now, and if we decide to move things, then we can move all of them in a separate PR.

Is there a reason not to add an implicit flag or something to defineFunction support?

What would that flag accomplish? I don't see a need for a flag at all.

I wonder whether that manual assignment to this.mode is correct?

It does the mode switch before consuming the brace both on opening and closing.
I just realized that the interaction between switchMode and token consumation is nontrivial as well. If I were to replace the manual assignments in there with switchMode calls, I'd have to do so after consuming the respective token. Because if I check that the next token is { and then switch to text mode, I might end up reading a space instead! Perhaps I should add a comment somewhere, indicating proper use of that function…
Your code as of your latest commit should be OK, as it does switch modes after consuming the token that triggered the mode switch.

From the spec:

An mtext element is used to represent arbitrary text that should be rendered as itself. In general, the mtext element is intended to denote commentary text.

The only thing other than text that's shown inside a mtext are comments.  This leads me to believe that the best approach would be to render x+\text{some $y+\text{some $z$}$} as the following MathML:
<mrow>
    <mi>x</mi>
    <mo>+</mo>
    <mtext>some </mtext>
    <mrow>
        <mi>y</mi>
        <mo>+</mo>
        <mtext>some </mtext>
        <mrow>
            <mi>z</mi>
        </mrow>
    </mrow>
</mrow>

Actually I'd render x+\text{some $y+\text{some $z$}$} as
<mi>x</mi>
<mo>+</mo>
<mrow>
    <mtext>some </mtext>
    <mi>y</mi>
    <mo>+</mo>
    <mrow>
        <mtext>some </mtext>
        <mi>z</mi>
    </mrow>
</mrow>

That way, each \text command results in either a naked <mtext> or it results in an <mrow> containing <mtext> and other things.

I finally got around to revising this.  Rebased to master, and reimplemented the MathML outputter so that x+\text{some $y+\text{some $z$}$} now renders as:
<mrow>
  <mi>x</mi>
  <mo>+</mo>
  <mrow>
    <mtext>some </mtext>
    <mstyle scriptlevel="0" displaystyle="false">
      <mi>y</mi>
      <mo>+</mo>
      <mrow>
        <mtext>some </mtext>
        <mstyle scriptlevel="0" displaystyle="false">
          <mi>z</mi>
        </mstyle>
      </mrow>
    </mstyle>
  </mrow>
</mrow>

while x+\text{yes} renders as:
<mrow>
  <mi>x</mi>
  <mo>+</mo>
  <mtext>yes</mtext>
</mrow>

Code is relatively clean.  Time for another review!

P.S. Perhaps it would make sense for styling nodes in MathML to check whether the style has actually changed -- and use <mstyle> if so, and <mrow> otherwise?

I was thinking it'd be nice to have to snapshot tests for our MathML output.  The existing tests are fragile, tedious to write, and hard to make sense of.

@kevinbarabash The MathML tests do seem to have revealed a bug in the new code.  I believe indeed that <mi>Ω</mi> should be <mi mathvariant="normal">Ω</mi>.  Now that I see that "normal" means "roman not italic" (for single characters), I understand that part of the old code better.  Will fix...
Error we're looking at: `Expected 'Ax2kωΩı+Ax2k\omega\Omega\imath+' to contain 'Ω'

@kevinbarabash But now I see they're not perfect.  Here's an example:
1) A MathML font tree-builder should render \mathbb{Ax2k\omega\Omega\imath+} with the correct mathvariants
  Message:
    Expected '<math><semantics><mrow><mrow><mi mathvariant="double-struck">A</mi><mi>x</mi><mn>2</mn><mi mathvariant="double-struck">k</mi><mi>ω</mi><mi mathvariant="normal">Ω</mi><mi>ı</mi><mo>+</mo></mrow></mrow><annotation encoding="application/x-tex">\mathbb{Ax2k\omega\Omega\imath+}</annotation></semantics></math>' to contain '<mn mathvariant="normal">2</mn>'.

But that MathML looks good to me -- <mn> has a default math-variant of normal so it doesn't need to be set in this case.  Easy enough to fix, though -- they key is to check that it doesn't contain <mn mathvariant="double-struck">.

I changed the mathvariant generation code to only emit when it doesn't result in the default output.  I had to change the tests accordingly, but this generally seems preferable.  Before \mathit{A} and A generated different output; now they both generate <mrow><mi>A</mi></mrow>.  (But \mathit{\Omega} and \Omega still generate different output.)

I just looked this over and all comments were addressed.  As I recall, there are no outstanding issues.  Shall we merge?

@edemaine thanks for pinging me about this and thanks for the PR.

@kevinbarabash Thanks for the review!

When is this feature released?

Soonish.  I've been putting off doing a release, but I really need to do one b/c there's lots of great stuff sitting on master.  I'll try to do one this Friday.


Add whatif

PR Summary

add what-if flag to config set with synthetic test as a starting point, until resources can eventually implement what-if
if a resource does not implement its own pre-test, it returns the synthetic test output
if a resource implements its own pre-test then it errors, since the synthetic test output seems less valuable/accurate in this scenario? open to input here
delete with what-if is not a supported scenario

PR Context

fix #70
example of config set -w when actual state already matches desired state (first test in dsc_whatif.tests.ps1):

example of config set -w when actual state does not match desired state (second test in dsc_whatif.tests.ps1):

@tgauth can you address the merge conflicts?

@tgauth can you address the merge conflicts?

done!


Test Giveaway error

The error is below and pls fix it
ERROR: Unhandled exception: user is not allowed to do action [find] on [test. giveaways]

This has to do with mongo user permissions

This has to do with mongo user permissions

What permission?


correct support for multitraj file parsing and reverse traj functionality

Trajectory.load_reversetraj() actually looked for self.parcel_ind attribute if reverse trajectory file contents actually contained multiple trajectories.  This attribute was never actually initialized; this PR solves that by initializing at HyPath level.
Usually trajectory files that contain multiple trajectories have three trajectories initialized at same point, lasting for same duration.  This is not always the case, particularly for ensemble trajectories that differ in initialization time and lat/lon space.  Previously, the trajectory data was divided into three arrays of equal size.  With this commit, the trajectory data is divided into n arrays of proper size.  Next commit(s) will focus on ensuring proper traj datetime init.

Commit "Support for multitraj file loading and datetime range".  Although multi-traj files can't be generated by PySPLIT (YET), users can generate through HYSPLIT and use PySPLIT to interact with them.  Now the files will actually be read and split correctly, and datetime ranges are generated for each.  Previously, had made some hard-coded specifications for single-traj files and only one datetime range, which was erroneously based off the number of rows after only accounting for multiline output or not.  Also made some doc fixes and a few simplifications in code.

Enforces using the clipped trajectory for multitraj files, refines support for multitraj Trajectory instances.


Add missing tests

Tests for test assets 4 through to 11 are missing or commented out.

[ ] build_test_4
[ ] build_test_5
[ ] build_test_6
[ ] build_test_7
[ ] build_test_8
[ ] build_test_9
[ ] build_test_10
[ ] build_test_11


Ian's data

[ ] Identify a sensible method to "type" nodes.
[ ] Convert Ian's data to our graph data format.
[ ] Generate pairwise graph cosine similarity scores for different hops and chunk lengths.

We won't be needing this anymore.


Bump macos min version to 10.15

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable

Description
Right now minimum macOS version is 10.13. For example some external libraries (boost, openssl) have brew formulas only for 10.14 (Mojave).
Also it would introduce full C++17 (currently used) support for apple clang, which will be useful for example in https://github.com/Chatterino/chatterino2/pull/2368#pullrequestreview-573454781
Maybe it should be bumped to only 10.14 for more compatibility, let me know if you think so.

I know it's not specified yet, but maybe you should also include this information regarding minimum mac version in BUILDING_ON_MAC.md document.

I know it's not specified yet, but maybe you should also include this information regarding minimum mac version in BUILDING_ON_MAC.md document.

I think 10.14 makes more sense in that case - staying in line with whatever brew decides to do seems like a good choice

I think 10.14 makes more sense in that case - staying in line with whatever brew decides to do seems like a good choice

@pajlada ye, i agree, 10.14 seems more reasonable, do you think it worth to add information about minimum version to BUILDING_ON_MAC.md as @zneix mentioned?

@pajlada ye, i agree, 10.14 seems more reasonable, do you think it worth to add information about minimum version to BUILDING_ON_MAC.md as @zneix mentioned?

@pajlada ye, i agree, 10.14 seems more reasonable, do you think it worth to add information about minimum version to BUILDING_ON_MAC.md as @zneix mentioned?

yeah I think so - I took the freedom of just adding that note to BUILDING_ON_MAC.md and pushing it to your branch

@pajlada ye, i agree, 10.14 seems more reasonable, do you think it worth to add information about minimum version to BUILDING_ON_MAC.md as @zneix mentioned?

yeah I think so - I took the freedom of just adding that note to BUILDING_ON_MAC.md and pushing it to your branch


support shared custom roles

for alts

wait would mods get custom roles on alts?

wait would mods get custom roles on alts?

anyone who qualifies will be able to get the same custom role on the alt too

How would alts be identified for a particular user

they would have to contact mods and request the role be added to their alt as well
there's just some bugs when mods do that currently that I'll have to fix

My approach would be to make /c-r response to have two buttons with one doing the basic Role creation while the other opening a dialogue to enter the user ID of their alt or main account which would send a DM to them to verify whether the user who pressed the button is their alt or main and if they do yes then the user would get the Role and if no then the user won't

Problem is, I wouldn't want just any two users to share a role, only ones that are actual alts
Hence why mod intervention is a good idea
on a related topic, this may mean mods should have manage roles again... they used to but it was taken away after certain people gave themselves roles they didnt qualify and created joke roles too much
tbh they should've faced demotion instead of just no more perms lmao
I don't think we'd have problems with mods making their own roles anyway since they have custom roles tho


Add keys function

Based on the discussion here: https://github.com/feross/bittorrent-tracker/pull/160/files/7f98203d5ec63f395e2794700a10046c54dcf8f1#diff-78c12f5adc1848d13b1c6f07055d996eR172

Can you update the README and add a test? Thanks.

I have updated the tests to use the .keys property, removed one repeated test case and updated the README. The commits should be squashed

Thanks.

3.0.0

👍


cadvisor [Failed to create a Container Manager: mountpoint for cpu not found]

I'm using DietPi 32bit OS on my Raspberry Pi 4B 8B
I have added cgroup_enable=memory cgroup_memory=1 in /boot/cmdline.txt
I followed all the steps mentioned, still running into this issue.

I would say that something very weird with your docker-ce installation, try to follow those steps :
# Install some required packages first
sudo apt update
sudo apt install -y \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common

# Get the Docker signing key for packages
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -

# Add the Docker official repos
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
     $(lsb_release -cs) stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list

# Install Docker
sudo apt update
sudo apt install -y --no-install-recommends \
    docker-ce \
    cgroupfs-mount

I will try to rebuild cadvisor image with latest code and you try to ask dietpi's dev some help.

I switched back to RPi OS and everything is working. seems the issue is with DietPi.

Just add some comments, for consideration. The image braingamer/cadvisor-arm:latest used in stack was old enough, it fine if used on raspi os that based on buster, on newer OS like dietpi that based on bullseye it will throw errors like. Using newer image like zcube/cadvisor will work.

@martadinata666 Thanks you for your feedback, I will try this new docker image and then update the stack. Perhaps I will add others metrics in the dashboard with this new version of cadvisor.


about backward function

hi, thanks for your work hocam
why backward function of SortVertices in cuda_ext.py does not have any calculations?
In this case, how gradients of the iou loss is calculated and backpropagation works?
Thank you

@orkunozturk Thank you for the question!
The function SortVertices return the INDICES of sorted vertices of the overlapping polygon of two rectangles in anti-clockwise order. Since the return value is discrete (integer number) but not continuous (float number), this function is not differentiable and thus has no backward pass. (functions which return indices are typically non-differentiable, like torch.argmax )
However, the calculation of IoU is still differentiable. The basic idea is to use shoelace formula to calculate the area of a convex polygon (the overlapping area of two rectangles). Given the unsorted coordinates of the polygon vertices and the sorted indices of the vertices, one can use the torch.gather to get the sorted vertices. Then, one can calculate the polygon area by applying the shoelace formula.

The process can be illustrated with this figure. The operations are orange. The tensors are blue. Note the sort operation is not differentiable, but the gradient from area to unsorted indices are guaranteed. Because gather is differentiable by definition and shoelace formula is basically some multiplication and addition.

Thanks for the great answer!
The reason why i asked this question is in the paper it says (4.2.2 Backward) "Especially, there exist some custom operations (intersection of two edges and sorting the vertexes etc.) whose derivative functions have not been implemented in the existing deep learning frameworks" (I know you are not one of the authors of the paper and this is an unofficial implementation). For this reason i thought there should be an implementation for the backward function.
But there is one point that i don't understand. Standard iou loss also has non-differentaible ops like max and its implementations only using pytorch python code and there is no extra custom autograd/ cuda cpp code (like g-iou). Can't we just resort to sort method of pytorch to sort vertices and not implement custom autograd functions and/or cuda.
In addition, i came accross this python pytorch code for the rotated iou calculation. Do you think can it be used for loss calculation?

@orkunozturk
The paper was written in about 2018/2019. The torch.gather function might not exist at that time. So I think the authors might have implemented something similar by themselves.
There are two different types of max ops. The one type returns the max VALUE, and the other type return the INDEX (in this case, it's usually called argmax). The first type is differentiable, because the return value is continuous. The g-iou code uses the first type.
The built-in sorting function of Pytorch sorts the elements of a tensor just by value. But for shoelace formula, one needs to sort some points by their coordinates in anti-clockwise. Thus, the built-in function torch.sort doesn't solve the problem. Generally speaking, one key component of a sorting algo is the definition of compare. In the case of sorting points in anti-clockwise, one has to define the spatial relationship of points and how to compare them according to the coordinates. Usually, a sorting algo (like std::sort in C++ or sort in normal Python) allows users to define their own compare function. But the pytorch.sort doesn't provide this opportunity. So, instead of defining the costume data structure and compare function and then using template libraries (like what people always do with std::sort), I have to implement the sorting algo from scratch.
I think the code works as well. Pytorch uses dynamic graph and thus allows user to use normal Python flow control with Pytorch-Ops. The advantage of this implementation its readability and simplicity. But its speed is probably lower than my implementation (just my assumption, have never tested it ...)  because of the bad performance of Python. By the way, I chose to use CUDA just because I wanted to learn it 😆


Vickel: Blacklist 0869-7373-230

Vickel requests the blacklist of the number 0869-7373-230. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by Jeff Schaller in Charcoal HQ


Question

This repo seems to be a fork of the official https://github.com/kraj/meta-altera. I saw that you stripped down lots of code you probably did not need, and changed the readme, so I was just wondering what are the differences from the original in terms of functionalities? Why isn't it a for instead?
Thanks!

Kraj’s BSP layer is designed to fulfill the requirements and concept of Open Embedded and the Yocto project. My version is designed to try to fulfill Intel’s EDS concept.
In the next weeks I will upload driver-recipes for HPS-to-FPGA interaction. I will merge and extend by https://github.com/robseb/meta-rstools to this BSP-layer. In addition, I’m working on a SD-image creating tool that can replace the old Altera script “make_sdimage.py” that will be compatible with Intel EDS 19.1 and this layer (current solution: https://github.com/robseb/rsyocto/blob/rsYocto-1.03/doc/guides/6_newFPGAconf.md). I think then will be major differences noticeable.
Thank you for your question.

Thanks for replying and congrats for the initiative. I should give a try on approach sometime, and who know, help you out with some stuff.
Just another question: I see that you don't have the u-boot recipes as from kraj. Is that you are using u-boot as it is? Or how do you integrate your own?

Yes, my Yocto layer don’t generate the secondary bootloader (u-boot) because with Intel’s EDS concept should be the primary and secondary bootloader generate within Intel EDS. Intel uses an optimized version of u-boot for their SoC-FPGAs.
I descript the complete build process in these following repositories (EDS Version 18.1). Inside the SD-card folder of rsYocto are the final bootloader files available, as well.
https://github.com/robseb/HPS2FPGAmapping
https://github.com/robseb/rsyocto


EndOfBuffer=none leaking through in some terminal emulators

Does not happen with most terminal emulators tested, only in urxvt and terminal.app(confirmed by romainl), does not seem to happen with multiplexers.
If EndOfBuffer ctermbg=none and if Normal ctermbg=### and the user's terminal emulator background is a different color than Normal, the user's terminal emulator background color will leak through, as shown in these screenshots:
bg=light and a dark terminal emulator
bg=dark and a light terminal emulator
This is most easily tested with quiet as included with vim 9.0.507 but this happens with other colorschemes that make use of similar settings as well as older versions of vim going back to at least 9.0.0
This only happens with an empty vim session. Passing it parameters or opening a file won't trigger the issue (or will do something as part of the initialization process that fixes it).
Forcing a redraw with ^L fixes it.
Steps to reproduce

In your .vimrc : colorscheme quiet - or any other colorscheme that relies on EndOfBuffer ctermbg=none
Use a terminal emulator that has a different background color than what Normal ctermbg is set to
Launch vim without loading a file or passing it arguments: the terminal emulator's background color will leak through.

Expected behaviour
EndOfBuffer ctermbg=none should only be applied if Normal ctermbg=none.
Version of Vim
9.0.507
Environment
Ubuntu 20.04
urxvt 9.30
$TERM=rxvt-unicode-256color

To add more info:
in urxvt:
 vim -Nu NONE +"set bg=light | colo quiet"

Works as expected:

If you have following vimrc:
set bg=light
colo quiet

And run
vim -Nu NONE

PS, both works fine in xterm, st, gnome-terminal, foot, alacritty

Same happens with legacy blue in urxvt:

And the difference between: $ vim -Nu NONE +"colo legblue" and vim -Nu NONE --cmd "colo legblue"
vim -Nu NONE --cmd "colo legblue"

$ vim -Nu NONE +"colo legblue"

And it looks like normal highlight attributes are being ignored in urxvt and terminal.app:

urxvt
vim -Nu NONE --cmd "colo blue" Makefile
:hi normal

You can see that normal is defined but xxx is rendered differently to ctermfg/bg


Add support for Arduino Nano RP2040 Connect & RAW format

I could connect OV2640 SPI to Arduino Nano RP2040 Connect and take JPEG images with Arducam's code and then the HostApp. However, their code does not support RAW image format. I thought we could add the functionality for this library? Can anyone here please help me with taking a RAW image with OV2640 SPI on Arduino Nano RP2040 Connect?
I connected OV2640 SPI to Nano RP2040 as follows:

CS - D10 (or any other GPIO port, except A6, A7)
MOSI - D11 (COPI)
MISO - D12 (CIPO)
SCK - D13 (SCK)
GND - GND
VCC - 3.3V
SDA - A4 (SDA)
SCL - A5 (SCL)
Refer to the diagram here.

In this library, I figured I need to use class adafruit_ov2640.OV2640(i2c_bus, data_pins, clock, vsync, href, shutdown=None, reset=None, mclk=None, mclk_frequency=20000000, i2c_address=48, size=1. I located the i2c_bus and clock pins, but I am not sure which pins to put for data_pins, vsync, and href.  I assume these pins are not relevant to me because I have a SPI connection?
@jepler

The modules from Arducam connect the data, vsync, and href pins internally, so they are not suitable to use with Adafruit_CircuitPython_OV2640.  Only modules which expose the necessary pins without processing are compatible.


Keylogging

keylogging plugin to log every keystroke of the users in slurk logs

@janagoetze this pull requests adds a plug-in (keylogger) to log every single keystroke and timestamp while they chat on slurk


Usage of the iframe false positive?

Is this false positive or?
It says Usage of the iframe HTML element is prohibited
This is the line that triggers it
https://github.com/Themezly/Creatus/blob/WP-Org-Prep/assets/js/thz.site.js#L3114
but the iframe element is needed for magnific popup to display all video sources.
https://github.com/dimsemenov/Magnific-Popup/blob/master/src/js/iframe.js#L27

The iframe check happens upstream in the repository https://github.com/WPTRT/WPThemeReview so any bugs should be reported there.  I believe this check is stating that themes are not responsible for content, in which case the code would best be added to a plugin that provides that functionality.

As far as I'm aware we are not allowing iframes in themes. This was added in the old theme check plugin, so I'm not sure the theme would pass the upload phase if it had it.
https://make.wordpress.org/themes/handbook/review/required/theme-check-plugin/
@joyously @carolinan @jocastaneda @justintadlock comments?

Themes have not been allowed to add iframes in the past. This is mostly to prevent them loading in external content that could be dangerous. Exceptions might be made in certain situations but as a general rule iframes are not allowed.
If the videos loaded by this theme into the iframe are urls that the user has input themselves then this might be one of the exceptions to the general rule but I really don't see any way of us sniffing around it.
The sniff should probably still flag all instances of iframe for farther inspection.

Just so we are clear , we are talking about ligtboxes here like tb_iframe, not an inclusion of iframe or anything else. Here
https://github.com/brainstormforce/astra/blob/35c7845e566ae6c4c619ad8a5abd4badd589d315/inc/core/class-astra-admin-settings.php#L293
and same scripts Magnific Popup and Fitvid  are already in the themes repo.
https://github.com/oceanwp/oceanwp/blob/master/assets/js/third/magnific-popup.js#L1572
https://github.com/oceanwp/oceanwp/blob/0ea55c592fc757366083140b9739539f9d870b77/assets/js/devs/fitvids.js#L36
There is no other way for lightbox to display any 3rd party service video without it.

@danyj I am aware of the kinds frames this Issue was opened about and do understand how they differ from the normal kinds of 'iframes are not allowed' that the rule is for. That is why I said that these kinds of things may be an exception to the general rule (also noting that I believe it would be a trouble to discount these kinds of frames in the sniff).
I was just adding some notes to this issue for future reference - sorry if I was unclear about that.


When generating a URL preview title, strip www from domain

Often when sending links with www, the preview will show www as the preview title because it's being parsed as the domain or something.
We should properly parse the domain to show it in the URL

Got an example link that does this?

I don't right now, but if i run into it i can. I think it just happens when a link is like https://www.somelink.com or something. And for whatever reason, the code strips out the main hostname (probably thinking the www is the hostname)


CI: print logs from the cluster as a build step

Some test failures may be caused due to issues in Cassandra or Scylla and it is hard to identify them if they are silent during the whole CI run.
This PR modifies our CI jobs that use docker-compose so that the logs from the cluster are always printed.
Pre-review checklist

[ ] I have split my patch into logically separate commits.
[ ] All commit messages clearly explain what they change and why.
[ ] I added relevant tests for new features and bug fixes.
[ ] All commits compile, pass static checks and pass test.
[ ] PR description sums up the changes and reasons why they should be introduced.
[ ] I added appropriate Fixes: annotations to PR description.

It looks like printing the logs after failure works correctly, e.g. here: https://github.com/scylladb/scylla-rust-driver/actions/runs/4204000245/jobs/7294090832

@cvybhu ping


Use upstream sanitization

Since upstream merged my PR's, and we've updated to their new version, use upstream and remove our own sanitization code:
merged: https://github.com/bugsnag/bugsnag-go/pull/215
merged: https://github.com/bugsnag/bugsnag-go/pull/217

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.47%. Comparing base (cc53efc) to head (8c52ec8).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   93.35%   90.47%   -2.88%
==========================================
  Files           6        4       -2
  Lines         361      252     -109
==========================================
- Hits          337      228     -109
  Misses         16       16
  Partials        8        8

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Remove deprecated cases

Remove deprecated test cases and try to recover serial port from failures.

Current coverage is 69.17% (diff: 100%)

Merging #707 into master will decrease coverage by 0.37%

@@             master       #707   diff @@
==========================================
  Files           101        100     -1
  Lines         15231      14730   -501
  Methods        2074       1999    -75
  Messages          0          0
  Branches       1799       1745    -54
==========================================
- Hits          10594      10190   -404
+ Misses         4062       3984    -78
+ Partials        575        556    -19

Powered by Codecov. Last update dfd5fbd...e78ef80


have trouble executing this in latest .net core

I noticed in the tutorial https://docs.microsoft.com/en-us/azure/documentdb/documentdb-dotnetcore-get-started you specify a a 4.5.2 C# console app in the vs template selection, not a .net core console app.  Is this intentional? I'm having difficulty getting past the create collection step, it keeps giving me syntax errors and won't successfully run in visual studio vs2015r3 and doesn't seem to match the oneline azure documentDB documentation.  I'm not a crack C# coder so may have missed something.

Sorry. The documentation has been fixed now. You need to select a .NET Core Console App for this project. Let us know if you are still running into issues.


Fact 230901

This adds missing directory creation in factory bootstrapping, and overrides the singularity_lib.sh to include a fix that was never released in gwms

@jdost321 thanks for splitting up the copy of the code and the small patch between two commits! One nitpick: would you be able to reword https://github.com/opensciencegrid/images/pull/143/commits/c158f5725b857af7d07d010fb798172447eb72dd to reference the origin of the file (i.e., github link to the file + relevant tag)?


check if arm64 bugchecks on misaligned access

Description
Describe the purpose of and changes within this Pull Request.
Testing
Do any existing tests cover this change? Are new tests needed?
Documentation
Is there any documentation impact for this change?
Installation
Is there any installer impact for this change?

Verification complete: Windows emulates aligned access for plain reads, but bugchecks for unaligned interlocked operations.


Disable Holiday allowance?

Is it possible to learn how much you're gonna earn per month without holiday allowance added to the calculation?
As I understand Net Month and Year month always includes holiday allowance. How can I calculate without it?
Option: "Holiday allowance included" doesn't change anything, it's just taking into account holiday allowance inside the sum.
It would be great to see separated field "Monthly net without holiday allowance". It's more often not included in the monthly slip but paid annualy.

I'm not 100% sure, but my understanding is the following. Month Net Income and Year Net Income don't include holiday allowance regardless of the Holiday allowance included checkbox. The actual net income must be calculated = Year Net Holiday Allowance + Year Net Income.
Why do I think so?
I compare two calculations:

Gross income 10000 per year, checkbox is not checked (link)
Gross income 10800 per year, checkbox is checked (link)

Results:

Both calculations return the same Year Net Income
Both calculations return the same Month Net Income
Total Income Tax = 0 (because of low income the whole tax is covered by credits)
Year Net Income = 10000, which is equal to gross income without holiday allowance
Month Net Income = 833.33, which is equal to Year Net Income / 12

@maratori maybe you are not paying some taxes for this annual amount?
I just checked that if you make number bigger - you see the difference

@stevermeister Do you think that if gross income is 10800 including holiday allowance, the effective tax is exactly 800? It looks strange.

@maratori Well, I'm not a tax expert, I'm a developer like you, I just tried to gather all this logic and make it work, and for most cases it does.
If you think it should calculate differently let's jump to this repo - https://github.com/stevermeister/dutch-tax-income-calculator-npm - which contains logic and calculations, this one is more focused on the UI part.


[Feature request] Also apply root scale to mount while character is mounted.

Characters can look supremely goofy if their root scale has been modified and they are riding on a mount. Might it be possible to also apply whatever their root scale is to their active mount, if one exists?

Might be possible, but that would have to be answered by arof.
A workaround until now is:
Create a RSP (Racial Scaling) mod with your desired height and apply it to your character's collection in Penumbra.

Actually, it appears that a modified racial height via an RSP mod does not affect the scaling of your mount. Or at least, in my test, making my character taller didn't increase the size of a mount that I know normally scales with character size.

Your mount fills in character slot 1 (every player character takes up the even number slots with player as 0, with an open spot for companion or mount taking up the next, odd numbered ones). It may not be affected by root scales on player slot consistently, I will have to test and implement that scale as needed. I'll look into it, though the complication of some mounts scaling and some not may make it a little buggy, so it may require a configuration option or some other workaround based on mount ID.


Give more feedback when things are successfully uploaded with a toaster

People need to know when things are "done".

Is this still an issue? Now you can see that files are uploading, and yes it may happen that after 100% upload completion, it stays there for a few seconds. Are there steps missing?

The issue isn't ready to be taken on, I still need to refine it. Will look at it when I have time.


Suggestion: Providers provide a reasonable default scope

If you using kv_oauth for authentication, it useful to have a scope that provides access to a reasonable set of user details, and maybe OIDC (#194) if supported by the provider.
A reasonable initial developer experience would be to not have to explicitly find the scopes for a provider for this, and so it seems reasonable that a provider also provides a default scope, which can be completely overridden when supply by the developer.

While this module aims to be high-level, defining a default scope seems to be overreaching. The scope is one of the parameters that the developer should know and explicitly define when using this module. I don't see why this should be the responsibility of this module.


Couple of problems/improvements

In RequestContext.SetHeaders there is no check if headerParts has at least 2 items, I've ran into crashes here.
I've increased the ServerContext.MaxClientHeaderSize to 20000 because my headers were to big (I used IE and chrome to do a normal request and it already exceeded the default 8192 size).

Hi!
The size limit is from when i was running this on older Netduinos so it could for sure be 20000 today.
And the RequestContext.SetHeaders should have a better behavior for sure.
I will commit a change on this as soon as i have made some more testing on the header parsing, thanks for the feedback!

Do you have any examples on a header that crashes? All valid headers should give at least two parts as far as i can understand the header specs. But i have added some smaller changes that will fix some parsing issues that i have had and I will commit these changes soon.


Shadow maps

As a creator I want to enable the casting of shadows for all of the classic light types onto other draw objects
Light types required to cast shadows:

[ ] Point
[ ] Directional
[ ] Spot

Hey team! Please add your planning poker estimate with ZenHub @Kryptos-FR @sinkingsugar @satendrapalsingh


ISPN-7776 Clustered Cache State and Configuration

https://issues.jboss.org/browse/ISPN-7776
A few interesting things here:

GlobalStateManager is now always added to the GCR (and not just when global state is enabled). Persistence, however, will only happen when it is enabled in the configuration.
Added a "matches" method to AttributeSets/Configuraton so that we can tell if a configuration is "compatible", not necessarily identical
A shared global cache ___config which is Scoped so that others can use too ( @pruivo & @karesti )
Cache configurations are stored in the global cache "serialized" as XML.
A common CacheContainerAdmin API between embedded and remote ( @galderz I'm interested in your opinion)
Persistent caches are "saved" to a caches.xml in the global state persistent directory which acts as a configuration overlay. Concurrent changes to the file are prevented by the use of file locking and renaming.
Joiners will receive and initialize the set of caches that have been "cluster-created". If they need to be persistent, they will add them to their own caches.xml

There is a recurring test failure in CacheManagerAdmin caused by this PR which results in huge amounts of messages queued up in UNICAST3. I'll try and fix it asap.

I have fixed the issue and also removed some changes to the server that slipped in (those will be in a separate PR).

hmmm looks like the org.infinispan.manager.CacheManagerTest is running forever in my machine...

I've addressed all comments

I've somehow broken mbean unregistration that screws up the jsr107 tests. Working on it.

I've somehow broken mbean unregistration that screws up the jsr107 tests. Working on it.

@tristantarrant So is it ready to be merged then? I looked at the changes and I'm ok with it.

Waiting for CI. I'd really like to have this in for Beta1 so we can postpone the release to tomorrow if necessary

OK.

I noticed that some @Deprecated elements do not have a @deprecated javadoc tag and viceversa.

I need to cancel this builds... I'll retrigger it after the update.

Unfortunately CI has some catastrophic failures in the JCache stuff. I'm investigating.

2 unrelated failures

2 unrelated failures

Are those unrelated failures being tracked? I don't see any JIRAs for those and not in spreadsheet, adding them. We really can't be slacking on appearing random failures :\

Added ISPN-8524 and ISPN-8525 to track those unrelated random failures.


CameraXBasic: Preview upside down on emulators

I've run CameraXBasic project without any modifications on Emulators with API 21 and 23 and previews are upside down. On Emulator with API 29 everything is fine
Emulator Version: 30.0.0

I've opened default camera app on the emulator and its flipped too :( Not a problem with the CameraX then .. sorry :\


fixing command passing to also handle nested commands

Hey, by using your lib i also stumbled across the nested commands problem (cache clean etc.)
I hope you may consider this PR which resolves #32.
Thanks for your work and best regards, Falk

New version pls?

@stevenmyhre i recommend a change to npm for version management of your packages, for many reasons (e.g. shrinkwrap) it is the better choice.

published


GH-59 following OSGI best practices

a few fixes on top of the main PR pushed by @bstopp
see https://github.com/adobe/aio-lib-java/pull/58 for details

wrong repo


High memory consumption

Hi, thanks for the great work you've done. I am trying to use either kiunet or reskiunet models with images of size 512512, but it doesn't work with such size on VRAM=40gb with batch size =1. It works on smaller images (256256, batchsize = 3). It also takes too long to train it... I find it a little bit weird because the model doesn't have too mane parameters (only 300k), I trained much larger models faster (e.g. 3*10^6 parameters), so I am wondering if it is the expected behavior or maybe on new pytorch(i am using 1.7) it isn't efficient? Maybe you know some ways how I can improve the memory consumption and speed?

Hi,
Yeah. It does take a long time and memory to train for images for higher resolution. This happens as the feature map size in the bottle neck of Kite-Net branch is of high resolution and takes more compute power even though the number of parameters is less. Easy get-around to this problem is to use patch-wise training or remove some layers in the kite-net branch.
Any other fixes to this issue is welcome !

I will try that, thank you for the reply


Hands-on API

Current hydrate & desiccate functions forward to m.render, which is useless for mounted or routed (ie all) apps. This makes some kind of sense as a speculative stand-in for Mithrils internal render function, if the idea is to later merge the functionality into Mithril proper.
But the code could be made functional as a direct application code dependency.

Probably simplest to package as a component to be mandated at the top of the virtual tree:
m(Hydrator, {
  environment: 'server' | 'browser',
},
  m(Application),
)


Attribute selection

During the tree generation process, the last attribute in the list is ignored.

Resolved in 4e2c4e2.


jsonGetKeyList ( "" ) = "?"

It should either return an empty string, or an error (I'm not sure which, yet). It seems like it's trying to process it and reaching FM's recursion limits.

I favor the empty string result, unless an empty string does not count as well-formed JSON. An empty string does accurately describe the list of JSON keys in an empty string. But if an empty string isn't valid JSON, that perhaps merits some notification.


Vue catches errors while running Jest tests

Version
2.5.17
Reproduction link
https://github.com/chris-sorrells/vue-jest-console-error-bug
Relevant code added to scaffolding

https://github.com/chris-sorrells/vue-jest-console-error-bug/commit/abf6a4d00981ae6d13ed1969f5ec0340aec5d84d

Steps to reproduce

Scaffold a new Vue project using vue-cli.  Use Jest for unit testing.
Create a mounted() lifecycle hook in the HelloWorld.vue component.
Within mounted(), directly manipulate the msg prop to cause Vue to generate an error.
Run the default example.spec.js test using npm run test:unit.

What is expected?
The test should fail due to the error generated when directly manipulating the msg prop.
What is actually happening?
Vue catches the error and uses console.error to display it.  Because console.error does not fail Jest tests, the test pass despite the error thrown.

The underlying problem is that Vue is trying to determine whether it is appropriate to catch and console.error an error or allow the error to remain uncaught based on if Vue believes it is in a browser. Unfortunately, because Jest emulates the browser environment, error handling does not function as intended and tests will succeed inappropriately.
A fix for this would be to also check whether Vue is in a Node environment before catching the error.  This would allow Jest tests to operate as intended, and maintain the behavior of error handling in the browser.
Another fix would be to re-throw the error if process.env.NODE_ENV === "test".

Having an error thrown in test while it's just logging in development would be problematic. It would break existing tests for people writing libraries with development warnings. The errors are still logged to the console so you can see them. You can use a spy in console error to check if an error was logged or not and make the test fail. I use this technique in libraries to check if I'm providing development hints

It's also problematic for anyone relying on CICD, particularly if you have a large team with junior developers who don't have a full understanding of Vue design patterns and you need a safeguard against poorly written code.
I do have a work-around that uses spies if anyone who comes across this issue is interested:
const spies = {};

beforeEach(done => {
  function failIfError(error) {
    // You can also just immediately fail if you don't use console.error()
    if (error instanceof Error) {
      done.fail(error);
    }
  }

  spies.consoleError = jest
    .spyOn(console, "error")
    .mockImplementation(failIfError);

  done();
});

afterEach(() => {
  spies.consoleError.mockRestore();
});

@chris-sorrells I suppose I'm a junior in the unit testing and CICD world. Can you please say how to look in your spies function to the jest configuration?

@chris-sorrells I suppose I'm a junior in the unit testing and CICD world. Can you please say how to look in your spies function to the jest configuration?


lint/vet/clean

you have some messages from me on slack btw, not related to this pr

Thanks for the review, can you squash to the one commit and then I'll merge

Merged via 4a98885129f33e59ca24b288ffb199b5cb78ed69


fix: use tv.short in show_tools

Fixes #3029

Thanks!

@jdx Oops, this lost the @version part :(

https://github.com/jdx/mise/pull/3226


Rebase against latest upstream Crucible

This will set our Crucible fork to the 380937382a9929bc3af76724e4a9186cf1d61f50 upstream commit

wondering if we need this fork, or if we could just pin to an upstream commit? do we have customization for our needs on top of the clone?

wondering if we need this fork, or if we could just pin to an upstream commit? do we have customization for our needs on top of the clone?

As of https://github.com/openstack-k8s-operators/osp-director-dev-tools/pull/425, we no longer have any customizations that we need.  So we could just pin to Crucible itself at a particular commit.  If we needed customizations in the future, we could point back to this fork again.

wondering if we need this fork, or if we could just pin to an upstream commit? do we have customization for our needs on top of the clone?

As of openstack-k8s-operators/osp-director-dev-tools#425, we no longer have any customizations that we need (other than the ones we inject in the course of our dev-tools logic via replace modules). So we could just pin to Crucible itself at a particular commit. If we needed customizations in the future, we could point back to this fork again.

sounds good. I'd vote for that, or what you think @olliewalsh @dprince ?

wondering if we need this fork, or if we could just pin to an upstream commit? do we have customization for our needs on top of the clone?

As of openstack-k8s-operators/osp-director-dev-tools#425, we no longer have any customizations that we need (other than the ones we inject in the course of our dev-tools logic via replace modules). So we could just pin to Crucible itself at a particular commit. If we needed customizations in the future, we could point back to this fork again.

sounds good. I'd vote for that, or what you think @olliewalsh @dprince ?

I tried using the Crucible repo directly today with dev-tools and the deployment went just fine, so I'll make that change to the other PR if @olliewalsh and @dprince agree.

I am good with pinning to a specific release of Crucible.


Transfer Any Trademarks

Transfer any trademark and logo mark assets over to the LF - https://github.com/cncf/foundation/tree/master/agreements has agreements.

I don't believe there are any for Krator, but someone from Microsoft should probably confirm.

As far as I know we don't have any trademarks or logos for Krustlet to transfer, so we should be good here. I'll mark this as complete


Doc fixes

Added class links to doc as suggested in previous PR and thought it'd be good to add Spark support as a selling point to the main readme.
Since PySparkTask and SparkSubmitTask are new features, should I update the version on the deprecation directives to 1.2.0 to follow semver?

Given that it tooks us two years to get from 1.0.x to 1.1.x I don't know if we should jump to 1.2.x after a few weeks only. Although I'm in favor of bumping version numbers faster.
For an 1.2.x release we should at least let the current master be out for a while and let people use it.
But I can release 1.1.1 in a few days if that makes sense.
I also think changes to "core" luigi should affect the version number more than luigi.contrib. There's some interesting work on re-thinking the whole execution flow (#479 #817 #818 #819) which if implemented should definitely imply going to 1.2.x
Anyway what do other people think? I don't have super strong opinions. In particular @Tarrasch and @freider usually has more opinions about what constitutes a release.

Btw i re-triggered the build


Update $font-stack-system list

What does this PR do?

Updates the $font-stack-system list to include more fonts.
Follows Adam Morse's system-fonts: https://github.com/mrmrs/css-system-fonts

I'm not sure I agree with Avenir going in this list. It's not really a UI typeface (Neither is Helvetica but it's at least used that way on older iOS and MacOS versions).
I guess what I'd want is to have a font stack that mirrored their system OS font and it doesn't.

@kylefiedler In the context of this list, I see Avenir the same as Helvetica. iOS started shipping with it a few years back and I had a nice experience using it.
I think it’s there in the case that San Francisco isn’t available, but if Avenir is, use that instead of Helvetica. I also think Avenir is closer in style to SF than Helvetica, so it plays the middle-ground.


animation-iteration-count

Would be useful on CanIUse..

CSS animations can be found here: https://caniuse.com/#feat=css-animation
Also see: https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count#Browser_Compatibility


fix: Ignore additional calls to start() when the controller is starting

Fixes: https://github.com/juliansteenbakker/mobile_scanner/issues/1078
Fixes: https://github.com/juliansteenbakker/mobile_scanner/issues/502
TODO: test how this integrates with the lifecycle handling on Android / iOS / MacOS / Web

Nice!
You probably need to update the examples folder as well, as I had to now manually call start() after setting the controller in initState().

@simplenotezy Ah right, I'll probably have to tweak the automatic start in the samples.
Just to be clear, you want automatic start to be enabled for the samples? Or not?

Sounds good! After trying your version, I needed to call start manually. Otherwise the example code would not work.
class _TicketScannerScreenState extends State<TicketScannerScreen> {
  late MobileScannerController controller;

  @override
  void initState() {
    super.initState();
    controller = MobileScannerController(
      formats: const [BarcodeFormat.qrCode],
    );

+    controller.start();
  }

  @override
  Future<void> dispose() async {
    super.dispose();
    await controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    final scanWindow = Rect.fromCenter(
      center: MediaQuery.sizeOf(context).center(Offset.zero),
      width: 400,
      height: 200,
    );

Hmm - something strange is going on in the repository code. Same issue I had before, but this time, there's just no error. It just wont work - black screen.

import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:mobile_scanner/mobile_scanner.dart';

@RoutePage()
class TicketScannerScreen extends StatefulWidget {
  const TicketScannerScreen({super.key});

  @override
  State<TicketScannerScreen> createState() => _TicketScannerScreenState();
}

class _TicketScannerScreenState extends State<TicketScannerScreen> {
  late MobileScannerController controller;

  @override
  void initState() {
    super.initState();
    controller = MobileScannerController(
      formats: const [BarcodeFormat.qrCode],
    );

    controller.start();
  }

  @override
  Future<void> dispose() async {
    super.dispose();
    await controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    final scanWindow = Rect.fromCenter(
      center: MediaQuery.sizeOf(context).center(Offset.zero),
      width: 400,
      height: 200,
    );

    return Scaffold(
      backgroundColor: Colors.black,
      appBar: AppBar(
        title: Text('Scan'.hardcoded),
      ),
      body: Stack(
        fit: StackFit.expand,
        children: [
          Center(
            child: MobileScanner(
              fit: BoxFit.contain,
              controller: controller,
              scanWindow: scanWindow,
              errorBuilder: (context, error, child) {
                return ScannerErrorWidget(error: error);
              },
              overlayBuilder: (context, constraints) {
                return Padding(
                  padding: const EdgeInsets.all(16.0),
                  child: Align(
                    alignment: Alignment.bottomCenter,
                    child: ScannedBarcodeLabel(barcodes: controller.barcodes),
                  ),
                );
              },
            ),
          ),
          ValueListenableBuilder(
            valueListenable: controller,
            builder: (context, value, child) {
              if (!value.isInitialized ||
                  !value.isRunning ||
                  value.error != null) {
                return const SizedBox();
              }

              return CustomPaint(
                painter: ScannerOverlay(scanWindow: scanWindow),
              );
            },
          ),
          Align(
            alignment: Alignment.bottomCenter,
            child: Padding(
              padding: const EdgeInsets.all(16.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  ToggleFlashlightButton(controller: controller),
                  SwitchCameraButton(controller: controller),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}

class ScannerOverlay extends CustomPainter {
  const ScannerOverlay({
    required this.scanWindow,
    this.borderRadius = 12.0,
  });

  final Rect scanWindow;
  final double borderRadius;

  @override
  void paint(Canvas canvas, Size size) {
    // TODO: use `Offset.zero & size` instead of Rect.largest
    // we need to pass the size to the custom paint widget
    final backgroundPath = Path()..addRect(Rect.largest);

    final cutoutPath = Path()
      ..addRRect(
        RRect.fromRectAndCorners(
          scanWindow,
          topLeft: Radius.circular(borderRadius),
          topRight: Radius.circular(borderRadius),
          bottomLeft: Radius.circular(borderRadius),
          bottomRight: Radius.circular(borderRadius),
        ),
      );

    final backgroundPaint = Paint()
      ..color = Colors.black.withOpacity(0.3)
      ..style = PaintingStyle.fill
      ..blendMode = BlendMode.dstOut;

    final backgroundWithCutout = Path.combine(
      PathOperation.difference,
      backgroundPath,
      cutoutPath,
    );

    final borderPaint = Paint()
      ..color = Colors.white
      ..style = PaintingStyle.stroke
      ..strokeWidth = 4.0;

    final borderRect = RRect.fromRectAndCorners(
      scanWindow,
      topLeft: Radius.circular(borderRadius),
      topRight: Radius.circular(borderRadius),
      bottomLeft: Radius.circular(borderRadius),
      bottomRight: Radius.circular(borderRadius),
    );

    // First, draw the background,
    // with a cutout area that is a bit larger than the scan window.
    // Finally, draw the scan window itself.
    canvas.drawPath(backgroundWithCutout, backgroundPaint);
    canvas.drawRRect(borderRect, borderPaint);
  }

  @override
  bool shouldRepaint(ScannerOverlay oldDelegate) {
    return scanWindow != oldDelegate.scanWindow ||
        borderRadius != oldDelegate.borderRadius;
  }
}

class ScannerErrorWidget extends StatelessWidget {
  const ScannerErrorWidget({super.key, required this.error});

  final MobileScannerException error;

  @override
  Widget build(BuildContext context) {
    String errorMessage;

    switch (error.errorCode) {
      case MobileScannerErrorCode.controllerUninitialized:
        errorMessage = 'Controller not ready.';
      case MobileScannerErrorCode.permissionDenied:
        errorMessage = 'Permission denied';
      case MobileScannerErrorCode.unsupported:
        errorMessage = 'Scanning is unsupported on this device';
      default:
        errorMessage = 'Generic Error';
        break;
    }

    return ColoredBox(
      color: Colors.black,
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            const Padding(
              padding: EdgeInsets.only(bottom: 16),
              child: Icon(Icons.error, color: Colors.white),
            ),
            Text(
              errorMessage,
              style: const TextStyle(color: Colors.white),
            ),
            Text(
              error.errorDetails?.message ?? '',
              style: const TextStyle(color: Colors.white),
            ),
          ],
        ),
      ),
    );
  }
}

class AnalyzeImageFromGalleryButton extends StatelessWidget {
  const AnalyzeImageFromGalleryButton({required this.controller, super.key});

  final MobileScannerController controller;

  @override
  Widget build(BuildContext context) {
    return IconButton(
      color: Colors.white,
      icon: const Icon(Icons.image),
      iconSize: 32.0,
      onPressed: () async {
        // final ImagePicker picker = ImagePicker();

        // final XFile? image = await picker.pickImage(
        //   source: ImageSource.gallery,
        // );

        // if (image == null) {
        //   return;
        // }

        // final BarcodeCapture? barcodes = await controller.analyzeImage(
        //   image.path,
        // );

        // if (!context.mounted) {
        //   return;
        // }

        // final SnackBar snackbar = barcodes != null
        //     ? const SnackBar(
        //         content: Text('Barcode found!'),
        //         backgroundColor: Colors.green,
        //       )
        //     : const SnackBar(
        //         content: Text('No barcode found!'),
        //         backgroundColor: Colors.red,
        //       );

        // ScaffoldMessenger.of(context).showSnackBar(snackbar);
      },
    );
  }
}

class StartStopMobileScannerButton extends StatelessWidget {
  const StartStopMobileScannerButton({required this.controller, super.key});

  final MobileScannerController controller;

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder(
      valueListenable: controller,
      builder: (context, state, child) {
        if (!state.isInitialized || !state.isRunning) {
          return IconButton(
            color: Colors.white,
            icon: const Icon(Icons.play_arrow),
            iconSize: 32.0,
            onPressed: () async {
              await controller.start();
            },
          );
        }

        return IconButton(
          color: Colors.white,
          icon: const Icon(Icons.stop),
          iconSize: 32.0,
          onPressed: () async {
            await controller.stop();
          },
        );
      },
    );
  }
}

class SwitchCameraButton extends StatelessWidget {
  const SwitchCameraButton({required this.controller, super.key});

  final MobileScannerController controller;

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder(
      valueListenable: controller,
      builder: (context, state, child) {
        if (!state.isInitialized || !state.isRunning) {
          return const SizedBox.shrink();
        }

        final int? availableCameras = state.availableCameras;

        if (availableCameras != null && availableCameras < 2) {
          return const SizedBox.shrink();
        }

        final Widget icon;

        switch (state.cameraDirection) {
          case CameraFacing.front:
            icon = const Icon(Icons.camera_front);
          case CameraFacing.back:
            icon = const Icon(Icons.camera_rear);
        }

        return IconButton(
          iconSize: 32.0,
          icon: icon,
          onPressed: () async {
            await controller.switchCamera();
          },
        );
      },
    );
  }
}

class ToggleFlashlightButton extends StatelessWidget {
  const ToggleFlashlightButton({required this.controller, super.key});

  final MobileScannerController controller;

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder(
      valueListenable: controller,
      builder: (context, state, child) {
        if (!state.isInitialized || !state.isRunning) {
          return const SizedBox.shrink();
        }

        switch (state.torchState) {
          case TorchState.auto:
            return IconButton(
              color: Colors.white,
              iconSize: 32.0,
              icon: const Icon(Icons.flash_auto),
              onPressed: () async {
                await controller.toggleTorch();
              },
            );
          case TorchState.off:
            return IconButton(
              color: Colors.white,
              iconSize: 32.0,
              icon: const Icon(Icons.flash_off),
              onPressed: () async {
                await controller.toggleTorch();
              },
            );
          case TorchState.on:
            return IconButton(
              color: Colors.white,
              iconSize: 32.0,
              icon: const Icon(Icons.flash_on),
              onPressed: () async {
                await controller.toggleTorch();
              },
            );
          case TorchState.unavailable:
            return const Icon(
              Icons.no_flash,
              color: Colors.grey,
            );
        }
      },
    );
  }
}

class ScannedBarcodeLabel extends StatelessWidget {
  const ScannedBarcodeLabel({
    super.key,
    required this.barcodes,
  });

  final Stream<BarcodeCapture> barcodes;

  @override
  Widget build(BuildContext context) {
    return StreamBuilder(
      stream: barcodes,
      builder: (context, snapshot) {
        final scannedBarcodes = snapshot.data?.barcodes ?? [];

        if (scannedBarcodes.isEmpty) {
          return const Text(
            'Scan something!',
            overflow: TextOverflow.fade,
            style: TextStyle(color: Colors.white),
          );
        }

        return Text(
          scannedBarcodes.first.displayValue ?? 'No display value.',
          overflow: TextOverflow.fade,
          style: const TextStyle(color: Colors.white),
        );
      },
    );
  }
}

Hmm, what device is this on? Do you see anything in XCode / Logcat / browser logs?

It's a physical device. I see the following exception being thrown:

And it works initially. If I start a new debug session it will work just fine.

Hmm, it's precisely that error that we should ignore when already starting. Is autoStart false in your case?
Also, do you have a stack trace? I can test with the sample above to see where it occurs, though.

The error is this: when the widget is exposed, the underlying service is not being stopped. When you restart your application, it is technically still running, so when you go to the route that starts the controller, it won't work.

Here's a video showing the issue:
https://github.com/juliansteenbakker/mobile_scanner/assets/3786627/c4699717-6ae9-4d9d-82b2-a9350eba182b

when the widget is disposed*, the underlying service is not being stopped
Could you clarify that? We should be disposing the underlying camera.

https://github.com/navaronbracke/mobile_scanner/blob/fix_already_started_bug/android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt#L398
Perhaps there is a case where this isn't true?

So this exception only happens when you press r (not R) in the terminal? In that case, I think it has to do with the plugin not handling hot restart properly. We have an open bug for that as well, although I would have hoped that this fix would have fixed that issue as well.
I'll have to specifically address the use case for hot reload then, perhaps by just short circuiting a return value instead of an error, if we do not have hot reload callbacks.
Another idea would be to see if stopping the controller in reassemble() works around this issue?

@simplenotezy Unfortunately this PR reintroduces a bug with permissions. TLDR: I do have a fix for that problem.
In our current guidance for lifecycle changes, we show in the examples that you can start the controller when the app resumes and the controller is initialized. However, there is one problem with that statement: On Android, this would cause a loop of permission requests.
The reason for that is that each permission dialog triggers a lifecycle change. Combining that with our guidance to restart the controller, issues another start request. This is fine if you already have permission. However, if you don't then a new permission popup will trigger, restarting the entire cycle (hence the infinite loop bug).
Due to the fact that iOS, MacOS and web only allow the permission dialog once, they sidestep this problem, so they are not affected.
My solution is simple: In the lifecycle guidance, also check if the scanner state has the permission denied error code and abort the start request. I.e.
  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    if (!controller.value.isInitialized ||
        controller.value.error?.errorCode == MobileScannerErrorCode.permissionDenied) {
      return;
    }

    switch (state) {
      case AppLifecycleState.detached:
      case AppLifecycleState.hidden:
      case AppLifecycleState.paused:
        return;
      case AppLifecycleState.resumed:
        _subscription = controller.barcodes.listen(_handleBarcode);

        unawaited(controller.start());
      case AppLifecycleState.inactive:
        unawaited(_subscription?.cancel());
        _subscription = null;
        unawaited(controller.stop());
    }
  }

The second part of the || is the new part. However, to ease the transition for our users, I'd like to move this extra check in isInitialized, but that feels weird, since you now have a divergent meaning of isInitialized and the error property.
Do you have any ideas? Perhaps a new getter that combines both checks? But I don't know what to name it.

@tanvir93 You should be able to use this patch to see what is going on on Android 14. I added the reporting of errors from MLKit in this PR. You'll have to handle the errors from the barcodes stream. Those include the errors from the MLKit error callbacks.

controller.value.error?.errorCode == MobileScannerErrorCode.permissionDenied

@navaronbracke you may want to change the example's lifecycle handler init check, as there is no controller.value.hasCameraPermission property, but I guess that's exactly what you were aiming to do in that example?

controller.value.error?.errorCode == MobileScannerErrorCode.permissionDenied

@navaronbracke you may want to change the example's lifecycle handler init check, as there is no controller.value.hasCameraPermission property, but I guess that's exactly what you were aiming to do in that example?

That is a new getter that I added in https://github.com/juliansteenbakker/mobile_scanner/commit/1ab7f5a753f9e27c021e780bfa3ac76b8d3cc7b0, which does exactly this check.

I have started testing this patch and it seems to fix the underlying issue.
I still need to test it on iOS and I'm having a bit of trouble testing MacOS hot reload/hot restart due to a tool bug,
but once those have been tested I will land this patch.

This fix was now verified for iOS, MacOS, Android and the web. With this fix, during hot restart, the app restarts fully (as expected) and with hot reload the camera continues to work as if the hot reload never happened (since hot reload is only for Dart code on the client, not the plugin)
This fix will be available for the next release, which I plan to release later today.


Add declarationType to TypeInfo

This adds support to parse a new ~(not yet agreed-upon or approved)~ field in TypeInfo that allows narrowing down import requests to specify the namespace.
See purescript/purescript#3997

@kritzcreek Do you think we could merge this for consistency?

@kritzcreek Do you think we could merge this for consistency?

I haven't looked at this code in a while. Does getFieldMaybe change just return Nothing for the completion field on older compiler versions?
Just want to make sure we're not breaking anything that currently works.

I haven't looked at this code in a while. Does getFieldMaybe change just return Nothing for the completion field on older compiler versions?
Just want to make sure we're not breaking anything that currently works.

It's this:
    getFieldMaybe :: forall a. (DecodeJson a) => Object Json -> String -> Either JsonDecodeError (Maybe a)
    getFieldMaybe o f = Right $ either (const Nothing) Just $ getField o f

With getField being this:
getField :: forall a. DecodeJson a => Object Json -> String -> Either String a

So I'm pretty sure it's quite defensive.

It's this:
    getFieldMaybe :: forall a. (DecodeJson a) => Object Json -> String -> Either JsonDecodeError (Maybe a)
    getFieldMaybe o f = Right $ either (const Nothing) Just $ getField o f

With getField being this:
getField :: forall a. DecodeJson a => Object Json -> String -> Either String a

So I'm pretty sure it's quite defensive.

Yeah I really want to check this and the compiler change out, need to get
on it soon
On Sat, 30 Jan 2021, 18:09 Christoph Hegemann<EMAIL_ADDRESS>wrote:

@kritzcreek approved this pull request.
LGTM. @nwolverson https://github.com/nwolverson would you mind taking a
look as well? You've been doing the releases on this lately and I don't
want to break your things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kritzcreek/purescript-psc-ide/pull/52#pullrequestreview-579793972,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVEPS77WM66ZXRW7IWAT5DS4RDONANCNFSM4WP6H7SQ
.

Yeah I really want to check this and the compiler change out, need to get
on it soon
On Sat, 30 Jan 2021, 18:09 Christoph Hegemann<EMAIL_ADDRESS>wrote:

@kritzcreek approved this pull request.
LGTM. @nwolverson https://github.com/nwolverson would you mind taking a
look as well? You've been doing the releases on this lately and I don't
want to break your things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kritzcreek/purescript-psc-ide/pull/52#pullrequestreview-579793972,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVEPS77WM66ZXRW7IWAT5DS4RDONANCNFSM4WP6H7SQ
.

Looks good, tested briefly against both 0.13.8 and 0.14.0


MM-35074: don't initialize args parameter

Summary
This change complements (well, duplicates) the solution in https://github.com/mattermost/mattermost-webapp/pull/7969, but ships in the plugin to get it into the hands of customers relatively quickly. We're only planning on patching the webapp ESR right now.
I've based this pull request off of the yet-to-be-merged node14 branch, since I needed to add a developer dependency.
Ticket Link
https://mattermost.atlassian.net/browse/MM-35096

This only prevents our plugin from causing a problem for other plugins. It's conceivable that another plugin exists that causes this issue as well.