Add scrolling to Viewport_2D_in_3D

I needed a way to scroll a long container with buttons, and thought it might be a nice addition to the tools!
It scrolls when the joystick is up or down (if more than 0.25 in value). If it stops scrolling, it sends a signal, to "unpress" the BUTTON_SCROLL_DOWN and BUTTON_SCROLL_UP. I found if I didn't put that it messed up the rest of the controls afterwards. If there's a better way to implement it, I'd be happy to use that instead!

Also, it scrolls a bit fast, and I'm wondering if there's a way to use the axis' strength to decide how fast we scroll maybe?

Hmm, the principle solution is good but I wonder if it can be made more elegant. The problem here is that we're solving behavior on the pointer that belongs in the viewport. But there may not be another way.
Let me think about it for a bit to see if I can come up with a suggestion that might be slightly cleaner, if I can't I'll probably merge it as is :)


add Google authentication

This makes Google happier about indexing and lets us see some basic stats.

If we want more interesting stats, we could add analytics tracking to each page. Interesting or invasive?

I would like to avoid google analytics. I'm hoping that once the student project on the search bar is done, we could get rid of all ties to google.

That's fair. I think this is worth doing anyway. It has no effect on the user side, just tells Google that we're "official" and lets us point to site maps and such.

As Rob says, this verification is independent of Google Analytics. Here's a page on the Google site verification. It's mainly used in relation to the Google search console.

Johan and I were commenting on Rob's proposal to add Google analytics (the javascript) to each page.  I am happy with this PR.

Yup, I'm also fine with this PR.


CompletionQueue Next return true but ok is false

Change greeter_async_server.cc code, before CompletionQueue Next, I run method
  service_->RequestSayHello(&ctx_, &request_, &responder_, cq_, cq_, this);
32768 times. client is not start, but Next can return true,and ok is false.

I also encountered same return on CompletionQueue::AsyncNext.

See #13019 for ongoing doc work


postcss-preset-env optimization warnings

Hello,
currently have a lot of postcss-preset-env warnings in dev mode.
With postcss-preset-env@7 the warnings are removed.
Is this a correct fix?
.

This version of postcss-preset-env is not optimised to work with PostCSS 8.
Please update to version 7 of PostCSS Preset Env.
If you find issues, you can report it at: https://github.com/csstools/postcss-plugins/issues/new/choose

Behavior can be recreated with:

create new nuxt project (e.g. npm init nuxt-app… )
install @nuxt/postcss8
update postcss config
start dev

nuxt-config.js
export default {
  // Target: https://go.nuxtjs.dev/config-target
  target: 'static',

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'test-postcss',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    "@nuxt/postcss8"
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    postcss: {
      plugins: {
        'postcss-preset-env': {
          preserve: true,
          stage: 0
        }
      },
      order: 'cssnanoLast'
    }
  }
}

package.json
{
  "name": "test-postcss",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "core-js": "^3.15.1",
    "nuxt": "^2.15.7"
  },
  "devDependencies": {
    "@nuxt/postcss8": "^1.1.3"
  }
}

Also experiencing this issue, thought it was related to also using payload (which requires<EMAIL_ADDRESS>as a dependency), but it looks like @nuxt/webpack is also using<EMAIL_ADDRESS>


#1607

Ensure bitfinex submits correct side when exiting positions
Xchange support EXIT_ASK and EXIT_BID order types for exiting positions, when margin trading bitfinex adapter only support BID and ASK, so it might make sense to add the types of EXIT_BID and EXIT_ASK.
update
String type = limitOrder.getType().equals(OrderType.BID) ? "buy" : "sell";
to
String type = (limitOrder.getType().equals(Order.OrderType.BID) || limitOrder.getType().equals(Order.OrderType.EXIT_ASK)) ? "buy" : "sell";


Resize image on the fly problem

Hello!
I like your lightbox very much, but I have some problems with it.
Lightbox don't get any image, when the image's link looks like http://path/img.php?id='1234125'.
I tried to use a filter option ({filter: '/.+\\.(gif|jpe?g|png|webp|php)/i'} and {filter: '/.+\\.(gif|jpe?g|png|webp|php\?id)/i'}), but that didn't work.
Nevertheless the link is working and I get an image in the browser.
Could you make it clear for me, please.

Hello!
Thank you very much for your advice!
I'm a glad that you have found a mistake in the regex in my code.
The IDE made a double slash, when I pasted a regex from README.md.


"Failed to connect" v2.99.0 on OSX

Trying the latest preview release but getting the following error after entering PAT:
System.TypeInitializationException: The type initializer for 'System.Net.Http.CurlHandler' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Http' threw an exception. ---> System.TypeInitializationException: The type initializer for 'HttpInitializer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.CryptoInitializer.EnsureOpenSslInitialized()
at Interop.CryptoInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.CryptoInitializer.Initialize()
at Interop.HttpInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.HttpInitializer.Initialize()
at Interop.Http..cctor()
--- End of inner exception stack trace ---
at Interop.Http.GetSupportedFeatures()
at System.Net.Http.CurlHandler..cctor()
--- End of inner exception stack trace ---
at System.Net.Http.CurlHandler..ctor()
at System.Net.Http.HttpClientHandler..ctor()
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler..ctor(VssCredentials credentials, VssHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Client.VssConnection..ctor(Uri baseUrl, VssCredentials credentials, VssClientHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Agent.Util.ApiUtil.CreateConnection(Uri serverUri, VssCredentials credentials)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__7.MoveNext()
Are there any prerequisites that needs to be installed?

Same error here

What version of OSX?  Any other system info might help us debug.

OS X 10.11.4
$ mcs --version
Mono C# compiler version <IP_ADDRESS>
$ openssl version
OpenSSL 0.9.8zh 14 Jan 2016
No dotnet CLI installed
Anything else I should check?

Investigating.  Only diff I see is my two OSX machines are 10.11 and 10.11.4

For what is worth - I had same issue and after investigating, I found that a pre-req for .Net Core is OpenSSL...I installed OpenSSL via brew and got pass that error...unfortunately now I am fighting to get the build process to find xbuild and nuget...I have updated my PATH env variable and verified that I can execute xbuild and nuget from Terminal just fine.  Currently stuck with error "nuget was not found in the path."...any suggestions on how to debug the path being searched?

@danbridgellc - correct, but @cschwarz noted that he had OpenSSL 0.9.8.  What version do you have?  Mine works.  On our machines, we have:
$ openssl version
OpenSSL 1.0.2f  28 Jan 2016

Regarding PATH (open a separate issue to discuss deeper but quickly) it depends if you are running as a service.  When you choose run as a service, we simply generate a plist file.  Run ./svc.sh status to see where.  In that plist is the path env.  You can edit.  In node agent, we snapshotted your PATH when writing that.  Still not perfect since it doesn't reflect future change (edit it), but better than now.  I'm thinking I will output then when configuring.  If not running as a svc, we should investigate.  Tasks are tool runners and tools are found by running which so they need to be in your path

I was able to repro on a mac which had 0.9.8.
I updated the instructions here and confirmed it fixed it.  I tested on OSX 10.10 and 10.11
https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/latebreaking.md

Yes I am running OpenSSL 1.0.2g  1 Mar 2016
Regarding PATH - yes I was running as service and found the .plist file where I could modify so I am good for now, thanks!

same error on my customer's machine.  it is
MacOS sierra; 10.12.1.
brew --version: homebrew 1.2.1
openssl version: openSSL 0.9.8zh .
then I tried brew update. brew install openssl as suggested. just below error comes:
uodateing homebrew...
updated fromulae
chakra
Error: your xcode (7.2) is too outdated. please update to Xcode 8.3.2 (or delete it).
my god, it takes so newly version Xcode 8.3.2? the customer didn't want to upgrade to xcode 8.3.2 as they concern the compatible. if we delete the Xcode.I think the build doesn't work, so, what should I do?
thanks.

@JUNQIANZ
check this issue https://github.com/Microsoft/vsts-agent/issues/969

thanks.  I solved it. some tricky.
I just uninstall the xcode 7.2. then rerun brew update. brew install openssl. it succeeds.
then, restore xcode;

I think im seeing this issue on High Sierra 10.13 :

brew install openssl

install dotnet core sdk

install xcode + xcode-select install

Run ./config, and observe the CurlHandler error

ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/

ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

./config.sh

expected output:
build agent is now properly configured
actual output:
[Enter personal access token > **************************************************************
Connecting to server ...
./config.sh: line 19: 34980 Segmentation fault: 11 ./bin/Agent.Listener configure

@mgj can you try run ./bin/Agent.Listener configure directly? also, is there any app crash log you can find in OSX ~/Library/Log/...? and can you open a new issue for the problem you hit?

@TingluoHuang thanks for your response. I can run ./bin/Agent.Listener configure but it fails in the same manner with a segmentation fault after entering my access token.
I have opened #1007 which contains the log you asked for as well as the Agent diag log

Thanks for opening the other issue.  The segmentation fault is not related to this issue.

Ok. Please let me know if there is any more info you need from me


Update bloodmnist example by refining inline comments

Unify inline comments of bloodmnist example by making the first word capital

resolved by commits:
https://github.com/apache/singa/commit/1ca75767faec7179fd78e0735504617af56d0f09
https://github.com/apache/singa/commit/7bf8a7e6a5f01d35429dd063dccf93d477e2d62f
https://github.com/apache/singa/commit/9b8e1e94636088346709e9cfa638df512e1d5bc2
https://github.com/apache/singa/commit/35b55acabccf53175a44f8c7c2831891d48f275a

resolved


Fixes missing $file-being-processed parameter in xsl/preprocess/mapre…

Description
maprefImpl.xsl depends on file-being-processed parameter. Previously, the template was applied by ant xslt task with the corresponding attribute. Now the template call has moved to org.dita.dost.module.MaprefModule which not defines this parameter. This leads to an errors in some cases.
How Has This Been Tested?

./gradlew check
the file attched: reltable-topicset.tar.gz

Type of Changes

Bug fix (non-breaking change which fixes an issue)

Checklist

My code follows the code style of this project.

https://github.com/dita-ot/dita-ot/wiki/Java-Coding-Conventions
https://github.com/dita-ot/dita-ot/wiki/XSLT-Coding-Conventions

This should to go hotfix/3.1.1 branch.


file/line/col: streaming parser, transformer, etc....

Early on when rewriting Irken in itself, I tried adding line/column information to the output of the parser, and then finding a way to propagate that information through the various stages.  Without this information, finding the actual source of a type error is a real art form.  However, this ended up more than doubling the size/complexity of the code - I'm not kidding.  So I ripped it all out.
An idea that's been bubbling around for a while is this: make the parser a streaming parser, and do it in a a way that allows the token/sexp consumers access to the file/line/col information 'in real time'.  I don't see how this will address the issue with macro expansions, but I feel like there's an elegant answer in there somewhere.

I've been playing around with modernizing the front end, and I have a good idea here: we can annotate code with s-expressions.  This would allow not only file/line/column but types and any other kind of metadata.  Watch this space.

the above annotation code is being experimented with (in combination with parser combinators) in the 'gaz' language, lessons from there may be moved here.


vault: Allow custom CA bundle

FR: Allow setting a custom CA bundle for the vault integration, similar to the http_check

Great idea @bmoylan! I've created a card to track this feature request.

In addition to custom CA support we could also use client certificate support similar to the consul check.


fix missing def

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.426%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5967

Relevant Lines:
6253

💛  - Coveralls


Consider marking some commands as "internal"

Playing with the command list a bit, I feel that our command list UX could benefit from not showing some commands by default. I feel a new mitmproxy user will be overwhelmed with many internal commands for which they have no immediate use.
Of course, we can add a show_internal_commands option for advanced users.

I'm afraid I'm going to resist this one pretty firmly. I dislike the kind of UX that hides complexity under an "Advanced" tab. Also, the command list is not intended to be a palette of commands for users to choose from when they're unsure of a keybinding or don't want to manually type a command. Instead, it's a canonical list of all our commands, which users should look at when they want to understand what a key binding does better, want to make their own keybindings, or want to know the syntax for a manual command.
We can entertain the idea of an actions palette that does what you want. Each action would be a compound command and a description (like a key binding, but without being bound to a key). The actions palette would be presented to the user as an overlay, so that actions would execute in the context of the current window (unlike commands, where the execution context is the command list, which you found confusing). These could be context-dependent using exactly the same mechanism as key bindings, and, in fact, the UI for configuring these could be shared with the key bindings. I'm not sure if adding this would be an additional complexity we might not need, but it's better than trying to bend the commands palette into something it's not.

Also, the command list is not intended to be a palette of commands for users to choose from when they're unsure of a keybinding or don't want to manually type a command.

Ok - your "not intended to" part is a pretty accurate description of how I perceived it. 😛 My gut feeling would be that many users would interpret it that way initially. Anyways, I follow you overall reasoning. Can we change the Command list window header and the help text to make this a bit more clear? Maybe "[View] Command Reference"?
Action palette: I have to admit that I have a weak spot for that kind of UI, but I don't think we have a pressing need at the moment. Let's focus on shipping 3.0 first and maybe revisit it later.

I've changed the title of the Commands section to "Command Reference", and added a tracking ticket for an Actions pane. Lets discuss during the next cycle.


Apifox: Add version 2.2.38

Closes #10995

[x] I have read the Contributing Guide.

/verify

/verify

/verify


insignia dragula mode?

Looking at insignia, I wish it had dragula's drag-n-drop.  Click / tap puts tags into edit mode.  Could we hold-and-drag-and-drop to reorder?

I think you could implement that with the public API. Do you want to give it a shot? It'd be awesome to see!

It's a natural development I'd also love to see!  Ideally: makes people less hesitant about their tag-sequence thought-process, knowing it can be easily rearranged.
Wish I had the extra time to play with it right now and score a pull request :)  Maybe in a few weeks, which could turn out a few months...  Guessing that meanwhile someone is likely to make it happen.

I doubt that. Give it a shot whenever you can!

Here's a contrived example for you http://codepen.io/bevacqua/pen/oXPgaV


--sub-lang doesn't seem to work

When I use the --sub-lang en option, youtube-dl says it is downloading subtitles, but no subtitle file is created. When I combine that option with --write-sub, all the subtitle files are downloaded, not just the language I selected.
I'm testing with this page:
http://www.crunchyroll.com/yamishibai-japanese-ghost-stories/episode-2-zanbai-641889
This is on version 2014.08.05.

Thanks for the report, in the next version only the requested language file will be written.

I believe this issue to be fixed in youtube-dl version 2015.02.24 and newer. See our FAQ if you need help updating.


Failed - Instruction not in basis gates: instruction: ecr, qubits: [0, 1], params: []

URL to the relevant documentation
When running my circuit on ibm_brisbane I get:
Failed - Instruction not in basis gates: instruction: ecr, qubits: [0, 1], params: []
Despite ibm_brisbane supporting ecr gate.
Select all that apply

[ ] typo
[ ] code bug
[ ] out-of-date content
[ ] broken link
[ ] other

Describe the fix.
When running my circuit on ibm_brisbane I get:
Failed - Instruction not in basis gates: instruction: ecr, qubits: [0, 1], params: []
Despite ibm_brisbane supporting ecr gate.

Hi @tralala87 -- looks like you've also opened an issue here as well. I'll close this issue since the documentation for ibm_brisbane's basis gates don't need updating.


[PE-D] Edit Command Example from User Guide Not Working

The Example Provided in User Guide for the edit command, differs from what the App error message shows, and the example cannot be executed.

Labels: type.DocumentationBug severity.High
original: Jai2501/ped#29

Related to #142


Added HL7 ADT generation to generate HL7V2 test data

I think this is the 2nd time I've written this code over the years and I think this turned out halfway decent -- for my purposes anyways. This request here is also less of a real Pull Request as it is a ping to the Mothership as to whether this type of addition might be of interest to the community of Synthea users. If so I could make the effort to better follow project guidelines/style/etc, spiff it up a bit and put up a real pull request. Either way appreciate any feedback.
I currently generate HL7V2 'fat' ADT messages and CDA, side by side, for comparison once the data is imported into my larger project. It's quite a useful process.  It's not a perfect match but nice to have some HL7V2 test data.
Also, can't thank those behind this project enough.  Synthea has been helpful over the years.  Cheers.

+1
On Mon, Mar 1, 2021 at 12:28 PM Queuepoint Systems, Inc. <
<EMAIL_ADDRESS>wrote:

I think this is the 2nd time I've written this code over the years and I
think this turned out halfway decent -- for my purposes anyways. This
request here is also less of a real Pull Request as it is a ping to the
Mothership as to whether this type of addition might be of interest to the
community of Synthea users. If so I could make the effort to better follow
project guidelines/style/etc, spiff it up a bit and put up a real pull
request. Either way appreciate any feedback.
I currently generate HL7V2 'fat' ADT messages and CDA, side by side, for
comparison once the data is imported into my larger project. It's quite a
useful process. It's not a perfect match but nice to have some HL7V2 test
data.
Also, can't thank those behind this project enough. Synthea has been
helpful over the years. Cheers.
You can view, comment on, or merge this pull request online at:
https://github.com/synthetichealth/synthea/pull/862
Commit Summary

Adding ability to export HL7 ADT records instead of CCDA or FHIR
Added Meds and added ability to have custom (non-standard) segments
WIP
Change HAPI to 2.5.1
Change the file extension
Add more segments to the HL7 message
Added a minimal IN1, SFT and PD1 segment
Fixed an issue where we can get Doubles for some vital signs where
the precision is out to about 20 decimal places which kind of freaks HAPI
out.
Adding ability to export HL7 ADT records instead of CCDA or FHIR
Added Meds and added ability to have custom (non-standard) segments
WIP
Change HAPI to 2.5.1
Change the file extension
Add more segments to the HL7 message
Added a minimal IN1, SFT and PD1 segment
Fixed an issue where we can get Doubles for some vital signs where
the precision is out to about 20 decimal places which kind of freaks HAPI
out.
Merge branch 'master' of https://github.com/qpointsystems/synthea

File Changes

M build.gradle
https://github.com/synthetichealth/synthea/pull/862/files#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
(3)
M src/main/java/org/mitre/synthea/export/Exporter.java
https://github.com/synthetichealth/synthea/pull/862/files#diff-72384405ba0fe0f6b4a77d6acb65959e5fdb3dad44c33bd1ea3dca18eae43dc4
(6)
A src/main/java/org/mitre/synthea/export/HL7V2Exporter.java
https://github.com/synthetichealth/synthea/pull/862/files#diff-4673bed9190647597c66111510f4f0f3488023ce106664c776583b264f1f4921
(626)
M src/main/resources/synthea.properties
https://github.com/synthetichealth/synthea/pull/862/files#diff-57b8384486ebbd448740bc23acd9b034fed120850058126e0936d90d80918750
(13)

Patch Links:

https://github.com/synthetichealth/synthea/pull/862.patch
https://github.com/synthetichealth/synthea/pull/862.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/synthetichealth/synthea/pull/862, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIS3QWX7GH3AK7TJX6OKCDTBPTGTANCNFSM4YNERJ2A
.

@qpointsystems Thank you for the pull request.
I do think this capability would be interesting to the broader development community. I've anecdotally heard of others creating HL7 v2 messages as well using Synthea, so there must be an unmet need that this PR could fill.
As you humbly acknowledge, there could be some clean up. In particular there seems to be some copy & paste unnecessary code in your exporter (for example, setting some of the attributes that are used by the Apache Freemarker template-based exporters).
I do think this could be a nice addition to the project.

@jawalonoski, thanks a lot for your comments! I'd like to basically do a clean pull request that just includes  the following:

HL7V2Exporter.java as the initial version of a HL7V2 exporter
Code added to Exporter.java to optionally invoke HL7V2Exporter if the flag from synthea.properties is set
synthea.properties to add the exporter.hl7v2.export property
build.gradle for the HAPI 2.51 dependency

The version of HAPI I've chosen is definitely debatable. Another version like 2.7 or even 2.8 might be more appropriate for some and not others. Ideally a user could set the version they wanted.  But I was trying to avoid adding a lot of dependencies directly to the project.  There are ~10 versions of HAPI aside from 'hapi-base'.   Definitely a bit of a conundrum.
Regarding my Copy&Paste habit -- guilty as charged of course. But could you please point me to a place in HL7V2Exporter where I'm setting some Freemarker aspects?  Definitely agree that, since my current exporter is not doing any templating, I shouldn't be implying with code that it is. I'd like to nix that for sure. I'm sure once you point an example out I'll get what you mean.
Finally: for my next attempt, do you want it in the form of a pull request, even if it's just to facilitate feedback?
Cheers!
Gary Teichrow

One thought I had as I was writing this HL7 V2 Exporter is this: my exporter is clearly very use-case specific, frankly a bit of a kludge, and unlikely to be of much use as is. It's specific to my use-case which is generating large volumes of test data for a messaging pipeline and it's been amazingly helpful to my project.  Synthea has been a tremendous help to my efforts -- can't say that enough.
I spent a good chunk of time on a different approach before writing this exporter.  That was attempting to take CCDA's generated by Synthea and converting them into one or more HL7 V2 messages. I basically gave up, but it was an interesting exercise.
The Exporter aspect in Synthea, which has access to the entire patient health graph that's been generated in memory, is simply the perfect place to differentiate that graph out to some use-case specific format (CCDA, FHIR,  HL7, ????, etc) as esoteric as that use-case might be.
Currently the only way to add in some new ExportXXXX is to splice a call to that new functionality into Exporter.java, add any appropriate dependencies, and finally a configuration option to toggle it.  Easy peasy, but what if nobody really needs/wants that ExportXXXX functionality?  There is no current mechanism to, via some wiring configuration, cause Synthea to invoke some Exporter that implements some Exporter Interface from a separate library. Much looser coupling to the larger efforts of the project but still leverages the KEY thing that Synthea does which is building these amazing patient health graphs of realistic clinical data.
I suggest the question here is how could this kind of functionality be added to Synthea without dragging in a lot of unnecessary complexity (e.g. Spring, etc).
I think my effort at this point should be to suggest/implement a mechanism for this sort of functionality and not to add my far to use-case specific exporter to the greater project.

@qpointsystems to your point of generalizing exporters - this is something I've been thinking a lot about recently as well, and experimented around a bit with a couple approaches.
What I would propose as a first step is to create a generic interface for exporters, and a mechanism for these to be registered with the Exporter class at runtime. Nothing complex at this point like dependency injection(Spring), just a way in code to say Exporter.registerExporter(....) . Then a developer who wants to add a new exporter would provide their own main method, that registers an exporter and then invokes the existing Synthea main method. Eventually, but not a high priority, we could consider migrating the existing exporters to use that interface as well.
As you note, anything that wires Synthea to be aware of arbitrary additional libraries is going to either be pretty heavyweight, or not compatible with existing aspects of the project, so I wouldn't recommend starting there. (For example I tried reading jars and scanning for classes implementing interfaces with "javautil": https://github.com/bmc/javautil / http://software.clapper.org/javautil/api/org/clapper/util/classutil/ClassFinder.html  but it's incompatible with another library we're using, I forget which)

Use of java.util.ServiceLoader looks like a possibility. Essentially you could package up a new exporter as a jar with an appropriate META-INF/services file that declares support for a Synthea-defined exporter interface. We'd have to add something to Synthea to use ServiceLoader to look for new exporters on the class path at runtime.

Use of java.util.ServiceLoader looks like a possibility. Essentially you could package up a new exporter as a jar with an appropriate META-INF/services file that declares support for a Synthea-defined exporter interface. We'd have to add something to Synthea to use ServiceLoader to look for new exporters on the class path at runtime.

Very cool. Nice and simple -- KISS principle at work.
So perhaps there is an exporter sub-directory where these implementation jars go. Then Synthea shortly after startup scans that directory for jars with an appropriate manifest and have a class that implements a corresponding IExporter interface AND is further called out/named in synthea.properties (we shouldn't load them all, just once that the user wants to use).  Each loaded exporter implementation in then is 'invoked' for each patient.
The output folder name might need to be configurable but no reason that aspect could not be interrogated from the implementation of the particular exporter.  Along with some other attributes perhaps:
String export(Person person, long time);
String getExportPath() or getExportPath()  (e.g., "ccda", "hl7v2", etc)

Use of java.util.ServiceLoader looks like a possibility. Essentially you could package up a new exporter as a jar with an appropriate META-INF/services file that declares support for a Synthea-defined exporter interface. We'd have to add something to Synthea to use ServiceLoader to look for new exporters on the class path at runtime.

Let's keep that separate from the v2 pull request. That will be a larger refactor that I would like to keep separate. We can open an issue for that if we want to track that.

I think we can close this pull. I'm quite pleased with the notion of adding a more flexible Export capability -- perhaps via the ServiceLoader notion mentioned above. Thanks for the feedback on my code and, when there is a more 'modular' Export functionality, i'll make my code (FWIW) available via a github project.  As with your ability to add disease states, I having an ability to support custom export formats might be fairly useful.
Cheers!

Not to reignite this discussion, just for posterity:
Don't ask what reminded me of this, but I just remembered what the issue with ServiceLoader would be -- the classpath and the different ways that we can run Synthea. There are (at least) 2 ways to launch Synthea, either via gradle (gradle run / the run_synthea script), or by the standalone jar java -jar synthea-with-dependencies.jar.
Now for the ServiceLoader to find our "module" jar, it has to be on the classpath. For the jar version this is easy, though we have to rewrite our run command: java -cp synthea-with-dependencies.jar:module.jar App . I think I tested something like this and it did work as expected. But for running from gradle/run_synthea, there's no easy way to add to the classpath. You can add new Classloaders that read from external JARs, but when you start mixing classloaders you can get all sorts of trouble so I'm not sure that's a road we want to go down.

Hi @qpointsystems ,
What happened over time with this ADT exporter?

@Dmytro-Hasilin, well, I used the capability back in '21 to pressure test a part of my system that supports HL7V2.
For that purpose it worked out nicely. I honestly don't think it'd meet the grade for inclusion in this project;  a bit of a hack.
That said, for my purposes where I required syntactically valid HL7 ADT messages that were content wise the same as the CDA messages Synthea was generating (i.e., contained the same demographic and clinical information in a different format), I got what I needed.
Going forward, when I periodically update Synthea to the latest master, I then re-merge my work.  So far It's been easy to merge.
I've you'd like a 'stash' of the code I'd be more than happy to provide.
g

@gteichrow  got it. I've copy pasted and merged with master this PR and for my simple use case it also worked well.
Its a pity that this effort is unused. I would definitely use it in future, so thanks.
I believe it is worth adding to repo as a preview feature 👍

Hi @gteichrow and @Dmytro-Hasilin , fyi we did at some point in the past few years enable the ServiceLoader approach I mentioned above to allow for custom drop-in JARs - more info is here: https://github.com/synthetichealth/synthea/wiki/Custom-Exporters and https://github.com/synthetichealth/custom-exporter-template
As far as I know, nobody outside of our code development group has used it yet so there may be quirks, but we'd love for someone to try it out for something like this

@dehall  I would love to contribute, this project saved me a lot of time. But @gteichrow is not sure this code is not sure this PR is up to the standards to contribute, and I understand only on high level what is done here.
I could wrap it in the jar. But does that adds value? Would it be approved?
I would say yes, it is better that keeping it as code 'stash', it produces way better output than random adt messages from google search results.

Yeah, your update is what I was thinking - this approach would allow you to build a jar from a separate repo and use that in synthea without any additional code changes. So you could update synthea without having to reapply/rebase changes, you could share it with people who don't want to make code changes, etc.

I'm currently on holiday, but when I get back I can port/refactor my existing functionality to one of these ServiceLoader compatible 'plugin' jars.
But, I do have an integration question:
At this point I don't think there is an interface I'd implement so that my 'plugin' can implement?  (maybe it's there?)
What I did with my changes is, I wrote my HL7V2Exporter and it has a single public method:
public String export(Person person, long time);
Then in Exporter.java, where the various configuration flags like 'exporter.*.export' are evaluated, I added this chunk of code:
//Caterwaul
if (Config.getAsBoolean("exporter.hl7v2.export")) {
  String hl7V2Msg = HL7V2Exporter.getInstance().export(person, stopTime);
  File outDirectory = getOutputFolder("hl7v2", person);
  Path outFilePath = outDirectory.toPath().resolve(filename(person, fileTag, "hl7"));
  writeNewFile(outFilePath, hl7V2Msg);
}

Proposal: if services could be examined for that service's implementation of the interface IExporterService and expose one ore more methods (e.g., initialize, getConfigFlag, export(person), shutdown) in that interface, particularly the configuration property that correlates to this Service (e.g., getConfigFlag() returns 'exporter.hl7v2.export') that would allow Exporter.java to 'bind' a given exporter Service IExporterService to a given configuration property.
This would turn Exporter.exportRecord() into a method that iterates through 3 or more invocations of exporter IExporterService.export() methods and let the services control all that logic.
Anyways, I bring this up as it is one thing to move my HL7V2Exporter exporter to a ServiceLoader compatible jar.  It's another to wire the invocation of my service into the larger program; specifically a call in. Exporter.export().
(I'll be checking email on vacation like a good geek, but can't get away with coding, haha)

The interface does exist, it's org.mitre.synthea.export.PatientExporter with one method: public void export(Person person, long stopTime, ExporterRuntimeOptions options)
It's not quite as guided as your proposed interface, but it allows pretty much unlimited flexibility within that export method. For example it doesn't assume the output will be written to a file - our demo writes to a postgres database. And it's called for every patient record so it's up to the exporter itself to check if it should run.
So you will need to migrate some file write logic and the config check into the exporter itself, but other than that it should hopefully be a straightforward copy&paste of your existing code. If you get a chance, take a look at https://github.com/synthetichealth/synthea/wiki/Custom-Exporters

That's fabulous. Thanks for the comments and looking forward to porting my code.
:)


AWS EC2 Service Discovery with regional endpoints fails

What did you do?
We are running prometheus in an AWS EKS cluster via the prometheus-community Helm chart for prometheus.
From https://github.com/prometheus-community/helm-charts/releases/tag/prometheus-15.12.0
with Prometheus Version: v2.37.0 (patched)
Configure Service Account in Helm chart config:
serviceAccounts:
  server:
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::ACC_NR:role/ROLE_NAME

which is correctly reflected by environment variables
Configure prometheus.yml scrape config (see below)
Use AWS with regional endpoints (EC2, STS, etc): https://docs.aws.amazon.com/general/latest/gr/rande.html
What did you expect to see?
See all running EC2 instances in the current account
What did you see instead? Under which circumstances?
Error from debug log of prometheus:
ts=2022-08-10T09:41:22.740Z caller=ec2.go:229 level=debug component="discovery manager scrape" discovery=ec2 msg="Unable to describe availability zones" err="WebIdentityErr: failed to retrieve credentials
caused by: SerializationError: failed to unmarshal error message
status code: 400, request id: xxxxxxxxxxxx
caused by: UnmarshalError: failed to unmarshal error message
-- I removed the HEX dump and formatted the output
<?xml version="1.0" encoding="UTF-8"?>
  <Response>
    <Errors>
      <Error>
        NoSuchVersion
        <Message>The requested version (2011-06-15) of service AmazonEC2 does not exist</Message>
      </Error>
    </Errors>
    <RequestID>xxxxxxxxxxxx</RequestID>
</Response>

caused by: unknown error response tag, {{ Response} []}"

I read somewhere that regional endpoints might have a reduced API version spectrum. So maybe this is it?
If I remove the endpoint: "ec2.eu-central-1.amazonaws.com" from the Prometheus config no messages are logged but also no EC2 servers appear in Prometheus.
System information
Linux 5.4.129-63.229.amzn2.x86_64
Prometheus version
version=2.37.0, branch=HEAD, revision=b41e0750abf5cc18d8233161560731de05199330
go=go1.18.4, user=root@0ebb6827e27f, date=20220714-15:13:18

Prometheus configuration file
[...]
  - job_name: "node-exporter"
    tls_config:
      insecure_skip_verify: True
    metrics_path: /node-exporter/metrics
    scheme: https
    ec2_sd_configs:
      - region: eu-central-1
        port: 8443
        endpoint: "ec2.eu-central-1.amazonaws.com"
    relabel_configs:
      - source_labels: ['__meta_ec2_tag_Fqdn']
        target_label: 'instance'
[...]

### Alertmanager version

_No response_

### Alertmanager configuration file

_No response_

### Logs

_No response_

Hello from the bug scrub!
As nothing has been moving here in the last two years, we assume this isn't an issue anymore. If it still is an issue with the current Prometheus release, please follow up and we'll reopen.


checkpoint z-chunks in OMP

Just tried rerunning OMP on daphne (alpha 0.7.1).  Again it had a memory error just before the end of the first tile (z_chunk 56/61) after running for a few hours.
I think there is no way to run OMP (at least on this dataset) until we either fix the memory error, or add checkpointing for z-chunks so it can continue where it left off without needing to rerun the whole tile.

Let's talk about how we can try add this in while minimising chance of errors at some point in the future, @reillytilbury. This is probably not a priority right now, tho

We are not planning to add this yet.


deployer:push Can't open user config file ~/.ssh/config: No such file or directory

Version: Deployer 7.0.0-master
Problem described here, when using deployer push
-> % rsync -azP -e 'ssh  -p 2022 -F ~/.ssh/config -A -o ControlMaster=auto -o ControlPersist=60 -o ControlPath=/Users/name/.ssh/user@server:22' 'server.patch' 'ubuntu@server:/var/www/customer/current/server.patch'
Can't open user config file ~/.ssh/config: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(228) [sender=3.2.3]

Copy from https://0xacab.org/leap/platform/-/issues/5696
strace command
strace -f -o rsync.strace rsync -rltp --chmod=u+rX,go-rwx -e "ssh -F '~/.ssh/config' -o GlobalKnownHostsFile='/home/guido/leap/provider/files/ssh/known_hosts' -o UserKnownHostsFile='/dev/null' -o StrictHostKeyChecking='yes' -o HostName='NODE-IP' -p 22" hiera/webappnode.yaml root@webappnode.domain.org:/etc/leap/hiera.yaml

returns
27905 open("~/.ssh/config", O_RDONLY)   = -1 ENOENT (No such file or directory)

As it's using open(), it needs the full path to the ssh config file.

Fixed in b8947cf0c24aa36f4499305478c88dd3711984f7


Refactor and Release

Don't merge this until the end of current sprint
This closes Issue #61 and Issue #91 too.

I'm able to publish the library using the same github workflow via forked repository. But when I create a pull request for main branch. publish library build is getting failed. Added all the necessary credentials. Error: Unauthorised

Anyone with collaborator access to this repository can use the secrets and variables for actions. They are not passed to workflows that are triggered by a pull request from a fork. - credentials from secrets are not available for pull request workflow. Let's merge it and try running the workflow.

Created a new branch from pi4micronaut without forking. Created another pull request with same changes.


Exception in queued task: Error: Failed to execute 'insertBefore' on 'Node'

I have 2 mainly tabs, a list tab, a sort list tab and a profile tab.
The error used to be for all 3 tabs until i switched to a onCreated from onRendered.
Currently, if I go from profile to sort tab, error remains. But from list tab to sort it works fine, but only after the location is loaded.
Wrapping the {{> each}} or {{>if}} does not work unfortunately in my case.
SO Link there to the issue.
http://stackoverflow.com/questions/35017820/error-failed-to-execute-insertbefore-on-node

Try wrapping your view in a subReady if statement.
{{#if Template.subscriptionsReady}}
 {{#ionView}}
    {{#ionContent}}
        {{#ionList}}
            <div>
              {{#each shops}}
                    {{> shopItem}}
              {{/each}}
            </div>
        {{/ionList}}
    {{/ionContent}}
  {{/ionView}}
{{/if}}

Hi,
I'm also experiencing this issue. I've tried wrapping my code with the subscriptionReady but doesn't work. In my case the problem occurs inside the 'ionSideMenuContent' block but not inside the 'ionSideMenus'
Any workaround?
Thanks

@iuraya unfortunately, I suspect that the error is because the package is now deprecated, Many of its Blaze dependent components now affect the way items are being inserted into lists. I have ripped out the package entirely.

In my case, remove ionNavView from the master layout solve the issue...
i think the bug is in the source code of it: https://github.com/meteoric/meteor-ionic/blob/master/components/ionNavView/ionNavView.js


Fix gizmo for BoxShape3D

Typo causing a bug due to using local, not global, position
(Not relevant to 4.1, as the PR introducing this, #71092, has not been cherry picked)

Fixes: #80685

Thanks!

Thank you!


Enable internationalizations (I18N)

@upkarlidder I heard through the grapevine that you might be working on this.  If so, please assign yourself.  :)  Thx

Started #192 to externalize strings.
Sample in Hindi:

I have externalized the majority of strings. For anything left, we can create new issues.
Okay to close this @davidnixon, @cstefano1?

@upkarlidder I defer to @davidnixon .  Thx


⚠ Turnos 24x7 has degraded performance

In 08879be, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 914 ms

Resolved: Turnos 24x7 performance has improved in b77ba3d.


S3 Bucket

Hello,
Is it possible to bypass the PutPublicAccessBlock call in S3 buckets? There is a policy at my organization that forbids any change associated with them and I am therefore not able to launch any Xanadu Borealis instance with the plugin because of that issue.
I get an AccessDenied error.
Your help would be greatly appreciated!

Hi @joeghal,
By providing your default bucket name when creating the task, you can get around the policy error. You are now encountering this problem because the default bucket we setup needs this policy.

Hi @joeghal,
Based on the earlier suggestion made in response to your query, I will close this issue. If your still facing the issue, please feel free to re-open this issue.


How to add and use the filters that are in the Demo?

How do I properly use and add the filters from the Demo to my project and use them?

Hi,
First of all, you can write an extension like below for colorcubestorage. But you can also find this example on demo.
extension ColorCubeStorage {
  static func loadToDefault() {

    do {

      try autoreleasepool {
        let bundle = Bundle.main
        let rootPath = bundle.bundlePath as NSString
        let fileList = try FileManager.default.contentsOfDirectory(atPath: rootPath as String)

        let filters = fileList
            .filter { ($0.hasSuffix(".png") || $0.hasSuffix(".PNG")) && $0.hasPrefix("Filter_")}
          .sorted()
          .concurrentMap { path -> FilterColorCube in
            let url = URL(fileURLWithPath: rootPath.appendingPathComponent(path))
            let data = try! Data(contentsOf: url)
            let image = UIImage(data: data)!
            let name = path
              .replacingOccurrences(of: "LUT_", with: "")
              .replacingOccurrences(of: ".png", with: "")
              .replacingOccurrences(of: ".PNG", with: "")
            return FilterColorCube.init(
              name: name,
              identifier: path,
              lutImage: image,
              dimension: 64
            )
        }

        self.default.filters = filters

      }

    } catch {

      assertionFailure("\(error)")
    }
  }
}

extension Collection where Index == Int {

  fileprivate func concurrentMap<U>(_ transform: (Element) -> U) -> [U] {
    var buffer = [U?].init(repeating: nil, count: count)
    let lock = NSLock()
    DispatchQueue.concurrentPerform(iterations: count) { i in
      let e = self[i]
      let r = transform(e)
      lock.lock()
      buffer[i] = r
      lock.unlock()
    }
    return buffer.compactMap { $0 }
  }
}

After, you should initialize...
        let controller:PixelEditViewController = PixelEditViewController(image: image,colorCubeStorage: ColorCubeStorage.default)

        Router.shared.push(from: self, to: controller, animated: true)

Note: Don't forget you have to add filters.you can already find them on demo.

@koust I appreciate your help. I just added all the filters into my project that were in the demo, as well as the code that you just gave me, but the filters aren't showing up. I added a print statement to  see if the filters were there, but I get an empty array. Do you know why that is? maybe It's not loading the images from the right path?

@koust Great that worked perfect! Do you mind answering my last question on making the image view bigger and the editing panel smaller where there's less white space? I've tried going into the constraints of it but can't figure it out. I would really appreciate it!

@ChristianElam I need to review codes. after, I can say something.

How to hide filter tab in PixelEditViewController


dynamically pass through available terminal width for help table rendering

depends on https://github.com/ShiftLeftSecurity/codepropertygraph/pull/1754
preview for different table sizes:

.p output looks suboptimal - this isn't new in any way and just a result on how the repl renders the strings, but I think I'll just add a \n somewhere to make it look nicer

now it's better

should get fixed by https://github.com/ShiftLeftSecurity/overflowdb/pull/417

it looks like the new library just makes all columns the same width? that's not great for flows

yes that's true. will experiment with column spans, maybe in a follow-up PR though, given that this is already better than the status quo


Added "What's New in 97" with "Hide Custom Tab" in "What's New in Progressive Web Apps"

Updated 96 with the fact protocol handlers is shipping in stable, new section for 97 and text for Store apps hiding CCT UI.
Rendered article for review:
https://review.docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/whats-new/pwa?branch=pr-en-us-1575

Docs Build status updates of commit 2b6fb92:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit a05a3b5:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit f82e54f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/chromium-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/contact-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/edge-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note-thin.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 9117038:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/chromium-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/contact-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/edge-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note-thin.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit d46c914:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/chromium-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/contact-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/edge-whats-new-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note-thin.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/includes/experimental-note.md
:white_check_mark:Succeeded

microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Example for CodeCoverage XML

Hey,
can you please provide an example on how the XML needs to be formatted for AzureDevOps.
Thanks.

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

ID: c6ac4ff4-9839-6a6d-8d20-a25084d221ef
Version Independent ID: bd09f139-8e69-8ea1-6671-b7bba8e17c23
Content: Publish Code Coverage Results task - Azure Pipelines
Content Source: docs/pipelines/tasks/test/publish-code-coverage-results.md
Product: devops
GitHub Login: @erickson-doug
Microsoft Alias: vinojos

Since the task only supports formats using Cobertura or JaCoCo, I found some examples online:
Cobertura
https://raw.githubusercontent.com/jenkinsci/cobertura-plugin/master/src/test/resources/hudson/plugins/cobertura/coverage-with-data.xml
JaCoCo
https://www.jacoco.org/jacoco/trunk/doc/

I think it would be better if they had two examples showing both Cobertura and Jacoco as well as what the default files they would be looking for. e.g. for jacoco the default file is jacaco.exec


[Level Up - Advanced 5th Edition] Bug Fix

Submission Checklist
Required

[X] The pull request title clearly contains the name of the sheet I am editing.
[X] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[X] The pull request makes changes to files in only one sub-folder.
[X] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[ ] I have followed the Character Sheets Standards when building this sheet.

[ ] This sheet has been made on behalf of, or by, the game's publisher.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

**2022-12-05 ** v.17 Paul V
Fixed issue with NPC Skill and Attack rolls - converted the rolls to use the new Action button tech
Added Initative roll to NPC Sheet
Fixed issue with Tool rolls

Character Sheet Info Roll20 Internal Use only.


godot_4: 4.1.1 -> 4.1.3-stable

godot_4: 4.1.1 -> 4.1.3-stable
Description of changes

Release: https://github.com/godotengine/godot/releases/tag/4.1.3-stable
Changelog: https://github.com/godotengine/godot/blob/4.1.3-stable/CHANGELOG.md

Added suffix -stable to sync with upstream.

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

This PR is ready for review / merge.

@ofborg eval

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

2 packages built:

godot_4
godot_4.man


Question about BacksolveAdjoint through SemiImplicitEuler solver

I am testing the adjoint method to calculate the gradients from a SemiImplicitEuler solver. I met errors when calculate the gradients using BacksolveAdjoint method. Here is a working example.  It would be great to have some suggestions.
Thank you in advance!
`
from diffrax import diffeqsolve, ODETerm, SemiImplicitEuler, SaveAt, BacksolveAdjoint
import jax.numpy as jnp
from jax import grad
from matplotlib import pyplot as plt
def drdt(t, v, args):
return v
def dvdt(t, r, args):
return -args[0]*(r-args[1])
terms =(ODETerm(drdt),ODETerm(dvdt))
solver = SemiImplicitEuler()
y0 = (jnp.array([1.0]),jnp.array([0.0]))
saveat = SaveAt(ts=jnp.arange(0,30,0.1))
def loss(y0):
solution = diffeqsolve(terms, solver, t0=0, t1=30, dt0=0.0001, y0=y0, args=[1.0,0.0], saveat=saveat,max_steps=10000000,adjoint=BacksolveAdjoint())
return jnp.sum(solution.ys[0])
grads = grad(loss)(y0)
print(grads)
`
here is the error message:
Traceback (most recent call last):   File "test_harmonic.py", line 23, in <module>     grads = grad(loss)(y0)   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/grad.py", line 482, in fn_bwd_wrapped     out = fn_bwd(residuals, grad_diff_array_out, vjp_arg, *args, **kwargs)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/adjoint.py", line 394, in _loop_backsolve_bwd     state, _ = _scan_fun(state, val0, first=True)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/adjoint.py", line 332, in _scan_fun     _sol = diffeqsolve(   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/jit.py", line 82, in __call__     return __self._fun_wrapper(False, args, kwargs)   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/jit.py", line 78, in _fun_wrapper     dynamic_out, static_out = self._cached(dynamic, static)   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/jit.py", line 30, in fun_wrapped     out = fun(*args, **kwargs)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/integrate.py", line 858, in diffeqsolve     final_state, aux_stats = adjoint.loop(   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/adjoint.py", line 499, in loop     final_state, aux_stats = _loop_backsolve(   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/grad.py", line 509, in __call__     out = self.fn_wrapped(   File "/home/zwq2834/anaconda3/envs/diffsim_jax/lib/python3.8/site-packages/equinox-0.9.2-py3.8.egg/equinox/grad.py", line 443, in fn_wrapped     out = self.fn(vjp_arg, *args, **kwargs)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/adjoint.py", line 250, in _loop_backsolve     return self._loop_fn(   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/integrate.py", line 497, in loop     final_state = bounded_while_loop(   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/misc/bounded_while_loop.py", line 125, in bounded_while_loop     return lax.while_loop(cond_fun, _body_fun, init_val)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/misc/bounded_while_loop.py", line 118, in _body_fun     _new_val = body_fun(_val, inplace)   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/integrate.py", line 137, in body_fun     (y, y_error, dense_info, solver_state, solver_result) = solver.step(   File "/home/zwq2834/development/DiffSim_Jax/diffrax/diffrax/solver/semi_implicit_euler.py", line 42, in step     y0_1, y0_2 = y0 ValueError: too many values to unpack (expected 2)

Right! So this is actually expected, although the error message could certainly be improved.
When you use BacksolveAdjoint, you're saying that you'd like to solve another ODE system backwards in time. This involves (a) solving the original ODE backwards-in-time, but also (b) solving the adjoint system (which propagates the gradients backwards in time).
In particular, this no longer has the partitioned structure that SemiImplicitEuler expects. (And by default, BacksolveAdjoint uses the same solver on the backward pass as on the forward pass.)
The "correct" fix here would be to define some new solver that is able to handle the combined partitioned+adjoint system arising from backpropagating through a partitioned system. You could then pass BacksolveAdjoint(solver=MyNewSolver()) and things would work. This would actually be relatively straightforward if you know what you're doing.

For the sake of improving the error message, I've marked this as a bug. And to have this new solver be defined and actually used automatically, I've marked this as a feature.
In the mean time I'd probably recommend that you use the default adjoint method instead, which is usually a better choice than BacksolveAdjoint anyway.
Other miscellaneous thoughts:

Don't forget to JIT (jax.jit or eqx.filter_jit) in order to get good performance.
SemiImplicitEuler is a low-order solver, that isn't very good. I'd be happy to accept a PR adding in higher-order symplectic solvers if they'd be useful to you. (I can see that you're currently having to use very small time steps to make things work.)


not support where caluse p=>true

var sqlQuery = userSqlGenerator.GetSelectFirst(p=>true, null);

@cnkker this:
var sqlQuery = userSqlGenerator.GetSelectFirst(null, null);

I think we can support  p=>true too. But later

Can use workaround here. Closed.


Import server.cpp to retain llava support

Recent refactoring upstream has temporarily(?) removed llava support from the server.cpp code, which we rely on.  This pulls the server just before that change into our repo so we can keep current with the base llama.cpp code updates until llava support is added back.
Verified on Mac, Linux and Windows.

Looks great so far.

is there something blocking that we need the most recent version of llama.cpp for rather than using the commit from before removing multimodal support in our submodule?

Not that I know of yet, but I wanted to have this ready in case new models or other major updates/fixes land in llama.cpp in the core so that we could pick them up without being stuck choosing between dropping llava, or picking that new feature/fix up.


Nom 3.0 upgrade

Updates from nom v2.0 to v3.0. The main incompatibility was use of the deprecated chain! macro.
cargo test seem to pass afterwards, as does cargo run --example producer_errors testcases/test001.ntar with rustc 1.17.0 (56124baa9 2017-04-24).

Awesome, thankyou!


add hard fault handlers for MultiTech mDot and Dragonfly platforms

Since MTS products can be deployed and are expected to stay up and running indefinitely, reset the device if a fault is encountered instead of sitting in a while(1); loop.

Looks good to me.
We might consider providing default "fault" handlers (they could dump some fundamental information for a user), that can be overwritten like you did for these 2 targets.


k logs change view (Ctrl-/) results in "invalid memory address or nil pointer dereference"

Thanks for putting together a useful kubectl tool using fzf. I ran into an issue when I used k logs and tried to change the view using Ctrl-/. After two presses, when it tries to go 'full-screen' I get an error.
Steps to reproduce

Set KUI_PATH to the directory with kubecui.sh
Load kubecui.sh using source kubecui.sh
Run k logs
Press Ctrl-/ twice

Error message below, I had to clean it up because it was intermingled with the shell output
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x5772b4]
goroutine 24 [running]:
github.com/junegunn/fzf/src.(*Terminal).Loop.func9.2(0x0?)
github.com/junegunn/fzf/src/terminal.go:3055 +0x714
github.com/junegunn/fzf/src/util.(*EventBox).Wait(0xc000012738, 0xc0000c9fa0)
github.com/junegunn/fzf/src/util/eventbox.go:34 +0x62
github.com/junegunn/fzf/src.(*Terminal).Loop.func9()l
github.com/junegunn/fzf/src/terminal.go:2978 +0xee
created by github.com/junegunn/fzf/src.(*Terminal).Loop in goroutine 8
github.com/junegunn/fzf/src/terminal.go:2962 +0x593

Lastly, I am using bash on Debian testing (trixie) version GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)

Hello. Thank you for testing and reporting bugs. I've just applied a small fix. You can git pull or just download kubecui.sh from main branch. Let me know if the fix works for you.

Looks like https://github.com/pymag09/kubecui/commit/1052f9c856062eed8bec851520d5300dafe03d9b fixed the issue. I can toggle Ctrl-/ without problem. Issue can be closed.
And thank you again for the very useful tool.


wrote TODO in set_xresources()

now, the line
"#include	".Xresources.d/colors""
is included, if needed. All other lines containing the word "color" are
commented out.

I cannot get this to work. If I already have #include ~/.Xresources.d/colors included in my ~/.Xresources, the script will comment out the include and not write a new line in my ~/.Xresources file. When I remove the include line manually and run the script again, it will once again not write a new include line.


intersection between object() and record() parsing fails

I have an intersection between a z.object() and a z.record() that has a refined key. Parsing an input fails since it seems to require all the input keys to match the record and the object, despite typescript seeing it as valid against the type.
version: 3.20.6
Example:
type FooKey = `foo.${string}`
const isValidFooKey = (key: string): key is FooKey => key.startsWith("foo.")
const Foo = z.record(
  z.string().refine(isValidFooKey),
  z.string(),
)
type Foo = z.infer<typeof Foo> // type Foo = { [x: `foo.${string}`]: string | undefined; }

console.log(Foo.parse({
  "foo.x": "some string value",
})) // succeeds, output: `{ 'foo.x': 'some string value' }`

const Bar = z.object({
  bar: z.string().optional(),
})
type Bar = z.infer<typeof Bar> // type Bar = { bar: string | undefined; }

console.log(Bar.parse({
  bar: "another string value",
})) // succeeds, output: `{ bar: 'another string value' }`

const BarAndFoo = Bar.and(Foo)
type BarAndFoo = z.infer<typeof BarAndFoo> // type BarAndFoo = { bar: string | undefined; } & Partial<Record<`foo.${string}`, string>>

console.log(BarAndFoo.parse({
  "foo.x": "some string value",
})) // succeeds, output: `{ 'foo.x': 'some string value' }`

console.log(BarAndFoo.parse({
  bar: "another string value",
})) /* fails with: ```ZodError: [
  {
    "code": "custom",
    "message": "Invalid input",
    "path": [
      "bar"
    ]
  }
]``` */

console.log(BarAndFoo.parse({
  "foo.x": "some string value",
  bar: "another string value",
})) /* fails with: ```ZodError: [
  {
    "code": "custom",
    "message": "Invalid input",
    "path": [
      "bar"
    ]
  }
]``` */

const x: BarAndFoo = {
  "foo.x": "some string value",
  bar: "another string value",
} // typescript is happy with this

I also just ran into this issue. intersection in combination with record seems to be flawed. The following code shouldn't even be accepted by typescript, but more importantly it just fails no matter what I pass to it.
const first = z.record(
  z.union([z.literal("one"), z.literal("two"), z.literal("three")]),
  z.string(),
);
const second = z.record(
  z.union([z.literal("ones"), z.literal("twos"), z.literal("threes")]),
  z.string().array(),
);
const intersect = z.intersection(first, second);

console.log(intersect.parse({
  one: ["example"],
}));

Just ran into the same issue with this type:

export interface Transform {
  [schema: string]: {
    [table: string]: boolean | RowTransform<RowShape>
  }
}
const transformConfigOptionsSchema = z.object({
  $mode: z
    .union([z.literal('auto'), z.literal('strict'), z.literal('unsafe')])
    .optional(),
  $parseJson: z.boolean().optional(),
})
const transformConfigTableSchema = z.record(
  z.string().describe('table'),
  z.union([
    z
      .function()
      .args(
        z.object({ rowIndex: z.number(), row: z.record(z.string(), z.any()) })
      )
      .returns(z.record(z.string(), z.any())),
    z.record(z.string(), z.any()),
  ])
)

export const transformConfigSchema = z.intersection(
  transformConfigOptionsSchema,
  z.record(
    z
      .string()
      .refine((s) => s !== '$mode' && s !== '$parseJson')
      .describe('schema'),
    transformConfigTableSchema
  )
)
export type TransformConfig = z.infer<typeof transformConfigSchema>

Expected to be able to parse this kind of object:
{
        $mode: 'auto',
        public: {
          books: (ctx) => ({ title: 'A Long Story' }),
        },
},

But it fails if I pass both the $mode and public: {...} parameters. However if I remove the $mode, then it's working fine.
Also the type from the schema when infered seems correect:
type TransformConfig = {
    $mode?: "auto" | "strict" | "unsafe" | undefined;
    $parseJson?: boolean | undefined;
} & Record<string, Record<string, Record<string, any> | ((args_0: {
    rowIndex: number;
    row: Record<string, any>;
}, ...args_1: unknown[]) => Record<...>)>>

Facing the same problem, the inferred type is correct but fails when parsing. For example:
const CommonKeysSchema = z.object({
  order: z.string().optional(),
  sortBy: z.string().optional(),
})

const MappingFileSchema = z.intersection(
  CommonKeysSchema,
  z.record(z.nativeEnum(ENUM), AnotherSchema)
)

It is still a problem in 3.22.2.
import {z} from 'zod';

type SetType = 'a' | 'b' | 'c';
type OrigType = { [key in SetType]?: number[] } & { disabled?: boolean };

const SetTypeSchema = z.enum(['a', 'b', 'c']);
const TypeSchema = z.intersection(
  z.record(SetTypeSchema, z.array(z.number())),
  z.object({
    disabled: z.boolean().optional()
  })
);

type Type = z.infer<typeof TypeSchema>;

const a: OrigType = {a: [1]};
const zA: Type = a; // ok
TypeSchema.parse(a); // ok
console.log('a OK');

const b: OrigType = {b: [1], disabled: true};
const zB: Type = b; // ok
TypeSchema.parse(b); // runtime error: `Invalid enum value. Expected 'a' | 'b' | 'c', received 'disabled'` and `Expected array, received boolean`
console.log('b OK');

Type in my case looks correct, but I am not sure if z.record should really be making all fields optional by default (Partial). Copied from IDE:
type Type = Partial<Record<"a" | "b" | "c", number[]>> & {     disabled?: boolean | undefined; }

Ok, so not sure if this helps anyone but I have been painfully trying to deal with this type of error myself

"message": "Expected object, received array"

which stems from using the z.record() approach above on my schema to help include some dynamic keys.
My example comes from using React-Hook-Form and trying to connect my dynamic input to the dynamic schema key.
For some reason, if I give it a small tag before the string() key it can correctly infer the type and everything pulls in correctly.
eg. When registering my RHF input field that is deeply nested
const deeplyNestedSchema = z.object({ first: z.string(), **year_amounts**: z.record(z.string(), z.coerce.number()) })
{...register(first.second.${index}.year_amounts.${dynamicKey}}   this doesnt work...
{...register(first.second.${index}.year_amounts.tag_${dynamicKey}}   this does work...
Not fully sure why this works and the other approach causes so much pain but its helped move my project along.
For context, had tried intersection / .and / .transform etc


Update Falcosidekick chart dependency to 0.5.4

Signed-off-by: Issif<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If this PR will release a new chart version please make sure to also uncomment the following line:

/kind chart-release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area falco-chart

/area falco-exporter-chart

/area falcosidekick-chart

What this PR does / why we need it:
Update Falcosidekick chart dependency to 0.5.4
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Checklist

[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] CHANGELOG.md updated

LGTM label has been added.  Git tree hash: 9966904f52e7a8514366eb114482b6b44030104a

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Issif, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

falco/OWNERS [Issif,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Incorrect values for investments when withdrawing a deposit

a large negative uninitialized value comes in place of both the locked or unlocked values for investments when you withdraw a deposit.

Fixed


Pr 259 seedwalk carousel item do not render if no children

Fixes https://github.com/brainhubeu/react-carousel/issues/258
Deployed to https://beghp.github.io/gh-pages-rc-5- [ ] package.json:version has been updated with npm version patch (or major/minor as appropriate)- [ ] @brainhubeu/react-carousel version has been updated in docs-www/package.json to the same which is in package.json:version

I checked nothing is broken (at desktop) and it works correctly for no children.


add react-native-des for android and ios

A des crypto for react-native

This has been included in today's batch :+1:


apicurio schema registry using GoLang

I need to connect to apicurio schema registry using GoLang. I tried using Confluent schema Registry GoCode package, but it does not work. How can I make it work. It integrates well with Strimzi Kafka but I am not able to find a solution for referring Schema Registry using GoLang

Can you provide more details on what you tried and how exactly it didn't work?


Mavlink-router through USB not working with PX4 v1.13 and higher

Hello,
I'm using mavlink-router to stream PX4 logs from arm to disarm state through USB. With version of PX4 1.13.2 or higher, the mavlink stream on USB is not enabled unless it receives an heartbeat. From my understanding, mavlink-router does not send heartbeat and therefore I need to force the activation of mavlink through USB with a script on the SD card on the FCU running PX4.
Is there any reason why mavlink-router is not sending heartbeats and could it be possible to add this functionality ?
Thanks in advance for your advice !

Mavlink-router should be transparent to the connected systems and therefore doesn't emit any data on its own. The log streaming feature is a different thing though, but I don't have any experience with it and don't know how it works either. But @lucasdemarchi should be able to answer your question.


Option-arrow does not act like terminal.app

When modifying commands in other terminal apps (and text editors), option-arrow acts like the b and w commands in vi, jumping to the next word boundary. In hyperterm, it instead prints ;3D and makes the ^G noise.
Note that option-delete acts as expected, deleting to the nearest word boundary.

Great find @jesseditson

I get the same behavior in iTerm, it prints: [C to right and [D to left, weird

Unfortunately, this is a non-starter for me :(

+1. This and Option+Backspace is killer features for me.

+1. 15 minutes using the HyperTerm and tried to use the Opt+Arrow Left. ;3D on my face!

This is also going to make it hard for me to switch. Is there documentation somewhere on how plugging into key-bindings?

Same here, after finding and tweaking a great theme, I hit alt+delete and nothing happens :(

This is in the process of being fixed.

+1
I use option + b and option + f quite a bit.

@adamstac The following config works for me for option + b and option + f:
module.exports = {
  config: {
    modifierKeys: {
      altIsMeta: true
    }
  }
}

Thanks @liancheng, that makes Alt+Backspace work which was driving me crazy!
Unfortunately Alt+Left and Alt+Right still don't work...

This doesn't seem to work yet. Maybe the ticket should be re-opened?


Has anyone reproduced the training code,I need some help!

@lpx153623 Hi

Hello, I don't know if you are still working on this project, I also have some questions and need help


Master branch targets Godot 4.x

Align with Godot repo. Godot 3.x builds will be in a godot-3 branch.

@ashtonmeuser Probably want to start converting master to 4 first?

You're probably right. I'll look into what's needed for this.


NameError: global name 'kweargs' is not defined

hi @tjwei
I followed the instructions and finished the installation .
Then I run “python nstest.py”  and get an error:
Traceback (most recent call last):
File "nstest.py", line 2, in
import neuralStyle
File "/home/sojoyoo/neural_style_kivy/neuralStyle.py", line 69, in
net = build_model()
File "/home/sojoyoo/neural_style_kivy/neuralStyle.py", line 44, in build_model
net['conv1_1'] = ConvLayer(net['input'], 64, 3, pad=1)
File "/home/sojoyoo/neural_style_kivy/neuralStyle.py", line 35, in ConvLayer
return ConvLayer0(*args, flip_filters=False, **kweargs)
NameError: global name 'kweargs' is not defined
Do you know how to solve this ?
Thank you

Thanks. The latest commit should fix it.

ok,i'll try it


In Inspect, click targets for sketches are too large

The reason for this is that sketches are in SVG files with lots of blank space around the outside.  Inkscape can be used to trim these files to the boundaries of the actual drawing.  When this happens, the size will also need to be adjusted in the definition in CodeWorld.Sketches.

This bug is easy to fix, but error-prone.  To fix, one must open each of the sketch svg files in something like Inkscape, trim the canvas to fit the drawing, then make a note of the ratio by which width and height are each reduced.  Then save the svg again, reoptimize with svgo, and modify codeworld-api/src/CodeWorld/Sketches.hs to similarly reduce the expected width and height by the same ratio as the size reduction in the file.


[Feature request] Date class, without time

I'm pretty surprised there is no such issue (or I just didn't find it).
I want to propose adding a Date class to the Dart core SDK.

It should not have any idea of a time and simply describe a day on a Gregorian calendar.
It should hold a year, a month, and a day.
It should not contain the hour, minutes, seconds, or time zone information.
Ideally, it would have methods for adding and subtracting days, months, and years. This will help calculate different date ranges without worrying about DST.

It probably should have a few other things.
Currently, developers have to either implement such data structure with all the related logic and checks on their own or use one of the available solutions from The Community:

dart_date, 95% popularity
time_machine, 92% popularity
date_time, 75% popularity
dateable, 45% popularity

Other languages

C# - DateOnly https://docs.microsoft.com/en-us/dotnet/api/system.dateonly?view=net-6.0
Rust - chrono::Date https://docs.rs/chrono/0.4.0/chrono/struct.Date.html
Python - date https://docs.python.org/3/library/datetime.html#date-objects

Related to #4195, probably others.
Quick and dirty implementation:
class Date {
  static const int _j1970jan1 = 2440588;
  final DateTime _date;
  Date(int year, int month, int day) : _date = DateTime.utc(year, month, day);
  Date.fromJulianDay(int julianDay) : this(-4713, 11, 24 + julianDay);

  int get year => _date.year;
  int get month => _date.month;
  int get day => _date.day;
  int get weekday => _date.weekday;
  int get julianDay => _date.millisecondsSinceEpoch ~/ 86400000 + _j1970jan1;

  Date update({int? year, int? month, int? day}) =>
      Date(year ?? _date.year, month ?? _date.month, day ?? _date.day);

  Date add({int years = 0, int months = 0, int days = 0}) =>
      Date(_date.year + years, _date.month + months, _date.day + days);

  Date subtract({int years = 0, int months = 0, int days = 0}) =>
      Date(_date.year - years, _date.month - months, _date.day - days);

  @override
  String toString() {
    var s = _date.toString();
    return s.substring(0, s.indexOf(" "));
  }
}

It's something we can do, but you can get very far by just using UTC-DateTime with zero time.

Would love this. I found myself chasing down a weird bug caused by the foot gun of doing DateTime "math" in local time.
  static Iterable<DateTime> daysFrom(Duration duration) {
    final numberOfDays = duration.inDays;
    final dates = List<DateTime>.generate(
      numberOfDays,
      (index) => nowUtc.subtract(Duration(days: index)), // Was previously using `DateTime.now()` instead of a UTC `DateTime`
    ).reversed.map((e) => e.toLocal().copyWith(hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0));
    return dates;
  }

I have a use case where a server returns date objects (without time!) and I need the dates generated by my app to align with them. Using toLocal() adjusts the time, so "zero-ing" the DateTime object becomes necessary. It feels like a lot of dancing around to achieve what should be trivial.

I'd probably just go with something like:
extension DateTimeDate on DateTime {
   bool get isDate => isUtc && millisecondsSinceEpoch % DateTime.millisecondsPerDay == 0;
   DateTime toDate() => DateTime.utc(year, month, day);
}

With extension types, maybe it's worth creating a better API:
/// A calendar date in the proleptic Gregorian calendar.
///
/// Uses an UTC [DateTime] for all calculations, so has the same behavior and
/// limits as that.
// Comment out the following line until extension types are released.
// extension type Date._(DateTime _time) { /*
class Date {
  final DateTime _time;
  Date._(this._time);
  String toString() => _time.toString();
//*/
  /// Calendar date of the [year], [month] and [day].
  ///
  /// The [month] and [day] are normalized to be in the range 1 through 12
  /// for months, and 1 through length-of-month for the day.
  /// Overflow or underflow is moved into the next larger unit, month
  /// or year.
  ///
  /// The normalized date must be in the range
  /// -271821-04-20 through 275760-09-13 (100_000_000 days to either side of
  /// the Dart `DateTime` epoch of 1970-01-01).
  Date(int year, int month, int day) : this._(DateTime.utc(year, month, day));

  /// The calendar date of the [dateAndTime].
  Date.from(DateTime dateAndTime)
      : this(dateAndTime.year, dateAndTime.month, dateAndTime.day);

  /// Date of the [julianDay]th Julian Day.
  Date.fromJulianDay(int julianDay)
      : this._fromDaysSinceEpoch(julianDay - _julianDayOfEpoch);

  /// Date of [days] since 0000-01-01.
  Date.fromDaysSinceZero(int days)
      : this._fromDaysSinceEpoch(days - _zeroDayOfEpoch);

  /// Date of [days] since the arbitrary calendar epoch 1970-01-01.
  Date._fromDaysSinceEpoch(int days)
      : this._(DateTime.fromMillisecondsSinceEpoch(
            days * Duration.millisecondsPerDay,
            isUtc: true));

  /// Today's date.
  Date.today() : this.from(DateTime.timestamp());

  /// Parses a formatted date.
  ///
  /// Accepts the same formats as [DateTime.parse],
  /// and throws away the time.
  /// Throws a [FormatException] if the input is not accepted.
  static Date parse(String formattedDate) => Date.from(DateTime.parse(formattedDate));

  /// Tries to parse a formatted date.
  ///
  /// Accepts the same formats as [DateTime.parse],
  /// and throws away the time.
  /// Returns `null` if the input is not accepted.
  static Date? tryParse(String formattedDate) {
    var time = DateTime.tryParse(formattedDate);
    if (time == null) return null;
    return Date.from(time);
  }

  /// Calendar year.
  int get year => _time.year;

  /// Calendar month.
  ///
  /// Always in the range 1 through 12, representing January through December.
  int get month => _time.month;

  /// Day in month.
  ///
  /// Always a number in the range 1 through 31 for long months, 30 for shorter months,
  /// and 28 or 20 for February, depending on whether it's a leap year.
  int get day => _time.day;

  /// The number of days in the current month.
  int get daysInMonth =>
      const [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1] ??
      (isLeapYear ? 29 : 28);

  /// Day in year.
  ///
  /// The number of days in the year up to and including the current day.
  /// The day-in-year of the 1st of January is 1.
  ///
  /// A date `date` can be recreated by `Date(date.year, 1, date.dayInYear)`.
  int get dayInYear {
    var startOfYear = DateTime.utc(year, 1, 1);
    return 1 + (_time.millisecondsSinceEpoch -
            startOfYear.millisecondsSinceEpoch) ~/
        Duration.millisecondsPerDay;
  }

  /// Whether this year is a leap-year.
  ///
  /// A year in the proleptic Gregorian calendar is a leap year if:
  /// * It's divisible by 4, and
  /// * It's not divisible by 100, unless
  /// * It's also divisble by 400.
  ///
  /// This gives 97 leap years per 400 years.
  bool get isLeapYear {
    var year = this.year;
    return (year & 0x3 == 0) && ((year & 0xC != 0) || (year % 25 == 0));
  }

  /// Julian day of the day.
  ///
  /// This is the number of days since the epoch of the Julian calendar,
  /// which is -4713-11-24 in the proleptic Gregorian calendar.
  int get julianDay => _daysSinceEpoch - _julianDayOfEpoch;

  /// Whether this date is strictly before [other].
  bool operator <(Date other) => _daysSinceEpoch < other._daysSinceEpoch;

  /// Whether this date is no later than [other].
  bool operator <=(Date other) => _daysSinceEpoch <= other._daysSinceEpoch;

  /// Whether this date is strictly after [other].
  bool operator >(Date other) => _daysSinceEpoch > other._daysSinceEpoch;

  /// Whether this date is no earlier than [other].
  bool operator >=(Date other) => _daysSinceEpoch >= other._daysSinceEpoch;

  /// The number of whole days from this date to [other].
  ///
  /// Is negative if [other] is before this date.
  int dayDifference(Date other) => other._daysSinceEpoch - _daysSinceEpoch;

  /// A calendar date [days] later than this one, or earlier if [days] is negative.
  Date addDays(int days) => Date._fromDaysSinceEpoch(_daysSinceEpoch + days);

  /// Modifies the year, month and day by adding to their values.
  ///
  /// The [years], [monts] and [days] are added to
  /// the [year], [month] and [day] of the current date,
  /// then normalized to a valid calendar date.
  /// The added values can be negative.
  ///
  /// Doing `date.add(years: y, months: m, days: d)` is qquivalent
  /// to `Date(date.year + y, date.month + m, date.day + d)`.
  Date add({int years = 0, int months = 0, int days = 0}) =>
      Date(year + years, month + months, day + days);

  /// Updates the individual year, month or day to a new value.
  ///
  /// If the result is not a valid calendar date, either
  /// by directly setting an invalid value, like a month of 14,
  /// or by chaning the year and month so that the day is now
  /// greater than the length of the month, the date is
  /// normalized the same way as the [new Date] constructor.
  Date update({int? year, int? month, int? day}) =>
      Date(year ?? this.year, month ?? this.month, day ?? this.day);

  /// Entire calendar days since 1970-01-01.
  ///
  /// Complicated by extension types not being able to prevent
  /// any `DateTime` from being cast to `Date`.
  /// For `Date`s created using the extension type constructors,
  /// the `isUtc` is always true and the milliseconds are always
  /// a multiple of [Duration.millisecondsPerDay].
  int get _daysSinceEpoch {
    var ms = _time.millisecondsSinceEpoch;
    if (!_time.isUtc) {
      ms += _time.timeZoneOffset.inMilliseconds;
    }
    return ms ~/ Duration.millisecondsPerDay;
  }

  /// Creates a `DateTime` object with the current date, at midnight.
  ///
  /// The default is to create a UTC `DateTime`.
  /// If [local] is true, the created `DateTime` is local time.
  /// Be aware that some locations switch daylight saving time
  /// at midnight.
  DateTime toDateTime({bool local = false}) => local
      ? DateTime(year, month, day)
      : DateTime.fromMillisecondsSinceEpoch(
          _daysSinceEpoch * Duration.millisecondsPerDay);

  /// This date as a simple "year-month-day" string.
  ///
  /// If the year is negative, it starts with a minus sign.
  /// The year is padded to at least four digits,
  /// the month and day to two digits.
  String toDateString() {
    var year = this.year;
    var month = this.month;
    var day = this.day;
    String yearString;
    if (year.abs() < 1000) {
      yearString = year.abs().toString().padLeft(4, '0');
      if (year < 0) yearString = "-$yearString";
    } else {
      yearString = year.toString();
    }
    return "$yearString-${month < 10 ? "0": ""}$month-${day < 10 ? "0" : ""}$day";
  }

  /// Days between -4713-11-24 and 1970-01-01.
  static const int _julianDayOfEpoch = 2440588;

  /// Days between 0000-01-01 and 1970-01-01
  static const int _zeroDayOfEpoch = 719528;
}

extension DateTimeDate on DateTime {
  /// Extracts the calendar date from this `DateTime`.
  Date toDate() => Date.from(this);

  /// Whether this date and time only contains a date.
  ///
  /// A date time is considered to only contain a date
  /// when it's in the UTC time zone, and is precisely
  /// at midnight (hours, minutes, seconds, and milliseconds
  /// are all zero).
  bool get isDate => isUtc &&
      (millisecondsSinceEpoch % Duration.millisecondsPerDay) == 0
}

(Obviously not tested at all!)

Even Java has got a proper date type: LocalDate
The need for zeroing time when doing pure date calculations is an unnecessary source of bugs.


[BUG] Backing image manager does not release ports correctly after file syncing

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Create multiple backing images. It's better to make sure the file size is relatively large so that the syncing won't be done immediately.
Create and attach multiple volumes using these backing images.
Wait for the attachment complete.
Repeat the above step until one backing image file gets stuck in the port-already-in-use error

Expected behavior
There should not be an error when syncing files between backing image managers
Log or Support bundle
[backing-image-manager-88c0-25dd] time="2022-06-07T12:42:43Z" level=info msg="SyncingFile: start to launch a receiver" component=sync-file filePath=/data/backing-images/bi-test3-af03de7b/backing uuid=af03de7b
[backing-image-manager-88c0-25dd] time="2022-06-07T12:42:43Z" level=info msg="Creating Ssync service"
[backing-image-manager-88c0-25dd] time="2022-06-07T12:42:43Z" level=error msg="SyncingFile: failed to process sync file: listen tcp :30002: bind: address already in use" component=sync-file filePath=/data/backing-images/bi-test3-af03de7b/backing uuid=af03de7b
[backing-image-manager-88c0-25dd] time="2022-06-07T12:42:43Z" level=error msg="Sync Service: failed to receive sync file /data/backing-images/bi-test3-af03de7b/backing: listen tcp :30002: bind: address already in use" component=sync-server listen="<IP_ADDRESS>:8001"

Environment

Longhorn version: v1.3.0-rc2

cc @longhorn/qa

@mantissahz Please help with that testing. Thanks.

Verified on v1.23.6+k3s1 cluster with master-head image 2022/06/13
Validation - PASSED
Steps:

Create six backing images with image sizes 958Mi, 683Mi and 501Mi.
Create six multiple volumes using these backing images and attach them to the node.
Wait for the attachment complete.
repeat steps 1~3 for six rounds and it won't gets stuck in the port-already-in-use error.


Add an import keyword to access classes: Import res://my_file.gd as ClassName

Following on a discussion about writing idiomatic GDscript with @willnationsdev and @bojidar-bg, we noted that you end up with mixed snake_case and PascalCase when you create new instances of objects if you load scripts:
KinematicBody2D.new()
var my_cool_node = load("res://my_cool_node.gd")
my_cool_node.new()

It looks like the variable isn't a node type. GDscript already borrows some syntax from python. In python, you can import the content of another package and assign it to a new identifier:
import xml.etree.ElementTree as ElementTree

The idea isn't to borrow the complex features. Just the base syntax. Importing a GDscript class into another:
import 'res://my_cool_node.gd' as MyCoolNode

So that we can write
MyCoolNode.new()
KinematicBody2D.new()

Or keep a global class like that
import "res://utils/Utils.gd" as Utils

Utils.useful_method(my_data)

Open for discussion! Past issue on a similar note: https://github.com/godotengine/godot/issues/5570

There were some discussions about this in the past, nice to see it surface as an issue 👍

var my_cool_node = load("res://my_cool_node.gd")

Well, using snake_case for variables doesn't mean that you can be more creative when importing something that represents a class and not a node:
const MyCoolClass = preload("res://my_cool_class.gd")

func do_stuff():
    var my_cool_node = MyCoolClass.new()

I'm not sure where I see the PascalCase and snake_case mix being a Godot problem in the first example you gave, Nathan. This looks like the two being mixed was the end user's choice, not Godot's choice.
In regards to the keyword suggestion, personally I don't see the difference between what's suggested and what Akien suggested (using the const keyword) besides how it's typed out. But besides that, I'm not against such a keyword, I'm just confused as to the need for it.

Didn't think about this. Then we'd have to update the GDscript writing guidelines to state that PascalCase is okay for constants in this case. Currently it's only var snake_case and const CONST_CASE. Not a big deal for the end user but as we're trying to make all the code in the docs consistent for writers it's worth taking note of.
So yeah aside from that considering that in gdscript:

you rarely get to use inner classes and build "libraries"
you can access singletons and global values from any script

There's not really a need for imports as in Py or JS. Do we close it here or someone wants to add something?

I'm pretty sure that this can be closed at this point. Making any additional changes would just be unnecessary additional complexity for the parser for relatively little benefit if the styling of the const PascalCase = preload("script.gd") construction can be used in place of the import concept's goal.

This is now fixed by a3f1ee5c5.